From 8efc635b1e56fd546bec55fc65dade1245522ee1 Mon Sep 17 00:00:00 2001 From: Matt Kane Date: Fri, 23 Sep 2022 13:01:35 +0100 Subject: [PATCH 001/172] chore: update canary demo --- demos/canary/package-lock.json | 340 +++++++++++++++++---------------- demos/canary/package.json | 2 +- 2 files changed, 174 insertions(+), 168 deletions(-) diff --git a/demos/canary/package-lock.json b/demos/canary/package-lock.json index 1cb781bd7e..c38b0b632f 100644 --- a/demos/canary/package-lock.json +++ b/demos/canary/package-lock.json @@ -8,7 +8,7 @@ "name": "canary", "version": "0.1.0", "dependencies": { - "next": "^12.2.0", + "next": "^12.3.2-canary.7", "react": "18.1.0", "react-dom": "18.1.0" }, @@ -65,14 +65,14 @@ "license": "BSD-3-Clause" }, "node_modules/@next/env": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/@next/env/-/env-12.2.0.tgz", - "integrity": "sha512-/FCkDpL/8SodJEXvx/DYNlOD5ijTtkozf4PPulYPtkPOJaMPpBSOkzmsta4fnrnbdH6eZjbwbiXFdr6gSQCV4w==" + "version": "12.3.2-canary.7", + "resolved": "https://registry.npmjs.org/@next/env/-/env-12.3.2-canary.7.tgz", + "integrity": "sha512-uk5yDvh8ra8PlIczZBTZKyt5Rf6a6mH2tGB3hwRAXD5hVLd74LzBQza2aYMEcDlRafAknsbL0dnqI3CkFYat9w==" }, "node_modules/@next/swc-android-arm-eabi": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.2.0.tgz", - "integrity": "sha512-hbneH8DNRB2x0Nf5fPCYoL8a0osvdTCe4pvOc9Rv5CpDsoOlf8BWBs2OWpeP0U2BktGvIsuUhmISmdYYGyrvTw==", + "version": "12.3.2-canary.7", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.3.2-canary.7.tgz", + "integrity": "sha512-pusM/ylasGBweiwhINtqWCgy5bOjLmIctFD0etpmh9+DqCg09yu58hJ1Dn/UTW8EbB1nkTP1z3dEoMKLh4fV2A==", "cpu": [ "arm" ], @@ -85,9 +85,9 @@ } }, "node_modules/@next/swc-android-arm64": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-12.2.0.tgz", - "integrity": "sha512-1eEk91JHjczcJomxJ8X0XaUeNcp5Lx1U2Ic7j15ouJ83oRX+3GIslOuabW2oPkSgXbHkThMClhirKpvG98kwZg==", + "version": "12.3.2-canary.7", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-12.3.2-canary.7.tgz", + "integrity": "sha512-x11T0ocPE9xrnqMeDzUMepN3P8CHIN8iiLgiFkbTbKTbSciuH3juOvKggJO9APZRG5Ch5eePWcCy2gHedAbhnA==", "cpu": [ "arm64" ], @@ -100,9 +100,9 @@ } }, "node_modules/@next/swc-darwin-arm64": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.2.0.tgz", - "integrity": "sha512-x5U5gJd7ZvrEtTFnBld9O2bUlX8opu7mIQUqRzj7KeWzBwPhrIzTTsQXAiNqsaMuaRPvyHBVW/5d/6g6+89Y8g==", + "version": "12.3.2-canary.7", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.3.2-canary.7.tgz", + "integrity": "sha512-tcO9hDaMfcbiaZp1B+HZcLzGGs36dnmjQ0YXyn6C88HEUoKyxanYleVHtTmWHlgsxxjZdDd/RzOze1ycWs2oXw==", "cpu": [ "arm64" ], @@ -115,9 +115,9 @@ } }, "node_modules/@next/swc-darwin-x64": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.2.0.tgz", - "integrity": "sha512-iwMNFsrAPjfedjKDv9AXPAV16PWIomP3qw/FfPaxkDVRbUls7BNdofBLzkQmqxqWh93WrawLwaqyXpJuAaiwJA==", + "version": "12.3.2-canary.7", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.3.2-canary.7.tgz", + "integrity": "sha512-WjAyU67zj69nRM2GNAnBLvghq4EHTyDzMO02GjG6yexVhDvkE0OFlvh0BQLI3DIOz+B3RjJRcW3OoHi8XzW9UA==", "cpu": [ "x64" ], @@ -130,9 +130,9 @@ } }, "node_modules/@next/swc-freebsd-x64": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.2.0.tgz", - "integrity": "sha512-gRiAw8g3Akf6niTDLEm1Emfa7jXDjvaAj/crDO8hKASKA4Y1fS4kbi/tyWw5VtoFI4mUzRmCPmZ8eL0tBSG58A==", + "version": "12.3.2-canary.7", + "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.3.2-canary.7.tgz", + "integrity": "sha512-cQrdPCMhP1Mc+pIt16FlC5BVgcXzLXRlm7qZ7wBRKG6r/IIIn/qNRFgQQcB3iyvfNZo7lURLKcfsxNmMGclldQ==", "cpu": [ "x64" ], @@ -145,9 +145,9 @@ } }, "node_modules/@next/swc-linux-arm-gnueabihf": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.2.0.tgz", - "integrity": "sha512-/TJZkxaIpeEwnXh6A40trgwd40C5+LJroLUOEQwMOJdavLl62PjCA6dGl1pgooWLCIb5YdBQ0EG4ylzvLwS2+Q==", + "version": "12.3.2-canary.7", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.3.2-canary.7.tgz", + "integrity": "sha512-LEL+dUe10FhQHyXq9Mul5pOJwKDtrAylh9chktWf8eFr14j/YrfPbkLHv1+tCK8brDV3afVJMl0IpoCo75Yfyg==", "cpu": [ "arm" ], @@ -160,9 +160,9 @@ } }, "node_modules/@next/swc-linux-arm64-gnu": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.2.0.tgz", - "integrity": "sha512-++WAB4ElXCSOKG9H8r4ENF8EaV+w0QkrpjehmryFkQXmt5juVXz+nKDVlCRMwJU7A1O0Mie82XyEoOrf6Np1pA==", + "version": "12.3.2-canary.7", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.3.2-canary.7.tgz", + "integrity": "sha512-mbDqHk3C76UGIzkOv+G5NslKiSYIXyWQwbkuty0+0wLVJttWjWi2dMN7DFJQPMNvBefU9/vxVJdUnGVGEZfUXw==", "cpu": [ "arm64" ], @@ -175,9 +175,9 @@ } }, "node_modules/@next/swc-linux-arm64-musl": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.2.0.tgz", - "integrity": "sha512-XrqkHi/VglEn5zs2CYK6ofJGQySrd+Lr4YdmfJ7IhsCnMKkQY1ma9Hv5THwhZVof3e+6oFHrQ9bWrw9K4WTjFA==", + "version": "12.3.2-canary.7", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.3.2-canary.7.tgz", + "integrity": "sha512-gJ3VQHuqb3ABiOKPxfWAJQdO4mp3yNnWIAPN8n52F7Zu38udbHXvcbIylWfQW/Qah+RRf7P7y2txH2kC07QOPA==", "cpu": [ "arm64" ], @@ -190,9 +190,9 @@ } }, "node_modules/@next/swc-linux-x64-gnu": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.2.0.tgz", - "integrity": "sha512-MyhHbAKVjpn065WzRbqpLu2krj4kHLi6RITQdD1ee+uxq9r2yg5Qe02l24NxKW+1/lkmpusl4Y5Lks7rBiJn4w==", + "version": "12.3.2-canary.7", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.3.2-canary.7.tgz", + "integrity": "sha512-/PBLiC+JfMJIzwMCQaSQgnLoIOjdSjTA9zarj2Kk1eCLjH8/VnsfBWtmP7TdbgIRYnZ8QKb4HXSOq94ZQS/fkw==", "cpu": [ "x64" ], @@ -205,9 +205,9 @@ } }, "node_modules/@next/swc-linux-x64-musl": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.2.0.tgz", - "integrity": "sha512-Tz1tJZ5egE0S/UqCd5V6ZPJsdSzv/8aa7FkwFmIJ9neLS8/00za+OY5pq470iZQbPrkTwpKzmfTTIPRVD5iqDg==", + "version": "12.3.2-canary.7", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.3.2-canary.7.tgz", + "integrity": "sha512-Bf3goHoUd0SB58sVTMva0ByoLM+aEhm5YJRqsi7SsOAu9EAQwYfWgY2Hx60ah5i1N4ihYK0xjs8kwlfdDVOuow==", "cpu": [ "x64" ], @@ -220,9 +220,9 @@ } }, "node_modules/@next/swc-win32-arm64-msvc": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.2.0.tgz", - "integrity": "sha512-0iRO/CPMCdCYUzuH6wXLnsfJX1ykBX4emOOvH0qIgtiZM0nVYbF8lkEyY2ph4XcsurpinS+ziWuYCXVqrOSqiw==", + "version": "12.3.2-canary.7", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.3.2-canary.7.tgz", + "integrity": "sha512-aPRQ4dY5MuLgHCVdY+/Grgg4oX38pG4S0sT8mpatK3oIdjhj3961cj33QpPAy6dhhCs8m0/eCWYmM9KKlAAUsg==", "cpu": [ "arm64" ], @@ -235,9 +235,9 @@ } }, "node_modules/@next/swc-win32-ia32-msvc": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.2.0.tgz", - "integrity": "sha512-8A26RJVcJHwIKm8xo/qk2ePRquJ6WCI2keV2qOW/Qm+ZXrPXHMIWPYABae/nKN243YFBNyPiHytjX37VrcpUhg==", + "version": "12.3.2-canary.7", + "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.3.2-canary.7.tgz", + "integrity": "sha512-hr+TBDICVezyn0HDK4QootalbcuLj9F8qUzZZAw3gHz16rUDpqpnlRjw3RC99AzkKL7qMsdR/+SwnBlBY7ZK7Q==", "cpu": [ "ia32" ], @@ -250,9 +250,9 @@ } }, "node_modules/@next/swc-win32-x64-msvc": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.2.0.tgz", - "integrity": "sha512-OI14ozFLThEV3ey6jE47zrzSTV/6eIMsvbwozo+XfdWqOPwQ7X00YkRx4GVMKMC0rM44oGS2gmwMKYpe4EblnA==", + "version": "12.3.2-canary.7", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.3.2-canary.7.tgz", + "integrity": "sha512-1n29b6meb54h/Mw/1xPoJB682nWbtEsUQo7rFJ6G44Nj3fYFXe+XOWQxWu6Sl8yvdBXcZRhRCHuAZGqYtmqorQ==", "cpu": [ "x64" ], @@ -300,9 +300,9 @@ } }, "node_modules/@swc/helpers": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.4.2.tgz", - "integrity": "sha512-556Az0VX7WR6UdoTn4htt/l3zPQ7bsQWK+HqdG4swV7beUCxo/BqmvbOpUkTIm/9ih86LIf1qsUnywNL3obGHw==", + "version": "0.4.11", + "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.4.11.tgz", + "integrity": "sha512-rEUrBSGIoSFuYxwBYtlUFMlE2CwGhmW+w9355/5oduSw8e5h2+Tj4UrAGNNgP9915++wj5vkQo0UuOBqOAq4nw==", "dependencies": { "tslib": "^2.4.0" } @@ -413,9 +413,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001393", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001393.tgz", - "integrity": "sha512-N/od11RX+Gsk+1qY/jbPa0R6zJupEa0lxeBG598EbrtblxVCTJsQwbRBm6+V+rxpc5lHKdsXb9RY83cZIPLseA==", + "version": "1.0.30001410", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001410.tgz", + "integrity": "sha512-QoblBnuE+rG0lc3Ur9ltP5q47lbguipa/ncNMyyGuqPk44FxbScWAeEO+k5fSQ8WekdAK4mWqNs1rADDAiN5xQ==", "funding": [ { "type": "opencollective", @@ -1084,16 +1084,16 @@ "license": "MIT" }, "node_modules/next": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/next/-/next-12.2.0.tgz", - "integrity": "sha512-B4j7D3SHYopLYx6/Ark0fenwIar9tEaZZFAaxmKjgcMMexhVJzB3jt7X+6wcdXPPMeUD6r09weUtnDpjox/vIA==", + "version": "12.3.2-canary.7", + "resolved": "https://registry.npmjs.org/next/-/next-12.3.2-canary.7.tgz", + "integrity": "sha512-zUosveWzpeRVy7j4ANoJ4gu0TBrkLYwPlIUEXrqqs/zLpHMu+tanxA1R1ts2d7h/2dSmeVZgGcHiVcHj5uspEA==", "dependencies": { - "@next/env": "12.2.0", - "@swc/helpers": "0.4.2", - "caniuse-lite": "^1.0.30001332", - "postcss": "8.4.5", - "styled-jsx": "5.0.2", - "use-sync-external-store": "1.1.0" + "@next/env": "12.3.2-canary.7", + "@swc/helpers": "0.4.11", + "caniuse-lite": "^1.0.30001406", + "postcss": "8.4.14", + "styled-jsx": "5.0.7", + "use-sync-external-store": "1.2.0" }, "bin": { "next": "dist/bin/next" @@ -1102,19 +1102,19 @@ "node": ">=12.22.0" }, "optionalDependencies": { - "@next/swc-android-arm-eabi": "12.2.0", - "@next/swc-android-arm64": "12.2.0", - "@next/swc-darwin-arm64": "12.2.0", - "@next/swc-darwin-x64": "12.2.0", - "@next/swc-freebsd-x64": "12.2.0", - "@next/swc-linux-arm-gnueabihf": "12.2.0", - "@next/swc-linux-arm64-gnu": "12.2.0", - "@next/swc-linux-arm64-musl": "12.2.0", - "@next/swc-linux-x64-gnu": "12.2.0", - "@next/swc-linux-x64-musl": "12.2.0", - "@next/swc-win32-arm64-msvc": "12.2.0", - "@next/swc-win32-ia32-msvc": "12.2.0", - "@next/swc-win32-x64-msvc": "12.2.0" + "@next/swc-android-arm-eabi": "12.3.2-canary.7", + "@next/swc-android-arm64": "12.3.2-canary.7", + "@next/swc-darwin-arm64": "12.3.2-canary.7", + "@next/swc-darwin-x64": "12.3.2-canary.7", + "@next/swc-freebsd-x64": "12.3.2-canary.7", + "@next/swc-linux-arm-gnueabihf": "12.3.2-canary.7", + "@next/swc-linux-arm64-gnu": "12.3.2-canary.7", + "@next/swc-linux-arm64-musl": "12.3.2-canary.7", + "@next/swc-linux-x64-gnu": "12.3.2-canary.7", + "@next/swc-linux-x64-musl": "12.3.2-canary.7", + "@next/swc-win32-arm64-msvc": "12.3.2-canary.7", + "@next/swc-win32-ia32-msvc": "12.3.2-canary.7", + "@next/swc-win32-x64-msvc": "12.3.2-canary.7" }, "peerDependencies": { "fibers": ">= 3.1.0", @@ -1252,20 +1252,26 @@ } }, "node_modules/postcss": { - "version": "8.4.5", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.5.tgz", - "integrity": "sha512-jBDboWM8qpaqwkMwItqTQTiFikhs/67OYVvblFFTM7MrZjt6yMKd6r2kgXizEbTTljacm4NldIlZnhbjr84QYg==", + "version": "8.4.14", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.14.tgz", + "integrity": "sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + } + ], "dependencies": { - "nanoid": "^3.1.30", + "nanoid": "^3.3.4", "picocolors": "^1.0.0", - "source-map-js": "^1.0.1" + "source-map-js": "^1.0.2" }, "engines": { "node": "^10 || ^12 || >=14" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" } }, "node_modules/prelude-ls": { @@ -1457,9 +1463,9 @@ } }, "node_modules/styled-jsx": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.0.2.tgz", - "integrity": "sha512-LqPQrbBh3egD57NBcHET4qcgshPks+yblyhPlH2GY8oaDgKs8SK4C3dBh3oSJjgzJ3G5t1SYEZGHkP+QEpX9EQ==", + "version": "5.0.7", + "resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.0.7.tgz", + "integrity": "sha512-b3sUzamS086YLRuvnaDigdAewz1/EFYlHpYBP5mZovKEdQQOIIYq8lApylub3HHZ6xFjV051kkGU7cudJmrXEA==", "engines": { "node": ">= 12.0.0" }, @@ -1539,9 +1545,9 @@ } }, "node_modules/use-sync-external-store": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.1.0.tgz", - "integrity": "sha512-SEnieB2FPKEVne66NpXPd1Np4R1lTNKfjuy3XdIoPQKYBAFdzbzSZlSn1KJZUiihQLQC5Znot4SBz1EOTBwQAQ==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz", + "integrity": "sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==", "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0" } @@ -1629,86 +1635,86 @@ "dev": true }, "@next/env": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/@next/env/-/env-12.2.0.tgz", - "integrity": "sha512-/FCkDpL/8SodJEXvx/DYNlOD5ijTtkozf4PPulYPtkPOJaMPpBSOkzmsta4fnrnbdH6eZjbwbiXFdr6gSQCV4w==" + "version": "12.3.2-canary.7", + "resolved": "https://registry.npmjs.org/@next/env/-/env-12.3.2-canary.7.tgz", + "integrity": "sha512-uk5yDvh8ra8PlIczZBTZKyt5Rf6a6mH2tGB3hwRAXD5hVLd74LzBQza2aYMEcDlRafAknsbL0dnqI3CkFYat9w==" }, "@next/swc-android-arm-eabi": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.2.0.tgz", - "integrity": "sha512-hbneH8DNRB2x0Nf5fPCYoL8a0osvdTCe4pvOc9Rv5CpDsoOlf8BWBs2OWpeP0U2BktGvIsuUhmISmdYYGyrvTw==", + "version": "12.3.2-canary.7", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.3.2-canary.7.tgz", + "integrity": "sha512-pusM/ylasGBweiwhINtqWCgy5bOjLmIctFD0etpmh9+DqCg09yu58hJ1Dn/UTW8EbB1nkTP1z3dEoMKLh4fV2A==", "optional": true }, "@next/swc-android-arm64": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-12.2.0.tgz", - "integrity": "sha512-1eEk91JHjczcJomxJ8X0XaUeNcp5Lx1U2Ic7j15ouJ83oRX+3GIslOuabW2oPkSgXbHkThMClhirKpvG98kwZg==", + "version": "12.3.2-canary.7", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-12.3.2-canary.7.tgz", + "integrity": "sha512-x11T0ocPE9xrnqMeDzUMepN3P8CHIN8iiLgiFkbTbKTbSciuH3juOvKggJO9APZRG5Ch5eePWcCy2gHedAbhnA==", "optional": true }, "@next/swc-darwin-arm64": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.2.0.tgz", - "integrity": "sha512-x5U5gJd7ZvrEtTFnBld9O2bUlX8opu7mIQUqRzj7KeWzBwPhrIzTTsQXAiNqsaMuaRPvyHBVW/5d/6g6+89Y8g==", + "version": "12.3.2-canary.7", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.3.2-canary.7.tgz", + "integrity": "sha512-tcO9hDaMfcbiaZp1B+HZcLzGGs36dnmjQ0YXyn6C88HEUoKyxanYleVHtTmWHlgsxxjZdDd/RzOze1ycWs2oXw==", "optional": true }, "@next/swc-darwin-x64": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.2.0.tgz", - "integrity": "sha512-iwMNFsrAPjfedjKDv9AXPAV16PWIomP3qw/FfPaxkDVRbUls7BNdofBLzkQmqxqWh93WrawLwaqyXpJuAaiwJA==", + "version": "12.3.2-canary.7", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.3.2-canary.7.tgz", + "integrity": "sha512-WjAyU67zj69nRM2GNAnBLvghq4EHTyDzMO02GjG6yexVhDvkE0OFlvh0BQLI3DIOz+B3RjJRcW3OoHi8XzW9UA==", "optional": true }, "@next/swc-freebsd-x64": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.2.0.tgz", - "integrity": "sha512-gRiAw8g3Akf6niTDLEm1Emfa7jXDjvaAj/crDO8hKASKA4Y1fS4kbi/tyWw5VtoFI4mUzRmCPmZ8eL0tBSG58A==", + "version": "12.3.2-canary.7", + "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.3.2-canary.7.tgz", + "integrity": "sha512-cQrdPCMhP1Mc+pIt16FlC5BVgcXzLXRlm7qZ7wBRKG6r/IIIn/qNRFgQQcB3iyvfNZo7lURLKcfsxNmMGclldQ==", "optional": true }, "@next/swc-linux-arm-gnueabihf": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.2.0.tgz", - "integrity": "sha512-/TJZkxaIpeEwnXh6A40trgwd40C5+LJroLUOEQwMOJdavLl62PjCA6dGl1pgooWLCIb5YdBQ0EG4ylzvLwS2+Q==", + "version": "12.3.2-canary.7", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.3.2-canary.7.tgz", + "integrity": "sha512-LEL+dUe10FhQHyXq9Mul5pOJwKDtrAylh9chktWf8eFr14j/YrfPbkLHv1+tCK8brDV3afVJMl0IpoCo75Yfyg==", "optional": true }, "@next/swc-linux-arm64-gnu": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.2.0.tgz", - "integrity": "sha512-++WAB4ElXCSOKG9H8r4ENF8EaV+w0QkrpjehmryFkQXmt5juVXz+nKDVlCRMwJU7A1O0Mie82XyEoOrf6Np1pA==", + "version": "12.3.2-canary.7", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.3.2-canary.7.tgz", + "integrity": "sha512-mbDqHk3C76UGIzkOv+G5NslKiSYIXyWQwbkuty0+0wLVJttWjWi2dMN7DFJQPMNvBefU9/vxVJdUnGVGEZfUXw==", "optional": true }, "@next/swc-linux-arm64-musl": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.2.0.tgz", - "integrity": "sha512-XrqkHi/VglEn5zs2CYK6ofJGQySrd+Lr4YdmfJ7IhsCnMKkQY1ma9Hv5THwhZVof3e+6oFHrQ9bWrw9K4WTjFA==", + "version": "12.3.2-canary.7", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.3.2-canary.7.tgz", + "integrity": "sha512-gJ3VQHuqb3ABiOKPxfWAJQdO4mp3yNnWIAPN8n52F7Zu38udbHXvcbIylWfQW/Qah+RRf7P7y2txH2kC07QOPA==", "optional": true }, "@next/swc-linux-x64-gnu": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.2.0.tgz", - "integrity": "sha512-MyhHbAKVjpn065WzRbqpLu2krj4kHLi6RITQdD1ee+uxq9r2yg5Qe02l24NxKW+1/lkmpusl4Y5Lks7rBiJn4w==", + "version": "12.3.2-canary.7", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.3.2-canary.7.tgz", + "integrity": "sha512-/PBLiC+JfMJIzwMCQaSQgnLoIOjdSjTA9zarj2Kk1eCLjH8/VnsfBWtmP7TdbgIRYnZ8QKb4HXSOq94ZQS/fkw==", "optional": true }, "@next/swc-linux-x64-musl": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.2.0.tgz", - "integrity": "sha512-Tz1tJZ5egE0S/UqCd5V6ZPJsdSzv/8aa7FkwFmIJ9neLS8/00za+OY5pq470iZQbPrkTwpKzmfTTIPRVD5iqDg==", + "version": "12.3.2-canary.7", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.3.2-canary.7.tgz", + "integrity": "sha512-Bf3goHoUd0SB58sVTMva0ByoLM+aEhm5YJRqsi7SsOAu9EAQwYfWgY2Hx60ah5i1N4ihYK0xjs8kwlfdDVOuow==", "optional": true }, "@next/swc-win32-arm64-msvc": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.2.0.tgz", - "integrity": "sha512-0iRO/CPMCdCYUzuH6wXLnsfJX1ykBX4emOOvH0qIgtiZM0nVYbF8lkEyY2ph4XcsurpinS+ziWuYCXVqrOSqiw==", + "version": "12.3.2-canary.7", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.3.2-canary.7.tgz", + "integrity": "sha512-aPRQ4dY5MuLgHCVdY+/Grgg4oX38pG4S0sT8mpatK3oIdjhj3961cj33QpPAy6dhhCs8m0/eCWYmM9KKlAAUsg==", "optional": true }, "@next/swc-win32-ia32-msvc": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.2.0.tgz", - "integrity": "sha512-8A26RJVcJHwIKm8xo/qk2ePRquJ6WCI2keV2qOW/Qm+ZXrPXHMIWPYABae/nKN243YFBNyPiHytjX37VrcpUhg==", + "version": "12.3.2-canary.7", + "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.3.2-canary.7.tgz", + "integrity": "sha512-hr+TBDICVezyn0HDK4QootalbcuLj9F8qUzZZAw3gHz16rUDpqpnlRjw3RC99AzkKL7qMsdR/+SwnBlBY7ZK7Q==", "optional": true }, "@next/swc-win32-x64-msvc": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.2.0.tgz", - "integrity": "sha512-OI14ozFLThEV3ey6jE47zrzSTV/6eIMsvbwozo+XfdWqOPwQ7X00YkRx4GVMKMC0rM44oGS2gmwMKYpe4EblnA==", + "version": "12.3.2-canary.7", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.3.2-canary.7.tgz", + "integrity": "sha512-1n29b6meb54h/Mw/1xPoJB682nWbtEsUQo7rFJ6G44Nj3fYFXe+XOWQxWu6Sl8yvdBXcZRhRCHuAZGqYtmqorQ==", "optional": true }, "@nodelib/fs.scandir": { @@ -1738,9 +1744,9 @@ } }, "@swc/helpers": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.4.2.tgz", - "integrity": "sha512-556Az0VX7WR6UdoTn4htt/l3zPQ7bsQWK+HqdG4swV7beUCxo/BqmvbOpUkTIm/9ih86LIf1qsUnywNL3obGHw==", + "version": "0.4.11", + "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.4.11.tgz", + "integrity": "sha512-rEUrBSGIoSFuYxwBYtlUFMlE2CwGhmW+w9355/5oduSw8e5h2+Tj4UrAGNNgP9915++wj5vkQo0UuOBqOAq4nw==", "requires": { "tslib": "^2.4.0" } @@ -1812,9 +1818,9 @@ "dev": true }, "caniuse-lite": { - "version": "1.0.30001393", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001393.tgz", - "integrity": "sha512-N/od11RX+Gsk+1qY/jbPa0R6zJupEa0lxeBG598EbrtblxVCTJsQwbRBm6+V+rxpc5lHKdsXb9RY83cZIPLseA==" + "version": "1.0.30001410", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001410.tgz", + "integrity": "sha512-QoblBnuE+rG0lc3Ur9ltP5q47lbguipa/ncNMyyGuqPk44FxbScWAeEO+k5fSQ8WekdAK4mWqNs1rADDAiN5xQ==" }, "chalk": { "version": "4.1.2", @@ -2258,29 +2264,29 @@ "dev": true }, "next": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/next/-/next-12.2.0.tgz", - "integrity": "sha512-B4j7D3SHYopLYx6/Ark0fenwIar9tEaZZFAaxmKjgcMMexhVJzB3jt7X+6wcdXPPMeUD6r09weUtnDpjox/vIA==", + "version": "12.3.2-canary.7", + "resolved": "https://registry.npmjs.org/next/-/next-12.3.2-canary.7.tgz", + "integrity": "sha512-zUosveWzpeRVy7j4ANoJ4gu0TBrkLYwPlIUEXrqqs/zLpHMu+tanxA1R1ts2d7h/2dSmeVZgGcHiVcHj5uspEA==", "requires": { - "@next/env": "12.2.0", - "@next/swc-android-arm-eabi": "12.2.0", - "@next/swc-android-arm64": "12.2.0", - "@next/swc-darwin-arm64": "12.2.0", - "@next/swc-darwin-x64": "12.2.0", - "@next/swc-freebsd-x64": "12.2.0", - "@next/swc-linux-arm-gnueabihf": "12.2.0", - "@next/swc-linux-arm64-gnu": "12.2.0", - "@next/swc-linux-arm64-musl": "12.2.0", - "@next/swc-linux-x64-gnu": "12.2.0", - "@next/swc-linux-x64-musl": "12.2.0", - "@next/swc-win32-arm64-msvc": "12.2.0", - "@next/swc-win32-ia32-msvc": "12.2.0", - "@next/swc-win32-x64-msvc": "12.2.0", - "@swc/helpers": "0.4.2", - "caniuse-lite": "^1.0.30001332", - "postcss": "8.4.5", - "styled-jsx": "5.0.2", - "use-sync-external-store": "1.1.0" + "@next/env": "12.3.2-canary.7", + "@next/swc-android-arm-eabi": "12.3.2-canary.7", + "@next/swc-android-arm64": "12.3.2-canary.7", + "@next/swc-darwin-arm64": "12.3.2-canary.7", + "@next/swc-darwin-x64": "12.3.2-canary.7", + "@next/swc-freebsd-x64": "12.3.2-canary.7", + "@next/swc-linux-arm-gnueabihf": "12.3.2-canary.7", + "@next/swc-linux-arm64-gnu": "12.3.2-canary.7", + "@next/swc-linux-arm64-musl": "12.3.2-canary.7", + "@next/swc-linux-x64-gnu": "12.3.2-canary.7", + "@next/swc-linux-x64-musl": "12.3.2-canary.7", + "@next/swc-win32-arm64-msvc": "12.3.2-canary.7", + "@next/swc-win32-ia32-msvc": "12.3.2-canary.7", + "@next/swc-win32-x64-msvc": "12.3.2-canary.7", + "@swc/helpers": "0.4.11", + "caniuse-lite": "^1.0.30001406", + "postcss": "8.4.14", + "styled-jsx": "5.0.7", + "use-sync-external-store": "1.2.0" } }, "once": { @@ -2359,13 +2365,13 @@ "dev": true }, "postcss": { - "version": "8.4.5", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.5.tgz", - "integrity": "sha512-jBDboWM8qpaqwkMwItqTQTiFikhs/67OYVvblFFTM7MrZjt6yMKd6r2kgXizEbTTljacm4NldIlZnhbjr84QYg==", + "version": "8.4.14", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.14.tgz", + "integrity": "sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig==", "requires": { - "nanoid": "^3.1.30", + "nanoid": "^3.3.4", "picocolors": "^1.0.0", - "source-map-js": "^1.0.1" + "source-map-js": "^1.0.2" } }, "prelude-ls": { @@ -2465,9 +2471,9 @@ "dev": true }, "styled-jsx": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.0.2.tgz", - "integrity": "sha512-LqPQrbBh3egD57NBcHET4qcgshPks+yblyhPlH2GY8oaDgKs8SK4C3dBh3oSJjgzJ3G5t1SYEZGHkP+QEpX9EQ==" + "version": "5.0.7", + "resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.0.7.tgz", + "integrity": "sha512-b3sUzamS086YLRuvnaDigdAewz1/EFYlHpYBP5mZovKEdQQOIIYq8lApylub3HHZ6xFjV051kkGU7cudJmrXEA==" }, "supports-color": { "version": "7.2.0", @@ -2513,9 +2519,9 @@ } }, "use-sync-external-store": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.1.0.tgz", - "integrity": "sha512-SEnieB2FPKEVne66NpXPd1Np4R1lTNKfjuy3XdIoPQKYBAFdzbzSZlSn1KJZUiihQLQC5Znot4SBz1EOTBwQAQ==" + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz", + "integrity": "sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==" }, "v8-compile-cache": { "version": "2.3.0", diff --git a/demos/canary/package.json b/demos/canary/package.json index c0f8c9cab3..4b187a58eb 100644 --- a/demos/canary/package.json +++ b/demos/canary/package.json @@ -9,7 +9,7 @@ "lint": "next lint" }, "dependencies": { - "next": "^12.2.0", + "next": "^12.3.2-canary.7", "react": "18.1.0", "react-dom": "18.1.0" }, From c4500c4eabf01e7692a0536d6dcccf23070f064a Mon Sep 17 00:00:00 2001 From: Matt Kane Date: Fri, 23 Sep 2022 15:38:56 +0100 Subject: [PATCH 002/172] chore: add app-dir demo --- .../app/(newroot)/dashboard/another/page.js | 7 + .../dashboard/project/[projectId]/page.js | 19 + demos/app-dir/app/(newroot)/layout.js | 20 + .../(rootonly)/dashboard/changelog/page.js | 7 + .../app/(rootonly)/dashboard/hello/page.js | 7 + .../catch-all/[...slug]/components/widget.js | 2 + demos/app-dir/app/catch-all/[...slug]/page.js | 12 + .../app/client-component-route/page.js | 20 + .../app/client-component-route/style.css | 3 + .../client-component-route/style.module.css | 3 + demos/app-dir/app/client-nested/layout.js | 20 + demos/app-dir/app/client-nested/page.js | 7 + demos/app-dir/app/client-nested/style.css | 3 + .../app/client-nested/style.module.css | 3 + .../get-server-side-props/page.js | 7 + .../get-static-props/page.js | 7 + .../app-dir/app/css/css-client/client-foo.css | 3 + .../app/css/css-client/client-layout.css | 3 + .../app/css/css-client/client-page.css | 6 + demos/app-dir/app/css/css-client/foo.js | 5 + demos/app-dir/app/css/css-client/layout.js | 14 + demos/app-dir/app/css/css-client/page.js | 7 + demos/app-dir/app/css/css-nested/layout.js | 14 + demos/app-dir/app/css/css-nested/page.js | 5 + demos/app-dir/app/css/css-nested/style.css | 3 + .../app/css/css-nested/style.module.css | 3 + demos/app-dir/app/css/css-page/layout.js | 5 + demos/app-dir/app/css/css-page/page.js | 13 + demos/app-dir/app/css/css-page/style.css | 3 + .../app-dir/app/css/css-page/style.module.css | 3 + demos/app-dir/app/css/css-page/style2.css | 3 + demos/app-dir/app/css/foo.js | 1 + demos/app-dir/app/css/layout.js | 15 + demos/app-dir/app/css/style.css | 3 + demos/app-dir/app/css/style.module.css | 3 + .../(custom)/deployments/breakdown/page.js | 7 + .../app-dir/app/dashboard/(custom)/layout.js | 8 + .../app/dashboard/client-comp-client.jsx | 18 + .../app/dashboard/client-comp.module.css | 3 + .../app/dashboard/deployments/[id]/page.js | 17 + .../app/dashboard/deployments/info/page.js | 7 + .../app/dashboard/deployments/layout.js | 18 + demos/app-dir/app/dashboard/global.css | 3 + .../index/dynamic-imports/dynamic-client.js | 9 + .../index/dynamic-imports/dynamic-server.js | 7 + .../dynamic-imports/react-lazy-client.js | 15 + .../app/dashboard/index/dynamic.module.css | 3 + .../app/dashboard/index/lazy.module.css | 3 + demos/app-dir/app/dashboard/index/page.js | 14 + .../dashboard/index/text-dynamic-client.js | 13 + .../dashboard/index/text-dynamic-server.js | 9 + .../app/dashboard/index/text-lazy-client.js | 13 + .../app/dashboard/integrations/page.js | 7 + demos/app-dir/app/dashboard/layout.js | 11 + demos/app-dir/app/dashboard/page.js | 18 + demos/app-dir/app/dashboard/style.css | 3 + .../app/dynamic/[category]/[id]/layout.js | 11 + .../app/dynamic/[category]/[id]/page.js | 11 + .../app-dir/app/dynamic/[category]/layout.js | 11 + demos/app-dir/app/dynamic/layout.js | 11 + .../app/error/clientcomponent/error.js | 12 + .../app-dir/app/error/clientcomponent/page.js | 20 + .../client-component.js | 5 + .../error/ssr-error-client-component/page.js | 8 + demos/app-dir/app/extension/page.server.js | 3 + .../app/hooks/use-cookies/client/page.js | 10 + demos/app-dir/app/hooks/use-cookies/page.js | 19 + .../app/hooks/use-headers/client/page.js | 10 + demos/app-dir/app/hooks/use-headers/page.js | 22 + .../hooks/use-layout-segments/server/page.js | 10 + .../app/hooks/use-params/server/page.js | 9 + demos/app-dir/app/hooks/use-pathname/page.js | 15 + .../app/hooks/use-pathname/server/page.js | 8 + .../app/hooks/use-preview-data/client/page.js | 10 + .../app/hooks/use-preview-data/page.js | 18 + demos/app-dir/app/hooks/use-router/page.js | 19 + .../app/hooks/use-router/server/page.js | 8 + .../app/hooks/use-router/sub-page/page.js | 5 + .../app/hooks/use-search-params/page.js | 21 + .../hooks/use-search-params/server/page.js | 8 + .../server/page.js | 10 + demos/app-dir/app/internal/failure/page.js | 3 + demos/app-dir/app/internal/page.js | 18 + demos/app-dir/app/internal/success/page.js | 3 + demos/app-dir/app/layout.js | 27 + demos/app-dir/app/link-hard-push/[id]/page.js | 14 + .../app/link-hard-replace/[id]/page.js | 14 + demos/app-dir/app/link-hard-replace/page.js | 16 + .../app/link-hard-replace/subpage/page.js | 9 + demos/app-dir/app/link-soft-push/page.js | 9 + demos/app-dir/app/link-soft-replace/page.js | 16 + .../app/link-soft-replace/subpage/page.js | 9 + .../app/loading-bug/[categorySlug]/loading.js | 3 + .../app/loading-bug/[categorySlug]/page.js | 15 + demos/app-dir/app/navigation/link.js | 27 + demos/app-dir/app/navigation/page.js | 17 + demos/app-dir/app/not-found/404.js | 3 + .../app-dir/app/not-found/client-side/page.js | 17 + .../app/not-found/clientcomponent/a.js | 9 + .../clientcomponent/client-component.js | 7 + .../app/not-found/servercomponent/a.js | 7 + demos/app-dir/app/old-router/client-router.js | 17 + demos/app-dir/app/old-router/is-null.js | 7 + demos/app-dir/app/old-router/page.js | 12 + demos/app-dir/app/old-router/router.js | 19 + demos/app-dir/app/old-router/server-router.js | 15 + .../optional-catch-all/[[...slug]]/page.js | 7 + demos/app-dir/app/pages-linking/page.js | 9 + .../app/parallel/(new)/@baz/nested-2/page.js | 3 + demos/app-dir/app/parallel/(new)/layout.js | 10 + .../app/parallel/@bar/nested/@a/page.js | 3 + .../app/parallel/@bar/nested/@b/page.js | 3 + .../app/parallel/@bar/nested/layout.js | 16 + demos/app-dir/app/parallel/@bar/page.js | 3 + .../app/parallel/@foo/nested/@a/page.js | 3 + .../app/parallel/@foo/nested/@b/page.js | 3 + .../app/parallel/@foo/nested/layout.js | 16 + demos/app-dir/app/parallel/@foo/page.js | 3 + demos/app-dir/app/parallel/layout.js | 18 + demos/app-dir/app/parallel/nested/page.js | 3 + demos/app-dir/app/parallel/style.css | 15 + .../app/param-and-query/[slug]/page.js | 13 + demos/app-dir/app/partial-match-[id]/page.js | 7 + .../app-dir/app/redirect/client-side/page.js | 19 + .../clientcomponent/client-component.js | 7 + .../app/redirect/clientcomponent/page.js | 8 + .../app/redirect/next-config-redirect/page.js | 11 + .../redirect/next-middleware-redirect/page.js | 11 + demos/app-dir/app/redirect/result/page.js | 3 + .../app/redirect/servercomponent/page.js | 6 + demos/app-dir/app/rewrites/page.js | 9 + demos/app-dir/app/same-layout/first/page.js | 12 + demos/app-dir/app/same-layout/layout.js | 10 + demos/app-dir/app/same-layout/second/page.js | 12 + .../app/shared-component-route/page.js | 7 + .../app/should-not-serve-client/page.js | 9 + .../app/should-not-serve-server/page.js | 7 + .../loading.js | 3 + .../slow/layout.js | 19 + .../slow/loading.js | 3 + .../slow/page.js | 14 + .../app/slow-layout-with-loading/loading.js | 3 + .../slow-layout-with-loading/slow/layout.js | 19 + .../app/slow-layout-with-loading/slow/page.js | 3 + .../app/slow-page-with-loading/loading.js | 3 + .../app/slow-page-with-loading/page.js | 18 + demos/app-dir/app/style.css | 3 + .../template/clientcomponent/other/page.js | 11 + .../app/template/clientcomponent/page.js | 12 + .../app/template/clientcomponent/template.js | 14 + .../template/servercomponent/other/page.js | 11 + .../app/template/servercomponent/page.js | 12 + .../app/template/servercomponent/template.js | 10 + demos/app-dir/app/test-page/page.js | 3 + demos/app-dir/app/with-id/page.js | 13 + demos/app-dir/middleware.js | 29 + demos/app-dir/netlify.toml | 15 + demos/app-dir/next.config.js | 32 + demos/app-dir/package-lock.json | 634 ++++++++++++++++++ demos/app-dir/package.json | 16 + demos/app-dir/pages/api/hello.js | 7 + demos/app-dir/pages/api/preview.js | 4 + demos/app-dir/pages/app-linking.js | 9 + demos/app-dir/pages/blog/[slug].js | 7 + demos/app-dir/pages/index.js | 11 + demos/app-dir/public/hello.txt | 1 + demos/app-dir/styles/global.css | 3 + demos/app-dir/styles/shared.module.css | 3 + package-lock.json | 281 ++++---- 169 files changed, 2429 insertions(+), 135 deletions(-) create mode 100644 demos/app-dir/app/(newroot)/dashboard/another/page.js create mode 100644 demos/app-dir/app/(newroot)/dashboard/project/[projectId]/page.js create mode 100644 demos/app-dir/app/(newroot)/layout.js create mode 100644 demos/app-dir/app/(rootonly)/dashboard/changelog/page.js create mode 100644 demos/app-dir/app/(rootonly)/dashboard/hello/page.js create mode 100644 demos/app-dir/app/catch-all/[...slug]/components/widget.js create mode 100644 demos/app-dir/app/catch-all/[...slug]/page.js create mode 100644 demos/app-dir/app/client-component-route/page.js create mode 100644 demos/app-dir/app/client-component-route/style.css create mode 100644 demos/app-dir/app/client-component-route/style.module.css create mode 100644 demos/app-dir/app/client-nested/layout.js create mode 100644 demos/app-dir/app/client-nested/page.js create mode 100644 demos/app-dir/app/client-nested/style.css create mode 100644 demos/app-dir/app/client-nested/style.module.css create mode 100644 demos/app-dir/app/client-with-errors/get-server-side-props/page.js create mode 100644 demos/app-dir/app/client-with-errors/get-static-props/page.js create mode 100644 demos/app-dir/app/css/css-client/client-foo.css create mode 100644 demos/app-dir/app/css/css-client/client-layout.css create mode 100644 demos/app-dir/app/css/css-client/client-page.css create mode 100644 demos/app-dir/app/css/css-client/foo.js create mode 100644 demos/app-dir/app/css/css-client/layout.js create mode 100644 demos/app-dir/app/css/css-client/page.js create mode 100644 demos/app-dir/app/css/css-nested/layout.js create mode 100644 demos/app-dir/app/css/css-nested/page.js create mode 100644 demos/app-dir/app/css/css-nested/style.css create mode 100644 demos/app-dir/app/css/css-nested/style.module.css create mode 100644 demos/app-dir/app/css/css-page/layout.js create mode 100644 demos/app-dir/app/css/css-page/page.js create mode 100644 demos/app-dir/app/css/css-page/style.css create mode 100644 demos/app-dir/app/css/css-page/style.module.css create mode 100644 demos/app-dir/app/css/css-page/style2.css create mode 100644 demos/app-dir/app/css/foo.js create mode 100644 demos/app-dir/app/css/layout.js create mode 100644 demos/app-dir/app/css/style.css create mode 100644 demos/app-dir/app/css/style.module.css create mode 100644 demos/app-dir/app/dashboard/(custom)/deployments/breakdown/page.js create mode 100644 demos/app-dir/app/dashboard/(custom)/layout.js create mode 100644 demos/app-dir/app/dashboard/client-comp-client.jsx create mode 100644 demos/app-dir/app/dashboard/client-comp.module.css create mode 100644 demos/app-dir/app/dashboard/deployments/[id]/page.js create mode 100644 demos/app-dir/app/dashboard/deployments/info/page.js create mode 100644 demos/app-dir/app/dashboard/deployments/layout.js create mode 100644 demos/app-dir/app/dashboard/global.css create mode 100644 demos/app-dir/app/dashboard/index/dynamic-imports/dynamic-client.js create mode 100644 demos/app-dir/app/dashboard/index/dynamic-imports/dynamic-server.js create mode 100644 demos/app-dir/app/dashboard/index/dynamic-imports/react-lazy-client.js create mode 100644 demos/app-dir/app/dashboard/index/dynamic.module.css create mode 100644 demos/app-dir/app/dashboard/index/lazy.module.css create mode 100644 demos/app-dir/app/dashboard/index/page.js create mode 100644 demos/app-dir/app/dashboard/index/text-dynamic-client.js create mode 100644 demos/app-dir/app/dashboard/index/text-dynamic-server.js create mode 100644 demos/app-dir/app/dashboard/index/text-lazy-client.js create mode 100644 demos/app-dir/app/dashboard/integrations/page.js create mode 100644 demos/app-dir/app/dashboard/layout.js create mode 100644 demos/app-dir/app/dashboard/page.js create mode 100644 demos/app-dir/app/dashboard/style.css create mode 100644 demos/app-dir/app/dynamic/[category]/[id]/layout.js create mode 100644 demos/app-dir/app/dynamic/[category]/[id]/page.js create mode 100644 demos/app-dir/app/dynamic/[category]/layout.js create mode 100644 demos/app-dir/app/dynamic/layout.js create mode 100644 demos/app-dir/app/error/clientcomponent/error.js create mode 100644 demos/app-dir/app/error/clientcomponent/page.js create mode 100644 demos/app-dir/app/error/ssr-error-client-component/client-component.js create mode 100644 demos/app-dir/app/error/ssr-error-client-component/page.js create mode 100644 demos/app-dir/app/extension/page.server.js create mode 100644 demos/app-dir/app/hooks/use-cookies/client/page.js create mode 100644 demos/app-dir/app/hooks/use-cookies/page.js create mode 100644 demos/app-dir/app/hooks/use-headers/client/page.js create mode 100644 demos/app-dir/app/hooks/use-headers/page.js create mode 100644 demos/app-dir/app/hooks/use-layout-segments/server/page.js create mode 100644 demos/app-dir/app/hooks/use-params/server/page.js create mode 100644 demos/app-dir/app/hooks/use-pathname/page.js create mode 100644 demos/app-dir/app/hooks/use-pathname/server/page.js create mode 100644 demos/app-dir/app/hooks/use-preview-data/client/page.js create mode 100644 demos/app-dir/app/hooks/use-preview-data/page.js create mode 100644 demos/app-dir/app/hooks/use-router/page.js create mode 100644 demos/app-dir/app/hooks/use-router/server/page.js create mode 100644 demos/app-dir/app/hooks/use-router/sub-page/page.js create mode 100644 demos/app-dir/app/hooks/use-search-params/page.js create mode 100644 demos/app-dir/app/hooks/use-search-params/server/page.js create mode 100644 demos/app-dir/app/hooks/use-selected-layout-segment/server/page.js create mode 100644 demos/app-dir/app/internal/failure/page.js create mode 100644 demos/app-dir/app/internal/page.js create mode 100644 demos/app-dir/app/internal/success/page.js create mode 100644 demos/app-dir/app/layout.js create mode 100644 demos/app-dir/app/link-hard-push/[id]/page.js create mode 100644 demos/app-dir/app/link-hard-replace/[id]/page.js create mode 100644 demos/app-dir/app/link-hard-replace/page.js create mode 100644 demos/app-dir/app/link-hard-replace/subpage/page.js create mode 100644 demos/app-dir/app/link-soft-push/page.js create mode 100644 demos/app-dir/app/link-soft-replace/page.js create mode 100644 demos/app-dir/app/link-soft-replace/subpage/page.js create mode 100644 demos/app-dir/app/loading-bug/[categorySlug]/loading.js create mode 100644 demos/app-dir/app/loading-bug/[categorySlug]/page.js create mode 100644 demos/app-dir/app/navigation/link.js create mode 100644 demos/app-dir/app/navigation/page.js create mode 100644 demos/app-dir/app/not-found/404.js create mode 100644 demos/app-dir/app/not-found/client-side/page.js create mode 100644 demos/app-dir/app/not-found/clientcomponent/a.js create mode 100644 demos/app-dir/app/not-found/clientcomponent/client-component.js create mode 100644 demos/app-dir/app/not-found/servercomponent/a.js create mode 100644 demos/app-dir/app/old-router/client-router.js create mode 100644 demos/app-dir/app/old-router/is-null.js create mode 100644 demos/app-dir/app/old-router/page.js create mode 100644 demos/app-dir/app/old-router/router.js create mode 100644 demos/app-dir/app/old-router/server-router.js create mode 100644 demos/app-dir/app/optional-catch-all/[[...slug]]/page.js create mode 100644 demos/app-dir/app/pages-linking/page.js create mode 100644 demos/app-dir/app/parallel/(new)/@baz/nested-2/page.js create mode 100644 demos/app-dir/app/parallel/(new)/layout.js create mode 100644 demos/app-dir/app/parallel/@bar/nested/@a/page.js create mode 100644 demos/app-dir/app/parallel/@bar/nested/@b/page.js create mode 100644 demos/app-dir/app/parallel/@bar/nested/layout.js create mode 100644 demos/app-dir/app/parallel/@bar/page.js create mode 100644 demos/app-dir/app/parallel/@foo/nested/@a/page.js create mode 100644 demos/app-dir/app/parallel/@foo/nested/@b/page.js create mode 100644 demos/app-dir/app/parallel/@foo/nested/layout.js create mode 100644 demos/app-dir/app/parallel/@foo/page.js create mode 100644 demos/app-dir/app/parallel/layout.js create mode 100644 demos/app-dir/app/parallel/nested/page.js create mode 100644 demos/app-dir/app/parallel/style.css create mode 100644 demos/app-dir/app/param-and-query/[slug]/page.js create mode 100644 demos/app-dir/app/partial-match-[id]/page.js create mode 100644 demos/app-dir/app/redirect/client-side/page.js create mode 100644 demos/app-dir/app/redirect/clientcomponent/client-component.js create mode 100644 demos/app-dir/app/redirect/clientcomponent/page.js create mode 100644 demos/app-dir/app/redirect/next-config-redirect/page.js create mode 100644 demos/app-dir/app/redirect/next-middleware-redirect/page.js create mode 100644 demos/app-dir/app/redirect/result/page.js create mode 100644 demos/app-dir/app/redirect/servercomponent/page.js create mode 100644 demos/app-dir/app/rewrites/page.js create mode 100644 demos/app-dir/app/same-layout/first/page.js create mode 100644 demos/app-dir/app/same-layout/layout.js create mode 100644 demos/app-dir/app/same-layout/second/page.js create mode 100644 demos/app-dir/app/shared-component-route/page.js create mode 100644 demos/app-dir/app/should-not-serve-client/page.js create mode 100644 demos/app-dir/app/should-not-serve-server/page.js create mode 100644 demos/app-dir/app/slow-layout-and-page-with-loading/loading.js create mode 100644 demos/app-dir/app/slow-layout-and-page-with-loading/slow/layout.js create mode 100644 demos/app-dir/app/slow-layout-and-page-with-loading/slow/loading.js create mode 100644 demos/app-dir/app/slow-layout-and-page-with-loading/slow/page.js create mode 100644 demos/app-dir/app/slow-layout-with-loading/loading.js create mode 100644 demos/app-dir/app/slow-layout-with-loading/slow/layout.js create mode 100644 demos/app-dir/app/slow-layout-with-loading/slow/page.js create mode 100644 demos/app-dir/app/slow-page-with-loading/loading.js create mode 100644 demos/app-dir/app/slow-page-with-loading/page.js create mode 100644 demos/app-dir/app/style.css create mode 100644 demos/app-dir/app/template/clientcomponent/other/page.js create mode 100644 demos/app-dir/app/template/clientcomponent/page.js create mode 100644 demos/app-dir/app/template/clientcomponent/template.js create mode 100644 demos/app-dir/app/template/servercomponent/other/page.js create mode 100644 demos/app-dir/app/template/servercomponent/page.js create mode 100644 demos/app-dir/app/template/servercomponent/template.js create mode 100644 demos/app-dir/app/test-page/page.js create mode 100644 demos/app-dir/app/with-id/page.js create mode 100644 demos/app-dir/middleware.js create mode 100644 demos/app-dir/netlify.toml create mode 100644 demos/app-dir/next.config.js create mode 100644 demos/app-dir/package-lock.json create mode 100644 demos/app-dir/package.json create mode 100644 demos/app-dir/pages/api/hello.js create mode 100644 demos/app-dir/pages/api/preview.js create mode 100644 demos/app-dir/pages/app-linking.js create mode 100644 demos/app-dir/pages/blog/[slug].js create mode 100644 demos/app-dir/pages/index.js create mode 100644 demos/app-dir/public/hello.txt create mode 100644 demos/app-dir/styles/global.css create mode 100644 demos/app-dir/styles/shared.module.css diff --git a/demos/app-dir/app/(newroot)/dashboard/another/page.js b/demos/app-dir/app/(newroot)/dashboard/another/page.js new file mode 100644 index 0000000000..f66225f1a7 --- /dev/null +++ b/demos/app-dir/app/(newroot)/dashboard/another/page.js @@ -0,0 +1,7 @@ +export default function AnotherPage(props) { + return ( + <> +

hello from newroot/dashboard/another

+ + ) +} diff --git a/demos/app-dir/app/(newroot)/dashboard/project/[projectId]/page.js b/demos/app-dir/app/(newroot)/dashboard/project/[projectId]/page.js new file mode 100644 index 0000000000..ab35d18efc --- /dev/null +++ b/demos/app-dir/app/(newroot)/dashboard/project/[projectId]/page.js @@ -0,0 +1,19 @@ +import { experimental_use as use } from 'react' + +function getData({ params }) { + return { + now: Date.now(), + params, + } +} + +export default function Page(props) { + const data = use(getData(props)) + + return ( + <> +

/dashboard/project/[projectId]

+

{JSON.stringify(data)}

+ + ) +} diff --git a/demos/app-dir/app/(newroot)/layout.js b/demos/app-dir/app/(newroot)/layout.js new file mode 100644 index 0000000000..ff9eaf1ef8 --- /dev/null +++ b/demos/app-dir/app/(newroot)/layout.js @@ -0,0 +1,20 @@ +import { experimental_use as use } from 'react' + +async function getData() { + return { + world: 'world', + } +} + +export default function Root({ children }) { + const { world } = use(getData()) + + return ( + + + {`hello ${world}`} + + {children} + + ) +} diff --git a/demos/app-dir/app/(rootonly)/dashboard/changelog/page.js b/demos/app-dir/app/(rootonly)/dashboard/changelog/page.js new file mode 100644 index 0000000000..f0fc536216 --- /dev/null +++ b/demos/app-dir/app/(rootonly)/dashboard/changelog/page.js @@ -0,0 +1,7 @@ +export default function ChangelogPage(props) { + return ( + <> +

hello from app/dashboard/changelog

+ + ) +} diff --git a/demos/app-dir/app/(rootonly)/dashboard/hello/page.js b/demos/app-dir/app/(rootonly)/dashboard/hello/page.js new file mode 100644 index 0000000000..f7d874bf7c --- /dev/null +++ b/demos/app-dir/app/(rootonly)/dashboard/hello/page.js @@ -0,0 +1,7 @@ +export default function HelloPage(props) { + return ( + <> +

hello from app/dashboard/rootonly/hello

+ + ) +} diff --git a/demos/app-dir/app/catch-all/[...slug]/components/widget.js b/demos/app-dir/app/catch-all/[...slug]/components/widget.js new file mode 100644 index 0000000000..606d3f10a2 --- /dev/null +++ b/demos/app-dir/app/catch-all/[...slug]/components/widget.js @@ -0,0 +1,2 @@ +// components under catch-all should not throw errors +export default () =>

widget

diff --git a/demos/app-dir/app/catch-all/[...slug]/page.js b/demos/app-dir/app/catch-all/[...slug]/page.js new file mode 100644 index 0000000000..d5361f48d5 --- /dev/null +++ b/demos/app-dir/app/catch-all/[...slug]/page.js @@ -0,0 +1,12 @@ +import Widget from './components/widget' + +export default function Page({ params }) { + return ( + <> +

+ hello from /catch-all/{params.slug.join('/')} +

+ + + ) +} diff --git a/demos/app-dir/app/client-component-route/page.js b/demos/app-dir/app/client-component-route/page.js new file mode 100644 index 0000000000..5e2c815adf --- /dev/null +++ b/demos/app-dir/app/client-component-route/page.js @@ -0,0 +1,20 @@ +'client' + +import { useState, useEffect } from 'react' + +import style from './style.module.css' +import './style.css' + +export default function ClientComponentRoute() { + const [count, setCount] = useState(0) + useEffect(() => { + setCount(1) + }, [count]) + return ( + <> +

+ hello from app/client-component-route. count: {count} +

+ + ) +} diff --git a/demos/app-dir/app/client-component-route/style.css b/demos/app-dir/app/client-component-route/style.css new file mode 100644 index 0000000000..073d4283ae --- /dev/null +++ b/demos/app-dir/app/client-component-route/style.css @@ -0,0 +1,3 @@ +b { + color: blue; +} diff --git a/demos/app-dir/app/client-component-route/style.module.css b/demos/app-dir/app/client-component-route/style.module.css new file mode 100644 index 0000000000..c6dd2c88fa --- /dev/null +++ b/demos/app-dir/app/client-component-route/style.module.css @@ -0,0 +1,3 @@ +.red { + color: red; +} diff --git a/demos/app-dir/app/client-nested/layout.js b/demos/app-dir/app/client-nested/layout.js new file mode 100644 index 0000000000..506d2370b6 --- /dev/null +++ b/demos/app-dir/app/client-nested/layout.js @@ -0,0 +1,20 @@ +'client' + +import { useState, useEffect } from 'react' + +import styles from './style.module.css' +import './style.css' + +export default function ClientNestedLayout({ children }) { + const [count, setCount] = useState(0) + useEffect(() => { + setCount(1) + }, []) + return ( + <> +

Client Nested. Count: {count}

+ + {children} + + ) +} diff --git a/demos/app-dir/app/client-nested/page.js b/demos/app-dir/app/client-nested/page.js new file mode 100644 index 0000000000..2b6a107426 --- /dev/null +++ b/demos/app-dir/app/client-nested/page.js @@ -0,0 +1,7 @@ +export default function ClientPage() { + return ( + <> +

hello from app/client-nested

+ + ) +} diff --git a/demos/app-dir/app/client-nested/style.css b/demos/app-dir/app/client-nested/style.css new file mode 100644 index 0000000000..23b1956407 --- /dev/null +++ b/demos/app-dir/app/client-nested/style.css @@ -0,0 +1,3 @@ +button { + color: red; +} diff --git a/demos/app-dir/app/client-nested/style.module.css b/demos/app-dir/app/client-nested/style.module.css new file mode 100644 index 0000000000..c6dd2c88fa --- /dev/null +++ b/demos/app-dir/app/client-nested/style.module.css @@ -0,0 +1,3 @@ +.red { + color: red; +} diff --git a/demos/app-dir/app/client-with-errors/get-server-side-props/page.js b/demos/app-dir/app/client-with-errors/get-server-side-props/page.js new file mode 100644 index 0000000000..8ea1ccd889 --- /dev/null +++ b/demos/app-dir/app/client-with-errors/get-server-side-props/page.js @@ -0,0 +1,7 @@ +'client' + +// export function getServerSideProps() { { props: {} } } + +export default function Page() { + return 'client-gssp' +} diff --git a/demos/app-dir/app/client-with-errors/get-static-props/page.js b/demos/app-dir/app/client-with-errors/get-static-props/page.js new file mode 100644 index 0000000000..70911d5f16 --- /dev/null +++ b/demos/app-dir/app/client-with-errors/get-static-props/page.js @@ -0,0 +1,7 @@ +'client' + +// export function getStaticProps() { return { props: {} }} + +export default function Page() { + return 'client-gsp' +} diff --git a/demos/app-dir/app/css/css-client/client-foo.css b/demos/app-dir/app/css/css-client/client-foo.css new file mode 100644 index 0000000000..94ff8d4b48 --- /dev/null +++ b/demos/app-dir/app/css/css-client/client-foo.css @@ -0,0 +1,3 @@ +.foo { + color: blue; +} diff --git a/demos/app-dir/app/css/css-client/client-layout.css b/demos/app-dir/app/css/css-client/client-layout.css new file mode 100644 index 0000000000..5bc2906308 --- /dev/null +++ b/demos/app-dir/app/css/css-client/client-layout.css @@ -0,0 +1,3 @@ +body { + background: cyan; +} diff --git a/demos/app-dir/app/css/css-client/client-page.css b/demos/app-dir/app/css/css-client/client-page.css new file mode 100644 index 0000000000..f3e551c053 --- /dev/null +++ b/demos/app-dir/app/css/css-client/client-page.css @@ -0,0 +1,6 @@ +h1 { + color: red !important; +} +h1::after { + content: ' (from css-client!!!!)'; +} diff --git a/demos/app-dir/app/css/css-client/foo.js b/demos/app-dir/app/css/css-client/foo.js new file mode 100644 index 0000000000..98d4f855cc --- /dev/null +++ b/demos/app-dir/app/css/css-client/foo.js @@ -0,0 +1,5 @@ +import './client-foo.css' + +export default function Foo() { + return foo +} diff --git a/demos/app-dir/app/css/css-client/layout.js b/demos/app-dir/app/css/css-client/layout.js new file mode 100644 index 0000000000..ab96419298 --- /dev/null +++ b/demos/app-dir/app/css/css-client/layout.js @@ -0,0 +1,14 @@ +'client' + +import './client-layout.css' + +import Foo from './foo' + +export default function ServerLayout({ children }) { + return ( + <> + {children} + + + ) +} diff --git a/demos/app-dir/app/css/css-client/page.js b/demos/app-dir/app/css/css-client/page.js new file mode 100644 index 0000000000..1e92db88c5 --- /dev/null +++ b/demos/app-dir/app/css/css-client/page.js @@ -0,0 +1,7 @@ +'client' + +import './client-page.css' + +export default function Page() { + return

Page!!!

+} diff --git a/demos/app-dir/app/css/css-nested/layout.js b/demos/app-dir/app/css/css-nested/layout.js new file mode 100644 index 0000000000..8f2a9f56ad --- /dev/null +++ b/demos/app-dir/app/css/css-nested/layout.js @@ -0,0 +1,14 @@ +'client' + +import './style.css' +import styles from './style.module.css' + +export default function ClientLayout({ children }) { + return ( + <> +
Client Layout: CSS Modules
+
Client Layout: Global CSS
+ {children} + + ) +} diff --git a/demos/app-dir/app/css/css-nested/page.js b/demos/app-dir/app/css/css-nested/page.js new file mode 100644 index 0000000000..baf7462f9d --- /dev/null +++ b/demos/app-dir/app/css/css-nested/page.js @@ -0,0 +1,5 @@ +'client' + +export default function Page() { + return null +} diff --git a/demos/app-dir/app/css/css-nested/style.css b/demos/app-dir/app/css/css-nested/style.css new file mode 100644 index 0000000000..3eeea95774 --- /dev/null +++ b/demos/app-dir/app/css/css-nested/style.css @@ -0,0 +1,3 @@ +.client-css { + color: green; +} diff --git a/demos/app-dir/app/css/css-nested/style.module.css b/demos/app-dir/app/css/css-nested/style.module.css new file mode 100644 index 0000000000..3eeea95774 --- /dev/null +++ b/demos/app-dir/app/css/css-nested/style.module.css @@ -0,0 +1,3 @@ +.client-css { + color: green; +} diff --git a/demos/app-dir/app/css/css-page/layout.js b/demos/app-dir/app/css/css-page/layout.js new file mode 100644 index 0000000000..81c0ed0f47 --- /dev/null +++ b/demos/app-dir/app/css/css-page/layout.js @@ -0,0 +1,5 @@ +import './style2.css' + +export default function ServerLayout({ children }) { + return <>{children} +} diff --git a/demos/app-dir/app/css/css-page/page.js b/demos/app-dir/app/css/css-page/page.js new file mode 100644 index 0000000000..2fbdf86ded --- /dev/null +++ b/demos/app-dir/app/css/css-page/page.js @@ -0,0 +1,13 @@ +import './style.css' +import styles from './style.module.css' + +export default function Page() { + return ( + <> +

Page

+
+ CSSM +
+ + ) +} diff --git a/demos/app-dir/app/css/css-page/style.css b/demos/app-dir/app/css/css-page/style.css new file mode 100644 index 0000000000..adc68fa6a4 --- /dev/null +++ b/demos/app-dir/app/css/css-page/style.css @@ -0,0 +1,3 @@ +h1 { + color: red; +} diff --git a/demos/app-dir/app/css/css-page/style.module.css b/demos/app-dir/app/css/css-page/style.module.css new file mode 100644 index 0000000000..3991f65d58 --- /dev/null +++ b/demos/app-dir/app/css/css-page/style.module.css @@ -0,0 +1,3 @@ +.mod { + color: blue; +} diff --git a/demos/app-dir/app/css/css-page/style2.css b/demos/app-dir/app/css/css-page/style2.css new file mode 100644 index 0000000000..cfddd0e039 --- /dev/null +++ b/demos/app-dir/app/css/css-page/style2.css @@ -0,0 +1,3 @@ +body { + background: #ccc; +} diff --git a/demos/app-dir/app/css/foo.js b/demos/app-dir/app/css/foo.js new file mode 100644 index 0000000000..d31bab07a9 --- /dev/null +++ b/demos/app-dir/app/css/foo.js @@ -0,0 +1 @@ +import './style.module.css' diff --git a/demos/app-dir/app/css/layout.js b/demos/app-dir/app/css/layout.js new file mode 100644 index 0000000000..3b1bdd72bb --- /dev/null +++ b/demos/app-dir/app/css/layout.js @@ -0,0 +1,15 @@ +import './style.css' +import './css-page/style.css' +import styles from './style.module.css' + +export default function ServerLayout({ children }) { + return ( + <> +
+ Server Layout: CSS Modules +
+
Server Layout: Global CSS
+ {children} + + ) +} diff --git a/demos/app-dir/app/css/style.css b/demos/app-dir/app/css/style.css new file mode 100644 index 0000000000..26994cddda --- /dev/null +++ b/demos/app-dir/app/css/style.css @@ -0,0 +1,3 @@ +.server-css { + color: blue; +} diff --git a/demos/app-dir/app/css/style.module.css b/demos/app-dir/app/css/style.module.css new file mode 100644 index 0000000000..efd81fda05 --- /dev/null +++ b/demos/app-dir/app/css/style.module.css @@ -0,0 +1,3 @@ +.server-css { + color: green; +} diff --git a/demos/app-dir/app/dashboard/(custom)/deployments/breakdown/page.js b/demos/app-dir/app/dashboard/(custom)/deployments/breakdown/page.js new file mode 100644 index 0000000000..b4cdd2011b --- /dev/null +++ b/demos/app-dir/app/dashboard/(custom)/deployments/breakdown/page.js @@ -0,0 +1,7 @@ +export default function DeploymentsBreakdownPage(props) { + return ( + <> +

hello from app/dashboard/(custom)/deployments/breakdown

+ + ) +} diff --git a/demos/app-dir/app/dashboard/(custom)/layout.js b/demos/app-dir/app/dashboard/(custom)/layout.js new file mode 100644 index 0000000000..e861cd39c8 --- /dev/null +++ b/demos/app-dir/app/dashboard/(custom)/layout.js @@ -0,0 +1,8 @@ +export default function CustomDashboardRootLayout({ children }) { + return ( + <> +

Custom dashboard

+ {children} + + ) +} diff --git a/demos/app-dir/app/dashboard/client-comp-client.jsx b/demos/app-dir/app/dashboard/client-comp-client.jsx new file mode 100644 index 0000000000..79c3173698 --- /dev/null +++ b/demos/app-dir/app/dashboard/client-comp-client.jsx @@ -0,0 +1,18 @@ +'client' + +import styles from './client-comp.module.css' + +import { useEffect, useState } from 'react' + +export default function ClientComp() { + const [state, setState] = useState({}) + useEffect(() => { + setState({ test: 'HELLOOOO' }) + }, []) + return ( + <> +

Hello

+ {state.test} + + ) +} diff --git a/demos/app-dir/app/dashboard/client-comp.module.css b/demos/app-dir/app/dashboard/client-comp.module.css new file mode 100644 index 0000000000..c0ddc6d764 --- /dev/null +++ b/demos/app-dir/app/dashboard/client-comp.module.css @@ -0,0 +1,3 @@ +.client { + color: #2e5aea; +} diff --git a/demos/app-dir/app/dashboard/deployments/[id]/page.js b/demos/app-dir/app/dashboard/deployments/[id]/page.js new file mode 100644 index 0000000000..7d548c4226 --- /dev/null +++ b/demos/app-dir/app/dashboard/deployments/[id]/page.js @@ -0,0 +1,17 @@ +import { experimental_use as use } from 'react' + +async function getData({ params }) { + return { + id: params.id, + } +} + +export default function DeploymentsPage(props) { + const data = use(getData(props)) + + return ( + <> +

hello from app/dashboard/deployments/[id]. ID is: {data.id}

+ + ) +} diff --git a/demos/app-dir/app/dashboard/deployments/info/page.js b/demos/app-dir/app/dashboard/deployments/info/page.js new file mode 100644 index 0000000000..b435a2cba7 --- /dev/null +++ b/demos/app-dir/app/dashboard/deployments/info/page.js @@ -0,0 +1,7 @@ +export default function DeploymentsInfoPage(props) { + return ( + <> +

hello from app/dashboard/deployments/info

+ + ) +} diff --git a/demos/app-dir/app/dashboard/deployments/layout.js b/demos/app-dir/app/dashboard/deployments/layout.js new file mode 100644 index 0000000000..f2f34a51c3 --- /dev/null +++ b/demos/app-dir/app/dashboard/deployments/layout.js @@ -0,0 +1,18 @@ +import { experimental_use as use } from 'react' + +async function getData() { + return { + message: 'hello', + } +} + +export default function DeploymentsLayout({ children }) { + const { message } = use(getData()) + + return ( + <> +

Deployments {message}

+ {children} + + ) +} diff --git a/demos/app-dir/app/dashboard/global.css b/demos/app-dir/app/dashboard/global.css new file mode 100644 index 0000000000..a83c888e23 --- /dev/null +++ b/demos/app-dir/app/dashboard/global.css @@ -0,0 +1,3 @@ +.dangerous-text { + color: red; +} diff --git a/demos/app-dir/app/dashboard/index/dynamic-imports/dynamic-client.js b/demos/app-dir/app/dashboard/index/dynamic-imports/dynamic-client.js new file mode 100644 index 0000000000..63dcccc63c --- /dev/null +++ b/demos/app-dir/app/dashboard/index/dynamic-imports/dynamic-client.js @@ -0,0 +1,9 @@ +'client' + +import dynamic from 'next/dist/client/components/shared/dynamic' + +const Dynamic = dynamic(() => import('../text-dynamic-client')) + +export function NextDynamicClientComponent() { + return +} diff --git a/demos/app-dir/app/dashboard/index/dynamic-imports/dynamic-server.js b/demos/app-dir/app/dashboard/index/dynamic-imports/dynamic-server.js new file mode 100644 index 0000000000..0d9406e90f --- /dev/null +++ b/demos/app-dir/app/dashboard/index/dynamic-imports/dynamic-server.js @@ -0,0 +1,7 @@ +import dynamic from 'next/dist/client/components/shared/dynamic' + +const Dynamic = dynamic(() => import('../text-dynamic-server')) + +export function NextDynamicServerComponent() { + return +} diff --git a/demos/app-dir/app/dashboard/index/dynamic-imports/react-lazy-client.js b/demos/app-dir/app/dashboard/index/dynamic-imports/react-lazy-client.js new file mode 100644 index 0000000000..18fff4ea97 --- /dev/null +++ b/demos/app-dir/app/dashboard/index/dynamic-imports/react-lazy-client.js @@ -0,0 +1,15 @@ +'client' + +import { useState, lazy } from 'react' + +const Lazy = lazy(() => import('../text-lazy-client.js')) + +export function LazyClientComponent() { + let [state] = useState('client') + return ( + <> + +

hello from {state}

+ + ) +} diff --git a/demos/app-dir/app/dashboard/index/dynamic.module.css b/demos/app-dir/app/dashboard/index/dynamic.module.css new file mode 100644 index 0000000000..97af642339 --- /dev/null +++ b/demos/app-dir/app/dashboard/index/dynamic.module.css @@ -0,0 +1,3 @@ +.dynamic { + color: blue; +} diff --git a/demos/app-dir/app/dashboard/index/lazy.module.css b/demos/app-dir/app/dashboard/index/lazy.module.css new file mode 100644 index 0000000000..4369b2c770 --- /dev/null +++ b/demos/app-dir/app/dashboard/index/lazy.module.css @@ -0,0 +1,3 @@ +.lazy { + color: purple; +} diff --git a/demos/app-dir/app/dashboard/index/page.js b/demos/app-dir/app/dashboard/index/page.js new file mode 100644 index 0000000000..c946b76e18 --- /dev/null +++ b/demos/app-dir/app/dashboard/index/page.js @@ -0,0 +1,14 @@ +import { LazyClientComponent } from './dynamic-imports/react-lazy-client' +import { NextDynamicServerComponent } from './dynamic-imports/dynamic-server' +import { NextDynamicClientComponent } from './dynamic-imports/dynamic-client' + +export default function DashboardIndexPage() { + return ( + <> +

hello from app/dashboard/index

+ + + + + ) +} diff --git a/demos/app-dir/app/dashboard/index/text-dynamic-client.js b/demos/app-dir/app/dashboard/index/text-dynamic-client.js new file mode 100644 index 0000000000..6661c55534 --- /dev/null +++ b/demos/app-dir/app/dashboard/index/text-dynamic-client.js @@ -0,0 +1,13 @@ +'client' + +import { useState } from 'react' +import styles from './dynamic.module.css' + +export default function Dynamic() { + let [state] = useState('dynamic on client') + return ( +

+ {`hello from ${state}`} +

+ ) +} diff --git a/demos/app-dir/app/dashboard/index/text-dynamic-server.js b/demos/app-dir/app/dashboard/index/text-dynamic-server.js new file mode 100644 index 0000000000..9f87f73b47 --- /dev/null +++ b/demos/app-dir/app/dashboard/index/text-dynamic-server.js @@ -0,0 +1,9 @@ +import styles from './dynamic.module.css' + +export default function Dynamic() { + return ( +

+ hello from dynamic on server +

+ ) +} diff --git a/demos/app-dir/app/dashboard/index/text-lazy-client.js b/demos/app-dir/app/dashboard/index/text-lazy-client.js new file mode 100644 index 0000000000..ead59b0aa2 --- /dev/null +++ b/demos/app-dir/app/dashboard/index/text-lazy-client.js @@ -0,0 +1,13 @@ +'client' + +import styles from './lazy.module.css' + +export default function LazyComponent() { + return ( + <> +

+ hello from lazy +

+ + ) +} diff --git a/demos/app-dir/app/dashboard/integrations/page.js b/demos/app-dir/app/dashboard/integrations/page.js new file mode 100644 index 0000000000..683d131ef9 --- /dev/null +++ b/demos/app-dir/app/dashboard/integrations/page.js @@ -0,0 +1,7 @@ +export default function IntegrationsPage(props) { + return ( + <> +

hello from app/dashboard/integrations

+ + ) +} diff --git a/demos/app-dir/app/dashboard/layout.js b/demos/app-dir/app/dashboard/layout.js new file mode 100644 index 0000000000..ff3ee29947 --- /dev/null +++ b/demos/app-dir/app/dashboard/layout.js @@ -0,0 +1,11 @@ +import './style.css' +import './global.css' + +export default function DashboardLayout(props) { + return ( +
+

Dashboard

+ {props.children} +
+ ) +} diff --git a/demos/app-dir/app/dashboard/page.js b/demos/app-dir/app/dashboard/page.js new file mode 100644 index 0000000000..966a2a3e03 --- /dev/null +++ b/demos/app-dir/app/dashboard/page.js @@ -0,0 +1,18 @@ +import ClientComp from './client-comp-client' + +export default function DashboardPage(props) { + return ( + <> +

+ hello from app/dashboard +

+

BOLD

+

this is green

+ + + ) +} + +export const config = { + runtime: 'experimental-edge', +} diff --git a/demos/app-dir/app/dashboard/style.css b/demos/app-dir/app/dashboard/style.css new file mode 100644 index 0000000000..fa95e11ba9 --- /dev/null +++ b/demos/app-dir/app/dashboard/style.css @@ -0,0 +1,3 @@ +.green { + color: green; +} diff --git a/demos/app-dir/app/dynamic/[category]/[id]/layout.js b/demos/app-dir/app/dynamic/[category]/[id]/layout.js new file mode 100644 index 0000000000..0d09ad0787 --- /dev/null +++ b/demos/app-dir/app/dynamic/[category]/[id]/layout.js @@ -0,0 +1,11 @@ +export default function IdLayout({ children, params }) { + return ( + <> +

+ Id Layout. Params:{' '} + {JSON.stringify(params)} +

+ {children} + + ) +} diff --git a/demos/app-dir/app/dynamic/[category]/[id]/page.js b/demos/app-dir/app/dynamic/[category]/[id]/page.js new file mode 100644 index 0000000000..02df487f6d --- /dev/null +++ b/demos/app-dir/app/dynamic/[category]/[id]/page.js @@ -0,0 +1,11 @@ +export default function IdPage({ children, params }) { + return ( + <> +

+ Id Page. Params:{' '} + {JSON.stringify(params)} +

+ {children} + + ) +} diff --git a/demos/app-dir/app/dynamic/[category]/layout.js b/demos/app-dir/app/dynamic/[category]/layout.js new file mode 100644 index 0000000000..2744b8a839 --- /dev/null +++ b/demos/app-dir/app/dynamic/[category]/layout.js @@ -0,0 +1,11 @@ +export default function CategoryLayout({ children, params }) { + return ( + <> +

+ Category Layout. Params:{' '} + {JSON.stringify(params)}{' '} +

+ {children} + + ) +} diff --git a/demos/app-dir/app/dynamic/layout.js b/demos/app-dir/app/dynamic/layout.js new file mode 100644 index 0000000000..549e0e30e6 --- /dev/null +++ b/demos/app-dir/app/dynamic/layout.js @@ -0,0 +1,11 @@ +export default function DynamicLayout({ children, params }) { + return ( + <> +

+ Dynamic Layout. Params:{' '} + {JSON.stringify(params)} +

+ {children} + + ) +} diff --git a/demos/app-dir/app/error/clientcomponent/error.js b/demos/app-dir/app/error/clientcomponent/error.js new file mode 100644 index 0000000000..57ad9184f1 --- /dev/null +++ b/demos/app-dir/app/error/clientcomponent/error.js @@ -0,0 +1,12 @@ +'client' + +export default function ErrorBoundary({ error, reset }) { + return ( + <> +

An error occurred: {error.message}

+ + + ) +} diff --git a/demos/app-dir/app/error/clientcomponent/page.js b/demos/app-dir/app/error/clientcomponent/page.js new file mode 100644 index 0000000000..5f4e73da9d --- /dev/null +++ b/demos/app-dir/app/error/clientcomponent/page.js @@ -0,0 +1,20 @@ +'client' + +import { useState } from 'react' + +export default function Page() { + const [clicked, setClicked] = useState(false) + if (clicked) { + throw new Error('this is a test') + } + return ( + + ) +} diff --git a/demos/app-dir/app/error/ssr-error-client-component/client-component.js b/demos/app-dir/app/error/ssr-error-client-component/client-component.js new file mode 100644 index 0000000000..7743a313b4 --- /dev/null +++ b/demos/app-dir/app/error/ssr-error-client-component/client-component.js @@ -0,0 +1,5 @@ +'client' + +export default function Page() { + throw new Error('Error during SSR') +} diff --git a/demos/app-dir/app/error/ssr-error-client-component/page.js b/demos/app-dir/app/error/ssr-error-client-component/page.js new file mode 100644 index 0000000000..39d5495fd3 --- /dev/null +++ b/demos/app-dir/app/error/ssr-error-client-component/page.js @@ -0,0 +1,8 @@ +import ClientComp from './client-component' +import { useHeaders } from 'next/dist/client/components/hooks-server' + +export default function Page() { + // Opt-in to SSR. + useHeaders() + return +} diff --git a/demos/app-dir/app/extension/page.server.js b/demos/app-dir/app/extension/page.server.js new file mode 100644 index 0000000000..6e4c138067 --- /dev/null +++ b/demos/app-dir/app/extension/page.server.js @@ -0,0 +1,3 @@ +export default function Page() { + return

Result Page

+} diff --git a/demos/app-dir/app/hooks/use-cookies/client/page.js b/demos/app-dir/app/hooks/use-cookies/client/page.js new file mode 100644 index 0000000000..e387b365aa --- /dev/null +++ b/demos/app-dir/app/hooks/use-cookies/client/page.js @@ -0,0 +1,10 @@ +'client' + +import { useCookies } from 'next/dist/client/components/hooks-server' + +export default function Page() { + // This should throw an error. + useCookies() + + return null +} diff --git a/demos/app-dir/app/hooks/use-cookies/page.js b/demos/app-dir/app/hooks/use-cookies/page.js new file mode 100644 index 0000000000..dd2efcccd7 --- /dev/null +++ b/demos/app-dir/app/hooks/use-cookies/page.js @@ -0,0 +1,19 @@ +import { useCookies } from 'next/dist/client/components/hooks-server' + +export default function Page() { + const cookies = useCookies() + + const hasCookie = + 'use-cookies' in cookies && cookies['use-cookies'] === 'value' + + return ( + <> +

hello from /hooks/use-cookies

+ {hasCookie ? ( + + ) : ( + + )} + + ) +} diff --git a/demos/app-dir/app/hooks/use-headers/client/page.js b/demos/app-dir/app/hooks/use-headers/client/page.js new file mode 100644 index 0000000000..022da1e08a --- /dev/null +++ b/demos/app-dir/app/hooks/use-headers/client/page.js @@ -0,0 +1,10 @@ +'client' + +import { useHeaders } from 'next/dist/client/components/hooks-server' + +export default function Page() { + // This should throw an error. + useHeaders() + + return null +} diff --git a/demos/app-dir/app/hooks/use-headers/page.js b/demos/app-dir/app/hooks/use-headers/page.js new file mode 100644 index 0000000000..2c73997ad4 --- /dev/null +++ b/demos/app-dir/app/hooks/use-headers/page.js @@ -0,0 +1,22 @@ +import { useHeaders } from 'next/dist/client/components/hooks-server' + +export default function Page() { + const headers = useHeaders() + + const hasHeader = + 'x-use-headers' in headers && headers['x-use-headers'] === 'value' + + return ( + <> +

hello from /hooks/use-headers

+ {hasHeader ? ( +

Has x-use-headers header

+ ) : ( +

Does not have x-use-headers header

+ )} + {'referer' in headers && headers['referer'] && ( +

Has referer header

+ )} + + ) +} diff --git a/demos/app-dir/app/hooks/use-layout-segments/server/page.js b/demos/app-dir/app/hooks/use-layout-segments/server/page.js new file mode 100644 index 0000000000..8ffb8c9e59 --- /dev/null +++ b/demos/app-dir/app/hooks/use-layout-segments/server/page.js @@ -0,0 +1,10 @@ +'client' +// TODO-APP: enable once test is not skipped. +// import { useLayoutSegments } from 'next/dist/client/components/hooks-client' + +export default function Page() { + // This should throw an error. + // useLayoutSegments() + + return null +} diff --git a/demos/app-dir/app/hooks/use-params/server/page.js b/demos/app-dir/app/hooks/use-params/server/page.js new file mode 100644 index 0000000000..0190f96a51 --- /dev/null +++ b/demos/app-dir/app/hooks/use-params/server/page.js @@ -0,0 +1,9 @@ +// TODO-APP: enable when implemented. +// import { useParams } from 'next/dist/client/components/hooks-client' + +export default function Page() { + // This should throw an error. + // useParams() + + return null +} diff --git a/demos/app-dir/app/hooks/use-pathname/page.js b/demos/app-dir/app/hooks/use-pathname/page.js new file mode 100644 index 0000000000..fa8350a853 --- /dev/null +++ b/demos/app-dir/app/hooks/use-pathname/page.js @@ -0,0 +1,15 @@ +'client' + +import { usePathname } from 'next/dist/client/components/hooks-client' + +export default function Page() { + const pathname = usePathname() + + return ( + <> +

+ hello from /hooks/use-pathname +

+ + ) +} diff --git a/demos/app-dir/app/hooks/use-pathname/server/page.js b/demos/app-dir/app/hooks/use-pathname/server/page.js new file mode 100644 index 0000000000..bb5ab57464 --- /dev/null +++ b/demos/app-dir/app/hooks/use-pathname/server/page.js @@ -0,0 +1,8 @@ +// import { usePathname } from 'next/dist/client/components/hooks-client' + +export default function Page() { + // This should throw an error. + // usePathname() + + return null +} diff --git a/demos/app-dir/app/hooks/use-preview-data/client/page.js b/demos/app-dir/app/hooks/use-preview-data/client/page.js new file mode 100644 index 0000000000..86fbc8fe7e --- /dev/null +++ b/demos/app-dir/app/hooks/use-preview-data/client/page.js @@ -0,0 +1,10 @@ +'client' + +import { usePreviewData } from 'next/dist/client/components/hooks-server' + +export default function Page() { + // This should throw an error. + usePreviewData() + + return null +} diff --git a/demos/app-dir/app/hooks/use-preview-data/page.js b/demos/app-dir/app/hooks/use-preview-data/page.js new file mode 100644 index 0000000000..afdcad1b2b --- /dev/null +++ b/demos/app-dir/app/hooks/use-preview-data/page.js @@ -0,0 +1,18 @@ +import { usePreviewData } from 'next/dist/client/components/hooks-server' + +export default function Page() { + const data = usePreviewData() + + const hasData = !!data && data.key === 'value' + + return ( + <> +

hello from /hooks/use-preview-data

+ {hasData ? ( +

Has preview data

+ ) : ( +

Does not have preview data

+ )} + + ) +} diff --git a/demos/app-dir/app/hooks/use-router/page.js b/demos/app-dir/app/hooks/use-router/page.js new file mode 100644 index 0000000000..51a14d940b --- /dev/null +++ b/demos/app-dir/app/hooks/use-router/page.js @@ -0,0 +1,19 @@ +'client' + +import { useRouter } from 'next/dist/client/components/hooks-client' + +export default function Page() { + const router = useRouter() + + return ( + <> +

hello from /hooks/use-router

+ + + ) +} diff --git a/demos/app-dir/app/hooks/use-router/server/page.js b/demos/app-dir/app/hooks/use-router/server/page.js new file mode 100644 index 0000000000..18a79712d0 --- /dev/null +++ b/demos/app-dir/app/hooks/use-router/server/page.js @@ -0,0 +1,8 @@ +// import { useRouter } from 'next/dist/client/components/hooks-client' + +export default function Page() { + // This should throw an error. + // useRouter() + + return null +} diff --git a/demos/app-dir/app/hooks/use-router/sub-page/page.js b/demos/app-dir/app/hooks/use-router/sub-page/page.js new file mode 100644 index 0000000000..82c6347e59 --- /dev/null +++ b/demos/app-dir/app/hooks/use-router/sub-page/page.js @@ -0,0 +1,5 @@ +'client' + +export default function Page() { + return

hello from /hooks/use-router/sub-page

+} diff --git a/demos/app-dir/app/hooks/use-search-params/page.js b/demos/app-dir/app/hooks/use-search-params/page.js new file mode 100644 index 0000000000..d9876c9c7b --- /dev/null +++ b/demos/app-dir/app/hooks/use-search-params/page.js @@ -0,0 +1,21 @@ +'client' + +import { useSearchParams } from 'next/dist/client/components/hooks-client' + +export default function Page() { + const params = useSearchParams() + + return ( + <> +

+ hello from /hooks/use-search-params +

+ + ) +} diff --git a/demos/app-dir/app/hooks/use-search-params/server/page.js b/demos/app-dir/app/hooks/use-search-params/server/page.js new file mode 100644 index 0000000000..65c6fe8d91 --- /dev/null +++ b/demos/app-dir/app/hooks/use-search-params/server/page.js @@ -0,0 +1,8 @@ +// import { useSearchParams } from 'next/dist/client/components/hooks-client' + +export default function Page() { + // This should throw an error. + // useSearchParams() + + return null +} diff --git a/demos/app-dir/app/hooks/use-selected-layout-segment/server/page.js b/demos/app-dir/app/hooks/use-selected-layout-segment/server/page.js new file mode 100644 index 0000000000..a5d718cbea --- /dev/null +++ b/demos/app-dir/app/hooks/use-selected-layout-segment/server/page.js @@ -0,0 +1,10 @@ +'client' +// TODO-APP: enable once test is not skipped. +// import { useSelectedLayoutSegment } from 'next/dist/client/components/hooks-client' + +export default function Page() { + // This should throw an error. + // useSelectedLayoutSegment() + + return null +} diff --git a/demos/app-dir/app/internal/failure/page.js b/demos/app-dir/app/internal/failure/page.js new file mode 100644 index 0000000000..9bd06ec2a3 --- /dev/null +++ b/demos/app-dir/app/internal/failure/page.js @@ -0,0 +1,3 @@ +export default function Page() { + return
Failure
+} diff --git a/demos/app-dir/app/internal/page.js b/demos/app-dir/app/internal/page.js new file mode 100644 index 0000000000..ddbc93ea55 --- /dev/null +++ b/demos/app-dir/app/internal/page.js @@ -0,0 +1,18 @@ +import Link from 'next/link' + +export default function Page() { + return ( +
+ + +
+ ) +} diff --git a/demos/app-dir/app/internal/success/page.js b/demos/app-dir/app/internal/success/page.js new file mode 100644 index 0000000000..90c6aecd4e --- /dev/null +++ b/demos/app-dir/app/internal/success/page.js @@ -0,0 +1,3 @@ +export default function Page() { + return
Success
+} diff --git a/demos/app-dir/app/layout.js b/demos/app-dir/app/layout.js new file mode 100644 index 0000000000..d632f8dab8 --- /dev/null +++ b/demos/app-dir/app/layout.js @@ -0,0 +1,27 @@ +import { experimental_use as use } from 'react' + +import '../styles/global.css' +import './style.css' + +export const config = { + revalidate: 0, +} + +async function getData() { + return { + world: 'world', + } +} + +export default function Root({ children }) { + const { world } = use(getData()) + + return ( + + + {`hello ${world}`} + + {children} + + ) +} diff --git a/demos/app-dir/app/link-hard-push/[id]/page.js b/demos/app-dir/app/link-hard-push/[id]/page.js new file mode 100644 index 0000000000..c440f0582c --- /dev/null +++ b/demos/app-dir/app/link-hard-push/[id]/page.js @@ -0,0 +1,14 @@ +import Link from 'next/link' +import { nanoid } from 'nanoid' + +export default function Page({ params }) { + const other = params.id === '123' ? '456' : '123' + return ( + <> +

{nanoid()}

{' '} + + To {other} + + + ) +} diff --git a/demos/app-dir/app/link-hard-replace/[id]/page.js b/demos/app-dir/app/link-hard-replace/[id]/page.js new file mode 100644 index 0000000000..c90e93f74c --- /dev/null +++ b/demos/app-dir/app/link-hard-replace/[id]/page.js @@ -0,0 +1,14 @@ +import Link from 'next/link' +import { nanoid } from 'nanoid' + +export default function Page({ params }) { + const other = params.id === '123' ? '456' : '123' + return ( + <> +

{nanoid()}

{' '} + + To {other} + + + ) +} diff --git a/demos/app-dir/app/link-hard-replace/page.js b/demos/app-dir/app/link-hard-replace/page.js new file mode 100644 index 0000000000..340baa107e --- /dev/null +++ b/demos/app-dir/app/link-hard-replace/page.js @@ -0,0 +1,16 @@ +import { nanoid } from 'nanoid' +import Link from 'next/link' + +export default function Page() { + return ( + <> +

{nanoid()}

+ + Self Link + + + Subpage + + + ) +} diff --git a/demos/app-dir/app/link-hard-replace/subpage/page.js b/demos/app-dir/app/link-hard-replace/subpage/page.js new file mode 100644 index 0000000000..cd586543ab --- /dev/null +++ b/demos/app-dir/app/link-hard-replace/subpage/page.js @@ -0,0 +1,9 @@ +import Link from 'next/link' + +export default function Page() { + return ( + + Self Link + + ) +} diff --git a/demos/app-dir/app/link-soft-push/page.js b/demos/app-dir/app/link-soft-push/page.js new file mode 100644 index 0000000000..049e5be9c4 --- /dev/null +++ b/demos/app-dir/app/link-soft-push/page.js @@ -0,0 +1,9 @@ +import Link from 'next/link' + +export default function Page() { + return ( + + With ID + + ) +} diff --git a/demos/app-dir/app/link-soft-replace/page.js b/demos/app-dir/app/link-soft-replace/page.js new file mode 100644 index 0000000000..c65758d990 --- /dev/null +++ b/demos/app-dir/app/link-soft-replace/page.js @@ -0,0 +1,16 @@ +import { nanoid } from 'nanoid' +import Link from 'next/link' + +export default function Page() { + return ( + <> +

{nanoid()}

+ + Self Link + + + Subpage + + + ) +} diff --git a/demos/app-dir/app/link-soft-replace/subpage/page.js b/demos/app-dir/app/link-soft-replace/subpage/page.js new file mode 100644 index 0000000000..6ee17de065 --- /dev/null +++ b/demos/app-dir/app/link-soft-replace/subpage/page.js @@ -0,0 +1,9 @@ +import Link from 'next/link' + +export default function Page() { + return ( + + Self Link + + ) +} diff --git a/demos/app-dir/app/loading-bug/[categorySlug]/loading.js b/demos/app-dir/app/loading-bug/[categorySlug]/loading.js new file mode 100644 index 0000000000..f1ca6af341 --- /dev/null +++ b/demos/app-dir/app/loading-bug/[categorySlug]/loading.js @@ -0,0 +1,3 @@ +export default function Loading() { + return

Loading...

+} diff --git a/demos/app-dir/app/loading-bug/[categorySlug]/page.js b/demos/app-dir/app/loading-bug/[categorySlug]/page.js new file mode 100644 index 0000000000..9352955a50 --- /dev/null +++ b/demos/app-dir/app/loading-bug/[categorySlug]/page.js @@ -0,0 +1,15 @@ +// @ts-ignore +import { experimental_use as use } from 'react' + +const fetchCategory = async (categorySlug) => { + // artificial delay + await new Promise((resolve) => setTimeout(resolve, 3000)) + + return categorySlug + 'abc' +} + +export default function Page({ params }) { + const category = use(fetchCategory(params.categorySlug)) + + return
{category}
+} diff --git a/demos/app-dir/app/navigation/link.js b/demos/app-dir/app/navigation/link.js new file mode 100644 index 0000000000..9d39caab31 --- /dev/null +++ b/demos/app-dir/app/navigation/link.js @@ -0,0 +1,27 @@ +'client' + +import { useRouter } from 'next/dist/client/components/hooks-client' +import React from 'react' +import { useEffect } from 'react' + +export default function HardLink({ href, children, ...props }) { + const router = useRouter() + useEffect(() => { + router.prefetch(href) + }, [router, href]) + return ( + { + e.preventDefault() + React.startTransition(() => { + router.push(href) + router.reload() + }) + }} + > + {children} + + ) +} diff --git a/demos/app-dir/app/navigation/page.js b/demos/app-dir/app/navigation/page.js new file mode 100644 index 0000000000..62238fcf7b --- /dev/null +++ b/demos/app-dir/app/navigation/page.js @@ -0,0 +1,17 @@ +import { nanoid } from 'nanoid' +import Link from './link.js' + +export default function Page() { + return ( + <> +

{nanoid()}

+

hello from /navigation

+ + useCookies + + + useHeaders + + + ) +} diff --git a/demos/app-dir/app/not-found/404.js b/demos/app-dir/app/not-found/404.js new file mode 100644 index 0000000000..42acdf4c58 --- /dev/null +++ b/demos/app-dir/app/not-found/404.js @@ -0,0 +1,3 @@ +export default function NotFound() { + return

404!

+} diff --git a/demos/app-dir/app/not-found/client-side/page.js b/demos/app-dir/app/not-found/client-side/page.js new file mode 100644 index 0000000000..faca8e33aa --- /dev/null +++ b/demos/app-dir/app/not-found/client-side/page.js @@ -0,0 +1,17 @@ +'client' + +import { notFound } from 'next/dist/client/components/not-found' +import React from 'react' + +export default function Page() { + const [notFoundEnabled, enableNotFound] = React.useState(false) + + if (notFoundEnabled) { + notFound() + } + return ( + + ) +} diff --git a/demos/app-dir/app/not-found/clientcomponent/a.js b/demos/app-dir/app/not-found/clientcomponent/a.js new file mode 100644 index 0000000000..c86055f6b0 --- /dev/null +++ b/demos/app-dir/app/not-found/clientcomponent/a.js @@ -0,0 +1,9 @@ +// TODO-APP: enable when flight error serialization is implemented +import ClientComp from './client-component' +import { useHeaders } from 'next/dist/client/components/hooks-server' + +export default function Page() { + // Opt-in to SSR. + useHeaders() + return +} diff --git a/demos/app-dir/app/not-found/clientcomponent/client-component.js b/demos/app-dir/app/not-found/clientcomponent/client-component.js new file mode 100644 index 0000000000..7469f1ca68 --- /dev/null +++ b/demos/app-dir/app/not-found/clientcomponent/client-component.js @@ -0,0 +1,7 @@ +'client' +import { notFound } from 'next/dist/client/components/not-found' + +export default function ClientComp() { + notFound() + return <> +} diff --git a/demos/app-dir/app/not-found/servercomponent/a.js b/demos/app-dir/app/not-found/servercomponent/a.js new file mode 100644 index 0000000000..5704c31c2f --- /dev/null +++ b/demos/app-dir/app/not-found/servercomponent/a.js @@ -0,0 +1,7 @@ +// TODO-APP: enable when flight error serialization is implemented +import { notFound } from 'next/dist/client/components/not-found' + +export default function Page() { + notFound() + return <> +} diff --git a/demos/app-dir/app/old-router/client-router.js b/demos/app-dir/app/old-router/client-router.js new file mode 100644 index 0000000000..3dc229767c --- /dev/null +++ b/demos/app-dir/app/old-router/client-router.js @@ -0,0 +1,17 @@ +'client' + +import { useRouter, withRouter } from 'next/router' +import IsNull from './is-null' + +function ClientRouter({ router: withRouter }) { + const router = useRouter() + + return ( + <> + + + + ) +} + +export default withRouter(ClientRouter) diff --git a/demos/app-dir/app/old-router/is-null.js b/demos/app-dir/app/old-router/is-null.js new file mode 100644 index 0000000000..3876fbe873 --- /dev/null +++ b/demos/app-dir/app/old-router/is-null.js @@ -0,0 +1,7 @@ +export default function IsNull({ value }) { + if (value === null) { + return
Value Was Null
+ } + + return
Value Was Not Null
+} diff --git a/demos/app-dir/app/old-router/page.js b/demos/app-dir/app/old-router/page.js new file mode 100644 index 0000000000..928fa110ca --- /dev/null +++ b/demos/app-dir/app/old-router/page.js @@ -0,0 +1,12 @@ +import { useCookies } from 'next/dist/client/components/hooks-server' +import Router from './router' + +export default function Page() { + useCookies() + + return ( +
+ +
+ ) +} diff --git a/demos/app-dir/app/old-router/router.js b/demos/app-dir/app/old-router/router.js new file mode 100644 index 0000000000..7cddbe4181 --- /dev/null +++ b/demos/app-dir/app/old-router/router.js @@ -0,0 +1,19 @@ +import { useRouter, withRouter } from 'next/router' +import IsNull from './is-null' +import ServerRouter from './server-router' +import ClientRouter from './client-router' + +function SharedRouter({ router: withRouter }) { + const router = useRouter() + + return ( + <> + + + + + + ) +} + +export default withRouter(SharedRouter) diff --git a/demos/app-dir/app/old-router/server-router.js b/demos/app-dir/app/old-router/server-router.js new file mode 100644 index 0000000000..9e1291329c --- /dev/null +++ b/demos/app-dir/app/old-router/server-router.js @@ -0,0 +1,15 @@ +import { useRouter, withRouter } from 'next/router' +import IsNull from './is-null' + +function ServerRouter({ router: withRouter }) { + const router = useRouter() + + return ( + <> + + + + ) +} + +export default withRouter(ServerRouter) diff --git a/demos/app-dir/app/optional-catch-all/[[...slug]]/page.js b/demos/app-dir/app/optional-catch-all/[[...slug]]/page.js new file mode 100644 index 0000000000..c02675e1cc --- /dev/null +++ b/demos/app-dir/app/optional-catch-all/[[...slug]]/page.js @@ -0,0 +1,7 @@ +export default function Page({ params }) { + return ( +

+ hello from /optional-catch-all/{params.slug?.join('/')} +

+ ) +} diff --git a/demos/app-dir/app/pages-linking/page.js b/demos/app-dir/app/pages-linking/page.js new file mode 100644 index 0000000000..19b7cc4b86 --- /dev/null +++ b/demos/app-dir/app/pages-linking/page.js @@ -0,0 +1,9 @@ +import Link from 'next/link' + +export default function Page(props) { + return ( + + To Pages Page + + ) +} diff --git a/demos/app-dir/app/parallel/(new)/@baz/nested-2/page.js b/demos/app-dir/app/parallel/(new)/@baz/nested-2/page.js new file mode 100644 index 0000000000..05c172f81b --- /dev/null +++ b/demos/app-dir/app/parallel/(new)/@baz/nested-2/page.js @@ -0,0 +1,3 @@ +export default function Page() { + return
parallel/(new)/@baz/nested/page
+} diff --git a/demos/app-dir/app/parallel/(new)/layout.js b/demos/app-dir/app/parallel/(new)/layout.js new file mode 100644 index 0000000000..491d122a96 --- /dev/null +++ b/demos/app-dir/app/parallel/(new)/layout.js @@ -0,0 +1,10 @@ +export default function Layout({ baz }) { + return ( +
+ parallel/(new)/layout: +
+ {baz} +
+
+ ) +} diff --git a/demos/app-dir/app/parallel/@bar/nested/@a/page.js b/demos/app-dir/app/parallel/@bar/nested/@a/page.js new file mode 100644 index 0000000000..d1c6fc71e1 --- /dev/null +++ b/demos/app-dir/app/parallel/@bar/nested/@a/page.js @@ -0,0 +1,3 @@ +export default function Page() { + return
parallel/@bar/nested/@a/page
+} diff --git a/demos/app-dir/app/parallel/@bar/nested/@b/page.js b/demos/app-dir/app/parallel/@bar/nested/@b/page.js new file mode 100644 index 0000000000..15ef0b7a39 --- /dev/null +++ b/demos/app-dir/app/parallel/@bar/nested/@b/page.js @@ -0,0 +1,3 @@ +export default function Page() { + return
parallel/@bar/nested/@b/page
+} diff --git a/demos/app-dir/app/parallel/@bar/nested/layout.js b/demos/app-dir/app/parallel/@bar/nested/layout.js new file mode 100644 index 0000000000..4ba7b39938 --- /dev/null +++ b/demos/app-dir/app/parallel/@bar/nested/layout.js @@ -0,0 +1,16 @@ +export default function Parallel({ a, b, children }) { + return ( +
+ parallel/@bar/nested/layout +
+ {a} +
+
+ {b} +
+
+ {children} +
+
+ ) +} diff --git a/demos/app-dir/app/parallel/@bar/page.js b/demos/app-dir/app/parallel/@bar/page.js new file mode 100644 index 0000000000..568f5ed064 --- /dev/null +++ b/demos/app-dir/app/parallel/@bar/page.js @@ -0,0 +1,3 @@ +export default function Page() { + return
Bar
+} diff --git a/demos/app-dir/app/parallel/@foo/nested/@a/page.js b/demos/app-dir/app/parallel/@foo/nested/@a/page.js new file mode 100644 index 0000000000..31c604844a --- /dev/null +++ b/demos/app-dir/app/parallel/@foo/nested/@a/page.js @@ -0,0 +1,3 @@ +export default function Page() { + return
parallel/@foo/nested/@a/page
+} diff --git a/demos/app-dir/app/parallel/@foo/nested/@b/page.js b/demos/app-dir/app/parallel/@foo/nested/@b/page.js new file mode 100644 index 0000000000..79481da1a0 --- /dev/null +++ b/demos/app-dir/app/parallel/@foo/nested/@b/page.js @@ -0,0 +1,3 @@ +export default function Page() { + return
parallel/@foo/nested/@b/page
+} diff --git a/demos/app-dir/app/parallel/@foo/nested/layout.js b/demos/app-dir/app/parallel/@foo/nested/layout.js new file mode 100644 index 0000000000..19d532a374 --- /dev/null +++ b/demos/app-dir/app/parallel/@foo/nested/layout.js @@ -0,0 +1,16 @@ +export default function Parallel({ a, b, children }) { + return ( +
+ parallel/@foo/nested/layout +
+ {a} +
+
+ {b} +
+
+ {children} +
+
+ ) +} diff --git a/demos/app-dir/app/parallel/@foo/page.js b/demos/app-dir/app/parallel/@foo/page.js new file mode 100644 index 0000000000..9e30ce2b2b --- /dev/null +++ b/demos/app-dir/app/parallel/@foo/page.js @@ -0,0 +1,3 @@ +export default function Page() { + return
Foo
+} diff --git a/demos/app-dir/app/parallel/layout.js b/demos/app-dir/app/parallel/layout.js new file mode 100644 index 0000000000..a1474ba6d0 --- /dev/null +++ b/demos/app-dir/app/parallel/layout.js @@ -0,0 +1,18 @@ +import './style.css' + +export default function Parallel({ foo, bar, children }) { + return ( +
+ parallel/layout: +
+ {foo} +
+
+ {bar} +
+
+ {children} +
+
+ ) +} diff --git a/demos/app-dir/app/parallel/nested/page.js b/demos/app-dir/app/parallel/nested/page.js new file mode 100644 index 0000000000..d7992d7198 --- /dev/null +++ b/demos/app-dir/app/parallel/nested/page.js @@ -0,0 +1,3 @@ +export default function Page() { + return
parallel/nested/page
+} diff --git a/demos/app-dir/app/parallel/style.css b/demos/app-dir/app/parallel/style.css new file mode 100644 index 0000000000..723ece56ac --- /dev/null +++ b/demos/app-dir/app/parallel/style.css @@ -0,0 +1,15 @@ +div { + font-size: 16px; +} + +.parallel { + border: 1px solid; + margin: 10px; +} + +.parallel::before { + content: attr(title); + background: black; + color: white; + padding: 1px; +} diff --git a/demos/app-dir/app/param-and-query/[slug]/page.js b/demos/app-dir/app/param-and-query/[slug]/page.js new file mode 100644 index 0000000000..c778751859 --- /dev/null +++ b/demos/app-dir/app/param-and-query/[slug]/page.js @@ -0,0 +1,13 @@ +'client' + +export default function Page({ params, searchParams }) { + return ( +

+ hello from /param-and-query/{params.slug}?slug={searchParams.slug} +

+ ) +} diff --git a/demos/app-dir/app/partial-match-[id]/page.js b/demos/app-dir/app/partial-match-[id]/page.js new file mode 100644 index 0000000000..33429192f2 --- /dev/null +++ b/demos/app-dir/app/partial-match-[id]/page.js @@ -0,0 +1,7 @@ +export default function DeploymentsPage(props) { + return ( + <> +

hello from app/partial-match-[id]. ID is: {props.params.id}

+ + ) +} diff --git a/demos/app-dir/app/redirect/client-side/page.js b/demos/app-dir/app/redirect/client-side/page.js new file mode 100644 index 0000000000..1d11b4c62f --- /dev/null +++ b/demos/app-dir/app/redirect/client-side/page.js @@ -0,0 +1,19 @@ +'client' + +import { redirect } from 'next/dist/client/components/redirect' +import React from 'react' + +export default function Page() { + const [shouldRedirect, setShouldRedirect] = React.useState(false) + + if (shouldRedirect) { + redirect('/redirect/result') + } + return ( + + ) +} diff --git a/demos/app-dir/app/redirect/clientcomponent/client-component.js b/demos/app-dir/app/redirect/clientcomponent/client-component.js new file mode 100644 index 0000000000..5e7cb994fd --- /dev/null +++ b/demos/app-dir/app/redirect/clientcomponent/client-component.js @@ -0,0 +1,7 @@ +'client' +import { redirect } from 'next/dist/client/components/redirect' + +export default function ClientComp() { + redirect('/redirect/result') + return <> +} diff --git a/demos/app-dir/app/redirect/clientcomponent/page.js b/demos/app-dir/app/redirect/clientcomponent/page.js new file mode 100644 index 0000000000..39d5495fd3 --- /dev/null +++ b/demos/app-dir/app/redirect/clientcomponent/page.js @@ -0,0 +1,8 @@ +import ClientComp from './client-component' +import { useHeaders } from 'next/dist/client/components/hooks-server' + +export default function Page() { + // Opt-in to SSR. + useHeaders() + return +} diff --git a/demos/app-dir/app/redirect/next-config-redirect/page.js b/demos/app-dir/app/redirect/next-config-redirect/page.js new file mode 100644 index 0000000000..95038b8326 --- /dev/null +++ b/demos/app-dir/app/redirect/next-config-redirect/page.js @@ -0,0 +1,11 @@ +import Link from 'next/link' + +export default function Page() { + return ( + <> + + To Dashboard through /redirect/a + + + ) +} diff --git a/demos/app-dir/app/redirect/next-middleware-redirect/page.js b/demos/app-dir/app/redirect/next-middleware-redirect/page.js new file mode 100644 index 0000000000..49a721599e --- /dev/null +++ b/demos/app-dir/app/redirect/next-middleware-redirect/page.js @@ -0,0 +1,11 @@ +import Link from 'next/link' + +export default function Page() { + return ( + <> + + To Dashboard through /redirect/a + + + ) +} diff --git a/demos/app-dir/app/redirect/result/page.js b/demos/app-dir/app/redirect/result/page.js new file mode 100644 index 0000000000..6e4c138067 --- /dev/null +++ b/demos/app-dir/app/redirect/result/page.js @@ -0,0 +1,3 @@ +export default function Page() { + return

Result Page

+} diff --git a/demos/app-dir/app/redirect/servercomponent/page.js b/demos/app-dir/app/redirect/servercomponent/page.js new file mode 100644 index 0000000000..a3b187fcb8 --- /dev/null +++ b/demos/app-dir/app/redirect/servercomponent/page.js @@ -0,0 +1,6 @@ +import { redirect } from 'next/dist/client/components/redirect' + +export default function Page() { + redirect('/redirect/result') + return <> +} diff --git a/demos/app-dir/app/rewrites/page.js b/demos/app-dir/app/rewrites/page.js new file mode 100644 index 0000000000..ae97d2af2c --- /dev/null +++ b/demos/app-dir/app/rewrites/page.js @@ -0,0 +1,9 @@ +import Link from 'next/link' + +export default function Page() { + return ( + + To Dashboard Rewritten + + ) +} diff --git a/demos/app-dir/app/same-layout/first/page.js b/demos/app-dir/app/same-layout/first/page.js new file mode 100644 index 0000000000..bf4ba9e245 --- /dev/null +++ b/demos/app-dir/app/same-layout/first/page.js @@ -0,0 +1,12 @@ +import Link from 'next/link' + +export default function Page() { + return ( + <> +

hello from same-layout/first

+ + To Second + + + ) +} diff --git a/demos/app-dir/app/same-layout/layout.js b/demos/app-dir/app/same-layout/layout.js new file mode 100644 index 0000000000..42734ad725 --- /dev/null +++ b/demos/app-dir/app/same-layout/layout.js @@ -0,0 +1,10 @@ +import { nanoid } from 'nanoid' + +export default function Layout({ children }) { + return ( + <> +

{nanoid()}

+
{children}
+ + ) +} diff --git a/demos/app-dir/app/same-layout/second/page.js b/demos/app-dir/app/same-layout/second/page.js new file mode 100644 index 0000000000..9d981dcb70 --- /dev/null +++ b/demos/app-dir/app/same-layout/second/page.js @@ -0,0 +1,12 @@ +import Link from 'next/link' + +export default function Page() { + return ( + <> +

hello from same-layout/second

+ + To First + + + ) +} diff --git a/demos/app-dir/app/shared-component-route/page.js b/demos/app-dir/app/shared-component-route/page.js new file mode 100644 index 0000000000..c90a622b6e --- /dev/null +++ b/demos/app-dir/app/shared-component-route/page.js @@ -0,0 +1,7 @@ +export default function SharedComponentRoute() { + return ( + <> +

hello from app/shared-component-route

+ + ) +} diff --git a/demos/app-dir/app/should-not-serve-client/page.js b/demos/app-dir/app/should-not-serve-client/page.js new file mode 100644 index 0000000000..8ff1c25156 --- /dev/null +++ b/demos/app-dir/app/should-not-serve-client/page.js @@ -0,0 +1,9 @@ +'client' + +export default function ShouldNotServeClientDotJs(props) { + return ( + <> +

hello from app/should-not-serve-client

+ + ) +} diff --git a/demos/app-dir/app/should-not-serve-server/page.js b/demos/app-dir/app/should-not-serve-server/page.js new file mode 100644 index 0000000000..afcff2ed1a --- /dev/null +++ b/demos/app-dir/app/should-not-serve-server/page.js @@ -0,0 +1,7 @@ +export default function ShouldNotServeServerDotJs(props) { + return ( + <> +

hello from app/should-not-serve-server

+ + ) +} diff --git a/demos/app-dir/app/slow-layout-and-page-with-loading/loading.js b/demos/app-dir/app/slow-layout-and-page-with-loading/loading.js new file mode 100644 index 0000000000..761425abaf --- /dev/null +++ b/demos/app-dir/app/slow-layout-and-page-with-loading/loading.js @@ -0,0 +1,3 @@ +export default function Loading() { + return

Loading layout...

+} diff --git a/demos/app-dir/app/slow-layout-and-page-with-loading/slow/layout.js b/demos/app-dir/app/slow-layout-and-page-with-loading/slow/layout.js new file mode 100644 index 0000000000..afcb0e2ec7 --- /dev/null +++ b/demos/app-dir/app/slow-layout-and-page-with-loading/slow/layout.js @@ -0,0 +1,19 @@ +import { experimental_use as use } from 'react' + +async function getData() { + await new Promise((resolve) => setTimeout(resolve, 1000)) + return { + message: 'hello from slow layout', + } +} + +export default function SlowLayout(props) { + const data = use(getData()) + + return ( + <> +

{data.message}

+ {props.children} + + ) +} diff --git a/demos/app-dir/app/slow-layout-and-page-with-loading/slow/loading.js b/demos/app-dir/app/slow-layout-and-page-with-loading/slow/loading.js new file mode 100644 index 0000000000..5aff44c61a --- /dev/null +++ b/demos/app-dir/app/slow-layout-and-page-with-loading/slow/loading.js @@ -0,0 +1,3 @@ +export default function Loading() { + return

Loading page...

+} diff --git a/demos/app-dir/app/slow-layout-and-page-with-loading/slow/page.js b/demos/app-dir/app/slow-layout-and-page-with-loading/slow/page.js new file mode 100644 index 0000000000..2e9d97f28a --- /dev/null +++ b/demos/app-dir/app/slow-layout-and-page-with-loading/slow/page.js @@ -0,0 +1,14 @@ +import { experimental_use as use } from 'react' + +async function getData() { + await new Promise((resolve) => setTimeout(resolve, 5000)) + return { + message: 'hello from slow page', + } +} + +export default function SlowPage(props) { + const data = use(getData()) + + return

{data.message}

+} diff --git a/demos/app-dir/app/slow-layout-with-loading/loading.js b/demos/app-dir/app/slow-layout-with-loading/loading.js new file mode 100644 index 0000000000..c39332b81d --- /dev/null +++ b/demos/app-dir/app/slow-layout-with-loading/loading.js @@ -0,0 +1,3 @@ +export default function Loading() { + return

Loading...

+} diff --git a/demos/app-dir/app/slow-layout-with-loading/slow/layout.js b/demos/app-dir/app/slow-layout-with-loading/slow/layout.js new file mode 100644 index 0000000000..7332df1c92 --- /dev/null +++ b/demos/app-dir/app/slow-layout-with-loading/slow/layout.js @@ -0,0 +1,19 @@ +import { experimental_use as use } from 'react' + +async function getData() { + await new Promise((resolve) => setTimeout(resolve, 5000)) + return { + message: 'hello from slow layout', + } +} + +export default function SlowLayout(props) { + const data = use(getData()) + + return ( + <> +

{data.message}

+ {props.children} + + ) +} diff --git a/demos/app-dir/app/slow-layout-with-loading/slow/page.js b/demos/app-dir/app/slow-layout-with-loading/slow/page.js new file mode 100644 index 0000000000..666f8f349c --- /dev/null +++ b/demos/app-dir/app/slow-layout-with-loading/slow/page.js @@ -0,0 +1,3 @@ +export default function Page() { + return

Hello World

+} diff --git a/demos/app-dir/app/slow-page-with-loading/loading.js b/demos/app-dir/app/slow-page-with-loading/loading.js new file mode 100644 index 0000000000..c39332b81d --- /dev/null +++ b/demos/app-dir/app/slow-page-with-loading/loading.js @@ -0,0 +1,3 @@ +export default function Loading() { + return

Loading...

+} diff --git a/demos/app-dir/app/slow-page-with-loading/page.js b/demos/app-dir/app/slow-page-with-loading/page.js new file mode 100644 index 0000000000..c92356c417 --- /dev/null +++ b/demos/app-dir/app/slow-page-with-loading/page.js @@ -0,0 +1,18 @@ +import { experimental_use as use } from 'react' + +async function getData() { + await new Promise((resolve) => setTimeout(resolve, 5000)) + return { + message: 'hello from slow page', + } +} + +export default function SlowPage(props) { + const data = use(getData()) + + return

{data.message}

+} + +export const config = { + runtime: 'experimental-edge', +} diff --git a/demos/app-dir/app/style.css b/demos/app-dir/app/style.css new file mode 100644 index 0000000000..3a94c07339 --- /dev/null +++ b/demos/app-dir/app/style.css @@ -0,0 +1,3 @@ +body { + font-size: large; +} diff --git a/demos/app-dir/app/template/clientcomponent/other/page.js b/demos/app-dir/app/template/clientcomponent/other/page.js new file mode 100644 index 0000000000..24c81bb719 --- /dev/null +++ b/demos/app-dir/app/template/clientcomponent/other/page.js @@ -0,0 +1,11 @@ +import Link from 'next/link' +export default function Page() { + return ( + <> +

Other Page

+ + To Page + + + ) +} diff --git a/demos/app-dir/app/template/clientcomponent/page.js b/demos/app-dir/app/template/clientcomponent/page.js new file mode 100644 index 0000000000..89378c7e29 --- /dev/null +++ b/demos/app-dir/app/template/clientcomponent/page.js @@ -0,0 +1,12 @@ +import Link from 'next/link' + +export default function Page() { + return ( + <> +

Page

+ + To Other + + + ) +} diff --git a/demos/app-dir/app/template/clientcomponent/template.js b/demos/app-dir/app/template/clientcomponent/template.js new file mode 100644 index 0000000000..1af2915391 --- /dev/null +++ b/demos/app-dir/app/template/clientcomponent/template.js @@ -0,0 +1,14 @@ +'client' + +import { useState } from 'react' + +export default function Template({ children }) { + const [count, setCount] = useState(0) + return ( + <> +

Template {count}

+ + {children} + + ) +} diff --git a/demos/app-dir/app/template/servercomponent/other/page.js b/demos/app-dir/app/template/servercomponent/other/page.js new file mode 100644 index 0000000000..2ed3a0fa15 --- /dev/null +++ b/demos/app-dir/app/template/servercomponent/other/page.js @@ -0,0 +1,11 @@ +import Link from 'next/link' +export default function Page() { + return ( + <> +

Other Page

+ + To Page + + + ) +} diff --git a/demos/app-dir/app/template/servercomponent/page.js b/demos/app-dir/app/template/servercomponent/page.js new file mode 100644 index 0000000000..27a7097ccd --- /dev/null +++ b/demos/app-dir/app/template/servercomponent/page.js @@ -0,0 +1,12 @@ +import Link from 'next/link' + +export default function Page() { + return ( + <> +

Page

+ + To Other + + + ) +} diff --git a/demos/app-dir/app/template/servercomponent/template.js b/demos/app-dir/app/template/servercomponent/template.js new file mode 100644 index 0000000000..c3dc5dadb9 --- /dev/null +++ b/demos/app-dir/app/template/servercomponent/template.js @@ -0,0 +1,10 @@ +export default function Template({ children }) { + return ( + <> +

+ Template {performance.now()} +

+ {children} + + ) +} diff --git a/demos/app-dir/app/test-page/page.js b/demos/app-dir/app/test-page/page.js new file mode 100644 index 0000000000..c1a34431df --- /dev/null +++ b/demos/app-dir/app/test-page/page.js @@ -0,0 +1,3 @@ +export default function Page() { + return

Page

+} diff --git a/demos/app-dir/app/with-id/page.js b/demos/app-dir/app/with-id/page.js new file mode 100644 index 0000000000..07beecc420 --- /dev/null +++ b/demos/app-dir/app/with-id/page.js @@ -0,0 +1,13 @@ +import Link from 'next/link' +import { nanoid } from 'nanoid' + +export default function Page() { + return ( + <> +

{nanoid()}

+ + To Navigation + + + ) +} diff --git a/demos/app-dir/middleware.js b/demos/app-dir/middleware.js new file mode 100644 index 0000000000..8057bba59b --- /dev/null +++ b/demos/app-dir/middleware.js @@ -0,0 +1,29 @@ +// @ts-check +import { NextResponse } from 'next/server' + +/** + * @param {import('next/server').NextRequest} request + * @returns {NextResponse | undefined} + */ +export function middleware(request) { + if (request.nextUrl.pathname === '/middleware-to-dashboard') { + return NextResponse.rewrite(new URL('/dashboard', request.url)) + } + + if (request.nextUrl.pathname === '/redirect-middleware-to-dashboard') { + return NextResponse.redirect(new URL('/dashboard', request.url)) + } + + if (request.nextUrl.pathname.startsWith('/internal/test')) { + const method = request.nextUrl.pathname.endsWith('rewrite') + ? 'rewrite' + : 'redirect' + + const internal = ['__flight__', '__flight_router_state_tree__'] + if (internal.some((name) => request.headers.has(name))) { + return NextResponse[method](new URL('/internal/failure', request.url)) + } + + return NextResponse[method](new URL('/internal/success', request.url)) + } +} diff --git a/demos/app-dir/netlify.toml b/demos/app-dir/netlify.toml new file mode 100644 index 0000000000..b7cafdfa31 --- /dev/null +++ b/demos/app-dir/netlify.toml @@ -0,0 +1,15 @@ +[build] +command = "next build" +publish = ".next" +ignore = "if [ $CACHED_COMMIT_REF == $COMMIT_REF ]; then (exit 1); else git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF ../..; fi;" + +[build.environment] +TERM = "xterm" +NODE_VERSION = "17" + +[[plugins]] +package = "../plugin-wrapper/" + +# This is a fake plugin, that makes it run npm install +[[plugins]] +package = "@netlify/plugin-local-install-core" diff --git a/demos/app-dir/next.config.js b/demos/app-dir/next.config.js new file mode 100644 index 0000000000..e16b7cc6f3 --- /dev/null +++ b/demos/app-dir/next.config.js @@ -0,0 +1,32 @@ +module.exports = { + eslint: { + ignoreDuringBuilds: true, + }, + experimental: { + appDir: true, + legacyBrowsers: false, + browsersListForSwc: true, + sri: { + algorithm: 'sha256', + }, + }, + rewrites: async () => { + return { + afterFiles: [ + { + source: '/rewritten-to-dashboard', + destination: '/dashboard', + }, + ], + } + }, + redirects: () => { + return [ + { + source: '/redirect/a', + destination: '/dashboard', + permanent: false, + }, + ] + }, +} diff --git a/demos/app-dir/package-lock.json b/demos/app-dir/package-lock.json new file mode 100644 index 0000000000..0941ba6f9d --- /dev/null +++ b/demos/app-dir/package-lock.json @@ -0,0 +1,634 @@ +{ + "name": "app-dir", + "version": "1.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "app-dir", + "version": "1.0.0", + "license": "MIT", + "dependencies": { + "nanoid": "^2.1.11", + "next": "^12.3.2-canary.7", + "react": "^0.0.0-experimental-d1bb1c586-20220922", + "react-dom": "^0.0.0-experimental-d1bb1c586-20220922" + } + }, + "node_modules/@next/env": { + "version": "12.3.2-canary.7", + "resolved": "https://registry.npmjs.org/@next/env/-/env-12.3.2-canary.7.tgz", + "integrity": "sha512-uk5yDvh8ra8PlIczZBTZKyt5Rf6a6mH2tGB3hwRAXD5hVLd74LzBQza2aYMEcDlRafAknsbL0dnqI3CkFYat9w==" + }, + "node_modules/@next/swc-android-arm-eabi": { + "version": "12.3.2-canary.7", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.3.2-canary.7.tgz", + "integrity": "sha512-pusM/ylasGBweiwhINtqWCgy5bOjLmIctFD0etpmh9+DqCg09yu58hJ1Dn/UTW8EbB1nkTP1z3dEoMKLh4fV2A==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-android-arm64": { + "version": "12.3.2-canary.7", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-12.3.2-canary.7.tgz", + "integrity": "sha512-x11T0ocPE9xrnqMeDzUMepN3P8CHIN8iiLgiFkbTbKTbSciuH3juOvKggJO9APZRG5Ch5eePWcCy2gHedAbhnA==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-darwin-arm64": { + "version": "12.3.2-canary.7", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.3.2-canary.7.tgz", + "integrity": "sha512-tcO9hDaMfcbiaZp1B+HZcLzGGs36dnmjQ0YXyn6C88HEUoKyxanYleVHtTmWHlgsxxjZdDd/RzOze1ycWs2oXw==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-darwin-x64": { + "version": "12.3.2-canary.7", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.3.2-canary.7.tgz", + "integrity": "sha512-WjAyU67zj69nRM2GNAnBLvghq4EHTyDzMO02GjG6yexVhDvkE0OFlvh0BQLI3DIOz+B3RjJRcW3OoHi8XzW9UA==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-freebsd-x64": { + "version": "12.3.2-canary.7", + "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.3.2-canary.7.tgz", + "integrity": "sha512-cQrdPCMhP1Mc+pIt16FlC5BVgcXzLXRlm7qZ7wBRKG6r/IIIn/qNRFgQQcB3iyvfNZo7lURLKcfsxNmMGclldQ==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-linux-arm-gnueabihf": { + "version": "12.3.2-canary.7", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.3.2-canary.7.tgz", + "integrity": "sha512-LEL+dUe10FhQHyXq9Mul5pOJwKDtrAylh9chktWf8eFr14j/YrfPbkLHv1+tCK8brDV3afVJMl0IpoCo75Yfyg==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-linux-arm64-gnu": { + "version": "12.3.2-canary.7", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.3.2-canary.7.tgz", + "integrity": "sha512-mbDqHk3C76UGIzkOv+G5NslKiSYIXyWQwbkuty0+0wLVJttWjWi2dMN7DFJQPMNvBefU9/vxVJdUnGVGEZfUXw==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-linux-arm64-musl": { + "version": "12.3.2-canary.7", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.3.2-canary.7.tgz", + "integrity": "sha512-gJ3VQHuqb3ABiOKPxfWAJQdO4mp3yNnWIAPN8n52F7Zu38udbHXvcbIylWfQW/Qah+RRf7P7y2txH2kC07QOPA==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-linux-x64-gnu": { + "version": "12.3.2-canary.7", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.3.2-canary.7.tgz", + "integrity": "sha512-/PBLiC+JfMJIzwMCQaSQgnLoIOjdSjTA9zarj2Kk1eCLjH8/VnsfBWtmP7TdbgIRYnZ8QKb4HXSOq94ZQS/fkw==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-linux-x64-musl": { + "version": "12.3.2-canary.7", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.3.2-canary.7.tgz", + "integrity": "sha512-Bf3goHoUd0SB58sVTMva0ByoLM+aEhm5YJRqsi7SsOAu9EAQwYfWgY2Hx60ah5i1N4ihYK0xjs8kwlfdDVOuow==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-win32-arm64-msvc": { + "version": "12.3.2-canary.7", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.3.2-canary.7.tgz", + "integrity": "sha512-aPRQ4dY5MuLgHCVdY+/Grgg4oX38pG4S0sT8mpatK3oIdjhj3961cj33QpPAy6dhhCs8m0/eCWYmM9KKlAAUsg==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-win32-ia32-msvc": { + "version": "12.3.2-canary.7", + "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.3.2-canary.7.tgz", + "integrity": "sha512-hr+TBDICVezyn0HDK4QootalbcuLj9F8qUzZZAw3gHz16rUDpqpnlRjw3RC99AzkKL7qMsdR/+SwnBlBY7ZK7Q==", + "cpu": [ + "ia32" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-win32-x64-msvc": { + "version": "12.3.2-canary.7", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.3.2-canary.7.tgz", + "integrity": "sha512-1n29b6meb54h/Mw/1xPoJB682nWbtEsUQo7rFJ6G44Nj3fYFXe+XOWQxWu6Sl8yvdBXcZRhRCHuAZGqYtmqorQ==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@swc/helpers": { + "version": "0.4.11", + "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.4.11.tgz", + "integrity": "sha512-rEUrBSGIoSFuYxwBYtlUFMlE2CwGhmW+w9355/5oduSw8e5h2+Tj4UrAGNNgP9915++wj5vkQo0UuOBqOAq4nw==", + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001410", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001410.tgz", + "integrity": "sha512-QoblBnuE+rG0lc3Ur9ltP5q47lbguipa/ncNMyyGuqPk44FxbScWAeEO+k5fSQ8WekdAK4mWqNs1rADDAiN5xQ==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + } + ] + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" + }, + "node_modules/loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "dependencies": { + "js-tokens": "^3.0.0 || ^4.0.0" + }, + "bin": { + "loose-envify": "cli.js" + } + }, + "node_modules/nanoid": { + "version": "2.1.11", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-2.1.11.tgz", + "integrity": "sha512-s/snB+WGm6uwi0WjsZdaVcuf3KJXlfGl2LcxgwkEwJF0D/BWzVWAZW/XY4bFaiR7s0Jk3FPvlnepg1H1b1UwlA==" + }, + "node_modules/next": { + "version": "12.3.2-canary.7", + "resolved": "https://registry.npmjs.org/next/-/next-12.3.2-canary.7.tgz", + "integrity": "sha512-zUosveWzpeRVy7j4ANoJ4gu0TBrkLYwPlIUEXrqqs/zLpHMu+tanxA1R1ts2d7h/2dSmeVZgGcHiVcHj5uspEA==", + "dependencies": { + "@next/env": "12.3.2-canary.7", + "@swc/helpers": "0.4.11", + "caniuse-lite": "^1.0.30001406", + "postcss": "8.4.14", + "styled-jsx": "5.0.7", + "use-sync-external-store": "1.2.0" + }, + "bin": { + "next": "dist/bin/next" + }, + "engines": { + "node": ">=12.22.0" + }, + "optionalDependencies": { + "@next/swc-android-arm-eabi": "12.3.2-canary.7", + "@next/swc-android-arm64": "12.3.2-canary.7", + "@next/swc-darwin-arm64": "12.3.2-canary.7", + "@next/swc-darwin-x64": "12.3.2-canary.7", + "@next/swc-freebsd-x64": "12.3.2-canary.7", + "@next/swc-linux-arm-gnueabihf": "12.3.2-canary.7", + "@next/swc-linux-arm64-gnu": "12.3.2-canary.7", + "@next/swc-linux-arm64-musl": "12.3.2-canary.7", + "@next/swc-linux-x64-gnu": "12.3.2-canary.7", + "@next/swc-linux-x64-musl": "12.3.2-canary.7", + "@next/swc-win32-arm64-msvc": "12.3.2-canary.7", + "@next/swc-win32-ia32-msvc": "12.3.2-canary.7", + "@next/swc-win32-x64-msvc": "12.3.2-canary.7" + }, + "peerDependencies": { + "fibers": ">= 3.1.0", + "node-sass": "^6.0.0 || ^7.0.0", + "react": "^17.0.2 || ^18.0.0-0", + "react-dom": "^17.0.2 || ^18.0.0-0", + "sass": "^1.3.0" + }, + "peerDependenciesMeta": { + "fibers": { + "optional": true + }, + "node-sass": { + "optional": true + }, + "sass": { + "optional": true + } + } + }, + "node_modules/picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" + }, + "node_modules/postcss": { + "version": "8.4.14", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.14.tgz", + "integrity": "sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + } + ], + "dependencies": { + "nanoid": "^3.3.4", + "picocolors": "^1.0.0", + "source-map-js": "^1.0.2" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/postcss/node_modules/nanoid": { + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz", + "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/react": { + "version": "0.0.0-experimental-d1bb1c586-20220922", + "resolved": "https://registry.npmjs.org/react/-/react-0.0.0-experimental-d1bb1c586-20220922.tgz", + "integrity": "sha512-aFOawqqDYFCR/U8BkgZxJxhmA6Y7jh+kW1Ppu7GegWYa0D/3kDqN8oTQchox3D9xJvn3+3bFsAVd/imHVuMUzQ==", + "dependencies": { + "loose-envify": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-dom": { + "version": "0.0.0-experimental-d1bb1c586-20220922", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-0.0.0-experimental-d1bb1c586-20220922.tgz", + "integrity": "sha512-GhgCgS11VYg7yfnGj0tvRo1G+CHHyEWnvLbfxhB29CMDpDzo2SM1UKbh2urklnF56m8AS8QBj5tjLtkLtovgGg==", + "dependencies": { + "loose-envify": "^1.1.0", + "scheduler": "0.0.0-experimental-d1bb1c586-20220922" + }, + "peerDependencies": { + "react": "0.0.0-experimental-d1bb1c586-20220922" + } + }, + "node_modules/scheduler": { + "version": "0.0.0-experimental-d1bb1c586-20220922", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.0.0-experimental-d1bb1c586-20220922.tgz", + "integrity": "sha512-2TpBDk+haQkt2hyaJAnJ9dLdQqbMDxP4ay7C/RgvxVlZ9LWjPi1gjhOPsIcbvt64PUjHsI3lYuMoxKGwcMtxjw==", + "dependencies": { + "loose-envify": "^1.1.0" + } + }, + "node_modules/source-map-js": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", + "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/styled-jsx": { + "version": "5.0.7", + "resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.0.7.tgz", + "integrity": "sha512-b3sUzamS086YLRuvnaDigdAewz1/EFYlHpYBP5mZovKEdQQOIIYq8lApylub3HHZ6xFjV051kkGU7cudJmrXEA==", + "engines": { + "node": ">= 12.0.0" + }, + "peerDependencies": { + "react": ">= 16.8.0 || 17.x.x || ^18.0.0-0" + }, + "peerDependenciesMeta": { + "@babel/core": { + "optional": true + }, + "babel-plugin-macros": { + "optional": true + } + } + }, + "node_modules/tslib": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", + "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" + }, + "node_modules/use-sync-external-store": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz", + "integrity": "sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==", + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + } + } + }, + "dependencies": { + "@next/env": { + "version": "12.3.2-canary.7", + "resolved": "https://registry.npmjs.org/@next/env/-/env-12.3.2-canary.7.tgz", + "integrity": "sha512-uk5yDvh8ra8PlIczZBTZKyt5Rf6a6mH2tGB3hwRAXD5hVLd74LzBQza2aYMEcDlRafAknsbL0dnqI3CkFYat9w==" + }, + "@next/swc-android-arm-eabi": { + "version": "12.3.2-canary.7", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.3.2-canary.7.tgz", + "integrity": "sha512-pusM/ylasGBweiwhINtqWCgy5bOjLmIctFD0etpmh9+DqCg09yu58hJ1Dn/UTW8EbB1nkTP1z3dEoMKLh4fV2A==", + "optional": true + }, + "@next/swc-android-arm64": { + "version": "12.3.2-canary.7", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-12.3.2-canary.7.tgz", + "integrity": "sha512-x11T0ocPE9xrnqMeDzUMepN3P8CHIN8iiLgiFkbTbKTbSciuH3juOvKggJO9APZRG5Ch5eePWcCy2gHedAbhnA==", + "optional": true + }, + "@next/swc-darwin-arm64": { + "version": "12.3.2-canary.7", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.3.2-canary.7.tgz", + "integrity": "sha512-tcO9hDaMfcbiaZp1B+HZcLzGGs36dnmjQ0YXyn6C88HEUoKyxanYleVHtTmWHlgsxxjZdDd/RzOze1ycWs2oXw==", + "optional": true + }, + "@next/swc-darwin-x64": { + "version": "12.3.2-canary.7", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.3.2-canary.7.tgz", + "integrity": "sha512-WjAyU67zj69nRM2GNAnBLvghq4EHTyDzMO02GjG6yexVhDvkE0OFlvh0BQLI3DIOz+B3RjJRcW3OoHi8XzW9UA==", + "optional": true + }, + "@next/swc-freebsd-x64": { + "version": "12.3.2-canary.7", + "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.3.2-canary.7.tgz", + "integrity": "sha512-cQrdPCMhP1Mc+pIt16FlC5BVgcXzLXRlm7qZ7wBRKG6r/IIIn/qNRFgQQcB3iyvfNZo7lURLKcfsxNmMGclldQ==", + "optional": true + }, + "@next/swc-linux-arm-gnueabihf": { + "version": "12.3.2-canary.7", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.3.2-canary.7.tgz", + "integrity": "sha512-LEL+dUe10FhQHyXq9Mul5pOJwKDtrAylh9chktWf8eFr14j/YrfPbkLHv1+tCK8brDV3afVJMl0IpoCo75Yfyg==", + "optional": true + }, + "@next/swc-linux-arm64-gnu": { + "version": "12.3.2-canary.7", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.3.2-canary.7.tgz", + "integrity": "sha512-mbDqHk3C76UGIzkOv+G5NslKiSYIXyWQwbkuty0+0wLVJttWjWi2dMN7DFJQPMNvBefU9/vxVJdUnGVGEZfUXw==", + "optional": true + }, + "@next/swc-linux-arm64-musl": { + "version": "12.3.2-canary.7", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.3.2-canary.7.tgz", + "integrity": "sha512-gJ3VQHuqb3ABiOKPxfWAJQdO4mp3yNnWIAPN8n52F7Zu38udbHXvcbIylWfQW/Qah+RRf7P7y2txH2kC07QOPA==", + "optional": true + }, + "@next/swc-linux-x64-gnu": { + "version": "12.3.2-canary.7", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.3.2-canary.7.tgz", + "integrity": "sha512-/PBLiC+JfMJIzwMCQaSQgnLoIOjdSjTA9zarj2Kk1eCLjH8/VnsfBWtmP7TdbgIRYnZ8QKb4HXSOq94ZQS/fkw==", + "optional": true + }, + "@next/swc-linux-x64-musl": { + "version": "12.3.2-canary.7", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.3.2-canary.7.tgz", + "integrity": "sha512-Bf3goHoUd0SB58sVTMva0ByoLM+aEhm5YJRqsi7SsOAu9EAQwYfWgY2Hx60ah5i1N4ihYK0xjs8kwlfdDVOuow==", + "optional": true + }, + "@next/swc-win32-arm64-msvc": { + "version": "12.3.2-canary.7", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.3.2-canary.7.tgz", + "integrity": "sha512-aPRQ4dY5MuLgHCVdY+/Grgg4oX38pG4S0sT8mpatK3oIdjhj3961cj33QpPAy6dhhCs8m0/eCWYmM9KKlAAUsg==", + "optional": true + }, + "@next/swc-win32-ia32-msvc": { + "version": "12.3.2-canary.7", + "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.3.2-canary.7.tgz", + "integrity": "sha512-hr+TBDICVezyn0HDK4QootalbcuLj9F8qUzZZAw3gHz16rUDpqpnlRjw3RC99AzkKL7qMsdR/+SwnBlBY7ZK7Q==", + "optional": true + }, + "@next/swc-win32-x64-msvc": { + "version": "12.3.2-canary.7", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.3.2-canary.7.tgz", + "integrity": "sha512-1n29b6meb54h/Mw/1xPoJB682nWbtEsUQo7rFJ6G44Nj3fYFXe+XOWQxWu6Sl8yvdBXcZRhRCHuAZGqYtmqorQ==", + "optional": true + }, + "@swc/helpers": { + "version": "0.4.11", + "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.4.11.tgz", + "integrity": "sha512-rEUrBSGIoSFuYxwBYtlUFMlE2CwGhmW+w9355/5oduSw8e5h2+Tj4UrAGNNgP9915++wj5vkQo0UuOBqOAq4nw==", + "requires": { + "tslib": "^2.4.0" + } + }, + "caniuse-lite": { + "version": "1.0.30001410", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001410.tgz", + "integrity": "sha512-QoblBnuE+rG0lc3Ur9ltP5q47lbguipa/ncNMyyGuqPk44FxbScWAeEO+k5fSQ8WekdAK4mWqNs1rADDAiN5xQ==" + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" + }, + "loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "requires": { + "js-tokens": "^3.0.0 || ^4.0.0" + } + }, + "nanoid": { + "version": "2.1.11", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-2.1.11.tgz", + "integrity": "sha512-s/snB+WGm6uwi0WjsZdaVcuf3KJXlfGl2LcxgwkEwJF0D/BWzVWAZW/XY4bFaiR7s0Jk3FPvlnepg1H1b1UwlA==" + }, + "next": { + "version": "12.3.2-canary.7", + "resolved": "https://registry.npmjs.org/next/-/next-12.3.2-canary.7.tgz", + "integrity": "sha512-zUosveWzpeRVy7j4ANoJ4gu0TBrkLYwPlIUEXrqqs/zLpHMu+tanxA1R1ts2d7h/2dSmeVZgGcHiVcHj5uspEA==", + "requires": { + "@next/env": "12.3.2-canary.7", + "@next/swc-android-arm-eabi": "12.3.2-canary.7", + "@next/swc-android-arm64": "12.3.2-canary.7", + "@next/swc-darwin-arm64": "12.3.2-canary.7", + "@next/swc-darwin-x64": "12.3.2-canary.7", + "@next/swc-freebsd-x64": "12.3.2-canary.7", + "@next/swc-linux-arm-gnueabihf": "12.3.2-canary.7", + "@next/swc-linux-arm64-gnu": "12.3.2-canary.7", + "@next/swc-linux-arm64-musl": "12.3.2-canary.7", + "@next/swc-linux-x64-gnu": "12.3.2-canary.7", + "@next/swc-linux-x64-musl": "12.3.2-canary.7", + "@next/swc-win32-arm64-msvc": "12.3.2-canary.7", + "@next/swc-win32-ia32-msvc": "12.3.2-canary.7", + "@next/swc-win32-x64-msvc": "12.3.2-canary.7", + "@swc/helpers": "0.4.11", + "caniuse-lite": "^1.0.30001406", + "postcss": "8.4.14", + "styled-jsx": "5.0.7", + "use-sync-external-store": "1.2.0" + } + }, + "picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" + }, + "postcss": { + "version": "8.4.14", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.14.tgz", + "integrity": "sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig==", + "requires": { + "nanoid": "^3.3.4", + "picocolors": "^1.0.0", + "source-map-js": "^1.0.2" + }, + "dependencies": { + "nanoid": { + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz", + "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==" + } + } + }, + "react": { + "version": "0.0.0-experimental-d1bb1c586-20220922", + "resolved": "https://registry.npmjs.org/react/-/react-0.0.0-experimental-d1bb1c586-20220922.tgz", + "integrity": "sha512-aFOawqqDYFCR/U8BkgZxJxhmA6Y7jh+kW1Ppu7GegWYa0D/3kDqN8oTQchox3D9xJvn3+3bFsAVd/imHVuMUzQ==", + "requires": { + "loose-envify": "^1.1.0" + } + }, + "react-dom": { + "version": "0.0.0-experimental-d1bb1c586-20220922", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-0.0.0-experimental-d1bb1c586-20220922.tgz", + "integrity": "sha512-GhgCgS11VYg7yfnGj0tvRo1G+CHHyEWnvLbfxhB29CMDpDzo2SM1UKbh2urklnF56m8AS8QBj5tjLtkLtovgGg==", + "requires": { + "loose-envify": "^1.1.0", + "scheduler": "0.0.0-experimental-d1bb1c586-20220922" + } + }, + "scheduler": { + "version": "0.0.0-experimental-d1bb1c586-20220922", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.0.0-experimental-d1bb1c586-20220922.tgz", + "integrity": "sha512-2TpBDk+haQkt2hyaJAnJ9dLdQqbMDxP4ay7C/RgvxVlZ9LWjPi1gjhOPsIcbvt64PUjHsI3lYuMoxKGwcMtxjw==", + "requires": { + "loose-envify": "^1.1.0" + } + }, + "source-map-js": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", + "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==" + }, + "styled-jsx": { + "version": "5.0.7", + "resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.0.7.tgz", + "integrity": "sha512-b3sUzamS086YLRuvnaDigdAewz1/EFYlHpYBP5mZovKEdQQOIIYq8lApylub3HHZ6xFjV051kkGU7cudJmrXEA==" + }, + "tslib": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", + "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" + }, + "use-sync-external-store": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz", + "integrity": "sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==" + } + } +} diff --git a/demos/app-dir/package.json b/demos/app-dir/package.json new file mode 100644 index 0000000000..9924f321fc --- /dev/null +++ b/demos/app-dir/package.json @@ -0,0 +1,16 @@ +{ + "name": "app-dir", + "version": "1.0.0", + "description": "", + "scripts": { + "build": "next build" + }, + "author": "", + "license": "MIT", + "dependencies": { + "nanoid": "^2.1.11", + "next": "^12.3.2-canary.7", + "react": "^0.0.0-experimental-d1bb1c586-20220922", + "react-dom": "^0.0.0-experimental-d1bb1c586-20220922" + } +} diff --git a/demos/app-dir/pages/api/hello.js b/demos/app-dir/pages/api/hello.js new file mode 100644 index 0000000000..47779ec1fa --- /dev/null +++ b/demos/app-dir/pages/api/hello.js @@ -0,0 +1,7 @@ +export default function api(req) { + return new Response('hello') +} + +export const config = { + runtime: 'experimental-edge', +} diff --git a/demos/app-dir/pages/api/preview.js b/demos/app-dir/pages/api/preview.js new file mode 100644 index 0000000000..5b4890a34a --- /dev/null +++ b/demos/app-dir/pages/api/preview.js @@ -0,0 +1,4 @@ +export default function handler(req, res) { + res.setPreviewData({ key: 'value' }) + res.status(200).end() +} diff --git a/demos/app-dir/pages/app-linking.js b/demos/app-dir/pages/app-linking.js new file mode 100644 index 0000000000..0a8e0289af --- /dev/null +++ b/demos/app-dir/pages/app-linking.js @@ -0,0 +1,9 @@ +import Link from 'next/link' + +export default function Page(props) { + return ( + + To App Page + + ) +} diff --git a/demos/app-dir/pages/blog/[slug].js b/demos/app-dir/pages/blog/[slug].js new file mode 100644 index 0000000000..c504e8e49f --- /dev/null +++ b/demos/app-dir/pages/blog/[slug].js @@ -0,0 +1,7 @@ +export default function Page(props) { + return ( + <> +

hello from pages/blog/[slug]

+ + ) +} diff --git a/demos/app-dir/pages/index.js b/demos/app-dir/pages/index.js new file mode 100644 index 0000000000..dd991a34e3 --- /dev/null +++ b/demos/app-dir/pages/index.js @@ -0,0 +1,11 @@ +import Link from 'next/link' +import styles from '../styles/shared.module.css' + +export default function Page(props) { + return ( + <> +

hello from pages/index

+ Dashboard + + ) +} diff --git a/demos/app-dir/public/hello.txt b/demos/app-dir/public/hello.txt new file mode 100644 index 0000000000..95d09f2b10 --- /dev/null +++ b/demos/app-dir/public/hello.txt @@ -0,0 +1 @@ +hello world \ No newline at end of file diff --git a/demos/app-dir/styles/global.css b/demos/app-dir/styles/global.css new file mode 100644 index 0000000000..81d40c07d0 --- /dev/null +++ b/demos/app-dir/styles/global.css @@ -0,0 +1,3 @@ +.bold { + font-weight: bold; +} diff --git a/demos/app-dir/styles/shared.module.css b/demos/app-dir/styles/shared.module.css new file mode 100644 index 0000000000..dccdb6cb67 --- /dev/null +++ b/demos/app-dir/styles/shared.module.css @@ -0,0 +1,3 @@ +.content { + color: blueviolet; +} diff --git a/package-lock.json b/package-lock.json index 01f752b805..36fb2edb11 100644 --- a/package-lock.json +++ b/package-lock.json @@ -60,6 +60,17 @@ "node": ">=16.0.0" } }, + "demos/app-dir": { + "version": "1.0.0", + "extraneous": true, + "license": "MIT", + "dependencies": { + "nanoid": "^2.1.11", + "next": "^12.3.2-canary.7", + "react": "^0.0.0-experimental-d1bb1c586-20220922", + "react-dom": "^0.0.0-experimental-d1bb1c586-20220922" + } + }, "demos/base-path": { "name": "base-path-demo", "version": "1.0.0", @@ -4863,9 +4874,9 @@ } }, "node_modules/@next/env": { - "version": "12.3.0", - "resolved": "https://registry.npmjs.org/@next/env/-/env-12.3.0.tgz", - "integrity": "sha512-PTJpjAFVbzBQ9xXpzMTroShvD5YDIIy46jQ7d4LrWpY+/5a8H90Tm8hE3Hvkc5RBRspVo7kvEOnqQms0A+2Q6w==" + "version": "12.3.1", + "resolved": "https://registry.npmjs.org/@next/env/-/env-12.3.1.tgz", + "integrity": "sha512-9P9THmRFVKGKt9DYqeC2aKIxm8rlvkK38V1P1sRE7qyoPBIs8l9oo79QoSdPtOWfzkbDAVUqvbQGgTMsb8BtJg==" }, "node_modules/@next/eslint-plugin-next": { "version": "12.2.4", @@ -4909,9 +4920,9 @@ } }, "node_modules/@next/swc-android-arm-eabi": { - "version": "12.3.0", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.3.0.tgz", - "integrity": "sha512-/PuirPnAKsYBw93w/7Q9hqy+KGOU9mjYprZ/faxMUJh/dc6v3rYLxkZKNG9nFPIW4QKNTCnhP40xF9hLnxO+xg==", + "version": "12.3.1", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.3.1.tgz", + "integrity": "sha512-i+BvKA8tB//srVPPQxIQN5lvfROcfv4OB23/L1nXznP+N/TyKL8lql3l7oo2LNhnH66zWhfoemg3Q4VJZSruzQ==", "cpu": [ "arm" ], @@ -4924,9 +4935,9 @@ } }, "node_modules/@next/swc-android-arm64": { - "version": "12.3.0", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-12.3.0.tgz", - "integrity": "sha512-OaI+FhAM6P9B6Ybwbn0Zl8YwWido0lLwhDBi9WiYCh4RQmIXAyVIoIJPHo4fP05+mXaJ/k1trvDvuURvHOq2qw==", + "version": "12.3.1", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-12.3.1.tgz", + "integrity": "sha512-CmgU2ZNyBP0rkugOOqLnjl3+eRpXBzB/I2sjwcGZ7/Z6RcUJXK5Evz+N0ucOxqE4cZ3gkTeXtSzRrMK2mGYV8Q==", "cpu": [ "arm64" ], @@ -4939,9 +4950,9 @@ } }, "node_modules/@next/swc-darwin-arm64": { - "version": "12.3.0", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.3.0.tgz", - "integrity": "sha512-9s4d3Mhii+WFce8o8Jok7WC3Bawkr9wEUU++SJRptjU1L5tsfYJMrSYCACHLhZujziNDLyExe4Hwwsccps1sfg==", + "version": "12.3.1", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.3.1.tgz", + "integrity": "sha512-hT/EBGNcu0ITiuWDYU9ur57Oa4LybD5DOQp4f22T6zLfpoBMfBibPtR8XktXmOyFHrL/6FC2p9ojdLZhWhvBHg==", "cpu": [ "arm64" ], @@ -4954,9 +4965,9 @@ } }, "node_modules/@next/swc-darwin-x64": { - "version": "12.3.0", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.3.0.tgz", - "integrity": "sha512-2scC4MqUTwGwok+wpVxP+zWp7WcCAVOtutki2E1n99rBOTnUOX6qXkgxSy083yBN6GqwuC/dzHeN7hIKjavfRA==", + "version": "12.3.1", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.3.1.tgz", + "integrity": "sha512-9S6EVueCVCyGf2vuiLiGEHZCJcPAxglyckTZcEwLdJwozLqN0gtS0Eq0bQlGS3dH49Py/rQYpZ3KVWZ9BUf/WA==", "cpu": [ "x64" ], @@ -4969,9 +4980,9 @@ } }, "node_modules/@next/swc-freebsd-x64": { - "version": "12.3.0", - "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.3.0.tgz", - "integrity": "sha512-xAlruUREij/bFa+qsE1tmsP28t7vz02N4ZDHt2lh3uJUniE0Ne9idyIDLc1Ed0IF2RjfgOp4ZVunuS3OM0sngw==", + "version": "12.3.1", + "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.3.1.tgz", + "integrity": "sha512-qcuUQkaBZWqzM0F1N4AkAh88lLzzpfE6ImOcI1P6YeyJSsBmpBIV8o70zV+Wxpc26yV9vpzb+e5gCyxNjKJg5Q==", "cpu": [ "x64" ], @@ -4984,9 +4995,9 @@ } }, "node_modules/@next/swc-linux-arm-gnueabihf": { - "version": "12.3.0", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.3.0.tgz", - "integrity": "sha512-jin2S4VT/cugc2dSZEUIabhYDJNgrUh7fufbdsaAezgcQzqfdfJqfxl4E9GuafzB4cbRPTaqA0V5uqbp0IyGkQ==", + "version": "12.3.1", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.3.1.tgz", + "integrity": "sha512-diL9MSYrEI5nY2wc/h/DBewEDUzr/DqBjIgHJ3RUNtETAOB3spMNHvJk2XKUDjnQuluLmFMloet9tpEqU2TT9w==", "cpu": [ "arm" ], @@ -4999,9 +5010,9 @@ } }, "node_modules/@next/swc-linux-arm64-gnu": { - "version": "12.3.0", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.3.0.tgz", - "integrity": "sha512-RqJHDKe0WImeUrdR0kayTkRWgp4vD/MS7g0r6Xuf8+ellOFH7JAAJffDW3ayuVZeMYOa7RvgNFcOoWnrTUl9Nw==", + "version": "12.3.1", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.3.1.tgz", + "integrity": "sha512-o/xB2nztoaC7jnXU3Q36vGgOolJpsGG8ETNjxM1VAPxRwM7FyGCPHOMk1XavG88QZSQf+1r+POBW0tLxQOJ9DQ==", "cpu": [ "arm64" ], @@ -5014,9 +5025,9 @@ } }, "node_modules/@next/swc-linux-arm64-musl": { - "version": "12.3.0", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.3.0.tgz", - "integrity": "sha512-nvNWoUieMjvDjpYJ/4SQe9lQs2xMj6ZRs8N+bmTrVu9leY2Fg3WD6W9p/1uU9hGO8u+OdF13wc4iRShu/WYIHg==", + "version": "12.3.1", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.3.1.tgz", + "integrity": "sha512-2WEasRxJzgAmP43glFNhADpe8zB7kJofhEAVNbDJZANp+H4+wq+/cW1CdDi8DqjkShPEA6/ejJw+xnEyDID2jg==", "cpu": [ "arm64" ], @@ -5029,9 +5040,9 @@ } }, "node_modules/@next/swc-linux-x64-gnu": { - "version": "12.3.0", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.3.0.tgz", - "integrity": "sha512-4ajhIuVU9PeQCMMhdDgZTLrHmjbOUFuIyg6J19hZqwEwDTSqQyrSLkbJs2Nd7IRiM6Ul/XyrtEFCpk4k+xD2+w==", + "version": "12.3.1", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.3.1.tgz", + "integrity": "sha512-JWEaMyvNrXuM3dyy9Pp5cFPuSSvG82+yABqsWugjWlvfmnlnx9HOQZY23bFq3cNghy5V/t0iPb6cffzRWylgsA==", "cpu": [ "x64" ], @@ -5044,9 +5055,9 @@ } }, "node_modules/@next/swc-linux-x64-musl": { - "version": "12.3.0", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.3.0.tgz", - "integrity": "sha512-U092RBYbaGxoMAwpauePJEu2PuZSEoUCGJBvsptQr2/2XIMwAJDYM4c/M5NfYEsBr+yjvsYNsOpYfeQ88D82Yg==", + "version": "12.3.1", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.3.1.tgz", + "integrity": "sha512-xoEWQQ71waWc4BZcOjmatuvPUXKTv6MbIFzpm4LFeCHsg2iwai0ILmNXf81rJR+L1Wb9ifEke2sQpZSPNz1Iyg==", "cpu": [ "x64" ], @@ -5059,9 +5070,9 @@ } }, "node_modules/@next/swc-win32-arm64-msvc": { - "version": "12.3.0", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.3.0.tgz", - "integrity": "sha512-pzSzaxjDEJe67bUok9Nxf9rykbJfHXW0owICFsPBsqHyc+cr8vpF7g9e2APTCddtVhvjkga9ILoZJ9NxWS7Yiw==", + "version": "12.3.1", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.3.1.tgz", + "integrity": "sha512-hswVFYQYIeGHE2JYaBVtvqmBQ1CppplQbZJS/JgrVI3x2CurNhEkmds/yqvDONfwfbttTtH4+q9Dzf/WVl3Opw==", "cpu": [ "arm64" ], @@ -5074,9 +5085,9 @@ } }, "node_modules/@next/swc-win32-ia32-msvc": { - "version": "12.3.0", - "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.3.0.tgz", - "integrity": "sha512-MQGUpMbYhQmTZ06a9e0hPQJnxFMwETo2WtyAotY3GEzbNCQVbCGhsvqEKcl+ZEHgShlHXUWvSffq1ZscY6gK7A==", + "version": "12.3.1", + "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.3.1.tgz", + "integrity": "sha512-Kny5JBehkTbKPmqulr5i+iKntO5YMP+bVM8Hf8UAmjSMVo3wehyLVc9IZkNmcbxi+vwETnQvJaT5ynYBkJ9dWA==", "cpu": [ "ia32" ], @@ -5089,9 +5100,9 @@ } }, "node_modules/@next/swc-win32-x64-msvc": { - "version": "12.3.0", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.3.0.tgz", - "integrity": "sha512-C/nw6OgQpEULWqs+wgMHXGvlJLguPRFFGqR2TAqWBerQ8J+Sg3z1ZTqwelkSi4FoqStGuZ2UdFHIDN1ySmR1xA==", + "version": "12.3.1", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.3.1.tgz", + "integrity": "sha512-W1ijvzzg+kPEX6LAc+50EYYSEo0FVu7dmTE+t+DM4iOLqgGHoW9uYSz9wCVdkXOEEMP9xhXfGpcSxsfDucyPkA==", "cpu": [ "x64" ], @@ -7317,9 +7328,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001332", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001332.tgz", - "integrity": "sha512-10T30NYOEQtN6C11YGg411yebhvpnC6Z102+B95eAsN0oB6KUs01ivE8u+G6FMIRtIrVlYXhL+LUwQ3/hXwDWw==", + "version": "1.0.30001410", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001410.tgz", + "integrity": "sha512-QoblBnuE+rG0lc3Ur9ltP5q47lbguipa/ncNMyyGuqPk44FxbScWAeEO+k5fSQ8WekdAK4mWqNs1rADDAiN5xQ==", "funding": [ { "type": "opencollective", @@ -17204,15 +17215,15 @@ } }, "node_modules/next": { - "version": "12.3.0", - "resolved": "https://registry.npmjs.org/next/-/next-12.3.0.tgz", - "integrity": "sha512-GpzI6me9V1+XYtfK0Ae9WD0mKqHyzQlGq1xH1rzNIYMASo4Tkl4rTe9jSqtBpXFhOS33KohXs9ZY38Akkhdciw==", + "version": "12.3.1", + "resolved": "https://registry.npmjs.org/next/-/next-12.3.1.tgz", + "integrity": "sha512-l7bvmSeIwX5lp07WtIiP9u2ytZMv7jIeB8iacR28PuUEFG5j0HGAPnMqyG5kbZNBG2H7tRsrQ4HCjuMOPnANZw==", "dependencies": { - "@next/env": "12.3.0", + "@next/env": "12.3.1", "@swc/helpers": "0.4.11", - "caniuse-lite": "^1.0.30001332", + "caniuse-lite": "^1.0.30001406", "postcss": "8.4.14", - "styled-jsx": "5.0.6", + "styled-jsx": "5.0.7", "use-sync-external-store": "1.2.0" }, "bin": { @@ -17222,19 +17233,19 @@ "node": ">=12.22.0" }, "optionalDependencies": { - "@next/swc-android-arm-eabi": "12.3.0", - "@next/swc-android-arm64": "12.3.0", - "@next/swc-darwin-arm64": "12.3.0", - "@next/swc-darwin-x64": "12.3.0", - "@next/swc-freebsd-x64": "12.3.0", - "@next/swc-linux-arm-gnueabihf": "12.3.0", - "@next/swc-linux-arm64-gnu": "12.3.0", - "@next/swc-linux-arm64-musl": "12.3.0", - "@next/swc-linux-x64-gnu": "12.3.0", - "@next/swc-linux-x64-musl": "12.3.0", - "@next/swc-win32-arm64-msvc": "12.3.0", - "@next/swc-win32-ia32-msvc": "12.3.0", - "@next/swc-win32-x64-msvc": "12.3.0" + "@next/swc-android-arm-eabi": "12.3.1", + "@next/swc-android-arm64": "12.3.1", + "@next/swc-darwin-arm64": "12.3.1", + "@next/swc-darwin-x64": "12.3.1", + "@next/swc-freebsd-x64": "12.3.1", + "@next/swc-linux-arm-gnueabihf": "12.3.1", + "@next/swc-linux-arm64-gnu": "12.3.1", + "@next/swc-linux-arm64-musl": "12.3.1", + "@next/swc-linux-x64-gnu": "12.3.1", + "@next/swc-linux-x64-musl": "12.3.1", + "@next/swc-win32-arm64-msvc": "12.3.1", + "@next/swc-win32-ia32-msvc": "12.3.1", + "@next/swc-win32-x64-msvc": "12.3.1" }, "peerDependencies": { "fibers": ">= 3.1.0", @@ -21463,9 +21474,9 @@ } }, "node_modules/styled-jsx": { - "version": "5.0.6", - "resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.0.6.tgz", - "integrity": "sha512-xOeROtkK5MGMDimBQ3J6iPId8q0t/BDoG5XN6oKkZClVz9ISF/hihN8OCn2LggMU6N32aXnrXBdn3auSqNS9fA==", + "version": "5.0.7", + "resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.0.7.tgz", + "integrity": "sha512-b3sUzamS086YLRuvnaDigdAewz1/EFYlHpYBP5mZovKEdQQOIIYq8lApylub3HHZ6xFjV051kkGU7cudJmrXEA==", "engines": { "node": ">= 12.0.0" }, @@ -26559,9 +26570,9 @@ } }, "@next/env": { - "version": "12.3.0", - "resolved": "https://registry.npmjs.org/@next/env/-/env-12.3.0.tgz", - "integrity": "sha512-PTJpjAFVbzBQ9xXpzMTroShvD5YDIIy46jQ7d4LrWpY+/5a8H90Tm8hE3Hvkc5RBRspVo7kvEOnqQms0A+2Q6w==" + "version": "12.3.1", + "resolved": "https://registry.npmjs.org/@next/env/-/env-12.3.1.tgz", + "integrity": "sha512-9P9THmRFVKGKt9DYqeC2aKIxm8rlvkK38V1P1sRE7qyoPBIs8l9oo79QoSdPtOWfzkbDAVUqvbQGgTMsb8BtJg==" }, "@next/eslint-plugin-next": { "version": "12.2.4", @@ -26598,81 +26609,81 @@ } }, "@next/swc-android-arm-eabi": { - "version": "12.3.0", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.3.0.tgz", - "integrity": "sha512-/PuirPnAKsYBw93w/7Q9hqy+KGOU9mjYprZ/faxMUJh/dc6v3rYLxkZKNG9nFPIW4QKNTCnhP40xF9hLnxO+xg==", + "version": "12.3.1", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.3.1.tgz", + "integrity": "sha512-i+BvKA8tB//srVPPQxIQN5lvfROcfv4OB23/L1nXznP+N/TyKL8lql3l7oo2LNhnH66zWhfoemg3Q4VJZSruzQ==", "optional": true }, "@next/swc-android-arm64": { - "version": "12.3.0", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-12.3.0.tgz", - "integrity": "sha512-OaI+FhAM6P9B6Ybwbn0Zl8YwWido0lLwhDBi9WiYCh4RQmIXAyVIoIJPHo4fP05+mXaJ/k1trvDvuURvHOq2qw==", + "version": "12.3.1", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-12.3.1.tgz", + "integrity": "sha512-CmgU2ZNyBP0rkugOOqLnjl3+eRpXBzB/I2sjwcGZ7/Z6RcUJXK5Evz+N0ucOxqE4cZ3gkTeXtSzRrMK2mGYV8Q==", "optional": true }, "@next/swc-darwin-arm64": { - "version": "12.3.0", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.3.0.tgz", - "integrity": "sha512-9s4d3Mhii+WFce8o8Jok7WC3Bawkr9wEUU++SJRptjU1L5tsfYJMrSYCACHLhZujziNDLyExe4Hwwsccps1sfg==", + "version": "12.3.1", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.3.1.tgz", + "integrity": "sha512-hT/EBGNcu0ITiuWDYU9ur57Oa4LybD5DOQp4f22T6zLfpoBMfBibPtR8XktXmOyFHrL/6FC2p9ojdLZhWhvBHg==", "optional": true }, "@next/swc-darwin-x64": { - "version": "12.3.0", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.3.0.tgz", - "integrity": "sha512-2scC4MqUTwGwok+wpVxP+zWp7WcCAVOtutki2E1n99rBOTnUOX6qXkgxSy083yBN6GqwuC/dzHeN7hIKjavfRA==", + "version": "12.3.1", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.3.1.tgz", + "integrity": "sha512-9S6EVueCVCyGf2vuiLiGEHZCJcPAxglyckTZcEwLdJwozLqN0gtS0Eq0bQlGS3dH49Py/rQYpZ3KVWZ9BUf/WA==", "optional": true }, "@next/swc-freebsd-x64": { - "version": "12.3.0", - "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.3.0.tgz", - "integrity": "sha512-xAlruUREij/bFa+qsE1tmsP28t7vz02N4ZDHt2lh3uJUniE0Ne9idyIDLc1Ed0IF2RjfgOp4ZVunuS3OM0sngw==", + "version": "12.3.1", + "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.3.1.tgz", + "integrity": "sha512-qcuUQkaBZWqzM0F1N4AkAh88lLzzpfE6ImOcI1P6YeyJSsBmpBIV8o70zV+Wxpc26yV9vpzb+e5gCyxNjKJg5Q==", "optional": true }, "@next/swc-linux-arm-gnueabihf": { - "version": "12.3.0", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.3.0.tgz", - "integrity": "sha512-jin2S4VT/cugc2dSZEUIabhYDJNgrUh7fufbdsaAezgcQzqfdfJqfxl4E9GuafzB4cbRPTaqA0V5uqbp0IyGkQ==", + "version": "12.3.1", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.3.1.tgz", + "integrity": "sha512-diL9MSYrEI5nY2wc/h/DBewEDUzr/DqBjIgHJ3RUNtETAOB3spMNHvJk2XKUDjnQuluLmFMloet9tpEqU2TT9w==", "optional": true }, "@next/swc-linux-arm64-gnu": { - "version": "12.3.0", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.3.0.tgz", - "integrity": "sha512-RqJHDKe0WImeUrdR0kayTkRWgp4vD/MS7g0r6Xuf8+ellOFH7JAAJffDW3ayuVZeMYOa7RvgNFcOoWnrTUl9Nw==", + "version": "12.3.1", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.3.1.tgz", + "integrity": "sha512-o/xB2nztoaC7jnXU3Q36vGgOolJpsGG8ETNjxM1VAPxRwM7FyGCPHOMk1XavG88QZSQf+1r+POBW0tLxQOJ9DQ==", "optional": true }, "@next/swc-linux-arm64-musl": { - "version": "12.3.0", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.3.0.tgz", - "integrity": "sha512-nvNWoUieMjvDjpYJ/4SQe9lQs2xMj6ZRs8N+bmTrVu9leY2Fg3WD6W9p/1uU9hGO8u+OdF13wc4iRShu/WYIHg==", + "version": "12.3.1", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.3.1.tgz", + "integrity": "sha512-2WEasRxJzgAmP43glFNhADpe8zB7kJofhEAVNbDJZANp+H4+wq+/cW1CdDi8DqjkShPEA6/ejJw+xnEyDID2jg==", "optional": true }, "@next/swc-linux-x64-gnu": { - "version": "12.3.0", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.3.0.tgz", - "integrity": "sha512-4ajhIuVU9PeQCMMhdDgZTLrHmjbOUFuIyg6J19hZqwEwDTSqQyrSLkbJs2Nd7IRiM6Ul/XyrtEFCpk4k+xD2+w==", + "version": "12.3.1", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.3.1.tgz", + "integrity": "sha512-JWEaMyvNrXuM3dyy9Pp5cFPuSSvG82+yABqsWugjWlvfmnlnx9HOQZY23bFq3cNghy5V/t0iPb6cffzRWylgsA==", "optional": true }, "@next/swc-linux-x64-musl": { - "version": "12.3.0", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.3.0.tgz", - "integrity": "sha512-U092RBYbaGxoMAwpauePJEu2PuZSEoUCGJBvsptQr2/2XIMwAJDYM4c/M5NfYEsBr+yjvsYNsOpYfeQ88D82Yg==", + "version": "12.3.1", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.3.1.tgz", + "integrity": "sha512-xoEWQQ71waWc4BZcOjmatuvPUXKTv6MbIFzpm4LFeCHsg2iwai0ILmNXf81rJR+L1Wb9ifEke2sQpZSPNz1Iyg==", "optional": true }, "@next/swc-win32-arm64-msvc": { - "version": "12.3.0", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.3.0.tgz", - "integrity": "sha512-pzSzaxjDEJe67bUok9Nxf9rykbJfHXW0owICFsPBsqHyc+cr8vpF7g9e2APTCddtVhvjkga9ILoZJ9NxWS7Yiw==", + "version": "12.3.1", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.3.1.tgz", + "integrity": "sha512-hswVFYQYIeGHE2JYaBVtvqmBQ1CppplQbZJS/JgrVI3x2CurNhEkmds/yqvDONfwfbttTtH4+q9Dzf/WVl3Opw==", "optional": true }, "@next/swc-win32-ia32-msvc": { - "version": "12.3.0", - "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.3.0.tgz", - "integrity": "sha512-MQGUpMbYhQmTZ06a9e0hPQJnxFMwETo2WtyAotY3GEzbNCQVbCGhsvqEKcl+ZEHgShlHXUWvSffq1ZscY6gK7A==", + "version": "12.3.1", + "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.3.1.tgz", + "integrity": "sha512-Kny5JBehkTbKPmqulr5i+iKntO5YMP+bVM8Hf8UAmjSMVo3wehyLVc9IZkNmcbxi+vwETnQvJaT5ynYBkJ9dWA==", "optional": true }, "@next/swc-win32-x64-msvc": { - "version": "12.3.0", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.3.0.tgz", - "integrity": "sha512-C/nw6OgQpEULWqs+wgMHXGvlJLguPRFFGqR2TAqWBerQ8J+Sg3z1ZTqwelkSi4FoqStGuZ2UdFHIDN1ySmR1xA==", + "version": "12.3.1", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.3.1.tgz", + "integrity": "sha512-W1ijvzzg+kPEX6LAc+50EYYSEo0FVu7dmTE+t+DM4iOLqgGHoW9uYSz9wCVdkXOEEMP9xhXfGpcSxsfDucyPkA==", "optional": true }, "@nodelib/fs.scandir": { @@ -28383,9 +28394,9 @@ } }, "caniuse-lite": { - "version": "1.0.30001332", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001332.tgz", - "integrity": "sha512-10T30NYOEQtN6C11YGg411yebhvpnC6Z102+B95eAsN0oB6KUs01ivE8u+G6FMIRtIrVlYXhL+LUwQ3/hXwDWw==" + "version": "1.0.30001410", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001410.tgz", + "integrity": "sha512-QoblBnuE+rG0lc3Ur9ltP5q47lbguipa/ncNMyyGuqPk44FxbScWAeEO+k5fSQ8WekdAK4mWqNs1rADDAiN5xQ==" }, "caseless": { "version": "0.12.0", @@ -35983,28 +35994,28 @@ } }, "next": { - "version": "12.3.0", - "resolved": "https://registry.npmjs.org/next/-/next-12.3.0.tgz", - "integrity": "sha512-GpzI6me9V1+XYtfK0Ae9WD0mKqHyzQlGq1xH1rzNIYMASo4Tkl4rTe9jSqtBpXFhOS33KohXs9ZY38Akkhdciw==", - "requires": { - "@next/env": "12.3.0", - "@next/swc-android-arm-eabi": "12.3.0", - "@next/swc-android-arm64": "12.3.0", - "@next/swc-darwin-arm64": "12.3.0", - "@next/swc-darwin-x64": "12.3.0", - "@next/swc-freebsd-x64": "12.3.0", - "@next/swc-linux-arm-gnueabihf": "12.3.0", - "@next/swc-linux-arm64-gnu": "12.3.0", - "@next/swc-linux-arm64-musl": "12.3.0", - "@next/swc-linux-x64-gnu": "12.3.0", - "@next/swc-linux-x64-musl": "12.3.0", - "@next/swc-win32-arm64-msvc": "12.3.0", - "@next/swc-win32-ia32-msvc": "12.3.0", - "@next/swc-win32-x64-msvc": "12.3.0", + "version": "12.3.1", + "resolved": "https://registry.npmjs.org/next/-/next-12.3.1.tgz", + "integrity": "sha512-l7bvmSeIwX5lp07WtIiP9u2ytZMv7jIeB8iacR28PuUEFG5j0HGAPnMqyG5kbZNBG2H7tRsrQ4HCjuMOPnANZw==", + "requires": { + "@next/env": "12.3.1", + "@next/swc-android-arm-eabi": "12.3.1", + "@next/swc-android-arm64": "12.3.1", + "@next/swc-darwin-arm64": "12.3.1", + "@next/swc-darwin-x64": "12.3.1", + "@next/swc-freebsd-x64": "12.3.1", + "@next/swc-linux-arm-gnueabihf": "12.3.1", + "@next/swc-linux-arm64-gnu": "12.3.1", + "@next/swc-linux-arm64-musl": "12.3.1", + "@next/swc-linux-x64-gnu": "12.3.1", + "@next/swc-linux-x64-musl": "12.3.1", + "@next/swc-win32-arm64-msvc": "12.3.1", + "@next/swc-win32-ia32-msvc": "12.3.1", + "@next/swc-win32-x64-msvc": "12.3.1", "@swc/helpers": "0.4.11", - "caniuse-lite": "^1.0.30001332", + "caniuse-lite": "^1.0.30001406", "postcss": "8.4.14", - "styled-jsx": "5.0.6", + "styled-jsx": "5.0.7", "use-sync-external-store": "1.2.0" } }, @@ -39403,9 +39414,9 @@ "dev": true }, "styled-jsx": { - "version": "5.0.6", - "resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.0.6.tgz", - "integrity": "sha512-xOeROtkK5MGMDimBQ3J6iPId8q0t/BDoG5XN6oKkZClVz9ISF/hihN8OCn2LggMU6N32aXnrXBdn3auSqNS9fA==" + "version": "5.0.7", + "resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.0.7.tgz", + "integrity": "sha512-b3sUzamS086YLRuvnaDigdAewz1/EFYlHpYBP5mZovKEdQQOIIYq8lApylub3HHZ6xFjV051kkGU7cudJmrXEA==" }, "supports-color": { "version": "9.2.2", From 2c85686ceb8d31118482ee54b3b02c31106eed07 Mon Sep 17 00:00:00 2001 From: Matt Kane Date: Fri, 23 Sep 2022 15:40:06 +0100 Subject: [PATCH 003/172] fix: resolve page deps in app dir --- demos/app-dir/.npmrc | 1 + packages/runtime/src/helpers/edge.ts | 4 ---- packages/runtime/src/templates/getPageResolver.ts | 4 ++-- 3 files changed, 3 insertions(+), 6 deletions(-) create mode 100644 demos/app-dir/.npmrc diff --git a/demos/app-dir/.npmrc b/demos/app-dir/.npmrc new file mode 100644 index 0000000000..521a9f7c07 --- /dev/null +++ b/demos/app-dir/.npmrc @@ -0,0 +1 @@ +legacy-peer-deps=true diff --git a/packages/runtime/src/helpers/edge.ts b/packages/runtime/src/helpers/edge.ts index 2f6ec0ad40..738e801a7b 100644 --- a/packages/runtime/src/helpers/edge.ts +++ b/packages/runtime/src/helpers/edge.ts @@ -90,10 +90,6 @@ const getMiddlewareBundle = async ({ chunks.push('{', data, '}') } - const middleware = await fs.readFile(join(publish, `server`, `${edgeFunctionDefinition.name}.js`), 'utf8') - - chunks.push(middleware) - const exports = /* js */ `export default _ENTRIES["middleware_${edgeFunctionDefinition.name}"].default;` chunks.push(exports) return chunks.join('\n') diff --git a/packages/runtime/src/templates/getPageResolver.ts b/packages/runtime/src/templates/getPageResolver.ts index 975f4a2c72..50fbdc8481 100644 --- a/packages/runtime/src/templates/getPageResolver.ts +++ b/packages/runtime/src/templates/getPageResolver.ts @@ -11,9 +11,9 @@ import { HANDLER_FUNCTION_NAME } from '../constants' export const getPageResolver = async ({ publish, target }: { publish: string; target: string }) => { const functionDir = posix.resolve(posix.join('.netlify', 'functions', HANDLER_FUNCTION_NAME)) - const root = posix.resolve(slash(publish), target === 'server' ? 'server' : 'serverless', 'pages') + const root = posix.resolve(slash(publish), target === 'server' ? 'server' : 'serverless') - const pages = await glob('**/*.js', { + const pages = await glob('{pages,app}/**/*.js', { cwd: root, dot: true, }) From d07f4a28e1e2325ccb3d7275d6cd80be9736f1a7 Mon Sep 17 00:00:00 2001 From: Matt Kane Date: Fri, 23 Sep 2022 18:47:20 +0100 Subject: [PATCH 004/172] fix: patch duplicate declaration --- packages/runtime/src/helpers/edge.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/runtime/src/helpers/edge.ts b/packages/runtime/src/helpers/edge.ts index 738e801a7b..41ed3a055a 100644 --- a/packages/runtime/src/helpers/edge.ts +++ b/packages/runtime/src/helpers/edge.ts @@ -72,6 +72,8 @@ delete globalThis.window ` +const IMPORT_UNSUPPORTED = [`Object.defineProperty(globalThis,"__import_unsupported"`, +` Object.defineProperty(globalThis, "__import_unsupported"`] /** * Concatenates the Next edge function code with the required chunks and adds an export */ @@ -86,7 +88,9 @@ const getMiddlewareBundle = async ({ const chunks: Array = [bootstrap] for (const file of edgeFunctionDefinition.files) { const filePath = join(publish, file) - const data = await fs.readFile(filePath, 'utf8') + + let data = await fs.readFile(filePath, 'utf8') + data = IMPORT_UNSUPPORTED.reduce((acc, val) => acc.replace(val, `if(!('__import_unsupported' in globalThis)) ${val}`), data) chunks.push('{', data, '}') } From 335ee34378fdb6722acd2168023fba77f4f1c48f Mon Sep 17 00:00:00 2001 From: Matt Kane Date: Fri, 23 Sep 2022 19:26:54 +0100 Subject: [PATCH 005/172] fix: resolve nft deps --- packages/runtime/src/helpers/edge.ts | 13 ++++++++---- .../runtime/src/templates/getPageResolver.ts | 20 ++++++++++++++----- 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/packages/runtime/src/helpers/edge.ts b/packages/runtime/src/helpers/edge.ts index 41ed3a055a..60ba8e796d 100644 --- a/packages/runtime/src/helpers/edge.ts +++ b/packages/runtime/src/helpers/edge.ts @@ -72,8 +72,10 @@ delete globalThis.window ` -const IMPORT_UNSUPPORTED = [`Object.defineProperty(globalThis,"__import_unsupported"`, -` Object.defineProperty(globalThis, "__import_unsupported"`] +const IMPORT_UNSUPPORTED = [ + `Object.defineProperty(globalThis,"__import_unsupported"`, + ` Object.defineProperty(globalThis, "__import_unsupported"`, +] /** * Concatenates the Next edge function code with the required chunks and adds an export */ @@ -88,9 +90,12 @@ const getMiddlewareBundle = async ({ const chunks: Array = [bootstrap] for (const file of edgeFunctionDefinition.files) { const filePath = join(publish, file) - + let data = await fs.readFile(filePath, 'utf8') - data = IMPORT_UNSUPPORTED.reduce((acc, val) => acc.replace(val, `if(!('__import_unsupported' in globalThis)) ${val}`), data) + data = IMPORT_UNSUPPORTED.reduce( + (acc, val) => acc.replace(val, `if(!('__import_unsupported' in globalThis)) ${val}`), + data, + ) chunks.push('{', data, '}') } diff --git a/packages/runtime/src/templates/getPageResolver.ts b/packages/runtime/src/templates/getPageResolver.ts index 50fbdc8481..0fd28f60fe 100644 --- a/packages/runtime/src/templates/getPageResolver.ts +++ b/packages/runtime/src/templates/getPageResolver.ts @@ -1,5 +1,6 @@ import { posix } from 'path' +import { readJSON } from 'fs-extra' import { outdent } from 'outdent' import slash from 'slash' import glob from 'tiny-glob' @@ -13,16 +14,25 @@ export const getPageResolver = async ({ publish, target }: { publish: string; ta const functionDir = posix.resolve(posix.join('.netlify', 'functions', HANDLER_FUNCTION_NAME)) const root = posix.resolve(slash(publish), target === 'server' ? 'server' : 'serverless') - const pages = await glob('{pages,app}/**/*.js', { + const pages = await glob('{pages,app}/**/*.js.nft.json', { cwd: root, dot: true, }) - const pageFiles = pages - .map((page) => `require.resolve('${posix.relative(functionDir, posix.join(root, slash(page)))}')`) - .sort() + + const dependencies = await Promise.all( + pages.map(async (page) => { + const dir = posix.dirname(page) + const { files } = await readJSON(posix.join(root, page)) + return files.map((file) => posix.resolve(root, dir, file)) + }), + ) + + const deduped = [...new Set(dependencies.flat())] + + const pageFiles = deduped.map((file) => `require.resolve('${posix.relative(functionDir, file)}')`).sort() return outdent` - // This file is purely to allow nft to know about these pages. It should be temporary. + // This file is purely to allow nft to know about these pages. exports.resolvePages = () => { try { ${pageFiles.join('\n ')} From cceb34879364e705794701dc99478cab231bd983 Mon Sep 17 00:00:00 2001 From: Matt Kane Date: Mon, 26 Sep 2022 13:41:36 +0100 Subject: [PATCH 006/172] feat: add support for appdir edge runtime --- packages/runtime/src/helpers/edge.ts | 46 ++++++++++++++++++++++++---- packages/runtime/src/index.ts | 9 +++--- 2 files changed, 44 insertions(+), 11 deletions(-) diff --git a/packages/runtime/src/helpers/edge.ts b/packages/runtime/src/helpers/edge.ts index 60ba8e796d..e668a658e2 100644 --- a/packages/runtime/src/helpers/edge.ts +++ b/packages/runtime/src/helpers/edge.ts @@ -7,6 +7,8 @@ import { copy, copyFile, emptyDir, ensureDir, readJSON, readJson, writeJSON, wri import type { MiddlewareManifest } from 'next/dist/build/webpack/plugins/middleware-plugin' import type { RouteHas } from 'next/dist/lib/load-custom-routes' +import { RoutesManifest } from './types' + // This is the format as of next@12.2 interface EdgeFunctionDefinitionV1 { env: string[] @@ -48,14 +50,18 @@ export interface FunctionManifest { import_map?: string } -export const loadMiddlewareManifest = (netlifyConfig: NetlifyConfig): Promise => { - const middlewarePath = resolve(netlifyConfig.build.publish, 'server', 'middleware-manifest.json') - if (!existsSync(middlewarePath)) { - return null +const maybeLoadJson = (path: string): Promise | null => { + if (existsSync(path)) { + return readJson(path) } - return readJson(middlewarePath) } +export const loadMiddlewareManifest = (netlifyConfig: NetlifyConfig): Promise => + maybeLoadJson(resolve(netlifyConfig.build.publish, 'server', 'middleware-manifest.json')) + +export const loadAppPathRoutesManifest = (netlifyConfig: NetlifyConfig): Promise | null> => + maybeLoadJson(resolve(netlifyConfig.build.publish, 'app-path-routes-manifest.json')) + /** * Convert the Next middleware name into a valid Edge Function name */ @@ -120,10 +126,14 @@ const writeEdgeFunction = async ({ edgeFunctionDefinition, edgeFunctionRoot, netlifyConfig, + pageRegexMap, + appPathRoutesManifest = {}, }: { edgeFunctionDefinition: EdgeFunctionDefinition edgeFunctionRoot: string netlifyConfig: NetlifyConfig + pageRegexMap?: Map + appPathRoutesManifest?: Record }): Promise< Array<{ function: string @@ -155,6 +165,15 @@ const writeEdgeFunction = async ({ } else { matchers.push(...edgeFunctionDefinition.matchers) } + + // If the EF matches a page, it's an app dir page so needs a matcher too + if (pageRegexMap && edgeFunctionDefinition.page in appPathRoutesManifest) { + const regexp = pageRegexMap.get(appPathRoutesManifest[edgeFunctionDefinition.page]) + if (regexp) { + matchers.push({ regexp }) + } + } + await writeJson(join(edgeFunctionDir, 'matchers.json'), matchers) // We add a defintion for each matching path @@ -192,7 +211,13 @@ export const writeDevEdgeFunction = async ({ /** * Writes Edge Functions for the Next middleware */ -export const writeEdgeFunctions = async (netlifyConfig: NetlifyConfig) => { +export const writeEdgeFunctions = async ({ + netlifyConfig, + routesManifest, +}: { + netlifyConfig: NetlifyConfig + routesManifest: RoutesManifest +}) => { const manifest: FunctionManifest = { functions: [], version: 1, @@ -238,11 +263,20 @@ export const writeEdgeFunctions = async (netlifyConfig: NetlifyConfig) => { // Older versions of the manifest format don't have the functions field // No, the version field was not incremented if (typeof middlewareManifest.functions === 'object') { + // When using the app dir, we also need to check if the EF matches a page + const appPathRoutesManifest = await loadAppPathRoutesManifest(netlifyConfig) + + const pageRegexMap = new Map( + [...routesManifest.dynamicRoutes, ...routesManifest.staticRoutes].map((route) => [route.page, route.regex]), + ) + for (const edgeFunctionDefinition of Object.values(middlewareManifest.functions)) { const functionDefinitions = await writeEdgeFunction({ edgeFunctionDefinition, edgeFunctionRoot, netlifyConfig, + pageRegexMap, + appPathRoutesManifest, }) manifest.functions.push(...functionDefinitions) } diff --git a/packages/runtime/src/index.ts b/packages/runtime/src/index.ts index d420d5549b..2981d3c5d3 100644 --- a/packages/runtime/src/index.ts +++ b/packages/runtime/src/index.ts @@ -78,12 +78,11 @@ const plugin: NetlifyPlugin = { checkNextSiteHasBuilt({ publish, failBuild }) - const { appDir, basePath, i18n, images, target, ignore, trailingSlash, outdir, experimental } = await getNextConfig( - { + const { appDir, basePath, i18n, images, target, ignore, trailingSlash, outdir, experimental, routesManifest } = + await getNextConfig({ publish, failBuild, - }, - ) + }) await cleanupEdgeFunctions(constants) const middlewareManifest = await loadMiddlewareManifest(netlifyConfig) @@ -179,7 +178,7 @@ const plugin: NetlifyPlugin = { }) if (usingEdge) { - await writeEdgeFunctions(netlifyConfig) + await writeEdgeFunctions({ netlifyConfig, routesManifest }) await enableEdgeInNextConfig(publish) From 760704992814dd2a322eebd84f153bcb0d28ad9b Mon Sep 17 00:00:00 2001 From: Matt Kane Date: Tue, 27 Sep 2022 09:29:16 +0100 Subject: [PATCH 007/172] chore: update next canary and react (and change APIs) --- .../error/ssr-error-client-component/page.js | 4 +- .../app/hooks/use-cookies/client/page.js | 4 +- demos/app-dir/app/hooks/use-cookies/page.js | 8 +- .../app/hooks/use-headers/client/page.js | 4 +- demos/app-dir/app/hooks/use-headers/page.js | 4 +- .../app/hooks/use-preview-data/client/page.js | 4 +- .../app/hooks/use-preview-data/page.js | 4 +- demos/app-dir/app/navigation/page.js | 4 +- .../app/not-found/clientcomponent/a.js | 4 +- demos/app-dir/app/old-router/page.js | 4 +- .../app/redirect/clientcomponent/page.js | 4 +- demos/app-dir/package-lock.json | 284 +++++++++--------- demos/app-dir/package.json | 6 +- packages/runtime/src/helpers/config.ts | 2 +- 14 files changed, 170 insertions(+), 170 deletions(-) diff --git a/demos/app-dir/app/error/ssr-error-client-component/page.js b/demos/app-dir/app/error/ssr-error-client-component/page.js index 39d5495fd3..fc5feba686 100644 --- a/demos/app-dir/app/error/ssr-error-client-component/page.js +++ b/demos/app-dir/app/error/ssr-error-client-component/page.js @@ -1,8 +1,8 @@ import ClientComp from './client-component' -import { useHeaders } from 'next/dist/client/components/hooks-server' +import { headers } from 'next/dist/client/components/hooks-server' export default function Page() { // Opt-in to SSR. - useHeaders() + headers() return } diff --git a/demos/app-dir/app/hooks/use-cookies/client/page.js b/demos/app-dir/app/hooks/use-cookies/client/page.js index e387b365aa..1b5398784b 100644 --- a/demos/app-dir/app/hooks/use-cookies/client/page.js +++ b/demos/app-dir/app/hooks/use-cookies/client/page.js @@ -1,10 +1,10 @@ 'client' -import { useCookies } from 'next/dist/client/components/hooks-server' +import { cookies } from 'next/dist/client/components/hooks-server' export default function Page() { // This should throw an error. - useCookies() + cookies() return null } diff --git a/demos/app-dir/app/hooks/use-cookies/page.js b/demos/app-dir/app/hooks/use-cookies/page.js index dd2efcccd7..5477834d13 100644 --- a/demos/app-dir/app/hooks/use-cookies/page.js +++ b/demos/app-dir/app/hooks/use-cookies/page.js @@ -1,10 +1,10 @@ -import { useCookies } from 'next/dist/client/components/hooks-server' +import { cookies } from 'next/dist/client/components/hooks-server' export default function Page() { - const cookies = useCookies() + const cookiesList = cookies() + const cookie = cookiesList.get('use-cookies') - const hasCookie = - 'use-cookies' in cookies && cookies['use-cookies'] === 'value' + const hasCookie = cookie === 'value' return ( <> diff --git a/demos/app-dir/app/hooks/use-headers/client/page.js b/demos/app-dir/app/hooks/use-headers/client/page.js index 022da1e08a..914cfe4817 100644 --- a/demos/app-dir/app/hooks/use-headers/client/page.js +++ b/demos/app-dir/app/hooks/use-headers/client/page.js @@ -1,10 +1,10 @@ 'client' -import { useHeaders } from 'next/dist/client/components/hooks-server' +import { headers } from 'next/dist/client/components/hooks-server' export default function Page() { // This should throw an error. - useHeaders() + headers() return null } diff --git a/demos/app-dir/app/hooks/use-headers/page.js b/demos/app-dir/app/hooks/use-headers/page.js index 2c73997ad4..354dd65e1f 100644 --- a/demos/app-dir/app/hooks/use-headers/page.js +++ b/demos/app-dir/app/hooks/use-headers/page.js @@ -1,7 +1,7 @@ -import { useHeaders } from 'next/dist/client/components/hooks-server' +import { headers } from 'next/dist/client/components/hooks-server' export default function Page() { - const headers = useHeaders() + const headers = headers() const hasHeader = 'x-use-headers' in headers && headers['x-use-headers'] === 'value' diff --git a/demos/app-dir/app/hooks/use-preview-data/client/page.js b/demos/app-dir/app/hooks/use-preview-data/client/page.js index 86fbc8fe7e..84ef213cbc 100644 --- a/demos/app-dir/app/hooks/use-preview-data/client/page.js +++ b/demos/app-dir/app/hooks/use-preview-data/client/page.js @@ -1,10 +1,10 @@ 'client' -import { usePreviewData } from 'next/dist/client/components/hooks-server' +import { previewData } from 'next/dist/client/components/hooks-server' export default function Page() { // This should throw an error. - usePreviewData() + previewData() return null } diff --git a/demos/app-dir/app/hooks/use-preview-data/page.js b/demos/app-dir/app/hooks/use-preview-data/page.js index afdcad1b2b..b41724638a 100644 --- a/demos/app-dir/app/hooks/use-preview-data/page.js +++ b/demos/app-dir/app/hooks/use-preview-data/page.js @@ -1,7 +1,7 @@ -import { usePreviewData } from 'next/dist/client/components/hooks-server' +import { previewData } from 'next/dist/client/components/hooks-server' export default function Page() { - const data = usePreviewData() + const data = previewData() const hasData = !!data && data.key === 'value' diff --git a/demos/app-dir/app/navigation/page.js b/demos/app-dir/app/navigation/page.js index 62238fcf7b..130d71a07a 100644 --- a/demos/app-dir/app/navigation/page.js +++ b/demos/app-dir/app/navigation/page.js @@ -7,10 +7,10 @@ export default function Page() {

{nanoid()}

hello from /navigation

- useCookies + cookies - useHeaders + headers ) diff --git a/demos/app-dir/app/not-found/clientcomponent/a.js b/demos/app-dir/app/not-found/clientcomponent/a.js index c86055f6b0..1535ebf5ac 100644 --- a/demos/app-dir/app/not-found/clientcomponent/a.js +++ b/demos/app-dir/app/not-found/clientcomponent/a.js @@ -1,9 +1,9 @@ // TODO-APP: enable when flight error serialization is implemented import ClientComp from './client-component' -import { useHeaders } from 'next/dist/client/components/hooks-server' +import { headers } from 'next/dist/client/components/hooks-server' export default function Page() { // Opt-in to SSR. - useHeaders() + headers() return } diff --git a/demos/app-dir/app/old-router/page.js b/demos/app-dir/app/old-router/page.js index 928fa110ca..e914b05e3e 100644 --- a/demos/app-dir/app/old-router/page.js +++ b/demos/app-dir/app/old-router/page.js @@ -1,8 +1,8 @@ -import { useCookies } from 'next/dist/client/components/hooks-server' +import { cookies } from 'next/dist/client/components/hooks-server' import Router from './router' export default function Page() { - useCookies() + cookies() return (
diff --git a/demos/app-dir/app/redirect/clientcomponent/page.js b/demos/app-dir/app/redirect/clientcomponent/page.js index 39d5495fd3..fc5feba686 100644 --- a/demos/app-dir/app/redirect/clientcomponent/page.js +++ b/demos/app-dir/app/redirect/clientcomponent/page.js @@ -1,8 +1,8 @@ import ClientComp from './client-component' -import { useHeaders } from 'next/dist/client/components/hooks-server' +import { headers } from 'next/dist/client/components/hooks-server' export default function Page() { // Opt-in to SSR. - useHeaders() + headers() return } diff --git a/demos/app-dir/package-lock.json b/demos/app-dir/package-lock.json index 0941ba6f9d..582d2cf1ec 100644 --- a/demos/app-dir/package-lock.json +++ b/demos/app-dir/package-lock.json @@ -10,20 +10,20 @@ "license": "MIT", "dependencies": { "nanoid": "^2.1.11", - "next": "^12.3.2-canary.7", - "react": "^0.0.0-experimental-d1bb1c586-20220922", - "react-dom": "^0.0.0-experimental-d1bb1c586-20220922" + "next": "12.3.2-canary.10", + "react": "0.0.0-experimental-cb5084d1c-20220924", + "react-dom": "0.0.0-experimental-cb5084d1c-20220924" } }, "node_modules/@next/env": { - "version": "12.3.2-canary.7", - "resolved": "https://registry.npmjs.org/@next/env/-/env-12.3.2-canary.7.tgz", - "integrity": "sha512-uk5yDvh8ra8PlIczZBTZKyt5Rf6a6mH2tGB3hwRAXD5hVLd74LzBQza2aYMEcDlRafAknsbL0dnqI3CkFYat9w==" + "version": "12.3.2-canary.10", + "resolved": "https://registry.npmjs.org/@next/env/-/env-12.3.2-canary.10.tgz", + "integrity": "sha512-7rG2MNCCVpApBZL9ynv2qmQTaqgMv++EsAEZAhQudvOP6MILvscw02Tr5Hl7W+mlXEIZiLqx3Xq47AEhscBxUQ==" }, "node_modules/@next/swc-android-arm-eabi": { - "version": "12.3.2-canary.7", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.3.2-canary.7.tgz", - "integrity": "sha512-pusM/ylasGBweiwhINtqWCgy5bOjLmIctFD0etpmh9+DqCg09yu58hJ1Dn/UTW8EbB1nkTP1z3dEoMKLh4fV2A==", + "version": "12.3.2-canary.10", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.3.2-canary.10.tgz", + "integrity": "sha512-LJXE7Ynf0EcJrf0aeit9etXh2Xgm4QTqxryaUEhha41Y0oRosDnpgAk0kwRPhl6wfd9rRfJ9lPFeEKpNhJNrzQ==", "cpu": [ "arm" ], @@ -36,9 +36,9 @@ } }, "node_modules/@next/swc-android-arm64": { - "version": "12.3.2-canary.7", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-12.3.2-canary.7.tgz", - "integrity": "sha512-x11T0ocPE9xrnqMeDzUMepN3P8CHIN8iiLgiFkbTbKTbSciuH3juOvKggJO9APZRG5Ch5eePWcCy2gHedAbhnA==", + "version": "12.3.2-canary.10", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-12.3.2-canary.10.tgz", + "integrity": "sha512-8tg8M/aMaQ514+kK5ToEMI9KhGMtMHoECwftqDR/aHf0H9q5ab9Z+4OU9zPyesJV3VBVQqWjbpVbRg/NtC793A==", "cpu": [ "arm64" ], @@ -51,9 +51,9 @@ } }, "node_modules/@next/swc-darwin-arm64": { - "version": "12.3.2-canary.7", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.3.2-canary.7.tgz", - "integrity": "sha512-tcO9hDaMfcbiaZp1B+HZcLzGGs36dnmjQ0YXyn6C88HEUoKyxanYleVHtTmWHlgsxxjZdDd/RzOze1ycWs2oXw==", + "version": "12.3.2-canary.10", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.3.2-canary.10.tgz", + "integrity": "sha512-658MHgcosaIddRUYiv9fVcz/pBKm2cOHGxG2+Rdqe4SP8MYp6xjrzdFJv59fylqhj82pJaI3yQjBCAVFCCA/4w==", "cpu": [ "arm64" ], @@ -66,9 +66,9 @@ } }, "node_modules/@next/swc-darwin-x64": { - "version": "12.3.2-canary.7", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.3.2-canary.7.tgz", - "integrity": "sha512-WjAyU67zj69nRM2GNAnBLvghq4EHTyDzMO02GjG6yexVhDvkE0OFlvh0BQLI3DIOz+B3RjJRcW3OoHi8XzW9UA==", + "version": "12.3.2-canary.10", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.3.2-canary.10.tgz", + "integrity": "sha512-hcxRbzW2+o9o28r9/GyLZxDehHh1DGGmr5qMeJKHCKZeAB2nxjb1embSrfjnn4046vOyhBTzOP6Hn4eL+VImdg==", "cpu": [ "x64" ], @@ -81,9 +81,9 @@ } }, "node_modules/@next/swc-freebsd-x64": { - "version": "12.3.2-canary.7", - "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.3.2-canary.7.tgz", - "integrity": "sha512-cQrdPCMhP1Mc+pIt16FlC5BVgcXzLXRlm7qZ7wBRKG6r/IIIn/qNRFgQQcB3iyvfNZo7lURLKcfsxNmMGclldQ==", + "version": "12.3.2-canary.10", + "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.3.2-canary.10.tgz", + "integrity": "sha512-H2WpBaTSaX/lZZLhQRFE2qouLyZUSAk8QlciHbcut3URC8o3uQ5sHvUxWEzm1ZkP3s0YvOA05PN1E/haYVAibw==", "cpu": [ "x64" ], @@ -96,9 +96,9 @@ } }, "node_modules/@next/swc-linux-arm-gnueabihf": { - "version": "12.3.2-canary.7", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.3.2-canary.7.tgz", - "integrity": "sha512-LEL+dUe10FhQHyXq9Mul5pOJwKDtrAylh9chktWf8eFr14j/YrfPbkLHv1+tCK8brDV3afVJMl0IpoCo75Yfyg==", + "version": "12.3.2-canary.10", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.3.2-canary.10.tgz", + "integrity": "sha512-w5UHRvOMj4QS2uM0mWpd1ztIniRoMeMzsZ8CmAX3AbP7cyzuPskIB1/j6mduYEeIgQzJEXO9a1+KlHz48Y2OuQ==", "cpu": [ "arm" ], @@ -111,9 +111,9 @@ } }, "node_modules/@next/swc-linux-arm64-gnu": { - "version": "12.3.2-canary.7", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.3.2-canary.7.tgz", - "integrity": "sha512-mbDqHk3C76UGIzkOv+G5NslKiSYIXyWQwbkuty0+0wLVJttWjWi2dMN7DFJQPMNvBefU9/vxVJdUnGVGEZfUXw==", + "version": "12.3.2-canary.10", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.3.2-canary.10.tgz", + "integrity": "sha512-Ee3frTrn6P8RLhCiRjjWik/ZRQ0wyae2AT/eGcDv7XovWapJNJy1f+mdeVzQLBmphVechmeTUOmXmBPRB4O4eg==", "cpu": [ "arm64" ], @@ -126,9 +126,9 @@ } }, "node_modules/@next/swc-linux-arm64-musl": { - "version": "12.3.2-canary.7", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.3.2-canary.7.tgz", - "integrity": "sha512-gJ3VQHuqb3ABiOKPxfWAJQdO4mp3yNnWIAPN8n52F7Zu38udbHXvcbIylWfQW/Qah+RRf7P7y2txH2kC07QOPA==", + "version": "12.3.2-canary.10", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.3.2-canary.10.tgz", + "integrity": "sha512-NTKDNpJXyhPn3rvuXeIAc27Y0WhqKIOvkHD3mxuVp2N4Eu2FyuSxth37Pl8daJkMUQFRaLtlO6Yy9GSH+KAADA==", "cpu": [ "arm64" ], @@ -141,9 +141,9 @@ } }, "node_modules/@next/swc-linux-x64-gnu": { - "version": "12.3.2-canary.7", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.3.2-canary.7.tgz", - "integrity": "sha512-/PBLiC+JfMJIzwMCQaSQgnLoIOjdSjTA9zarj2Kk1eCLjH8/VnsfBWtmP7TdbgIRYnZ8QKb4HXSOq94ZQS/fkw==", + "version": "12.3.2-canary.10", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.3.2-canary.10.tgz", + "integrity": "sha512-OqIImNj10SiKwVMPbWaecTK/ZpSCDApcuF2OCyaf6dchnCZCBh8uNHTteU+IFwR4gaU5AUKLl9gKntRuIQYUFw==", "cpu": [ "x64" ], @@ -156,9 +156,9 @@ } }, "node_modules/@next/swc-linux-x64-musl": { - "version": "12.3.2-canary.7", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.3.2-canary.7.tgz", - "integrity": "sha512-Bf3goHoUd0SB58sVTMva0ByoLM+aEhm5YJRqsi7SsOAu9EAQwYfWgY2Hx60ah5i1N4ihYK0xjs8kwlfdDVOuow==", + "version": "12.3.2-canary.10", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.3.2-canary.10.tgz", + "integrity": "sha512-pwVshTffMIrls2J4/+7eowjdEOZbPWqJlTmVDoWMLiVp5O4aovYbwkd6/BrK83kMe+ZT/8FhGUiDyeku1zxG+w==", "cpu": [ "x64" ], @@ -171,9 +171,9 @@ } }, "node_modules/@next/swc-win32-arm64-msvc": { - "version": "12.3.2-canary.7", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.3.2-canary.7.tgz", - "integrity": "sha512-aPRQ4dY5MuLgHCVdY+/Grgg4oX38pG4S0sT8mpatK3oIdjhj3961cj33QpPAy6dhhCs8m0/eCWYmM9KKlAAUsg==", + "version": "12.3.2-canary.10", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.3.2-canary.10.tgz", + "integrity": "sha512-8sqHyd2TKFNGcetF5973ai4xdgkUXqHjBKOXi32CE1TUomOZaBKn8Ry0PCq4n8FEOyVsr1nolA8jCRxzsfgnGA==", "cpu": [ "arm64" ], @@ -186,9 +186,9 @@ } }, "node_modules/@next/swc-win32-ia32-msvc": { - "version": "12.3.2-canary.7", - "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.3.2-canary.7.tgz", - "integrity": "sha512-hr+TBDICVezyn0HDK4QootalbcuLj9F8qUzZZAw3gHz16rUDpqpnlRjw3RC99AzkKL7qMsdR/+SwnBlBY7ZK7Q==", + "version": "12.3.2-canary.10", + "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.3.2-canary.10.tgz", + "integrity": "sha512-gDhuAa/qwO0368ZfW6+YQ0xFAmCevIPihx9qIvxjKv6yCTsaryr+TqAIO6GYIx0iglfHs1V38HW2GnOJLwbFxg==", "cpu": [ "ia32" ], @@ -201,9 +201,9 @@ } }, "node_modules/@next/swc-win32-x64-msvc": { - "version": "12.3.2-canary.7", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.3.2-canary.7.tgz", - "integrity": "sha512-1n29b6meb54h/Mw/1xPoJB682nWbtEsUQo7rFJ6G44Nj3fYFXe+XOWQxWu6Sl8yvdBXcZRhRCHuAZGqYtmqorQ==", + "version": "12.3.2-canary.10", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.3.2-canary.10.tgz", + "integrity": "sha512-6hD58PmGtJwL8ttd6c0/dX63OwDtCbQVx0CKw4a4e93K/wwKwFtwjNIhoUG1psTF3diu14kckh7W8+dsk1s4cA==", "cpu": [ "x64" ], @@ -260,11 +260,11 @@ "integrity": "sha512-s/snB+WGm6uwi0WjsZdaVcuf3KJXlfGl2LcxgwkEwJF0D/BWzVWAZW/XY4bFaiR7s0Jk3FPvlnepg1H1b1UwlA==" }, "node_modules/next": { - "version": "12.3.2-canary.7", - "resolved": "https://registry.npmjs.org/next/-/next-12.3.2-canary.7.tgz", - "integrity": "sha512-zUosveWzpeRVy7j4ANoJ4gu0TBrkLYwPlIUEXrqqs/zLpHMu+tanxA1R1ts2d7h/2dSmeVZgGcHiVcHj5uspEA==", + "version": "12.3.2-canary.10", + "resolved": "https://registry.npmjs.org/next/-/next-12.3.2-canary.10.tgz", + "integrity": "sha512-73qD4QYq2rK0EDFBmdCdJq9ugo3RsWSwJKGG5IuUUaJKuIcw2m1aC5TtknReWMb90Mc+RA5+8D21+TVD/obDFA==", "dependencies": { - "@next/env": "12.3.2-canary.7", + "@next/env": "12.3.2-canary.10", "@swc/helpers": "0.4.11", "caniuse-lite": "^1.0.30001406", "postcss": "8.4.14", @@ -278,19 +278,19 @@ "node": ">=12.22.0" }, "optionalDependencies": { - "@next/swc-android-arm-eabi": "12.3.2-canary.7", - "@next/swc-android-arm64": "12.3.2-canary.7", - "@next/swc-darwin-arm64": "12.3.2-canary.7", - "@next/swc-darwin-x64": "12.3.2-canary.7", - "@next/swc-freebsd-x64": "12.3.2-canary.7", - "@next/swc-linux-arm-gnueabihf": "12.3.2-canary.7", - "@next/swc-linux-arm64-gnu": "12.3.2-canary.7", - "@next/swc-linux-arm64-musl": "12.3.2-canary.7", - "@next/swc-linux-x64-gnu": "12.3.2-canary.7", - "@next/swc-linux-x64-musl": "12.3.2-canary.7", - "@next/swc-win32-arm64-msvc": "12.3.2-canary.7", - "@next/swc-win32-ia32-msvc": "12.3.2-canary.7", - "@next/swc-win32-x64-msvc": "12.3.2-canary.7" + "@next/swc-android-arm-eabi": "12.3.2-canary.10", + "@next/swc-android-arm64": "12.3.2-canary.10", + "@next/swc-darwin-arm64": "12.3.2-canary.10", + "@next/swc-darwin-x64": "12.3.2-canary.10", + "@next/swc-freebsd-x64": "12.3.2-canary.10", + "@next/swc-linux-arm-gnueabihf": "12.3.2-canary.10", + "@next/swc-linux-arm64-gnu": "12.3.2-canary.10", + "@next/swc-linux-arm64-musl": "12.3.2-canary.10", + "@next/swc-linux-x64-gnu": "12.3.2-canary.10", + "@next/swc-linux-x64-musl": "12.3.2-canary.10", + "@next/swc-win32-arm64-msvc": "12.3.2-canary.10", + "@next/swc-win32-ia32-msvc": "12.3.2-canary.10", + "@next/swc-win32-x64-msvc": "12.3.2-canary.10" }, "peerDependencies": { "fibers": ">= 3.1.0", @@ -351,9 +351,9 @@ } }, "node_modules/react": { - "version": "0.0.0-experimental-d1bb1c586-20220922", - "resolved": "https://registry.npmjs.org/react/-/react-0.0.0-experimental-d1bb1c586-20220922.tgz", - "integrity": "sha512-aFOawqqDYFCR/U8BkgZxJxhmA6Y7jh+kW1Ppu7GegWYa0D/3kDqN8oTQchox3D9xJvn3+3bFsAVd/imHVuMUzQ==", + "version": "0.0.0-experimental-cb5084d1c-20220924", + "resolved": "https://registry.npmjs.org/react/-/react-0.0.0-experimental-cb5084d1c-20220924.tgz", + "integrity": "sha512-66AdfxkJrwCaCEKT0LQRd9J9GQ9T+yN7Wx9XT+tNxKycYQ0Exm+DZxOTedagWDlsFMXroyhrTWzgdC18R2PaOQ==", "dependencies": { "loose-envify": "^1.1.0" }, @@ -362,21 +362,21 @@ } }, "node_modules/react-dom": { - "version": "0.0.0-experimental-d1bb1c586-20220922", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-0.0.0-experimental-d1bb1c586-20220922.tgz", - "integrity": "sha512-GhgCgS11VYg7yfnGj0tvRo1G+CHHyEWnvLbfxhB29CMDpDzo2SM1UKbh2urklnF56m8AS8QBj5tjLtkLtovgGg==", + "version": "0.0.0-experimental-cb5084d1c-20220924", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-0.0.0-experimental-cb5084d1c-20220924.tgz", + "integrity": "sha512-0IHzPGHESn3uu8nI1w5596GX8bCGCE94DpaHkKSGWOlB6uhoVecU0fyOCkkNuB4cMc9WeOWiH2gsM100EWZDPQ==", "dependencies": { "loose-envify": "^1.1.0", - "scheduler": "0.0.0-experimental-d1bb1c586-20220922" + "scheduler": "0.0.0-experimental-cb5084d1c-20220924" }, "peerDependencies": { - "react": "0.0.0-experimental-d1bb1c586-20220922" + "react": "0.0.0-experimental-cb5084d1c-20220924" } }, "node_modules/scheduler": { - "version": "0.0.0-experimental-d1bb1c586-20220922", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.0.0-experimental-d1bb1c586-20220922.tgz", - "integrity": "sha512-2TpBDk+haQkt2hyaJAnJ9dLdQqbMDxP4ay7C/RgvxVlZ9LWjPi1gjhOPsIcbvt64PUjHsI3lYuMoxKGwcMtxjw==", + "version": "0.0.0-experimental-cb5084d1c-20220924", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.0.0-experimental-cb5084d1c-20220924.tgz", + "integrity": "sha512-SeszKCdhM5OHxNMStjpKIAaloARUMZqIpDZjkZeGuRsyr7YlAqvlsCXyee4ZQOOU1pbr7BIvQntKy5Hil+DQJA==", "dependencies": { "loose-envify": "^1.1.0" } @@ -424,86 +424,86 @@ }, "dependencies": { "@next/env": { - "version": "12.3.2-canary.7", - "resolved": "https://registry.npmjs.org/@next/env/-/env-12.3.2-canary.7.tgz", - "integrity": "sha512-uk5yDvh8ra8PlIczZBTZKyt5Rf6a6mH2tGB3hwRAXD5hVLd74LzBQza2aYMEcDlRafAknsbL0dnqI3CkFYat9w==" + "version": "12.3.2-canary.10", + "resolved": "https://registry.npmjs.org/@next/env/-/env-12.3.2-canary.10.tgz", + "integrity": "sha512-7rG2MNCCVpApBZL9ynv2qmQTaqgMv++EsAEZAhQudvOP6MILvscw02Tr5Hl7W+mlXEIZiLqx3Xq47AEhscBxUQ==" }, "@next/swc-android-arm-eabi": { - "version": "12.3.2-canary.7", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.3.2-canary.7.tgz", - "integrity": "sha512-pusM/ylasGBweiwhINtqWCgy5bOjLmIctFD0etpmh9+DqCg09yu58hJ1Dn/UTW8EbB1nkTP1z3dEoMKLh4fV2A==", + "version": "12.3.2-canary.10", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.3.2-canary.10.tgz", + "integrity": "sha512-LJXE7Ynf0EcJrf0aeit9etXh2Xgm4QTqxryaUEhha41Y0oRosDnpgAk0kwRPhl6wfd9rRfJ9lPFeEKpNhJNrzQ==", "optional": true }, "@next/swc-android-arm64": { - "version": "12.3.2-canary.7", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-12.3.2-canary.7.tgz", - "integrity": "sha512-x11T0ocPE9xrnqMeDzUMepN3P8CHIN8iiLgiFkbTbKTbSciuH3juOvKggJO9APZRG5Ch5eePWcCy2gHedAbhnA==", + "version": "12.3.2-canary.10", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-12.3.2-canary.10.tgz", + "integrity": "sha512-8tg8M/aMaQ514+kK5ToEMI9KhGMtMHoECwftqDR/aHf0H9q5ab9Z+4OU9zPyesJV3VBVQqWjbpVbRg/NtC793A==", "optional": true }, "@next/swc-darwin-arm64": { - "version": "12.3.2-canary.7", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.3.2-canary.7.tgz", - "integrity": "sha512-tcO9hDaMfcbiaZp1B+HZcLzGGs36dnmjQ0YXyn6C88HEUoKyxanYleVHtTmWHlgsxxjZdDd/RzOze1ycWs2oXw==", + "version": "12.3.2-canary.10", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.3.2-canary.10.tgz", + "integrity": "sha512-658MHgcosaIddRUYiv9fVcz/pBKm2cOHGxG2+Rdqe4SP8MYp6xjrzdFJv59fylqhj82pJaI3yQjBCAVFCCA/4w==", "optional": true }, "@next/swc-darwin-x64": { - "version": "12.3.2-canary.7", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.3.2-canary.7.tgz", - "integrity": "sha512-WjAyU67zj69nRM2GNAnBLvghq4EHTyDzMO02GjG6yexVhDvkE0OFlvh0BQLI3DIOz+B3RjJRcW3OoHi8XzW9UA==", + "version": "12.3.2-canary.10", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.3.2-canary.10.tgz", + "integrity": "sha512-hcxRbzW2+o9o28r9/GyLZxDehHh1DGGmr5qMeJKHCKZeAB2nxjb1embSrfjnn4046vOyhBTzOP6Hn4eL+VImdg==", "optional": true }, "@next/swc-freebsd-x64": { - "version": "12.3.2-canary.7", - "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.3.2-canary.7.tgz", - "integrity": "sha512-cQrdPCMhP1Mc+pIt16FlC5BVgcXzLXRlm7qZ7wBRKG6r/IIIn/qNRFgQQcB3iyvfNZo7lURLKcfsxNmMGclldQ==", + "version": "12.3.2-canary.10", + "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.3.2-canary.10.tgz", + "integrity": "sha512-H2WpBaTSaX/lZZLhQRFE2qouLyZUSAk8QlciHbcut3URC8o3uQ5sHvUxWEzm1ZkP3s0YvOA05PN1E/haYVAibw==", "optional": true }, "@next/swc-linux-arm-gnueabihf": { - "version": "12.3.2-canary.7", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.3.2-canary.7.tgz", - "integrity": "sha512-LEL+dUe10FhQHyXq9Mul5pOJwKDtrAylh9chktWf8eFr14j/YrfPbkLHv1+tCK8brDV3afVJMl0IpoCo75Yfyg==", + "version": "12.3.2-canary.10", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.3.2-canary.10.tgz", + "integrity": "sha512-w5UHRvOMj4QS2uM0mWpd1ztIniRoMeMzsZ8CmAX3AbP7cyzuPskIB1/j6mduYEeIgQzJEXO9a1+KlHz48Y2OuQ==", "optional": true }, "@next/swc-linux-arm64-gnu": { - "version": "12.3.2-canary.7", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.3.2-canary.7.tgz", - "integrity": "sha512-mbDqHk3C76UGIzkOv+G5NslKiSYIXyWQwbkuty0+0wLVJttWjWi2dMN7DFJQPMNvBefU9/vxVJdUnGVGEZfUXw==", + "version": "12.3.2-canary.10", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.3.2-canary.10.tgz", + "integrity": "sha512-Ee3frTrn6P8RLhCiRjjWik/ZRQ0wyae2AT/eGcDv7XovWapJNJy1f+mdeVzQLBmphVechmeTUOmXmBPRB4O4eg==", "optional": true }, "@next/swc-linux-arm64-musl": { - "version": "12.3.2-canary.7", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.3.2-canary.7.tgz", - "integrity": "sha512-gJ3VQHuqb3ABiOKPxfWAJQdO4mp3yNnWIAPN8n52F7Zu38udbHXvcbIylWfQW/Qah+RRf7P7y2txH2kC07QOPA==", + "version": "12.3.2-canary.10", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.3.2-canary.10.tgz", + "integrity": "sha512-NTKDNpJXyhPn3rvuXeIAc27Y0WhqKIOvkHD3mxuVp2N4Eu2FyuSxth37Pl8daJkMUQFRaLtlO6Yy9GSH+KAADA==", "optional": true }, "@next/swc-linux-x64-gnu": { - "version": "12.3.2-canary.7", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.3.2-canary.7.tgz", - "integrity": "sha512-/PBLiC+JfMJIzwMCQaSQgnLoIOjdSjTA9zarj2Kk1eCLjH8/VnsfBWtmP7TdbgIRYnZ8QKb4HXSOq94ZQS/fkw==", + "version": "12.3.2-canary.10", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.3.2-canary.10.tgz", + "integrity": "sha512-OqIImNj10SiKwVMPbWaecTK/ZpSCDApcuF2OCyaf6dchnCZCBh8uNHTteU+IFwR4gaU5AUKLl9gKntRuIQYUFw==", "optional": true }, "@next/swc-linux-x64-musl": { - "version": "12.3.2-canary.7", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.3.2-canary.7.tgz", - "integrity": "sha512-Bf3goHoUd0SB58sVTMva0ByoLM+aEhm5YJRqsi7SsOAu9EAQwYfWgY2Hx60ah5i1N4ihYK0xjs8kwlfdDVOuow==", + "version": "12.3.2-canary.10", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.3.2-canary.10.tgz", + "integrity": "sha512-pwVshTffMIrls2J4/+7eowjdEOZbPWqJlTmVDoWMLiVp5O4aovYbwkd6/BrK83kMe+ZT/8FhGUiDyeku1zxG+w==", "optional": true }, "@next/swc-win32-arm64-msvc": { - "version": "12.3.2-canary.7", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.3.2-canary.7.tgz", - "integrity": "sha512-aPRQ4dY5MuLgHCVdY+/Grgg4oX38pG4S0sT8mpatK3oIdjhj3961cj33QpPAy6dhhCs8m0/eCWYmM9KKlAAUsg==", + "version": "12.3.2-canary.10", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.3.2-canary.10.tgz", + "integrity": "sha512-8sqHyd2TKFNGcetF5973ai4xdgkUXqHjBKOXi32CE1TUomOZaBKn8Ry0PCq4n8FEOyVsr1nolA8jCRxzsfgnGA==", "optional": true }, "@next/swc-win32-ia32-msvc": { - "version": "12.3.2-canary.7", - "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.3.2-canary.7.tgz", - "integrity": "sha512-hr+TBDICVezyn0HDK4QootalbcuLj9F8qUzZZAw3gHz16rUDpqpnlRjw3RC99AzkKL7qMsdR/+SwnBlBY7ZK7Q==", + "version": "12.3.2-canary.10", + "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.3.2-canary.10.tgz", + "integrity": "sha512-gDhuAa/qwO0368ZfW6+YQ0xFAmCevIPihx9qIvxjKv6yCTsaryr+TqAIO6GYIx0iglfHs1V38HW2GnOJLwbFxg==", "optional": true }, "@next/swc-win32-x64-msvc": { - "version": "12.3.2-canary.7", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.3.2-canary.7.tgz", - "integrity": "sha512-1n29b6meb54h/Mw/1xPoJB682nWbtEsUQo7rFJ6G44Nj3fYFXe+XOWQxWu6Sl8yvdBXcZRhRCHuAZGqYtmqorQ==", + "version": "12.3.2-canary.10", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.3.2-canary.10.tgz", + "integrity": "sha512-6hD58PmGtJwL8ttd6c0/dX63OwDtCbQVx0CKw4a4e93K/wwKwFtwjNIhoUG1psTF3diu14kckh7W8+dsk1s4cA==", "optional": true }, "@swc/helpers": { @@ -538,24 +538,24 @@ "integrity": "sha512-s/snB+WGm6uwi0WjsZdaVcuf3KJXlfGl2LcxgwkEwJF0D/BWzVWAZW/XY4bFaiR7s0Jk3FPvlnepg1H1b1UwlA==" }, "next": { - "version": "12.3.2-canary.7", - "resolved": "https://registry.npmjs.org/next/-/next-12.3.2-canary.7.tgz", - "integrity": "sha512-zUosveWzpeRVy7j4ANoJ4gu0TBrkLYwPlIUEXrqqs/zLpHMu+tanxA1R1ts2d7h/2dSmeVZgGcHiVcHj5uspEA==", + "version": "12.3.2-canary.10", + "resolved": "https://registry.npmjs.org/next/-/next-12.3.2-canary.10.tgz", + "integrity": "sha512-73qD4QYq2rK0EDFBmdCdJq9ugo3RsWSwJKGG5IuUUaJKuIcw2m1aC5TtknReWMb90Mc+RA5+8D21+TVD/obDFA==", "requires": { - "@next/env": "12.3.2-canary.7", - "@next/swc-android-arm-eabi": "12.3.2-canary.7", - "@next/swc-android-arm64": "12.3.2-canary.7", - "@next/swc-darwin-arm64": "12.3.2-canary.7", - "@next/swc-darwin-x64": "12.3.2-canary.7", - "@next/swc-freebsd-x64": "12.3.2-canary.7", - "@next/swc-linux-arm-gnueabihf": "12.3.2-canary.7", - "@next/swc-linux-arm64-gnu": "12.3.2-canary.7", - "@next/swc-linux-arm64-musl": "12.3.2-canary.7", - "@next/swc-linux-x64-gnu": "12.3.2-canary.7", - "@next/swc-linux-x64-musl": "12.3.2-canary.7", - "@next/swc-win32-arm64-msvc": "12.3.2-canary.7", - "@next/swc-win32-ia32-msvc": "12.3.2-canary.7", - "@next/swc-win32-x64-msvc": "12.3.2-canary.7", + "@next/env": "12.3.2-canary.10", + "@next/swc-android-arm-eabi": "12.3.2-canary.10", + "@next/swc-android-arm64": "12.3.2-canary.10", + "@next/swc-darwin-arm64": "12.3.2-canary.10", + "@next/swc-darwin-x64": "12.3.2-canary.10", + "@next/swc-freebsd-x64": "12.3.2-canary.10", + "@next/swc-linux-arm-gnueabihf": "12.3.2-canary.10", + "@next/swc-linux-arm64-gnu": "12.3.2-canary.10", + "@next/swc-linux-arm64-musl": "12.3.2-canary.10", + "@next/swc-linux-x64-gnu": "12.3.2-canary.10", + "@next/swc-linux-x64-musl": "12.3.2-canary.10", + "@next/swc-win32-arm64-msvc": "12.3.2-canary.10", + "@next/swc-win32-ia32-msvc": "12.3.2-canary.10", + "@next/swc-win32-x64-msvc": "12.3.2-canary.10", "@swc/helpers": "0.4.11", "caniuse-lite": "^1.0.30001406", "postcss": "8.4.14", @@ -586,26 +586,26 @@ } }, "react": { - "version": "0.0.0-experimental-d1bb1c586-20220922", - "resolved": "https://registry.npmjs.org/react/-/react-0.0.0-experimental-d1bb1c586-20220922.tgz", - "integrity": "sha512-aFOawqqDYFCR/U8BkgZxJxhmA6Y7jh+kW1Ppu7GegWYa0D/3kDqN8oTQchox3D9xJvn3+3bFsAVd/imHVuMUzQ==", + "version": "0.0.0-experimental-cb5084d1c-20220924", + "resolved": "https://registry.npmjs.org/react/-/react-0.0.0-experimental-cb5084d1c-20220924.tgz", + "integrity": "sha512-66AdfxkJrwCaCEKT0LQRd9J9GQ9T+yN7Wx9XT+tNxKycYQ0Exm+DZxOTedagWDlsFMXroyhrTWzgdC18R2PaOQ==", "requires": { "loose-envify": "^1.1.0" } }, "react-dom": { - "version": "0.0.0-experimental-d1bb1c586-20220922", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-0.0.0-experimental-d1bb1c586-20220922.tgz", - "integrity": "sha512-GhgCgS11VYg7yfnGj0tvRo1G+CHHyEWnvLbfxhB29CMDpDzo2SM1UKbh2urklnF56m8AS8QBj5tjLtkLtovgGg==", + "version": "0.0.0-experimental-cb5084d1c-20220924", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-0.0.0-experimental-cb5084d1c-20220924.tgz", + "integrity": "sha512-0IHzPGHESn3uu8nI1w5596GX8bCGCE94DpaHkKSGWOlB6uhoVecU0fyOCkkNuB4cMc9WeOWiH2gsM100EWZDPQ==", "requires": { "loose-envify": "^1.1.0", - "scheduler": "0.0.0-experimental-d1bb1c586-20220922" + "scheduler": "0.0.0-experimental-cb5084d1c-20220924" } }, "scheduler": { - "version": "0.0.0-experimental-d1bb1c586-20220922", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.0.0-experimental-d1bb1c586-20220922.tgz", - "integrity": "sha512-2TpBDk+haQkt2hyaJAnJ9dLdQqbMDxP4ay7C/RgvxVlZ9LWjPi1gjhOPsIcbvt64PUjHsI3lYuMoxKGwcMtxjw==", + "version": "0.0.0-experimental-cb5084d1c-20220924", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.0.0-experimental-cb5084d1c-20220924.tgz", + "integrity": "sha512-SeszKCdhM5OHxNMStjpKIAaloARUMZqIpDZjkZeGuRsyr7YlAqvlsCXyee4ZQOOU1pbr7BIvQntKy5Hil+DQJA==", "requires": { "loose-envify": "^1.1.0" } diff --git a/demos/app-dir/package.json b/demos/app-dir/package.json index 9924f321fc..ac52830a3f 100644 --- a/demos/app-dir/package.json +++ b/demos/app-dir/package.json @@ -9,8 +9,8 @@ "license": "MIT", "dependencies": { "nanoid": "^2.1.11", - "next": "^12.3.2-canary.7", - "react": "^0.0.0-experimental-d1bb1c586-20220922", - "react-dom": "^0.0.0-experimental-d1bb1c586-20220922" + "next": "12.3.2-canary.10", + "react": "0.0.0-experimental-cb5084d1c-20220924", + "react-dom": "0.0.0-experimental-cb5084d1c-20220924" } } diff --git a/packages/runtime/src/helpers/config.ts b/packages/runtime/src/helpers/config.ts index 09902a0615..0bcc775044 100644 --- a/packages/runtime/src/helpers/config.ts +++ b/packages/runtime/src/helpers/config.ts @@ -90,7 +90,7 @@ export const configureHandlerFunctions = async ({ netlifyConfig, publish, ignore /* eslint-enable no-underscore-dangle */ ;[HANDLER_FUNCTION_NAME, ODB_FUNCTION_NAME].forEach((functionName) => { - netlifyConfig.functions[functionName] ||= { included_files: [], external_node_modules: [] } + netlifyConfig.functions[functionName] ||= { included_files: [], external_node_modules: ['react', 'react-dom'] } netlifyConfig.functions[functionName].node_bundler = 'nft' netlifyConfig.functions[functionName].included_files ||= [] netlifyConfig.functions[functionName].included_files.push( From 232181696b42c6963bf2dfbecdb99347e204b8dc Mon Sep 17 00:00:00 2001 From: Matt Kane Date: Tue, 27 Sep 2022 11:45:12 +0100 Subject: [PATCH 008/172] fix: update patch syntax --- packages/runtime/src/helpers/edge.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/runtime/src/helpers/edge.ts b/packages/runtime/src/helpers/edge.ts index e668a658e2..93407c0a49 100644 --- a/packages/runtime/src/helpers/edge.ts +++ b/packages/runtime/src/helpers/edge.ts @@ -99,7 +99,7 @@ const getMiddlewareBundle = async ({ let data = await fs.readFile(filePath, 'utf8') data = IMPORT_UNSUPPORTED.reduce( - (acc, val) => acc.replace(val, `if(!('__import_unsupported' in globalThis)) ${val}`), + (acc, val) => acc.replace(val, `('__import_unsupported' in globalThis)||${val}`), data, ) chunks.push('{', data, '}') From 1492d06e1924bf8c2a271e305492fec610dcdd23 Mon Sep 17 00:00:00 2001 From: Matt Kane Date: Tue, 27 Sep 2022 16:53:20 +0100 Subject: [PATCH 009/172] fix: include file itself in deps --- packages/runtime/src/templates/getPageResolver.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/runtime/src/templates/getPageResolver.ts b/packages/runtime/src/templates/getPageResolver.ts index 0fd28f60fe..6928b8d59a 100644 --- a/packages/runtime/src/templates/getPageResolver.ts +++ b/packages/runtime/src/templates/getPageResolver.ts @@ -14,13 +14,16 @@ export const getPageResolver = async ({ publish, target }: { publish: string; ta const functionDir = posix.resolve(posix.join('.netlify', 'functions', HANDLER_FUNCTION_NAME)) const root = posix.resolve(slash(publish), target === 'server' ? 'server' : 'serverless') - const pages = await glob('{pages,app}/**/*.js.nft.json', { + const pages = await glob('{pages,app}/**/*.{js.nft.json,js}', { cwd: root, dot: true, }) const dependencies = await Promise.all( pages.map(async (page) => { + if (page.endsWith('.js')) { + return posix.join(root, page) + } const dir = posix.dirname(page) const { files } = await readJSON(posix.join(root, page)) return files.map((file) => posix.resolve(root, dir, file)) From 38e118cd84796b59caa88e908186418bf6f659b4 Mon Sep 17 00:00:00 2001 From: Matt Kane Date: Wed, 28 Sep 2022 09:45:17 +0100 Subject: [PATCH 010/172] chore: upgrade next and remove workaround --- demos/app-dir/package-lock.json | 284 +++++++++--------- demos/app-dir/package.json | 6 +- .../runtime/src/templates/getPageResolver.ts | 5 +- 3 files changed, 146 insertions(+), 149 deletions(-) diff --git a/demos/app-dir/package-lock.json b/demos/app-dir/package-lock.json index 582d2cf1ec..20fc897f01 100644 --- a/demos/app-dir/package-lock.json +++ b/demos/app-dir/package-lock.json @@ -10,20 +10,20 @@ "license": "MIT", "dependencies": { "nanoid": "^2.1.11", - "next": "12.3.2-canary.10", - "react": "0.0.0-experimental-cb5084d1c-20220924", - "react-dom": "0.0.0-experimental-cb5084d1c-20220924" + "next": "12.3.2-canary.11", + "react": "0.0.0-experimental-ae7ad8b4c-20220927", + "react-dom": "0.0.0-experimental-ae7ad8b4c-20220927" } }, "node_modules/@next/env": { - "version": "12.3.2-canary.10", - "resolved": "https://registry.npmjs.org/@next/env/-/env-12.3.2-canary.10.tgz", - "integrity": "sha512-7rG2MNCCVpApBZL9ynv2qmQTaqgMv++EsAEZAhQudvOP6MILvscw02Tr5Hl7W+mlXEIZiLqx3Xq47AEhscBxUQ==" + "version": "12.3.2-canary.11", + "resolved": "https://registry.npmjs.org/@next/env/-/env-12.3.2-canary.11.tgz", + "integrity": "sha512-XEV5JwAu7l7OygEeYxasX0Zu7LNqCZfRKeSsm3o6hSLzQSuvLsO49giKnrx9+TJXSalpj9bDbqaCpH3iuROesA==" }, "node_modules/@next/swc-android-arm-eabi": { - "version": "12.3.2-canary.10", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.3.2-canary.10.tgz", - "integrity": "sha512-LJXE7Ynf0EcJrf0aeit9etXh2Xgm4QTqxryaUEhha41Y0oRosDnpgAk0kwRPhl6wfd9rRfJ9lPFeEKpNhJNrzQ==", + "version": "12.3.2-canary.11", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.3.2-canary.11.tgz", + "integrity": "sha512-xFdBf2AnRxJiRo4pp61zC5azxSkdjeNF86bLGfa3tiGNYkNVjrJZzqx2TUzBhzRBatrPe9nl9FSTaRRP31cZLw==", "cpu": [ "arm" ], @@ -36,9 +36,9 @@ } }, "node_modules/@next/swc-android-arm64": { - "version": "12.3.2-canary.10", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-12.3.2-canary.10.tgz", - "integrity": "sha512-8tg8M/aMaQ514+kK5ToEMI9KhGMtMHoECwftqDR/aHf0H9q5ab9Z+4OU9zPyesJV3VBVQqWjbpVbRg/NtC793A==", + "version": "12.3.2-canary.11", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-12.3.2-canary.11.tgz", + "integrity": "sha512-T/nVC6ojHG9hXVuejDTc6fcyUR78vDUbN+pmrGFYrjfPUWYt+bFDwRguGOXydWdJj3jyRkL9YyMmNZf0wuzheg==", "cpu": [ "arm64" ], @@ -51,9 +51,9 @@ } }, "node_modules/@next/swc-darwin-arm64": { - "version": "12.3.2-canary.10", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.3.2-canary.10.tgz", - "integrity": "sha512-658MHgcosaIddRUYiv9fVcz/pBKm2cOHGxG2+Rdqe4SP8MYp6xjrzdFJv59fylqhj82pJaI3yQjBCAVFCCA/4w==", + "version": "12.3.2-canary.11", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.3.2-canary.11.tgz", + "integrity": "sha512-HLebVmk8U7VfSTcro/vYrhvw2v85Uic48Y9z3TMiWakJoG1gBNEHuPnJXNLJJEWrpdc1rjP0n/7Jl6xofMGQMA==", "cpu": [ "arm64" ], @@ -66,9 +66,9 @@ } }, "node_modules/@next/swc-darwin-x64": { - "version": "12.3.2-canary.10", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.3.2-canary.10.tgz", - "integrity": "sha512-hcxRbzW2+o9o28r9/GyLZxDehHh1DGGmr5qMeJKHCKZeAB2nxjb1embSrfjnn4046vOyhBTzOP6Hn4eL+VImdg==", + "version": "12.3.2-canary.11", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.3.2-canary.11.tgz", + "integrity": "sha512-gkpGaFDy8i90ll9USTMXHBuHmWbvpeCJxoSsWnAQuJZcUIZATL0iovdjjAvHh4cj5xWQpGXdGAJpL5ss4b2Pyw==", "cpu": [ "x64" ], @@ -81,9 +81,9 @@ } }, "node_modules/@next/swc-freebsd-x64": { - "version": "12.3.2-canary.10", - "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.3.2-canary.10.tgz", - "integrity": "sha512-H2WpBaTSaX/lZZLhQRFE2qouLyZUSAk8QlciHbcut3URC8o3uQ5sHvUxWEzm1ZkP3s0YvOA05PN1E/haYVAibw==", + "version": "12.3.2-canary.11", + "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.3.2-canary.11.tgz", + "integrity": "sha512-jTqkb3HN+PXlpXTzBEUhWnR9XA+Uj1vpjSx9jc+Lrl3esyzzKONqTNz4RRbOwDvU2TygQr+oaQqtdZAnj88d7w==", "cpu": [ "x64" ], @@ -96,9 +96,9 @@ } }, "node_modules/@next/swc-linux-arm-gnueabihf": { - "version": "12.3.2-canary.10", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.3.2-canary.10.tgz", - "integrity": "sha512-w5UHRvOMj4QS2uM0mWpd1ztIniRoMeMzsZ8CmAX3AbP7cyzuPskIB1/j6mduYEeIgQzJEXO9a1+KlHz48Y2OuQ==", + "version": "12.3.2-canary.11", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.3.2-canary.11.tgz", + "integrity": "sha512-Nt4qARbZozu7UeFpUfrJuKg6g6BCjYnAfKcDCLxAnDONrMoqIEkIVQmntH2i1GPwtp37qTaPG6v4TnJHGNBSOQ==", "cpu": [ "arm" ], @@ -111,9 +111,9 @@ } }, "node_modules/@next/swc-linux-arm64-gnu": { - "version": "12.3.2-canary.10", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.3.2-canary.10.tgz", - "integrity": "sha512-Ee3frTrn6P8RLhCiRjjWik/ZRQ0wyae2AT/eGcDv7XovWapJNJy1f+mdeVzQLBmphVechmeTUOmXmBPRB4O4eg==", + "version": "12.3.2-canary.11", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.3.2-canary.11.tgz", + "integrity": "sha512-8l0Ma2zIiTTTo042NMCYFlkIyGeFdpAtU2qTkIuJX9sBdffq9m/uHtnkv8R0u5myakn/5fkncojVx4uNRBGePg==", "cpu": [ "arm64" ], @@ -126,9 +126,9 @@ } }, "node_modules/@next/swc-linux-arm64-musl": { - "version": "12.3.2-canary.10", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.3.2-canary.10.tgz", - "integrity": "sha512-NTKDNpJXyhPn3rvuXeIAc27Y0WhqKIOvkHD3mxuVp2N4Eu2FyuSxth37Pl8daJkMUQFRaLtlO6Yy9GSH+KAADA==", + "version": "12.3.2-canary.11", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.3.2-canary.11.tgz", + "integrity": "sha512-hOoWctziJqYNw0+RY3GR2og+Qr2ykgtIORKEZGHx9OAyg+dRLxJISHWv9umaAjE8Hoi7V0cS841XQ1B6XTnoKA==", "cpu": [ "arm64" ], @@ -141,9 +141,9 @@ } }, "node_modules/@next/swc-linux-x64-gnu": { - "version": "12.3.2-canary.10", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.3.2-canary.10.tgz", - "integrity": "sha512-OqIImNj10SiKwVMPbWaecTK/ZpSCDApcuF2OCyaf6dchnCZCBh8uNHTteU+IFwR4gaU5AUKLl9gKntRuIQYUFw==", + "version": "12.3.2-canary.11", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.3.2-canary.11.tgz", + "integrity": "sha512-to03IoMs8v971yVFGm2Og7x6Z5LSPMzeFQikLqpUNS1lmk5Kha4vju4Ojc8nqEyPShojMhkbkjSH6sXbeCb+ZA==", "cpu": [ "x64" ], @@ -156,9 +156,9 @@ } }, "node_modules/@next/swc-linux-x64-musl": { - "version": "12.3.2-canary.10", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.3.2-canary.10.tgz", - "integrity": "sha512-pwVshTffMIrls2J4/+7eowjdEOZbPWqJlTmVDoWMLiVp5O4aovYbwkd6/BrK83kMe+ZT/8FhGUiDyeku1zxG+w==", + "version": "12.3.2-canary.11", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.3.2-canary.11.tgz", + "integrity": "sha512-gSitcSo6PFzI/WHLLfRcLin6y1KLEADliLdFwHy7luotsrcalxjIWPD6tFqIZ7ajRjCZ02uY+lIPJ/FPhX3b8w==", "cpu": [ "x64" ], @@ -171,9 +171,9 @@ } }, "node_modules/@next/swc-win32-arm64-msvc": { - "version": "12.3.2-canary.10", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.3.2-canary.10.tgz", - "integrity": "sha512-8sqHyd2TKFNGcetF5973ai4xdgkUXqHjBKOXi32CE1TUomOZaBKn8Ry0PCq4n8FEOyVsr1nolA8jCRxzsfgnGA==", + "version": "12.3.2-canary.11", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.3.2-canary.11.tgz", + "integrity": "sha512-o4F0/cS/7qBOSz+F3A1iPBqbhNOpJB8cJZnhViTW6BeFQm9pnRXDm8FZyNup3yHdSy33wqtjLNYTPADvm+GsFQ==", "cpu": [ "arm64" ], @@ -186,9 +186,9 @@ } }, "node_modules/@next/swc-win32-ia32-msvc": { - "version": "12.3.2-canary.10", - "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.3.2-canary.10.tgz", - "integrity": "sha512-gDhuAa/qwO0368ZfW6+YQ0xFAmCevIPihx9qIvxjKv6yCTsaryr+TqAIO6GYIx0iglfHs1V38HW2GnOJLwbFxg==", + "version": "12.3.2-canary.11", + "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.3.2-canary.11.tgz", + "integrity": "sha512-/FSdl4+4YFsrycKrM5N+4khxKR7rKIO4tiai+MLAN7zi9GA+2qFoxxkQdWSQTBr09lE+eacZ3r3TppO7ztNmQg==", "cpu": [ "ia32" ], @@ -201,9 +201,9 @@ } }, "node_modules/@next/swc-win32-x64-msvc": { - "version": "12.3.2-canary.10", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.3.2-canary.10.tgz", - "integrity": "sha512-6hD58PmGtJwL8ttd6c0/dX63OwDtCbQVx0CKw4a4e93K/wwKwFtwjNIhoUG1psTF3diu14kckh7W8+dsk1s4cA==", + "version": "12.3.2-canary.11", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.3.2-canary.11.tgz", + "integrity": "sha512-/VioJDSK5TYea84zu6Qu5tCngCkAMNhPuVJ+3cmDGcM9H+tq0LiStVlW3efGUV+R4DyHg8GymWHpMXVjm6UIDg==", "cpu": [ "x64" ], @@ -260,11 +260,11 @@ "integrity": "sha512-s/snB+WGm6uwi0WjsZdaVcuf3KJXlfGl2LcxgwkEwJF0D/BWzVWAZW/XY4bFaiR7s0Jk3FPvlnepg1H1b1UwlA==" }, "node_modules/next": { - "version": "12.3.2-canary.10", - "resolved": "https://registry.npmjs.org/next/-/next-12.3.2-canary.10.tgz", - "integrity": "sha512-73qD4QYq2rK0EDFBmdCdJq9ugo3RsWSwJKGG5IuUUaJKuIcw2m1aC5TtknReWMb90Mc+RA5+8D21+TVD/obDFA==", + "version": "12.3.2-canary.11", + "resolved": "https://registry.npmjs.org/next/-/next-12.3.2-canary.11.tgz", + "integrity": "sha512-LBPr3z2xn+djEnkdajLJKqZimXyfHjpKmReyMAEuyk+2rZ1WICQYV5QOh2vhXqPxwiqqardX7VjuiBXkQeR1Qg==", "dependencies": { - "@next/env": "12.3.2-canary.10", + "@next/env": "12.3.2-canary.11", "@swc/helpers": "0.4.11", "caniuse-lite": "^1.0.30001406", "postcss": "8.4.14", @@ -278,19 +278,19 @@ "node": ">=12.22.0" }, "optionalDependencies": { - "@next/swc-android-arm-eabi": "12.3.2-canary.10", - "@next/swc-android-arm64": "12.3.2-canary.10", - "@next/swc-darwin-arm64": "12.3.2-canary.10", - "@next/swc-darwin-x64": "12.3.2-canary.10", - "@next/swc-freebsd-x64": "12.3.2-canary.10", - "@next/swc-linux-arm-gnueabihf": "12.3.2-canary.10", - "@next/swc-linux-arm64-gnu": "12.3.2-canary.10", - "@next/swc-linux-arm64-musl": "12.3.2-canary.10", - "@next/swc-linux-x64-gnu": "12.3.2-canary.10", - "@next/swc-linux-x64-musl": "12.3.2-canary.10", - "@next/swc-win32-arm64-msvc": "12.3.2-canary.10", - "@next/swc-win32-ia32-msvc": "12.3.2-canary.10", - "@next/swc-win32-x64-msvc": "12.3.2-canary.10" + "@next/swc-android-arm-eabi": "12.3.2-canary.11", + "@next/swc-android-arm64": "12.3.2-canary.11", + "@next/swc-darwin-arm64": "12.3.2-canary.11", + "@next/swc-darwin-x64": "12.3.2-canary.11", + "@next/swc-freebsd-x64": "12.3.2-canary.11", + "@next/swc-linux-arm-gnueabihf": "12.3.2-canary.11", + "@next/swc-linux-arm64-gnu": "12.3.2-canary.11", + "@next/swc-linux-arm64-musl": "12.3.2-canary.11", + "@next/swc-linux-x64-gnu": "12.3.2-canary.11", + "@next/swc-linux-x64-musl": "12.3.2-canary.11", + "@next/swc-win32-arm64-msvc": "12.3.2-canary.11", + "@next/swc-win32-ia32-msvc": "12.3.2-canary.11", + "@next/swc-win32-x64-msvc": "12.3.2-canary.11" }, "peerDependencies": { "fibers": ">= 3.1.0", @@ -351,9 +351,9 @@ } }, "node_modules/react": { - "version": "0.0.0-experimental-cb5084d1c-20220924", - "resolved": "https://registry.npmjs.org/react/-/react-0.0.0-experimental-cb5084d1c-20220924.tgz", - "integrity": "sha512-66AdfxkJrwCaCEKT0LQRd9J9GQ9T+yN7Wx9XT+tNxKycYQ0Exm+DZxOTedagWDlsFMXroyhrTWzgdC18R2PaOQ==", + "version": "0.0.0-experimental-ae7ad8b4c-20220927", + "resolved": "https://registry.npmjs.org/react/-/react-0.0.0-experimental-ae7ad8b4c-20220927.tgz", + "integrity": "sha512-Fl0Cbo7/nsZpP0DXx1BmyxfG698WcWwXc3FPrRiE1QwuYQX20DSIYyLVG0dYnhgvjCeDwqa5+iB1pY7oiPsYrQ==", "dependencies": { "loose-envify": "^1.1.0" }, @@ -362,21 +362,21 @@ } }, "node_modules/react-dom": { - "version": "0.0.0-experimental-cb5084d1c-20220924", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-0.0.0-experimental-cb5084d1c-20220924.tgz", - "integrity": "sha512-0IHzPGHESn3uu8nI1w5596GX8bCGCE94DpaHkKSGWOlB6uhoVecU0fyOCkkNuB4cMc9WeOWiH2gsM100EWZDPQ==", + "version": "0.0.0-experimental-ae7ad8b4c-20220927", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-0.0.0-experimental-ae7ad8b4c-20220927.tgz", + "integrity": "sha512-sDbnAhUleyQzdQ4HJKDml3l62Rct7JcHbIVWX4hLmnFs+oskCUrMfs7eCC9UVCBWC2+huUpZCiD69x44m+l2+A==", "dependencies": { "loose-envify": "^1.1.0", - "scheduler": "0.0.0-experimental-cb5084d1c-20220924" + "scheduler": "0.0.0-experimental-ae7ad8b4c-20220927" }, "peerDependencies": { - "react": "0.0.0-experimental-cb5084d1c-20220924" + "react": "0.0.0-experimental-ae7ad8b4c-20220927" } }, "node_modules/scheduler": { - "version": "0.0.0-experimental-cb5084d1c-20220924", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.0.0-experimental-cb5084d1c-20220924.tgz", - "integrity": "sha512-SeszKCdhM5OHxNMStjpKIAaloARUMZqIpDZjkZeGuRsyr7YlAqvlsCXyee4ZQOOU1pbr7BIvQntKy5Hil+DQJA==", + "version": "0.0.0-experimental-ae7ad8b4c-20220927", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.0.0-experimental-ae7ad8b4c-20220927.tgz", + "integrity": "sha512-0sMHQklwZ6WbISng47exj1LeAAZkqYVaBOjmywwyjeyWGwNpLx526/DNZVgdE5/a79FhZRQ7bhfuFdCmC5B4aQ==", "dependencies": { "loose-envify": "^1.1.0" } @@ -424,86 +424,86 @@ }, "dependencies": { "@next/env": { - "version": "12.3.2-canary.10", - "resolved": "https://registry.npmjs.org/@next/env/-/env-12.3.2-canary.10.tgz", - "integrity": "sha512-7rG2MNCCVpApBZL9ynv2qmQTaqgMv++EsAEZAhQudvOP6MILvscw02Tr5Hl7W+mlXEIZiLqx3Xq47AEhscBxUQ==" + "version": "12.3.2-canary.11", + "resolved": "https://registry.npmjs.org/@next/env/-/env-12.3.2-canary.11.tgz", + "integrity": "sha512-XEV5JwAu7l7OygEeYxasX0Zu7LNqCZfRKeSsm3o6hSLzQSuvLsO49giKnrx9+TJXSalpj9bDbqaCpH3iuROesA==" }, "@next/swc-android-arm-eabi": { - "version": "12.3.2-canary.10", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.3.2-canary.10.tgz", - "integrity": "sha512-LJXE7Ynf0EcJrf0aeit9etXh2Xgm4QTqxryaUEhha41Y0oRosDnpgAk0kwRPhl6wfd9rRfJ9lPFeEKpNhJNrzQ==", + "version": "12.3.2-canary.11", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.3.2-canary.11.tgz", + "integrity": "sha512-xFdBf2AnRxJiRo4pp61zC5azxSkdjeNF86bLGfa3tiGNYkNVjrJZzqx2TUzBhzRBatrPe9nl9FSTaRRP31cZLw==", "optional": true }, "@next/swc-android-arm64": { - "version": "12.3.2-canary.10", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-12.3.2-canary.10.tgz", - "integrity": "sha512-8tg8M/aMaQ514+kK5ToEMI9KhGMtMHoECwftqDR/aHf0H9q5ab9Z+4OU9zPyesJV3VBVQqWjbpVbRg/NtC793A==", + "version": "12.3.2-canary.11", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-12.3.2-canary.11.tgz", + "integrity": "sha512-T/nVC6ojHG9hXVuejDTc6fcyUR78vDUbN+pmrGFYrjfPUWYt+bFDwRguGOXydWdJj3jyRkL9YyMmNZf0wuzheg==", "optional": true }, "@next/swc-darwin-arm64": { - "version": "12.3.2-canary.10", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.3.2-canary.10.tgz", - "integrity": "sha512-658MHgcosaIddRUYiv9fVcz/pBKm2cOHGxG2+Rdqe4SP8MYp6xjrzdFJv59fylqhj82pJaI3yQjBCAVFCCA/4w==", + "version": "12.3.2-canary.11", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.3.2-canary.11.tgz", + "integrity": "sha512-HLebVmk8U7VfSTcro/vYrhvw2v85Uic48Y9z3TMiWakJoG1gBNEHuPnJXNLJJEWrpdc1rjP0n/7Jl6xofMGQMA==", "optional": true }, "@next/swc-darwin-x64": { - "version": "12.3.2-canary.10", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.3.2-canary.10.tgz", - "integrity": "sha512-hcxRbzW2+o9o28r9/GyLZxDehHh1DGGmr5qMeJKHCKZeAB2nxjb1embSrfjnn4046vOyhBTzOP6Hn4eL+VImdg==", + "version": "12.3.2-canary.11", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.3.2-canary.11.tgz", + "integrity": "sha512-gkpGaFDy8i90ll9USTMXHBuHmWbvpeCJxoSsWnAQuJZcUIZATL0iovdjjAvHh4cj5xWQpGXdGAJpL5ss4b2Pyw==", "optional": true }, "@next/swc-freebsd-x64": { - "version": "12.3.2-canary.10", - "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.3.2-canary.10.tgz", - "integrity": "sha512-H2WpBaTSaX/lZZLhQRFE2qouLyZUSAk8QlciHbcut3URC8o3uQ5sHvUxWEzm1ZkP3s0YvOA05PN1E/haYVAibw==", + "version": "12.3.2-canary.11", + "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.3.2-canary.11.tgz", + "integrity": "sha512-jTqkb3HN+PXlpXTzBEUhWnR9XA+Uj1vpjSx9jc+Lrl3esyzzKONqTNz4RRbOwDvU2TygQr+oaQqtdZAnj88d7w==", "optional": true }, "@next/swc-linux-arm-gnueabihf": { - "version": "12.3.2-canary.10", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.3.2-canary.10.tgz", - "integrity": "sha512-w5UHRvOMj4QS2uM0mWpd1ztIniRoMeMzsZ8CmAX3AbP7cyzuPskIB1/j6mduYEeIgQzJEXO9a1+KlHz48Y2OuQ==", + "version": "12.3.2-canary.11", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.3.2-canary.11.tgz", + "integrity": "sha512-Nt4qARbZozu7UeFpUfrJuKg6g6BCjYnAfKcDCLxAnDONrMoqIEkIVQmntH2i1GPwtp37qTaPG6v4TnJHGNBSOQ==", "optional": true }, "@next/swc-linux-arm64-gnu": { - "version": "12.3.2-canary.10", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.3.2-canary.10.tgz", - "integrity": "sha512-Ee3frTrn6P8RLhCiRjjWik/ZRQ0wyae2AT/eGcDv7XovWapJNJy1f+mdeVzQLBmphVechmeTUOmXmBPRB4O4eg==", + "version": "12.3.2-canary.11", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.3.2-canary.11.tgz", + "integrity": "sha512-8l0Ma2zIiTTTo042NMCYFlkIyGeFdpAtU2qTkIuJX9sBdffq9m/uHtnkv8R0u5myakn/5fkncojVx4uNRBGePg==", "optional": true }, "@next/swc-linux-arm64-musl": { - "version": "12.3.2-canary.10", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.3.2-canary.10.tgz", - "integrity": "sha512-NTKDNpJXyhPn3rvuXeIAc27Y0WhqKIOvkHD3mxuVp2N4Eu2FyuSxth37Pl8daJkMUQFRaLtlO6Yy9GSH+KAADA==", + "version": "12.3.2-canary.11", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.3.2-canary.11.tgz", + "integrity": "sha512-hOoWctziJqYNw0+RY3GR2og+Qr2ykgtIORKEZGHx9OAyg+dRLxJISHWv9umaAjE8Hoi7V0cS841XQ1B6XTnoKA==", "optional": true }, "@next/swc-linux-x64-gnu": { - "version": "12.3.2-canary.10", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.3.2-canary.10.tgz", - "integrity": "sha512-OqIImNj10SiKwVMPbWaecTK/ZpSCDApcuF2OCyaf6dchnCZCBh8uNHTteU+IFwR4gaU5AUKLl9gKntRuIQYUFw==", + "version": "12.3.2-canary.11", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.3.2-canary.11.tgz", + "integrity": "sha512-to03IoMs8v971yVFGm2Og7x6Z5LSPMzeFQikLqpUNS1lmk5Kha4vju4Ojc8nqEyPShojMhkbkjSH6sXbeCb+ZA==", "optional": true }, "@next/swc-linux-x64-musl": { - "version": "12.3.2-canary.10", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.3.2-canary.10.tgz", - "integrity": "sha512-pwVshTffMIrls2J4/+7eowjdEOZbPWqJlTmVDoWMLiVp5O4aovYbwkd6/BrK83kMe+ZT/8FhGUiDyeku1zxG+w==", + "version": "12.3.2-canary.11", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.3.2-canary.11.tgz", + "integrity": "sha512-gSitcSo6PFzI/WHLLfRcLin6y1KLEADliLdFwHy7luotsrcalxjIWPD6tFqIZ7ajRjCZ02uY+lIPJ/FPhX3b8w==", "optional": true }, "@next/swc-win32-arm64-msvc": { - "version": "12.3.2-canary.10", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.3.2-canary.10.tgz", - "integrity": "sha512-8sqHyd2TKFNGcetF5973ai4xdgkUXqHjBKOXi32CE1TUomOZaBKn8Ry0PCq4n8FEOyVsr1nolA8jCRxzsfgnGA==", + "version": "12.3.2-canary.11", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.3.2-canary.11.tgz", + "integrity": "sha512-o4F0/cS/7qBOSz+F3A1iPBqbhNOpJB8cJZnhViTW6BeFQm9pnRXDm8FZyNup3yHdSy33wqtjLNYTPADvm+GsFQ==", "optional": true }, "@next/swc-win32-ia32-msvc": { - "version": "12.3.2-canary.10", - "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.3.2-canary.10.tgz", - "integrity": "sha512-gDhuAa/qwO0368ZfW6+YQ0xFAmCevIPihx9qIvxjKv6yCTsaryr+TqAIO6GYIx0iglfHs1V38HW2GnOJLwbFxg==", + "version": "12.3.2-canary.11", + "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.3.2-canary.11.tgz", + "integrity": "sha512-/FSdl4+4YFsrycKrM5N+4khxKR7rKIO4tiai+MLAN7zi9GA+2qFoxxkQdWSQTBr09lE+eacZ3r3TppO7ztNmQg==", "optional": true }, "@next/swc-win32-x64-msvc": { - "version": "12.3.2-canary.10", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.3.2-canary.10.tgz", - "integrity": "sha512-6hD58PmGtJwL8ttd6c0/dX63OwDtCbQVx0CKw4a4e93K/wwKwFtwjNIhoUG1psTF3diu14kckh7W8+dsk1s4cA==", + "version": "12.3.2-canary.11", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.3.2-canary.11.tgz", + "integrity": "sha512-/VioJDSK5TYea84zu6Qu5tCngCkAMNhPuVJ+3cmDGcM9H+tq0LiStVlW3efGUV+R4DyHg8GymWHpMXVjm6UIDg==", "optional": true }, "@swc/helpers": { @@ -538,24 +538,24 @@ "integrity": "sha512-s/snB+WGm6uwi0WjsZdaVcuf3KJXlfGl2LcxgwkEwJF0D/BWzVWAZW/XY4bFaiR7s0Jk3FPvlnepg1H1b1UwlA==" }, "next": { - "version": "12.3.2-canary.10", - "resolved": "https://registry.npmjs.org/next/-/next-12.3.2-canary.10.tgz", - "integrity": "sha512-73qD4QYq2rK0EDFBmdCdJq9ugo3RsWSwJKGG5IuUUaJKuIcw2m1aC5TtknReWMb90Mc+RA5+8D21+TVD/obDFA==", + "version": "12.3.2-canary.11", + "resolved": "https://registry.npmjs.org/next/-/next-12.3.2-canary.11.tgz", + "integrity": "sha512-LBPr3z2xn+djEnkdajLJKqZimXyfHjpKmReyMAEuyk+2rZ1WICQYV5QOh2vhXqPxwiqqardX7VjuiBXkQeR1Qg==", "requires": { - "@next/env": "12.3.2-canary.10", - "@next/swc-android-arm-eabi": "12.3.2-canary.10", - "@next/swc-android-arm64": "12.3.2-canary.10", - "@next/swc-darwin-arm64": "12.3.2-canary.10", - "@next/swc-darwin-x64": "12.3.2-canary.10", - "@next/swc-freebsd-x64": "12.3.2-canary.10", - "@next/swc-linux-arm-gnueabihf": "12.3.2-canary.10", - "@next/swc-linux-arm64-gnu": "12.3.2-canary.10", - "@next/swc-linux-arm64-musl": "12.3.2-canary.10", - "@next/swc-linux-x64-gnu": "12.3.2-canary.10", - "@next/swc-linux-x64-musl": "12.3.2-canary.10", - "@next/swc-win32-arm64-msvc": "12.3.2-canary.10", - "@next/swc-win32-ia32-msvc": "12.3.2-canary.10", - "@next/swc-win32-x64-msvc": "12.3.2-canary.10", + "@next/env": "12.3.2-canary.11", + "@next/swc-android-arm-eabi": "12.3.2-canary.11", + "@next/swc-android-arm64": "12.3.2-canary.11", + "@next/swc-darwin-arm64": "12.3.2-canary.11", + "@next/swc-darwin-x64": "12.3.2-canary.11", + "@next/swc-freebsd-x64": "12.3.2-canary.11", + "@next/swc-linux-arm-gnueabihf": "12.3.2-canary.11", + "@next/swc-linux-arm64-gnu": "12.3.2-canary.11", + "@next/swc-linux-arm64-musl": "12.3.2-canary.11", + "@next/swc-linux-x64-gnu": "12.3.2-canary.11", + "@next/swc-linux-x64-musl": "12.3.2-canary.11", + "@next/swc-win32-arm64-msvc": "12.3.2-canary.11", + "@next/swc-win32-ia32-msvc": "12.3.2-canary.11", + "@next/swc-win32-x64-msvc": "12.3.2-canary.11", "@swc/helpers": "0.4.11", "caniuse-lite": "^1.0.30001406", "postcss": "8.4.14", @@ -586,26 +586,26 @@ } }, "react": { - "version": "0.0.0-experimental-cb5084d1c-20220924", - "resolved": "https://registry.npmjs.org/react/-/react-0.0.0-experimental-cb5084d1c-20220924.tgz", - "integrity": "sha512-66AdfxkJrwCaCEKT0LQRd9J9GQ9T+yN7Wx9XT+tNxKycYQ0Exm+DZxOTedagWDlsFMXroyhrTWzgdC18R2PaOQ==", + "version": "0.0.0-experimental-ae7ad8b4c-20220927", + "resolved": "https://registry.npmjs.org/react/-/react-0.0.0-experimental-ae7ad8b4c-20220927.tgz", + "integrity": "sha512-Fl0Cbo7/nsZpP0DXx1BmyxfG698WcWwXc3FPrRiE1QwuYQX20DSIYyLVG0dYnhgvjCeDwqa5+iB1pY7oiPsYrQ==", "requires": { "loose-envify": "^1.1.0" } }, "react-dom": { - "version": "0.0.0-experimental-cb5084d1c-20220924", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-0.0.0-experimental-cb5084d1c-20220924.tgz", - "integrity": "sha512-0IHzPGHESn3uu8nI1w5596GX8bCGCE94DpaHkKSGWOlB6uhoVecU0fyOCkkNuB4cMc9WeOWiH2gsM100EWZDPQ==", + "version": "0.0.0-experimental-ae7ad8b4c-20220927", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-0.0.0-experimental-ae7ad8b4c-20220927.tgz", + "integrity": "sha512-sDbnAhUleyQzdQ4HJKDml3l62Rct7JcHbIVWX4hLmnFs+oskCUrMfs7eCC9UVCBWC2+huUpZCiD69x44m+l2+A==", "requires": { "loose-envify": "^1.1.0", - "scheduler": "0.0.0-experimental-cb5084d1c-20220924" + "scheduler": "0.0.0-experimental-ae7ad8b4c-20220927" } }, "scheduler": { - "version": "0.0.0-experimental-cb5084d1c-20220924", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.0.0-experimental-cb5084d1c-20220924.tgz", - "integrity": "sha512-SeszKCdhM5OHxNMStjpKIAaloARUMZqIpDZjkZeGuRsyr7YlAqvlsCXyee4ZQOOU1pbr7BIvQntKy5Hil+DQJA==", + "version": "0.0.0-experimental-ae7ad8b4c-20220927", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.0.0-experimental-ae7ad8b4c-20220927.tgz", + "integrity": "sha512-0sMHQklwZ6WbISng47exj1LeAAZkqYVaBOjmywwyjeyWGwNpLx526/DNZVgdE5/a79FhZRQ7bhfuFdCmC5B4aQ==", "requires": { "loose-envify": "^1.1.0" } diff --git a/demos/app-dir/package.json b/demos/app-dir/package.json index ac52830a3f..2f21b3ed04 100644 --- a/demos/app-dir/package.json +++ b/demos/app-dir/package.json @@ -9,8 +9,8 @@ "license": "MIT", "dependencies": { "nanoid": "^2.1.11", - "next": "12.3.2-canary.10", - "react": "0.0.0-experimental-cb5084d1c-20220924", - "react-dom": "0.0.0-experimental-cb5084d1c-20220924" + "next": "12.3.2-canary.11", + "react": "0.0.0-experimental-ae7ad8b4c-20220927", + "react-dom": "0.0.0-experimental-ae7ad8b4c-20220927" } } diff --git a/packages/runtime/src/templates/getPageResolver.ts b/packages/runtime/src/templates/getPageResolver.ts index 6928b8d59a..b2c504c342 100644 --- a/packages/runtime/src/templates/getPageResolver.ts +++ b/packages/runtime/src/templates/getPageResolver.ts @@ -14,16 +14,13 @@ export const getPageResolver = async ({ publish, target }: { publish: string; ta const functionDir = posix.resolve(posix.join('.netlify', 'functions', HANDLER_FUNCTION_NAME)) const root = posix.resolve(slash(publish), target === 'server' ? 'server' : 'serverless') - const pages = await glob('{pages,app}/**/*.{js.nft.json,js}', { + const pages = await glob('{pages,app}/**/*.{js.nft.json}', { cwd: root, dot: true, }) const dependencies = await Promise.all( pages.map(async (page) => { - if (page.endsWith('.js')) { - return posix.join(root, page) - } const dir = posix.dirname(page) const { files } = await readJSON(posix.join(root, page)) return files.map((file) => posix.resolve(root, dir, file)) From 9852eb245ac29d472e657aabed4b8abf8f68d5c7 Mon Sep 17 00:00:00 2001 From: Matt Kane Date: Wed, 28 Sep 2022 11:10:09 +0100 Subject: [PATCH 011/172] chore: move app-dir site to canary --- demos/app-dir/netlify.toml | 15 - demos/app-dir/next.config.js | 32 - demos/app-dir/package-lock.json | 634 ----- demos/app-dir/package.json | 16 - demos/app-dir/pages/api/hello.js | 7 - demos/app-dir/pages/index.js | 11 - demos/canary/.eslintrc.json | 3 - demos/canary/.gitignore | 35 - demos/{app-dir => canary}/.npmrc | 0 demos/canary/README.md | 28 - .../app/(newroot)/dashboard/another/page.js | 0 .../dashboard/project/[projectId]/page.js | 0 .../app/(newroot)/layout.js | 0 .../(rootonly)/dashboard/changelog/page.js | 0 .../app/(rootonly)/dashboard/hello/page.js | 0 .../catch-all/[...slug]/components/widget.js | 0 .../app/catch-all/[...slug]/page.js | 0 .../app/client-component-route/page.js | 0 .../app/client-component-route/style.css | 0 .../client-component-route/style.module.css | 0 .../app/client-nested/layout.js | 0 .../app/client-nested/page.js | 0 .../app/client-nested/style.css | 0 .../app/client-nested/style.module.css | 0 .../get-server-side-props/page.js | 0 .../get-static-props/page.js | 0 .../app/css/css-client/client-foo.css | 0 .../app/css/css-client/client-layout.css | 0 .../app/css/css-client/client-page.css | 0 .../app/css/css-client/foo.js | 0 .../app/css/css-client/layout.js | 0 .../app/css/css-client/page.js | 0 .../app/css/css-nested/layout.js | 0 .../app/css/css-nested/page.js | 0 .../app/css/css-nested/style.css | 0 .../app/css/css-nested/style.module.css | 0 .../app/css/css-page/layout.js | 0 .../app/css/css-page/page.js | 0 .../app/css/css-page/style.css | 0 .../app/css/css-page/style.module.css | 0 .../app/css/css-page/style2.css | 0 demos/{app-dir => canary}/app/css/foo.js | 0 demos/{app-dir => canary}/app/css/layout.js | 0 demos/{app-dir => canary}/app/css/style.css | 0 .../app/css/style.module.css | 0 .../(custom)/deployments/breakdown/page.js | 0 .../app/dashboard/(custom)/layout.js | 0 .../app/dashboard/client-comp-client.jsx | 0 .../app/dashboard/client-comp.module.css | 0 .../app/dashboard/deployments/[id]/page.js | 0 .../app/dashboard/deployments/info/page.js | 0 .../app/dashboard/deployments/layout.js | 0 .../app/dashboard/global.css | 0 .../index/dynamic-imports/dynamic-client.js | 0 .../index/dynamic-imports/dynamic-server.js | 0 .../dynamic-imports/react-lazy-client.js | 0 .../app/dashboard/index/dynamic.module.css | 0 .../app/dashboard/index/lazy.module.css | 0 .../app/dashboard/index/page.js | 0 .../dashboard/index/text-dynamic-client.js | 0 .../dashboard/index/text-dynamic-server.js | 0 .../app/dashboard/index/text-lazy-client.js | 0 .../app/dashboard/integrations/page.js | 0 .../app/dashboard/layout.js | 0 .../{app-dir => canary}/app/dashboard/page.js | 0 .../app/dashboard/style.css | 0 .../app/dynamic/[category]/[id]/layout.js | 0 .../app/dynamic/[category]/[id]/page.js | 0 .../app/dynamic/[category]/layout.js | 0 .../{app-dir => canary}/app/dynamic/layout.js | 0 .../app/error/clientcomponent/error.js | 0 .../app/error/clientcomponent/page.js | 0 .../client-component.js | 0 .../error/ssr-error-client-component/page.js | 0 .../app/extension/page.server.js | 0 .../app/hooks/use-cookies/client/page.js | 0 .../app/hooks/use-cookies/page.js | 0 .../app/hooks/use-headers/client/page.js | 0 .../app/hooks/use-headers/page.js | 0 .../hooks/use-layout-segments/server/page.js | 0 .../app/hooks/use-params/server/page.js | 0 .../app/hooks/use-pathname/page.js | 0 .../app/hooks/use-pathname/server/page.js | 0 .../app/hooks/use-preview-data/client/page.js | 0 .../app/hooks/use-preview-data/page.js | 0 .../app/hooks/use-router/page.js | 0 .../app/hooks/use-router/server/page.js | 0 .../app/hooks/use-router/sub-page/page.js | 0 .../app/hooks/use-search-params/page.js | 0 .../hooks/use-search-params/server/page.js | 0 .../server/page.js | 0 .../app/internal/failure/page.js | 0 .../{app-dir => canary}/app/internal/page.js | 0 .../app/internal/success/page.js | 0 demos/{app-dir => canary}/app/layout.js | 0 .../app/link-hard-push/[id]/page.js | 0 .../app/link-hard-replace/[id]/page.js | 0 .../app/link-hard-replace/page.js | 0 .../app/link-hard-replace/subpage/page.js | 0 .../app/link-soft-push/page.js | 0 .../app/link-soft-replace/page.js | 0 .../app/link-soft-replace/subpage/page.js | 0 .../app/loading-bug/[categorySlug]/loading.js | 0 .../app/loading-bug/[categorySlug]/page.js | 0 .../app/navigation/link.js | 0 .../app/navigation/page.js | 0 .../{app-dir => canary}/app/not-found/404.js | 0 .../app/not-found/client-side/page.js | 0 .../app/not-found/clientcomponent/a.js | 0 .../clientcomponent/client-component.js | 0 .../app/not-found/servercomponent/a.js | 0 .../app/old-router/client-router.js | 0 .../app/old-router/is-null.js | 0 .../app/old-router/page.js | 0 .../app/old-router/router.js | 0 .../app/old-router/server-router.js | 0 .../optional-catch-all/[[...slug]]/page.js | 0 .../app/pages-linking/page.js | 0 .../app/parallel/(new)/@baz/nested-2/page.js | 0 .../app/parallel/(new)/layout.js | 0 .../app/parallel/@bar/nested/@a/page.js | 0 .../app/parallel/@bar/nested/@b/page.js | 0 .../app/parallel/@bar/nested/layout.js | 0 .../app/parallel/@bar/page.js | 0 .../app/parallel/@foo/nested/@a/page.js | 0 .../app/parallel/@foo/nested/@b/page.js | 0 .../app/parallel/@foo/nested/layout.js | 0 .../app/parallel/@foo/page.js | 0 .../app/parallel/layout.js | 0 .../app/parallel/nested/page.js | 0 .../app/parallel/style.css | 0 .../app/param-and-query/[slug]/page.js | 0 .../app/partial-match-[id]/page.js | 0 .../app/redirect/client-side/page.js | 0 .../clientcomponent/client-component.js | 0 .../app/redirect/clientcomponent/page.js | 0 .../app/redirect/next-config-redirect/page.js | 0 .../redirect/next-middleware-redirect/page.js | 0 .../app/redirect/result/page.js | 0 .../app/redirect/servercomponent/page.js | 0 .../{app-dir => canary}/app/rewrites/page.js | 0 .../app/same-layout/first/page.js | 0 .../app/same-layout/layout.js | 0 .../app/same-layout/second/page.js | 0 .../app/shared-component-route/page.js | 0 .../app/should-not-serve-client/page.js | 0 .../app/should-not-serve-server/page.js | 0 .../loading.js | 0 .../slow/layout.js | 0 .../slow/loading.js | 0 .../slow/page.js | 0 .../app/slow-layout-with-loading/loading.js | 0 .../slow-layout-with-loading/slow/layout.js | 0 .../app/slow-layout-with-loading/slow/page.js | 0 .../app/slow-page-with-loading/loading.js | 0 .../app/slow-page-with-loading/page.js | 0 demos/{app-dir => canary}/app/style.css | 0 .../template/clientcomponent/other/page.js | 0 .../app/template/clientcomponent/page.js | 0 .../app/template/clientcomponent/template.js | 0 .../template/servercomponent/other/page.js | 0 .../app/template/servercomponent/page.js | 0 .../app/template/servercomponent/template.js | 0 .../{app-dir => canary}/app/test-page/page.js | 0 demos/{app-dir => canary}/app/with-id/page.js | 0 demos/{app-dir => canary}/middleware.js | 0 demos/canary/middleware.ts | 13 - demos/canary/netlify.toml | 14 + demos/canary/next.config.js | 40 +- demos/canary/package-lock.json | 2494 ++--------------- demos/canary/package.json | 23 +- demos/canary/pages/_app.js | 7 - demos/canary/pages/api/hello.js | 8 +- .../{app-dir => canary}/pages/api/preview.js | 0 .../{app-dir => canary}/pages/app-linking.js | 0 .../{app-dir => canary}/pages/blog/[slug].js | 0 demos/canary/pages/index.js | 30 +- demos/canary/public/favicon.ico | Bin 25931 -> 0 bytes demos/{app-dir => canary}/public/hello.txt | 0 demos/{app-dir => canary}/styles/global.css | 0 demos/canary/styles/globals.css | 16 - .../styles/shared.module.css | 0 182 files changed, 350 insertions(+), 3076 deletions(-) delete mode 100644 demos/app-dir/netlify.toml delete mode 100644 demos/app-dir/next.config.js delete mode 100644 demos/app-dir/package-lock.json delete mode 100644 demos/app-dir/package.json delete mode 100644 demos/app-dir/pages/api/hello.js delete mode 100644 demos/app-dir/pages/index.js delete mode 100755 demos/canary/.eslintrc.json delete mode 100755 demos/canary/.gitignore rename demos/{app-dir => canary}/.npmrc (100%) delete mode 100755 demos/canary/README.md rename demos/{app-dir => canary}/app/(newroot)/dashboard/another/page.js (100%) rename demos/{app-dir => canary}/app/(newroot)/dashboard/project/[projectId]/page.js (100%) rename demos/{app-dir => canary}/app/(newroot)/layout.js (100%) rename demos/{app-dir => canary}/app/(rootonly)/dashboard/changelog/page.js (100%) rename demos/{app-dir => canary}/app/(rootonly)/dashboard/hello/page.js (100%) rename demos/{app-dir => canary}/app/catch-all/[...slug]/components/widget.js (100%) rename demos/{app-dir => canary}/app/catch-all/[...slug]/page.js (100%) rename demos/{app-dir => canary}/app/client-component-route/page.js (100%) rename demos/{app-dir => canary}/app/client-component-route/style.css (100%) rename demos/{app-dir => canary}/app/client-component-route/style.module.css (100%) rename demos/{app-dir => canary}/app/client-nested/layout.js (100%) rename demos/{app-dir => canary}/app/client-nested/page.js (100%) rename demos/{app-dir => canary}/app/client-nested/style.css (100%) rename demos/{app-dir => canary}/app/client-nested/style.module.css (100%) rename demos/{app-dir => canary}/app/client-with-errors/get-server-side-props/page.js (100%) rename demos/{app-dir => canary}/app/client-with-errors/get-static-props/page.js (100%) rename demos/{app-dir => canary}/app/css/css-client/client-foo.css (100%) rename demos/{app-dir => canary}/app/css/css-client/client-layout.css (100%) rename demos/{app-dir => canary}/app/css/css-client/client-page.css (100%) rename demos/{app-dir => canary}/app/css/css-client/foo.js (100%) rename demos/{app-dir => canary}/app/css/css-client/layout.js (100%) rename demos/{app-dir => canary}/app/css/css-client/page.js (100%) rename demos/{app-dir => canary}/app/css/css-nested/layout.js (100%) rename demos/{app-dir => canary}/app/css/css-nested/page.js (100%) rename demos/{app-dir => canary}/app/css/css-nested/style.css (100%) rename demos/{app-dir => canary}/app/css/css-nested/style.module.css (100%) rename demos/{app-dir => canary}/app/css/css-page/layout.js (100%) rename demos/{app-dir => canary}/app/css/css-page/page.js (100%) rename demos/{app-dir => canary}/app/css/css-page/style.css (100%) rename demos/{app-dir => canary}/app/css/css-page/style.module.css (100%) rename demos/{app-dir => canary}/app/css/css-page/style2.css (100%) rename demos/{app-dir => canary}/app/css/foo.js (100%) rename demos/{app-dir => canary}/app/css/layout.js (100%) rename demos/{app-dir => canary}/app/css/style.css (100%) rename demos/{app-dir => canary}/app/css/style.module.css (100%) rename demos/{app-dir => canary}/app/dashboard/(custom)/deployments/breakdown/page.js (100%) rename demos/{app-dir => canary}/app/dashboard/(custom)/layout.js (100%) rename demos/{app-dir => canary}/app/dashboard/client-comp-client.jsx (100%) rename demos/{app-dir => canary}/app/dashboard/client-comp.module.css (100%) rename demos/{app-dir => canary}/app/dashboard/deployments/[id]/page.js (100%) rename demos/{app-dir => canary}/app/dashboard/deployments/info/page.js (100%) rename demos/{app-dir => canary}/app/dashboard/deployments/layout.js (100%) rename demos/{app-dir => canary}/app/dashboard/global.css (100%) rename demos/{app-dir => canary}/app/dashboard/index/dynamic-imports/dynamic-client.js (100%) rename demos/{app-dir => canary}/app/dashboard/index/dynamic-imports/dynamic-server.js (100%) rename demos/{app-dir => canary}/app/dashboard/index/dynamic-imports/react-lazy-client.js (100%) rename demos/{app-dir => canary}/app/dashboard/index/dynamic.module.css (100%) rename demos/{app-dir => canary}/app/dashboard/index/lazy.module.css (100%) rename demos/{app-dir => canary}/app/dashboard/index/page.js (100%) rename demos/{app-dir => canary}/app/dashboard/index/text-dynamic-client.js (100%) rename demos/{app-dir => canary}/app/dashboard/index/text-dynamic-server.js (100%) rename demos/{app-dir => canary}/app/dashboard/index/text-lazy-client.js (100%) rename demos/{app-dir => canary}/app/dashboard/integrations/page.js (100%) rename demos/{app-dir => canary}/app/dashboard/layout.js (100%) rename demos/{app-dir => canary}/app/dashboard/page.js (100%) rename demos/{app-dir => canary}/app/dashboard/style.css (100%) rename demos/{app-dir => canary}/app/dynamic/[category]/[id]/layout.js (100%) rename demos/{app-dir => canary}/app/dynamic/[category]/[id]/page.js (100%) rename demos/{app-dir => canary}/app/dynamic/[category]/layout.js (100%) rename demos/{app-dir => canary}/app/dynamic/layout.js (100%) rename demos/{app-dir => canary}/app/error/clientcomponent/error.js (100%) rename demos/{app-dir => canary}/app/error/clientcomponent/page.js (100%) rename demos/{app-dir => canary}/app/error/ssr-error-client-component/client-component.js (100%) rename demos/{app-dir => canary}/app/error/ssr-error-client-component/page.js (100%) rename demos/{app-dir => canary}/app/extension/page.server.js (100%) rename demos/{app-dir => canary}/app/hooks/use-cookies/client/page.js (100%) rename demos/{app-dir => canary}/app/hooks/use-cookies/page.js (100%) rename demos/{app-dir => canary}/app/hooks/use-headers/client/page.js (100%) rename demos/{app-dir => canary}/app/hooks/use-headers/page.js (100%) rename demos/{app-dir => canary}/app/hooks/use-layout-segments/server/page.js (100%) rename demos/{app-dir => canary}/app/hooks/use-params/server/page.js (100%) rename demos/{app-dir => canary}/app/hooks/use-pathname/page.js (100%) rename demos/{app-dir => canary}/app/hooks/use-pathname/server/page.js (100%) rename demos/{app-dir => canary}/app/hooks/use-preview-data/client/page.js (100%) rename demos/{app-dir => canary}/app/hooks/use-preview-data/page.js (100%) rename demos/{app-dir => canary}/app/hooks/use-router/page.js (100%) rename demos/{app-dir => canary}/app/hooks/use-router/server/page.js (100%) rename demos/{app-dir => canary}/app/hooks/use-router/sub-page/page.js (100%) rename demos/{app-dir => canary}/app/hooks/use-search-params/page.js (100%) rename demos/{app-dir => canary}/app/hooks/use-search-params/server/page.js (100%) rename demos/{app-dir => canary}/app/hooks/use-selected-layout-segment/server/page.js (100%) rename demos/{app-dir => canary}/app/internal/failure/page.js (100%) rename demos/{app-dir => canary}/app/internal/page.js (100%) rename demos/{app-dir => canary}/app/internal/success/page.js (100%) rename demos/{app-dir => canary}/app/layout.js (100%) rename demos/{app-dir => canary}/app/link-hard-push/[id]/page.js (100%) rename demos/{app-dir => canary}/app/link-hard-replace/[id]/page.js (100%) rename demos/{app-dir => canary}/app/link-hard-replace/page.js (100%) rename demos/{app-dir => canary}/app/link-hard-replace/subpage/page.js (100%) rename demos/{app-dir => canary}/app/link-soft-push/page.js (100%) rename demos/{app-dir => canary}/app/link-soft-replace/page.js (100%) rename demos/{app-dir => canary}/app/link-soft-replace/subpage/page.js (100%) rename demos/{app-dir => canary}/app/loading-bug/[categorySlug]/loading.js (100%) rename demos/{app-dir => canary}/app/loading-bug/[categorySlug]/page.js (100%) rename demos/{app-dir => canary}/app/navigation/link.js (100%) rename demos/{app-dir => canary}/app/navigation/page.js (100%) rename demos/{app-dir => canary}/app/not-found/404.js (100%) rename demos/{app-dir => canary}/app/not-found/client-side/page.js (100%) rename demos/{app-dir => canary}/app/not-found/clientcomponent/a.js (100%) rename demos/{app-dir => canary}/app/not-found/clientcomponent/client-component.js (100%) rename demos/{app-dir => canary}/app/not-found/servercomponent/a.js (100%) rename demos/{app-dir => canary}/app/old-router/client-router.js (100%) rename demos/{app-dir => canary}/app/old-router/is-null.js (100%) rename demos/{app-dir => canary}/app/old-router/page.js (100%) rename demos/{app-dir => canary}/app/old-router/router.js (100%) rename demos/{app-dir => canary}/app/old-router/server-router.js (100%) rename demos/{app-dir => canary}/app/optional-catch-all/[[...slug]]/page.js (100%) rename demos/{app-dir => canary}/app/pages-linking/page.js (100%) rename demos/{app-dir => canary}/app/parallel/(new)/@baz/nested-2/page.js (100%) rename demos/{app-dir => canary}/app/parallel/(new)/layout.js (100%) rename demos/{app-dir => canary}/app/parallel/@bar/nested/@a/page.js (100%) rename demos/{app-dir => canary}/app/parallel/@bar/nested/@b/page.js (100%) rename demos/{app-dir => canary}/app/parallel/@bar/nested/layout.js (100%) rename demos/{app-dir => canary}/app/parallel/@bar/page.js (100%) rename demos/{app-dir => canary}/app/parallel/@foo/nested/@a/page.js (100%) rename demos/{app-dir => canary}/app/parallel/@foo/nested/@b/page.js (100%) rename demos/{app-dir => canary}/app/parallel/@foo/nested/layout.js (100%) rename demos/{app-dir => canary}/app/parallel/@foo/page.js (100%) rename demos/{app-dir => canary}/app/parallel/layout.js (100%) rename demos/{app-dir => canary}/app/parallel/nested/page.js (100%) rename demos/{app-dir => canary}/app/parallel/style.css (100%) rename demos/{app-dir => canary}/app/param-and-query/[slug]/page.js (100%) rename demos/{app-dir => canary}/app/partial-match-[id]/page.js (100%) rename demos/{app-dir => canary}/app/redirect/client-side/page.js (100%) rename demos/{app-dir => canary}/app/redirect/clientcomponent/client-component.js (100%) rename demos/{app-dir => canary}/app/redirect/clientcomponent/page.js (100%) rename demos/{app-dir => canary}/app/redirect/next-config-redirect/page.js (100%) rename demos/{app-dir => canary}/app/redirect/next-middleware-redirect/page.js (100%) rename demos/{app-dir => canary}/app/redirect/result/page.js (100%) rename demos/{app-dir => canary}/app/redirect/servercomponent/page.js (100%) rename demos/{app-dir => canary}/app/rewrites/page.js (100%) rename demos/{app-dir => canary}/app/same-layout/first/page.js (100%) rename demos/{app-dir => canary}/app/same-layout/layout.js (100%) rename demos/{app-dir => canary}/app/same-layout/second/page.js (100%) rename demos/{app-dir => canary}/app/shared-component-route/page.js (100%) rename demos/{app-dir => canary}/app/should-not-serve-client/page.js (100%) rename demos/{app-dir => canary}/app/should-not-serve-server/page.js (100%) rename demos/{app-dir => canary}/app/slow-layout-and-page-with-loading/loading.js (100%) rename demos/{app-dir => canary}/app/slow-layout-and-page-with-loading/slow/layout.js (100%) rename demos/{app-dir => canary}/app/slow-layout-and-page-with-loading/slow/loading.js (100%) rename demos/{app-dir => canary}/app/slow-layout-and-page-with-loading/slow/page.js (100%) rename demos/{app-dir => canary}/app/slow-layout-with-loading/loading.js (100%) rename demos/{app-dir => canary}/app/slow-layout-with-loading/slow/layout.js (100%) rename demos/{app-dir => canary}/app/slow-layout-with-loading/slow/page.js (100%) rename demos/{app-dir => canary}/app/slow-page-with-loading/loading.js (100%) rename demos/{app-dir => canary}/app/slow-page-with-loading/page.js (100%) rename demos/{app-dir => canary}/app/style.css (100%) rename demos/{app-dir => canary}/app/template/clientcomponent/other/page.js (100%) rename demos/{app-dir => canary}/app/template/clientcomponent/page.js (100%) rename demos/{app-dir => canary}/app/template/clientcomponent/template.js (100%) rename demos/{app-dir => canary}/app/template/servercomponent/other/page.js (100%) rename demos/{app-dir => canary}/app/template/servercomponent/page.js (100%) rename demos/{app-dir => canary}/app/template/servercomponent/template.js (100%) rename demos/{app-dir => canary}/app/test-page/page.js (100%) rename demos/{app-dir => canary}/app/with-id/page.js (100%) rename demos/{app-dir => canary}/middleware.js (100%) delete mode 100644 demos/canary/middleware.ts mode change 100755 => 100644 demos/canary/next.config.js delete mode 100755 demos/canary/pages/_app.js mode change 100755 => 100644 demos/canary/pages/api/hello.js rename demos/{app-dir => canary}/pages/api/preview.js (100%) rename demos/{app-dir => canary}/pages/app-linking.js (100%) rename demos/{app-dir => canary}/pages/blog/[slug].js (100%) mode change 100755 => 100644 demos/canary/pages/index.js delete mode 100755 demos/canary/public/favicon.ico rename demos/{app-dir => canary}/public/hello.txt (100%) rename demos/{app-dir => canary}/styles/global.css (100%) delete mode 100755 demos/canary/styles/globals.css rename demos/{app-dir => canary}/styles/shared.module.css (100%) diff --git a/demos/app-dir/netlify.toml b/demos/app-dir/netlify.toml deleted file mode 100644 index b7cafdfa31..0000000000 --- a/demos/app-dir/netlify.toml +++ /dev/null @@ -1,15 +0,0 @@ -[build] -command = "next build" -publish = ".next" -ignore = "if [ $CACHED_COMMIT_REF == $COMMIT_REF ]; then (exit 1); else git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF ../..; fi;" - -[build.environment] -TERM = "xterm" -NODE_VERSION = "17" - -[[plugins]] -package = "../plugin-wrapper/" - -# This is a fake plugin, that makes it run npm install -[[plugins]] -package = "@netlify/plugin-local-install-core" diff --git a/demos/app-dir/next.config.js b/demos/app-dir/next.config.js deleted file mode 100644 index e16b7cc6f3..0000000000 --- a/demos/app-dir/next.config.js +++ /dev/null @@ -1,32 +0,0 @@ -module.exports = { - eslint: { - ignoreDuringBuilds: true, - }, - experimental: { - appDir: true, - legacyBrowsers: false, - browsersListForSwc: true, - sri: { - algorithm: 'sha256', - }, - }, - rewrites: async () => { - return { - afterFiles: [ - { - source: '/rewritten-to-dashboard', - destination: '/dashboard', - }, - ], - } - }, - redirects: () => { - return [ - { - source: '/redirect/a', - destination: '/dashboard', - permanent: false, - }, - ] - }, -} diff --git a/demos/app-dir/package-lock.json b/demos/app-dir/package-lock.json deleted file mode 100644 index 20fc897f01..0000000000 --- a/demos/app-dir/package-lock.json +++ /dev/null @@ -1,634 +0,0 @@ -{ - "name": "app-dir", - "version": "1.0.0", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "name": "app-dir", - "version": "1.0.0", - "license": "MIT", - "dependencies": { - "nanoid": "^2.1.11", - "next": "12.3.2-canary.11", - "react": "0.0.0-experimental-ae7ad8b4c-20220927", - "react-dom": "0.0.0-experimental-ae7ad8b4c-20220927" - } - }, - "node_modules/@next/env": { - "version": "12.3.2-canary.11", - "resolved": "https://registry.npmjs.org/@next/env/-/env-12.3.2-canary.11.tgz", - "integrity": "sha512-XEV5JwAu7l7OygEeYxasX0Zu7LNqCZfRKeSsm3o6hSLzQSuvLsO49giKnrx9+TJXSalpj9bDbqaCpH3iuROesA==" - }, - "node_modules/@next/swc-android-arm-eabi": { - "version": "12.3.2-canary.11", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.3.2-canary.11.tgz", - "integrity": "sha512-xFdBf2AnRxJiRo4pp61zC5azxSkdjeNF86bLGfa3tiGNYkNVjrJZzqx2TUzBhzRBatrPe9nl9FSTaRRP31cZLw==", - "cpu": [ - "arm" - ], - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-android-arm64": { - "version": "12.3.2-canary.11", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-12.3.2-canary.11.tgz", - "integrity": "sha512-T/nVC6ojHG9hXVuejDTc6fcyUR78vDUbN+pmrGFYrjfPUWYt+bFDwRguGOXydWdJj3jyRkL9YyMmNZf0wuzheg==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-darwin-arm64": { - "version": "12.3.2-canary.11", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.3.2-canary.11.tgz", - "integrity": "sha512-HLebVmk8U7VfSTcro/vYrhvw2v85Uic48Y9z3TMiWakJoG1gBNEHuPnJXNLJJEWrpdc1rjP0n/7Jl6xofMGQMA==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-darwin-x64": { - "version": "12.3.2-canary.11", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.3.2-canary.11.tgz", - "integrity": "sha512-gkpGaFDy8i90ll9USTMXHBuHmWbvpeCJxoSsWnAQuJZcUIZATL0iovdjjAvHh4cj5xWQpGXdGAJpL5ss4b2Pyw==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-freebsd-x64": { - "version": "12.3.2-canary.11", - "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.3.2-canary.11.tgz", - "integrity": "sha512-jTqkb3HN+PXlpXTzBEUhWnR9XA+Uj1vpjSx9jc+Lrl3esyzzKONqTNz4RRbOwDvU2TygQr+oaQqtdZAnj88d7w==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-linux-arm-gnueabihf": { - "version": "12.3.2-canary.11", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.3.2-canary.11.tgz", - "integrity": "sha512-Nt4qARbZozu7UeFpUfrJuKg6g6BCjYnAfKcDCLxAnDONrMoqIEkIVQmntH2i1GPwtp37qTaPG6v4TnJHGNBSOQ==", - "cpu": [ - "arm" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-linux-arm64-gnu": { - "version": "12.3.2-canary.11", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.3.2-canary.11.tgz", - "integrity": "sha512-8l0Ma2zIiTTTo042NMCYFlkIyGeFdpAtU2qTkIuJX9sBdffq9m/uHtnkv8R0u5myakn/5fkncojVx4uNRBGePg==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-linux-arm64-musl": { - "version": "12.3.2-canary.11", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.3.2-canary.11.tgz", - "integrity": "sha512-hOoWctziJqYNw0+RY3GR2og+Qr2ykgtIORKEZGHx9OAyg+dRLxJISHWv9umaAjE8Hoi7V0cS841XQ1B6XTnoKA==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-linux-x64-gnu": { - "version": "12.3.2-canary.11", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.3.2-canary.11.tgz", - "integrity": "sha512-to03IoMs8v971yVFGm2Og7x6Z5LSPMzeFQikLqpUNS1lmk5Kha4vju4Ojc8nqEyPShojMhkbkjSH6sXbeCb+ZA==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-linux-x64-musl": { - "version": "12.3.2-canary.11", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.3.2-canary.11.tgz", - "integrity": "sha512-gSitcSo6PFzI/WHLLfRcLin6y1KLEADliLdFwHy7luotsrcalxjIWPD6tFqIZ7ajRjCZ02uY+lIPJ/FPhX3b8w==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-win32-arm64-msvc": { - "version": "12.3.2-canary.11", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.3.2-canary.11.tgz", - "integrity": "sha512-o4F0/cS/7qBOSz+F3A1iPBqbhNOpJB8cJZnhViTW6BeFQm9pnRXDm8FZyNup3yHdSy33wqtjLNYTPADvm+GsFQ==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-win32-ia32-msvc": { - "version": "12.3.2-canary.11", - "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.3.2-canary.11.tgz", - "integrity": "sha512-/FSdl4+4YFsrycKrM5N+4khxKR7rKIO4tiai+MLAN7zi9GA+2qFoxxkQdWSQTBr09lE+eacZ3r3TppO7ztNmQg==", - "cpu": [ - "ia32" - ], - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-win32-x64-msvc": { - "version": "12.3.2-canary.11", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.3.2-canary.11.tgz", - "integrity": "sha512-/VioJDSK5TYea84zu6Qu5tCngCkAMNhPuVJ+3cmDGcM9H+tq0LiStVlW3efGUV+R4DyHg8GymWHpMXVjm6UIDg==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@swc/helpers": { - "version": "0.4.11", - "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.4.11.tgz", - "integrity": "sha512-rEUrBSGIoSFuYxwBYtlUFMlE2CwGhmW+w9355/5oduSw8e5h2+Tj4UrAGNNgP9915++wj5vkQo0UuOBqOAq4nw==", - "dependencies": { - "tslib": "^2.4.0" - } - }, - "node_modules/caniuse-lite": { - "version": "1.0.30001410", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001410.tgz", - "integrity": "sha512-QoblBnuE+rG0lc3Ur9ltP5q47lbguipa/ncNMyyGuqPk44FxbScWAeEO+k5fSQ8WekdAK4mWqNs1rADDAiN5xQ==", - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" - } - ] - }, - "node_modules/js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" - }, - "node_modules/loose-envify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "dependencies": { - "js-tokens": "^3.0.0 || ^4.0.0" - }, - "bin": { - "loose-envify": "cli.js" - } - }, - "node_modules/nanoid": { - "version": "2.1.11", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-2.1.11.tgz", - "integrity": "sha512-s/snB+WGm6uwi0WjsZdaVcuf3KJXlfGl2LcxgwkEwJF0D/BWzVWAZW/XY4bFaiR7s0Jk3FPvlnepg1H1b1UwlA==" - }, - "node_modules/next": { - "version": "12.3.2-canary.11", - "resolved": "https://registry.npmjs.org/next/-/next-12.3.2-canary.11.tgz", - "integrity": "sha512-LBPr3z2xn+djEnkdajLJKqZimXyfHjpKmReyMAEuyk+2rZ1WICQYV5QOh2vhXqPxwiqqardX7VjuiBXkQeR1Qg==", - "dependencies": { - "@next/env": "12.3.2-canary.11", - "@swc/helpers": "0.4.11", - "caniuse-lite": "^1.0.30001406", - "postcss": "8.4.14", - "styled-jsx": "5.0.7", - "use-sync-external-store": "1.2.0" - }, - "bin": { - "next": "dist/bin/next" - }, - "engines": { - "node": ">=12.22.0" - }, - "optionalDependencies": { - "@next/swc-android-arm-eabi": "12.3.2-canary.11", - "@next/swc-android-arm64": "12.3.2-canary.11", - "@next/swc-darwin-arm64": "12.3.2-canary.11", - "@next/swc-darwin-x64": "12.3.2-canary.11", - "@next/swc-freebsd-x64": "12.3.2-canary.11", - "@next/swc-linux-arm-gnueabihf": "12.3.2-canary.11", - "@next/swc-linux-arm64-gnu": "12.3.2-canary.11", - "@next/swc-linux-arm64-musl": "12.3.2-canary.11", - "@next/swc-linux-x64-gnu": "12.3.2-canary.11", - "@next/swc-linux-x64-musl": "12.3.2-canary.11", - "@next/swc-win32-arm64-msvc": "12.3.2-canary.11", - "@next/swc-win32-ia32-msvc": "12.3.2-canary.11", - "@next/swc-win32-x64-msvc": "12.3.2-canary.11" - }, - "peerDependencies": { - "fibers": ">= 3.1.0", - "node-sass": "^6.0.0 || ^7.0.0", - "react": "^17.0.2 || ^18.0.0-0", - "react-dom": "^17.0.2 || ^18.0.0-0", - "sass": "^1.3.0" - }, - "peerDependenciesMeta": { - "fibers": { - "optional": true - }, - "node-sass": { - "optional": true - }, - "sass": { - "optional": true - } - } - }, - "node_modules/picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" - }, - "node_modules/postcss": { - "version": "8.4.14", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.14.tgz", - "integrity": "sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig==", - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/postcss" - } - ], - "dependencies": { - "nanoid": "^3.3.4", - "picocolors": "^1.0.0", - "source-map-js": "^1.0.2" - }, - "engines": { - "node": "^10 || ^12 || >=14" - } - }, - "node_modules/postcss/node_modules/nanoid": { - "version": "3.3.4", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz", - "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==", - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, - "node_modules/react": { - "version": "0.0.0-experimental-ae7ad8b4c-20220927", - "resolved": "https://registry.npmjs.org/react/-/react-0.0.0-experimental-ae7ad8b4c-20220927.tgz", - "integrity": "sha512-Fl0Cbo7/nsZpP0DXx1BmyxfG698WcWwXc3FPrRiE1QwuYQX20DSIYyLVG0dYnhgvjCeDwqa5+iB1pY7oiPsYrQ==", - "dependencies": { - "loose-envify": "^1.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/react-dom": { - "version": "0.0.0-experimental-ae7ad8b4c-20220927", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-0.0.0-experimental-ae7ad8b4c-20220927.tgz", - "integrity": "sha512-sDbnAhUleyQzdQ4HJKDml3l62Rct7JcHbIVWX4hLmnFs+oskCUrMfs7eCC9UVCBWC2+huUpZCiD69x44m+l2+A==", - "dependencies": { - "loose-envify": "^1.1.0", - "scheduler": "0.0.0-experimental-ae7ad8b4c-20220927" - }, - "peerDependencies": { - "react": "0.0.0-experimental-ae7ad8b4c-20220927" - } - }, - "node_modules/scheduler": { - "version": "0.0.0-experimental-ae7ad8b4c-20220927", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.0.0-experimental-ae7ad8b4c-20220927.tgz", - "integrity": "sha512-0sMHQklwZ6WbISng47exj1LeAAZkqYVaBOjmywwyjeyWGwNpLx526/DNZVgdE5/a79FhZRQ7bhfuFdCmC5B4aQ==", - "dependencies": { - "loose-envify": "^1.1.0" - } - }, - "node_modules/source-map-js": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", - "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/styled-jsx": { - "version": "5.0.7", - "resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.0.7.tgz", - "integrity": "sha512-b3sUzamS086YLRuvnaDigdAewz1/EFYlHpYBP5mZovKEdQQOIIYq8lApylub3HHZ6xFjV051kkGU7cudJmrXEA==", - "engines": { - "node": ">= 12.0.0" - }, - "peerDependencies": { - "react": ">= 16.8.0 || 17.x.x || ^18.0.0-0" - }, - "peerDependenciesMeta": { - "@babel/core": { - "optional": true - }, - "babel-plugin-macros": { - "optional": true - } - } - }, - "node_modules/tslib": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", - "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" - }, - "node_modules/use-sync-external-store": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz", - "integrity": "sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==", - "peerDependencies": { - "react": "^16.8.0 || ^17.0.0 || ^18.0.0" - } - } - }, - "dependencies": { - "@next/env": { - "version": "12.3.2-canary.11", - "resolved": "https://registry.npmjs.org/@next/env/-/env-12.3.2-canary.11.tgz", - "integrity": "sha512-XEV5JwAu7l7OygEeYxasX0Zu7LNqCZfRKeSsm3o6hSLzQSuvLsO49giKnrx9+TJXSalpj9bDbqaCpH3iuROesA==" - }, - "@next/swc-android-arm-eabi": { - "version": "12.3.2-canary.11", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.3.2-canary.11.tgz", - "integrity": "sha512-xFdBf2AnRxJiRo4pp61zC5azxSkdjeNF86bLGfa3tiGNYkNVjrJZzqx2TUzBhzRBatrPe9nl9FSTaRRP31cZLw==", - "optional": true - }, - "@next/swc-android-arm64": { - "version": "12.3.2-canary.11", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-12.3.2-canary.11.tgz", - "integrity": "sha512-T/nVC6ojHG9hXVuejDTc6fcyUR78vDUbN+pmrGFYrjfPUWYt+bFDwRguGOXydWdJj3jyRkL9YyMmNZf0wuzheg==", - "optional": true - }, - "@next/swc-darwin-arm64": { - "version": "12.3.2-canary.11", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.3.2-canary.11.tgz", - "integrity": "sha512-HLebVmk8U7VfSTcro/vYrhvw2v85Uic48Y9z3TMiWakJoG1gBNEHuPnJXNLJJEWrpdc1rjP0n/7Jl6xofMGQMA==", - "optional": true - }, - "@next/swc-darwin-x64": { - "version": "12.3.2-canary.11", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.3.2-canary.11.tgz", - "integrity": "sha512-gkpGaFDy8i90ll9USTMXHBuHmWbvpeCJxoSsWnAQuJZcUIZATL0iovdjjAvHh4cj5xWQpGXdGAJpL5ss4b2Pyw==", - "optional": true - }, - "@next/swc-freebsd-x64": { - "version": "12.3.2-canary.11", - "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.3.2-canary.11.tgz", - "integrity": "sha512-jTqkb3HN+PXlpXTzBEUhWnR9XA+Uj1vpjSx9jc+Lrl3esyzzKONqTNz4RRbOwDvU2TygQr+oaQqtdZAnj88d7w==", - "optional": true - }, - "@next/swc-linux-arm-gnueabihf": { - "version": "12.3.2-canary.11", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.3.2-canary.11.tgz", - "integrity": "sha512-Nt4qARbZozu7UeFpUfrJuKg6g6BCjYnAfKcDCLxAnDONrMoqIEkIVQmntH2i1GPwtp37qTaPG6v4TnJHGNBSOQ==", - "optional": true - }, - "@next/swc-linux-arm64-gnu": { - "version": "12.3.2-canary.11", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.3.2-canary.11.tgz", - "integrity": "sha512-8l0Ma2zIiTTTo042NMCYFlkIyGeFdpAtU2qTkIuJX9sBdffq9m/uHtnkv8R0u5myakn/5fkncojVx4uNRBGePg==", - "optional": true - }, - "@next/swc-linux-arm64-musl": { - "version": "12.3.2-canary.11", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.3.2-canary.11.tgz", - "integrity": "sha512-hOoWctziJqYNw0+RY3GR2og+Qr2ykgtIORKEZGHx9OAyg+dRLxJISHWv9umaAjE8Hoi7V0cS841XQ1B6XTnoKA==", - "optional": true - }, - "@next/swc-linux-x64-gnu": { - "version": "12.3.2-canary.11", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.3.2-canary.11.tgz", - "integrity": "sha512-to03IoMs8v971yVFGm2Og7x6Z5LSPMzeFQikLqpUNS1lmk5Kha4vju4Ojc8nqEyPShojMhkbkjSH6sXbeCb+ZA==", - "optional": true - }, - "@next/swc-linux-x64-musl": { - "version": "12.3.2-canary.11", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.3.2-canary.11.tgz", - "integrity": "sha512-gSitcSo6PFzI/WHLLfRcLin6y1KLEADliLdFwHy7luotsrcalxjIWPD6tFqIZ7ajRjCZ02uY+lIPJ/FPhX3b8w==", - "optional": true - }, - "@next/swc-win32-arm64-msvc": { - "version": "12.3.2-canary.11", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.3.2-canary.11.tgz", - "integrity": "sha512-o4F0/cS/7qBOSz+F3A1iPBqbhNOpJB8cJZnhViTW6BeFQm9pnRXDm8FZyNup3yHdSy33wqtjLNYTPADvm+GsFQ==", - "optional": true - }, - "@next/swc-win32-ia32-msvc": { - "version": "12.3.2-canary.11", - "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.3.2-canary.11.tgz", - "integrity": "sha512-/FSdl4+4YFsrycKrM5N+4khxKR7rKIO4tiai+MLAN7zi9GA+2qFoxxkQdWSQTBr09lE+eacZ3r3TppO7ztNmQg==", - "optional": true - }, - "@next/swc-win32-x64-msvc": { - "version": "12.3.2-canary.11", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.3.2-canary.11.tgz", - "integrity": "sha512-/VioJDSK5TYea84zu6Qu5tCngCkAMNhPuVJ+3cmDGcM9H+tq0LiStVlW3efGUV+R4DyHg8GymWHpMXVjm6UIDg==", - "optional": true - }, - "@swc/helpers": { - "version": "0.4.11", - "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.4.11.tgz", - "integrity": "sha512-rEUrBSGIoSFuYxwBYtlUFMlE2CwGhmW+w9355/5oduSw8e5h2+Tj4UrAGNNgP9915++wj5vkQo0UuOBqOAq4nw==", - "requires": { - "tslib": "^2.4.0" - } - }, - "caniuse-lite": { - "version": "1.0.30001410", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001410.tgz", - "integrity": "sha512-QoblBnuE+rG0lc3Ur9ltP5q47lbguipa/ncNMyyGuqPk44FxbScWAeEO+k5fSQ8WekdAK4mWqNs1rADDAiN5xQ==" - }, - "js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" - }, - "loose-envify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "requires": { - "js-tokens": "^3.0.0 || ^4.0.0" - } - }, - "nanoid": { - "version": "2.1.11", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-2.1.11.tgz", - "integrity": "sha512-s/snB+WGm6uwi0WjsZdaVcuf3KJXlfGl2LcxgwkEwJF0D/BWzVWAZW/XY4bFaiR7s0Jk3FPvlnepg1H1b1UwlA==" - }, - "next": { - "version": "12.3.2-canary.11", - "resolved": "https://registry.npmjs.org/next/-/next-12.3.2-canary.11.tgz", - "integrity": "sha512-LBPr3z2xn+djEnkdajLJKqZimXyfHjpKmReyMAEuyk+2rZ1WICQYV5QOh2vhXqPxwiqqardX7VjuiBXkQeR1Qg==", - "requires": { - "@next/env": "12.3.2-canary.11", - "@next/swc-android-arm-eabi": "12.3.2-canary.11", - "@next/swc-android-arm64": "12.3.2-canary.11", - "@next/swc-darwin-arm64": "12.3.2-canary.11", - "@next/swc-darwin-x64": "12.3.2-canary.11", - "@next/swc-freebsd-x64": "12.3.2-canary.11", - "@next/swc-linux-arm-gnueabihf": "12.3.2-canary.11", - "@next/swc-linux-arm64-gnu": "12.3.2-canary.11", - "@next/swc-linux-arm64-musl": "12.3.2-canary.11", - "@next/swc-linux-x64-gnu": "12.3.2-canary.11", - "@next/swc-linux-x64-musl": "12.3.2-canary.11", - "@next/swc-win32-arm64-msvc": "12.3.2-canary.11", - "@next/swc-win32-ia32-msvc": "12.3.2-canary.11", - "@next/swc-win32-x64-msvc": "12.3.2-canary.11", - "@swc/helpers": "0.4.11", - "caniuse-lite": "^1.0.30001406", - "postcss": "8.4.14", - "styled-jsx": "5.0.7", - "use-sync-external-store": "1.2.0" - } - }, - "picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" - }, - "postcss": { - "version": "8.4.14", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.14.tgz", - "integrity": "sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig==", - "requires": { - "nanoid": "^3.3.4", - "picocolors": "^1.0.0", - "source-map-js": "^1.0.2" - }, - "dependencies": { - "nanoid": { - "version": "3.3.4", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz", - "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==" - } - } - }, - "react": { - "version": "0.0.0-experimental-ae7ad8b4c-20220927", - "resolved": "https://registry.npmjs.org/react/-/react-0.0.0-experimental-ae7ad8b4c-20220927.tgz", - "integrity": "sha512-Fl0Cbo7/nsZpP0DXx1BmyxfG698WcWwXc3FPrRiE1QwuYQX20DSIYyLVG0dYnhgvjCeDwqa5+iB1pY7oiPsYrQ==", - "requires": { - "loose-envify": "^1.1.0" - } - }, - "react-dom": { - "version": "0.0.0-experimental-ae7ad8b4c-20220927", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-0.0.0-experimental-ae7ad8b4c-20220927.tgz", - "integrity": "sha512-sDbnAhUleyQzdQ4HJKDml3l62Rct7JcHbIVWX4hLmnFs+oskCUrMfs7eCC9UVCBWC2+huUpZCiD69x44m+l2+A==", - "requires": { - "loose-envify": "^1.1.0", - "scheduler": "0.0.0-experimental-ae7ad8b4c-20220927" - } - }, - "scheduler": { - "version": "0.0.0-experimental-ae7ad8b4c-20220927", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.0.0-experimental-ae7ad8b4c-20220927.tgz", - "integrity": "sha512-0sMHQklwZ6WbISng47exj1LeAAZkqYVaBOjmywwyjeyWGwNpLx526/DNZVgdE5/a79FhZRQ7bhfuFdCmC5B4aQ==", - "requires": { - "loose-envify": "^1.1.0" - } - }, - "source-map-js": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", - "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==" - }, - "styled-jsx": { - "version": "5.0.7", - "resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.0.7.tgz", - "integrity": "sha512-b3sUzamS086YLRuvnaDigdAewz1/EFYlHpYBP5mZovKEdQQOIIYq8lApylub3HHZ6xFjV051kkGU7cudJmrXEA==" - }, - "tslib": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", - "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" - }, - "use-sync-external-store": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz", - "integrity": "sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==" - } - } -} diff --git a/demos/app-dir/package.json b/demos/app-dir/package.json deleted file mode 100644 index 2f21b3ed04..0000000000 --- a/demos/app-dir/package.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "name": "app-dir", - "version": "1.0.0", - "description": "", - "scripts": { - "build": "next build" - }, - "author": "", - "license": "MIT", - "dependencies": { - "nanoid": "^2.1.11", - "next": "12.3.2-canary.11", - "react": "0.0.0-experimental-ae7ad8b4c-20220927", - "react-dom": "0.0.0-experimental-ae7ad8b4c-20220927" - } -} diff --git a/demos/app-dir/pages/api/hello.js b/demos/app-dir/pages/api/hello.js deleted file mode 100644 index 47779ec1fa..0000000000 --- a/demos/app-dir/pages/api/hello.js +++ /dev/null @@ -1,7 +0,0 @@ -export default function api(req) { - return new Response('hello') -} - -export const config = { - runtime: 'experimental-edge', -} diff --git a/demos/app-dir/pages/index.js b/demos/app-dir/pages/index.js deleted file mode 100644 index dd991a34e3..0000000000 --- a/demos/app-dir/pages/index.js +++ /dev/null @@ -1,11 +0,0 @@ -import Link from 'next/link' -import styles from '../styles/shared.module.css' - -export default function Page(props) { - return ( - <> -

hello from pages/index

- Dashboard - - ) -} diff --git a/demos/canary/.eslintrc.json b/demos/canary/.eslintrc.json deleted file mode 100755 index bffb357a71..0000000000 --- a/demos/canary/.eslintrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "next/core-web-vitals" -} diff --git a/demos/canary/.gitignore b/demos/canary/.gitignore deleted file mode 100755 index 5c8e186769..0000000000 --- a/demos/canary/.gitignore +++ /dev/null @@ -1,35 +0,0 @@ -# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. - -# dependencies -/node_modules -/.pnp -.pnp.js - -# testing -/coverage - -# next.js -/.next/ -/out/ - -# production -/build - -# misc -.DS_Store -*.pem - -# debug -npm-debug.log* -yarn-debug.log* -yarn-error.log* -.pnpm-debug.log* - -# local env files -.env*.local - -# vercel -.vercel - -# netlify -.netlify diff --git a/demos/app-dir/.npmrc b/demos/canary/.npmrc similarity index 100% rename from demos/app-dir/.npmrc rename to demos/canary/.npmrc diff --git a/demos/canary/README.md b/demos/canary/README.md deleted file mode 100755 index 9869bf7455..0000000000 --- a/demos/canary/README.md +++ /dev/null @@ -1,28 +0,0 @@ -This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). - -## Getting Started - -First, run the development server: - -```bash -npm run dev -# or -yarn dev -``` - -Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. - -You can start editing the page by modifying `pages/index.js`. The page auto-updates as you edit the file. - -[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.js`. - -The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages. - -## Learn More - -To learn more about Next.js, take a look at the following resources: - -- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. -- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. - -You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! diff --git a/demos/app-dir/app/(newroot)/dashboard/another/page.js b/demos/canary/app/(newroot)/dashboard/another/page.js similarity index 100% rename from demos/app-dir/app/(newroot)/dashboard/another/page.js rename to demos/canary/app/(newroot)/dashboard/another/page.js diff --git a/demos/app-dir/app/(newroot)/dashboard/project/[projectId]/page.js b/demos/canary/app/(newroot)/dashboard/project/[projectId]/page.js similarity index 100% rename from demos/app-dir/app/(newroot)/dashboard/project/[projectId]/page.js rename to demos/canary/app/(newroot)/dashboard/project/[projectId]/page.js diff --git a/demos/app-dir/app/(newroot)/layout.js b/demos/canary/app/(newroot)/layout.js similarity index 100% rename from demos/app-dir/app/(newroot)/layout.js rename to demos/canary/app/(newroot)/layout.js diff --git a/demos/app-dir/app/(rootonly)/dashboard/changelog/page.js b/demos/canary/app/(rootonly)/dashboard/changelog/page.js similarity index 100% rename from demos/app-dir/app/(rootonly)/dashboard/changelog/page.js rename to demos/canary/app/(rootonly)/dashboard/changelog/page.js diff --git a/demos/app-dir/app/(rootonly)/dashboard/hello/page.js b/demos/canary/app/(rootonly)/dashboard/hello/page.js similarity index 100% rename from demos/app-dir/app/(rootonly)/dashboard/hello/page.js rename to demos/canary/app/(rootonly)/dashboard/hello/page.js diff --git a/demos/app-dir/app/catch-all/[...slug]/components/widget.js b/demos/canary/app/catch-all/[...slug]/components/widget.js similarity index 100% rename from demos/app-dir/app/catch-all/[...slug]/components/widget.js rename to demos/canary/app/catch-all/[...slug]/components/widget.js diff --git a/demos/app-dir/app/catch-all/[...slug]/page.js b/demos/canary/app/catch-all/[...slug]/page.js similarity index 100% rename from demos/app-dir/app/catch-all/[...slug]/page.js rename to demos/canary/app/catch-all/[...slug]/page.js diff --git a/demos/app-dir/app/client-component-route/page.js b/demos/canary/app/client-component-route/page.js similarity index 100% rename from demos/app-dir/app/client-component-route/page.js rename to demos/canary/app/client-component-route/page.js diff --git a/demos/app-dir/app/client-component-route/style.css b/demos/canary/app/client-component-route/style.css similarity index 100% rename from demos/app-dir/app/client-component-route/style.css rename to demos/canary/app/client-component-route/style.css diff --git a/demos/app-dir/app/client-component-route/style.module.css b/demos/canary/app/client-component-route/style.module.css similarity index 100% rename from demos/app-dir/app/client-component-route/style.module.css rename to demos/canary/app/client-component-route/style.module.css diff --git a/demos/app-dir/app/client-nested/layout.js b/demos/canary/app/client-nested/layout.js similarity index 100% rename from demos/app-dir/app/client-nested/layout.js rename to demos/canary/app/client-nested/layout.js diff --git a/demos/app-dir/app/client-nested/page.js b/demos/canary/app/client-nested/page.js similarity index 100% rename from demos/app-dir/app/client-nested/page.js rename to demos/canary/app/client-nested/page.js diff --git a/demos/app-dir/app/client-nested/style.css b/demos/canary/app/client-nested/style.css similarity index 100% rename from demos/app-dir/app/client-nested/style.css rename to demos/canary/app/client-nested/style.css diff --git a/demos/app-dir/app/client-nested/style.module.css b/demos/canary/app/client-nested/style.module.css similarity index 100% rename from demos/app-dir/app/client-nested/style.module.css rename to demos/canary/app/client-nested/style.module.css diff --git a/demos/app-dir/app/client-with-errors/get-server-side-props/page.js b/demos/canary/app/client-with-errors/get-server-side-props/page.js similarity index 100% rename from demos/app-dir/app/client-with-errors/get-server-side-props/page.js rename to demos/canary/app/client-with-errors/get-server-side-props/page.js diff --git a/demos/app-dir/app/client-with-errors/get-static-props/page.js b/demos/canary/app/client-with-errors/get-static-props/page.js similarity index 100% rename from demos/app-dir/app/client-with-errors/get-static-props/page.js rename to demos/canary/app/client-with-errors/get-static-props/page.js diff --git a/demos/app-dir/app/css/css-client/client-foo.css b/demos/canary/app/css/css-client/client-foo.css similarity index 100% rename from demos/app-dir/app/css/css-client/client-foo.css rename to demos/canary/app/css/css-client/client-foo.css diff --git a/demos/app-dir/app/css/css-client/client-layout.css b/demos/canary/app/css/css-client/client-layout.css similarity index 100% rename from demos/app-dir/app/css/css-client/client-layout.css rename to demos/canary/app/css/css-client/client-layout.css diff --git a/demos/app-dir/app/css/css-client/client-page.css b/demos/canary/app/css/css-client/client-page.css similarity index 100% rename from demos/app-dir/app/css/css-client/client-page.css rename to demos/canary/app/css/css-client/client-page.css diff --git a/demos/app-dir/app/css/css-client/foo.js b/demos/canary/app/css/css-client/foo.js similarity index 100% rename from demos/app-dir/app/css/css-client/foo.js rename to demos/canary/app/css/css-client/foo.js diff --git a/demos/app-dir/app/css/css-client/layout.js b/demos/canary/app/css/css-client/layout.js similarity index 100% rename from demos/app-dir/app/css/css-client/layout.js rename to demos/canary/app/css/css-client/layout.js diff --git a/demos/app-dir/app/css/css-client/page.js b/demos/canary/app/css/css-client/page.js similarity index 100% rename from demos/app-dir/app/css/css-client/page.js rename to demos/canary/app/css/css-client/page.js diff --git a/demos/app-dir/app/css/css-nested/layout.js b/demos/canary/app/css/css-nested/layout.js similarity index 100% rename from demos/app-dir/app/css/css-nested/layout.js rename to demos/canary/app/css/css-nested/layout.js diff --git a/demos/app-dir/app/css/css-nested/page.js b/demos/canary/app/css/css-nested/page.js similarity index 100% rename from demos/app-dir/app/css/css-nested/page.js rename to demos/canary/app/css/css-nested/page.js diff --git a/demos/app-dir/app/css/css-nested/style.css b/demos/canary/app/css/css-nested/style.css similarity index 100% rename from demos/app-dir/app/css/css-nested/style.css rename to demos/canary/app/css/css-nested/style.css diff --git a/demos/app-dir/app/css/css-nested/style.module.css b/demos/canary/app/css/css-nested/style.module.css similarity index 100% rename from demos/app-dir/app/css/css-nested/style.module.css rename to demos/canary/app/css/css-nested/style.module.css diff --git a/demos/app-dir/app/css/css-page/layout.js b/demos/canary/app/css/css-page/layout.js similarity index 100% rename from demos/app-dir/app/css/css-page/layout.js rename to demos/canary/app/css/css-page/layout.js diff --git a/demos/app-dir/app/css/css-page/page.js b/demos/canary/app/css/css-page/page.js similarity index 100% rename from demos/app-dir/app/css/css-page/page.js rename to demos/canary/app/css/css-page/page.js diff --git a/demos/app-dir/app/css/css-page/style.css b/demos/canary/app/css/css-page/style.css similarity index 100% rename from demos/app-dir/app/css/css-page/style.css rename to demos/canary/app/css/css-page/style.css diff --git a/demos/app-dir/app/css/css-page/style.module.css b/demos/canary/app/css/css-page/style.module.css similarity index 100% rename from demos/app-dir/app/css/css-page/style.module.css rename to demos/canary/app/css/css-page/style.module.css diff --git a/demos/app-dir/app/css/css-page/style2.css b/demos/canary/app/css/css-page/style2.css similarity index 100% rename from demos/app-dir/app/css/css-page/style2.css rename to demos/canary/app/css/css-page/style2.css diff --git a/demos/app-dir/app/css/foo.js b/demos/canary/app/css/foo.js similarity index 100% rename from demos/app-dir/app/css/foo.js rename to demos/canary/app/css/foo.js diff --git a/demos/app-dir/app/css/layout.js b/demos/canary/app/css/layout.js similarity index 100% rename from demos/app-dir/app/css/layout.js rename to demos/canary/app/css/layout.js diff --git a/demos/app-dir/app/css/style.css b/demos/canary/app/css/style.css similarity index 100% rename from demos/app-dir/app/css/style.css rename to demos/canary/app/css/style.css diff --git a/demos/app-dir/app/css/style.module.css b/demos/canary/app/css/style.module.css similarity index 100% rename from demos/app-dir/app/css/style.module.css rename to demos/canary/app/css/style.module.css diff --git a/demos/app-dir/app/dashboard/(custom)/deployments/breakdown/page.js b/demos/canary/app/dashboard/(custom)/deployments/breakdown/page.js similarity index 100% rename from demos/app-dir/app/dashboard/(custom)/deployments/breakdown/page.js rename to demos/canary/app/dashboard/(custom)/deployments/breakdown/page.js diff --git a/demos/app-dir/app/dashboard/(custom)/layout.js b/demos/canary/app/dashboard/(custom)/layout.js similarity index 100% rename from demos/app-dir/app/dashboard/(custom)/layout.js rename to demos/canary/app/dashboard/(custom)/layout.js diff --git a/demos/app-dir/app/dashboard/client-comp-client.jsx b/demos/canary/app/dashboard/client-comp-client.jsx similarity index 100% rename from demos/app-dir/app/dashboard/client-comp-client.jsx rename to demos/canary/app/dashboard/client-comp-client.jsx diff --git a/demos/app-dir/app/dashboard/client-comp.module.css b/demos/canary/app/dashboard/client-comp.module.css similarity index 100% rename from demos/app-dir/app/dashboard/client-comp.module.css rename to demos/canary/app/dashboard/client-comp.module.css diff --git a/demos/app-dir/app/dashboard/deployments/[id]/page.js b/demos/canary/app/dashboard/deployments/[id]/page.js similarity index 100% rename from demos/app-dir/app/dashboard/deployments/[id]/page.js rename to demos/canary/app/dashboard/deployments/[id]/page.js diff --git a/demos/app-dir/app/dashboard/deployments/info/page.js b/demos/canary/app/dashboard/deployments/info/page.js similarity index 100% rename from demos/app-dir/app/dashboard/deployments/info/page.js rename to demos/canary/app/dashboard/deployments/info/page.js diff --git a/demos/app-dir/app/dashboard/deployments/layout.js b/demos/canary/app/dashboard/deployments/layout.js similarity index 100% rename from demos/app-dir/app/dashboard/deployments/layout.js rename to demos/canary/app/dashboard/deployments/layout.js diff --git a/demos/app-dir/app/dashboard/global.css b/demos/canary/app/dashboard/global.css similarity index 100% rename from demos/app-dir/app/dashboard/global.css rename to demos/canary/app/dashboard/global.css diff --git a/demos/app-dir/app/dashboard/index/dynamic-imports/dynamic-client.js b/demos/canary/app/dashboard/index/dynamic-imports/dynamic-client.js similarity index 100% rename from demos/app-dir/app/dashboard/index/dynamic-imports/dynamic-client.js rename to demos/canary/app/dashboard/index/dynamic-imports/dynamic-client.js diff --git a/demos/app-dir/app/dashboard/index/dynamic-imports/dynamic-server.js b/demos/canary/app/dashboard/index/dynamic-imports/dynamic-server.js similarity index 100% rename from demos/app-dir/app/dashboard/index/dynamic-imports/dynamic-server.js rename to demos/canary/app/dashboard/index/dynamic-imports/dynamic-server.js diff --git a/demos/app-dir/app/dashboard/index/dynamic-imports/react-lazy-client.js b/demos/canary/app/dashboard/index/dynamic-imports/react-lazy-client.js similarity index 100% rename from demos/app-dir/app/dashboard/index/dynamic-imports/react-lazy-client.js rename to demos/canary/app/dashboard/index/dynamic-imports/react-lazy-client.js diff --git a/demos/app-dir/app/dashboard/index/dynamic.module.css b/demos/canary/app/dashboard/index/dynamic.module.css similarity index 100% rename from demos/app-dir/app/dashboard/index/dynamic.module.css rename to demos/canary/app/dashboard/index/dynamic.module.css diff --git a/demos/app-dir/app/dashboard/index/lazy.module.css b/demos/canary/app/dashboard/index/lazy.module.css similarity index 100% rename from demos/app-dir/app/dashboard/index/lazy.module.css rename to demos/canary/app/dashboard/index/lazy.module.css diff --git a/demos/app-dir/app/dashboard/index/page.js b/demos/canary/app/dashboard/index/page.js similarity index 100% rename from demos/app-dir/app/dashboard/index/page.js rename to demos/canary/app/dashboard/index/page.js diff --git a/demos/app-dir/app/dashboard/index/text-dynamic-client.js b/demos/canary/app/dashboard/index/text-dynamic-client.js similarity index 100% rename from demos/app-dir/app/dashboard/index/text-dynamic-client.js rename to demos/canary/app/dashboard/index/text-dynamic-client.js diff --git a/demos/app-dir/app/dashboard/index/text-dynamic-server.js b/demos/canary/app/dashboard/index/text-dynamic-server.js similarity index 100% rename from demos/app-dir/app/dashboard/index/text-dynamic-server.js rename to demos/canary/app/dashboard/index/text-dynamic-server.js diff --git a/demos/app-dir/app/dashboard/index/text-lazy-client.js b/demos/canary/app/dashboard/index/text-lazy-client.js similarity index 100% rename from demos/app-dir/app/dashboard/index/text-lazy-client.js rename to demos/canary/app/dashboard/index/text-lazy-client.js diff --git a/demos/app-dir/app/dashboard/integrations/page.js b/demos/canary/app/dashboard/integrations/page.js similarity index 100% rename from demos/app-dir/app/dashboard/integrations/page.js rename to demos/canary/app/dashboard/integrations/page.js diff --git a/demos/app-dir/app/dashboard/layout.js b/demos/canary/app/dashboard/layout.js similarity index 100% rename from demos/app-dir/app/dashboard/layout.js rename to demos/canary/app/dashboard/layout.js diff --git a/demos/app-dir/app/dashboard/page.js b/demos/canary/app/dashboard/page.js similarity index 100% rename from demos/app-dir/app/dashboard/page.js rename to demos/canary/app/dashboard/page.js diff --git a/demos/app-dir/app/dashboard/style.css b/demos/canary/app/dashboard/style.css similarity index 100% rename from demos/app-dir/app/dashboard/style.css rename to demos/canary/app/dashboard/style.css diff --git a/demos/app-dir/app/dynamic/[category]/[id]/layout.js b/demos/canary/app/dynamic/[category]/[id]/layout.js similarity index 100% rename from demos/app-dir/app/dynamic/[category]/[id]/layout.js rename to demos/canary/app/dynamic/[category]/[id]/layout.js diff --git a/demos/app-dir/app/dynamic/[category]/[id]/page.js b/demos/canary/app/dynamic/[category]/[id]/page.js similarity index 100% rename from demos/app-dir/app/dynamic/[category]/[id]/page.js rename to demos/canary/app/dynamic/[category]/[id]/page.js diff --git a/demos/app-dir/app/dynamic/[category]/layout.js b/demos/canary/app/dynamic/[category]/layout.js similarity index 100% rename from demos/app-dir/app/dynamic/[category]/layout.js rename to demos/canary/app/dynamic/[category]/layout.js diff --git a/demos/app-dir/app/dynamic/layout.js b/demos/canary/app/dynamic/layout.js similarity index 100% rename from demos/app-dir/app/dynamic/layout.js rename to demos/canary/app/dynamic/layout.js diff --git a/demos/app-dir/app/error/clientcomponent/error.js b/demos/canary/app/error/clientcomponent/error.js similarity index 100% rename from demos/app-dir/app/error/clientcomponent/error.js rename to demos/canary/app/error/clientcomponent/error.js diff --git a/demos/app-dir/app/error/clientcomponent/page.js b/demos/canary/app/error/clientcomponent/page.js similarity index 100% rename from demos/app-dir/app/error/clientcomponent/page.js rename to demos/canary/app/error/clientcomponent/page.js diff --git a/demos/app-dir/app/error/ssr-error-client-component/client-component.js b/demos/canary/app/error/ssr-error-client-component/client-component.js similarity index 100% rename from demos/app-dir/app/error/ssr-error-client-component/client-component.js rename to demos/canary/app/error/ssr-error-client-component/client-component.js diff --git a/demos/app-dir/app/error/ssr-error-client-component/page.js b/demos/canary/app/error/ssr-error-client-component/page.js similarity index 100% rename from demos/app-dir/app/error/ssr-error-client-component/page.js rename to demos/canary/app/error/ssr-error-client-component/page.js diff --git a/demos/app-dir/app/extension/page.server.js b/demos/canary/app/extension/page.server.js similarity index 100% rename from demos/app-dir/app/extension/page.server.js rename to demos/canary/app/extension/page.server.js diff --git a/demos/app-dir/app/hooks/use-cookies/client/page.js b/demos/canary/app/hooks/use-cookies/client/page.js similarity index 100% rename from demos/app-dir/app/hooks/use-cookies/client/page.js rename to demos/canary/app/hooks/use-cookies/client/page.js diff --git a/demos/app-dir/app/hooks/use-cookies/page.js b/demos/canary/app/hooks/use-cookies/page.js similarity index 100% rename from demos/app-dir/app/hooks/use-cookies/page.js rename to demos/canary/app/hooks/use-cookies/page.js diff --git a/demos/app-dir/app/hooks/use-headers/client/page.js b/demos/canary/app/hooks/use-headers/client/page.js similarity index 100% rename from demos/app-dir/app/hooks/use-headers/client/page.js rename to demos/canary/app/hooks/use-headers/client/page.js diff --git a/demos/app-dir/app/hooks/use-headers/page.js b/demos/canary/app/hooks/use-headers/page.js similarity index 100% rename from demos/app-dir/app/hooks/use-headers/page.js rename to demos/canary/app/hooks/use-headers/page.js diff --git a/demos/app-dir/app/hooks/use-layout-segments/server/page.js b/demos/canary/app/hooks/use-layout-segments/server/page.js similarity index 100% rename from demos/app-dir/app/hooks/use-layout-segments/server/page.js rename to demos/canary/app/hooks/use-layout-segments/server/page.js diff --git a/demos/app-dir/app/hooks/use-params/server/page.js b/demos/canary/app/hooks/use-params/server/page.js similarity index 100% rename from demos/app-dir/app/hooks/use-params/server/page.js rename to demos/canary/app/hooks/use-params/server/page.js diff --git a/demos/app-dir/app/hooks/use-pathname/page.js b/demos/canary/app/hooks/use-pathname/page.js similarity index 100% rename from demos/app-dir/app/hooks/use-pathname/page.js rename to demos/canary/app/hooks/use-pathname/page.js diff --git a/demos/app-dir/app/hooks/use-pathname/server/page.js b/demos/canary/app/hooks/use-pathname/server/page.js similarity index 100% rename from demos/app-dir/app/hooks/use-pathname/server/page.js rename to demos/canary/app/hooks/use-pathname/server/page.js diff --git a/demos/app-dir/app/hooks/use-preview-data/client/page.js b/demos/canary/app/hooks/use-preview-data/client/page.js similarity index 100% rename from demos/app-dir/app/hooks/use-preview-data/client/page.js rename to demos/canary/app/hooks/use-preview-data/client/page.js diff --git a/demos/app-dir/app/hooks/use-preview-data/page.js b/demos/canary/app/hooks/use-preview-data/page.js similarity index 100% rename from demos/app-dir/app/hooks/use-preview-data/page.js rename to demos/canary/app/hooks/use-preview-data/page.js diff --git a/demos/app-dir/app/hooks/use-router/page.js b/demos/canary/app/hooks/use-router/page.js similarity index 100% rename from demos/app-dir/app/hooks/use-router/page.js rename to demos/canary/app/hooks/use-router/page.js diff --git a/demos/app-dir/app/hooks/use-router/server/page.js b/demos/canary/app/hooks/use-router/server/page.js similarity index 100% rename from demos/app-dir/app/hooks/use-router/server/page.js rename to demos/canary/app/hooks/use-router/server/page.js diff --git a/demos/app-dir/app/hooks/use-router/sub-page/page.js b/demos/canary/app/hooks/use-router/sub-page/page.js similarity index 100% rename from demos/app-dir/app/hooks/use-router/sub-page/page.js rename to demos/canary/app/hooks/use-router/sub-page/page.js diff --git a/demos/app-dir/app/hooks/use-search-params/page.js b/demos/canary/app/hooks/use-search-params/page.js similarity index 100% rename from demos/app-dir/app/hooks/use-search-params/page.js rename to demos/canary/app/hooks/use-search-params/page.js diff --git a/demos/app-dir/app/hooks/use-search-params/server/page.js b/demos/canary/app/hooks/use-search-params/server/page.js similarity index 100% rename from demos/app-dir/app/hooks/use-search-params/server/page.js rename to demos/canary/app/hooks/use-search-params/server/page.js diff --git a/demos/app-dir/app/hooks/use-selected-layout-segment/server/page.js b/demos/canary/app/hooks/use-selected-layout-segment/server/page.js similarity index 100% rename from demos/app-dir/app/hooks/use-selected-layout-segment/server/page.js rename to demos/canary/app/hooks/use-selected-layout-segment/server/page.js diff --git a/demos/app-dir/app/internal/failure/page.js b/demos/canary/app/internal/failure/page.js similarity index 100% rename from demos/app-dir/app/internal/failure/page.js rename to demos/canary/app/internal/failure/page.js diff --git a/demos/app-dir/app/internal/page.js b/demos/canary/app/internal/page.js similarity index 100% rename from demos/app-dir/app/internal/page.js rename to demos/canary/app/internal/page.js diff --git a/demos/app-dir/app/internal/success/page.js b/demos/canary/app/internal/success/page.js similarity index 100% rename from demos/app-dir/app/internal/success/page.js rename to demos/canary/app/internal/success/page.js diff --git a/demos/app-dir/app/layout.js b/demos/canary/app/layout.js similarity index 100% rename from demos/app-dir/app/layout.js rename to demos/canary/app/layout.js diff --git a/demos/app-dir/app/link-hard-push/[id]/page.js b/demos/canary/app/link-hard-push/[id]/page.js similarity index 100% rename from demos/app-dir/app/link-hard-push/[id]/page.js rename to demos/canary/app/link-hard-push/[id]/page.js diff --git a/demos/app-dir/app/link-hard-replace/[id]/page.js b/demos/canary/app/link-hard-replace/[id]/page.js similarity index 100% rename from demos/app-dir/app/link-hard-replace/[id]/page.js rename to demos/canary/app/link-hard-replace/[id]/page.js diff --git a/demos/app-dir/app/link-hard-replace/page.js b/demos/canary/app/link-hard-replace/page.js similarity index 100% rename from demos/app-dir/app/link-hard-replace/page.js rename to demos/canary/app/link-hard-replace/page.js diff --git a/demos/app-dir/app/link-hard-replace/subpage/page.js b/demos/canary/app/link-hard-replace/subpage/page.js similarity index 100% rename from demos/app-dir/app/link-hard-replace/subpage/page.js rename to demos/canary/app/link-hard-replace/subpage/page.js diff --git a/demos/app-dir/app/link-soft-push/page.js b/demos/canary/app/link-soft-push/page.js similarity index 100% rename from demos/app-dir/app/link-soft-push/page.js rename to demos/canary/app/link-soft-push/page.js diff --git a/demos/app-dir/app/link-soft-replace/page.js b/demos/canary/app/link-soft-replace/page.js similarity index 100% rename from demos/app-dir/app/link-soft-replace/page.js rename to demos/canary/app/link-soft-replace/page.js diff --git a/demos/app-dir/app/link-soft-replace/subpage/page.js b/demos/canary/app/link-soft-replace/subpage/page.js similarity index 100% rename from demos/app-dir/app/link-soft-replace/subpage/page.js rename to demos/canary/app/link-soft-replace/subpage/page.js diff --git a/demos/app-dir/app/loading-bug/[categorySlug]/loading.js b/demos/canary/app/loading-bug/[categorySlug]/loading.js similarity index 100% rename from demos/app-dir/app/loading-bug/[categorySlug]/loading.js rename to demos/canary/app/loading-bug/[categorySlug]/loading.js diff --git a/demos/app-dir/app/loading-bug/[categorySlug]/page.js b/demos/canary/app/loading-bug/[categorySlug]/page.js similarity index 100% rename from demos/app-dir/app/loading-bug/[categorySlug]/page.js rename to demos/canary/app/loading-bug/[categorySlug]/page.js diff --git a/demos/app-dir/app/navigation/link.js b/demos/canary/app/navigation/link.js similarity index 100% rename from demos/app-dir/app/navigation/link.js rename to demos/canary/app/navigation/link.js diff --git a/demos/app-dir/app/navigation/page.js b/demos/canary/app/navigation/page.js similarity index 100% rename from demos/app-dir/app/navigation/page.js rename to demos/canary/app/navigation/page.js diff --git a/demos/app-dir/app/not-found/404.js b/demos/canary/app/not-found/404.js similarity index 100% rename from demos/app-dir/app/not-found/404.js rename to demos/canary/app/not-found/404.js diff --git a/demos/app-dir/app/not-found/client-side/page.js b/demos/canary/app/not-found/client-side/page.js similarity index 100% rename from demos/app-dir/app/not-found/client-side/page.js rename to demos/canary/app/not-found/client-side/page.js diff --git a/demos/app-dir/app/not-found/clientcomponent/a.js b/demos/canary/app/not-found/clientcomponent/a.js similarity index 100% rename from demos/app-dir/app/not-found/clientcomponent/a.js rename to demos/canary/app/not-found/clientcomponent/a.js diff --git a/demos/app-dir/app/not-found/clientcomponent/client-component.js b/demos/canary/app/not-found/clientcomponent/client-component.js similarity index 100% rename from demos/app-dir/app/not-found/clientcomponent/client-component.js rename to demos/canary/app/not-found/clientcomponent/client-component.js diff --git a/demos/app-dir/app/not-found/servercomponent/a.js b/demos/canary/app/not-found/servercomponent/a.js similarity index 100% rename from demos/app-dir/app/not-found/servercomponent/a.js rename to demos/canary/app/not-found/servercomponent/a.js diff --git a/demos/app-dir/app/old-router/client-router.js b/demos/canary/app/old-router/client-router.js similarity index 100% rename from demos/app-dir/app/old-router/client-router.js rename to demos/canary/app/old-router/client-router.js diff --git a/demos/app-dir/app/old-router/is-null.js b/demos/canary/app/old-router/is-null.js similarity index 100% rename from demos/app-dir/app/old-router/is-null.js rename to demos/canary/app/old-router/is-null.js diff --git a/demos/app-dir/app/old-router/page.js b/demos/canary/app/old-router/page.js similarity index 100% rename from demos/app-dir/app/old-router/page.js rename to demos/canary/app/old-router/page.js diff --git a/demos/app-dir/app/old-router/router.js b/demos/canary/app/old-router/router.js similarity index 100% rename from demos/app-dir/app/old-router/router.js rename to demos/canary/app/old-router/router.js diff --git a/demos/app-dir/app/old-router/server-router.js b/demos/canary/app/old-router/server-router.js similarity index 100% rename from demos/app-dir/app/old-router/server-router.js rename to demos/canary/app/old-router/server-router.js diff --git a/demos/app-dir/app/optional-catch-all/[[...slug]]/page.js b/demos/canary/app/optional-catch-all/[[...slug]]/page.js similarity index 100% rename from demos/app-dir/app/optional-catch-all/[[...slug]]/page.js rename to demos/canary/app/optional-catch-all/[[...slug]]/page.js diff --git a/demos/app-dir/app/pages-linking/page.js b/demos/canary/app/pages-linking/page.js similarity index 100% rename from demos/app-dir/app/pages-linking/page.js rename to demos/canary/app/pages-linking/page.js diff --git a/demos/app-dir/app/parallel/(new)/@baz/nested-2/page.js b/demos/canary/app/parallel/(new)/@baz/nested-2/page.js similarity index 100% rename from demos/app-dir/app/parallel/(new)/@baz/nested-2/page.js rename to demos/canary/app/parallel/(new)/@baz/nested-2/page.js diff --git a/demos/app-dir/app/parallel/(new)/layout.js b/demos/canary/app/parallel/(new)/layout.js similarity index 100% rename from demos/app-dir/app/parallel/(new)/layout.js rename to demos/canary/app/parallel/(new)/layout.js diff --git a/demos/app-dir/app/parallel/@bar/nested/@a/page.js b/demos/canary/app/parallel/@bar/nested/@a/page.js similarity index 100% rename from demos/app-dir/app/parallel/@bar/nested/@a/page.js rename to demos/canary/app/parallel/@bar/nested/@a/page.js diff --git a/demos/app-dir/app/parallel/@bar/nested/@b/page.js b/demos/canary/app/parallel/@bar/nested/@b/page.js similarity index 100% rename from demos/app-dir/app/parallel/@bar/nested/@b/page.js rename to demos/canary/app/parallel/@bar/nested/@b/page.js diff --git a/demos/app-dir/app/parallel/@bar/nested/layout.js b/demos/canary/app/parallel/@bar/nested/layout.js similarity index 100% rename from demos/app-dir/app/parallel/@bar/nested/layout.js rename to demos/canary/app/parallel/@bar/nested/layout.js diff --git a/demos/app-dir/app/parallel/@bar/page.js b/demos/canary/app/parallel/@bar/page.js similarity index 100% rename from demos/app-dir/app/parallel/@bar/page.js rename to demos/canary/app/parallel/@bar/page.js diff --git a/demos/app-dir/app/parallel/@foo/nested/@a/page.js b/demos/canary/app/parallel/@foo/nested/@a/page.js similarity index 100% rename from demos/app-dir/app/parallel/@foo/nested/@a/page.js rename to demos/canary/app/parallel/@foo/nested/@a/page.js diff --git a/demos/app-dir/app/parallel/@foo/nested/@b/page.js b/demos/canary/app/parallel/@foo/nested/@b/page.js similarity index 100% rename from demos/app-dir/app/parallel/@foo/nested/@b/page.js rename to demos/canary/app/parallel/@foo/nested/@b/page.js diff --git a/demos/app-dir/app/parallel/@foo/nested/layout.js b/demos/canary/app/parallel/@foo/nested/layout.js similarity index 100% rename from demos/app-dir/app/parallel/@foo/nested/layout.js rename to demos/canary/app/parallel/@foo/nested/layout.js diff --git a/demos/app-dir/app/parallel/@foo/page.js b/demos/canary/app/parallel/@foo/page.js similarity index 100% rename from demos/app-dir/app/parallel/@foo/page.js rename to demos/canary/app/parallel/@foo/page.js diff --git a/demos/app-dir/app/parallel/layout.js b/demos/canary/app/parallel/layout.js similarity index 100% rename from demos/app-dir/app/parallel/layout.js rename to demos/canary/app/parallel/layout.js diff --git a/demos/app-dir/app/parallel/nested/page.js b/demos/canary/app/parallel/nested/page.js similarity index 100% rename from demos/app-dir/app/parallel/nested/page.js rename to demos/canary/app/parallel/nested/page.js diff --git a/demos/app-dir/app/parallel/style.css b/demos/canary/app/parallel/style.css similarity index 100% rename from demos/app-dir/app/parallel/style.css rename to demos/canary/app/parallel/style.css diff --git a/demos/app-dir/app/param-and-query/[slug]/page.js b/demos/canary/app/param-and-query/[slug]/page.js similarity index 100% rename from demos/app-dir/app/param-and-query/[slug]/page.js rename to demos/canary/app/param-and-query/[slug]/page.js diff --git a/demos/app-dir/app/partial-match-[id]/page.js b/demos/canary/app/partial-match-[id]/page.js similarity index 100% rename from demos/app-dir/app/partial-match-[id]/page.js rename to demos/canary/app/partial-match-[id]/page.js diff --git a/demos/app-dir/app/redirect/client-side/page.js b/demos/canary/app/redirect/client-side/page.js similarity index 100% rename from demos/app-dir/app/redirect/client-side/page.js rename to demos/canary/app/redirect/client-side/page.js diff --git a/demos/app-dir/app/redirect/clientcomponent/client-component.js b/demos/canary/app/redirect/clientcomponent/client-component.js similarity index 100% rename from demos/app-dir/app/redirect/clientcomponent/client-component.js rename to demos/canary/app/redirect/clientcomponent/client-component.js diff --git a/demos/app-dir/app/redirect/clientcomponent/page.js b/demos/canary/app/redirect/clientcomponent/page.js similarity index 100% rename from demos/app-dir/app/redirect/clientcomponent/page.js rename to demos/canary/app/redirect/clientcomponent/page.js diff --git a/demos/app-dir/app/redirect/next-config-redirect/page.js b/demos/canary/app/redirect/next-config-redirect/page.js similarity index 100% rename from demos/app-dir/app/redirect/next-config-redirect/page.js rename to demos/canary/app/redirect/next-config-redirect/page.js diff --git a/demos/app-dir/app/redirect/next-middleware-redirect/page.js b/demos/canary/app/redirect/next-middleware-redirect/page.js similarity index 100% rename from demos/app-dir/app/redirect/next-middleware-redirect/page.js rename to demos/canary/app/redirect/next-middleware-redirect/page.js diff --git a/demos/app-dir/app/redirect/result/page.js b/demos/canary/app/redirect/result/page.js similarity index 100% rename from demos/app-dir/app/redirect/result/page.js rename to demos/canary/app/redirect/result/page.js diff --git a/demos/app-dir/app/redirect/servercomponent/page.js b/demos/canary/app/redirect/servercomponent/page.js similarity index 100% rename from demos/app-dir/app/redirect/servercomponent/page.js rename to demos/canary/app/redirect/servercomponent/page.js diff --git a/demos/app-dir/app/rewrites/page.js b/demos/canary/app/rewrites/page.js similarity index 100% rename from demos/app-dir/app/rewrites/page.js rename to demos/canary/app/rewrites/page.js diff --git a/demos/app-dir/app/same-layout/first/page.js b/demos/canary/app/same-layout/first/page.js similarity index 100% rename from demos/app-dir/app/same-layout/first/page.js rename to demos/canary/app/same-layout/first/page.js diff --git a/demos/app-dir/app/same-layout/layout.js b/demos/canary/app/same-layout/layout.js similarity index 100% rename from demos/app-dir/app/same-layout/layout.js rename to demos/canary/app/same-layout/layout.js diff --git a/demos/app-dir/app/same-layout/second/page.js b/demos/canary/app/same-layout/second/page.js similarity index 100% rename from demos/app-dir/app/same-layout/second/page.js rename to demos/canary/app/same-layout/second/page.js diff --git a/demos/app-dir/app/shared-component-route/page.js b/demos/canary/app/shared-component-route/page.js similarity index 100% rename from demos/app-dir/app/shared-component-route/page.js rename to demos/canary/app/shared-component-route/page.js diff --git a/demos/app-dir/app/should-not-serve-client/page.js b/demos/canary/app/should-not-serve-client/page.js similarity index 100% rename from demos/app-dir/app/should-not-serve-client/page.js rename to demos/canary/app/should-not-serve-client/page.js diff --git a/demos/app-dir/app/should-not-serve-server/page.js b/demos/canary/app/should-not-serve-server/page.js similarity index 100% rename from demos/app-dir/app/should-not-serve-server/page.js rename to demos/canary/app/should-not-serve-server/page.js diff --git a/demos/app-dir/app/slow-layout-and-page-with-loading/loading.js b/demos/canary/app/slow-layout-and-page-with-loading/loading.js similarity index 100% rename from demos/app-dir/app/slow-layout-and-page-with-loading/loading.js rename to demos/canary/app/slow-layout-and-page-with-loading/loading.js diff --git a/demos/app-dir/app/slow-layout-and-page-with-loading/slow/layout.js b/demos/canary/app/slow-layout-and-page-with-loading/slow/layout.js similarity index 100% rename from demos/app-dir/app/slow-layout-and-page-with-loading/slow/layout.js rename to demos/canary/app/slow-layout-and-page-with-loading/slow/layout.js diff --git a/demos/app-dir/app/slow-layout-and-page-with-loading/slow/loading.js b/demos/canary/app/slow-layout-and-page-with-loading/slow/loading.js similarity index 100% rename from demos/app-dir/app/slow-layout-and-page-with-loading/slow/loading.js rename to demos/canary/app/slow-layout-and-page-with-loading/slow/loading.js diff --git a/demos/app-dir/app/slow-layout-and-page-with-loading/slow/page.js b/demos/canary/app/slow-layout-and-page-with-loading/slow/page.js similarity index 100% rename from demos/app-dir/app/slow-layout-and-page-with-loading/slow/page.js rename to demos/canary/app/slow-layout-and-page-with-loading/slow/page.js diff --git a/demos/app-dir/app/slow-layout-with-loading/loading.js b/demos/canary/app/slow-layout-with-loading/loading.js similarity index 100% rename from demos/app-dir/app/slow-layout-with-loading/loading.js rename to demos/canary/app/slow-layout-with-loading/loading.js diff --git a/demos/app-dir/app/slow-layout-with-loading/slow/layout.js b/demos/canary/app/slow-layout-with-loading/slow/layout.js similarity index 100% rename from demos/app-dir/app/slow-layout-with-loading/slow/layout.js rename to demos/canary/app/slow-layout-with-loading/slow/layout.js diff --git a/demos/app-dir/app/slow-layout-with-loading/slow/page.js b/demos/canary/app/slow-layout-with-loading/slow/page.js similarity index 100% rename from demos/app-dir/app/slow-layout-with-loading/slow/page.js rename to demos/canary/app/slow-layout-with-loading/slow/page.js diff --git a/demos/app-dir/app/slow-page-with-loading/loading.js b/demos/canary/app/slow-page-with-loading/loading.js similarity index 100% rename from demos/app-dir/app/slow-page-with-loading/loading.js rename to demos/canary/app/slow-page-with-loading/loading.js diff --git a/demos/app-dir/app/slow-page-with-loading/page.js b/demos/canary/app/slow-page-with-loading/page.js similarity index 100% rename from demos/app-dir/app/slow-page-with-loading/page.js rename to demos/canary/app/slow-page-with-loading/page.js diff --git a/demos/app-dir/app/style.css b/demos/canary/app/style.css similarity index 100% rename from demos/app-dir/app/style.css rename to demos/canary/app/style.css diff --git a/demos/app-dir/app/template/clientcomponent/other/page.js b/demos/canary/app/template/clientcomponent/other/page.js similarity index 100% rename from demos/app-dir/app/template/clientcomponent/other/page.js rename to demos/canary/app/template/clientcomponent/other/page.js diff --git a/demos/app-dir/app/template/clientcomponent/page.js b/demos/canary/app/template/clientcomponent/page.js similarity index 100% rename from demos/app-dir/app/template/clientcomponent/page.js rename to demos/canary/app/template/clientcomponent/page.js diff --git a/demos/app-dir/app/template/clientcomponent/template.js b/demos/canary/app/template/clientcomponent/template.js similarity index 100% rename from demos/app-dir/app/template/clientcomponent/template.js rename to demos/canary/app/template/clientcomponent/template.js diff --git a/demos/app-dir/app/template/servercomponent/other/page.js b/demos/canary/app/template/servercomponent/other/page.js similarity index 100% rename from demos/app-dir/app/template/servercomponent/other/page.js rename to demos/canary/app/template/servercomponent/other/page.js diff --git a/demos/app-dir/app/template/servercomponent/page.js b/demos/canary/app/template/servercomponent/page.js similarity index 100% rename from demos/app-dir/app/template/servercomponent/page.js rename to demos/canary/app/template/servercomponent/page.js diff --git a/demos/app-dir/app/template/servercomponent/template.js b/demos/canary/app/template/servercomponent/template.js similarity index 100% rename from demos/app-dir/app/template/servercomponent/template.js rename to demos/canary/app/template/servercomponent/template.js diff --git a/demos/app-dir/app/test-page/page.js b/demos/canary/app/test-page/page.js similarity index 100% rename from demos/app-dir/app/test-page/page.js rename to demos/canary/app/test-page/page.js diff --git a/demos/app-dir/app/with-id/page.js b/demos/canary/app/with-id/page.js similarity index 100% rename from demos/app-dir/app/with-id/page.js rename to demos/canary/app/with-id/page.js diff --git a/demos/app-dir/middleware.js b/demos/canary/middleware.js similarity index 100% rename from demos/app-dir/middleware.js rename to demos/canary/middleware.js diff --git a/demos/canary/middleware.ts b/demos/canary/middleware.ts deleted file mode 100644 index d695d442df..0000000000 --- a/demos/canary/middleware.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { NextResponse } from 'next/server' -import type { NextRequest } from 'next/server' - -export async function middleware(req: NextRequest) { - const res = NextResponse.rewrite(new URL('/', req.url)) - res.headers.set('x-response-header', 'set in middleware') - res.headers.set('x-is-deno', 'Deno' in globalThis ? 'true' : 'false') - return res -} - -export const config = { - matcher: ['/foo'], -} diff --git a/demos/canary/netlify.toml b/demos/canary/netlify.toml index b7cafdfa31..6caa4cf186 100644 --- a/demos/canary/netlify.toml +++ b/demos/canary/netlify.toml @@ -13,3 +13,17 @@ package = "../plugin-wrapper/" # This is a fake plugin, that makes it run npm install [[plugins]] package = "@netlify/plugin-local-install-core" + +# Uncomment this if testing the built files rather than dev +[dev] +framework = "#static" + +[[redirects]] +from = "/_next/static/*" +to = "/static/:splat" +status = 200 + +[[redirects]] +from = "/*" +to = "/.netlify/functions/___netlify-handler" +status = 200 diff --git a/demos/canary/next.config.js b/demos/canary/next.config.js old mode 100755 new mode 100644 index 25e668cff3..e16b7cc6f3 --- a/demos/canary/next.config.js +++ b/demos/canary/next.config.js @@ -1,20 +1,32 @@ -/** @type {import('next').NextConfig} */ -const nextConfig = { - reactStrictMode: true, +module.exports = { eslint: { - // Warning: This allows production builds to successfully complete even if - // your project has ESLint errors. ignoreDuringBuilds: true, }, - images: { - formats: ['image/avif', 'image/webp'], - remotePatterns: [ + experimental: { + appDir: true, + legacyBrowsers: false, + browsersListForSwc: true, + sri: { + algorithm: 'sha256', + }, + }, + rewrites: async () => { + return { + afterFiles: [ + { + source: '/rewritten-to-dashboard', + destination: '/dashboard', + }, + ], + } + }, + redirects: () => { + return [ { - protocol: 'https', - hostname: '*.githubusercontent.com', + source: '/redirect/a', + destination: '/dashboard', + permanent: false, }, - ], - } + ] + }, } - -module.exports = nextConfig diff --git a/demos/canary/package-lock.json b/demos/canary/package-lock.json index c38b0b632f..20fc897f01 100644 --- a/demos/canary/package-lock.json +++ b/demos/canary/package-lock.json @@ -1,78 +1,29 @@ { - "name": "canary", - "version": "0.1.0", + "name": "app-dir", + "version": "1.0.0", "lockfileVersion": 2, "requires": true, "packages": { "": { - "name": "canary", - "version": "0.1.0", - "dependencies": { - "next": "^12.3.2-canary.7", - "react": "18.1.0", - "react-dom": "18.1.0" - }, - "devDependencies": { - "eslint": "8.22.0" - } - }, - "node_modules/@eslint/eslintrc": { - "version": "1.3.0", - "dev": true, + "name": "app-dir", + "version": "1.0.0", "license": "MIT", "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.3.2", - "globals": "^13.15.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "node_modules/@humanwhocodes/config-array": { - "version": "0.10.4", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.10.4.tgz", - "integrity": "sha512-mXAIHxZT3Vcpg83opl1wGlVZ9xydbfZO3r5YfRSH6Gpp2J/PfdBP0wbDa2sO6/qRbcalpoevVyW6A/fI6LfeMw==", - "dev": true, - "dependencies": { - "@humanwhocodes/object-schema": "^1.2.1", - "debug": "^4.1.1", - "minimatch": "^3.0.4" - }, - "engines": { - "node": ">=10.10.0" + "nanoid": "^2.1.11", + "next": "12.3.2-canary.11", + "react": "0.0.0-experimental-ae7ad8b4c-20220927", + "react-dom": "0.0.0-experimental-ae7ad8b4c-20220927" } }, - "node_modules/@humanwhocodes/gitignore-to-minimatch": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@humanwhocodes/gitignore-to-minimatch/-/gitignore-to-minimatch-1.0.2.tgz", - "integrity": "sha512-rSqmMJDdLFUsyxR6FMtD00nfQKKLFb1kv+qBbOVKqErvloEIJLo5bDTJTQNTYgeyp78JsA7u/NPi5jT1GR/MuA==", - "dev": true, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "node_modules/@humanwhocodes/object-schema": { - "version": "1.2.1", - "dev": true, - "license": "BSD-3-Clause" - }, "node_modules/@next/env": { - "version": "12.3.2-canary.7", - "resolved": "https://registry.npmjs.org/@next/env/-/env-12.3.2-canary.7.tgz", - "integrity": "sha512-uk5yDvh8ra8PlIczZBTZKyt5Rf6a6mH2tGB3hwRAXD5hVLd74LzBQza2aYMEcDlRafAknsbL0dnqI3CkFYat9w==" + "version": "12.3.2-canary.11", + "resolved": "https://registry.npmjs.org/@next/env/-/env-12.3.2-canary.11.tgz", + "integrity": "sha512-XEV5JwAu7l7OygEeYxasX0Zu7LNqCZfRKeSsm3o6hSLzQSuvLsO49giKnrx9+TJXSalpj9bDbqaCpH3iuROesA==" }, "node_modules/@next/swc-android-arm-eabi": { - "version": "12.3.2-canary.7", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.3.2-canary.7.tgz", - "integrity": "sha512-pusM/ylasGBweiwhINtqWCgy5bOjLmIctFD0etpmh9+DqCg09yu58hJ1Dn/UTW8EbB1nkTP1z3dEoMKLh4fV2A==", + "version": "12.3.2-canary.11", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.3.2-canary.11.tgz", + "integrity": "sha512-xFdBf2AnRxJiRo4pp61zC5azxSkdjeNF86bLGfa3tiGNYkNVjrJZzqx2TUzBhzRBatrPe9nl9FSTaRRP31cZLw==", "cpu": [ "arm" ], @@ -85,9 +36,9 @@ } }, "node_modules/@next/swc-android-arm64": { - "version": "12.3.2-canary.7", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-12.3.2-canary.7.tgz", - "integrity": "sha512-x11T0ocPE9xrnqMeDzUMepN3P8CHIN8iiLgiFkbTbKTbSciuH3juOvKggJO9APZRG5Ch5eePWcCy2gHedAbhnA==", + "version": "12.3.2-canary.11", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-12.3.2-canary.11.tgz", + "integrity": "sha512-T/nVC6ojHG9hXVuejDTc6fcyUR78vDUbN+pmrGFYrjfPUWYt+bFDwRguGOXydWdJj3jyRkL9YyMmNZf0wuzheg==", "cpu": [ "arm64" ], @@ -100,9 +51,9 @@ } }, "node_modules/@next/swc-darwin-arm64": { - "version": "12.3.2-canary.7", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.3.2-canary.7.tgz", - "integrity": "sha512-tcO9hDaMfcbiaZp1B+HZcLzGGs36dnmjQ0YXyn6C88HEUoKyxanYleVHtTmWHlgsxxjZdDd/RzOze1ycWs2oXw==", + "version": "12.3.2-canary.11", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.3.2-canary.11.tgz", + "integrity": "sha512-HLebVmk8U7VfSTcro/vYrhvw2v85Uic48Y9z3TMiWakJoG1gBNEHuPnJXNLJJEWrpdc1rjP0n/7Jl6xofMGQMA==", "cpu": [ "arm64" ], @@ -115,9 +66,9 @@ } }, "node_modules/@next/swc-darwin-x64": { - "version": "12.3.2-canary.7", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.3.2-canary.7.tgz", - "integrity": "sha512-WjAyU67zj69nRM2GNAnBLvghq4EHTyDzMO02GjG6yexVhDvkE0OFlvh0BQLI3DIOz+B3RjJRcW3OoHi8XzW9UA==", + "version": "12.3.2-canary.11", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.3.2-canary.11.tgz", + "integrity": "sha512-gkpGaFDy8i90ll9USTMXHBuHmWbvpeCJxoSsWnAQuJZcUIZATL0iovdjjAvHh4cj5xWQpGXdGAJpL5ss4b2Pyw==", "cpu": [ "x64" ], @@ -130,9 +81,9 @@ } }, "node_modules/@next/swc-freebsd-x64": { - "version": "12.3.2-canary.7", - "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.3.2-canary.7.tgz", - "integrity": "sha512-cQrdPCMhP1Mc+pIt16FlC5BVgcXzLXRlm7qZ7wBRKG6r/IIIn/qNRFgQQcB3iyvfNZo7lURLKcfsxNmMGclldQ==", + "version": "12.3.2-canary.11", + "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.3.2-canary.11.tgz", + "integrity": "sha512-jTqkb3HN+PXlpXTzBEUhWnR9XA+Uj1vpjSx9jc+Lrl3esyzzKONqTNz4RRbOwDvU2TygQr+oaQqtdZAnj88d7w==", "cpu": [ "x64" ], @@ -145,9 +96,9 @@ } }, "node_modules/@next/swc-linux-arm-gnueabihf": { - "version": "12.3.2-canary.7", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.3.2-canary.7.tgz", - "integrity": "sha512-LEL+dUe10FhQHyXq9Mul5pOJwKDtrAylh9chktWf8eFr14j/YrfPbkLHv1+tCK8brDV3afVJMl0IpoCo75Yfyg==", + "version": "12.3.2-canary.11", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.3.2-canary.11.tgz", + "integrity": "sha512-Nt4qARbZozu7UeFpUfrJuKg6g6BCjYnAfKcDCLxAnDONrMoqIEkIVQmntH2i1GPwtp37qTaPG6v4TnJHGNBSOQ==", "cpu": [ "arm" ], @@ -160,9 +111,9 @@ } }, "node_modules/@next/swc-linux-arm64-gnu": { - "version": "12.3.2-canary.7", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.3.2-canary.7.tgz", - "integrity": "sha512-mbDqHk3C76UGIzkOv+G5NslKiSYIXyWQwbkuty0+0wLVJttWjWi2dMN7DFJQPMNvBefU9/vxVJdUnGVGEZfUXw==", + "version": "12.3.2-canary.11", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.3.2-canary.11.tgz", + "integrity": "sha512-8l0Ma2zIiTTTo042NMCYFlkIyGeFdpAtU2qTkIuJX9sBdffq9m/uHtnkv8R0u5myakn/5fkncojVx4uNRBGePg==", "cpu": [ "arm64" ], @@ -175,9 +126,9 @@ } }, "node_modules/@next/swc-linux-arm64-musl": { - "version": "12.3.2-canary.7", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.3.2-canary.7.tgz", - "integrity": "sha512-gJ3VQHuqb3ABiOKPxfWAJQdO4mp3yNnWIAPN8n52F7Zu38udbHXvcbIylWfQW/Qah+RRf7P7y2txH2kC07QOPA==", + "version": "12.3.2-canary.11", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.3.2-canary.11.tgz", + "integrity": "sha512-hOoWctziJqYNw0+RY3GR2og+Qr2ykgtIORKEZGHx9OAyg+dRLxJISHWv9umaAjE8Hoi7V0cS841XQ1B6XTnoKA==", "cpu": [ "arm64" ], @@ -190,9 +141,9 @@ } }, "node_modules/@next/swc-linux-x64-gnu": { - "version": "12.3.2-canary.7", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.3.2-canary.7.tgz", - "integrity": "sha512-/PBLiC+JfMJIzwMCQaSQgnLoIOjdSjTA9zarj2Kk1eCLjH8/VnsfBWtmP7TdbgIRYnZ8QKb4HXSOq94ZQS/fkw==", + "version": "12.3.2-canary.11", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.3.2-canary.11.tgz", + "integrity": "sha512-to03IoMs8v971yVFGm2Og7x6Z5LSPMzeFQikLqpUNS1lmk5Kha4vju4Ojc8nqEyPShojMhkbkjSH6sXbeCb+ZA==", "cpu": [ "x64" ], @@ -205,9 +156,9 @@ } }, "node_modules/@next/swc-linux-x64-musl": { - "version": "12.3.2-canary.7", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.3.2-canary.7.tgz", - "integrity": "sha512-Bf3goHoUd0SB58sVTMva0ByoLM+aEhm5YJRqsi7SsOAu9EAQwYfWgY2Hx60ah5i1N4ihYK0xjs8kwlfdDVOuow==", + "version": "12.3.2-canary.11", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.3.2-canary.11.tgz", + "integrity": "sha512-gSitcSo6PFzI/WHLLfRcLin6y1KLEADliLdFwHy7luotsrcalxjIWPD6tFqIZ7ajRjCZ02uY+lIPJ/FPhX3b8w==", "cpu": [ "x64" ], @@ -220,9 +171,9 @@ } }, "node_modules/@next/swc-win32-arm64-msvc": { - "version": "12.3.2-canary.7", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.3.2-canary.7.tgz", - "integrity": "sha512-aPRQ4dY5MuLgHCVdY+/Grgg4oX38pG4S0sT8mpatK3oIdjhj3961cj33QpPAy6dhhCs8m0/eCWYmM9KKlAAUsg==", + "version": "12.3.2-canary.11", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.3.2-canary.11.tgz", + "integrity": "sha512-o4F0/cS/7qBOSz+F3A1iPBqbhNOpJB8cJZnhViTW6BeFQm9pnRXDm8FZyNup3yHdSy33wqtjLNYTPADvm+GsFQ==", "cpu": [ "arm64" ], @@ -235,9 +186,9 @@ } }, "node_modules/@next/swc-win32-ia32-msvc": { - "version": "12.3.2-canary.7", - "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.3.2-canary.7.tgz", - "integrity": "sha512-hr+TBDICVezyn0HDK4QootalbcuLj9F8qUzZZAw3gHz16rUDpqpnlRjw3RC99AzkKL7qMsdR/+SwnBlBY7ZK7Q==", + "version": "12.3.2-canary.11", + "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.3.2-canary.11.tgz", + "integrity": "sha512-/FSdl4+4YFsrycKrM5N+4khxKR7rKIO4tiai+MLAN7zi9GA+2qFoxxkQdWSQTBr09lE+eacZ3r3TppO7ztNmQg==", "cpu": [ "ia32" ], @@ -250,9 +201,9 @@ } }, "node_modules/@next/swc-win32-x64-msvc": { - "version": "12.3.2-canary.7", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.3.2-canary.7.tgz", - "integrity": "sha512-1n29b6meb54h/Mw/1xPoJB682nWbtEsUQo7rFJ6G44Nj3fYFXe+XOWQxWu6Sl8yvdBXcZRhRCHuAZGqYtmqorQ==", + "version": "12.3.2-canary.11", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.3.2-canary.11.tgz", + "integrity": "sha512-/VioJDSK5TYea84zu6Qu5tCngCkAMNhPuVJ+3cmDGcM9H+tq0LiStVlW3efGUV+R4DyHg8GymWHpMXVjm6UIDg==", "cpu": [ "x64" ], @@ -264,41 +215,6 @@ "node": ">= 10" } }, - "node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dev": true, - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dev": true, - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } - }, "node_modules/@swc/helpers": { "version": "0.4.11", "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.4.11.tgz", @@ -307,111 +223,6 @@ "tslib": "^2.4.0" } }, - "node_modules/acorn": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz", - "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-jsx": { - "version": "5.3.2", - "dev": true, - "license": "MIT", - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "node_modules/ajv": { - "version": "6.12.6", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/ansi-regex": { - "version": "5.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/ansi-styles": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/argparse": { - "version": "2.0.1", - "dev": true, - "license": "Python-2.0" - }, - "node_modules/array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "dev": true, - "license": "MIT" - }, - "node_modules/brace-expansion": { - "version": "1.1.11", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "dependencies": { - "fill-range": "^7.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/callsites": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, "node_modules/caniuse-lite": { "version": "1.0.30001410", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001410.tgz", @@ -427,1322 +238,274 @@ } ] }, - "node_modules/chalk": { - "version": "4.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" }, - "node_modules/color-convert": { - "version": "2.0.1", - "dev": true, - "license": "MIT", + "node_modules/loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", "dependencies": { - "color-name": "~1.1.4" + "js-tokens": "^3.0.0 || ^4.0.0" }, - "engines": { - "node": ">=7.0.0" + "bin": { + "loose-envify": "cli.js" } }, - "node_modules/color-name": { - "version": "1.1.4", - "dev": true, - "license": "MIT" - }, - "node_modules/concat-map": { - "version": "0.0.1", - "dev": true, - "license": "MIT" + "node_modules/nanoid": { + "version": "2.1.11", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-2.1.11.tgz", + "integrity": "sha512-s/snB+WGm6uwi0WjsZdaVcuf3KJXlfGl2LcxgwkEwJF0D/BWzVWAZW/XY4bFaiR7s0Jk3FPvlnepg1H1b1UwlA==" }, - "node_modules/cross-spawn": { - "version": "7.0.3", - "dev": true, - "license": "MIT", + "node_modules/next": { + "version": "12.3.2-canary.11", + "resolved": "https://registry.npmjs.org/next/-/next-12.3.2-canary.11.tgz", + "integrity": "sha512-LBPr3z2xn+djEnkdajLJKqZimXyfHjpKmReyMAEuyk+2rZ1WICQYV5QOh2vhXqPxwiqqardX7VjuiBXkQeR1Qg==", "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" + "@next/env": "12.3.2-canary.11", + "@swc/helpers": "0.4.11", + "caniuse-lite": "^1.0.30001406", + "postcss": "8.4.14", + "styled-jsx": "5.0.7", + "use-sync-external-store": "1.2.0" }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/debug": { - "version": "4.3.4", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "2.1.2" + "bin": { + "next": "dist/bin/next" }, "engines": { - "node": ">=6.0" + "node": ">=12.22.0" + }, + "optionalDependencies": { + "@next/swc-android-arm-eabi": "12.3.2-canary.11", + "@next/swc-android-arm64": "12.3.2-canary.11", + "@next/swc-darwin-arm64": "12.3.2-canary.11", + "@next/swc-darwin-x64": "12.3.2-canary.11", + "@next/swc-freebsd-x64": "12.3.2-canary.11", + "@next/swc-linux-arm-gnueabihf": "12.3.2-canary.11", + "@next/swc-linux-arm64-gnu": "12.3.2-canary.11", + "@next/swc-linux-arm64-musl": "12.3.2-canary.11", + "@next/swc-linux-x64-gnu": "12.3.2-canary.11", + "@next/swc-linux-x64-musl": "12.3.2-canary.11", + "@next/swc-win32-arm64-msvc": "12.3.2-canary.11", + "@next/swc-win32-ia32-msvc": "12.3.2-canary.11", + "@next/swc-win32-x64-msvc": "12.3.2-canary.11" + }, + "peerDependencies": { + "fibers": ">= 3.1.0", + "node-sass": "^6.0.0 || ^7.0.0", + "react": "^17.0.2 || ^18.0.0-0", + "react-dom": "^17.0.2 || ^18.0.0-0", + "sass": "^1.3.0" }, "peerDependenciesMeta": { - "supports-color": { + "fibers": { + "optional": true + }, + "node-sass": { + "optional": true + }, + "sass": { "optional": true } } }, - "node_modules/deep-is": { - "version": "0.1.4", - "dev": true, - "license": "MIT" - }, - "node_modules/dir-glob": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "dev": true, - "dependencies": { - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=8" - } + "node_modules/picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" }, - "node_modules/doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, + "node_modules/postcss": { + "version": "8.4.14", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.14.tgz", + "integrity": "sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + } + ], "dependencies": { - "esutils": "^2.0.2" + "nanoid": "^3.3.4", + "picocolors": "^1.0.0", + "source-map-js": "^1.0.2" }, "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/escape-string-regexp": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": "^10 || ^12 || >=14" } }, - "node_modules/eslint": { - "version": "8.22.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.22.0.tgz", - "integrity": "sha512-ci4t0sz6vSRKdmkOGmprBo6fmI4PrphDFMy5JEq/fNS0gQkJM3rLmrqcp8ipMcdobH3KtUP40KniAE9W19S4wA==", - "dev": true, - "dependencies": { - "@eslint/eslintrc": "^1.3.0", - "@humanwhocodes/config-array": "^0.10.4", - "@humanwhocodes/gitignore-to-minimatch": "^1.0.2", - "ajv": "^6.10.0", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.3.2", - "doctrine": "^3.0.0", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.1.1", - "eslint-utils": "^3.0.0", - "eslint-visitor-keys": "^3.3.0", - "espree": "^9.3.3", - "esquery": "^1.4.0", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "find-up": "^5.0.0", - "functional-red-black-tree": "^1.0.1", - "glob-parent": "^6.0.1", - "globals": "^13.15.0", - "globby": "^11.1.0", - "grapheme-splitter": "^1.0.4", - "ignore": "^5.2.0", - "import-fresh": "^3.0.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "js-yaml": "^4.1.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", - "natural-compare": "^1.4.0", - "optionator": "^0.9.1", - "regexpp": "^3.2.0", - "strip-ansi": "^6.0.1", - "strip-json-comments": "^3.1.0", - "text-table": "^0.2.0", - "v8-compile-cache": "^2.0.3" - }, + "node_modules/postcss/node_modules/nanoid": { + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz", + "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==", "bin": { - "eslint": "bin/eslint.js" + "nanoid": "bin/nanoid.cjs" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, - "node_modules/eslint-scope": { - "version": "7.1.1", - "dev": true, - "license": "BSD-2-Clause", + "node_modules/react": { + "version": "0.0.0-experimental-ae7ad8b4c-20220927", + "resolved": "https://registry.npmjs.org/react/-/react-0.0.0-experimental-ae7ad8b4c-20220927.tgz", + "integrity": "sha512-Fl0Cbo7/nsZpP0DXx1BmyxfG698WcWwXc3FPrRiE1QwuYQX20DSIYyLVG0dYnhgvjCeDwqa5+iB1pY7oiPsYrQ==", "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" + "loose-envify": "^1.1.0" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": ">=0.10.0" } }, - "node_modules/eslint-utils": { - "version": "3.0.0", - "dev": true, - "license": "MIT", + "node_modules/react-dom": { + "version": "0.0.0-experimental-ae7ad8b4c-20220927", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-0.0.0-experimental-ae7ad8b4c-20220927.tgz", + "integrity": "sha512-sDbnAhUleyQzdQ4HJKDml3l62Rct7JcHbIVWX4hLmnFs+oskCUrMfs7eCC9UVCBWC2+huUpZCiD69x44m+l2+A==", "dependencies": { - "eslint-visitor-keys": "^2.0.0" - }, - "engines": { - "node": "^10.0.0 || ^12.0.0 || >= 14.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" + "loose-envify": "^1.1.0", + "scheduler": "0.0.0-experimental-ae7ad8b4c-20220927" }, "peerDependencies": { - "eslint": ">=5" + "react": "0.0.0-experimental-ae7ad8b4c-20220927" } }, - "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { - "version": "2.1.0", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=10" + "node_modules/scheduler": { + "version": "0.0.0-experimental-ae7ad8b4c-20220927", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.0.0-experimental-ae7ad8b4c-20220927.tgz", + "integrity": "sha512-0sMHQklwZ6WbISng47exj1LeAAZkqYVaBOjmywwyjeyWGwNpLx526/DNZVgdE5/a79FhZRQ7bhfuFdCmC5B4aQ==", + "dependencies": { + "loose-envify": "^1.1.0" } }, - "node_modules/eslint-visitor-keys": { - "version": "3.3.0", - "dev": true, - "license": "Apache-2.0", + "node_modules/source-map-js": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", + "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": ">=0.10.0" } }, - "node_modules/espree": { - "version": "9.3.3", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.3.tgz", - "integrity": "sha512-ORs1Rt/uQTqUKjDdGCyrtYxbazf5umATSf/K4qxjmZHORR6HJk+2s/2Pqe+Kk49HHINC/xNIrGfgh8sZcll0ng==", - "dev": true, - "dependencies": { - "acorn": "^8.8.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.3.0" - }, + "node_modules/styled-jsx": { + "version": "5.0.7", + "resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.0.7.tgz", + "integrity": "sha512-b3sUzamS086YLRuvnaDigdAewz1/EFYlHpYBP5mZovKEdQQOIIYq8lApylub3HHZ6xFjV051kkGU7cudJmrXEA==", "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": ">= 12.0.0" }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/esquery": { - "version": "1.4.0", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "estraverse": "^5.1.0" + "peerDependencies": { + "react": ">= 16.8.0 || 17.x.x || ^18.0.0-0" }, - "engines": { - "node": ">=0.10" + "peerDependenciesMeta": { + "@babel/core": { + "optional": true + }, + "babel-plugin-macros": { + "optional": true + } } }, - "node_modules/esrecurse": { - "version": "4.3.0", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" - } + "node_modules/tslib": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", + "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" }, - "node_modules/estraverse": { - "version": "5.3.0", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" + "node_modules/use-sync-external-store": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz", + "integrity": "sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==", + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0" } + } + }, + "dependencies": { + "@next/env": { + "version": "12.3.2-canary.11", + "resolved": "https://registry.npmjs.org/@next/env/-/env-12.3.2-canary.11.tgz", + "integrity": "sha512-XEV5JwAu7l7OygEeYxasX0Zu7LNqCZfRKeSsm3o6hSLzQSuvLsO49giKnrx9+TJXSalpj9bDbqaCpH3iuROesA==" }, - "node_modules/esutils": { - "version": "2.0.3", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=0.10.0" - } + "@next/swc-android-arm-eabi": { + "version": "12.3.2-canary.11", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.3.2-canary.11.tgz", + "integrity": "sha512-xFdBf2AnRxJiRo4pp61zC5azxSkdjeNF86bLGfa3tiGNYkNVjrJZzqx2TUzBhzRBatrPe9nl9FSTaRRP31cZLw==", + "optional": true }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "dev": true, - "license": "MIT" + "@next/swc-android-arm64": { + "version": "12.3.2-canary.11", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-12.3.2-canary.11.tgz", + "integrity": "sha512-T/nVC6ojHG9hXVuejDTc6fcyUR78vDUbN+pmrGFYrjfPUWYt+bFDwRguGOXydWdJj3jyRkL9YyMmNZf0wuzheg==", + "optional": true }, - "node_modules/fast-glob": { - "version": "3.2.11", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.11.tgz", - "integrity": "sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew==", - "dev": true, - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - }, - "engines": { - "node": ">=8.6.0" - } + "@next/swc-darwin-arm64": { + "version": "12.3.2-canary.11", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.3.2-canary.11.tgz", + "integrity": "sha512-HLebVmk8U7VfSTcro/vYrhvw2v85Uic48Y9z3TMiWakJoG1gBNEHuPnJXNLJJEWrpdc1rjP0n/7Jl6xofMGQMA==", + "optional": true }, - "node_modules/fast-glob/node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } + "@next/swc-darwin-x64": { + "version": "12.3.2-canary.11", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.3.2-canary.11.tgz", + "integrity": "sha512-gkpGaFDy8i90ll9USTMXHBuHmWbvpeCJxoSsWnAQuJZcUIZATL0iovdjjAvHh4cj5xWQpGXdGAJpL5ss4b2Pyw==", + "optional": true }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "dev": true, - "license": "MIT" + "@next/swc-freebsd-x64": { + "version": "12.3.2-canary.11", + "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.3.2-canary.11.tgz", + "integrity": "sha512-jTqkb3HN+PXlpXTzBEUhWnR9XA+Uj1vpjSx9jc+Lrl3esyzzKONqTNz4RRbOwDvU2TygQr+oaQqtdZAnj88d7w==", + "optional": true }, - "node_modules/fast-levenshtein": { - "version": "2.0.6", - "dev": true, - "license": "MIT" + "@next/swc-linux-arm-gnueabihf": { + "version": "12.3.2-canary.11", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.3.2-canary.11.tgz", + "integrity": "sha512-Nt4qARbZozu7UeFpUfrJuKg6g6BCjYnAfKcDCLxAnDONrMoqIEkIVQmntH2i1GPwtp37qTaPG6v4TnJHGNBSOQ==", + "optional": true }, - "node_modules/fastq": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", - "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", - "dev": true, - "dependencies": { - "reusify": "^1.0.4" - } + "@next/swc-linux-arm64-gnu": { + "version": "12.3.2-canary.11", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.3.2-canary.11.tgz", + "integrity": "sha512-8l0Ma2zIiTTTo042NMCYFlkIyGeFdpAtU2qTkIuJX9sBdffq9m/uHtnkv8R0u5myakn/5fkncojVx4uNRBGePg==", + "optional": true }, - "node_modules/file-entry-cache": { - "version": "6.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "flat-cache": "^3.0.4" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/flat-cache": { - "version": "3.0.4", - "dev": true, - "license": "MIT", - "dependencies": { - "flatted": "^3.1.0", - "rimraf": "^3.0.2" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/flatted": { - "version": "3.2.5", - "dev": true, - "license": "ISC" - }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "dev": true, - "license": "ISC" - }, - "node_modules/functional-red-black-tree": { - "version": "1.0.1", - "dev": true, - "license": "MIT" - }, - "node_modules/glob": { - "version": "7.2.3", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/glob-parent": { - "version": "6.0.2", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/globals": { - "version": "13.15.0", - "dev": true, - "license": "MIT", - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", - "dev": true, - "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/grapheme-splitter": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", - "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", - "dev": true - }, - "node_modules/has-flag": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/ignore": { - "version": "5.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "node_modules/import-fresh": { - "version": "3.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.19" - } - }, - "node_modules/inflight": { - "version": "1.0.6", - "dev": true, - "license": "ISC", - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "dev": true, - "license": "ISC" - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/isexe": { - "version": "2.0.0", - "dev": true, - "license": "ISC" - }, - "node_modules/js-tokens": { - "version": "4.0.0", - "license": "MIT" - }, - "node_modules/js-yaml": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/json-schema-traverse": { - "version": "0.4.1", - "dev": true, - "license": "MIT" - }, - "node_modules/json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "dev": true, - "license": "MIT" - }, - "node_modules/levn": { - "version": "0.4.1", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dev": true, - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/lodash.merge": { - "version": "4.6.2", - "dev": true, - "license": "MIT" - }, - "node_modules/loose-envify": { - "version": "1.4.0", - "license": "MIT", - "dependencies": { - "js-tokens": "^3.0.0 || ^4.0.0" - }, - "bin": { - "loose-envify": "cli.js" - } - }, - "node_modules/merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true, - "engines": { - "node": ">= 8" - } - }, - "node_modules/micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", - "dev": true, - "dependencies": { - "braces": "^3.0.2", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/minimatch": { - "version": "3.1.2", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/ms": { - "version": "2.1.2", - "dev": true, - "license": "MIT" - }, - "node_modules/nanoid": { - "version": "3.3.4", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz", - "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==", - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, - "node_modules/natural-compare": { - "version": "1.4.0", - "dev": true, - "license": "MIT" - }, - "node_modules/next": { - "version": "12.3.2-canary.7", - "resolved": "https://registry.npmjs.org/next/-/next-12.3.2-canary.7.tgz", - "integrity": "sha512-zUosveWzpeRVy7j4ANoJ4gu0TBrkLYwPlIUEXrqqs/zLpHMu+tanxA1R1ts2d7h/2dSmeVZgGcHiVcHj5uspEA==", - "dependencies": { - "@next/env": "12.3.2-canary.7", - "@swc/helpers": "0.4.11", - "caniuse-lite": "^1.0.30001406", - "postcss": "8.4.14", - "styled-jsx": "5.0.7", - "use-sync-external-store": "1.2.0" - }, - "bin": { - "next": "dist/bin/next" - }, - "engines": { - "node": ">=12.22.0" - }, - "optionalDependencies": { - "@next/swc-android-arm-eabi": "12.3.2-canary.7", - "@next/swc-android-arm64": "12.3.2-canary.7", - "@next/swc-darwin-arm64": "12.3.2-canary.7", - "@next/swc-darwin-x64": "12.3.2-canary.7", - "@next/swc-freebsd-x64": "12.3.2-canary.7", - "@next/swc-linux-arm-gnueabihf": "12.3.2-canary.7", - "@next/swc-linux-arm64-gnu": "12.3.2-canary.7", - "@next/swc-linux-arm64-musl": "12.3.2-canary.7", - "@next/swc-linux-x64-gnu": "12.3.2-canary.7", - "@next/swc-linux-x64-musl": "12.3.2-canary.7", - "@next/swc-win32-arm64-msvc": "12.3.2-canary.7", - "@next/swc-win32-ia32-msvc": "12.3.2-canary.7", - "@next/swc-win32-x64-msvc": "12.3.2-canary.7" - }, - "peerDependencies": { - "fibers": ">= 3.1.0", - "node-sass": "^6.0.0 || ^7.0.0", - "react": "^17.0.2 || ^18.0.0-0", - "react-dom": "^17.0.2 || ^18.0.0-0", - "sass": "^1.3.0" - }, - "peerDependenciesMeta": { - "fibers": { - "optional": true - }, - "node-sass": { - "optional": true - }, - "sass": { - "optional": true - } - } - }, - "node_modules/once": { - "version": "1.4.0", - "dev": true, - "license": "ISC", - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/optionator": { - "version": "0.9.1", - "dev": true, - "license": "MIT", - "dependencies": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.3" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "dev": true, - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/parent-module": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "callsites": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/path-key": { - "version": "3.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/postcss": { - "version": "8.4.14", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.14.tgz", - "integrity": "sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig==", - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/postcss" - } - ], - "dependencies": { - "nanoid": "^3.3.4", - "picocolors": "^1.0.0", - "source-map-js": "^1.0.2" - }, - "engines": { - "node": "^10 || ^12 || >=14" - } - }, - "node_modules/prelude-ls": { - "version": "1.2.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/punycode": { - "version": "2.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/react": { - "version": "18.1.0", - "license": "MIT", - "dependencies": { - "loose-envify": "^1.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/react-dom": { - "version": "18.1.0", - "license": "MIT", - "dependencies": { - "loose-envify": "^1.1.0", - "scheduler": "^0.22.0" - }, - "peerDependencies": { - "react": "^18.1.0" - } - }, - "node_modules/regexpp": { - "version": "3.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - } - }, - "node_modules/resolve-from": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "dev": true, - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, - "node_modules/rimraf": { - "version": "3.0.2", - "dev": true, - "license": "ISC", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, - "node_modules/scheduler": { - "version": "0.22.0", - "license": "MIT", - "dependencies": { - "loose-envify": "^1.1.0" - } - }, - "node_modules/shebang-command": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/source-map-js": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", - "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/strip-ansi": { - "version": "6.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-json-comments": { - "version": "3.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/styled-jsx": { - "version": "5.0.7", - "resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.0.7.tgz", - "integrity": "sha512-b3sUzamS086YLRuvnaDigdAewz1/EFYlHpYBP5mZovKEdQQOIIYq8lApylub3HHZ6xFjV051kkGU7cudJmrXEA==", - "engines": { - "node": ">= 12.0.0" - }, - "peerDependencies": { - "react": ">= 16.8.0 || 17.x.x || ^18.0.0-0" - }, - "peerDependenciesMeta": { - "@babel/core": { - "optional": true - }, - "babel-plugin-macros": { - "optional": true - } - } - }, - "node_modules/supports-color": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/text-table": { - "version": "0.2.0", - "dev": true, - "license": "MIT" - }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/tslib": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", - "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" - }, - "node_modules/type-check": { - "version": "0.4.0", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/type-fest": { - "version": "0.20.2", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/uri-js": { - "version": "4.4.1", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "punycode": "^2.1.0" - } - }, - "node_modules/use-sync-external-store": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz", - "integrity": "sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==", - "peerDependencies": { - "react": "^16.8.0 || ^17.0.0 || ^18.0.0" - } - }, - "node_modules/v8-compile-cache": { - "version": "2.3.0", - "dev": true, - "license": "MIT" - }, - "node_modules/which": { - "version": "2.0.2", - "dev": true, - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/word-wrap": { - "version": "1.2.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/wrappy": { - "version": "1.0.2", - "dev": true, - "license": "ISC" - }, - "node_modules/yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - } - }, - "dependencies": { - "@eslint/eslintrc": { - "version": "1.3.0", - "dev": true, - "requires": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.3.2", - "globals": "^13.15.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - } - }, - "@humanwhocodes/config-array": { - "version": "0.10.4", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.10.4.tgz", - "integrity": "sha512-mXAIHxZT3Vcpg83opl1wGlVZ9xydbfZO3r5YfRSH6Gpp2J/PfdBP0wbDa2sO6/qRbcalpoevVyW6A/fI6LfeMw==", - "dev": true, - "requires": { - "@humanwhocodes/object-schema": "^1.2.1", - "debug": "^4.1.1", - "minimatch": "^3.0.4" - } - }, - "@humanwhocodes/gitignore-to-minimatch": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@humanwhocodes/gitignore-to-minimatch/-/gitignore-to-minimatch-1.0.2.tgz", - "integrity": "sha512-rSqmMJDdLFUsyxR6FMtD00nfQKKLFb1kv+qBbOVKqErvloEIJLo5bDTJTQNTYgeyp78JsA7u/NPi5jT1GR/MuA==", - "dev": true - }, - "@humanwhocodes/object-schema": { - "version": "1.2.1", - "dev": true - }, - "@next/env": { - "version": "12.3.2-canary.7", - "resolved": "https://registry.npmjs.org/@next/env/-/env-12.3.2-canary.7.tgz", - "integrity": "sha512-uk5yDvh8ra8PlIczZBTZKyt5Rf6a6mH2tGB3hwRAXD5hVLd74LzBQza2aYMEcDlRafAknsbL0dnqI3CkFYat9w==" - }, - "@next/swc-android-arm-eabi": { - "version": "12.3.2-canary.7", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.3.2-canary.7.tgz", - "integrity": "sha512-pusM/ylasGBweiwhINtqWCgy5bOjLmIctFD0etpmh9+DqCg09yu58hJ1Dn/UTW8EbB1nkTP1z3dEoMKLh4fV2A==", - "optional": true - }, - "@next/swc-android-arm64": { - "version": "12.3.2-canary.7", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-12.3.2-canary.7.tgz", - "integrity": "sha512-x11T0ocPE9xrnqMeDzUMepN3P8CHIN8iiLgiFkbTbKTbSciuH3juOvKggJO9APZRG5Ch5eePWcCy2gHedAbhnA==", - "optional": true - }, - "@next/swc-darwin-arm64": { - "version": "12.3.2-canary.7", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.3.2-canary.7.tgz", - "integrity": "sha512-tcO9hDaMfcbiaZp1B+HZcLzGGs36dnmjQ0YXyn6C88HEUoKyxanYleVHtTmWHlgsxxjZdDd/RzOze1ycWs2oXw==", - "optional": true - }, - "@next/swc-darwin-x64": { - "version": "12.3.2-canary.7", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.3.2-canary.7.tgz", - "integrity": "sha512-WjAyU67zj69nRM2GNAnBLvghq4EHTyDzMO02GjG6yexVhDvkE0OFlvh0BQLI3DIOz+B3RjJRcW3OoHi8XzW9UA==", - "optional": true - }, - "@next/swc-freebsd-x64": { - "version": "12.3.2-canary.7", - "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.3.2-canary.7.tgz", - "integrity": "sha512-cQrdPCMhP1Mc+pIt16FlC5BVgcXzLXRlm7qZ7wBRKG6r/IIIn/qNRFgQQcB3iyvfNZo7lURLKcfsxNmMGclldQ==", - "optional": true - }, - "@next/swc-linux-arm-gnueabihf": { - "version": "12.3.2-canary.7", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.3.2-canary.7.tgz", - "integrity": "sha512-LEL+dUe10FhQHyXq9Mul5pOJwKDtrAylh9chktWf8eFr14j/YrfPbkLHv1+tCK8brDV3afVJMl0IpoCo75Yfyg==", - "optional": true - }, - "@next/swc-linux-arm64-gnu": { - "version": "12.3.2-canary.7", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.3.2-canary.7.tgz", - "integrity": "sha512-mbDqHk3C76UGIzkOv+G5NslKiSYIXyWQwbkuty0+0wLVJttWjWi2dMN7DFJQPMNvBefU9/vxVJdUnGVGEZfUXw==", - "optional": true - }, - "@next/swc-linux-arm64-musl": { - "version": "12.3.2-canary.7", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.3.2-canary.7.tgz", - "integrity": "sha512-gJ3VQHuqb3ABiOKPxfWAJQdO4mp3yNnWIAPN8n52F7Zu38udbHXvcbIylWfQW/Qah+RRf7P7y2txH2kC07QOPA==", - "optional": true + "@next/swc-linux-arm64-musl": { + "version": "12.3.2-canary.11", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.3.2-canary.11.tgz", + "integrity": "sha512-hOoWctziJqYNw0+RY3GR2og+Qr2ykgtIORKEZGHx9OAyg+dRLxJISHWv9umaAjE8Hoi7V0cS841XQ1B6XTnoKA==", + "optional": true }, "@next/swc-linux-x64-gnu": { - "version": "12.3.2-canary.7", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.3.2-canary.7.tgz", - "integrity": "sha512-/PBLiC+JfMJIzwMCQaSQgnLoIOjdSjTA9zarj2Kk1eCLjH8/VnsfBWtmP7TdbgIRYnZ8QKb4HXSOq94ZQS/fkw==", + "version": "12.3.2-canary.11", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.3.2-canary.11.tgz", + "integrity": "sha512-to03IoMs8v971yVFGm2Og7x6Z5LSPMzeFQikLqpUNS1lmk5Kha4vju4Ojc8nqEyPShojMhkbkjSH6sXbeCb+ZA==", "optional": true }, "@next/swc-linux-x64-musl": { - "version": "12.3.2-canary.7", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.3.2-canary.7.tgz", - "integrity": "sha512-Bf3goHoUd0SB58sVTMva0ByoLM+aEhm5YJRqsi7SsOAu9EAQwYfWgY2Hx60ah5i1N4ihYK0xjs8kwlfdDVOuow==", + "version": "12.3.2-canary.11", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.3.2-canary.11.tgz", + "integrity": "sha512-gSitcSo6PFzI/WHLLfRcLin6y1KLEADliLdFwHy7luotsrcalxjIWPD6tFqIZ7ajRjCZ02uY+lIPJ/FPhX3b8w==", "optional": true }, "@next/swc-win32-arm64-msvc": { - "version": "12.3.2-canary.7", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.3.2-canary.7.tgz", - "integrity": "sha512-aPRQ4dY5MuLgHCVdY+/Grgg4oX38pG4S0sT8mpatK3oIdjhj3961cj33QpPAy6dhhCs8m0/eCWYmM9KKlAAUsg==", + "version": "12.3.2-canary.11", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.3.2-canary.11.tgz", + "integrity": "sha512-o4F0/cS/7qBOSz+F3A1iPBqbhNOpJB8cJZnhViTW6BeFQm9pnRXDm8FZyNup3yHdSy33wqtjLNYTPADvm+GsFQ==", "optional": true }, "@next/swc-win32-ia32-msvc": { - "version": "12.3.2-canary.7", - "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.3.2-canary.7.tgz", - "integrity": "sha512-hr+TBDICVezyn0HDK4QootalbcuLj9F8qUzZZAw3gHz16rUDpqpnlRjw3RC99AzkKL7qMsdR/+SwnBlBY7ZK7Q==", + "version": "12.3.2-canary.11", + "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.3.2-canary.11.tgz", + "integrity": "sha512-/FSdl4+4YFsrycKrM5N+4khxKR7rKIO4tiai+MLAN7zi9GA+2qFoxxkQdWSQTBr09lE+eacZ3r3TppO7ztNmQg==", "optional": true }, "@next/swc-win32-x64-msvc": { - "version": "12.3.2-canary.7", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.3.2-canary.7.tgz", - "integrity": "sha512-1n29b6meb54h/Mw/1xPoJB682nWbtEsUQo7rFJ6G44Nj3fYFXe+XOWQxWu6Sl8yvdBXcZRhRCHuAZGqYtmqorQ==", + "version": "12.3.2-canary.11", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.3.2-canary.11.tgz", + "integrity": "sha512-/VioJDSK5TYea84zu6Qu5tCngCkAMNhPuVJ+3cmDGcM9H+tq0LiStVlW3efGUV+R4DyHg8GymWHpMXVjm6UIDg==", "optional": true }, - "@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dev": true, - "requires": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - } - }, - "@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true - }, - "@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dev": true, - "requires": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - } - }, "@swc/helpers": { "version": "0.4.11", "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.4.11.tgz", @@ -1751,537 +514,48 @@ "tslib": "^2.4.0" } }, - "acorn": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz", - "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==", - "dev": true - }, - "acorn-jsx": { - "version": "5.3.2", - "dev": true - }, - "ajv": { - "version": "6.12.6", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "ansi-regex": { - "version": "5.0.1", - "dev": true - }, - "ansi-styles": { - "version": "4.3.0", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "argparse": { - "version": "2.0.1", - "dev": true - }, - "array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "dev": true - }, - "balanced-match": { - "version": "1.0.2", - "dev": true - }, - "brace-expansion": { - "version": "1.1.11", - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "requires": { - "fill-range": "^7.0.1" - } - }, - "callsites": { - "version": "3.1.0", - "dev": true - }, "caniuse-lite": { "version": "1.0.30001410", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001410.tgz", "integrity": "sha512-QoblBnuE+rG0lc3Ur9ltP5q47lbguipa/ncNMyyGuqPk44FxbScWAeEO+k5fSQ8WekdAK4mWqNs1rADDAiN5xQ==" }, - "chalk": { - "version": "4.1.2", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "dev": true - }, - "concat-map": { - "version": "0.0.1", - "dev": true - }, - "cross-spawn": { - "version": "7.0.3", - "dev": true, - "requires": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - } - }, - "debug": { - "version": "4.3.4", - "dev": true, - "requires": { - "ms": "2.1.2" - } - }, - "deep-is": { - "version": "0.1.4", - "dev": true - }, - "dir-glob": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "dev": true, - "requires": { - "path-type": "^4.0.0" - } - }, - "doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, - "requires": { - "esutils": "^2.0.2" - } - }, - "escape-string-regexp": { - "version": "4.0.0", - "dev": true - }, - "eslint": { - "version": "8.22.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.22.0.tgz", - "integrity": "sha512-ci4t0sz6vSRKdmkOGmprBo6fmI4PrphDFMy5JEq/fNS0gQkJM3rLmrqcp8ipMcdobH3KtUP40KniAE9W19S4wA==", - "dev": true, - "requires": { - "@eslint/eslintrc": "^1.3.0", - "@humanwhocodes/config-array": "^0.10.4", - "@humanwhocodes/gitignore-to-minimatch": "^1.0.2", - "ajv": "^6.10.0", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.3.2", - "doctrine": "^3.0.0", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.1.1", - "eslint-utils": "^3.0.0", - "eslint-visitor-keys": "^3.3.0", - "espree": "^9.3.3", - "esquery": "^1.4.0", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "find-up": "^5.0.0", - "functional-red-black-tree": "^1.0.1", - "glob-parent": "^6.0.1", - "globals": "^13.15.0", - "globby": "^11.1.0", - "grapheme-splitter": "^1.0.4", - "ignore": "^5.2.0", - "import-fresh": "^3.0.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "js-yaml": "^4.1.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", - "natural-compare": "^1.4.0", - "optionator": "^0.9.1", - "regexpp": "^3.2.0", - "strip-ansi": "^6.0.1", - "strip-json-comments": "^3.1.0", - "text-table": "^0.2.0", - "v8-compile-cache": "^2.0.3" - } - }, - "eslint-scope": { - "version": "7.1.1", - "dev": true, - "requires": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - } - }, - "eslint-utils": { - "version": "3.0.0", - "dev": true, - "requires": { - "eslint-visitor-keys": "^2.0.0" - }, - "dependencies": { - "eslint-visitor-keys": { - "version": "2.1.0", - "dev": true - } - } - }, - "eslint-visitor-keys": { - "version": "3.3.0", - "dev": true - }, - "espree": { - "version": "9.3.3", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.3.tgz", - "integrity": "sha512-ORs1Rt/uQTqUKjDdGCyrtYxbazf5umATSf/K4qxjmZHORR6HJk+2s/2Pqe+Kk49HHINC/xNIrGfgh8sZcll0ng==", - "dev": true, - "requires": { - "acorn": "^8.8.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.3.0" - } - }, - "esquery": { - "version": "1.4.0", - "dev": true, - "requires": { - "estraverse": "^5.1.0" - } - }, - "esrecurse": { - "version": "4.3.0", - "dev": true, - "requires": { - "estraverse": "^5.2.0" - } - }, - "estraverse": { - "version": "5.3.0", - "dev": true - }, - "esutils": { - "version": "2.0.3", - "dev": true - }, - "fast-deep-equal": { - "version": "3.1.3", - "dev": true - }, - "fast-glob": { - "version": "3.2.11", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.11.tgz", - "integrity": "sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew==", - "dev": true, - "requires": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - }, - "dependencies": { - "glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "requires": { - "is-glob": "^4.0.1" - } - } - } - }, - "fast-json-stable-stringify": { - "version": "2.1.0", - "dev": true - }, - "fast-levenshtein": { - "version": "2.0.6", - "dev": true - }, - "fastq": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", - "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", - "dev": true, - "requires": { - "reusify": "^1.0.4" - } - }, - "file-entry-cache": { - "version": "6.0.1", - "dev": true, - "requires": { - "flat-cache": "^3.0.4" - } - }, - "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, - "requires": { - "to-regex-range": "^5.0.1" - } - }, - "find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, - "requires": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - } - }, - "flat-cache": { - "version": "3.0.4", - "dev": true, - "requires": { - "flatted": "^3.1.0", - "rimraf": "^3.0.2" - } - }, - "flatted": { - "version": "3.2.5", - "dev": true - }, - "fs.realpath": { - "version": "1.0.0", - "dev": true - }, - "functional-red-black-tree": { - "version": "1.0.1", - "dev": true - }, - "glob": { - "version": "7.2.3", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "glob-parent": { - "version": "6.0.2", - "dev": true, - "requires": { - "is-glob": "^4.0.3" - } - }, - "globals": { - "version": "13.15.0", - "dev": true, - "requires": { - "type-fest": "^0.20.2" - } - }, - "globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", - "dev": true, - "requires": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - } - }, - "grapheme-splitter": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", - "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", - "dev": true - }, - "has-flag": { - "version": "4.0.0", - "dev": true - }, - "ignore": { - "version": "5.2.0", - "dev": true - }, - "import-fresh": { - "version": "3.3.0", - "dev": true, - "requires": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - } - }, - "imurmurhash": { - "version": "0.1.4", - "dev": true - }, - "inflight": { - "version": "1.0.6", - "dev": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.4", - "dev": true - }, - "is-extglob": { - "version": "2.1.1", - "dev": true - }, - "is-glob": { - "version": "4.0.3", - "dev": true, - "requires": { - "is-extglob": "^2.1.1" - } - }, - "is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true - }, - "isexe": { - "version": "2.0.0", - "dev": true - }, "js-tokens": { - "version": "4.0.0" - }, - "js-yaml": { - "version": "4.1.0", - "dev": true, - "requires": { - "argparse": "^2.0.1" - } - }, - "json-schema-traverse": { - "version": "0.4.1", - "dev": true - }, - "json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "dev": true - }, - "levn": { - "version": "0.4.1", - "dev": true, - "requires": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - } - }, - "locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dev": true, - "requires": { - "p-locate": "^5.0.0" - } - }, - "lodash.merge": { - "version": "4.6.2", - "dev": true + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" }, "loose-envify": { "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", "requires": { "js-tokens": "^3.0.0 || ^4.0.0" } }, - "merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true - }, - "micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", - "dev": true, - "requires": { - "braces": "^3.0.2", - "picomatch": "^2.3.1" - } - }, - "minimatch": { - "version": "3.1.2", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "ms": { - "version": "2.1.2", - "dev": true - }, "nanoid": { - "version": "3.3.4", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz", - "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==" - }, - "natural-compare": { - "version": "1.4.0", - "dev": true + "version": "2.1.11", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-2.1.11.tgz", + "integrity": "sha512-s/snB+WGm6uwi0WjsZdaVcuf3KJXlfGl2LcxgwkEwJF0D/BWzVWAZW/XY4bFaiR7s0Jk3FPvlnepg1H1b1UwlA==" }, "next": { - "version": "12.3.2-canary.7", - "resolved": "https://registry.npmjs.org/next/-/next-12.3.2-canary.7.tgz", - "integrity": "sha512-zUosveWzpeRVy7j4ANoJ4gu0TBrkLYwPlIUEXrqqs/zLpHMu+tanxA1R1ts2d7h/2dSmeVZgGcHiVcHj5uspEA==", - "requires": { - "@next/env": "12.3.2-canary.7", - "@next/swc-android-arm-eabi": "12.3.2-canary.7", - "@next/swc-android-arm64": "12.3.2-canary.7", - "@next/swc-darwin-arm64": "12.3.2-canary.7", - "@next/swc-darwin-x64": "12.3.2-canary.7", - "@next/swc-freebsd-x64": "12.3.2-canary.7", - "@next/swc-linux-arm-gnueabihf": "12.3.2-canary.7", - "@next/swc-linux-arm64-gnu": "12.3.2-canary.7", - "@next/swc-linux-arm64-musl": "12.3.2-canary.7", - "@next/swc-linux-x64-gnu": "12.3.2-canary.7", - "@next/swc-linux-x64-musl": "12.3.2-canary.7", - "@next/swc-win32-arm64-msvc": "12.3.2-canary.7", - "@next/swc-win32-ia32-msvc": "12.3.2-canary.7", - "@next/swc-win32-x64-msvc": "12.3.2-canary.7", + "version": "12.3.2-canary.11", + "resolved": "https://registry.npmjs.org/next/-/next-12.3.2-canary.11.tgz", + "integrity": "sha512-LBPr3z2xn+djEnkdajLJKqZimXyfHjpKmReyMAEuyk+2rZ1WICQYV5QOh2vhXqPxwiqqardX7VjuiBXkQeR1Qg==", + "requires": { + "@next/env": "12.3.2-canary.11", + "@next/swc-android-arm-eabi": "12.3.2-canary.11", + "@next/swc-android-arm64": "12.3.2-canary.11", + "@next/swc-darwin-arm64": "12.3.2-canary.11", + "@next/swc-darwin-x64": "12.3.2-canary.11", + "@next/swc-freebsd-x64": "12.3.2-canary.11", + "@next/swc-linux-arm-gnueabihf": "12.3.2-canary.11", + "@next/swc-linux-arm64-gnu": "12.3.2-canary.11", + "@next/swc-linux-arm64-musl": "12.3.2-canary.11", + "@next/swc-linux-x64-gnu": "12.3.2-canary.11", + "@next/swc-linux-x64-musl": "12.3.2-canary.11", + "@next/swc-win32-arm64-msvc": "12.3.2-canary.11", + "@next/swc-win32-ia32-msvc": "12.3.2-canary.11", + "@next/swc-win32-x64-msvc": "12.3.2-canary.11", "@swc/helpers": "0.4.11", "caniuse-lite": "^1.0.30001406", "postcss": "8.4.14", @@ -2289,81 +563,11 @@ "use-sync-external-store": "1.2.0" } }, - "once": { - "version": "1.4.0", - "dev": true, - "requires": { - "wrappy": "1" - } - }, - "optionator": { - "version": "0.9.1", - "dev": true, - "requires": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.3" - } - }, - "p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "requires": { - "yocto-queue": "^0.1.0" - } - }, - "p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "dev": true, - "requires": { - "p-limit": "^3.0.2" - } - }, - "parent-module": { - "version": "1.0.1", - "dev": true, - "requires": { - "callsites": "^3.0.0" - } - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true - }, - "path-is-absolute": { - "version": "1.0.1", - "dev": true - }, - "path-key": { - "version": "3.1.1", - "dev": true - }, - "path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true - }, "picocolors": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" }, - "picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true - }, "postcss": { "version": "8.4.14", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.14.tgz", @@ -2372,181 +576,59 @@ "nanoid": "^3.3.4", "picocolors": "^1.0.0", "source-map-js": "^1.0.2" + }, + "dependencies": { + "nanoid": { + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz", + "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==" + } } }, - "prelude-ls": { - "version": "1.2.1", - "dev": true - }, - "punycode": { - "version": "2.1.1", - "dev": true - }, - "queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true - }, "react": { - "version": "18.1.0", + "version": "0.0.0-experimental-ae7ad8b4c-20220927", + "resolved": "https://registry.npmjs.org/react/-/react-0.0.0-experimental-ae7ad8b4c-20220927.tgz", + "integrity": "sha512-Fl0Cbo7/nsZpP0DXx1BmyxfG698WcWwXc3FPrRiE1QwuYQX20DSIYyLVG0dYnhgvjCeDwqa5+iB1pY7oiPsYrQ==", "requires": { "loose-envify": "^1.1.0" } }, "react-dom": { - "version": "18.1.0", + "version": "0.0.0-experimental-ae7ad8b4c-20220927", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-0.0.0-experimental-ae7ad8b4c-20220927.tgz", + "integrity": "sha512-sDbnAhUleyQzdQ4HJKDml3l62Rct7JcHbIVWX4hLmnFs+oskCUrMfs7eCC9UVCBWC2+huUpZCiD69x44m+l2+A==", "requires": { "loose-envify": "^1.1.0", - "scheduler": "^0.22.0" - } - }, - "regexpp": { - "version": "3.2.0", - "dev": true - }, - "resolve-from": { - "version": "4.0.0", - "dev": true - }, - "reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "dev": true - }, - "rimraf": { - "version": "3.0.2", - "dev": true, - "requires": { - "glob": "^7.1.3" - } - }, - "run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "dev": true, - "requires": { - "queue-microtask": "^1.2.2" + "scheduler": "0.0.0-experimental-ae7ad8b4c-20220927" } }, "scheduler": { - "version": "0.22.0", + "version": "0.0.0-experimental-ae7ad8b4c-20220927", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.0.0-experimental-ae7ad8b4c-20220927.tgz", + "integrity": "sha512-0sMHQklwZ6WbISng47exj1LeAAZkqYVaBOjmywwyjeyWGwNpLx526/DNZVgdE5/a79FhZRQ7bhfuFdCmC5B4aQ==", "requires": { "loose-envify": "^1.1.0" } }, - "shebang-command": { - "version": "2.0.0", - "dev": true, - "requires": { - "shebang-regex": "^3.0.0" - } - }, - "shebang-regex": { - "version": "3.0.0", - "dev": true - }, - "slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true - }, "source-map-js": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==" }, - "strip-ansi": { - "version": "6.0.1", - "dev": true, - "requires": { - "ansi-regex": "^5.0.1" - } - }, - "strip-json-comments": { - "version": "3.1.1", - "dev": true - }, "styled-jsx": { "version": "5.0.7", "resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.0.7.tgz", "integrity": "sha512-b3sUzamS086YLRuvnaDigdAewz1/EFYlHpYBP5mZovKEdQQOIIYq8lApylub3HHZ6xFjV051kkGU7cudJmrXEA==" }, - "supports-color": { - "version": "7.2.0", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - }, - "text-table": { - "version": "0.2.0", - "dev": true - }, - "to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "requires": { - "is-number": "^7.0.0" - } - }, "tslib": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" }, - "type-check": { - "version": "0.4.0", - "dev": true, - "requires": { - "prelude-ls": "^1.2.1" - } - }, - "type-fest": { - "version": "0.20.2", - "dev": true - }, - "uri-js": { - "version": "4.4.1", - "dev": true, - "requires": { - "punycode": "^2.1.0" - } - }, "use-sync-external-store": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz", "integrity": "sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==" - }, - "v8-compile-cache": { - "version": "2.3.0", - "dev": true - }, - "which": { - "version": "2.0.2", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "word-wrap": { - "version": "1.2.3", - "dev": true - }, - "wrappy": { - "version": "1.0.2", - "dev": true - }, - "yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true } } } diff --git a/demos/canary/package.json b/demos/canary/package.json index 4b187a58eb..2f21b3ed04 100644 --- a/demos/canary/package.json +++ b/demos/canary/package.json @@ -1,19 +1,16 @@ { - "name": "canary", - "version": "0.1.0", - "private": true, + "name": "app-dir", + "version": "1.0.0", + "description": "", "scripts": { - "dev": "next dev", - "build": "next build", - "start": "next start", - "lint": "next lint" + "build": "next build" }, + "author": "", + "license": "MIT", "dependencies": { - "next": "^12.3.2-canary.7", - "react": "18.1.0", - "react-dom": "18.1.0" - }, - "devDependencies": { - "eslint": "8.22.0" + "nanoid": "^2.1.11", + "next": "12.3.2-canary.11", + "react": "0.0.0-experimental-ae7ad8b4c-20220927", + "react-dom": "0.0.0-experimental-ae7ad8b4c-20220927" } } diff --git a/demos/canary/pages/_app.js b/demos/canary/pages/_app.js deleted file mode 100755 index 1e1cec9242..0000000000 --- a/demos/canary/pages/_app.js +++ /dev/null @@ -1,7 +0,0 @@ -import '../styles/globals.css' - -function MyApp({ Component, pageProps }) { - return -} - -export default MyApp diff --git a/demos/canary/pages/api/hello.js b/demos/canary/pages/api/hello.js old mode 100755 new mode 100644 index df63de88fa..47779ec1fa --- a/demos/canary/pages/api/hello.js +++ b/demos/canary/pages/api/hello.js @@ -1,5 +1,7 @@ -// Next.js API route support: https://nextjs.org/docs/api-routes/introduction +export default function api(req) { + return new Response('hello') +} -export default function handler(req, res) { - res.status(200).json({ name: 'John Doe' }) +export const config = { + runtime: 'experimental-edge', } diff --git a/demos/app-dir/pages/api/preview.js b/demos/canary/pages/api/preview.js similarity index 100% rename from demos/app-dir/pages/api/preview.js rename to demos/canary/pages/api/preview.js diff --git a/demos/app-dir/pages/app-linking.js b/demos/canary/pages/app-linking.js similarity index 100% rename from demos/app-dir/pages/app-linking.js rename to demos/canary/pages/app-linking.js diff --git a/demos/app-dir/pages/blog/[slug].js b/demos/canary/pages/blog/[slug].js similarity index 100% rename from demos/app-dir/pages/blog/[slug].js rename to demos/canary/pages/blog/[slug].js diff --git a/demos/canary/pages/index.js b/demos/canary/pages/index.js old mode 100755 new mode 100644 index 33b7ca0774..dd991a34e3 --- a/demos/canary/pages/index.js +++ b/demos/canary/pages/index.js @@ -1,27 +1,11 @@ -import Head from 'next/head' -import Image from 'next/image' +import Link from 'next/link' +import styles from '../styles/shared.module.css' -export default function Home() { +export default function Page(props) { return ( -
- - Canary Next App - - - -
-

Canary Next App

-
-

Here's where we test out Next's canary features to ensure they work with our Next Runtime .

-
-
- - Picture of the author -
+ <> +

hello from pages/index

+ Dashboard + ) } diff --git a/demos/canary/public/favicon.ico b/demos/canary/public/favicon.ico deleted file mode 100755 index 718d6fea4835ec2d246af9800eddb7ffb276240c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 25931 zcmeHv30#a{`}aL_*G&7qml|y<+KVaDM2m#dVr!KsA!#An?kSQM(q<_dDNCpjEux83 zLb9Z^XxbDl(w>%i@8hT6>)&Gu{h#Oeyszu?xtw#Zb1mO{pgX9699l+Qppw7jXaYf~-84xW z)w4x8?=youko|}Vr~(D$UXIbiXABHh`p1?nn8Po~fxRJv}|0e(BPs|G`(TT%kKVJAdg5*Z|x0leQq0 zkdUBvb#>9F()jo|T~kx@OM8$9wzs~t2l;K=woNssA3l6|sx2r3+kdfVW@e^8e*E}v zA1y5{bRi+3Z`uD3{F7LgFJDdvm;nJilkzDku>BwXH(8ItVCXk*-lSJnR?-2UN%hJ){&rlvg`CDTj z)Bzo!3v7Ou#83zEDEFcKt(f1E0~=rqeEbTnMvWR#{+9pg%7G8y>u1OVRUSoox-ovF z2Ydma(;=YuBY(eI|04{hXzZD6_f(v~H;C~y5=DhAC{MMS>2fm~1H_t2$56pc$NH8( z5bH|<)71dV-_oCHIrzrT`2s-5w_+2CM0$95I6X8p^r!gHp+j_gd;9O<1~CEQQGS8) zS9Qh3#p&JM-G8rHekNmKVewU;pJRcTAog68KYo^dRo}(M>36U4Us zfgYWSiHZL3;lpWT=zNAW>Dh#mB!_@Lg%$ms8N-;aPqMn+C2HqZgz&9~Eu z4|Kp<`$q)Uw1R?y(~S>ePdonHxpV1#eSP1B;Ogo+-Pk}6#0GsZZ5!||ev2MGdh}_m z{DeR7?0-1^zVs&`AV6Vt;r3`I`OI_wgs*w=eO%_#7Kepl{B@xiyCANc(l zzIyd4y|c6PXWq9-|KM8(zIk8LPk(>a)zyFWjhT!$HJ$qX1vo@d25W<fvZQ2zUz5WRc(UnFMKHwe1| zWmlB1qdbiA(C0jmnV<}GfbKtmcu^2*P^O?MBLZKt|As~ge8&AAO~2K@zbXelK|4T<{|y4`raF{=72kC2Kn(L4YyenWgrPiv z@^mr$t{#X5VuIMeL!7Ab6_kG$&#&5p*Z{+?5U|TZ`B!7llpVmp@skYz&n^8QfPJzL z0G6K_OJM9x+Wu2gfN45phANGt{7=C>i34CV{Xqlx(fWpeAoj^N0Biu`w+MVcCUyU* zDZuzO0>4Z6fbu^T_arWW5n!E45vX8N=bxTVeFoep_G#VmNlQzAI_KTIc{6>c+04vr zx@W}zE5JNSU>!THJ{J=cqjz+4{L4A{Ob9$ZJ*S1?Ggg3klFp!+Y1@K+pK1DqI|_gq z5ZDXVpge8-cs!o|;K73#YXZ3AShj50wBvuq3NTOZ`M&qtjj#GOFfgExjg8Gn8>Vq5 z`85n+9|!iLCZF5$HJ$Iu($dm?8~-ofu}tEc+-pyke=3!im#6pk_Wo8IA|fJwD&~~F zc16osQ)EBo58U7XDuMexaPRjU@h8tXe%S{fA0NH3vGJFhuyyO!Uyl2^&EOpX{9As0 zWj+P>{@}jxH)8|r;2HdupP!vie{sJ28b&bo!8`D^x}TE$%zXNb^X1p@0PJ86`dZyj z%ce7*{^oo+6%&~I!8hQy-vQ7E)0t0ybH4l%KltWOo~8cO`T=157JqL(oq_rC%ea&4 z2NcTJe-HgFjNg-gZ$6!Y`SMHrlj}Etf7?r!zQTPPSv}{so2e>Fjs1{gzk~LGeesX%r(Lh6rbhSo_n)@@G-FTQy93;l#E)hgP@d_SGvyCp0~o(Y;Ee8{ zdVUDbHm5`2taPUOY^MAGOw*>=s7=Gst=D+p+2yON!0%Hk` zz5mAhyT4lS*T3LS^WSxUy86q&GnoHxzQ6vm8)VS}_zuqG?+3td68_x;etQAdu@sc6 zQJ&5|4(I?~3d-QOAODHpZ=hlSg(lBZ!JZWCtHHSj`0Wh93-Uk)_S%zsJ~aD>{`A0~ z9{AG(e|q3g5B%wYKRxiL2Y$8(4w6bzchKuloQW#e&S3n+P- z8!ds-%f;TJ1>)v)##>gd{PdS2Oc3VaR`fr=`O8QIO(6(N!A?pr5C#6fc~Ge@N%Vvu zaoAX2&(a6eWy_q&UwOhU)|P3J0Qc%OdhzW=F4D|pt0E4osw;%<%Dn58hAWD^XnZD= z>9~H(3bmLtxpF?a7su6J7M*x1By7YSUbxGi)Ot0P77`}P3{)&5Un{KD?`-e?r21!4vTTnN(4Y6Lin?UkSM z`MXCTC1@4A4~mvz%Rh2&EwY))LeoT=*`tMoqcEXI>TZU9WTP#l?uFv+@Dn~b(>xh2 z;>B?;Tz2SR&KVb>vGiBSB`@U7VIWFSo=LDSb9F{GF^DbmWAfpms8Sx9OX4CnBJca3 zlj9(x!dIjN?OG1X4l*imJNvRCk}F%!?SOfiOq5y^mZW)jFL@a|r-@d#f7 z2gmU8L3IZq0ynIws=}~m^#@&C%J6QFo~Mo4V`>v7MI-_!EBMMtb%_M&kvAaN)@ZVw z+`toz&WG#HkWDjnZE!6nk{e-oFdL^$YnbOCN}JC&{$#$O27@|Tn-skXr)2ml2~O!5 zX+gYoxhoc7qoU?C^3~&!U?kRFtnSEecWuH0B0OvLodgUAi}8p1 zrO6RSXHH}DMc$&|?D004DiOVMHV8kXCP@7NKB zgaZq^^O<7PoKEp72kby@W0Z!Y*Ay{&vfg#C&gG@YVR9g?FEocMUi1gSN$+V+ayF45{a zuDZDTN}mS|;BO%gEf}pjBfN2-gIrU#G5~cucA;dokXW89%>AyXJJI z9X4UlIWA|ZYHgbI z5?oFk@A=Ik7lrEQPDH!H+b`7_Y~aDb_qa=B2^Y&Ow41cU=4WDd40dp5(QS-WMN-=Y z9g;6_-JdNU;|6cPwf$ak*aJIcwL@1n$#l~zi{c{EW?T;DaW*E8DYq?Umtz{nJ&w-M zEMyTDrC&9K$d|kZe2#ws6)L=7K+{ zQw{XnV6UC$6-rW0emqm8wJoeZK)wJIcV?dST}Z;G0Arq{dVDu0&4kd%N!3F1*;*pW zR&qUiFzK=@44#QGw7k1`3t_d8&*kBV->O##t|tonFc2YWrL7_eqg+=+k;!F-`^b8> z#KWCE8%u4k@EprxqiV$VmmtiWxDLgnGu$Vs<8rppV5EajBXL4nyyZM$SWVm!wnCj-B!Wjqj5-5dNXukI2$$|Bu3Lrw}z65Lc=1G z^-#WuQOj$hwNGG?*CM_TO8Bg-1+qc>J7k5c51U8g?ZU5n?HYor;~JIjoWH-G>AoUP ztrWWLbRNqIjW#RT*WqZgPJXU7C)VaW5}MiijYbABmzoru6EmQ*N8cVK7a3|aOB#O& zBl8JY2WKfmj;h#Q!pN%9o@VNLv{OUL?rixHwOZuvX7{IJ{(EdPpuVFoQqIOa7giLVkBOKL@^smUA!tZ1CKRK}#SSM)iQHk)*R~?M!qkCruaS!#oIL1c z?J;U~&FfH#*98^G?i}pA{ z9Jg36t4=%6mhY(quYq*vSxptes9qy|7xSlH?G=S@>u>Ebe;|LVhs~@+06N<4CViBk zUiY$thvX;>Tby6z9Y1edAMQaiH zm^r3v#$Q#2T=X>bsY#D%s!bhs^M9PMAcHbCc0FMHV{u-dwlL;a1eJ63v5U*?Q_8JO zT#50!RD619#j_Uf))0ooADz~*9&lN!bBDRUgE>Vud-i5ck%vT=r^yD*^?Mp@Q^v+V zG#-?gKlr}Eeqifb{|So?HM&g91P8|av8hQoCmQXkd?7wIJwb z_^v8bbg`SAn{I*4bH$u(RZ6*xUhuA~hc=8czK8SHEKTzSxgbwi~9(OqJB&gwb^l4+m`k*Q;_?>Y-APi1{k zAHQ)P)G)f|AyjSgcCFps)Fh6Bca*Xznq36!pV6Az&m{O8$wGFD? zY&O*3*J0;_EqM#jh6^gMQKpXV?#1?>$ml1xvh8nSN>-?H=V;nJIwB07YX$e6vLxH( zqYwQ>qxwR(i4f)DLd)-$P>T-no_c!LsN@)8`e;W@)-Hj0>nJ-}Kla4-ZdPJzI&Mce zv)V_j;(3ERN3_@I$N<^|4Lf`B;8n+bX@bHbcZTopEmDI*Jfl)-pFDvo6svPRoo@(x z);_{lY<;);XzT`dBFpRmGrr}z5u1=pC^S-{ce6iXQlLGcItwJ^mZx{m$&DA_oEZ)B{_bYPq-HA zcH8WGoBG(aBU_j)vEy+_71T34@4dmSg!|M8Vf92Zj6WH7Q7t#OHQqWgFE3ARt+%!T z?oLovLVlnf?2c7pTc)~cc^($_8nyKwsN`RA-23ed3sdj(ys%pjjM+9JrctL;dy8a( z@en&CQmnV(()bu|Y%G1-4a(6x{aLytn$T-;(&{QIJB9vMox11U-1HpD@d(QkaJdEb zG{)+6Dos_L+O3NpWo^=gR?evp|CqEG?L&Ut#D*KLaRFOgOEK(Kq1@!EGcTfo+%A&I z=dLbB+d$u{sh?u)xP{PF8L%;YPPW53+@{>5W=Jt#wQpN;0_HYdw1{ksf_XhO4#2F= zyPx6Lx2<92L-;L5PD`zn6zwIH`Jk($?Qw({erA$^bC;q33hv!d!>%wRhj# zal^hk+WGNg;rJtb-EB(?czvOM=H7dl=vblBwAv>}%1@{}mnpUznfq1cE^sgsL0*4I zJ##!*B?=vI_OEVis5o+_IwMIRrpQyT_Sq~ZU%oY7c5JMIADzpD!Upz9h@iWg_>>~j zOLS;wp^i$-E?4<_cp?RiS%Rd?i;f*mOz=~(&3lo<=@(nR!_Rqiprh@weZlL!t#NCc zO!QTcInq|%#>OVgobj{~ixEUec`E25zJ~*DofsQdzIa@5^nOXj2T;8O`l--(QyU^$t?TGY^7#&FQ+2SS3B#qK*k3`ye?8jUYSajE5iBbJls75CCc(m3dk{t?- zopcER9{Z?TC)mk~gpi^kbbu>b-+a{m#8-y2^p$ka4n60w;Sc2}HMf<8JUvhCL0B&Btk)T`ctE$*qNW8L$`7!r^9T+>=<=2qaq-;ll2{`{Rg zc5a0ZUI$oG&j-qVOuKa=*v4aY#IsoM+1|c4Z)<}lEDvy;5huB@1RJPquU2U*U-;gu z=En2m+qjBzR#DEJDO`WU)hdd{Vj%^0V*KoyZ|5lzV87&g_j~NCjwv0uQVqXOb*QrQ zy|Qn`hxx(58c70$E;L(X0uZZ72M1!6oeg)(cdKO ze0gDaTz+ohR-#d)NbAH4x{I(21yjwvBQfmpLu$)|m{XolbgF!pmsqJ#D}(ylp6uC> z{bqtcI#hT#HW=wl7>p!38sKsJ`r8}lt-q%Keqy%u(xk=yiIJiUw6|5IvkS+#?JTBl z8H5(Q?l#wzazujH!8o>1xtn8#_w+397*_cy8!pQGP%K(Ga3pAjsaTbbXJlQF_+m+-UpUUent@xM zg%jqLUExj~o^vQ3Gl*>wh=_gOr2*|U64_iXb+-111aH}$TjeajM+I20xw(((>fej-@CIz4S1pi$(#}P7`4({6QS2CaQS4NPENDp>sAqD z$bH4KGzXGffkJ7R>V>)>tC)uax{UsN*dbeNC*v}#8Y#OWYwL4t$ePR?VTyIs!wea+ z5Urmc)X|^`MG~*dS6pGSbU+gPJoq*^a=_>$n4|P^w$sMBBy@f*Z^Jg6?n5?oId6f{ z$LW4M|4m502z0t7g<#Bx%X;9<=)smFolV&(V^(7Cv2-sxbxopQ!)*#ZRhTBpx1)Fc zNm1T%bONzv6@#|dz(w02AH8OXe>kQ#1FMCzO}2J_mST)+ExmBr9cva-@?;wnmWMOk z{3_~EX_xadgJGv&H@zK_8{(x84`}+c?oSBX*Ge3VdfTt&F}yCpFP?CpW+BE^cWY0^ zb&uBN!Ja3UzYHK-CTyA5=L zEMW{l3Usky#ly=7px648W31UNV@K)&Ub&zP1c7%)`{);I4b0Q<)B}3;NMG2JH=X$U zfIW4)4n9ZM`-yRj67I)YSLDK)qfUJ_ij}a#aZN~9EXrh8eZY2&=uY%2N0UFF7<~%M zsB8=erOWZ>Ct_#^tHZ|*q`H;A)5;ycw*IcmVxi8_0Xk}aJA^ath+E;xg!x+As(M#0=)3!NJR6H&9+zd#iP(m0PIW8$ z1Y^VX`>jm`W!=WpF*{ioM?C9`yOR>@0q=u7o>BP-eSHqCgMDj!2anwH?s%i2p+Q7D zzszIf5XJpE)IG4;d_(La-xenmF(tgAxK`Y4sQ}BSJEPs6N_U2vI{8=0C_F?@7<(G; zo$~G=8p+076G;`}>{MQ>t>7cm=zGtfbdDXm6||jUU|?X?CaE?(<6bKDYKeHlz}DA8 zXT={X=yp_R;HfJ9h%?eWvQ!dRgz&Su*JfNt!Wu>|XfU&68iRikRrHRW|ZxzRR^`eIGt zIeiDgVS>IeExKVRWW8-=A=yA`}`)ZkWBrZD`hpWIxBGkh&f#ijr449~m`j6{4jiJ*C!oVA8ZC?$1RM#K(_b zL9TW)kN*Y4%^-qPpMP7d4)o?Nk#>aoYHT(*g)qmRUb?**F@pnNiy6Fv9rEiUqD(^O zzyS?nBrX63BTRYduaG(0VVG2yJRe%o&rVrLjbxTaAFTd8s;<<@Qs>u(<193R8>}2_ zuwp{7;H2a*X7_jryzriZXMg?bTuegABb^87@SsKkr2)0Gyiax8KQWstw^v#ix45EVrcEhr>!NMhprl$InQMzjSFH54x5k9qHc`@9uKQzvL4ihcq{^B zPrVR=o_ic%Y>6&rMN)hTZsI7I<3&`#(nl+3y3ys9A~&^=4?PL&nd8)`OfG#n zwAMN$1&>K++c{^|7<4P=2y(B{jJsQ0a#U;HTo4ZmWZYvI{+s;Td{Yzem%0*k#)vjpB zia;J&>}ICate44SFYY3vEelqStQWFihx%^vQ@Do(sOy7yR2@WNv7Y9I^yL=nZr3mb zXKV5t@=?-Sk|b{XMhA7ZGB@2hqsx}4xwCW!in#C zI@}scZlr3-NFJ@NFaJlhyfcw{k^vvtGl`N9xSo**rDW4S}i zM9{fMPWo%4wYDG~BZ18BD+}h|GQKc-g^{++3MY>}W_uq7jGHx{mwE9fZiPCoxN$+7 zrODGGJrOkcPQUB(FD5aoS4g~7#6NR^ma7-!>mHuJfY5kTe6PpNNKC9GGRiu^L31uG z$7v`*JknQHsYB!Tm_W{a32TM099djW%5e+j0Ve_ct}IM>XLF1Ap+YvcrLV=|CKo6S zb+9Nl3_YdKP6%Cxy@6TxZ>;4&nTneadr z_ES90ydCev)LV!dN=#(*f}|ZORFdvkYBni^aLbUk>BajeWIOcmHP#8S)*2U~QKI%S zyrLmtPqb&TphJ;>yAxri#;{uyk`JJqODDw%(Z=2`1uc}br^V%>j!gS)D*q*f_-qf8&D;W1dJgQMlaH5er zN2U<%Smb7==vE}dDI8K7cKz!vs^73o9f>2sgiTzWcwY|BMYHH5%Vn7#kiw&eItCqa zIkR2~Q}>X=Ar8W|^Ms41Fm8o6IB2_j60eOeBB1Br!boW7JnoeX6Gs)?7rW0^5psc- zjS16yb>dFn>KPOF;imD}e!enuIniFzv}n$m2#gCCv4jM#ArwlzZ$7@9&XkFxZ4n!V zj3dyiwW4Ki2QG{@i>yuZXQizw_OkZI^-3otXC{!(lUpJF33gI60ak;Uqitp74|B6I zgg{b=Iz}WkhCGj1M=hu4#Aw173YxIVbISaoc z-nLZC*6Tgivd5V`K%GxhBsp@SUU60-rfc$=wb>zdJzXS&-5(NRRodFk;Kxk!S(O(a0e7oY=E( zAyS;Ow?6Q&XA+cnkCb{28_1N8H#?J!*$MmIwLq^*T_9-z^&UE@A(z9oGYtFy6EZef LrJugUA?W`A8`#=m diff --git a/demos/app-dir/public/hello.txt b/demos/canary/public/hello.txt similarity index 100% rename from demos/app-dir/public/hello.txt rename to demos/canary/public/hello.txt diff --git a/demos/app-dir/styles/global.css b/demos/canary/styles/global.css similarity index 100% rename from demos/app-dir/styles/global.css rename to demos/canary/styles/global.css diff --git a/demos/canary/styles/globals.css b/demos/canary/styles/globals.css deleted file mode 100755 index e5e2dcc23b..0000000000 --- a/demos/canary/styles/globals.css +++ /dev/null @@ -1,16 +0,0 @@ -html, -body { - padding: 0; - margin: 0; - font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, - Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif; -} - -a { - color: inherit; - text-decoration: none; -} - -* { - box-sizing: border-box; -} diff --git a/demos/app-dir/styles/shared.module.css b/demos/canary/styles/shared.module.css similarity index 100% rename from demos/app-dir/styles/shared.module.css rename to demos/canary/styles/shared.module.css From 57fb3a6ea07cd088923a8a0f7e2eaa3f04feab50 Mon Sep 17 00:00:00 2001 From: Matt Kane Date: Wed, 28 Sep 2022 11:22:14 +0100 Subject: [PATCH 012/172] chore: update snapshot --- test/__snapshots__/index.js.snap | 356 +++++++++++++++++++++---------- test/index.js | 2 +- 2 files changed, 245 insertions(+), 113 deletions(-) diff --git a/test/__snapshots__/index.js.snap b/test/__snapshots__/index.js.snap index bb77f6a9a4..354329d803 100644 --- a/test/__snapshots__/index.js.snap +++ b/test/__snapshots__/index.js.snap @@ -1,141 +1,273 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`onBuild() generates a file referencing all page sources 1`] = ` -"// This file is purely to allow nft to know about these pages. It should be temporary. +"// This file is purely to allow nft to know about these pages. exports.resolvePages = () => { try { - require.resolve('../../../.next/server/pages/_app.js') - require.resolve('../../../.next/server/pages/_document.js') - require.resolve('../../../.next/server/pages/_error.js') - require.resolve('../../../.next/server/pages/api/enterPreview.js') - require.resolve('../../../.next/server/pages/api/exitPreview.js') - require.resolve('../../../.next/server/pages/api/hello-background.js') - require.resolve('../../../.next/server/pages/api/hello.js') - require.resolve('../../../.next/server/pages/api/shows/[...params].js') - require.resolve('../../../.next/server/pages/api/shows/[id].js') - require.resolve('../../../.next/server/pages/deep/import.js') - require.resolve('../../../.next/server/pages/getServerSideProps/[id].js') - require.resolve('../../../.next/server/pages/getServerSideProps/all/[[...slug]].js') - require.resolve('../../../.next/server/pages/getServerSideProps/static.js') - require.resolve('../../../.next/server/pages/getStaticProps/[id].js') - require.resolve('../../../.next/server/pages/getStaticProps/env.js') - require.resolve('../../../.next/server/pages/getStaticProps/static.js') - require.resolve('../../../.next/server/pages/getStaticProps/with-revalidate.js') - require.resolve('../../../.next/server/pages/getStaticProps/withFallback/[...slug].js') - require.resolve('../../../.next/server/pages/getStaticProps/withFallback/[id].js') - require.resolve('../../../.next/server/pages/getStaticProps/withFallbackBlocking/[id].js') - require.resolve('../../../.next/server/pages/getStaticProps/withRevalidate/[id].js') - require.resolve('../../../.next/server/pages/getStaticProps/withRevalidate/withFallback/[id].js') - require.resolve('../../../.next/server/pages/getStaticProps/withRevalidate/withFallbackBlocking/[id].js') - require.resolve('../../../.next/server/pages/index.js') - require.resolve('../../../.next/server/pages/previewTest.js') - require.resolve('../../../.next/server/pages/shows/[...params].js') - require.resolve('../../../.next/server/pages/shows/[id].js') + require.resolve('../../../.next/package.json') + require.resolve('../../../.next/server/chunks/162.js') + require.resolve('../../../.next/server/chunks/237.js') + require.resolve('../../../.next/server/chunks/274.js') + require.resolve('../../../.next/server/chunks/577.js') + require.resolve('../../../.next/server/chunks/747.js') + require.resolve('../../../.next/server/chunks/753.js') + require.resolve('../../../.next/server/chunks/97.js') + require.resolve('../../../.next/server/chunks/header.js') + require.resolve('../../../.next/server/webpack-api-runtime.js') + require.resolve('../../../.next/server/webpack-runtime.js') + require.resolve('../../../components/Header.js') + require.resolve('../../../node_modules/@reach/dialog/dist/reach-dialog.cjs.dev.js') + require.resolve('../../../node_modules/@reach/dialog/dist/reach-dialog.cjs.js') + require.resolve('../../../node_modules/@reach/dialog/dist/reach-dialog.cjs.prod.js') + require.resolve('../../../node_modules/@reach/dialog/package.json') + require.resolve('../../../node_modules/@reach/portal/dist/reach-portal.cjs.dev.js') + require.resolve('../../../node_modules/@reach/portal/dist/reach-portal.cjs.js') + require.resolve('../../../node_modules/@reach/portal/dist/reach-portal.cjs.prod.js') + require.resolve('../../../node_modules/@reach/portal/package.json') + require.resolve('../../../node_modules/@reach/utils/can-use-dom/dist/reach-utils-can-use-dom.cjs.dev.js') + require.resolve('../../../node_modules/@reach/utils/can-use-dom/dist/reach-utils-can-use-dom.cjs.prod.js') + require.resolve('../../../node_modules/@reach/utils/can-use-dom/package.json') + require.resolve('../../../node_modules/@reach/utils/compose-event-handlers/dist/reach-utils-compose-event-handlers.cjs.dev.js') + require.resolve('../../../node_modules/@reach/utils/compose-event-handlers/dist/reach-utils-compose-event-handlers.cjs.js') + require.resolve('../../../node_modules/@reach/utils/compose-event-handlers/dist/reach-utils-compose-event-handlers.cjs.prod.js') + require.resolve('../../../node_modules/@reach/utils/compose-event-handlers/package.json') + require.resolve('../../../node_modules/@reach/utils/compose-refs/dist/reach-utils-compose-refs.cjs.dev.js') + require.resolve('../../../node_modules/@reach/utils/compose-refs/dist/reach-utils-compose-refs.cjs.js') + require.resolve('../../../node_modules/@reach/utils/compose-refs/dist/reach-utils-compose-refs.cjs.prod.js') + require.resolve('../../../node_modules/@reach/utils/compose-refs/package.json') + require.resolve('../../../node_modules/@reach/utils/dev-utils/dist/reach-utils-dev-utils.cjs.dev.js') + require.resolve('../../../node_modules/@reach/utils/dev-utils/dist/reach-utils-dev-utils.cjs.js') + require.resolve('../../../node_modules/@reach/utils/dev-utils/dist/reach-utils-dev-utils.cjs.prod.js') + require.resolve('../../../node_modules/@reach/utils/dev-utils/package.json') + require.resolve('../../../node_modules/@reach/utils/noop/dist/reach-utils-noop.cjs.dev.js') + require.resolve('../../../node_modules/@reach/utils/noop/dist/reach-utils-noop.cjs.js') + require.resolve('../../../node_modules/@reach/utils/noop/dist/reach-utils-noop.cjs.prod.js') + require.resolve('../../../node_modules/@reach/utils/noop/package.json') + require.resolve('../../../node_modules/@reach/utils/owner-document/dist/reach-utils-owner-document.cjs.dev.js') + require.resolve('../../../node_modules/@reach/utils/owner-document/dist/reach-utils-owner-document.cjs.js') + require.resolve('../../../node_modules/@reach/utils/owner-document/dist/reach-utils-owner-document.cjs.prod.js') + require.resolve('../../../node_modules/@reach/utils/owner-document/package.json') + require.resolve('../../../node_modules/@reach/utils/type-check/dist/reach-utils-type-check.cjs.dev.js') + require.resolve('../../../node_modules/@reach/utils/type-check/dist/reach-utils-type-check.cjs.js') + require.resolve('../../../node_modules/@reach/utils/type-check/dist/reach-utils-type-check.cjs.prod.js') + require.resolve('../../../node_modules/@reach/utils/type-check/package.json') + require.resolve('../../../node_modules/@reach/utils/use-force-update/dist/reach-utils-use-force-update.cjs.dev.js') + require.resolve('../../../node_modules/@reach/utils/use-force-update/dist/reach-utils-use-force-update.cjs.js') + require.resolve('../../../node_modules/@reach/utils/use-force-update/dist/reach-utils-use-force-update.cjs.prod.js') + require.resolve('../../../node_modules/@reach/utils/use-force-update/package.json') + require.resolve('../../../node_modules/@reach/utils/use-isomorphic-layout-effect/dist/reach-utils-use-isomorphic-layout-effect.cjs.dev.js') + require.resolve('../../../node_modules/@reach/utils/use-isomorphic-layout-effect/dist/reach-utils-use-isomorphic-layout-effect.cjs.js') + require.resolve('../../../node_modules/@reach/utils/use-isomorphic-layout-effect/dist/reach-utils-use-isomorphic-layout-effect.cjs.prod.js') + require.resolve('../../../node_modules/@reach/utils/use-isomorphic-layout-effect/package.json') + require.resolve('../../../node_modules/@reach/visually-hidden/dist/reach-visually-hidden.cjs.dev.js') + require.resolve('../../../node_modules/@reach/visually-hidden/dist/reach-visually-hidden.cjs.js') + require.resolve('../../../node_modules/@reach/visually-hidden/dist/reach-visually-hidden.cjs.prod.js') + require.resolve('../../../node_modules/@reach/visually-hidden/package.json') + require.resolve('../../../package.json') } catch {} }" `; exports[`onBuild() generates a file referencing all page sources 2`] = ` -"// This file is purely to allow nft to know about these pages. It should be temporary. +"// This file is purely to allow nft to know about these pages. exports.resolvePages = () => { try { - require.resolve('../../../.next/server/pages/_app.js') - require.resolve('../../../.next/server/pages/_document.js') - require.resolve('../../../.next/server/pages/_error.js') - require.resolve('../../../.next/server/pages/api/enterPreview.js') - require.resolve('../../../.next/server/pages/api/exitPreview.js') - require.resolve('../../../.next/server/pages/api/hello-background.js') - require.resolve('../../../.next/server/pages/api/hello.js') - require.resolve('../../../.next/server/pages/api/shows/[...params].js') - require.resolve('../../../.next/server/pages/api/shows/[id].js') - require.resolve('../../../.next/server/pages/deep/import.js') - require.resolve('../../../.next/server/pages/getServerSideProps/[id].js') - require.resolve('../../../.next/server/pages/getServerSideProps/all/[[...slug]].js') - require.resolve('../../../.next/server/pages/getServerSideProps/static.js') - require.resolve('../../../.next/server/pages/getStaticProps/[id].js') - require.resolve('../../../.next/server/pages/getStaticProps/env.js') - require.resolve('../../../.next/server/pages/getStaticProps/static.js') - require.resolve('../../../.next/server/pages/getStaticProps/with-revalidate.js') - require.resolve('../../../.next/server/pages/getStaticProps/withFallback/[...slug].js') - require.resolve('../../../.next/server/pages/getStaticProps/withFallback/[id].js') - require.resolve('../../../.next/server/pages/getStaticProps/withFallbackBlocking/[id].js') - require.resolve('../../../.next/server/pages/getStaticProps/withRevalidate/[id].js') - require.resolve('../../../.next/server/pages/getStaticProps/withRevalidate/withFallback/[id].js') - require.resolve('../../../.next/server/pages/getStaticProps/withRevalidate/withFallbackBlocking/[id].js') - require.resolve('../../../.next/server/pages/index.js') - require.resolve('../../../.next/server/pages/previewTest.js') - require.resolve('../../../.next/server/pages/shows/[...params].js') - require.resolve('../../../.next/server/pages/shows/[id].js') + require.resolve('../../../.next/package.json') + require.resolve('../../../.next/server/chunks/162.js') + require.resolve('../../../.next/server/chunks/237.js') + require.resolve('../../../.next/server/chunks/274.js') + require.resolve('../../../.next/server/chunks/577.js') + require.resolve('../../../.next/server/chunks/747.js') + require.resolve('../../../.next/server/chunks/753.js') + require.resolve('../../../.next/server/chunks/97.js') + require.resolve('../../../.next/server/chunks/header.js') + require.resolve('../../../.next/server/webpack-api-runtime.js') + require.resolve('../../../.next/server/webpack-runtime.js') + require.resolve('../../../components/Header.js') + require.resolve('../../../node_modules/@reach/dialog/dist/reach-dialog.cjs.dev.js') + require.resolve('../../../node_modules/@reach/dialog/dist/reach-dialog.cjs.js') + require.resolve('../../../node_modules/@reach/dialog/dist/reach-dialog.cjs.prod.js') + require.resolve('../../../node_modules/@reach/dialog/package.json') + require.resolve('../../../node_modules/@reach/portal/dist/reach-portal.cjs.dev.js') + require.resolve('../../../node_modules/@reach/portal/dist/reach-portal.cjs.js') + require.resolve('../../../node_modules/@reach/portal/dist/reach-portal.cjs.prod.js') + require.resolve('../../../node_modules/@reach/portal/package.json') + require.resolve('../../../node_modules/@reach/utils/can-use-dom/dist/reach-utils-can-use-dom.cjs.dev.js') + require.resolve('../../../node_modules/@reach/utils/can-use-dom/dist/reach-utils-can-use-dom.cjs.prod.js') + require.resolve('../../../node_modules/@reach/utils/can-use-dom/package.json') + require.resolve('../../../node_modules/@reach/utils/compose-event-handlers/dist/reach-utils-compose-event-handlers.cjs.dev.js') + require.resolve('../../../node_modules/@reach/utils/compose-event-handlers/dist/reach-utils-compose-event-handlers.cjs.js') + require.resolve('../../../node_modules/@reach/utils/compose-event-handlers/dist/reach-utils-compose-event-handlers.cjs.prod.js') + require.resolve('../../../node_modules/@reach/utils/compose-event-handlers/package.json') + require.resolve('../../../node_modules/@reach/utils/compose-refs/dist/reach-utils-compose-refs.cjs.dev.js') + require.resolve('../../../node_modules/@reach/utils/compose-refs/dist/reach-utils-compose-refs.cjs.js') + require.resolve('../../../node_modules/@reach/utils/compose-refs/dist/reach-utils-compose-refs.cjs.prod.js') + require.resolve('../../../node_modules/@reach/utils/compose-refs/package.json') + require.resolve('../../../node_modules/@reach/utils/dev-utils/dist/reach-utils-dev-utils.cjs.dev.js') + require.resolve('../../../node_modules/@reach/utils/dev-utils/dist/reach-utils-dev-utils.cjs.js') + require.resolve('../../../node_modules/@reach/utils/dev-utils/dist/reach-utils-dev-utils.cjs.prod.js') + require.resolve('../../../node_modules/@reach/utils/dev-utils/package.json') + require.resolve('../../../node_modules/@reach/utils/noop/dist/reach-utils-noop.cjs.dev.js') + require.resolve('../../../node_modules/@reach/utils/noop/dist/reach-utils-noop.cjs.js') + require.resolve('../../../node_modules/@reach/utils/noop/dist/reach-utils-noop.cjs.prod.js') + require.resolve('../../../node_modules/@reach/utils/noop/package.json') + require.resolve('../../../node_modules/@reach/utils/owner-document/dist/reach-utils-owner-document.cjs.dev.js') + require.resolve('../../../node_modules/@reach/utils/owner-document/dist/reach-utils-owner-document.cjs.js') + require.resolve('../../../node_modules/@reach/utils/owner-document/dist/reach-utils-owner-document.cjs.prod.js') + require.resolve('../../../node_modules/@reach/utils/owner-document/package.json') + require.resolve('../../../node_modules/@reach/utils/type-check/dist/reach-utils-type-check.cjs.dev.js') + require.resolve('../../../node_modules/@reach/utils/type-check/dist/reach-utils-type-check.cjs.js') + require.resolve('../../../node_modules/@reach/utils/type-check/dist/reach-utils-type-check.cjs.prod.js') + require.resolve('../../../node_modules/@reach/utils/type-check/package.json') + require.resolve('../../../node_modules/@reach/utils/use-force-update/dist/reach-utils-use-force-update.cjs.dev.js') + require.resolve('../../../node_modules/@reach/utils/use-force-update/dist/reach-utils-use-force-update.cjs.js') + require.resolve('../../../node_modules/@reach/utils/use-force-update/dist/reach-utils-use-force-update.cjs.prod.js') + require.resolve('../../../node_modules/@reach/utils/use-force-update/package.json') + require.resolve('../../../node_modules/@reach/utils/use-isomorphic-layout-effect/dist/reach-utils-use-isomorphic-layout-effect.cjs.dev.js') + require.resolve('../../../node_modules/@reach/utils/use-isomorphic-layout-effect/dist/reach-utils-use-isomorphic-layout-effect.cjs.js') + require.resolve('../../../node_modules/@reach/utils/use-isomorphic-layout-effect/dist/reach-utils-use-isomorphic-layout-effect.cjs.prod.js') + require.resolve('../../../node_modules/@reach/utils/use-isomorphic-layout-effect/package.json') + require.resolve('../../../node_modules/@reach/visually-hidden/dist/reach-visually-hidden.cjs.dev.js') + require.resolve('../../../node_modules/@reach/visually-hidden/dist/reach-visually-hidden.cjs.js') + require.resolve('../../../node_modules/@reach/visually-hidden/dist/reach-visually-hidden.cjs.prod.js') + require.resolve('../../../node_modules/@reach/visually-hidden/package.json') + require.resolve('../../../package.json') } catch {} }" `; exports[`onBuild() generates a file referencing all when publish dir is a subdirectory 1`] = ` -"// This file is purely to allow nft to know about these pages. It should be temporary. +"// This file is purely to allow nft to know about these pages. exports.resolvePages = () => { try { - require.resolve('../../../web/.next/server/pages/_app.js') - require.resolve('../../../web/.next/server/pages/_document.js') - require.resolve('../../../web/.next/server/pages/_error.js') - require.resolve('../../../web/.next/server/pages/api/enterPreview.js') - require.resolve('../../../web/.next/server/pages/api/exitPreview.js') - require.resolve('../../../web/.next/server/pages/api/hello-background.js') - require.resolve('../../../web/.next/server/pages/api/hello.js') - require.resolve('../../../web/.next/server/pages/api/shows/[...params].js') - require.resolve('../../../web/.next/server/pages/api/shows/[id].js') - require.resolve('../../../web/.next/server/pages/deep/import.js') - require.resolve('../../../web/.next/server/pages/getServerSideProps/[id].js') - require.resolve('../../../web/.next/server/pages/getServerSideProps/all/[[...slug]].js') - require.resolve('../../../web/.next/server/pages/getServerSideProps/static.js') - require.resolve('../../../web/.next/server/pages/getStaticProps/[id].js') - require.resolve('../../../web/.next/server/pages/getStaticProps/env.js') - require.resolve('../../../web/.next/server/pages/getStaticProps/static.js') - require.resolve('../../../web/.next/server/pages/getStaticProps/with-revalidate.js') - require.resolve('../../../web/.next/server/pages/getStaticProps/withFallback/[...slug].js') - require.resolve('../../../web/.next/server/pages/getStaticProps/withFallback/[id].js') - require.resolve('../../../web/.next/server/pages/getStaticProps/withFallbackBlocking/[id].js') - require.resolve('../../../web/.next/server/pages/getStaticProps/withRevalidate/[id].js') - require.resolve('../../../web/.next/server/pages/getStaticProps/withRevalidate/withFallback/[id].js') - require.resolve('../../../web/.next/server/pages/getStaticProps/withRevalidate/withFallbackBlocking/[id].js') - require.resolve('../../../web/.next/server/pages/index.js') - require.resolve('../../../web/.next/server/pages/previewTest.js') - require.resolve('../../../web/.next/server/pages/shows/[...params].js') - require.resolve('../../../web/.next/server/pages/shows/[id].js') + require.resolve('../../../web/.next/package.json') + require.resolve('../../../web/.next/server/chunks/162.js') + require.resolve('../../../web/.next/server/chunks/237.js') + require.resolve('../../../web/.next/server/chunks/274.js') + require.resolve('../../../web/.next/server/chunks/577.js') + require.resolve('../../../web/.next/server/chunks/747.js') + require.resolve('../../../web/.next/server/chunks/753.js') + require.resolve('../../../web/.next/server/chunks/97.js') + require.resolve('../../../web/.next/server/chunks/header.js') + require.resolve('../../../web/.next/server/webpack-api-runtime.js') + require.resolve('../../../web/.next/server/webpack-runtime.js') + require.resolve('../../../web/components/Header.js') + require.resolve('../../../web/node_modules/@reach/dialog/dist/reach-dialog.cjs.dev.js') + require.resolve('../../../web/node_modules/@reach/dialog/dist/reach-dialog.cjs.js') + require.resolve('../../../web/node_modules/@reach/dialog/dist/reach-dialog.cjs.prod.js') + require.resolve('../../../web/node_modules/@reach/dialog/package.json') + require.resolve('../../../web/node_modules/@reach/portal/dist/reach-portal.cjs.dev.js') + require.resolve('../../../web/node_modules/@reach/portal/dist/reach-portal.cjs.js') + require.resolve('../../../web/node_modules/@reach/portal/dist/reach-portal.cjs.prod.js') + require.resolve('../../../web/node_modules/@reach/portal/package.json') + require.resolve('../../../web/node_modules/@reach/utils/can-use-dom/dist/reach-utils-can-use-dom.cjs.dev.js') + require.resolve('../../../web/node_modules/@reach/utils/can-use-dom/dist/reach-utils-can-use-dom.cjs.prod.js') + require.resolve('../../../web/node_modules/@reach/utils/can-use-dom/package.json') + require.resolve('../../../web/node_modules/@reach/utils/compose-event-handlers/dist/reach-utils-compose-event-handlers.cjs.dev.js') + require.resolve('../../../web/node_modules/@reach/utils/compose-event-handlers/dist/reach-utils-compose-event-handlers.cjs.js') + require.resolve('../../../web/node_modules/@reach/utils/compose-event-handlers/dist/reach-utils-compose-event-handlers.cjs.prod.js') + require.resolve('../../../web/node_modules/@reach/utils/compose-event-handlers/package.json') + require.resolve('../../../web/node_modules/@reach/utils/compose-refs/dist/reach-utils-compose-refs.cjs.dev.js') + require.resolve('../../../web/node_modules/@reach/utils/compose-refs/dist/reach-utils-compose-refs.cjs.js') + require.resolve('../../../web/node_modules/@reach/utils/compose-refs/dist/reach-utils-compose-refs.cjs.prod.js') + require.resolve('../../../web/node_modules/@reach/utils/compose-refs/package.json') + require.resolve('../../../web/node_modules/@reach/utils/dev-utils/dist/reach-utils-dev-utils.cjs.dev.js') + require.resolve('../../../web/node_modules/@reach/utils/dev-utils/dist/reach-utils-dev-utils.cjs.js') + require.resolve('../../../web/node_modules/@reach/utils/dev-utils/dist/reach-utils-dev-utils.cjs.prod.js') + require.resolve('../../../web/node_modules/@reach/utils/dev-utils/package.json') + require.resolve('../../../web/node_modules/@reach/utils/noop/dist/reach-utils-noop.cjs.dev.js') + require.resolve('../../../web/node_modules/@reach/utils/noop/dist/reach-utils-noop.cjs.js') + require.resolve('../../../web/node_modules/@reach/utils/noop/dist/reach-utils-noop.cjs.prod.js') + require.resolve('../../../web/node_modules/@reach/utils/noop/package.json') + require.resolve('../../../web/node_modules/@reach/utils/owner-document/dist/reach-utils-owner-document.cjs.dev.js') + require.resolve('../../../web/node_modules/@reach/utils/owner-document/dist/reach-utils-owner-document.cjs.js') + require.resolve('../../../web/node_modules/@reach/utils/owner-document/dist/reach-utils-owner-document.cjs.prod.js') + require.resolve('../../../web/node_modules/@reach/utils/owner-document/package.json') + require.resolve('../../../web/node_modules/@reach/utils/type-check/dist/reach-utils-type-check.cjs.dev.js') + require.resolve('../../../web/node_modules/@reach/utils/type-check/dist/reach-utils-type-check.cjs.js') + require.resolve('../../../web/node_modules/@reach/utils/type-check/dist/reach-utils-type-check.cjs.prod.js') + require.resolve('../../../web/node_modules/@reach/utils/type-check/package.json') + require.resolve('../../../web/node_modules/@reach/utils/use-force-update/dist/reach-utils-use-force-update.cjs.dev.js') + require.resolve('../../../web/node_modules/@reach/utils/use-force-update/dist/reach-utils-use-force-update.cjs.js') + require.resolve('../../../web/node_modules/@reach/utils/use-force-update/dist/reach-utils-use-force-update.cjs.prod.js') + require.resolve('../../../web/node_modules/@reach/utils/use-force-update/package.json') + require.resolve('../../../web/node_modules/@reach/utils/use-isomorphic-layout-effect/dist/reach-utils-use-isomorphic-layout-effect.cjs.dev.js') + require.resolve('../../../web/node_modules/@reach/utils/use-isomorphic-layout-effect/dist/reach-utils-use-isomorphic-layout-effect.cjs.js') + require.resolve('../../../web/node_modules/@reach/utils/use-isomorphic-layout-effect/dist/reach-utils-use-isomorphic-layout-effect.cjs.prod.js') + require.resolve('../../../web/node_modules/@reach/utils/use-isomorphic-layout-effect/package.json') + require.resolve('../../../web/node_modules/@reach/visually-hidden/dist/reach-visually-hidden.cjs.dev.js') + require.resolve('../../../web/node_modules/@reach/visually-hidden/dist/reach-visually-hidden.cjs.js') + require.resolve('../../../web/node_modules/@reach/visually-hidden/dist/reach-visually-hidden.cjs.prod.js') + require.resolve('../../../web/node_modules/@reach/visually-hidden/package.json') + require.resolve('../../../web/package.json') } catch {} }" `; exports[`onBuild() generates a file referencing all when publish dir is a subdirectory 2`] = ` -"// This file is purely to allow nft to know about these pages. It should be temporary. +"// This file is purely to allow nft to know about these pages. exports.resolvePages = () => { try { - require.resolve('../../../web/.next/server/pages/_app.js') - require.resolve('../../../web/.next/server/pages/_document.js') - require.resolve('../../../web/.next/server/pages/_error.js') - require.resolve('../../../web/.next/server/pages/api/enterPreview.js') - require.resolve('../../../web/.next/server/pages/api/exitPreview.js') - require.resolve('../../../web/.next/server/pages/api/hello-background.js') - require.resolve('../../../web/.next/server/pages/api/hello.js') - require.resolve('../../../web/.next/server/pages/api/shows/[...params].js') - require.resolve('../../../web/.next/server/pages/api/shows/[id].js') - require.resolve('../../../web/.next/server/pages/deep/import.js') - require.resolve('../../../web/.next/server/pages/getServerSideProps/[id].js') - require.resolve('../../../web/.next/server/pages/getServerSideProps/all/[[...slug]].js') - require.resolve('../../../web/.next/server/pages/getServerSideProps/static.js') - require.resolve('../../../web/.next/server/pages/getStaticProps/[id].js') - require.resolve('../../../web/.next/server/pages/getStaticProps/env.js') - require.resolve('../../../web/.next/server/pages/getStaticProps/static.js') - require.resolve('../../../web/.next/server/pages/getStaticProps/with-revalidate.js') - require.resolve('../../../web/.next/server/pages/getStaticProps/withFallback/[...slug].js') - require.resolve('../../../web/.next/server/pages/getStaticProps/withFallback/[id].js') - require.resolve('../../../web/.next/server/pages/getStaticProps/withFallbackBlocking/[id].js') - require.resolve('../../../web/.next/server/pages/getStaticProps/withRevalidate/[id].js') - require.resolve('../../../web/.next/server/pages/getStaticProps/withRevalidate/withFallback/[id].js') - require.resolve('../../../web/.next/server/pages/getStaticProps/withRevalidate/withFallbackBlocking/[id].js') - require.resolve('../../../web/.next/server/pages/index.js') - require.resolve('../../../web/.next/server/pages/previewTest.js') - require.resolve('../../../web/.next/server/pages/shows/[...params].js') - require.resolve('../../../web/.next/server/pages/shows/[id].js') + require.resolve('../../../web/.next/package.json') + require.resolve('../../../web/.next/server/chunks/162.js') + require.resolve('../../../web/.next/server/chunks/237.js') + require.resolve('../../../web/.next/server/chunks/274.js') + require.resolve('../../../web/.next/server/chunks/577.js') + require.resolve('../../../web/.next/server/chunks/747.js') + require.resolve('../../../web/.next/server/chunks/753.js') + require.resolve('../../../web/.next/server/chunks/97.js') + require.resolve('../../../web/.next/server/chunks/header.js') + require.resolve('../../../web/.next/server/webpack-api-runtime.js') + require.resolve('../../../web/.next/server/webpack-runtime.js') + require.resolve('../../../web/components/Header.js') + require.resolve('../../../web/node_modules/@reach/dialog/dist/reach-dialog.cjs.dev.js') + require.resolve('../../../web/node_modules/@reach/dialog/dist/reach-dialog.cjs.js') + require.resolve('../../../web/node_modules/@reach/dialog/dist/reach-dialog.cjs.prod.js') + require.resolve('../../../web/node_modules/@reach/dialog/package.json') + require.resolve('../../../web/node_modules/@reach/portal/dist/reach-portal.cjs.dev.js') + require.resolve('../../../web/node_modules/@reach/portal/dist/reach-portal.cjs.js') + require.resolve('../../../web/node_modules/@reach/portal/dist/reach-portal.cjs.prod.js') + require.resolve('../../../web/node_modules/@reach/portal/package.json') + require.resolve('../../../web/node_modules/@reach/utils/can-use-dom/dist/reach-utils-can-use-dom.cjs.dev.js') + require.resolve('../../../web/node_modules/@reach/utils/can-use-dom/dist/reach-utils-can-use-dom.cjs.prod.js') + require.resolve('../../../web/node_modules/@reach/utils/can-use-dom/package.json') + require.resolve('../../../web/node_modules/@reach/utils/compose-event-handlers/dist/reach-utils-compose-event-handlers.cjs.dev.js') + require.resolve('../../../web/node_modules/@reach/utils/compose-event-handlers/dist/reach-utils-compose-event-handlers.cjs.js') + require.resolve('../../../web/node_modules/@reach/utils/compose-event-handlers/dist/reach-utils-compose-event-handlers.cjs.prod.js') + require.resolve('../../../web/node_modules/@reach/utils/compose-event-handlers/package.json') + require.resolve('../../../web/node_modules/@reach/utils/compose-refs/dist/reach-utils-compose-refs.cjs.dev.js') + require.resolve('../../../web/node_modules/@reach/utils/compose-refs/dist/reach-utils-compose-refs.cjs.js') + require.resolve('../../../web/node_modules/@reach/utils/compose-refs/dist/reach-utils-compose-refs.cjs.prod.js') + require.resolve('../../../web/node_modules/@reach/utils/compose-refs/package.json') + require.resolve('../../../web/node_modules/@reach/utils/dev-utils/dist/reach-utils-dev-utils.cjs.dev.js') + require.resolve('../../../web/node_modules/@reach/utils/dev-utils/dist/reach-utils-dev-utils.cjs.js') + require.resolve('../../../web/node_modules/@reach/utils/dev-utils/dist/reach-utils-dev-utils.cjs.prod.js') + require.resolve('../../../web/node_modules/@reach/utils/dev-utils/package.json') + require.resolve('../../../web/node_modules/@reach/utils/noop/dist/reach-utils-noop.cjs.dev.js') + require.resolve('../../../web/node_modules/@reach/utils/noop/dist/reach-utils-noop.cjs.js') + require.resolve('../../../web/node_modules/@reach/utils/noop/dist/reach-utils-noop.cjs.prod.js') + require.resolve('../../../web/node_modules/@reach/utils/noop/package.json') + require.resolve('../../../web/node_modules/@reach/utils/owner-document/dist/reach-utils-owner-document.cjs.dev.js') + require.resolve('../../../web/node_modules/@reach/utils/owner-document/dist/reach-utils-owner-document.cjs.js') + require.resolve('../../../web/node_modules/@reach/utils/owner-document/dist/reach-utils-owner-document.cjs.prod.js') + require.resolve('../../../web/node_modules/@reach/utils/owner-document/package.json') + require.resolve('../../../web/node_modules/@reach/utils/type-check/dist/reach-utils-type-check.cjs.dev.js') + require.resolve('../../../web/node_modules/@reach/utils/type-check/dist/reach-utils-type-check.cjs.js') + require.resolve('../../../web/node_modules/@reach/utils/type-check/dist/reach-utils-type-check.cjs.prod.js') + require.resolve('../../../web/node_modules/@reach/utils/type-check/package.json') + require.resolve('../../../web/node_modules/@reach/utils/use-force-update/dist/reach-utils-use-force-update.cjs.dev.js') + require.resolve('../../../web/node_modules/@reach/utils/use-force-update/dist/reach-utils-use-force-update.cjs.js') + require.resolve('../../../web/node_modules/@reach/utils/use-force-update/dist/reach-utils-use-force-update.cjs.prod.js') + require.resolve('../../../web/node_modules/@reach/utils/use-force-update/package.json') + require.resolve('../../../web/node_modules/@reach/utils/use-isomorphic-layout-effect/dist/reach-utils-use-isomorphic-layout-effect.cjs.dev.js') + require.resolve('../../../web/node_modules/@reach/utils/use-isomorphic-layout-effect/dist/reach-utils-use-isomorphic-layout-effect.cjs.js') + require.resolve('../../../web/node_modules/@reach/utils/use-isomorphic-layout-effect/dist/reach-utils-use-isomorphic-layout-effect.cjs.prod.js') + require.resolve('../../../web/node_modules/@reach/utils/use-isomorphic-layout-effect/package.json') + require.resolve('../../../web/node_modules/@reach/visually-hidden/dist/reach-visually-hidden.cjs.dev.js') + require.resolve('../../../web/node_modules/@reach/visually-hidden/dist/reach-visually-hidden.cjs.js') + require.resolve('../../../web/node_modules/@reach/visually-hidden/dist/reach-visually-hidden.cjs.prod.js') + require.resolve('../../../web/node_modules/@reach/visually-hidden/package.json') + require.resolve('../../../web/package.json') } catch {} }" `; diff --git a/test/index.js b/test/index.js index 37ebeed60b..90d125f0f4 100644 --- a/test/index.js +++ b/test/index.js @@ -468,7 +468,7 @@ describe('onBuild()', () => { '.next/BUILD_ID', '.next/static/chunks/webpack-middleware*.js', '!.next/server/**/*.js.nft.json', - '.next/static/css/1152424140993be6.css', + '.next/static/css/116588518d3b66de.css', '.next/static/css/84099ae0bbc955fa.css', '!../../node_modules/next/dist/compiled/@ampproject/toolbox-optimizer/**/*', `!node_modules/next/dist/server/lib/squoosh/**/*.wasm`, From 47a07da0a7200fa18bf0a5b17bd3b203cc6cccef Mon Sep 17 00:00:00 2001 From: Matt Kane Date: Wed, 28 Sep 2022 15:11:11 +0100 Subject: [PATCH 013/172] chore: add initial app-dir tests --- cypress/config/canary.json | 2 +- cypress/integration/canary/appdir.spec.ts | 1325 +++++++++++++++++++++ cypress/integration/canary/images.spec.ts | 15 - demos/canary/netlify.toml | 5 +- package-lock.json | 62 +- package.json | 2 +- 6 files changed, 1354 insertions(+), 57 deletions(-) create mode 100644 cypress/integration/canary/appdir.spec.ts delete mode 100644 cypress/integration/canary/images.spec.ts diff --git a/cypress/config/canary.json b/cypress/config/canary.json index b19a833549..eab5ec06f5 100644 --- a/cypress/config/canary.json +++ b/cypress/config/canary.json @@ -1,5 +1,5 @@ { - "baseUrl": "http://localhost:3000", + "baseUrl": "http://localhost:8888", "integrationFolder": "cypress/integration/canary", "projectId": "5zbkdv" } diff --git a/cypress/integration/canary/appdir.spec.ts b/cypress/integration/canary/appdir.spec.ts new file mode 100644 index 0000000000..7a929678ce --- /dev/null +++ b/cypress/integration/canary/appdir.spec.ts @@ -0,0 +1,1325 @@ +describe('app dir', () => { + it('should use application/octet-stream for flight', () => { + cy.request({ + url: '/dashboard/deployments/123', + headers: { + __flight__: '1', + }, + }) + .its('headers.content-type') + .should('eq', 'application/octet-stream') + }) + + it('should use application/octet-stream for flight with edge runtime', () => { + cy.request({ + url: '/dashboard', + headers: { + __flight__: '1', + }, + }) + .its('headers.content-type') + .should('eq', 'application/octet-stream') + }) + + it('should pass props from getServerSideProps in root layout', () => { + cy.visit('/dashboard').its('title').should('eq', 'hello world') + }) + + it('should serve from pages', () => { + cy.visit('/').its('html').should('contain', 'hello from pages/index') + }) + + it('should serve dynamic route from pages', () => { + cy.visit('/blog/first').its('html').should('contain', 'hello from pages/blog/[slug]') + }) + + it('should serve from public', () => { + cy.request('/hello.txt').its('body').should('eq', 'hello world') + }) + + it('should serve from app', () => { + cy.visit('/dashboard').its('html').should('contain', 'hello from app/dashboard') + }) + + it('should serve /index as separate page', () => { + cy.visit('/dashboard/index') + .its('html') + .should('contain', 'hello from app/dashboard/index') + // should load chunks generated via async import correctly with React.lazy + .should('contain', 'hello from lazy') + // should support `dynamic` in both server and client components + .should('contain', 'hello from dynamic on server') + .should('contain', 'hello from dynamic on client') + }) + + // // TODO-APP: handle css modules fouc in dev + // it.skip('should handle css imports in next/dynamic correctly', async () => { + // const browser = await webdriver(next.url, '/dashboard/index') + + // expect( + // await browser.eval(`window.getComputedStyle(document.querySelector('#css-text-dynamic-server')).color`), + // ).toBe('rgb(0, 0, 255)') + // expect(await browser.eval(`window.getComputedStyle(document.querySelector('#css-text-lazy')).color`)).toBe( + // 'rgb(128, 0, 128)', + // ) + // }) + + // it('should include layouts when no direct parent layout', async () => { + // const html = await renderViaHTTP(next.url, '/dashboard/integrations') + // const $ = cheerio.load(html) + // // Should not be nested in dashboard + // expect($('h1').text()).toBe('Dashboard') + // // Should include the page text + // expect($('p').text()).toBe('hello from app/dashboard/integrations') + // }) + + // // TODO-APP: handle new root layout + // it.skip('should not include parent when not in parent directory with route in directory', async () => { + // const html = await renderViaHTTP(next.url, '/dashboard/hello') + // const $ = cheerio.load(html) + + // // new root has to provide it's own custom root layout or the default + // // is used instead + // expect(html).toContain(' { + // const html = await renderViaHTTP(next.url, '/dashboard/another') + // const $ = cheerio.load(html) + + // // new root has to provide it's own custom root layout or the default + // // is used instead + // expect($('html').hasClass('this-is-another-document-html')).toBeTruthy() + // expect($('body').hasClass('this-is-another-document-body')).toBeTruthy() + + // // Should not be nested in dashboard + // expect($('h1').text()).toBeFalsy() + + // // Should render the page text + // expect($('p').text()).toBe('hello from newroot/dashboard/another') + // }) + + // it('should not create new root layout when nested (optional)', async () => { + // const html = await renderViaHTTP(next.url, '/dashboard/deployments/breakdown') + // const $ = cheerio.load(html) + + // // new root has to provide it's own custom root layout or the default + // // is used instead + // expect($('html').hasClass('this-is-the-document-html')).toBeTruthy() + // expect($('body').hasClass('this-is-the-document-body')).toBeTruthy() + + // // Should be nested in dashboard + // expect($('h1').text()).toBe('Dashboard') + // expect($('h2').text()).toBe('Custom dashboard') + + // // Should render the page text + // expect($('p').text()).toBe('hello from app/dashboard/(custom)/deployments/breakdown') + // }) + + // it('should include parent document when no direct parent layout', async () => { + // const html = await renderViaHTTP(next.url, '/dashboard/integrations') + // const $ = cheerio.load(html) + + // expect($('html').hasClass('this-is-the-document-html')).toBeTruthy() + // expect($('body').hasClass('this-is-the-document-body')).toBeTruthy() + // }) + + // it('should not include parent when not in parent directory', async () => { + // const html = await renderViaHTTP(next.url, '/dashboard/changelog') + // const $ = cheerio.load(html) + // // Should not be nested in dashboard + // expect($('h1').text()).toBeFalsy() + // // Should include the page text + // expect($('p').text()).toBe('hello from app/dashboard/changelog') + // }) + + // it('should serve nested parent', async () => { + // const html = await renderViaHTTP(next.url, '/dashboard/deployments/123') + // const $ = cheerio.load(html) + // // Should be nested in dashboard + // expect($('h1').text()).toBe('Dashboard') + // // Should be nested in deployments + // expect($('h2').text()).toBe('Deployments hello') + // }) + + // it('should serve dynamic parameter', async () => { + // const html = await renderViaHTTP(next.url, '/dashboard/deployments/123') + // const $ = cheerio.load(html) + // // Should include the page text with the parameter + // expect($('p').text()).toBe('hello from app/dashboard/deployments/[id]. ID is: 123') + // }) + + // it('should include document html and body', async () => { + // const html = await renderViaHTTP(next.url, '/dashboard') + // const $ = cheerio.load(html) + + // expect($('html').hasClass('this-is-the-document-html')).toBeTruthy() + // expect($('body').hasClass('this-is-the-document-body')).toBeTruthy() + // }) + + // it('should not serve when layout is provided but no folder index', async () => { + // const res = await fetchViaHTTP(next.url, '/dashboard/deployments') + // expect(res.status).toBe(404) + // expect(await res.text()).toContain('This page could not be found') + // }) + + // // TODO-APP: do we want to make this only work for /root or is it allowed + // // to work for /pages as well? + // it.skip('should match partial parameters', async () => { + // const html = await renderViaHTTP(next.url, '/partial-match-123') + // expect(html).toContain('hello from app/partial-match-[id]. ID is: 123') + // }) + + // describe('rewrites', () => { + // // TODO-APP: + // it.skip('should support rewrites on initial load', async () => { + // const browser = await webdriver(next.url, '/rewritten-to-dashboard') + // expect(await browser.elementByCss('h1').text()).toBe('Dashboard') + // expect(await browser.url()).toBe(`${next.url}/rewritten-to-dashboard`) + // }) + + // it('should support rewrites on client-side navigation', async () => { + // const browser = await webdriver(next.url, '/rewrites') + + // try { + // // Click the link. + // await browser.elementById('link').click() + // await browser.waitForElementByCss('#from-dashboard') + + // // Check to see that we were rewritten and not redirected. + // expect(await browser.url()).toBe(`${next.url}/rewritten-to-dashboard`) + + // // Check to see that the page we navigated to is in fact the dashboard. + // expect(await browser.elementByCss('#from-dashboard').text()).toBe('hello from app/dashboard') + // } finally { + // await browser.close() + // } + // }) + // }) + + // // TODO-APP: Enable in development + // ;(isDev ? it.skip : it)( + // 'should not rerender layout when navigating between routes in the same layout', + // async () => { + // const browser = await webdriver(next.url, '/same-layout/first') + + // try { + // // Get the render id from the dom and click the first link. + // const firstRenderID = await browser.elementById('render-id').text() + // await browser.elementById('link').click() + // await browser.waitForElementByCss('#second-page') + + // // Get the render id from the dom again, it should be the same! + // const secondRenderID = await browser.elementById('render-id').text() + // expect(secondRenderID).toBe(firstRenderID) + + // // Navigate back to the first page again by clicking the link. + // await browser.elementById('link').click() + // await browser.waitForElementByCss('#first-page') + + // // Get the render id from the dom again, it should be the same! + // const thirdRenderID = await browser.elementById('render-id').text() + // expect(thirdRenderID).toBe(firstRenderID) + // } finally { + // await browser.close() + // } + // }, + // ) + + // it('should handle hash in initial url', async () => { + // const browser = await webdriver(next.url, '/dashboard#abc') + + // try { + // // Check if hash is preserved + // expect(await browser.eval('window.location.hash')).toBe('#abc') + // await waitFor(1000) + // // Check again to be sure as it might be timed different + // expect(await browser.eval('window.location.hash')).toBe('#abc') + // } finally { + // await browser.close() + // } + // }) + + // describe('parallel routes', () => { + // it('should match parallel routes', async () => { + // const html = await renderViaHTTP(next.url, '/parallel/nested') + // expect(html).toContain('parallel/layout') + // expect(html).toContain('parallel/@foo/nested/layout') + // expect(html).toContain('parallel/@foo/nested/@a/page') + // expect(html).toContain('parallel/@foo/nested/@b/page') + // expect(html).toContain('parallel/@bar/nested/layout') + // expect(html).toContain('parallel/@bar/nested/@a/page') + // expect(html).toContain('parallel/@bar/nested/@b/page') + // expect(html).toContain('parallel/nested/page') + // }) + + // it('should match parallel routes in route groups', async () => { + // const html = await renderViaHTTP(next.url, '/parallel/nested-2') + // expect(html).toContain('parallel/layout') + // expect(html).toContain('parallel/(new)/layout') + // expect(html).toContain('parallel/(new)/@baz/nested/page') + // }) + // }) + + // describe('', () => { + // it('should hard push', async () => { + // const browser = await webdriver(next.url, '/link-hard-push/123') + + // try { + // // Click the link on the page, and verify that the history entry was + // // added. + // expect(await browser.eval('window.history.length')).toBe(2) + // await browser.elementById('link').click() + // await browser.waitForElementByCss('#render-id-456') + // expect(await browser.eval('window.history.length')).toBe(3) + + // // Get the id on the rendered page. + // const firstID = await browser.elementById('render-id-456').text() + + // // Go back, and redo the navigation by clicking the link. + // await browser.back() + // await browser.elementById('link').click() + // await browser.waitForElementByCss('#render-id-456') + + // // Get the id again, and compare, they should not be the same. + // const secondID = await browser.elementById('render-id-456').text() + // expect(secondID).not.toBe(firstID) + // } finally { + // await browser.close() + // } + // }) + + // it('should hard replace', async () => { + // const browser = await webdriver(next.url, '/link-hard-replace/123') + + // try { + // // Click the link on the page, and verify that the history entry was NOT + // // added. + // expect(await browser.eval('window.history.length')).toBe(2) + // await browser.elementById('link').click() + // await browser.waitForElementByCss('#render-id-456') + // expect(await browser.eval('window.history.length')).toBe(2) + + // // Get the date again, and compare, they should not be the same. + // const firstId = await browser.elementById('render-id-456').text() + + // // Navigate to the subpage, verify that the history entry was NOT added. + // await browser.elementById('link').click() + // await browser.waitForElementByCss('#render-id-123') + // expect(await browser.eval('window.history.length')).toBe(2) + + // // Navigate back again, verify that the history entry was NOT added. + // await browser.elementById('link').click() + // await browser.waitForElementByCss('#render-id-456') + // expect(await browser.eval('window.history.length')).toBe(2) + + // // Get the date again, and compare, they should not be the same. + // const secondId = await browser.elementById('render-id-456').text() + // expect(firstId).not.toBe(secondId) + // } finally { + // await browser.close() + // } + // }) + + // it('should soft push', async () => { + // const browser = await webdriver(next.url, '/link-soft-push') + + // try { + // // Click the link on the page, and verify that the history entry was + // // added. + // expect(await browser.eval('window.history.length')).toBe(2) + // await browser.elementById('link').click() + // await browser.waitForElementByCss('#render-id') + // expect(await browser.eval('window.history.length')).toBe(3) + + // // Get the id on the rendered page. + // const firstID = await browser.elementById('render-id').text() + + // // Go back, and redo the navigation by clicking the link. + // await browser.back() + // await browser.elementById('link').click() + + // // Get the date again, and compare, they should be the same. + // const secondID = await browser.elementById('render-id').text() + // expect(firstID).toBe(secondID) + // } finally { + // await browser.close() + // } + // }) + + // // TODO-APP: investigate this test + // it.skip('should soft replace', async () => { + // const browser = await webdriver(next.url, '/link-soft-replace') + + // try { + // // Get the render ID so we can compare it. + // const firstID = await browser.elementById('render-id').text() + + // // Click the link on the page, and verify that the history entry was NOT + // // added. + // expect(await browser.eval('window.history.length')).toBe(2) + // await browser.elementById('self-link').click() + // await browser.waitForElementByCss('#render-id') + // expect(await browser.eval('window.history.length')).toBe(2) + + // // Get the id on the rendered page. + // const secondID = await browser.elementById('render-id').text() + // expect(secondID).toBe(firstID) + + // // Navigate to the subpage, verify that the history entry was NOT added. + // await browser.elementById('subpage-link').click() + // await browser.waitForElementByCss('#back-link') + // expect(await browser.eval('window.history.length')).toBe(2) + + // // Navigate back again, verify that the history entry was NOT added. + // await browser.elementById('back-link').click() + // await browser.waitForElementByCss('#render-id') + // expect(await browser.eval('window.history.length')).toBe(2) + + // // Get the date again, and compare, they should be the same. + // const thirdID = await browser.elementById('render-id').text() + // expect(thirdID).toBe(firstID) + // } finally { + // await browser.close() + // } + // }) + + // it('should be soft for back navigation', async () => { + // const browser = await webdriver(next.url, '/with-id') + + // try { + // // Get the id on the rendered page. + // const firstID = await browser.elementById('render-id').text() + + // // Click the link, and go back. + // await browser.elementById('link').click() + // await browser.waitForElementByCss('#from-navigation') + // await browser.back() + + // // Get the date again, and compare, they should be the same. + // const secondID = await browser.elementById('render-id').text() + // expect(firstID).toBe(secondID) + // } finally { + // await browser.close() + // } + // }) + + // it('should be soft for forward navigation', async () => { + // const browser = await webdriver(next.url, '/with-id') + + // try { + // // Click the link. + // await browser.elementById('link').click() + // await browser.waitForElementByCss('#from-navigation') + + // // Get the id on the rendered page. + // const firstID = await browser.elementById('render-id').text() + + // // Go back, then forward. + // await browser.back() + // await browser.forward() + + // // Get the date again, and compare, they should be the same. + // const secondID = await browser.elementById('render-id').text() + // expect(firstID).toBe(secondID) + // } finally { + // await browser.close() + // } + // }) + + // // TODO-APP: should enable when implemented + // it.skip('should allow linking from app page to pages page', async () => { + // const browser = await webdriver(next.url, '/pages-linking') + + // try { + // // Click the link. + // await browser.elementById('app-link').click() + // await browser.waitForElementByCss('#pages-link') + + // // Click the other link. + // await browser.elementById('pages-link').click() + // await browser.waitForElementByCss('#app-link') + // } finally { + // await browser.close() + // } + // }) + // }) + + // describe('server components', () => { + // // TODO-APP: why is this not servable but /dashboard+rootonly/hello.server.js + // // should be? Seems like they both either should be servable or not + // it('should not serve .server.js as a path', async () => { + // // Without .server.js should serve + // const html = await renderViaHTTP(next.url, '/should-not-serve-server') + // expect(html).toContain('hello from app/should-not-serve-server') + + // // Should not serve `.server` + // const res = await fetchViaHTTP(next.url, '/should-not-serve-server.server') + // expect(res.status).toBe(404) + // expect(await res.text()).toContain('This page could not be found') + + // // Should not serve `.server.js` + // const res2 = await fetchViaHTTP(next.url, '/should-not-serve-server.server.js') + // expect(res2.status).toBe(404) + // expect(await res2.text()).toContain('This page could not be found') + // }) + + // it('should not serve .client.js as a path', async () => { + // // Without .client.js should serve + // const html = await renderViaHTTP(next.url, '/should-not-serve-client') + // expect(html).toContain('hello from app/should-not-serve-client') + + // // Should not serve `.client` + // const res = await fetchViaHTTP(next.url, '/should-not-serve-client.client') + // expect(res.status).toBe(404) + // expect(await res.text()).toContain('This page could not be found') + + // // Should not serve `.client.js` + // const res2 = await fetchViaHTTP(next.url, '/should-not-serve-client.client.js') + // expect(res2.status).toBe(404) + // expect(await res2.text()).toContain('This page could not be found') + // }) + + // it('should serve shared component', async () => { + // // Without .client.js should serve + // const html = await renderViaHTTP(next.url, '/shared-component-route') + // expect(html).toContain('hello from app/shared-component-route') + // }) + + // describe('dynamic routes', () => { + // it('should only pass params that apply to the layout', async () => { + // const html = await renderViaHTTP(next.url, '/dynamic/books/hello-world') + // const $ = cheerio.load(html) + + // expect($('#dynamic-layout-params').text()).toBe('{}') + // expect($('#category-layout-params').text()).toBe('{"category":"books"}') + // expect($('#id-layout-params').text()).toBe('{"category":"books","id":"hello-world"}') + // expect($('#id-page-params').text()).toBe('{"category":"books","id":"hello-world"}') + // }) + // }) + + // describe('catch-all routes', () => { + // it('should handle optional segments', async () => { + // const params = ['this', 'is', 'a', 'test'] + // const route = params.join('/') + // const html = await renderViaHTTP(next.url, `/optional-catch-all/${route}`) + // const $ = cheerio.load(html) + // expect($('#text').attr('data-params')).toBe(route) + // }) + + // it('should handle optional segments root', async () => { + // const html = await renderViaHTTP(next.url, `/optional-catch-all`) + // const $ = cheerio.load(html) + // expect($('#text').attr('data-params')).toBe('') + // }) + + // it('should handle required segments', async () => { + // const params = ['this', 'is', 'a', 'test'] + // const route = params.join('/') + // const html = await renderViaHTTP(next.url, `/catch-all/${route}`) + // const $ = cheerio.load(html) + // expect($('#text').attr('data-params')).toBe(route) + + // // Components under catch-all should not be treated as route that errors during build. + // // They should be rendered properly when imported in page route. + // expect($('#widget').text()).toBe('widget') + // }) + + // it('should handle required segments root as not found', async () => { + // const res = await fetchViaHTTP(next.url, `/catch-all`) + // expect(res.status).toBe(404) + // expect(await res.text()).toContain('This page could not be found') + // }) + // }) + + // describe('should serve client component', () => { + // it('should serve server-side', async () => { + // const html = await renderViaHTTP(next.url, '/client-component-route') + // const $ = cheerio.load(html) + // expect($('p').text()).toBe('hello from app/client-component-route. count: 0') + // }) + + // // TODO-APP: investigate hydration not kicking in on some runs + // it('should serve client-side', async () => { + // const browser = await webdriver(next.url, '/client-component-route') + + // // After hydration count should be 1 + // expect(await browser.elementByCss('p').text()).toBe('hello from app/client-component-route. count: 1') + // }) + // }) + + // describe('should include client component layout with server component route', () => { + // it('should include it server-side', async () => { + // const html = await renderViaHTTP(next.url, '/client-nested') + // const $ = cheerio.load(html) + // // Should not be nested in dashboard + // expect($('h1').text()).toBe('Client Nested. Count: 0') + // // Should include the page text + // expect($('p').text()).toBe('hello from app/client-nested') + // }) + + // it('should include it client-side', async () => { + // const browser = await webdriver(next.url, '/client-nested') + + // // After hydration count should be 1 + // expect(await browser.elementByCss('h1').text()).toBe('Client Nested. Count: 1') + + // // After hydration count should be 1 + // expect(await browser.elementByCss('p').text()).toBe('hello from app/client-nested') + // }) + // }) + + // describe('Loading', () => { + // it('should render loading.js in initial html for slow page', async () => { + // const html = await renderViaHTTP(next.url, '/slow-page-with-loading') + // const $ = cheerio.load(html) + + // expect($('#loading').text()).toBe('Loading...') + // }) + + // it('should render loading.js in browser for slow page', async () => { + // const browser = await webdriver(next.url, '/slow-page-with-loading', { + // waitHydration: false, + // }) + // // TODO-APP: `await webdriver()` causes waiting for the full page to complete streaming. At that point "Loading..." is replaced by the actual content + // // expect(await browser.elementByCss('#loading').text()).toBe('Loading...') + + // expect(await browser.elementByCss('#slow-page-message').text()).toBe('hello from slow page') + // }) + + // it('should render loading.js in initial html for slow layout', async () => { + // const html = await renderViaHTTP(next.url, '/slow-layout-with-loading/slow') + // const $ = cheerio.load(html) + + // expect($('#loading').text()).toBe('Loading...') + // }) + + // it('should render loading.js in browser for slow layout', async () => { + // const browser = await webdriver(next.url, '/slow-layout-with-loading/slow', { + // waitHydration: false, + // }) + // // TODO-APP: `await webdriver()` causes waiting for the full page to complete streaming. At that point "Loading..." is replaced by the actual content + // // expect(await browser.elementByCss('#loading').text()).toBe('Loading...') + + // expect(await browser.elementByCss('#slow-layout-message').text()).toBe('hello from slow layout') + + // expect(await browser.elementByCss('#page-message').text()).toBe('Hello World') + // }) + + // it('should render loading.js in initial html for slow layout and page', async () => { + // const html = await renderViaHTTP(next.url, '/slow-layout-and-page-with-loading/slow') + // const $ = cheerio.load(html) + + // expect($('#loading-layout').text()).toBe('Loading layout...') + // expect($('#loading-page').text()).toBe('Loading page...') + // }) + + // it('should render loading.js in browser for slow layout and page', async () => { + // const browser = await webdriver(next.url, '/slow-layout-and-page-with-loading/slow', { + // waitHydration: false, + // }) + // // TODO-APP: `await webdriver()` causes waiting for the full page to complete streaming. At that point "Loading..." is replaced by the actual content + // // expect(await browser.elementByCss('#loading-layout').text()).toBe('Loading...') + // // expect(await browser.elementByCss('#loading-page').text()).toBe('Loading...') + + // expect(await browser.elementByCss('#slow-layout-message').text()).toBe('hello from slow layout') + + // expect(await browser.elementByCss('#slow-page-message').text()).toBe('hello from slow page') + // }) + // }) + + // describe('middleware', () => { + // it.each(['rewrite', 'redirect'])( + // `should strip internal query parameters from requests to middleware for %s`, + // async (method) => { + // const browser = await webdriver(next.url, '/internal') + + // try { + // // Wait for and click the navigation element, this should trigger + // // the flight request that'll be caught by the middleware. If the + // // middleware sees any flight data on the request it'll redirect to + // // a page with an element of #failure, otherwise, we'll see the + // // element for #success. + // await browser.waitForElementByCss(`#navigate-${method}`).elementById(`navigate-${method}`).click() + // expect(await browser.waitForElementByCss('#success', 3000).text()).toBe('Success') + // } finally { + // await browser.close() + // } + // }, + // ) + // }) + + // describe('next/router', () => { + // // `useRouter` should not be accessible in server components. + // it.skip('should always return null when accessed from /app', async () => { + // const browser = await webdriver(next.url, '/old-router') + + // try { + // await browser.waitForElementByCss('#old-router') + + // const notNull = await browser.elementsByCss('.was-not-null') + // expect(notNull.length).toBe(0) + + // const wasNull = await browser.elementsByCss('.was-null') + // expect(wasNull.length).toBe(6) + // } finally { + // await browser.close() + // } + // }) + // }) + + // describe('hooks', () => { + // describe('cookies function', () => { + // it('should retrieve cookies in a server component', async () => { + // const browser = await webdriver(next.url, '/hooks/use-cookies') + + // try { + // await browser.waitForElementByCss('#does-not-have-cookie') + // browser.addCookie({ name: 'use-cookies', value: 'value' }) + // browser.refresh() + + // await browser.waitForElementByCss('#has-cookie') + // browser.deleteCookies() + // browser.refresh() + + // await browser.waitForElementByCss('#does-not-have-cookie') + // } finally { + // await browser.close() + // } + // }) + + // it('should access cookies on navigation', async () => { + // const browser = await webdriver(next.url, '/navigation') + + // try { + // // Click the cookies link to verify it can't see the cookie that's + // // not there. + // await browser.elementById('use-cookies').click() + // await browser.waitForElementByCss('#does-not-have-cookie') + + // // Go back and add the cookies. + // await browser.back() + // await browser.waitForElementByCss('#from-navigation') + // browser.addCookie({ name: 'use-cookies', value: 'value' }) + + // // Click the cookies link again to see that the cookie can be picked + // // up again. + // await browser.elementById('use-cookies').click() + // await browser.waitForElementByCss('#has-cookie') + + // // Go back and remove the cookies. + // await browser.back() + // await browser.waitForElementByCss('#from-navigation') + // browser.deleteCookies() + + // // Verify for the last time that after clicking the cookie link + // // again, there are no cookies. + // await browser.elementById('use-cookies').click() + // await browser.waitForElementByCss('#does-not-have-cookie') + // } finally { + // await browser.close() + // } + // }) + // }) + + // describe('headers function', () => { + // it('should have access to incoming headers in a server component', async () => { + // // Check to see that we can't see the header when it's not present. + // let html = await renderViaHTTP(next.url, '/hooks/use-headers', {}, { headers: {} }) + // let $ = cheerio.load(html) + // expect($('#does-not-have-header').length).toBe(1) + // expect($('#has-header').length).toBe(0) + + // // Check to see that we can see the header when it's present. + // html = await renderViaHTTP(next.url, '/hooks/use-headers', {}, { headers: { 'x-use-headers': 'value' } }) + // $ = cheerio.load(html) + // expect($('#has-header').length).toBe(1) + // expect($('#does-not-have-header').length).toBe(0) + // }) + + // it('should access headers on navigation', async () => { + // const browser = await webdriver(next.url, '/navigation') + + // try { + // await browser.elementById('use-headers').click() + // await browser.waitForElementByCss('#has-referer') + // } finally { + // await browser.close() + // } + // }) + // }) + + // describe('previewData function', () => { + // it('should return no preview data when there is none', async () => { + // const browser = await webdriver(next.url, '/hooks/use-preview-data') + + // try { + // await browser.waitForElementByCss('#does-not-have-preview-data') + // } finally { + // await browser.close() + // } + // }) + + // it('should return preview data when there is some', async () => { + // const browser = await webdriver(next.url, '/api/preview') + + // try { + // await browser.loadPage(`${next.url}/hooks/use-preview-data`, { + // disableCache: false, + // beforePageLoad: null, + // }) + // await browser.waitForElementByCss('#has-preview-data') + // } finally { + // await browser.close() + // } + // }) + // }) + + // describe('useRouter', () => { + // // TODO-APP: should enable when implemented + // it.skip('should throw an error when imported', async () => { + // const res = await fetchViaHTTP(next.url, '/hooks/use-router/server') + // expect(res.status).toBe(500) + // expect(await res.text()).toContain('Internal Server Error') + // }) + // }) + + // describe('useParams', () => { + // // TODO-APP: should enable when implemented + // it.skip('should throw an error when imported', async () => { + // const res = await fetchViaHTTP(next.url, '/hooks/use-params/server') + // expect(res.status).toBe(500) + // expect(await res.text()).toContain('Internal Server Error') + // }) + // }) + + // describe('useSearchParams', () => { + // // TODO-APP: should enable when implemented + // it.skip('should throw an error when imported', async () => { + // const res = await fetchViaHTTP(next.url, '/hooks/use-search-params/server') + // expect(res.status).toBe(500) + // expect(await res.text()).toContain('Internal Server Error') + // }) + // }) + + // describe('usePathname', () => { + // // TODO-APP: should enable when implemented + // it.skip('should throw an error when imported', async () => { + // const res = await fetchViaHTTP(next.url, '/hooks/use-pathname/server') + // expect(res.status).toBe(500) + // expect(await res.text()).toContain('Internal Server Error') + // }) + // }) + + // describe('useLayoutSegments', () => { + // // TODO-APP: should enable when implemented + // it.skip('should throw an error when imported', async () => { + // const res = await fetchViaHTTP(next.url, '/hooks/use-layout-segments/server') + // expect(res.status).toBe(500) + // expect(await res.text()).toContain('Internal Server Error') + // }) + // }) + + // describe('useSelectedLayoutSegment', () => { + // // TODO-APP: should enable when implemented + // it.skip('should throw an error when imported', async () => { + // const res = await fetchViaHTTP(next.url, '/hooks/use-selected-layout-segment/server') + // expect(res.status).toBe(500) + // expect(await res.text()).toContain('Internal Server Error') + // }) + // }) + // }) + // }) + + // describe('client components', () => { + // describe('hooks', () => { + // describe('cookies function', () => { + // // TODO-APP: should enable when implemented + // it.skip('should throw an error when imported', async () => { + // const res = await fetchViaHTTP(next.url, '/hooks/use-cookies/client') + // expect(res.status).toBe(500) + // expect(await res.text()).toContain('Internal Server Error') + // }) + // }) + + // describe('previewData function', () => { + // // TODO-APP: should enable when implemented + // it.skip('should throw an error when imported', async () => { + // const res = await fetchViaHTTP(next.url, '/hooks/use-preview-data/client') + // expect(res.status).toBe(500) + // expect(await res.text()).toContain('Internal Server Error') + // }) + // }) + + // describe('headers function', () => { + // // TODO-APP: should enable when implemented + // it.skip('should throw an error when imported', async () => { + // const res = await fetchViaHTTP(next.url, '/hooks/use-headers/client') + // expect(res.status).toBe(500) + // expect(await res.text()).toContain('Internal Server Error') + // }) + // }) + + // describe('usePathname', () => { + // it('should have the correct pathname', async () => { + // const html = await renderViaHTTP(next.url, '/hooks/use-pathname') + // const $ = cheerio.load(html) + // expect($('#pathname').attr('data-pathname')).toBe('/hooks/use-pathname') + // }) + // }) + + // describe('useSearchParams', () => { + // it('should have the correct search params', async () => { + // const html = await renderViaHTTP( + // next.url, + // '/hooks/use-search-params?first=value&second=other%20value&third', + // ) + // const $ = cheerio.load(html) + // const el = $('#params') + // expect(el.attr('data-param-first')).toBe('value') + // expect(el.attr('data-param-second')).toBe('other value') + // expect(el.attr('data-param-third')).toBe('') + // expect(el.attr('data-param-not-real')).toBe('N/A') + // }) + // }) + + // describe('useRouter', () => { + // it('should allow access to the router', async () => { + // const browser = await webdriver(next.url, '/hooks/use-router') + + // try { + // // Wait for the page to load, click the button (which uses a method + // // on the router) and then wait for the correct page to load. + // await browser.waitForElementByCss('#router') + // await browser.elementById('button-push').click() + // await browser.waitForElementByCss('#router-sub-page') + + // // Go back (confirming we did do a hard push), and wait for the + // // correct previous page. + // await browser.back() + // await browser.waitForElementByCss('#router') + // } finally { + // await browser.close() + // } + // }) + + // it('should have consistent query and params handling', async () => { + // const html = await renderViaHTTP(next.url, '/param-and-query/params?slug=query') + // const $ = cheerio.load(html) + // const el = $('#params-and-query') + // expect(el.attr('data-params')).toBe('params') + // expect(el.attr('data-query')).toBe('query') + // }) + // }) + // }) + + // if (isDev) { + // it('should throw an error when getServerSideProps is used', async () => { + // const pageFile = 'app/client-with-errors/get-server-side-props/page.js' + // const content = await next.readFile(pageFile) + // const uncomment = content.replace( + // '// export function getServerSideProps', + // 'export function getServerSideProps', + // ) + // await next.patchFile(pageFile, uncomment) + // const res = await fetchViaHTTP(next.url, '/client-with-errors/get-server-side-props') + // await next.patchFile(pageFile, content) + + // await check(async () => { + // const { status } = await fetchViaHTTP(next.url, '/client-with-errors/get-server-side-props') + // return status + // }, /200/) + + // expect(res.status).toBe(500) + // expect(await res.text()).toContain('`getServerSideProps` is not allowed in Client Components') + // }) + + // it('should throw an error when getStaticProps is used', async () => { + // const pageFile = 'app/client-with-errors/get-static-props/page.js' + // const content = await next.readFile(pageFile) + // const uncomment = content.replace('// export function getStaticProps', 'export function getStaticProps') + // await next.patchFile(pageFile, uncomment) + // const res = await fetchViaHTTP(next.url, '/client-with-errors/get-static-props') + // await next.patchFile(pageFile, content) + // await check(async () => { + // const { status } = await fetchViaHTTP(next.url, '/client-with-errors/get-static-props') + // return status + // }, /200/) + + // expect(res.status).toBe(500) + // expect(await res.text()).toContain('`getStaticProps` is not allowed in Client Components') + // }) + // } + // }) + + // describe('css support', () => { + // describe('server layouts', () => { + // it('should support global css inside server layouts', async () => { + // const browser = await webdriver(next.url, '/dashboard') + + // // Should body text in red + // expect(await browser.eval(`window.getComputedStyle(document.querySelector('.p')).color`)).toBe( + // 'rgb(255, 0, 0)', + // ) + + // // Should inject global css for .green selectors + // expect(await browser.eval(`window.getComputedStyle(document.querySelector('.green')).color`)).toBe( + // 'rgb(0, 128, 0)', + // ) + // }) + + // it('should support css modules inside server layouts', async () => { + // const browser = await webdriver(next.url, '/css/css-nested') + // expect(await browser.eval(`window.getComputedStyle(document.querySelector('#server-cssm')).color`)).toBe( + // 'rgb(0, 128, 0)', + // ) + // }) + // }) + + // describe('server pages', () => { + // it('should support global css inside server pages', async () => { + // const browser = await webdriver(next.url, '/css/css-page') + // expect(await browser.eval(`window.getComputedStyle(document.querySelector('h1')).color`)).toBe( + // 'rgb(255, 0, 0)', + // ) + // }) + + // it('should support css modules inside server pages', async () => { + // const browser = await webdriver(next.url, '/css/css-page') + // expect(await browser.eval(`window.getComputedStyle(document.querySelector('#cssm')).color`)).toBe( + // 'rgb(0, 0, 255)', + // ) + // }) + // }) + + // describe('client layouts', () => { + // it('should support css modules inside client layouts', async () => { + // const browser = await webdriver(next.url, '/client-nested') + + // // Should render h1 in red + // expect(await browser.eval(`window.getComputedStyle(document.querySelector('h1')).color`)).toBe( + // 'rgb(255, 0, 0)', + // ) + // }) + + // it('should support global css inside client layouts', async () => { + // const browser = await webdriver(next.url, '/client-nested') + + // // Should render button in red + // expect(await browser.eval(`window.getComputedStyle(document.querySelector('button')).color`)).toBe( + // 'rgb(255, 0, 0)', + // ) + // }) + // }) + + // describe('client pages', () => { + // it('should support css modules inside client pages', async () => { + // const browser = await webdriver(next.url, '/client-component-route') + + // // Should render p in red + // expect(await browser.eval(`window.getComputedStyle(document.querySelector('p')).color`)).toBe( + // 'rgb(255, 0, 0)', + // ) + // }) + + // it('should support global css inside client pages', async () => { + // const browser = await webdriver(next.url, '/client-component-route') + + // // Should render `b` in blue + // expect(await browser.eval(`window.getComputedStyle(document.querySelector('b')).color`)).toBe( + // 'rgb(0, 0, 255)', + // ) + // }) + // }) + // }) + // ;(isDev ? describe.skip : describe)('Subresource Integrity', () => { + // function fetchWithPolicy(policy: string | null) { + // return fetchViaHTTP(next.url, '/dashboard', undefined, { + // headers: policy + // ? { + // 'Content-Security-Policy': policy, + // } + // : {}, + // }) + // } + + // async function renderWithPolicy(policy: string | null) { + // const res = await fetchWithPolicy(policy) + + // expect(res.ok).toBe(true) + + // const html = await res.text() + + // return cheerio.load(html) + // } + + // it('does not include nonce when not enabled', async () => { + // const policies = [ + // `script-src 'nonce-'`, // invalid nonce + // 'style-src "nonce-cmFuZG9tCg=="', // no script or default src + // '', // empty string + // ] + + // for (const policy of policies) { + // const $ = await renderWithPolicy(policy) + + // // Find all the script tags without src attributes and with nonce + // // attributes. + // const elements = $('script[nonce]:not([src])') + + // // Expect there to be none. + // expect(elements.length).toBe(0) + // } + // }) + + // it('includes a nonce value with inline scripts when Content-Security-Policy header is defined', async () => { + // // A random nonce value, base64 encoded. + // const nonce = 'cmFuZG9tCg==' + + // // Validate all the cases where we could parse the nonce. + // const policies = [ + // `script-src 'nonce-${nonce}'`, // base case + // ` script-src 'nonce-${nonce}' `, // extra space added around sources and directive + // `style-src 'self'; script-src 'nonce-${nonce}'`, // extra directives + // `script-src 'self' 'nonce-${nonce}' 'nonce-othernonce'`, // extra nonces + // `default-src 'nonce-othernonce'; script-src 'nonce-${nonce}';`, // script and then fallback case + // `default-src 'nonce-${nonce}'`, // fallback case + // ] + + // for (const policy of policies) { + // const $ = await renderWithPolicy(policy) + + // // Find all the script tags without src attributes. + // const elements = $('script:not([src])') + + // // Expect there to be at least 1 script tag without a src attribute. + // expect(elements.length).toBeGreaterThan(0) + + // // Expect all inline scripts to have the nonce value. + // elements.each((i, el) => { + // expect(el.attribs.nonce).toBe(nonce) + // }) + // } + // }) + + // it('includes an integrity attribute on scripts', async () => { + // const html = await renderViaHTTP(next.url, '/dashboard') + + // const $ = cheerio.load(html) + + // // Find all the script tags with src attributes. + // const elements = $('script[src]') + + // // Expect there to be at least 1 script tag with a src attribute. + // expect(elements.length).toBeGreaterThan(0) + + // // Collect all the scripts with integrity hashes so we can verify them. + // const files: [string, string][] = [] + + // // For each of these attributes, ensure that there's an integrity + // // attribute and starts with the correct integrity hash prefix. + // elements.each((i, el) => { + // const { integrity } = el.attribs + // expect(integrity).toBeDefined() + // expect(integrity).toStartWith('sha256-') + + // const { src } = el.attribs + // expect(src).toBeDefined() + + // files.push([src, integrity]) + // }) + + // // For each script tag, ensure that the integrity attribute is the + // // correct hash of the script tag. + // for (const [src, integrity] of files) { + // const res = await fetchViaHTTP(next.url, src) + // expect(res.status).toBe(200) + // const content = await res.text() + + // const hash = crypto.createHash('sha256').update(content).digest().toString('base64') + + // expect(integrity).toEndWith(hash) + // } + // }) + + // it('throws when escape characters are included in nonce', async () => { + // const res = await fetchWithPolicy(`script-src 'nonce-">"'`) + + // expect(res.status).toBe(500) + // }) + // }) + + // describe('template component', () => { + // it('should render the template that holds state in a client component and reset on navigation', async () => { + // const browser = await webdriver(next.url, '/template/clientcomponent') + // expect(await browser.elementByCss('h1').text()).toBe('Template 0') + // await browser.elementByCss('button').click() + // expect(await browser.elementByCss('h1').text()).toBe('Template 1') + + // await browser.elementByCss('#link').click() + // await browser.waitForElementByCss('#other-page') + + // expect(await browser.elementByCss('h1').text()).toBe('Template 0') + // await browser.elementByCss('button').click() + // expect(await browser.elementByCss('h1').text()).toBe('Template 1') + + // await browser.elementByCss('#link').click() + // await browser.waitForElementByCss('#page') + + // expect(await browser.elementByCss('h1').text()).toBe('Template 0') + // }) + + // // TODO-APP: disable failing test and investigate later + // it.skip('should render the template that is a server component and rerender on navigation', async () => { + // const browser = await webdriver(next.url, '/template/servercomponent') + // expect(await browser.elementByCss('h1').text()).toStartWith('Template') + + // const currentTime = await browser.elementByCss('#performance-now').text() + + // await browser.elementByCss('#link').click() + // await browser.waitForElementByCss('#other-page') + + // expect(await browser.elementByCss('h1').text()).toStartWith('Template') + + // // template should rerender on navigation even when it's a server component + // expect(await browser.elementByCss('#performance-now').text()).toBe(currentTime) + + // await browser.elementByCss('#link').click() + // await browser.waitForElementByCss('#page') + + // expect(await browser.elementByCss('#performance-now').text()).toBe(currentTime) + // }) + // }) + + // // TODO-APP: This is disabled for development as the error overlay needs to be reworked. + // ;(isDev ? describe.skip : describe)('error component', () => { + // it('should trigger error component when an error happens during rendering', async () => { + // const browser = await webdriver(next.url, '/error/clientcomponent') + // await browser.elementByCss('#error-trigger-button').click().waitForElementByCss('#error-boundary-message') + + // expect(await browser.elementByCss('#error-boundary-message').text()).toBe('An error occurred: this is a test') + // }) + + // it('should allow resetting error boundary', async () => { + // const browser = await webdriver(next.url, '/error/clientcomponent') + + // // Try triggering and resetting a few times in a row + // for (let i = 0; i < 5; i++) { + // await browser.elementByCss('#error-trigger-button').click().waitForElementByCss('#error-boundary-message') + + // expect(await browser.elementByCss('#error-boundary-message').text()).toBe('An error occurred: this is a test') + + // await browser.elementByCss('#reset').click().waitForElementByCss('#error-trigger-button') + + // expect(await browser.elementByCss('#error-trigger-button').text()).toBe('Trigger Error!') + // } + // }) + + // it('should hydrate empty shell to handle server-side rendering errors', async () => { + // const browser = await webdriver(next.url, '/error/ssr-error-client-component') + // const logs = await browser.log() + // const errors = logs + // .filter((x) => x.source === 'error') + // .map((x) => x.message) + // .join('\n') + // expect(errors).toInclude('Error during SSR') + // }) + // }) + + // describe('known bugs', () => { + // it('should not share flight data between requests', async () => { + // const fetches = await Promise.all( + // [...Array.from({ length: 5 })].map(() => renderViaHTTP(next.url, '/loading-bug/electronics')), + // ) + + // for (const text of fetches) { + // const $ = cheerio.load(text) + // expect($('#category-id').text()).toBe('electronicsabc') + // } + // }) + // }) + + // describe('404', () => { + // it.skip('should trigger 404 in a server component', async () => { + // const browser = await webdriver(next.url, '/not-found/servercomponent') + + // expect(await browser.waitForElementByCss('#not-found-component').text()).toBe('404!') + // }) + + // it.skip('should trigger 404 in a client component', async () => { + // const browser = await webdriver(next.url, '/not-found/clientcomponent') + // expect(await browser.waitForElementByCss('#not-found-component').text()).toBe('404!') + // }) + + // it('should trigger 404 client-side', async () => { + // const browser = await webdriver(next.url, '/not-found/client-side') + // await browser.elementByCss('button').click().waitForElementByCss('#not-found-component') + // expect(await browser.elementByCss('#not-found-component').text()).toBe('404!') + // }) + // }) + + // describe('redirect', () => { + // describe('components', () => { + // it.skip('should redirect in a server component', async () => { + // const browser = await webdriver(next.url, '/redirect/servercomponent') + // await browser.waitForElementByCss('#result-page') + // expect(await browser.elementByCss('#result-page').text()).toBe('Result Page') + // }) + + // it.skip('should redirect in a client component', async () => { + // const browser = await webdriver(next.url, '/redirect/clientcomponent') + // await browser.waitForElementByCss('#result-page') + // expect(await browser.elementByCss('#result-page').text()).toBe('Result Page') + // }) + + // // TODO-APP: Enable in development + // ;(isDev ? it.skip : it)('should redirect client-side', async () => { + // const browser = await webdriver(next.url, '/redirect/client-side') + // await browser.elementByCss('button').click().waitForElementByCss('#result-page') + // expect(await browser.elementByCss('#result-page').text()).toBe('Result Page') + // }) + // }) + + // describe('next.config.js redirects', () => { + // it('should redirect from next.config.js', async () => { + // const browser = await webdriver(next.url, '/redirect/a') + // expect(await browser.elementByCss('h1').text()).toBe('Dashboard') + // expect(await browser.url()).toBe(`${next.url}/dashboard`) + // }) + + // it('should redirect from next.config.js with link navigation', async () => { + // const browser = await webdriver(next.url, '/redirect/next-config-redirect') + // await browser.elementByCss('#redirect-a').click().waitForElementByCss('h1') + // expect(await browser.elementByCss('h1').text()).toBe('Dashboard') + // expect(await browser.url()).toBe(`${next.url}/dashboard`) + // }) + // }) + + // describe('middleware redirects', () => { + // it('should redirect from middleware', async () => { + // const browser = await webdriver(next.url, '/redirect-middleware-to-dashboard') + // expect(await browser.elementByCss('h1').text()).toBe('Dashboard') + // expect(await browser.url()).toBe(`${next.url}/dashboard`) + // }) + + // it('should redirect from middleware with link navigation', async () => { + // const browser = await webdriver(next.url, '/redirect/next-middleware-redirect') + // await browser.elementByCss('#redirect-middleware').click().waitForElementByCss('h1') + // expect(await browser.elementByCss('h1').text()).toBe('Dashboard') + // expect(await browser.url()).toBe(`${next.url}/dashboard`) + // }) + // }) + // }) + // } + + // runTests() +}) diff --git a/cypress/integration/canary/images.spec.ts b/cypress/integration/canary/images.spec.ts deleted file mode 100644 index 4398ef6b15..0000000000 --- a/cypress/integration/canary/images.spec.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * @see {@link https://nextjs.org/docs/api-reference/next/image#required-props} - */ -describe('next/images', () => { - it('should show image from /public', () => { - cy.visit('/') - cy.findByRole('img').should('be.visible').and(($img) => { - // "naturalWidth" and "naturalHeight" are set when the image loads - expect( - $img[0].naturalWidth, - 'image has natural width' - ).to.be.greaterThan(0) - }) - }) -}) diff --git a/demos/canary/netlify.toml b/demos/canary/netlify.toml index 6caa4cf186..b89776e7df 100644 --- a/demos/canary/netlify.toml +++ b/demos/canary/netlify.toml @@ -7,9 +7,8 @@ ignore = "if [ $CACHED_COMMIT_REF == $COMMIT_REF ]; then (exit 1); else git diff TERM = "xterm" NODE_VERSION = "17" -[[plugins]] -package = "../plugin-wrapper/" - +# [[plugins]] +# package = "../plugin-wrapper/" # This is a fake plugin, that makes it run npm install [[plugins]] package = "@netlify/plugin-local-install-core" diff --git a/package-lock.json b/package-lock.json index 1108a98d1d..8cbe4aa739 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5566,13 +5566,13 @@ "version": "15.7.5", "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz", "integrity": "sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==", - "devOptional": true + "dev": true }, "node_modules/@types/react": { "version": "17.0.50", "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.50.tgz", "integrity": "sha512-ZCBHzpDb5skMnc1zFXAXnL3l1FAdi+xZvwxK+PkglMmBrwjpp9nKaWuEvrGnSifCJmBFGxZOOFuwC6KH/s0NuA==", - "devOptional": true, + "dev": true, "dependencies": { "@types/prop-types": "*", "@types/scheduler": "*", @@ -5598,7 +5598,7 @@ "version": "0.16.2", "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.2.tgz", "integrity": "sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==", - "devOptional": true + "dev": true }, "node_modules/@types/sinonjs__fake-timers": { "version": "8.1.1", @@ -9129,7 +9129,7 @@ "version": "3.0.11", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.11.tgz", "integrity": "sha512-sa6P2wJ+CAbgyy4KFssIb/JNMLxFvKF1pCYCSXS8ZMuqZnMsrxqI2E5sPyoTpxoPU/gVZMzr2zjOfg8GIZOMsw==", - "devOptional": true + "dev": true }, "node_modules/custom-routes": { "resolved": "demos/custom-routes", @@ -13155,7 +13155,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.0.0.tgz", "integrity": "sha512-zIE9hX70qew5qTUjSS7wi1iwj/l7+m54KWU247nhM3v806UdGj1yDndXj+IOYxxtW9zyLI+xqFNZjTuDaLUqFw==", - "devOptional": true + "dev": true }, "node_modules/import-fresh": { "version": "3.3.0", @@ -20309,7 +20309,7 @@ "version": "1.50.1", "resolved": "https://registry.npmjs.org/sass/-/sass-1.50.1.tgz", "integrity": "sha512-noTnY41KnlW2A9P8sdwESpDmo+KBNkukI1i8+hOK3footBUcohNHtdOJbckp46XO95nuvcHDDZ+4tmOnpK3hjw==", - "devOptional": true, + "dev": true, "dependencies": { "chokidar": ">=3.0.0 <4.0.0", "immutable": "^4.0.0", @@ -23311,7 +23311,7 @@ }, "packages/runtime": { "name": "@netlify/plugin-nextjs", - "version": "4.23.1", + "version": "4.23.2", "license": "MIT", "dependencies": { "@netlify/esbuild": "0.14.39", @@ -25818,8 +25818,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-3.0.0.tgz", "integrity": "sha512-V3wD15YHfHz6y0KdhYFjyy9vWtEVALT9UrxfN3zqlI6dMioHnJrqOYfyPKol3oqrnCM9uwkcdCwkJ0WUcbLMTQ==", - "dev": true, - "requires": {} + "dev": true }, "chalk": { "version": "5.0.1", @@ -26170,8 +26169,7 @@ "version": "17.0.0", "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-17.0.0.tgz", "integrity": "sha512-/2ks1GKyqSOkH7JFvXJicu0iMpoojkwB+f5Du/1SC0PtBL+s8v30k9njRZ21pm2drKYm2342jFnGWzttxPmZVg==", - "dev": true, - "requires": {} + "dev": true }, "eslint-import-resolver-typescript": { "version": "3.3.0", @@ -27084,13 +27082,13 @@ "version": "15.7.5", "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz", "integrity": "sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==", - "devOptional": true + "dev": true }, "@types/react": { "version": "17.0.50", "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.50.tgz", "integrity": "sha512-ZCBHzpDb5skMnc1zFXAXnL3l1FAdi+xZvwxK+PkglMmBrwjpp9nKaWuEvrGnSifCJmBFGxZOOFuwC6KH/s0NuA==", - "devOptional": true, + "dev": true, "requires": { "@types/prop-types": "*", "@types/scheduler": "*", @@ -27116,7 +27114,7 @@ "version": "0.16.2", "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.2.tgz", "integrity": "sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==", - "devOptional": true + "dev": true }, "@types/sinonjs__fake-timers": { "version": "8.1.1", @@ -27424,8 +27422,7 @@ "version": "5.3.2", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true, - "requires": {} + "dev": true }, "acorn-walk": { "version": "7.2.0", @@ -29777,7 +29774,7 @@ "version": "3.0.11", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.11.tgz", "integrity": "sha512-sa6P2wJ+CAbgyy4KFssIb/JNMLxFvKF1pCYCSXS8ZMuqZnMsrxqI2E5sPyoTpxoPU/gVZMzr2zjOfg8GIZOMsw==", - "devOptional": true + "dev": true }, "custom-routes": { "version": "file:demos/custom-routes", @@ -30907,8 +30904,7 @@ "version": "8.5.0", "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.5.0.tgz", "integrity": "sha512-obmWKLUNCnhtQRKc+tmnYuQl0pFU1ibYJQ5BGhTVB08bHe9wC8qUeG7c08dj9XX+AuPj1YSGSQIHl1pnDHZR0Q==", - "dev": true, - "requires": {} + "dev": true }, "eslint-formatter-codeframe": { "version": "7.32.1", @@ -31353,8 +31349,7 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-6.0.1.tgz", "integrity": "sha512-uM4Tgo5u3UWQiroOyDEsYcVMOo7re3zmno0IZmB5auxoaQNIceAbXEkSt8RNrKtaYehARHG06pYK6K1JhtP0Zw==", - "dev": true, - "requires": {} + "dev": true }, "eslint-plugin-react": { "version": "7.29.4", @@ -31402,8 +31397,7 @@ "version": "4.5.0", "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.5.0.tgz", "integrity": "sha512-8k1gRt7D7h03kd+SAAlzXkQwWK22BnK6GKZG+FJA6BAGy22CFvl8kCIXKpVux0cCxMWDQUPqSok0LKaZ0aOcCw==", - "dev": true, - "requires": {} + "dev": true }, "eslint-plugin-unicorn": { "version": "43.0.2", @@ -32876,7 +32870,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.0.0.tgz", "integrity": "sha512-zIE9hX70qew5qTUjSS7wi1iwj/l7+m54KWU247nhM3v806UdGj1yDndXj+IOYxxtW9zyLI+xqFNZjTuDaLUqFw==", - "devOptional": true + "dev": true }, "import-fresh": { "version": "3.3.0", @@ -33928,8 +33922,7 @@ "version": "1.2.2", "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz", "integrity": "sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w==", - "dev": true, - "requires": {} + "dev": true }, "jest-regex-util": { "version": "27.5.1", @@ -38345,7 +38338,7 @@ "version": "1.50.1", "resolved": "https://registry.npmjs.org/sass/-/sass-1.50.1.tgz", "integrity": "sha512-noTnY41KnlW2A9P8sdwESpDmo+KBNkukI1i8+hOK3footBUcohNHtdOJbckp46XO95nuvcHDDZ+4tmOnpK3hjw==", - "devOptional": true, + "dev": true, "requires": { "chokidar": ">=3.0.0 <4.0.0", "immutable": "^4.0.0", @@ -38606,14 +38599,12 @@ "styled-jsx": { "version": "5.0.2", "resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.0.2.tgz", - "integrity": "sha512-LqPQrbBh3egD57NBcHET4qcgshPks+yblyhPlH2GY8oaDgKs8SK4C3dBh3oSJjgzJ3G5t1SYEZGHkP+QEpX9EQ==", - "requires": {} + "integrity": "sha512-LqPQrbBh3egD57NBcHET4qcgshPks+yblyhPlH2GY8oaDgKs8SK4C3dBh3oSJjgzJ3G5t1SYEZGHkP+QEpX9EQ==" }, "use-sync-external-store": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.1.0.tgz", - "integrity": "sha512-SEnieB2FPKEVne66NpXPd1Np4R1lTNKfjuy3XdIoPQKYBAFdzbzSZlSn1KJZUiihQLQC5Znot4SBz1EOTBwQAQ==", - "requires": {} + "integrity": "sha512-SEnieB2FPKEVne66NpXPd1Np4R1lTNKfjuy3XdIoPQKYBAFdzbzSZlSn1KJZUiihQLQC5Znot4SBz1EOTBwQAQ==" } } }, @@ -40147,8 +40138,7 @@ "ws": { "version": "8.5.0", "resolved": "https://registry.npmjs.org/ws/-/ws-8.5.0.tgz", - "integrity": "sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg==", - "requires": {} + "integrity": "sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg==" } } }, @@ -40256,8 +40246,7 @@ "use-sync-external-store": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz", - "integrity": "sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==", - "requires": {} + "integrity": "sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==" }, "util-deprecate": { "version": "1.0.2", @@ -40662,8 +40651,7 @@ "version": "7.5.7", "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.7.tgz", "integrity": "sha512-KMvVuFzpKBuiIXW3E4u3mySRO2/mCHSyZDJQM5NQ9Q9KHWHWh0NHgfbRMLLrceUK5qAL4ytALJbpRMjixFZh8A==", - "dev": true, - "requires": {} + "dev": true }, "xdg-basedir": { "version": "4.0.0", diff --git a/package.json b/package.json index 1ee92eaab7..833a1c4caa 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "Run Next.js seamlessly on Netlify", "scripts": { "build:demo": "cd demos/default && npm run build", - "cy:open": "cypress open --config-file cypress/config/all.json", + "cy:open": "cypress open --config-file cypress/config/canary.json", "dev:demo": "next dev demos/default", "format": "run-s format:check-fix:*", "format:ci": "run-s format:check:*", From b7d25bc7b99ec168d9ee29604711a5215ab9a6db Mon Sep 17 00:00:00 2001 From: Matt Kane Date: Thu, 29 Sep 2022 08:30:14 +0100 Subject: [PATCH 014/172] chore: use correct site for canary tests --- .github/workflows/cypress-canary.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cypress-canary.yml b/.github/workflows/cypress-canary.yml index 19f48db40a..1b1216d468 100644 --- a/.github/workflows/cypress-canary.yml +++ b/.github/workflows/cypress-canary.yml @@ -39,7 +39,7 @@ jobs: id: deploy uses: ./.github/actions/wait-for-netlify-deploy with: - site-name: netlify-plugin-nextjs-demo + site-name: next-plugin-canary timeout: 300 - name: Deploy successful From 1e70c2132fcd8fc86be6547ec5189cfc735491d5 Mon Sep 17 00:00:00 2001 From: Matt Kane Date: Thu, 29 Sep 2022 08:37:52 +0100 Subject: [PATCH 015/172] chore: enable plugin --- demos/canary/netlify.toml | 5 +++-- package-lock.json | 4 ++-- packages/runtime/src/helpers/edge.ts | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/demos/canary/netlify.toml b/demos/canary/netlify.toml index b89776e7df..6caa4cf186 100644 --- a/demos/canary/netlify.toml +++ b/demos/canary/netlify.toml @@ -7,8 +7,9 @@ ignore = "if [ $CACHED_COMMIT_REF == $COMMIT_REF ]; then (exit 1); else git diff TERM = "xterm" NODE_VERSION = "17" -# [[plugins]] -# package = "../plugin-wrapper/" +[[plugins]] +package = "../plugin-wrapper/" + # This is a fake plugin, that makes it run npm install [[plugins]] package = "@netlify/plugin-local-install-core" diff --git a/package-lock.json b/package-lock.json index 4ffc3a19e6..be2744818a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23320,7 +23320,7 @@ }, "packages/next": { "name": "@netlify/next", - "version": "1.3.0", + "version": "1.3.1", "license": "MIT", "devDependencies": { "@types/node": "^17.0.25", @@ -23337,7 +23337,7 @@ }, "packages/runtime": { "name": "@netlify/plugin-nextjs", - "version": "4.23.2", + "version": "4.23.3", "license": "MIT", "dependencies": { "@netlify/esbuild": "0.14.39", diff --git a/packages/runtime/src/helpers/edge.ts b/packages/runtime/src/helpers/edge.ts index 853f5aff81..c7abc6918a 100644 --- a/packages/runtime/src/helpers/edge.ts +++ b/packages/runtime/src/helpers/edge.ts @@ -7,8 +7,8 @@ import { copy, copyFile, emptyDir, ensureDir, readJSON, readJson, writeJSON, wri import type { MiddlewareManifest } from 'next/dist/build/webpack/plugins/middleware-plugin' import type { RouteHas } from 'next/dist/lib/load-custom-routes' -import { RoutesManifest } from './types' import { getRequiredServerFiles } from './config' +import { RoutesManifest } from './types' // This is the format as of next@12.2 interface EdgeFunctionDefinitionV1 { From 9ccaaf255f560b1e3bef8eeb7816f5f159638f68 Mon Sep 17 00:00:00 2001 From: Matt Kane Date: Thu, 29 Sep 2022 14:55:15 +0100 Subject: [PATCH 016/172] ci: use vitest for canary e2e tests --- .../{cypress-canary.yml => e2e-canary.yml} | 38 +- cypress/config/canary.json | 5 - demos/canary/middleware.js | 6 +- demos/canary/netlify.toml | 5 +- demos/canary/package-lock.json | 238 +-- demos/canary/package.json | 2 +- package-lock.json | 1647 ++++++++++++++++- package.json | 8 +- .../e2e}/canary/appdir.spec.ts | 631 ++++--- test/e2e/next-test-lib/amp-test-utils.js | 19 + test/e2e/next-test-lib/browsers/base.ts | 111 ++ test/e2e/next-test-lib/browsers/playwright.ts | 345 ++++ test/e2e/next-test-lib/browsers/selenium.ts | 358 ++++ test/e2e/next-test-lib/create-next-install.js | 122 ++ test/e2e/next-test-lib/e2e-utils.ts | 164 ++ test/e2e/next-test-lib/flat-map-polyfill.js | 37 + test/e2e/next-test-lib/mocks-require-hook.js | 24 + test/e2e/next-test-lib/next-modes/base.ts | 378 ++++ .../next-test-lib/next-modes/next-deploy.ts | 169 ++ test/e2e/next-test-lib/next-modes/next-dev.ts | 80 + .../next-test-lib/next-modes/next-start.ts | 153 ++ test/e2e/next-test-lib/next-test-utils.js | 636 +++++++ test/e2e/next-test-lib/next-webdriver.ts | 112 ++ .../react-channel-require-hook.js | 26 + tsconfig.json | 1 + vitest.config.ts | 12 + 26 files changed, 4804 insertions(+), 523 deletions(-) rename .github/workflows/{cypress-canary.yml => e2e-canary.yml} (57%) delete mode 100644 cypress/config/canary.json rename {cypress/integration => test/e2e}/canary/appdir.spec.ts (69%) create mode 100644 test/e2e/next-test-lib/amp-test-utils.js create mode 100644 test/e2e/next-test-lib/browsers/base.ts create mode 100644 test/e2e/next-test-lib/browsers/playwright.ts create mode 100644 test/e2e/next-test-lib/browsers/selenium.ts create mode 100644 test/e2e/next-test-lib/create-next-install.js create mode 100644 test/e2e/next-test-lib/e2e-utils.ts create mode 100644 test/e2e/next-test-lib/flat-map-polyfill.js create mode 100644 test/e2e/next-test-lib/mocks-require-hook.js create mode 100644 test/e2e/next-test-lib/next-modes/base.ts create mode 100644 test/e2e/next-test-lib/next-modes/next-deploy.ts create mode 100644 test/e2e/next-test-lib/next-modes/next-dev.ts create mode 100644 test/e2e/next-test-lib/next-modes/next-start.ts create mode 100644 test/e2e/next-test-lib/next-test-utils.js create mode 100644 test/e2e/next-test-lib/next-webdriver.ts create mode 100644 test/e2e/next-test-lib/react-channel-require-hook.js create mode 100644 vitest.config.ts diff --git a/.github/workflows/cypress-canary.yml b/.github/workflows/e2e-canary.yml similarity index 57% rename from .github/workflows/cypress-canary.yml rename to .github/workflows/e2e-canary.yml index 1b1216d468..3c7570f3f5 100644 --- a/.github/workflows/cypress-canary.yml +++ b/.github/workflows/e2e-canary.yml @@ -6,17 +6,13 @@ on: branches: - main paths: - - 'demos/canary/**/*.{js,jsx,ts,tsx}' - - 'cypress/integration/canary/**/*.{ts,js}' + - 'test/e2e/canary/**/*.{js,jsx,ts,tsx}' + - 'demos/canary/**/*' - 'src/**/*.{ts,js}' jobs: - cypress: - name: Cypress + vitest: + name: Vitest runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - containers: [1, 2, 3, 4] steps: - name: Checkout uses: actions/checkout@v2 @@ -49,25 +45,11 @@ jobs: - name: Node uses: actions/setup-node@v2 with: - node-version: '16' - - - run: npm install - - - name: Cypress run + node-version: 'latest' + - name: Install dependencies + run: npm install + - name: Run e2e tests if: ${{ steps.deploy.outputs.origin-url }} - id: cypress - uses: cypress-io/github-action@v2 - with: - browser: chrome - headless: true - record: true - parallel: true - config-file: cypress/config/canary.json - group: 'Next Runtime - Demo Canary' - spec: cypress/integration/canary/* + run: npm run test:e2e env: - DEBUG: '@cypress/github-action' - CYPRESS_baseUrl: ${{ steps.deploy.outputs.origin-url }} - CYPRESS_NETLIFY_CONTEXT: ${{ steps.deploy.outputs.context }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - CYPRESS_RECORD_KEY: ${{ secrets.CANARY_CYPRESS_RECORD_KEY }} + SITE_URL: ${{ steps.deploy.outputs.origin-url }} diff --git a/cypress/config/canary.json b/cypress/config/canary.json deleted file mode 100644 index eab5ec06f5..0000000000 --- a/cypress/config/canary.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "baseUrl": "http://localhost:8888", - "integrationFolder": "cypress/integration/canary", - "projectId": "5zbkdv" -} diff --git a/demos/canary/middleware.js b/demos/canary/middleware.js index 8057bba59b..662cc9eb78 100644 --- a/demos/canary/middleware.js +++ b/demos/canary/middleware.js @@ -15,11 +15,9 @@ export function middleware(request) { } if (request.nextUrl.pathname.startsWith('/internal/test')) { - const method = request.nextUrl.pathname.endsWith('rewrite') - ? 'rewrite' - : 'redirect' + const method = request.nextUrl.pathname.endsWith('rewrite') ? 'rewrite' : 'redirect' - const internal = ['__flight__', '__flight_router_state_tree__'] + const internal = ['__rsc__', '__next_router_state_tree__'] if (internal.some((name) => request.headers.has(name))) { return NextResponse[method](new URL('/internal/failure', request.url)) } diff --git a/demos/canary/netlify.toml b/demos/canary/netlify.toml index 6caa4cf186..b89776e7df 100644 --- a/demos/canary/netlify.toml +++ b/demos/canary/netlify.toml @@ -7,9 +7,8 @@ ignore = "if [ $CACHED_COMMIT_REF == $COMMIT_REF ]; then (exit 1); else git diff TERM = "xterm" NODE_VERSION = "17" -[[plugins]] -package = "../plugin-wrapper/" - +# [[plugins]] +# package = "../plugin-wrapper/" # This is a fake plugin, that makes it run npm install [[plugins]] package = "@netlify/plugin-local-install-core" diff --git a/demos/canary/package-lock.json b/demos/canary/package-lock.json index 20fc897f01..6241446df0 100644 --- a/demos/canary/package-lock.json +++ b/demos/canary/package-lock.json @@ -10,20 +10,20 @@ "license": "MIT", "dependencies": { "nanoid": "^2.1.11", - "next": "12.3.2-canary.11", + "next": "^12.3.2-canary.13", "react": "0.0.0-experimental-ae7ad8b4c-20220927", "react-dom": "0.0.0-experimental-ae7ad8b4c-20220927" } }, "node_modules/@next/env": { - "version": "12.3.2-canary.11", - "resolved": "https://registry.npmjs.org/@next/env/-/env-12.3.2-canary.11.tgz", - "integrity": "sha512-XEV5JwAu7l7OygEeYxasX0Zu7LNqCZfRKeSsm3o6hSLzQSuvLsO49giKnrx9+TJXSalpj9bDbqaCpH3iuROesA==" + "version": "12.3.2-canary.13", + "resolved": "https://registry.npmjs.org/@next/env/-/env-12.3.2-canary.13.tgz", + "integrity": "sha512-TRLZ8d5Al5ly2WcidmjCJZ2TIdLpWjGDjW5wV9NuPjgUuMC+B53NWqNVdtZIfiarh+jAIxgTU9imzzKkfhKW9g==" }, "node_modules/@next/swc-android-arm-eabi": { - "version": "12.3.2-canary.11", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.3.2-canary.11.tgz", - "integrity": "sha512-xFdBf2AnRxJiRo4pp61zC5azxSkdjeNF86bLGfa3tiGNYkNVjrJZzqx2TUzBhzRBatrPe9nl9FSTaRRP31cZLw==", + "version": "12.3.2-canary.13", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.3.2-canary.13.tgz", + "integrity": "sha512-He3VS7EhxcJZXNEJGA+vt0yUp5aVFTPiCttENXvo2U2TRa0PdaFDGf9GQbSU6AmErfB/qbigJvfMJ1gg0yQyNw==", "cpu": [ "arm" ], @@ -36,9 +36,9 @@ } }, "node_modules/@next/swc-android-arm64": { - "version": "12.3.2-canary.11", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-12.3.2-canary.11.tgz", - "integrity": "sha512-T/nVC6ojHG9hXVuejDTc6fcyUR78vDUbN+pmrGFYrjfPUWYt+bFDwRguGOXydWdJj3jyRkL9YyMmNZf0wuzheg==", + "version": "12.3.2-canary.13", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-12.3.2-canary.13.tgz", + "integrity": "sha512-IXp1apXYP+IorT6JKNcgh9+zTbcSVYGT2kXrUIDUUQS9cc09sqEB+mctukj4kRnoGti4s+FKfi27Ox4qdzUmLQ==", "cpu": [ "arm64" ], @@ -51,9 +51,9 @@ } }, "node_modules/@next/swc-darwin-arm64": { - "version": "12.3.2-canary.11", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.3.2-canary.11.tgz", - "integrity": "sha512-HLebVmk8U7VfSTcro/vYrhvw2v85Uic48Y9z3TMiWakJoG1gBNEHuPnJXNLJJEWrpdc1rjP0n/7Jl6xofMGQMA==", + "version": "12.3.2-canary.13", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.3.2-canary.13.tgz", + "integrity": "sha512-keCbkKK6Zb2wB1D87+Hu0NK7zLExqYoG6yYpueRiyHh34nvlkH2JyrXyFn7mIE7xnzqZ5wyomFzbe3rVqbp6MQ==", "cpu": [ "arm64" ], @@ -66,9 +66,9 @@ } }, "node_modules/@next/swc-darwin-x64": { - "version": "12.3.2-canary.11", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.3.2-canary.11.tgz", - "integrity": "sha512-gkpGaFDy8i90ll9USTMXHBuHmWbvpeCJxoSsWnAQuJZcUIZATL0iovdjjAvHh4cj5xWQpGXdGAJpL5ss4b2Pyw==", + "version": "12.3.2-canary.13", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.3.2-canary.13.tgz", + "integrity": "sha512-TizA7hbfHVJ1xO4rNyH3Wori4nOI1gI2dgV+c4CnMkwzcf2e6pKOvAY8eTEJGWygvQsfXlgKrfMCRMo0GsVjXQ==", "cpu": [ "x64" ], @@ -81,9 +81,9 @@ } }, "node_modules/@next/swc-freebsd-x64": { - "version": "12.3.2-canary.11", - "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.3.2-canary.11.tgz", - "integrity": "sha512-jTqkb3HN+PXlpXTzBEUhWnR9XA+Uj1vpjSx9jc+Lrl3esyzzKONqTNz4RRbOwDvU2TygQr+oaQqtdZAnj88d7w==", + "version": "12.3.2-canary.13", + "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.3.2-canary.13.tgz", + "integrity": "sha512-E3cEa+hWRSD+kSLq7GgfYN/jYs0e3uQhN8a9rU4cGHiRqnw+yji9q3bfUOkpGRcl47KmzAoDfYcKhfbsLHb0Ig==", "cpu": [ "x64" ], @@ -96,9 +96,9 @@ } }, "node_modules/@next/swc-linux-arm-gnueabihf": { - "version": "12.3.2-canary.11", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.3.2-canary.11.tgz", - "integrity": "sha512-Nt4qARbZozu7UeFpUfrJuKg6g6BCjYnAfKcDCLxAnDONrMoqIEkIVQmntH2i1GPwtp37qTaPG6v4TnJHGNBSOQ==", + "version": "12.3.2-canary.13", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.3.2-canary.13.tgz", + "integrity": "sha512-nAuzx6ZJBE5T04/C8sdFl5sgZE4MSiDq4W2PEBK54sbO9lgdFJw5N9kz7H971aJgmEA1CEz+xg5oYdYzV/jLFw==", "cpu": [ "arm" ], @@ -111,9 +111,9 @@ } }, "node_modules/@next/swc-linux-arm64-gnu": { - "version": "12.3.2-canary.11", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.3.2-canary.11.tgz", - "integrity": "sha512-8l0Ma2zIiTTTo042NMCYFlkIyGeFdpAtU2qTkIuJX9sBdffq9m/uHtnkv8R0u5myakn/5fkncojVx4uNRBGePg==", + "version": "12.3.2-canary.13", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.3.2-canary.13.tgz", + "integrity": "sha512-Xel0K86aRe7tlDqKNce5AOxhzGv5dWsok9S3Z9NvYVdWS4r0XOepQLXQDY1wShpYjsKoYSAslBZPAO8DpTi4bw==", "cpu": [ "arm64" ], @@ -126,9 +126,9 @@ } }, "node_modules/@next/swc-linux-arm64-musl": { - "version": "12.3.2-canary.11", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.3.2-canary.11.tgz", - "integrity": "sha512-hOoWctziJqYNw0+RY3GR2og+Qr2ykgtIORKEZGHx9OAyg+dRLxJISHWv9umaAjE8Hoi7V0cS841XQ1B6XTnoKA==", + "version": "12.3.2-canary.13", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.3.2-canary.13.tgz", + "integrity": "sha512-KJElZjEmgMuIcL+9tdzq5XCO6KLRYV1xjT1qX2RbCTJ5Qwa9AC3IUCequFLk8WSZbGRrTA/imDSu5BYG/pK5Jg==", "cpu": [ "arm64" ], @@ -141,9 +141,9 @@ } }, "node_modules/@next/swc-linux-x64-gnu": { - "version": "12.3.2-canary.11", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.3.2-canary.11.tgz", - "integrity": "sha512-to03IoMs8v971yVFGm2Og7x6Z5LSPMzeFQikLqpUNS1lmk5Kha4vju4Ojc8nqEyPShojMhkbkjSH6sXbeCb+ZA==", + "version": "12.3.2-canary.13", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.3.2-canary.13.tgz", + "integrity": "sha512-o6wYKB7cM1ATyXHXJ5Sbv0Z1okYVBxFZCJkjk1HlS1vrGFIynyWBZm9tu87ujI0cIHjWtA5s+N3EET722zjhkQ==", "cpu": [ "x64" ], @@ -156,9 +156,9 @@ } }, "node_modules/@next/swc-linux-x64-musl": { - "version": "12.3.2-canary.11", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.3.2-canary.11.tgz", - "integrity": "sha512-gSitcSo6PFzI/WHLLfRcLin6y1KLEADliLdFwHy7luotsrcalxjIWPD6tFqIZ7ajRjCZ02uY+lIPJ/FPhX3b8w==", + "version": "12.3.2-canary.13", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.3.2-canary.13.tgz", + "integrity": "sha512-sKwYbzdBxW5Q5MqCgFJT7PmymTXpplzyzYbIKWPcAgatKpRanSEFpCE/8xYKrKWPq6OfwclklB1s9gV/si5D5w==", "cpu": [ "x64" ], @@ -171,9 +171,9 @@ } }, "node_modules/@next/swc-win32-arm64-msvc": { - "version": "12.3.2-canary.11", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.3.2-canary.11.tgz", - "integrity": "sha512-o4F0/cS/7qBOSz+F3A1iPBqbhNOpJB8cJZnhViTW6BeFQm9pnRXDm8FZyNup3yHdSy33wqtjLNYTPADvm+GsFQ==", + "version": "12.3.2-canary.13", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.3.2-canary.13.tgz", + "integrity": "sha512-P6vKqOnt8N19Zwz9m7425YD5DJx1+Q35BXNHaBaqJxpRICRdu/y1u+Y3Q53lsUiH9pej2XCqCAcekHie49uVJg==", "cpu": [ "arm64" ], @@ -186,9 +186,9 @@ } }, "node_modules/@next/swc-win32-ia32-msvc": { - "version": "12.3.2-canary.11", - "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.3.2-canary.11.tgz", - "integrity": "sha512-/FSdl4+4YFsrycKrM5N+4khxKR7rKIO4tiai+MLAN7zi9GA+2qFoxxkQdWSQTBr09lE+eacZ3r3TppO7ztNmQg==", + "version": "12.3.2-canary.13", + "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.3.2-canary.13.tgz", + "integrity": "sha512-0mLk3ZW5nyKpWOF93LZdNSgYSoHJwlAF09zIODLSKUrtJN0HYs7cLpP+2WzsSSDR8kAJErAgP87AzpjBV3vOxg==", "cpu": [ "ia32" ], @@ -201,9 +201,9 @@ } }, "node_modules/@next/swc-win32-x64-msvc": { - "version": "12.3.2-canary.11", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.3.2-canary.11.tgz", - "integrity": "sha512-/VioJDSK5TYea84zu6Qu5tCngCkAMNhPuVJ+3cmDGcM9H+tq0LiStVlW3efGUV+R4DyHg8GymWHpMXVjm6UIDg==", + "version": "12.3.2-canary.13", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.3.2-canary.13.tgz", + "integrity": "sha512-djLdLB2FsHuxNVLekGrrQGiPR3MmSM0RXaAhpe0xqeClqDGqR0O01M6RUhMqv4KcPK0icUcc+X9P1gxWXRyhIQ==", "cpu": [ "x64" ], @@ -260,11 +260,11 @@ "integrity": "sha512-s/snB+WGm6uwi0WjsZdaVcuf3KJXlfGl2LcxgwkEwJF0D/BWzVWAZW/XY4bFaiR7s0Jk3FPvlnepg1H1b1UwlA==" }, "node_modules/next": { - "version": "12.3.2-canary.11", - "resolved": "https://registry.npmjs.org/next/-/next-12.3.2-canary.11.tgz", - "integrity": "sha512-LBPr3z2xn+djEnkdajLJKqZimXyfHjpKmReyMAEuyk+2rZ1WICQYV5QOh2vhXqPxwiqqardX7VjuiBXkQeR1Qg==", + "version": "12.3.2-canary.13", + "resolved": "https://registry.npmjs.org/next/-/next-12.3.2-canary.13.tgz", + "integrity": "sha512-3nkpYO/a0mIZBCd+EImahBoeXRfq+CtaQnn/QrTmTMjsYg9oV1LRq8i1sYSiJxJ1ikHUGm9mw6jCyuazRvyrjQ==", "dependencies": { - "@next/env": "12.3.2-canary.11", + "@next/env": "12.3.2-canary.13", "@swc/helpers": "0.4.11", "caniuse-lite": "^1.0.30001406", "postcss": "8.4.14", @@ -278,19 +278,19 @@ "node": ">=12.22.0" }, "optionalDependencies": { - "@next/swc-android-arm-eabi": "12.3.2-canary.11", - "@next/swc-android-arm64": "12.3.2-canary.11", - "@next/swc-darwin-arm64": "12.3.2-canary.11", - "@next/swc-darwin-x64": "12.3.2-canary.11", - "@next/swc-freebsd-x64": "12.3.2-canary.11", - "@next/swc-linux-arm-gnueabihf": "12.3.2-canary.11", - "@next/swc-linux-arm64-gnu": "12.3.2-canary.11", - "@next/swc-linux-arm64-musl": "12.3.2-canary.11", - "@next/swc-linux-x64-gnu": "12.3.2-canary.11", - "@next/swc-linux-x64-musl": "12.3.2-canary.11", - "@next/swc-win32-arm64-msvc": "12.3.2-canary.11", - "@next/swc-win32-ia32-msvc": "12.3.2-canary.11", - "@next/swc-win32-x64-msvc": "12.3.2-canary.11" + "@next/swc-android-arm-eabi": "12.3.2-canary.13", + "@next/swc-android-arm64": "12.3.2-canary.13", + "@next/swc-darwin-arm64": "12.3.2-canary.13", + "@next/swc-darwin-x64": "12.3.2-canary.13", + "@next/swc-freebsd-x64": "12.3.2-canary.13", + "@next/swc-linux-arm-gnueabihf": "12.3.2-canary.13", + "@next/swc-linux-arm64-gnu": "12.3.2-canary.13", + "@next/swc-linux-arm64-musl": "12.3.2-canary.13", + "@next/swc-linux-x64-gnu": "12.3.2-canary.13", + "@next/swc-linux-x64-musl": "12.3.2-canary.13", + "@next/swc-win32-arm64-msvc": "12.3.2-canary.13", + "@next/swc-win32-ia32-msvc": "12.3.2-canary.13", + "@next/swc-win32-x64-msvc": "12.3.2-canary.13" }, "peerDependencies": { "fibers": ">= 3.1.0", @@ -424,86 +424,86 @@ }, "dependencies": { "@next/env": { - "version": "12.3.2-canary.11", - "resolved": "https://registry.npmjs.org/@next/env/-/env-12.3.2-canary.11.tgz", - "integrity": "sha512-XEV5JwAu7l7OygEeYxasX0Zu7LNqCZfRKeSsm3o6hSLzQSuvLsO49giKnrx9+TJXSalpj9bDbqaCpH3iuROesA==" + "version": "12.3.2-canary.13", + "resolved": "https://registry.npmjs.org/@next/env/-/env-12.3.2-canary.13.tgz", + "integrity": "sha512-TRLZ8d5Al5ly2WcidmjCJZ2TIdLpWjGDjW5wV9NuPjgUuMC+B53NWqNVdtZIfiarh+jAIxgTU9imzzKkfhKW9g==" }, "@next/swc-android-arm-eabi": { - "version": "12.3.2-canary.11", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.3.2-canary.11.tgz", - "integrity": "sha512-xFdBf2AnRxJiRo4pp61zC5azxSkdjeNF86bLGfa3tiGNYkNVjrJZzqx2TUzBhzRBatrPe9nl9FSTaRRP31cZLw==", + "version": "12.3.2-canary.13", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.3.2-canary.13.tgz", + "integrity": "sha512-He3VS7EhxcJZXNEJGA+vt0yUp5aVFTPiCttENXvo2U2TRa0PdaFDGf9GQbSU6AmErfB/qbigJvfMJ1gg0yQyNw==", "optional": true }, "@next/swc-android-arm64": { - "version": "12.3.2-canary.11", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-12.3.2-canary.11.tgz", - "integrity": "sha512-T/nVC6ojHG9hXVuejDTc6fcyUR78vDUbN+pmrGFYrjfPUWYt+bFDwRguGOXydWdJj3jyRkL9YyMmNZf0wuzheg==", + "version": "12.3.2-canary.13", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-12.3.2-canary.13.tgz", + "integrity": "sha512-IXp1apXYP+IorT6JKNcgh9+zTbcSVYGT2kXrUIDUUQS9cc09sqEB+mctukj4kRnoGti4s+FKfi27Ox4qdzUmLQ==", "optional": true }, "@next/swc-darwin-arm64": { - "version": "12.3.2-canary.11", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.3.2-canary.11.tgz", - "integrity": "sha512-HLebVmk8U7VfSTcro/vYrhvw2v85Uic48Y9z3TMiWakJoG1gBNEHuPnJXNLJJEWrpdc1rjP0n/7Jl6xofMGQMA==", + "version": "12.3.2-canary.13", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.3.2-canary.13.tgz", + "integrity": "sha512-keCbkKK6Zb2wB1D87+Hu0NK7zLExqYoG6yYpueRiyHh34nvlkH2JyrXyFn7mIE7xnzqZ5wyomFzbe3rVqbp6MQ==", "optional": true }, "@next/swc-darwin-x64": { - "version": "12.3.2-canary.11", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.3.2-canary.11.tgz", - "integrity": "sha512-gkpGaFDy8i90ll9USTMXHBuHmWbvpeCJxoSsWnAQuJZcUIZATL0iovdjjAvHh4cj5xWQpGXdGAJpL5ss4b2Pyw==", + "version": "12.3.2-canary.13", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.3.2-canary.13.tgz", + "integrity": "sha512-TizA7hbfHVJ1xO4rNyH3Wori4nOI1gI2dgV+c4CnMkwzcf2e6pKOvAY8eTEJGWygvQsfXlgKrfMCRMo0GsVjXQ==", "optional": true }, "@next/swc-freebsd-x64": { - "version": "12.3.2-canary.11", - "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.3.2-canary.11.tgz", - "integrity": "sha512-jTqkb3HN+PXlpXTzBEUhWnR9XA+Uj1vpjSx9jc+Lrl3esyzzKONqTNz4RRbOwDvU2TygQr+oaQqtdZAnj88d7w==", + "version": "12.3.2-canary.13", + "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.3.2-canary.13.tgz", + "integrity": "sha512-E3cEa+hWRSD+kSLq7GgfYN/jYs0e3uQhN8a9rU4cGHiRqnw+yji9q3bfUOkpGRcl47KmzAoDfYcKhfbsLHb0Ig==", "optional": true }, "@next/swc-linux-arm-gnueabihf": { - "version": "12.3.2-canary.11", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.3.2-canary.11.tgz", - "integrity": "sha512-Nt4qARbZozu7UeFpUfrJuKg6g6BCjYnAfKcDCLxAnDONrMoqIEkIVQmntH2i1GPwtp37qTaPG6v4TnJHGNBSOQ==", + "version": "12.3.2-canary.13", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.3.2-canary.13.tgz", + "integrity": "sha512-nAuzx6ZJBE5T04/C8sdFl5sgZE4MSiDq4W2PEBK54sbO9lgdFJw5N9kz7H971aJgmEA1CEz+xg5oYdYzV/jLFw==", "optional": true }, "@next/swc-linux-arm64-gnu": { - "version": "12.3.2-canary.11", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.3.2-canary.11.tgz", - "integrity": "sha512-8l0Ma2zIiTTTo042NMCYFlkIyGeFdpAtU2qTkIuJX9sBdffq9m/uHtnkv8R0u5myakn/5fkncojVx4uNRBGePg==", + "version": "12.3.2-canary.13", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.3.2-canary.13.tgz", + "integrity": "sha512-Xel0K86aRe7tlDqKNce5AOxhzGv5dWsok9S3Z9NvYVdWS4r0XOepQLXQDY1wShpYjsKoYSAslBZPAO8DpTi4bw==", "optional": true }, "@next/swc-linux-arm64-musl": { - "version": "12.3.2-canary.11", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.3.2-canary.11.tgz", - "integrity": "sha512-hOoWctziJqYNw0+RY3GR2og+Qr2ykgtIORKEZGHx9OAyg+dRLxJISHWv9umaAjE8Hoi7V0cS841XQ1B6XTnoKA==", + "version": "12.3.2-canary.13", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.3.2-canary.13.tgz", + "integrity": "sha512-KJElZjEmgMuIcL+9tdzq5XCO6KLRYV1xjT1qX2RbCTJ5Qwa9AC3IUCequFLk8WSZbGRrTA/imDSu5BYG/pK5Jg==", "optional": true }, "@next/swc-linux-x64-gnu": { - "version": "12.3.2-canary.11", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.3.2-canary.11.tgz", - "integrity": "sha512-to03IoMs8v971yVFGm2Og7x6Z5LSPMzeFQikLqpUNS1lmk5Kha4vju4Ojc8nqEyPShojMhkbkjSH6sXbeCb+ZA==", + "version": "12.3.2-canary.13", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.3.2-canary.13.tgz", + "integrity": "sha512-o6wYKB7cM1ATyXHXJ5Sbv0Z1okYVBxFZCJkjk1HlS1vrGFIynyWBZm9tu87ujI0cIHjWtA5s+N3EET722zjhkQ==", "optional": true }, "@next/swc-linux-x64-musl": { - "version": "12.3.2-canary.11", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.3.2-canary.11.tgz", - "integrity": "sha512-gSitcSo6PFzI/WHLLfRcLin6y1KLEADliLdFwHy7luotsrcalxjIWPD6tFqIZ7ajRjCZ02uY+lIPJ/FPhX3b8w==", + "version": "12.3.2-canary.13", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.3.2-canary.13.tgz", + "integrity": "sha512-sKwYbzdBxW5Q5MqCgFJT7PmymTXpplzyzYbIKWPcAgatKpRanSEFpCE/8xYKrKWPq6OfwclklB1s9gV/si5D5w==", "optional": true }, "@next/swc-win32-arm64-msvc": { - "version": "12.3.2-canary.11", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.3.2-canary.11.tgz", - "integrity": "sha512-o4F0/cS/7qBOSz+F3A1iPBqbhNOpJB8cJZnhViTW6BeFQm9pnRXDm8FZyNup3yHdSy33wqtjLNYTPADvm+GsFQ==", + "version": "12.3.2-canary.13", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.3.2-canary.13.tgz", + "integrity": "sha512-P6vKqOnt8N19Zwz9m7425YD5DJx1+Q35BXNHaBaqJxpRICRdu/y1u+Y3Q53lsUiH9pej2XCqCAcekHie49uVJg==", "optional": true }, "@next/swc-win32-ia32-msvc": { - "version": "12.3.2-canary.11", - "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.3.2-canary.11.tgz", - "integrity": "sha512-/FSdl4+4YFsrycKrM5N+4khxKR7rKIO4tiai+MLAN7zi9GA+2qFoxxkQdWSQTBr09lE+eacZ3r3TppO7ztNmQg==", + "version": "12.3.2-canary.13", + "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.3.2-canary.13.tgz", + "integrity": "sha512-0mLk3ZW5nyKpWOF93LZdNSgYSoHJwlAF09zIODLSKUrtJN0HYs7cLpP+2WzsSSDR8kAJErAgP87AzpjBV3vOxg==", "optional": true }, "@next/swc-win32-x64-msvc": { - "version": "12.3.2-canary.11", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.3.2-canary.11.tgz", - "integrity": "sha512-/VioJDSK5TYea84zu6Qu5tCngCkAMNhPuVJ+3cmDGcM9H+tq0LiStVlW3efGUV+R4DyHg8GymWHpMXVjm6UIDg==", + "version": "12.3.2-canary.13", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.3.2-canary.13.tgz", + "integrity": "sha512-djLdLB2FsHuxNVLekGrrQGiPR3MmSM0RXaAhpe0xqeClqDGqR0O01M6RUhMqv4KcPK0icUcc+X9P1gxWXRyhIQ==", "optional": true }, "@swc/helpers": { @@ -538,24 +538,24 @@ "integrity": "sha512-s/snB+WGm6uwi0WjsZdaVcuf3KJXlfGl2LcxgwkEwJF0D/BWzVWAZW/XY4bFaiR7s0Jk3FPvlnepg1H1b1UwlA==" }, "next": { - "version": "12.3.2-canary.11", - "resolved": "https://registry.npmjs.org/next/-/next-12.3.2-canary.11.tgz", - "integrity": "sha512-LBPr3z2xn+djEnkdajLJKqZimXyfHjpKmReyMAEuyk+2rZ1WICQYV5QOh2vhXqPxwiqqardX7VjuiBXkQeR1Qg==", + "version": "12.3.2-canary.13", + "resolved": "https://registry.npmjs.org/next/-/next-12.3.2-canary.13.tgz", + "integrity": "sha512-3nkpYO/a0mIZBCd+EImahBoeXRfq+CtaQnn/QrTmTMjsYg9oV1LRq8i1sYSiJxJ1ikHUGm9mw6jCyuazRvyrjQ==", "requires": { - "@next/env": "12.3.2-canary.11", - "@next/swc-android-arm-eabi": "12.3.2-canary.11", - "@next/swc-android-arm64": "12.3.2-canary.11", - "@next/swc-darwin-arm64": "12.3.2-canary.11", - "@next/swc-darwin-x64": "12.3.2-canary.11", - "@next/swc-freebsd-x64": "12.3.2-canary.11", - "@next/swc-linux-arm-gnueabihf": "12.3.2-canary.11", - "@next/swc-linux-arm64-gnu": "12.3.2-canary.11", - "@next/swc-linux-arm64-musl": "12.3.2-canary.11", - "@next/swc-linux-x64-gnu": "12.3.2-canary.11", - "@next/swc-linux-x64-musl": "12.3.2-canary.11", - "@next/swc-win32-arm64-msvc": "12.3.2-canary.11", - "@next/swc-win32-ia32-msvc": "12.3.2-canary.11", - "@next/swc-win32-x64-msvc": "12.3.2-canary.11", + "@next/env": "12.3.2-canary.13", + "@next/swc-android-arm-eabi": "12.3.2-canary.13", + "@next/swc-android-arm64": "12.3.2-canary.13", + "@next/swc-darwin-arm64": "12.3.2-canary.13", + "@next/swc-darwin-x64": "12.3.2-canary.13", + "@next/swc-freebsd-x64": "12.3.2-canary.13", + "@next/swc-linux-arm-gnueabihf": "12.3.2-canary.13", + "@next/swc-linux-arm64-gnu": "12.3.2-canary.13", + "@next/swc-linux-arm64-musl": "12.3.2-canary.13", + "@next/swc-linux-x64-gnu": "12.3.2-canary.13", + "@next/swc-linux-x64-musl": "12.3.2-canary.13", + "@next/swc-win32-arm64-msvc": "12.3.2-canary.13", + "@next/swc-win32-ia32-msvc": "12.3.2-canary.13", + "@next/swc-win32-x64-msvc": "12.3.2-canary.13", "@swc/helpers": "0.4.11", "caniuse-lite": "^1.0.30001406", "postcss": "8.4.14", diff --git a/demos/canary/package.json b/demos/canary/package.json index 2f21b3ed04..6a47e21c73 100644 --- a/demos/canary/package.json +++ b/demos/canary/package.json @@ -9,7 +9,7 @@ "license": "MIT", "dependencies": { "nanoid": "^2.1.11", - "next": "12.3.2-canary.11", + "next": "^12.3.2-canary.13", "react": "0.0.0-experimental-ae7ad8b4c-20220927", "react-dom": "0.0.0-experimental-ae7ad8b4c-20220927" } diff --git a/package-lock.json b/package-lock.json index be2744818a..5c571bcbfe 100644 --- a/package-lock.json +++ b/package-lock.json @@ -38,6 +38,7 @@ "@types/react": "^17.0.38", "babel-jest": "^27.2.5", "chance": "^1.1.8", + "cheerio": "^1.0.0-rc.12", "cpy": "^8.1.2", "cypress": "^9.0.0", "eslint-config-next": "^12.0.0", @@ -48,6 +49,7 @@ "jest-fetch-mock": "^3.0.3", "netlify-plugin-cypress": "^2.2.0", "npm-run-all": "^4.1.5", + "playwright-chromium": "^1.26.1", "prettier": "^2.1.2", "react": "^18.0.0", "react-dom": "^18.0.0", @@ -55,7 +57,9 @@ "sass": "^1.49.0", "sharp": "^0.30.4", "tmp-promise": "^3.0.2", - "typescript": "^4.3.4" + "typescript": "^4.3.4", + "vitest": "^0.23.4", + "vitest-github-actions-reporter": "^0.8.3" }, "engines": { "node": ">=16.0.0" @@ -669,6 +673,25 @@ "typescript": "^4.6.3" } }, + "node_modules/@actions/core": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.9.1.tgz", + "integrity": "sha512-5ad+U2YGrmmiw6du20AQW5XuWo7UKN2052FjSV7MX+Wfjf8sCqcsZe62NfgHys4QI4/Y+vQvLKYL8jWtA1ZBTA==", + "dev": true, + "dependencies": { + "@actions/http-client": "^2.0.1", + "uuid": "^8.3.2" + } + }, + "node_modules/@actions/http-client": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.1.tgz", + "integrity": "sha512-PIXiMVtz6VvyaRsGY268qvj57hXQEpsYogYOu2nrQhlf+XCGmZstmuZBbAybUl1nQGnvS1k1eEsQ69ZoD7xlSw==", + "dev": true, + "dependencies": { + "tunnel": "^0.0.6" + } + }, "node_modules/@ampproject/remapping": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.1.2.tgz", @@ -3098,6 +3121,38 @@ "if-env-cs": "bin/if-env-cs.js" } }, + "node_modules/@esbuild/android-arm": { + "version": "0.15.9", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.15.9.tgz", + "integrity": "sha512-VZPy/ETF3fBG5PiinIkA0W/tlsvlEgJccyN2DzWZEl0DlVKRbu91PvY2D6Lxgluj4w9QtYHjOWjAT44C+oQ+EQ==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.15.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.15.9.tgz", + "integrity": "sha512-O+NfmkfRrb3uSsTa4jE3WApidSe3N5++fyOVGP1SmMZi4A3BZELkhUUvj5hwmMuNdlpzAZ8iAPz2vmcR7DCFQA==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, "node_modules/@eslint/eslintrc": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.0.tgz", @@ -5408,6 +5463,21 @@ "@types/responselike": "*" } }, + "node_modules/@types/chai": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.3.tgz", + "integrity": "sha512-hC7OMnszpxhZPduX+m+nrx+uFoLkWOMiR4oa/AZF3MuSETYTZmFfJAHqZEM8MVlvfG7BEUcgvtwoCTxBp6hm3g==", + "dev": true + }, + "node_modules/@types/chai-subset": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@types/chai-subset/-/chai-subset-1.3.3.tgz", + "integrity": "sha512-frBecisrNGz+F4T6bcc+NLeolfiojh5FxW2klu669+8BARtyQv2C/GkNW6FUodVe4BroGMP/wER/YDGc7rEllw==", + "dev": true, + "dependencies": { + "@types/chai": "*" + } + }, "node_modules/@types/fs-extra": { "version": "9.0.13", "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-9.0.13.tgz", @@ -5602,9 +5672,9 @@ "dev": true }, "node_modules/@types/sinonjs__fake-timers": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.1.tgz", - "integrity": "sha512-0kSuKjAS0TrGLJ0M/+8MaFkGsQhZpB6pxOmvS3K8FYI72K//YmdfoW9X2qPsAKh1mkwxGD5zib9s1FIFed6E8g==", + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-6.0.4.tgz", + "integrity": "sha512-IFQTJARgMUBF+xVd2b+hIgXWrZEjND3vJtRCvIelcFB5SIXfjV4bOHbHJ0eXKh+0COrBRc8MqteKAz/j88rE0A==", "dev": true }, "node_modules/@types/sizzle": { @@ -6524,6 +6594,15 @@ "node": ">=0.8" } }, + "node_modules/assertion-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", + "dev": true, + "engines": { + "node": "*" + } + }, "node_modules/assign-symbols": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", @@ -7349,6 +7428,24 @@ "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", "dev": true }, + "node_modules/chai": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.6.tgz", + "integrity": "sha512-bbcp3YfHCUzMOvKqsztczerVgBKSsEijCySNlHHbX3VG1nskvqjz5Rfso1gGwD6w6oOV3eI60pKuMOV5MV7p3Q==", + "dev": true, + "dependencies": { + "assertion-error": "^1.1.0", + "check-error": "^1.0.2", + "deep-eql": "^3.0.1", + "get-func-name": "^2.0.0", + "loupe": "^2.3.1", + "pathval": "^1.1.1", + "type-detect": "^4.0.5" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -7420,6 +7517,15 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/check-error": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", + "integrity": "sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA==", + "dev": true, + "engines": { + "node": "*" + } + }, "node_modules/check-more-types": { "version": "2.24.0", "resolved": "https://registry.npmjs.org/check-more-types/-/check-more-types-2.24.0.tgz", @@ -7429,6 +7535,214 @@ "node": ">= 0.8.0" } }, + "node_modules/cheerio": { + "version": "1.0.0-rc.12", + "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.12.tgz", + "integrity": "sha512-VqR8m68vM46BNnuZ5NtnGBKIE/DfN0cRIzg9n40EIq9NOv90ayxLBXA8fXC5gquFRGJSTRqBq25Jt2ECLR431Q==", + "dev": true, + "dependencies": { + "cheerio-select": "^2.1.0", + "dom-serializer": "^2.0.0", + "domhandler": "^5.0.3", + "domutils": "^3.0.1", + "htmlparser2": "^8.0.1", + "parse5": "^7.0.0", + "parse5-htmlparser2-tree-adapter": "^7.0.0" + }, + "engines": { + "node": ">= 6" + }, + "funding": { + "url": "https://github.com/cheeriojs/cheerio?sponsor=1" + } + }, + "node_modules/cheerio-select": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cheerio-select/-/cheerio-select-2.1.0.tgz", + "integrity": "sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g==", + "dev": true, + "dependencies": { + "boolbase": "^1.0.0", + "css-select": "^5.1.0", + "css-what": "^6.1.0", + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3", + "domutils": "^3.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" + } + }, + "node_modules/cheerio-select/node_modules/css-select": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.1.0.tgz", + "integrity": "sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg==", + "dev": true, + "dependencies": { + "boolbase": "^1.0.0", + "css-what": "^6.1.0", + "domhandler": "^5.0.2", + "domutils": "^3.0.1", + "nth-check": "^2.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" + } + }, + "node_modules/cheerio-select/node_modules/dom-serializer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", + "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", + "dev": true, + "dependencies": { + "domelementtype": "^2.3.0", + "domhandler": "^5.0.2", + "entities": "^4.2.0" + }, + "funding": { + "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" + } + }, + "node_modules/cheerio-select/node_modules/domhandler": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", + "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", + "dev": true, + "dependencies": { + "domelementtype": "^2.3.0" + }, + "engines": { + "node": ">= 4" + }, + "funding": { + "url": "https://github.com/fb55/domhandler?sponsor=1" + } + }, + "node_modules/cheerio-select/node_modules/domutils": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.0.1.tgz", + "integrity": "sha512-z08c1l761iKhDFtfXO04C7kTdPBLi41zwOZl00WS8b5eiaebNpY00HKbztwBq+e3vyqWNwWF3mP9YLUeqIrF+Q==", + "dev": true, + "dependencies": { + "dom-serializer": "^2.0.0", + "domelementtype": "^2.3.0", + "domhandler": "^5.0.1" + }, + "funding": { + "url": "https://github.com/fb55/domutils?sponsor=1" + } + }, + "node_modules/cheerio-select/node_modules/entities": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.4.0.tgz", + "integrity": "sha512-oYp7156SP8LkeGD0GF85ad1X9Ai79WtRsZ2gxJqtBuzH+98YUV6jkHEKlZkMbcrjJjIVJNIDP/3WL9wQkoPbWA==", + "dev": true, + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/cheerio/node_modules/dom-serializer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", + "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", + "dev": true, + "dependencies": { + "domelementtype": "^2.3.0", + "domhandler": "^5.0.2", + "entities": "^4.2.0" + }, + "funding": { + "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" + } + }, + "node_modules/cheerio/node_modules/domhandler": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", + "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", + "dev": true, + "dependencies": { + "domelementtype": "^2.3.0" + }, + "engines": { + "node": ">= 4" + }, + "funding": { + "url": "https://github.com/fb55/domhandler?sponsor=1" + } + }, + "node_modules/cheerio/node_modules/domutils": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.0.1.tgz", + "integrity": "sha512-z08c1l761iKhDFtfXO04C7kTdPBLi41zwOZl00WS8b5eiaebNpY00HKbztwBq+e3vyqWNwWF3mP9YLUeqIrF+Q==", + "dev": true, + "dependencies": { + "dom-serializer": "^2.0.0", + "domelementtype": "^2.3.0", + "domhandler": "^5.0.1" + }, + "funding": { + "url": "https://github.com/fb55/domutils?sponsor=1" + } + }, + "node_modules/cheerio/node_modules/entities": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.4.0.tgz", + "integrity": "sha512-oYp7156SP8LkeGD0GF85ad1X9Ai79WtRsZ2gxJqtBuzH+98YUV6jkHEKlZkMbcrjJjIVJNIDP/3WL9wQkoPbWA==", + "dev": true, + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/cheerio/node_modules/htmlparser2": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-8.0.1.tgz", + "integrity": "sha512-4lVbmc1diZC7GUJQtRQ5yBAeUCL1exyMwmForWkRLnwyzWBFxN633SALPMGYaWZvKe9j1pRZJpauvmxENSp/EA==", + "dev": true, + "funding": [ + "https://github.com/fb55/htmlparser2?sponsor=1", + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ], + "dependencies": { + "domelementtype": "^2.3.0", + "domhandler": "^5.0.2", + "domutils": "^3.0.1", + "entities": "^4.3.0" + } + }, + "node_modules/cheerio/node_modules/parse5": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.1.tgz", + "integrity": "sha512-kwpuwzB+px5WUg9pyK0IcK/shltJN5/OVhQagxhCQNtT9Y9QRZqNY2e1cmbu/paRh5LMnz/oVTVLBpjFmMZhSg==", + "dev": true, + "dependencies": { + "entities": "^4.4.0" + }, + "funding": { + "url": "https://github.com/inikulin/parse5?sponsor=1" + } + }, + "node_modules/cheerio/node_modules/parse5-htmlparser2-tree-adapter": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.0.0.tgz", + "integrity": "sha512-B77tOZrqqfUfnVcOrUvfdLbz4pu4RopLD/4vmu3HUPswwTA8OH0EMW9BlWR2B0RCoiZRAHEUu7IxeP1Pd1UU+g==", + "dev": true, + "dependencies": { + "domhandler": "^5.0.2", + "parse5": "^7.0.0" + }, + "funding": { + "url": "https://github.com/inikulin/parse5?sponsor=1" + } + }, "node_modules/chokidar": { "version": "3.5.3", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", @@ -9146,26 +9460,25 @@ "link": true }, "node_modules/cypress": { - "version": "9.7.0", - "resolved": "https://registry.npmjs.org/cypress/-/cypress-9.7.0.tgz", - "integrity": "sha512-+1EE1nuuuwIt/N1KXRR2iWHU+OiIt7H28jJDyyI4tiUftId/DrXYEwoDa5+kH2pki1zxnA0r6HrUGHV5eLbF5Q==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/cypress/-/cypress-9.0.0.tgz", + "integrity": "sha512-/93SWBZTw7BjFZ+I9S8SqkFYZx7VhedDjTtRBmXO0VzTeDbmxgK/snMJm/VFjrqk/caWbI+XY4Qr80myDMQvYg==", "dev": true, "hasInstallScript": true, "dependencies": { - "@cypress/request": "^2.88.10", + "@cypress/request": "^2.88.7", "@cypress/xvfb": "^1.2.4", "@types/node": "^14.14.31", - "@types/sinonjs__fake-timers": "8.1.1", + "@types/sinonjs__fake-timers": "^6.0.2", "@types/sizzle": "^2.3.2", "arch": "^2.2.0", "blob-util": "^2.0.2", "bluebird": "^3.7.2", - "buffer": "^5.6.0", "cachedir": "^2.3.0", "chalk": "^4.1.0", "check-more-types": "^2.24.0", "cli-cursor": "^3.1.0", - "cli-table3": "~0.6.1", + "cli-table3": "~0.6.0", "commander": "^5.1.0", "common-tags": "^1.8.0", "dayjs": "^1.10.4", @@ -9184,15 +9497,15 @@ "listr2": "^3.8.3", "lodash": "^4.17.21", "log-symbols": "^4.0.0", - "minimist": "^1.2.6", + "minimist": "^1.2.5", "ospath": "^1.2.2", "pretty-bytes": "^5.6.0", "proxy-from-env": "1.0.0", "request-progress": "^3.0.0", - "semver": "^7.3.2", "supports-color": "^8.1.1", "tmp": "~0.2.1", "untildify": "^4.0.0", + "url": "^0.11.0", "yauzl": "^2.10.0" }, "bin": { @@ -9342,21 +9655,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/cypress/node_modules/semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/cypress/node_modules/strip-final-newline": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", @@ -9522,6 +9820,18 @@ "integrity": "sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw=", "dev": true }, + "node_modules/deep-eql": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", + "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", + "dev": true, + "dependencies": { + "type-detect": "^4.0.0" + }, + "engines": { + "node": ">=0.12" + } + }, "node_modules/deep-equal": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz", @@ -10224,6 +10534,363 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/esbuild": { + "version": "0.15.9", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.15.9.tgz", + "integrity": "sha512-OnYr1rkMVxtmMHIAKZLMcEUlJmqcbxBz9QoBU8G9v455na0fuzlT/GLu6l+SRghrk0Mm2fSSciMmzV43Q8e0Gg==", + "dev": true, + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/android-arm": "0.15.9", + "@esbuild/linux-loong64": "0.15.9", + "esbuild-android-64": "0.15.9", + "esbuild-android-arm64": "0.15.9", + "esbuild-darwin-64": "0.15.9", + "esbuild-darwin-arm64": "0.15.9", + "esbuild-freebsd-64": "0.15.9", + "esbuild-freebsd-arm64": "0.15.9", + "esbuild-linux-32": "0.15.9", + "esbuild-linux-64": "0.15.9", + "esbuild-linux-arm": "0.15.9", + "esbuild-linux-arm64": "0.15.9", + "esbuild-linux-mips64le": "0.15.9", + "esbuild-linux-ppc64le": "0.15.9", + "esbuild-linux-riscv64": "0.15.9", + "esbuild-linux-s390x": "0.15.9", + "esbuild-netbsd-64": "0.15.9", + "esbuild-openbsd-64": "0.15.9", + "esbuild-sunos-64": "0.15.9", + "esbuild-windows-32": "0.15.9", + "esbuild-windows-64": "0.15.9", + "esbuild-windows-arm64": "0.15.9" + } + }, + "node_modules/esbuild-android-64": { + "version": "0.15.9", + "resolved": "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.15.9.tgz", + "integrity": "sha512-HQCX7FJn9T4kxZQkhPjNZC7tBWZqJvhlLHPU2SFzrQB/7nDXjmTIFpFTjt7Bd1uFpeXmuwf5h5fZm+x/hLnhbw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-android-arm64": { + "version": "0.15.9", + "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.15.9.tgz", + "integrity": "sha512-E6zbLfqbFVCNEKircSHnPiSTsm3fCRxeIMPfrkS33tFjIAoXtwegQfVZqMGR0FlsvVxp2NEDOUz+WW48COCjSg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-darwin-64": { + "version": "0.15.9", + "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.15.9.tgz", + "integrity": "sha512-gI7dClcDN/HHVacZhTmGjl0/TWZcGuKJ0I7/xDGJwRQQn7aafZGtvagOFNmuOq+OBFPhlPv1T6JElOXb0unkSQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-darwin-arm64": { + "version": "0.15.9", + "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.15.9.tgz", + "integrity": "sha512-VZIMlcRN29yg/sv7DsDwN+OeufCcoTNaTl3Vnav7dL/nvsApD7uvhVRbgyMzv0zU/PP0xRhhIpTyc7lxEzHGSw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-freebsd-64": { + "version": "0.15.9", + "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.15.9.tgz", + "integrity": "sha512-uM4z5bTvuAXqPxrI204txhlsPIolQPWRMLenvGuCPZTnnGlCMF2QLs0Plcm26gcskhxewYo9LkkmYSS5Czrb5A==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-freebsd-arm64": { + "version": "0.15.9", + "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.15.9.tgz", + "integrity": "sha512-HHDjT3O5gWzicGdgJ5yokZVN9K9KG05SnERwl9nBYZaCjcCgj/sX8Ps1jvoFSfNCO04JSsHSOWo4qvxFuj8FoA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-linux-32": { + "version": "0.15.9", + "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.15.9.tgz", + "integrity": "sha512-AQIdE8FugGt1DkcekKi5ycI46QZpGJ/wqcMr7w6YUmOmp2ohQ8eO4sKUsOxNOvYL7hGEVwkndSyszR6HpVHLFg==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-linux-64": { + "version": "0.15.9", + "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.15.9.tgz", + "integrity": "sha512-4RXjae7g6Qs7StZyiYyXTZXBlfODhb1aBVAjd+ANuPmMhWthQilWo7rFHwJwL7DQu1Fjej2sODAVwLbcIVsAYQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-linux-arm": { + "version": "0.15.9", + "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.15.9.tgz", + "integrity": "sha512-3Zf2GVGUOI7XwChH3qrnTOSqfV1V4CAc/7zLVm4lO6JT6wbJrTgEYCCiNSzziSju+J9Jhf9YGWk/26quWPC6yQ==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-linux-arm64": { + "version": "0.15.9", + "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.15.9.tgz", + "integrity": "sha512-a+bTtxJmYmk9d+s2W4/R1SYKDDAldOKmWjWP0BnrWtDbvUBNOm++du0ysPju4mZVoEFgS1yLNW+VXnG/4FNwdQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-linux-mips64le": { + "version": "0.15.9", + "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.15.9.tgz", + "integrity": "sha512-Zn9HSylDp89y+TRREMDoGrc3Z4Hs5u56ozZLQCiZAUx2+HdbbXbWdjmw3FdTJ/i7t5Cew6/Q+6kfO3KCcFGlyw==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-linux-ppc64le": { + "version": "0.15.9", + "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.15.9.tgz", + "integrity": "sha512-OEiOxNAMH9ENFYqRsWUj3CWyN3V8P3ZXyfNAtX5rlCEC/ERXrCEFCJji/1F6POzsXAzxvUJrTSTCy7G6BhA6Fw==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-linux-riscv64": { + "version": "0.15.9", + "resolved": "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.15.9.tgz", + "integrity": "sha512-ukm4KsC3QRausEFjzTsOZ/qqazw0YvJsKmfoZZm9QW27OHjk2XKSQGGvx8gIEswft/Sadp03/VZvAaqv5AIwNA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-linux-s390x": { + "version": "0.15.9", + "resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.15.9.tgz", + "integrity": "sha512-uDOQEH55wQ6ahcIKzQr3VyjGc6Po/xblLGLoUk3fVL1qjlZAibtQr6XRfy5wPJLu/M2o0vQKLq4lyJ2r1tWKcw==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-netbsd-64": { + "version": "0.15.9", + "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.15.9.tgz", + "integrity": "sha512-yWgxaYTQz+TqX80wXRq6xAtb7GSBAp6gqLKfOdANg9qEmAI1Bxn04IrQr0Mzm4AhxvGKoHzjHjMgXbCCSSDxcw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-openbsd-64": { + "version": "0.15.9", + "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.15.9.tgz", + "integrity": "sha512-JmS18acQl4iSAjrEha1MfEmUMN4FcnnrtTaJ7Qg0tDCOcgpPPQRLGsZqhes0vmx8VA6IqRyScqXvaL7+Q0Uf3A==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-sunos-64": { + "version": "0.15.9", + "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.15.9.tgz", + "integrity": "sha512-UKynGSWpzkPmXW3D2UMOD9BZPIuRaSqphxSCwScfEE05Be3KAmvjsBhht1fLzKpiFVJb0BYMd4jEbWMyJ/z1hQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-windows-32": { + "version": "0.15.9", + "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.15.9.tgz", + "integrity": "sha512-aqXvu4/W9XyTVqO/hw3rNxKE1TcZiEYHPsXM9LwYmKSX9/hjvfIJzXwQBlPcJ/QOxedfoMVH0YnhhQ9Ffb0RGA==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-windows-64": { + "version": "0.15.9", + "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.15.9.tgz", + "integrity": "sha512-zm7h91WUmlS4idMtjvCrEeNhlH7+TNOmqw5dJPJZrgFaxoFyqYG6CKDpdFCQXdyKpD5yvzaQBOMVTCBVKGZDEg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-windows-arm64": { + "version": "0.15.9", + "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.15.9.tgz", + "integrity": "sha512-yQEVIv27oauAtvtuhJVfSNMztJJX47ismRS6Sv2QMVV9RM+6xjbMWuuwM2nxr5A2/gj/mu2z9YlQxiwoFRCfZA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, "node_modules/escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", @@ -11589,9 +12256,9 @@ } }, "node_modules/eventemitter2": { - "version": "6.4.5", - "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-6.4.5.tgz", - "integrity": "sha512-bXE7Dyc1i6oQElDG0jMRZJrRAn9QR2xyyFGmBdZleNmyQX0FqGYmhZIrIrpPfm/w//LTo4tVQGOGQcGCb5q9uw==", + "version": "6.4.7", + "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-6.4.7.tgz", + "integrity": "sha512-tYUSVOGeQPKt/eC1ABfhHy5Xd96N3oIijJvN3O9+TsC28T5V9yX9oEfEK5faP0EFSNVOG97qtAS68GBrQB2hDg==", "dev": true }, "node_modules/execa": { @@ -12359,6 +13026,15 @@ "node": "6.* || 8.* || >= 10.*" } }, + "node_modules/get-func-name": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", + "integrity": "sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==", + "dev": true, + "engines": { + "node": "*" + } + }, "node_modules/get-intrinsic": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", @@ -15761,6 +16437,18 @@ "node": ">=10" } }, + "node_modules/local-pkg": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/local-pkg/-/local-pkg-0.4.2.tgz", + "integrity": "sha512-mlERgSPrbxU3BP4qBqAvvwlgW4MTg78iwJdGGnv7kibKjWcJksrG3t6LB5lXI93wXRDvG4NpUgJFmTG4T6rdrg==", + "dev": true, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, "node_modules/local-plugin": { "resolved": "demos/plugin-wrapper", "link": true @@ -16084,6 +16772,15 @@ "loose-envify": "cli.js" } }, + "node_modules/loupe": { + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.4.tgz", + "integrity": "sha512-OvKfgCC2Ndby6aSTREl5aCCPTNIzlDfQZvZxNUrBrihDhL3xcrYegTblhmEiCrg2kKQz4XsFIaemE5BF4ybSaQ==", + "dev": true, + "dependencies": { + "get-func-name": "^2.0.0" + } + }, "node_modules/lowercase-keys": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", @@ -18793,6 +19490,15 @@ "resolved": "https://registry.npmjs.org/pathe/-/pathe-0.2.0.tgz", "integrity": "sha512-sTitTPYnn23esFR3RlqYBWn4c45WGeLcsKzQiUpXJAyfcWkolvlYpV8FLo7JishK946oQwMFUCHXQ9AjGPKExw==" }, + "node_modules/pathval": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", + "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", + "dev": true, + "engines": { + "node": "*" + } + }, "node_modules/pause-stream": { "version": "0.0.11", "resolved": "https://registry.npmjs.org/pause-stream/-/pause-stream-0.0.11.tgz", @@ -18875,6 +19581,34 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/playwright-chromium": { + "version": "1.26.1", + "resolved": "https://registry.npmjs.org/playwright-chromium/-/playwright-chromium-1.26.1.tgz", + "integrity": "sha512-F38TvJWkrP7aLJ99AeZFSad0FKjOjudhdBsFr91cJkO28sEEy2VEiUJtk3ezu3a55S9Ka/kMJ1gM1msM3hDkGA==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "playwright-core": "1.26.1" + }, + "bin": { + "playwright": "cli.js" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/playwright-core": { + "version": "1.26.1", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.26.1.tgz", + "integrity": "sha512-hzFchhhxnEiPc4qVPs9q2ZR+5eKNifY2hQDHtg1HnTTUuphYCBP8ZRb2si+B1TR7BHirgXaPi48LIye5SgrLAA==", + "dev": true, + "bin": { + "playwright": "cli.js" + }, + "engines": { + "node": ">=14" + } + }, "node_modules/pluralize": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", @@ -19353,6 +20087,16 @@ "node": ">=0.6" } }, + "node_modules/querystring": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha512-X/xY82scca2tau62i9mDyU9K+I+djTMUsvwf7xnUX5GLvVzgJybOJf4Y6o9Zx3oJK/LSXg5tTZBjwzqVPaPO2g==", + "deprecated": "The querystring API is considered Legacy. new code should use the URLSearchParams API instead.", + "dev": true, + "engines": { + "node": ">=0.4.x" + } + }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -20259,6 +21003,21 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/rollup": { + "version": "2.78.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.78.1.tgz", + "integrity": "sha512-VeeCgtGi4P+o9hIg+xz4qQpRl6R401LWEXBmxYKOV4zlF82lyhgh2hTZnheFUbANE8l2A41F458iwj2vEYaXJg==", + "dev": true, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=10.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, "node_modules/rollup-pluginutils": { "version": "2.8.2", "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz", @@ -21499,6 +22258,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/strip-literal": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-0.4.2.tgz", + "integrity": "sha512-pv48ybn4iE1O9RLgCAN0iU4Xv7RlBTiit6DKmMiErbs9x1wH6vXBs45tWc0H5wUIF6TLTrKweqkmYF/iraQKNw==", + "dev": true, + "dependencies": { + "acorn": "^8.8.0" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, "node_modules/styled-jsx": { "version": "5.0.7", "resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.0.7.tgz", @@ -21816,6 +22587,30 @@ "resolved": "https://registry.npmjs.org/tiny-warning/-/tiny-warning-1.0.3.tgz", "integrity": "sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA==" }, + "node_modules/tinybench": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.2.1.tgz", + "integrity": "sha512-VxB1P8DUhpCC1j2WtKgFYpv3SwU7vtnfmG29cK7hXcqyD7lLiq6SYCVpDceoAT99mvTN+V8Ay4OdtZQbB72+Sw==", + "dev": true + }, + "node_modules/tinypool": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-0.3.0.tgz", + "integrity": "sha512-NX5KeqHOBZU6Bc0xj9Vr5Szbb1j8tUHIeD18s41aDJaPeC5QTdEhK0SpdpUrZlj2nv5cctNcSjaKNanXlfcVEQ==", + "dev": true, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/tinyspy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-1.0.2.tgz", + "integrity": "sha512-bSGlgwLBYf7PnUsQ6WOc6SJ3pGOcd+d8AA6EUnLDDM0kWEstC1JIlSZA3UNliDXhd9ABoS7hiRBDCu+XP/sf1Q==", + "dev": true, + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/tmp": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz", @@ -22095,6 +22890,15 @@ "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", "dev": true }, + "node_modules/tunnel": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", + "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==", + "dev": true, + "engines": { + "node": ">=0.6.11 <=0.7.0 || >=0.7.3" + } + }, "node_modules/tunnel-agent": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", @@ -22538,6 +23342,16 @@ "deprecated": "Please see https://github.com/lydell/urix#deprecated", "dev": true }, + "node_modules/url": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", + "integrity": "sha512-kbailJa29QrtXnxgq+DdCEGlbTeYM2eJUxsz6vjZavrCYPMIFHMKQmSKYAIuUK2i7hgPm28a8piX5NTUtM/LKQ==", + "dev": true, + "dependencies": { + "punycode": "1.3.2", + "querystring": "0.2.0" + } + }, "node_modules/url-parse-lax": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", @@ -22550,6 +23364,12 @@ "node": ">=4" } }, + "node_modules/url/node_modules/punycode": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha512-RofWgt/7fL5wP1Y7fxE7/EmTLzQVnB0ycyibJ0OOHIlJqTNzglYFxVwETOcIoJqJmpDXJ9xImDv+Fq34F/d4Dw==", + "dev": true + }, "node_modules/use": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", @@ -22701,6 +23521,155 @@ "extsprintf": "^1.2.0" } }, + "node_modules/vite": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/vite/-/vite-3.1.4.tgz", + "integrity": "sha512-JoQI08aBjY9lycL7jcEq4p9o1xUjq5aRvdH4KWaXtkSx7e7RpAh9D3IjzDWRD4Fg44LS3oDAIOG/Kq1L+82psA==", + "dev": true, + "dependencies": { + "esbuild": "^0.15.6", + "postcss": "^8.4.16", + "resolve": "^1.22.1", + "rollup": "~2.78.0" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + }, + "peerDependencies": { + "less": "*", + "sass": "*", + "stylus": "*", + "terser": "^5.4.0" + }, + "peerDependenciesMeta": { + "less": { + "optional": true + }, + "sass": { + "optional": true + }, + "stylus": { + "optional": true + }, + "terser": { + "optional": true + } + } + }, + "node_modules/vite/node_modules/postcss": { + "version": "8.4.16", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.16.tgz", + "integrity": "sha512-ipHE1XBvKzm5xI7hiHCZJCSugxvsdq2mPnsq5+UF+VHCjiBvtDrlxJfMBToWaP9D5XlgNmcFGqoHmUn0EYEaRQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + } + ], + "dependencies": { + "nanoid": "^3.3.4", + "picocolors": "^1.0.0", + "source-map-js": "^1.0.2" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/vite/node_modules/resolve": { + "version": "1.22.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", + "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", + "dev": true, + "dependencies": { + "is-core-module": "^2.9.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/vitest": { + "version": "0.23.4", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-0.23.4.tgz", + "integrity": "sha512-iukBNWqQAv8EKDBUNntspLp9SfpaVFbmzmM0sNcnTxASQZMzRw3PsM6DMlsHiI+I6GeO5/sYDg3ecpC+SNFLrQ==", + "dev": true, + "dependencies": { + "@types/chai": "^4.3.3", + "@types/chai-subset": "^1.3.3", + "@types/node": "*", + "chai": "^4.3.6", + "debug": "^4.3.4", + "local-pkg": "^0.4.2", + "strip-literal": "^0.4.1", + "tinybench": "^2.1.5", + "tinypool": "^0.3.0", + "tinyspy": "^1.0.2", + "vite": "^2.9.12 || ^3.0.0-0" + }, + "bin": { + "vitest": "vitest.mjs" + }, + "engines": { + "node": ">=v14.16.0" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + }, + "peerDependencies": { + "@edge-runtime/vm": "*", + "@vitest/browser": "*", + "@vitest/ui": "*", + "happy-dom": "*", + "jsdom": "*" + }, + "peerDependenciesMeta": { + "@edge-runtime/vm": { + "optional": true + }, + "@vitest/browser": { + "optional": true + }, + "@vitest/ui": { + "optional": true + }, + "happy-dom": { + "optional": true + }, + "jsdom": { + "optional": true + } + } + }, + "node_modules/vitest-github-actions-reporter": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/vitest-github-actions-reporter/-/vitest-github-actions-reporter-0.8.3.tgz", + "integrity": "sha512-3mpZil8jAiWGt+w5NWzrewcPnXlUiUujMmjeZ0zhcva7cNW6k8DyMIBiq3bRGkhEL1FoG1sHFUj8/ONXnhGvZQ==", + "dev": true, + "dependencies": { + "@actions/core": "^1.9.1" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "vitest": ">=0.16.0" + } + }, "node_modules/w3c-hr-time": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz", @@ -23513,6 +24482,25 @@ } }, "dependencies": { + "@actions/core": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.9.1.tgz", + "integrity": "sha512-5ad+U2YGrmmiw6du20AQW5XuWo7UKN2052FjSV7MX+Wfjf8sCqcsZe62NfgHys4QI4/Y+vQvLKYL8jWtA1ZBTA==", + "dev": true, + "requires": { + "@actions/http-client": "^2.0.1", + "uuid": "^8.3.2" + } + }, + "@actions/http-client": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.1.tgz", + "integrity": "sha512-PIXiMVtz6VvyaRsGY268qvj57hXQEpsYogYOu2nrQhlf+XCGmZstmuZBbAybUl1nQGnvS1k1eEsQ69ZoD7xlSw==", + "dev": true, + "requires": { + "tunnel": "^0.0.6" + } + }, "@ampproject/remapping": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.1.2.tgz", @@ -25258,6 +26246,20 @@ "matcher": "^1.1.1" } }, + "@esbuild/android-arm": { + "version": "0.15.9", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.15.9.tgz", + "integrity": "sha512-VZPy/ETF3fBG5PiinIkA0W/tlsvlEgJccyN2DzWZEl0DlVKRbu91PvY2D6Lxgluj4w9QtYHjOWjAT44C+oQ+EQ==", + "dev": true, + "optional": true + }, + "@esbuild/linux-loong64": { + "version": "0.15.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.15.9.tgz", + "integrity": "sha512-O+NfmkfRrb3uSsTa4jE3WApidSe3N5++fyOVGP1SmMZi4A3BZELkhUUvj5hwmMuNdlpzAZ8iAPz2vmcR7DCFQA==", + "dev": true, + "optional": true + }, "@eslint/eslintrc": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.0.tgz", @@ -26949,6 +27951,21 @@ "@types/responselike": "*" } }, + "@types/chai": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.3.tgz", + "integrity": "sha512-hC7OMnszpxhZPduX+m+nrx+uFoLkWOMiR4oa/AZF3MuSETYTZmFfJAHqZEM8MVlvfG7BEUcgvtwoCTxBp6hm3g==", + "dev": true + }, + "@types/chai-subset": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@types/chai-subset/-/chai-subset-1.3.3.tgz", + "integrity": "sha512-frBecisrNGz+F4T6bcc+NLeolfiojh5FxW2klu669+8BARtyQv2C/GkNW6FUodVe4BroGMP/wER/YDGc7rEllw==", + "dev": true, + "requires": { + "@types/chai": "*" + } + }, "@types/fs-extra": { "version": "9.0.13", "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-9.0.13.tgz", @@ -27143,9 +28160,9 @@ "dev": true }, "@types/sinonjs__fake-timers": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.1.tgz", - "integrity": "sha512-0kSuKjAS0TrGLJ0M/+8MaFkGsQhZpB6pxOmvS3K8FYI72K//YmdfoW9X2qPsAKh1mkwxGD5zib9s1FIFed6E8g==", + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-6.0.4.tgz", + "integrity": "sha512-IFQTJARgMUBF+xVd2b+hIgXWrZEjND3vJtRCvIelcFB5SIXfjV4bOHbHJ0eXKh+0COrBRc8MqteKAz/j88rE0A==", "dev": true }, "@types/sizzle": { @@ -27794,6 +28811,12 @@ "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", "dev": true }, + "assertion-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", + "dev": true + }, "assign-symbols": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", @@ -28430,6 +29453,21 @@ "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", "dev": true }, + "chai": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.6.tgz", + "integrity": "sha512-bbcp3YfHCUzMOvKqsztczerVgBKSsEijCySNlHHbX3VG1nskvqjz5Rfso1gGwD6w6oOV3eI60pKuMOV5MV7p3Q==", + "dev": true, + "requires": { + "assertion-error": "^1.1.0", + "check-error": "^1.0.2", + "deep-eql": "^3.0.1", + "get-func-name": "^2.0.0", + "loupe": "^2.3.1", + "pathval": "^1.1.1", + "type-detect": "^4.0.5" + } + }, "chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -28479,12 +29517,169 @@ "integrity": "sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg==", "dev": true }, + "check-error": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", + "integrity": "sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA==", + "dev": true + }, "check-more-types": { "version": "2.24.0", "resolved": "https://registry.npmjs.org/check-more-types/-/check-more-types-2.24.0.tgz", "integrity": "sha1-FCD/sQ/URNz8ebQ4kbv//TKoRgA=", "dev": true }, + "cheerio": { + "version": "1.0.0-rc.12", + "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.12.tgz", + "integrity": "sha512-VqR8m68vM46BNnuZ5NtnGBKIE/DfN0cRIzg9n40EIq9NOv90ayxLBXA8fXC5gquFRGJSTRqBq25Jt2ECLR431Q==", + "dev": true, + "requires": { + "cheerio-select": "^2.1.0", + "dom-serializer": "^2.0.0", + "domhandler": "^5.0.3", + "domutils": "^3.0.1", + "htmlparser2": "^8.0.1", + "parse5": "^7.0.0", + "parse5-htmlparser2-tree-adapter": "^7.0.0" + }, + "dependencies": { + "dom-serializer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", + "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", + "dev": true, + "requires": { + "domelementtype": "^2.3.0", + "domhandler": "^5.0.2", + "entities": "^4.2.0" + } + }, + "domhandler": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", + "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", + "dev": true, + "requires": { + "domelementtype": "^2.3.0" + } + }, + "domutils": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.0.1.tgz", + "integrity": "sha512-z08c1l761iKhDFtfXO04C7kTdPBLi41zwOZl00WS8b5eiaebNpY00HKbztwBq+e3vyqWNwWF3mP9YLUeqIrF+Q==", + "dev": true, + "requires": { + "dom-serializer": "^2.0.0", + "domelementtype": "^2.3.0", + "domhandler": "^5.0.1" + } + }, + "entities": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.4.0.tgz", + "integrity": "sha512-oYp7156SP8LkeGD0GF85ad1X9Ai79WtRsZ2gxJqtBuzH+98YUV6jkHEKlZkMbcrjJjIVJNIDP/3WL9wQkoPbWA==", + "dev": true + }, + "htmlparser2": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-8.0.1.tgz", + "integrity": "sha512-4lVbmc1diZC7GUJQtRQ5yBAeUCL1exyMwmForWkRLnwyzWBFxN633SALPMGYaWZvKe9j1pRZJpauvmxENSp/EA==", + "dev": true, + "requires": { + "domelementtype": "^2.3.0", + "domhandler": "^5.0.2", + "domutils": "^3.0.1", + "entities": "^4.3.0" + } + }, + "parse5": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.1.tgz", + "integrity": "sha512-kwpuwzB+px5WUg9pyK0IcK/shltJN5/OVhQagxhCQNtT9Y9QRZqNY2e1cmbu/paRh5LMnz/oVTVLBpjFmMZhSg==", + "dev": true, + "requires": { + "entities": "^4.4.0" + } + }, + "parse5-htmlparser2-tree-adapter": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.0.0.tgz", + "integrity": "sha512-B77tOZrqqfUfnVcOrUvfdLbz4pu4RopLD/4vmu3HUPswwTA8OH0EMW9BlWR2B0RCoiZRAHEUu7IxeP1Pd1UU+g==", + "dev": true, + "requires": { + "domhandler": "^5.0.2", + "parse5": "^7.0.0" + } + } + } + }, + "cheerio-select": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cheerio-select/-/cheerio-select-2.1.0.tgz", + "integrity": "sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g==", + "dev": true, + "requires": { + "boolbase": "^1.0.0", + "css-select": "^5.1.0", + "css-what": "^6.1.0", + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3", + "domutils": "^3.0.1" + }, + "dependencies": { + "css-select": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.1.0.tgz", + "integrity": "sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg==", + "dev": true, + "requires": { + "boolbase": "^1.0.0", + "css-what": "^6.1.0", + "domhandler": "^5.0.2", + "domutils": "^3.0.1", + "nth-check": "^2.0.1" + } + }, + "dom-serializer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", + "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", + "dev": true, + "requires": { + "domelementtype": "^2.3.0", + "domhandler": "^5.0.2", + "entities": "^4.2.0" + } + }, + "domhandler": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", + "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", + "dev": true, + "requires": { + "domelementtype": "^2.3.0" + } + }, + "domutils": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.0.1.tgz", + "integrity": "sha512-z08c1l761iKhDFtfXO04C7kTdPBLi41zwOZl00WS8b5eiaebNpY00HKbztwBq+e3vyqWNwWF3mP9YLUeqIrF+Q==", + "dev": true, + "requires": { + "dom-serializer": "^2.0.0", + "domelementtype": "^2.3.0", + "domhandler": "^5.0.1" + } + }, + "entities": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.4.0.tgz", + "integrity": "sha512-oYp7156SP8LkeGD0GF85ad1X9Ai79WtRsZ2gxJqtBuzH+98YUV6jkHEKlZkMbcrjJjIVJNIDP/3WL9wQkoPbWA==", + "dev": true + } + } + }, "chokidar": { "version": "3.5.3", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", @@ -29839,25 +31034,24 @@ } }, "cypress": { - "version": "9.7.0", - "resolved": "https://registry.npmjs.org/cypress/-/cypress-9.7.0.tgz", - "integrity": "sha512-+1EE1nuuuwIt/N1KXRR2iWHU+OiIt7H28jJDyyI4tiUftId/DrXYEwoDa5+kH2pki1zxnA0r6HrUGHV5eLbF5Q==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/cypress/-/cypress-9.0.0.tgz", + "integrity": "sha512-/93SWBZTw7BjFZ+I9S8SqkFYZx7VhedDjTtRBmXO0VzTeDbmxgK/snMJm/VFjrqk/caWbI+XY4Qr80myDMQvYg==", "dev": true, "requires": { - "@cypress/request": "^2.88.10", + "@cypress/request": "^2.88.7", "@cypress/xvfb": "^1.2.4", "@types/node": "^14.14.31", - "@types/sinonjs__fake-timers": "8.1.1", + "@types/sinonjs__fake-timers": "^6.0.2", "@types/sizzle": "^2.3.2", "arch": "^2.2.0", "blob-util": "^2.0.2", "bluebird": "^3.7.2", - "buffer": "^5.6.0", "cachedir": "^2.3.0", "chalk": "^4.1.0", "check-more-types": "^2.24.0", "cli-cursor": "^3.1.0", - "cli-table3": "~0.6.1", + "cli-table3": "~0.6.0", "commander": "^5.1.0", "common-tags": "^1.8.0", "dayjs": "^1.10.4", @@ -29876,15 +31070,15 @@ "listr2": "^3.8.3", "lodash": "^4.17.21", "log-symbols": "^4.0.0", - "minimist": "^1.2.6", + "minimist": "^1.2.5", "ospath": "^1.2.2", "pretty-bytes": "^5.6.0", "proxy-from-env": "1.0.0", "request-progress": "^3.0.0", - "semver": "^7.3.2", "supports-color": "^8.1.1", "tmp": "~0.2.1", "untildify": "^4.0.0", + "url": "^0.11.0", "yauzl": "^2.10.0" }, "dependencies": { @@ -29983,15 +31177,6 @@ "mimic-fn": "^2.1.0" } }, - "semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } - }, "strip-final-newline": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", @@ -30119,6 +31304,15 @@ "integrity": "sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw=", "dev": true }, + "deep-eql": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", + "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", + "dev": true, + "requires": { + "type-detect": "^4.0.0" + } + }, "deep-equal": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz", @@ -30714,6 +31908,176 @@ "is-symbol": "^1.0.2" } }, + "esbuild": { + "version": "0.15.9", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.15.9.tgz", + "integrity": "sha512-OnYr1rkMVxtmMHIAKZLMcEUlJmqcbxBz9QoBU8G9v455na0fuzlT/GLu6l+SRghrk0Mm2fSSciMmzV43Q8e0Gg==", + "dev": true, + "requires": { + "@esbuild/android-arm": "0.15.9", + "@esbuild/linux-loong64": "0.15.9", + "esbuild-android-64": "0.15.9", + "esbuild-android-arm64": "0.15.9", + "esbuild-darwin-64": "0.15.9", + "esbuild-darwin-arm64": "0.15.9", + "esbuild-freebsd-64": "0.15.9", + "esbuild-freebsd-arm64": "0.15.9", + "esbuild-linux-32": "0.15.9", + "esbuild-linux-64": "0.15.9", + "esbuild-linux-arm": "0.15.9", + "esbuild-linux-arm64": "0.15.9", + "esbuild-linux-mips64le": "0.15.9", + "esbuild-linux-ppc64le": "0.15.9", + "esbuild-linux-riscv64": "0.15.9", + "esbuild-linux-s390x": "0.15.9", + "esbuild-netbsd-64": "0.15.9", + "esbuild-openbsd-64": "0.15.9", + "esbuild-sunos-64": "0.15.9", + "esbuild-windows-32": "0.15.9", + "esbuild-windows-64": "0.15.9", + "esbuild-windows-arm64": "0.15.9" + } + }, + "esbuild-android-64": { + "version": "0.15.9", + "resolved": "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.15.9.tgz", + "integrity": "sha512-HQCX7FJn9T4kxZQkhPjNZC7tBWZqJvhlLHPU2SFzrQB/7nDXjmTIFpFTjt7Bd1uFpeXmuwf5h5fZm+x/hLnhbw==", + "dev": true, + "optional": true + }, + "esbuild-android-arm64": { + "version": "0.15.9", + "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.15.9.tgz", + "integrity": "sha512-E6zbLfqbFVCNEKircSHnPiSTsm3fCRxeIMPfrkS33tFjIAoXtwegQfVZqMGR0FlsvVxp2NEDOUz+WW48COCjSg==", + "dev": true, + "optional": true + }, + "esbuild-darwin-64": { + "version": "0.15.9", + "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.15.9.tgz", + "integrity": "sha512-gI7dClcDN/HHVacZhTmGjl0/TWZcGuKJ0I7/xDGJwRQQn7aafZGtvagOFNmuOq+OBFPhlPv1T6JElOXb0unkSQ==", + "dev": true, + "optional": true + }, + "esbuild-darwin-arm64": { + "version": "0.15.9", + "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.15.9.tgz", + "integrity": "sha512-VZIMlcRN29yg/sv7DsDwN+OeufCcoTNaTl3Vnav7dL/nvsApD7uvhVRbgyMzv0zU/PP0xRhhIpTyc7lxEzHGSw==", + "dev": true, + "optional": true + }, + "esbuild-freebsd-64": { + "version": "0.15.9", + "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.15.9.tgz", + "integrity": "sha512-uM4z5bTvuAXqPxrI204txhlsPIolQPWRMLenvGuCPZTnnGlCMF2QLs0Plcm26gcskhxewYo9LkkmYSS5Czrb5A==", + "dev": true, + "optional": true + }, + "esbuild-freebsd-arm64": { + "version": "0.15.9", + "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.15.9.tgz", + "integrity": "sha512-HHDjT3O5gWzicGdgJ5yokZVN9K9KG05SnERwl9nBYZaCjcCgj/sX8Ps1jvoFSfNCO04JSsHSOWo4qvxFuj8FoA==", + "dev": true, + "optional": true + }, + "esbuild-linux-32": { + "version": "0.15.9", + "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.15.9.tgz", + "integrity": "sha512-AQIdE8FugGt1DkcekKi5ycI46QZpGJ/wqcMr7w6YUmOmp2ohQ8eO4sKUsOxNOvYL7hGEVwkndSyszR6HpVHLFg==", + "dev": true, + "optional": true + }, + "esbuild-linux-64": { + "version": "0.15.9", + "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.15.9.tgz", + "integrity": "sha512-4RXjae7g6Qs7StZyiYyXTZXBlfODhb1aBVAjd+ANuPmMhWthQilWo7rFHwJwL7DQu1Fjej2sODAVwLbcIVsAYQ==", + "dev": true, + "optional": true + }, + "esbuild-linux-arm": { + "version": "0.15.9", + "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.15.9.tgz", + "integrity": "sha512-3Zf2GVGUOI7XwChH3qrnTOSqfV1V4CAc/7zLVm4lO6JT6wbJrTgEYCCiNSzziSju+J9Jhf9YGWk/26quWPC6yQ==", + "dev": true, + "optional": true + }, + "esbuild-linux-arm64": { + "version": "0.15.9", + "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.15.9.tgz", + "integrity": "sha512-a+bTtxJmYmk9d+s2W4/R1SYKDDAldOKmWjWP0BnrWtDbvUBNOm++du0ysPju4mZVoEFgS1yLNW+VXnG/4FNwdQ==", + "dev": true, + "optional": true + }, + "esbuild-linux-mips64le": { + "version": "0.15.9", + "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.15.9.tgz", + "integrity": "sha512-Zn9HSylDp89y+TRREMDoGrc3Z4Hs5u56ozZLQCiZAUx2+HdbbXbWdjmw3FdTJ/i7t5Cew6/Q+6kfO3KCcFGlyw==", + "dev": true, + "optional": true + }, + "esbuild-linux-ppc64le": { + "version": "0.15.9", + "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.15.9.tgz", + "integrity": "sha512-OEiOxNAMH9ENFYqRsWUj3CWyN3V8P3ZXyfNAtX5rlCEC/ERXrCEFCJji/1F6POzsXAzxvUJrTSTCy7G6BhA6Fw==", + "dev": true, + "optional": true + }, + "esbuild-linux-riscv64": { + "version": "0.15.9", + "resolved": "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.15.9.tgz", + "integrity": "sha512-ukm4KsC3QRausEFjzTsOZ/qqazw0YvJsKmfoZZm9QW27OHjk2XKSQGGvx8gIEswft/Sadp03/VZvAaqv5AIwNA==", + "dev": true, + "optional": true + }, + "esbuild-linux-s390x": { + "version": "0.15.9", + "resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.15.9.tgz", + "integrity": "sha512-uDOQEH55wQ6ahcIKzQr3VyjGc6Po/xblLGLoUk3fVL1qjlZAibtQr6XRfy5wPJLu/M2o0vQKLq4lyJ2r1tWKcw==", + "dev": true, + "optional": true + }, + "esbuild-netbsd-64": { + "version": "0.15.9", + "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.15.9.tgz", + "integrity": "sha512-yWgxaYTQz+TqX80wXRq6xAtb7GSBAp6gqLKfOdANg9qEmAI1Bxn04IrQr0Mzm4AhxvGKoHzjHjMgXbCCSSDxcw==", + "dev": true, + "optional": true + }, + "esbuild-openbsd-64": { + "version": "0.15.9", + "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.15.9.tgz", + "integrity": "sha512-JmS18acQl4iSAjrEha1MfEmUMN4FcnnrtTaJ7Qg0tDCOcgpPPQRLGsZqhes0vmx8VA6IqRyScqXvaL7+Q0Uf3A==", + "dev": true, + "optional": true + }, + "esbuild-sunos-64": { + "version": "0.15.9", + "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.15.9.tgz", + "integrity": "sha512-UKynGSWpzkPmXW3D2UMOD9BZPIuRaSqphxSCwScfEE05Be3KAmvjsBhht1fLzKpiFVJb0BYMd4jEbWMyJ/z1hQ==", + "dev": true, + "optional": true + }, + "esbuild-windows-32": { + "version": "0.15.9", + "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.15.9.tgz", + "integrity": "sha512-aqXvu4/W9XyTVqO/hw3rNxKE1TcZiEYHPsXM9LwYmKSX9/hjvfIJzXwQBlPcJ/QOxedfoMVH0YnhhQ9Ffb0RGA==", + "dev": true, + "optional": true + }, + "esbuild-windows-64": { + "version": "0.15.9", + "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.15.9.tgz", + "integrity": "sha512-zm7h91WUmlS4idMtjvCrEeNhlH7+TNOmqw5dJPJZrgFaxoFyqYG6CKDpdFCQXdyKpD5yvzaQBOMVTCBVKGZDEg==", + "dev": true, + "optional": true + }, + "esbuild-windows-arm64": { + "version": "0.15.9", + "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.15.9.tgz", + "integrity": "sha512-yQEVIv27oauAtvtuhJVfSNMztJJX47ismRS6Sv2QMVV9RM+6xjbMWuuwM2nxr5A2/gj/mu2z9YlQxiwoFRCfZA==", + "dev": true, + "optional": true + }, "escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", @@ -31720,9 +33084,9 @@ } }, "eventemitter2": { - "version": "6.4.5", - "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-6.4.5.tgz", - "integrity": "sha512-bXE7Dyc1i6oQElDG0jMRZJrRAn9QR2xyyFGmBdZleNmyQX0FqGYmhZIrIrpPfm/w//LTo4tVQGOGQcGCb5q9uw==", + "version": "6.4.7", + "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-6.4.7.tgz", + "integrity": "sha512-tYUSVOGeQPKt/eC1ABfhHy5Xd96N3oIijJvN3O9+TsC28T5V9yX9oEfEK5faP0EFSNVOG97qtAS68GBrQB2hDg==", "dev": true }, "execa": { @@ -32320,6 +33684,12 @@ "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true }, + "get-func-name": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", + "integrity": "sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==", + "dev": true + }, "get-intrinsic": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", @@ -34885,6 +36255,12 @@ "array-back": "^4.0.1" } }, + "local-pkg": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/local-pkg/-/local-pkg-0.4.2.tgz", + "integrity": "sha512-mlERgSPrbxU3BP4qBqAvvwlgW4MTg78iwJdGGnv7kibKjWcJksrG3t6LB5lXI93wXRDvG4NpUgJFmTG4T6rdrg==", + "dev": true + }, "local-plugin": { "version": "file:demos/plugin-wrapper", "requires": { @@ -35154,6 +36530,15 @@ "js-tokens": "^3.0.0 || ^4.0.0" } }, + "loupe": { + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.4.tgz", + "integrity": "sha512-OvKfgCC2Ndby6aSTREl5aCCPTNIzlDfQZvZxNUrBrihDhL3xcrYegTblhmEiCrg2kKQz4XsFIaemE5BF4ybSaQ==", + "dev": true, + "requires": { + "get-func-name": "^2.0.0" + } + }, "lowercase-keys": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", @@ -37241,6 +38626,12 @@ "resolved": "https://registry.npmjs.org/pathe/-/pathe-0.2.0.tgz", "integrity": "sha512-sTitTPYnn23esFR3RlqYBWn4c45WGeLcsKzQiUpXJAyfcWkolvlYpV8FLo7JishK946oQwMFUCHXQ9AjGPKExw==" }, + "pathval": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", + "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", + "dev": true + }, "pause-stream": { "version": "0.0.11", "resolved": "https://registry.npmjs.org/pause-stream/-/pause-stream-0.0.11.tgz", @@ -37299,6 +38690,21 @@ "find-up": "^6.1.0" } }, + "playwright-chromium": { + "version": "1.26.1", + "resolved": "https://registry.npmjs.org/playwright-chromium/-/playwright-chromium-1.26.1.tgz", + "integrity": "sha512-F38TvJWkrP7aLJ99AeZFSad0FKjOjudhdBsFr91cJkO28sEEy2VEiUJtk3ezu3a55S9Ka/kMJ1gM1msM3hDkGA==", + "dev": true, + "requires": { + "playwright-core": "1.26.1" + } + }, + "playwright-core": { + "version": "1.26.1", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.26.1.tgz", + "integrity": "sha512-hzFchhhxnEiPc4qVPs9q2ZR+5eKNifY2hQDHtg1HnTTUuphYCBP8ZRb2si+B1TR7BHirgXaPi48LIye5SgrLAA==", + "dev": true + }, "pluralize": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", @@ -37644,6 +39050,12 @@ "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", "dev": true }, + "querystring": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha512-X/xY82scca2tau62i9mDyU9K+I+djTMUsvwf7xnUX5GLvVzgJybOJf4Y6o9Zx3oJK/LSXg5tTZBjwzqVPaPO2g==", + "dev": true + }, "queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -38325,6 +39737,15 @@ "glob": "^7.1.3" } }, + "rollup": { + "version": "2.78.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.78.1.tgz", + "integrity": "sha512-VeeCgtGi4P+o9hIg+xz4qQpRl6R401LWEXBmxYKOV4zlF82lyhgh2hTZnheFUbANE8l2A41F458iwj2vEYaXJg==", + "dev": true, + "requires": { + "fsevents": "~2.3.2" + } + }, "rollup-pluginutils": { "version": "2.8.2", "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz", @@ -39464,6 +40885,15 @@ "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true }, + "strip-literal": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-0.4.2.tgz", + "integrity": "sha512-pv48ybn4iE1O9RLgCAN0iU4Xv7RlBTiit6DKmMiErbs9x1wH6vXBs45tWc0H5wUIF6TLTrKweqkmYF/iraQKNw==", + "dev": true, + "requires": { + "acorn": "^8.8.0" + } + }, "styled-jsx": { "version": "5.0.7", "resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.0.7.tgz", @@ -39708,6 +41138,24 @@ "resolved": "https://registry.npmjs.org/tiny-warning/-/tiny-warning-1.0.3.tgz", "integrity": "sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA==" }, + "tinybench": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.2.1.tgz", + "integrity": "sha512-VxB1P8DUhpCC1j2WtKgFYpv3SwU7vtnfmG29cK7hXcqyD7lLiq6SYCVpDceoAT99mvTN+V8Ay4OdtZQbB72+Sw==", + "dev": true + }, + "tinypool": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-0.3.0.tgz", + "integrity": "sha512-NX5KeqHOBZU6Bc0xj9Vr5Szbb1j8tUHIeD18s41aDJaPeC5QTdEhK0SpdpUrZlj2nv5cctNcSjaKNanXlfcVEQ==", + "dev": true + }, + "tinyspy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-1.0.2.tgz", + "integrity": "sha512-bSGlgwLBYf7PnUsQ6WOc6SJ3pGOcd+d8AA6EUnLDDM0kWEstC1JIlSZA3UNliDXhd9ABoS7hiRBDCu+XP/sf1Q==", + "dev": true + }, "tmp": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz", @@ -39924,6 +41372,12 @@ } } }, + "tunnel": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", + "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==", + "dev": true + }, "tunnel-agent": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", @@ -40262,6 +41716,24 @@ "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", "dev": true }, + "url": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", + "integrity": "sha512-kbailJa29QrtXnxgq+DdCEGlbTeYM2eJUxsz6vjZavrCYPMIFHMKQmSKYAIuUK2i7hgPm28a8piX5NTUtM/LKQ==", + "dev": true, + "requires": { + "punycode": "1.3.2", + "querystring": "0.2.0" + }, + "dependencies": { + "punycode": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha512-RofWgt/7fL5wP1Y7fxE7/EmTLzQVnB0ycyibJ0OOHIlJqTNzglYFxVwETOcIoJqJmpDXJ9xImDv+Fq34F/d4Dw==", + "dev": true + } + } + }, "url-parse-lax": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", @@ -40376,6 +41848,71 @@ "extsprintf": "^1.2.0" } }, + "vite": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/vite/-/vite-3.1.4.tgz", + "integrity": "sha512-JoQI08aBjY9lycL7jcEq4p9o1xUjq5aRvdH4KWaXtkSx7e7RpAh9D3IjzDWRD4Fg44LS3oDAIOG/Kq1L+82psA==", + "dev": true, + "requires": { + "esbuild": "^0.15.6", + "fsevents": "~2.3.2", + "postcss": "^8.4.16", + "resolve": "^1.22.1", + "rollup": "~2.78.0" + }, + "dependencies": { + "postcss": { + "version": "8.4.16", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.16.tgz", + "integrity": "sha512-ipHE1XBvKzm5xI7hiHCZJCSugxvsdq2mPnsq5+UF+VHCjiBvtDrlxJfMBToWaP9D5XlgNmcFGqoHmUn0EYEaRQ==", + "dev": true, + "requires": { + "nanoid": "^3.3.4", + "picocolors": "^1.0.0", + "source-map-js": "^1.0.2" + } + }, + "resolve": { + "version": "1.22.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", + "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", + "dev": true, + "requires": { + "is-core-module": "^2.9.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + } + } + } + }, + "vitest": { + "version": "0.23.4", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-0.23.4.tgz", + "integrity": "sha512-iukBNWqQAv8EKDBUNntspLp9SfpaVFbmzmM0sNcnTxASQZMzRw3PsM6DMlsHiI+I6GeO5/sYDg3ecpC+SNFLrQ==", + "dev": true, + "requires": { + "@types/chai": "^4.3.3", + "@types/chai-subset": "^1.3.3", + "@types/node": "*", + "chai": "^4.3.6", + "debug": "^4.3.4", + "local-pkg": "^0.4.2", + "strip-literal": "^0.4.1", + "tinybench": "^2.1.5", + "tinypool": "^0.3.0", + "tinyspy": "^1.0.2", + "vite": "^2.9.12 || ^3.0.0-0" + } + }, + "vitest-github-actions-reporter": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/vitest-github-actions-reporter/-/vitest-github-actions-reporter-0.8.3.tgz", + "integrity": "sha512-3mpZil8jAiWGt+w5NWzrewcPnXlUiUujMmjeZ0zhcva7cNW6k8DyMIBiq3bRGkhEL1FoG1sHFUj8/ONXnhGvZQ==", + "dev": true, + "requires": { + "@actions/core": "^1.9.1" + } + }, "w3c-hr-time": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz", diff --git a/package.json b/package.json index 350100a738..6205e960f9 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "install-husky": "if-env CI=1 || husky install node_modules/@netlify/eslint-config-node/.husky", "test": "run-s build:demo test:jest", "test:jest": "jest", + "test:e2e": "vitest test/e2e", "test:jest:update": "jest --updateSnapshot", "test:update": "run-s build build:demo test:jest:update" }, @@ -56,6 +57,7 @@ "@types/react": "^17.0.38", "babel-jest": "^27.2.5", "chance": "^1.1.8", + "cheerio": "^1.0.0-rc.12", "cpy": "^8.1.2", "cypress": "^9.0.0", "eslint-config-next": "^12.0.0", @@ -66,6 +68,7 @@ "jest-fetch-mock": "^3.0.3", "netlify-plugin-cypress": "^2.2.0", "npm-run-all": "^4.1.5", + "playwright-chromium": "^1.26.1", "prettier": "^2.1.2", "react": "^18.0.0", "react-dom": "^18.0.0", @@ -73,7 +76,9 @@ "sass": "^1.49.0", "sharp": "^0.30.4", "tmp-promise": "^3.0.2", - "typescript": "^4.3.4" + "typescript": "^4.3.4", + "vitest": "^0.23.4", + "vitest-github-actions-reporter": "^0.8.3" }, "dependencies": { "next": "^12.3.0" @@ -88,6 +93,7 @@ "testMatch": [ "**/test/**/*.js", "**/test/**/*.ts", + "!**/test/e2e/**", "!**/test/fixtures/**", "!**/test/sample/**" ], diff --git a/cypress/integration/canary/appdir.spec.ts b/test/e2e/canary/appdir.spec.ts similarity index 69% rename from cypress/integration/canary/appdir.spec.ts rename to test/e2e/canary/appdir.spec.ts index 7a929678ce..24e60c5a57 100644 --- a/cypress/integration/canary/appdir.spec.ts +++ b/test/e2e/canary/appdir.spec.ts @@ -1,257 +1,274 @@ +import { describe, it, expect } from 'vitest' + +import { fetchViaHTTP, renderViaHTTP, waitFor } from '../next-test-lib/next-test-utils' +import { load } from 'cheerio' +import webdriver from '../next-test-lib/next-webdriver' +const nextUrl = process.env.SITE_URL || 'http://localhost:8888' + describe('app dir', () => { - it('should use application/octet-stream for flight', () => { - cy.request({ - url: '/dashboard/deployments/123', - headers: { - __flight__: '1', + it('should use application/octet-stream for flight', async () => { + const res = await fetchViaHTTP( + nextUrl, + '/dashboard/deployments/123', + {}, + { + headers: { + __rsc__: '1', + }, }, - }) - .its('headers.content-type') - .should('eq', 'application/octet-stream') + ) + expect(res.headers.get('Content-Type')).toBe('application/octet-stream') }) - it('should use application/octet-stream for flight with edge runtime', () => { - cy.request({ - url: '/dashboard', - headers: { - __flight__: '1', + it('should use application/octet-stream for flight with edge runtime', async () => { + const res = await fetchViaHTTP( + nextUrl, + '/dashboard', + {}, + { + headers: { + __rsc__: '1', + }, }, - }) - .its('headers.content-type') - .should('eq', 'application/octet-stream') + ) + expect(res.headers.get('Content-Type')).toBe('application/octet-stream') }) - it('should pass props from getServerSideProps in root layout', () => { - cy.visit('/dashboard').its('title').should('eq', 'hello world') + it('should pass props from getServerSideProps in root layout', async () => { + const html = await renderViaHTTP(nextUrl, '/dashboard') + const $ = load(html) + expect($('title').text()).toBe('hello world') }) - it('should serve from pages', () => { - cy.visit('/').its('html').should('contain', 'hello from pages/index') + it('should serve from pages', async () => { + const html = await renderViaHTTP(nextUrl, '/') + expect(html).toContain('hello from pages/index') }) - it('should serve dynamic route from pages', () => { - cy.visit('/blog/first').its('html').should('contain', 'hello from pages/blog/[slug]') + it('should serve dynamic route from pages', async () => { + const html = await renderViaHTTP(nextUrl, '/blog/first') + expect(html).toContain('hello from pages/blog/[slug]') }) - it('should serve from public', () => { - cy.request('/hello.txt').its('body').should('eq', 'hello world') + it('should serve from public', async () => { + const html = await renderViaHTTP(nextUrl, '/hello.txt') + expect(html).toContain('hello world') }) - it('should serve from app', () => { - cy.visit('/dashboard').its('html').should('contain', 'hello from app/dashboard') + it('should serve from app', async () => { + const html = await renderViaHTTP(nextUrl, '/dashboard') + expect(html).toContain('hello from app/dashboard') }) - it('should serve /index as separate page', () => { - cy.visit('/dashboard/index') - .its('html') - .should('contain', 'hello from app/dashboard/index') - // should load chunks generated via async import correctly with React.lazy - .should('contain', 'hello from lazy') - // should support `dynamic` in both server and client components - .should('contain', 'hello from dynamic on server') - .should('contain', 'hello from dynamic on client') + it('should serve /index as separate page', async () => { + const html = await renderViaHTTP(nextUrl, '/dashboard/index') + expect(html).toContain('hello from app/dashboard/index') + // should load chunks generated via async import correctly with React.lazy + expect(html).toContain('hello from lazy') + // should support `dynamic` in both server and client components + expect(html).toContain('hello from dynamic on server') + expect(html).toContain('hello from dynamic on client') }) - // // TODO-APP: handle css modules fouc in dev - // it.skip('should handle css imports in next/dynamic correctly', async () => { - // const browser = await webdriver(next.url, '/dashboard/index') + // TODO-APP: handle css modules fouc in dev + it.skip('should handle css imports in next/dynamic correctly', async () => { + const browser = await webdriver(nextUrl, '/dashboard/index') - // expect( - // await browser.eval(`window.getComputedStyle(document.querySelector('#css-text-dynamic-server')).color`), - // ).toBe('rgb(0, 0, 255)') - // expect(await browser.eval(`window.getComputedStyle(document.querySelector('#css-text-lazy')).color`)).toBe( - // 'rgb(128, 0, 128)', - // ) - // }) - - // it('should include layouts when no direct parent layout', async () => { - // const html = await renderViaHTTP(next.url, '/dashboard/integrations') - // const $ = cheerio.load(html) - // // Should not be nested in dashboard - // expect($('h1').text()).toBe('Dashboard') - // // Should include the page text - // expect($('p').text()).toBe('hello from app/dashboard/integrations') - // }) - - // // TODO-APP: handle new root layout - // it.skip('should not include parent when not in parent directory with route in directory', async () => { - // const html = await renderViaHTTP(next.url, '/dashboard/hello') - // const $ = cheerio.load(html) - - // // new root has to provide it's own custom root layout or the default - // // is used instead - // expect(html).toContain(' { + const html = await renderViaHTTP(nextUrl, '/dashboard/integrations') + const $ = load(html) + // Should not be nested in dashboard + expect($('h1').text()).toBe('Dashboard') + // Should include the page text + expect($('p').text()).toBe('hello from app/dashboard/integrations') + }) - // // Should render the page text - // expect($('p').text()).toBe('hello from app/dashboard/rootonly/hello') - // }) + // TODO-APP: handle new root layout + it.skip('should not include parent when not in parent directory with route in directory', async () => { + const html = await renderViaHTTP(nextUrl, '/dashboard/hello') + const $ = load(html) - // it('should use new root layout when provided', async () => { - // const html = await renderViaHTTP(next.url, '/dashboard/another') - // const $ = cheerio.load(html) + // new root has to provide it's own custom root layout or the default + // is used instead + expect(html).toContain(' { + const html = await renderViaHTTP(nextUrl, '/dashboard/another') + const $ = load(html) - // it('should not create new root layout when nested (optional)', async () => { - // const html = await renderViaHTTP(next.url, '/dashboard/deployments/breakdown') - // const $ = cheerio.load(html) + // new root has to provide it's own custom root layout or the default + // is used instead + expect($('html').hasClass('this-is-another-document-html')).toBeTruthy() + expect($('body').hasClass('this-is-another-document-body')).toBeTruthy() - // // new root has to provide it's own custom root layout or the default - // // is used instead - // expect($('html').hasClass('this-is-the-document-html')).toBeTruthy() - // expect($('body').hasClass('this-is-the-document-body')).toBeTruthy() + // Should not be nested in dashboard + expect($('h1').text()).toBeFalsy() - // // Should be nested in dashboard - // expect($('h1').text()).toBe('Dashboard') - // expect($('h2').text()).toBe('Custom dashboard') + // Should render the page text + expect($('p').text()).toBe('hello from newroot/dashboard/another') + }) - // // Should render the page text - // expect($('p').text()).toBe('hello from app/dashboard/(custom)/deployments/breakdown') - // }) + it('should not create new root layout when nested (optional)', async () => { + const html = await renderViaHTTP(nextUrl, '/dashboard/deployments/breakdown') + const $ = load(html) - // it('should include parent document when no direct parent layout', async () => { - // const html = await renderViaHTTP(next.url, '/dashboard/integrations') - // const $ = cheerio.load(html) + // new root has to provide it's own custom root layout or the default + // is used instead + expect($('html').hasClass('this-is-the-document-html')).toBeTruthy() + expect($('body').hasClass('this-is-the-document-body')).toBeTruthy() - // expect($('html').hasClass('this-is-the-document-html')).toBeTruthy() - // expect($('body').hasClass('this-is-the-document-body')).toBeTruthy() - // }) + // Should be nested in dashboard + expect($('h1').text()).toBe('Dashboard') + expect($('h2').text()).toBe('Custom dashboard') - // it('should not include parent when not in parent directory', async () => { - // const html = await renderViaHTTP(next.url, '/dashboard/changelog') - // const $ = cheerio.load(html) - // // Should not be nested in dashboard - // expect($('h1').text()).toBeFalsy() - // // Should include the page text - // expect($('p').text()).toBe('hello from app/dashboard/changelog') - // }) + // Should render the page text + expect($('p').text()).toBe('hello from app/dashboard/(custom)/deployments/breakdown') + }) - // it('should serve nested parent', async () => { - // const html = await renderViaHTTP(next.url, '/dashboard/deployments/123') - // const $ = cheerio.load(html) - // // Should be nested in dashboard - // expect($('h1').text()).toBe('Dashboard') - // // Should be nested in deployments - // expect($('h2').text()).toBe('Deployments hello') - // }) + it('should include parent document when no direct parent layout', async () => { + const html = await renderViaHTTP(nextUrl, '/dashboard/integrations') + const $ = load(html) - // it('should serve dynamic parameter', async () => { - // const html = await renderViaHTTP(next.url, '/dashboard/deployments/123') - // const $ = cheerio.load(html) - // // Should include the page text with the parameter - // expect($('p').text()).toBe('hello from app/dashboard/deployments/[id]. ID is: 123') - // }) + expect($('html').hasClass('this-is-the-document-html')).toBeTruthy() + expect($('body').hasClass('this-is-the-document-body')).toBeTruthy() + }) - // it('should include document html and body', async () => { - // const html = await renderViaHTTP(next.url, '/dashboard') - // const $ = cheerio.load(html) + it('should not include parent when not in parent directory', async () => { + const html = await renderViaHTTP(nextUrl, '/dashboard/changelog') + const $ = load(html) + // Should not be nested in dashboard + expect($('h1').text()).toBeFalsy() + // Should include the page text + expect($('p').text()).toBe('hello from app/dashboard/changelog') + }) - // expect($('html').hasClass('this-is-the-document-html')).toBeTruthy() - // expect($('body').hasClass('this-is-the-document-body')).toBeTruthy() - // }) + it('should serve nested parent', async () => { + const html = await renderViaHTTP(nextUrl, '/dashboard/deployments/123') + const $ = load(html) + // Should be nested in dashboard + expect($('h1').text()).toBe('Dashboard') + // Should be nested in deployments + expect($('h2').text()).toBe('Deployments hello') + }) - // it('should not serve when layout is provided but no folder index', async () => { - // const res = await fetchViaHTTP(next.url, '/dashboard/deployments') - // expect(res.status).toBe(404) - // expect(await res.text()).toContain('This page could not be found') - // }) + it('should serve dynamic parameter', async () => { + const html = await renderViaHTTP(nextUrl, '/dashboard/deployments/123') + const $ = load(html) + // Should include the page text with the parameter + expect($('p').text()).toBe('hello from app/dashboard/deployments/[id]. ID is: 123') + }) - // // TODO-APP: do we want to make this only work for /root or is it allowed - // // to work for /pages as well? - // it.skip('should match partial parameters', async () => { - // const html = await renderViaHTTP(next.url, '/partial-match-123') - // expect(html).toContain('hello from app/partial-match-[id]. ID is: 123') - // }) + it('should include document html and body', async () => { + const html = await renderViaHTTP(nextUrl, '/dashboard') + const $ = load(html) - // describe('rewrites', () => { - // // TODO-APP: - // it.skip('should support rewrites on initial load', async () => { - // const browser = await webdriver(next.url, '/rewritten-to-dashboard') - // expect(await browser.elementByCss('h1').text()).toBe('Dashboard') - // expect(await browser.url()).toBe(`${next.url}/rewritten-to-dashboard`) - // }) + expect($('html').hasClass('this-is-the-document-html')).toBeTruthy() + expect($('body').hasClass('this-is-the-document-body')).toBeTruthy() + }) - // it('should support rewrites on client-side navigation', async () => { - // const browser = await webdriver(next.url, '/rewrites') + it('should not serve when layout is provided but no folder index', async () => { + const res = await fetchViaHTTP(nextUrl, '/dashboard/deployments') + expect(res.status).toBe(404) + expect(await res.text()).toContain('This page could not be found') + }) - // try { - // // Click the link. - // await browser.elementById('link').click() - // await browser.waitForElementByCss('#from-dashboard') + // TODO-APP: do we want to make this only work for /root or is it allowed + // to work for /pages as well? + it.skip('should match partial parameters', async () => { + const html = await renderViaHTTP(nextUrl, '/partial-match-123') + expect(html).toContain('hello from app/partial-match-[id]. ID is: 123') + }) - // // Check to see that we were rewritten and not redirected. - // expect(await browser.url()).toBe(`${next.url}/rewritten-to-dashboard`) + describe('rewrites', () => { + // TODO-APP: + it.skip('should support rewrites on initial load', async () => { + const browser = await webdriver(nextUrl, '/rewritten-to-dashboard') + expect(await browser.elementByCss('h1').text()).toBe('Dashboard') + expect(await browser.url()).toBe(`${nextUrl}/rewritten-to-dashboard`) + }) - // // Check to see that the page we navigated to is in fact the dashboard. - // expect(await browser.elementByCss('#from-dashboard').text()).toBe('hello from app/dashboard') - // } finally { - // await browser.close() - // } - // }) - // }) + it('should support rewrites on client-side navigation', async () => { + const browser = await webdriver(nextUrl, '/rewrites') - // // TODO-APP: Enable in development - // ;(isDev ? it.skip : it)( - // 'should not rerender layout when navigating between routes in the same layout', - // async () => { - // const browser = await webdriver(next.url, '/same-layout/first') + try { + // Click the link. + await browser.elementById('link').click() + await browser.waitForElementByCss('#from-dashboard') - // try { - // // Get the render id from the dom and click the first link. - // const firstRenderID = await browser.elementById('render-id').text() - // await browser.elementById('link').click() - // await browser.waitForElementByCss('#second-page') + // Check to see that we were rewritten and not redirected. + expect(await browser.url()).toBe(`${nextUrl}/rewritten-to-dashboard`) - // // Get the render id from the dom again, it should be the same! - // const secondRenderID = await browser.elementById('render-id').text() - // expect(secondRenderID).toBe(firstRenderID) + // Check to see that the page we navigated to is in fact the dashboard. + expect(await browser.elementByCss('#from-dashboard').text()).toBe('hello from app/dashboard') + } finally { + await browser.close() + } + }) + }) - // // Navigate back to the first page again by clicking the link. - // await browser.elementById('link').click() - // await browser.waitForElementByCss('#first-page') + it('should not rerender layout when navigating between routes in the same layout', async () => { + const browser = await webdriver(nextUrl, '/same-layout/first') + + try { + // Get the render id from the dom and click the first link. + const firstRenderID = await browser.elementById('render-id').text() + await browser.elementById('link').click() + await browser.waitForElementByCss('#second-page') + + // Get the render id from the dom again, it should be the same! + const secondRenderID = await browser.elementById('render-id').text() + expect(secondRenderID).toBe(firstRenderID) + + // Navigate back to the first page again by clicking the link. + await browser.elementById('link').click() + await browser.waitForElementByCss('#first-page') + + // Get the render id from the dom again, it should be the same! + const thirdRenderID = await browser.elementById('render-id').text() + expect(thirdRenderID).toBe(firstRenderID) + } finally { + await browser.close() + } + }) - // // Get the render id from the dom again, it should be the same! - // const thirdRenderID = await browser.elementById('render-id').text() - // expect(thirdRenderID).toBe(firstRenderID) - // } finally { - // await browser.close() - // } - // }, - // ) - - // it('should handle hash in initial url', async () => { - // const browser = await webdriver(next.url, '/dashboard#abc') - - // try { - // // Check if hash is preserved - // expect(await browser.eval('window.location.hash')).toBe('#abc') - // await waitFor(1000) - // // Check again to be sure as it might be timed different - // expect(await browser.eval('window.location.hash')).toBe('#abc') - // } finally { - // await browser.close() - // } - // }) + it( + 'should handle hash in initial url', + async () => { + const browser = await webdriver(nextUrl, '/dashboard#abc') + try { + // Check if hash is preserved + expect(await browser.eval('window.location.hash')).toBe('#abc') + await waitFor(1000) + // Check again to be sure as it might be timed different + expect(await browser.eval('window.location.hash')).toBe('#abc') + } finally { + await browser.close() + } + }, + { timeout: 1000 * 60 * 2 }, + ) // describe('parallel routes', () => { // it('should match parallel routes', async () => { - // const html = await renderViaHTTP(next.url, '/parallel/nested') + // const html = await renderViaHTTP(nextUrl, '/parallel/nested') // expect(html).toContain('parallel/layout') // expect(html).toContain('parallel/@foo/nested/layout') // expect(html).toContain('parallel/@foo/nested/@a/page') @@ -263,7 +280,7 @@ describe('app dir', () => { // }) // it('should match parallel routes in route groups', async () => { - // const html = await renderViaHTTP(next.url, '/parallel/nested-2') + // const html = await renderViaHTTP(nextUrl, '/parallel/nested-2') // expect(html).toContain('parallel/layout') // expect(html).toContain('parallel/(new)/layout') // expect(html).toContain('parallel/(new)/@baz/nested/page') @@ -272,7 +289,7 @@ describe('app dir', () => { // describe('', () => { // it('should hard push', async () => { - // const browser = await webdriver(next.url, '/link-hard-push/123') + // const browser = await webdriver(nextUrl, '/link-hard-push/123') // try { // // Click the link on the page, and verify that the history entry was @@ -299,7 +316,7 @@ describe('app dir', () => { // }) // it('should hard replace', async () => { - // const browser = await webdriver(next.url, '/link-hard-replace/123') + // const browser = await webdriver(nextUrl, '/link-hard-replace/123') // try { // // Click the link on the page, and verify that the history entry was NOT @@ -331,7 +348,7 @@ describe('app dir', () => { // }) // it('should soft push', async () => { - // const browser = await webdriver(next.url, '/link-soft-push') + // const browser = await webdriver(nextUrl, '/link-soft-push') // try { // // Click the link on the page, and verify that the history entry was @@ -358,7 +375,7 @@ describe('app dir', () => { // // TODO-APP: investigate this test // it.skip('should soft replace', async () => { - // const browser = await webdriver(next.url, '/link-soft-replace') + // const browser = await webdriver(nextUrl, '/link-soft-replace') // try { // // Get the render ID so we can compare it. @@ -394,7 +411,7 @@ describe('app dir', () => { // }) // it('should be soft for back navigation', async () => { - // const browser = await webdriver(next.url, '/with-id') + // const browser = await webdriver(nextUrl, '/with-id') // try { // // Get the id on the rendered page. @@ -414,7 +431,7 @@ describe('app dir', () => { // }) // it('should be soft for forward navigation', async () => { - // const browser = await webdriver(next.url, '/with-id') + // const browser = await webdriver(nextUrl, '/with-id') // try { // // Click the link. @@ -438,7 +455,7 @@ describe('app dir', () => { // // TODO-APP: should enable when implemented // it.skip('should allow linking from app page to pages page', async () => { - // const browser = await webdriver(next.url, '/pages-linking') + // const browser = await webdriver(nextUrl, '/pages-linking') // try { // // Click the link. @@ -459,46 +476,46 @@ describe('app dir', () => { // // should be? Seems like they both either should be servable or not // it('should not serve .server.js as a path', async () => { // // Without .server.js should serve - // const html = await renderViaHTTP(next.url, '/should-not-serve-server') + // const html = await renderViaHTTP(nextUrl, '/should-not-serve-server') // expect(html).toContain('hello from app/should-not-serve-server') // // Should not serve `.server` - // const res = await fetchViaHTTP(next.url, '/should-not-serve-server.server') + // const res = await fetchViaHTTP(nextUrl, '/should-not-serve-server.server') // expect(res.status).toBe(404) // expect(await res.text()).toContain('This page could not be found') // // Should not serve `.server.js` - // const res2 = await fetchViaHTTP(next.url, '/should-not-serve-server.server.js') + // const res2 = await fetchViaHTTP(nextUrl, '/should-not-serve-server.server.js') // expect(res2.status).toBe(404) // expect(await res2.text()).toContain('This page could not be found') // }) // it('should not serve .client.js as a path', async () => { // // Without .client.js should serve - // const html = await renderViaHTTP(next.url, '/should-not-serve-client') + // const html = await renderViaHTTP(nextUrl, '/should-not-serve-client') // expect(html).toContain('hello from app/should-not-serve-client') // // Should not serve `.client` - // const res = await fetchViaHTTP(next.url, '/should-not-serve-client.client') + // const res = await fetchViaHTTP(nextUrl, '/should-not-serve-client.client') // expect(res.status).toBe(404) // expect(await res.text()).toContain('This page could not be found') // // Should not serve `.client.js` - // const res2 = await fetchViaHTTP(next.url, '/should-not-serve-client.client.js') + // const res2 = await fetchViaHTTP(nextUrl, '/should-not-serve-client.client.js') // expect(res2.status).toBe(404) // expect(await res2.text()).toContain('This page could not be found') // }) // it('should serve shared component', async () => { // // Without .client.js should serve - // const html = await renderViaHTTP(next.url, '/shared-component-route') + // const html = await renderViaHTTP(nextUrl, '/shared-component-route') // expect(html).toContain('hello from app/shared-component-route') // }) // describe('dynamic routes', () => { // it('should only pass params that apply to the layout', async () => { - // const html = await renderViaHTTP(next.url, '/dynamic/books/hello-world') - // const $ = cheerio.load(html) + // const html = await renderViaHTTP(nextUrl, '/dynamic/books/hello-world') + // const $ = load(html) // expect($('#dynamic-layout-params').text()).toBe('{}') // expect($('#category-layout-params').text()).toBe('{"category":"books"}') @@ -511,22 +528,22 @@ describe('app dir', () => { // it('should handle optional segments', async () => { // const params = ['this', 'is', 'a', 'test'] // const route = params.join('/') - // const html = await renderViaHTTP(next.url, `/optional-catch-all/${route}`) - // const $ = cheerio.load(html) + // const html = await renderViaHTTP(nextUrl, `/optional-catch-all/${route}`) + // const $ = load(html) // expect($('#text').attr('data-params')).toBe(route) // }) // it('should handle optional segments root', async () => { - // const html = await renderViaHTTP(next.url, `/optional-catch-all`) - // const $ = cheerio.load(html) + // const html = await renderViaHTTP(nextUrl, `/optional-catch-all`) + // const $ = load(html) // expect($('#text').attr('data-params')).toBe('') // }) // it('should handle required segments', async () => { // const params = ['this', 'is', 'a', 'test'] // const route = params.join('/') - // const html = await renderViaHTTP(next.url, `/catch-all/${route}`) - // const $ = cheerio.load(html) + // const html = await renderViaHTTP(nextUrl, `/catch-all/${route}`) + // const $ = load(html) // expect($('#text').attr('data-params')).toBe(route) // // Components under catch-all should not be treated as route that errors during build. @@ -535,7 +552,7 @@ describe('app dir', () => { // }) // it('should handle required segments root as not found', async () => { - // const res = await fetchViaHTTP(next.url, `/catch-all`) + // const res = await fetchViaHTTP(nextUrl, `/catch-all`) // expect(res.status).toBe(404) // expect(await res.text()).toContain('This page could not be found') // }) @@ -543,14 +560,14 @@ describe('app dir', () => { // describe('should serve client component', () => { // it('should serve server-side', async () => { - // const html = await renderViaHTTP(next.url, '/client-component-route') - // const $ = cheerio.load(html) + // const html = await renderViaHTTP(nextUrl, '/client-component-route') + // const $ = load(html) // expect($('p').text()).toBe('hello from app/client-component-route. count: 0') // }) // // TODO-APP: investigate hydration not kicking in on some runs // it('should serve client-side', async () => { - // const browser = await webdriver(next.url, '/client-component-route') + // const browser = await webdriver(nextUrl, '/client-component-route') // // After hydration count should be 1 // expect(await browser.elementByCss('p').text()).toBe('hello from app/client-component-route. count: 1') @@ -559,8 +576,8 @@ describe('app dir', () => { // describe('should include client component layout with server component route', () => { // it('should include it server-side', async () => { - // const html = await renderViaHTTP(next.url, '/client-nested') - // const $ = cheerio.load(html) + // const html = await renderViaHTTP(nextUrl, '/client-nested') + // const $ = load(html) // // Should not be nested in dashboard // expect($('h1').text()).toBe('Client Nested. Count: 0') // // Should include the page text @@ -568,7 +585,7 @@ describe('app dir', () => { // }) // it('should include it client-side', async () => { - // const browser = await webdriver(next.url, '/client-nested') + // const browser = await webdriver(nextUrl, '/client-nested') // // After hydration count should be 1 // expect(await browser.elementByCss('h1').text()).toBe('Client Nested. Count: 1') @@ -580,14 +597,14 @@ describe('app dir', () => { // describe('Loading', () => { // it('should render loading.js in initial html for slow page', async () => { - // const html = await renderViaHTTP(next.url, '/slow-page-with-loading') - // const $ = cheerio.load(html) + // const html = await renderViaHTTP(nextUrl, '/slow-page-with-loading') + // const $ = load(html) // expect($('#loading').text()).toBe('Loading...') // }) // it('should render loading.js in browser for slow page', async () => { - // const browser = await webdriver(next.url, '/slow-page-with-loading', { + // const browser = await webdriver(nextUrl, '/slow-page-with-loading', { // waitHydration: false, // }) // // TODO-APP: `await webdriver()` causes waiting for the full page to complete streaming. At that point "Loading..." is replaced by the actual content @@ -597,14 +614,14 @@ describe('app dir', () => { // }) // it('should render loading.js in initial html for slow layout', async () => { - // const html = await renderViaHTTP(next.url, '/slow-layout-with-loading/slow') - // const $ = cheerio.load(html) + // const html = await renderViaHTTP(nextUrl, '/slow-layout-with-loading/slow') + // const $ = load(html) // expect($('#loading').text()).toBe('Loading...') // }) // it('should render loading.js in browser for slow layout', async () => { - // const browser = await webdriver(next.url, '/slow-layout-with-loading/slow', { + // const browser = await webdriver(nextUrl, '/slow-layout-with-loading/slow', { // waitHydration: false, // }) // // TODO-APP: `await webdriver()` causes waiting for the full page to complete streaming. At that point "Loading..." is replaced by the actual content @@ -616,15 +633,15 @@ describe('app dir', () => { // }) // it('should render loading.js in initial html for slow layout and page', async () => { - // const html = await renderViaHTTP(next.url, '/slow-layout-and-page-with-loading/slow') - // const $ = cheerio.load(html) + // const html = await renderViaHTTP(nextUrl, '/slow-layout-and-page-with-loading/slow') + // const $ = load(html) // expect($('#loading-layout').text()).toBe('Loading layout...') // expect($('#loading-page').text()).toBe('Loading page...') // }) // it('should render loading.js in browser for slow layout and page', async () => { - // const browser = await webdriver(next.url, '/slow-layout-and-page-with-loading/slow', { + // const browser = await webdriver(nextUrl, '/slow-layout-and-page-with-loading/slow', { // waitHydration: false, // }) // // TODO-APP: `await webdriver()` causes waiting for the full page to complete streaming. At that point "Loading..." is replaced by the actual content @@ -641,7 +658,7 @@ describe('app dir', () => { // it.each(['rewrite', 'redirect'])( // `should strip internal query parameters from requests to middleware for %s`, // async (method) => { - // const browser = await webdriver(next.url, '/internal') + // const browser = await webdriver(nextUrl, '/internal') // try { // // Wait for and click the navigation element, this should trigger @@ -661,7 +678,7 @@ describe('app dir', () => { // describe('next/router', () => { // // `useRouter` should not be accessible in server components. // it.skip('should always return null when accessed from /app', async () => { - // const browser = await webdriver(next.url, '/old-router') + // const browser = await webdriver(nextUrl, '/old-router') // try { // await browser.waitForElementByCss('#old-router') @@ -680,7 +697,7 @@ describe('app dir', () => { // describe('hooks', () => { // describe('cookies function', () => { // it('should retrieve cookies in a server component', async () => { - // const browser = await webdriver(next.url, '/hooks/use-cookies') + // const browser = await webdriver(nextUrl, '/hooks/use-cookies') // try { // await browser.waitForElementByCss('#does-not-have-cookie') @@ -698,7 +715,7 @@ describe('app dir', () => { // }) // it('should access cookies on navigation', async () => { - // const browser = await webdriver(next.url, '/navigation') + // const browser = await webdriver(nextUrl, '/navigation') // try { // // Click the cookies link to verify it can't see the cookie that's @@ -734,20 +751,20 @@ describe('app dir', () => { // describe('headers function', () => { // it('should have access to incoming headers in a server component', async () => { // // Check to see that we can't see the header when it's not present. - // let html = await renderViaHTTP(next.url, '/hooks/use-headers', {}, { headers: {} }) - // let $ = cheerio.load(html) + // let html = await renderViaHTTP(nextUrl, '/hooks/use-headers', {}, { headers: {} }) + // let $ = load(html) // expect($('#does-not-have-header').length).toBe(1) // expect($('#has-header').length).toBe(0) // // Check to see that we can see the header when it's present. - // html = await renderViaHTTP(next.url, '/hooks/use-headers', {}, { headers: { 'x-use-headers': 'value' } }) - // $ = cheerio.load(html) + // html = await renderViaHTTP(nextUrl, '/hooks/use-headers', {}, { headers: { 'x-use-headers': 'value' } }) + // $ = load(html) // expect($('#has-header').length).toBe(1) // expect($('#does-not-have-header').length).toBe(0) // }) // it('should access headers on navigation', async () => { - // const browser = await webdriver(next.url, '/navigation') + // const browser = await webdriver(nextUrl, '/navigation') // try { // await browser.elementById('use-headers').click() @@ -760,7 +777,7 @@ describe('app dir', () => { // describe('previewData function', () => { // it('should return no preview data when there is none', async () => { - // const browser = await webdriver(next.url, '/hooks/use-preview-data') + // const browser = await webdriver(nextUrl, '/hooks/use-preview-data') // try { // await browser.waitForElementByCss('#does-not-have-preview-data') @@ -770,10 +787,10 @@ describe('app dir', () => { // }) // it('should return preview data when there is some', async () => { - // const browser = await webdriver(next.url, '/api/preview') + // const browser = await webdriver(nextUrl, '/api/preview') // try { - // await browser.loadPage(`${next.url}/hooks/use-preview-data`, { + // await browser.loadPage(`${nextUrl}/hooks/use-preview-data`, { // disableCache: false, // beforePageLoad: null, // }) @@ -787,7 +804,7 @@ describe('app dir', () => { // describe('useRouter', () => { // // TODO-APP: should enable when implemented // it.skip('should throw an error when imported', async () => { - // const res = await fetchViaHTTP(next.url, '/hooks/use-router/server') + // const res = await fetchViaHTTP(nextUrl, '/hooks/use-router/server') // expect(res.status).toBe(500) // expect(await res.text()).toContain('Internal Server Error') // }) @@ -796,7 +813,7 @@ describe('app dir', () => { // describe('useParams', () => { // // TODO-APP: should enable when implemented // it.skip('should throw an error when imported', async () => { - // const res = await fetchViaHTTP(next.url, '/hooks/use-params/server') + // const res = await fetchViaHTTP(nextUrl, '/hooks/use-params/server') // expect(res.status).toBe(500) // expect(await res.text()).toContain('Internal Server Error') // }) @@ -805,7 +822,7 @@ describe('app dir', () => { // describe('useSearchParams', () => { // // TODO-APP: should enable when implemented // it.skip('should throw an error when imported', async () => { - // const res = await fetchViaHTTP(next.url, '/hooks/use-search-params/server') + // const res = await fetchViaHTTP(nextUrl, '/hooks/use-search-params/server') // expect(res.status).toBe(500) // expect(await res.text()).toContain('Internal Server Error') // }) @@ -814,7 +831,7 @@ describe('app dir', () => { // describe('usePathname', () => { // // TODO-APP: should enable when implemented // it.skip('should throw an error when imported', async () => { - // const res = await fetchViaHTTP(next.url, '/hooks/use-pathname/server') + // const res = await fetchViaHTTP(nextUrl, '/hooks/use-pathname/server') // expect(res.status).toBe(500) // expect(await res.text()).toContain('Internal Server Error') // }) @@ -823,7 +840,7 @@ describe('app dir', () => { // describe('useLayoutSegments', () => { // // TODO-APP: should enable when implemented // it.skip('should throw an error when imported', async () => { - // const res = await fetchViaHTTP(next.url, '/hooks/use-layout-segments/server') + // const res = await fetchViaHTTP(nextUrl, '/hooks/use-layout-segments/server') // expect(res.status).toBe(500) // expect(await res.text()).toContain('Internal Server Error') // }) @@ -832,7 +849,7 @@ describe('app dir', () => { // describe('useSelectedLayoutSegment', () => { // // TODO-APP: should enable when implemented // it.skip('should throw an error when imported', async () => { - // const res = await fetchViaHTTP(next.url, '/hooks/use-selected-layout-segment/server') + // const res = await fetchViaHTTP(nextUrl, '/hooks/use-selected-layout-segment/server') // expect(res.status).toBe(500) // expect(await res.text()).toContain('Internal Server Error') // }) @@ -845,7 +862,7 @@ describe('app dir', () => { // describe('cookies function', () => { // // TODO-APP: should enable when implemented // it.skip('should throw an error when imported', async () => { - // const res = await fetchViaHTTP(next.url, '/hooks/use-cookies/client') + // const res = await fetchViaHTTP(nextUrl, '/hooks/use-cookies/client') // expect(res.status).toBe(500) // expect(await res.text()).toContain('Internal Server Error') // }) @@ -854,7 +871,7 @@ describe('app dir', () => { // describe('previewData function', () => { // // TODO-APP: should enable when implemented // it.skip('should throw an error when imported', async () => { - // const res = await fetchViaHTTP(next.url, '/hooks/use-preview-data/client') + // const res = await fetchViaHTTP(nextUrl, '/hooks/use-preview-data/client') // expect(res.status).toBe(500) // expect(await res.text()).toContain('Internal Server Error') // }) @@ -863,7 +880,7 @@ describe('app dir', () => { // describe('headers function', () => { // // TODO-APP: should enable when implemented // it.skip('should throw an error when imported', async () => { - // const res = await fetchViaHTTP(next.url, '/hooks/use-headers/client') + // const res = await fetchViaHTTP(nextUrl, '/hooks/use-headers/client') // expect(res.status).toBe(500) // expect(await res.text()).toContain('Internal Server Error') // }) @@ -871,8 +888,8 @@ describe('app dir', () => { // describe('usePathname', () => { // it('should have the correct pathname', async () => { - // const html = await renderViaHTTP(next.url, '/hooks/use-pathname') - // const $ = cheerio.load(html) + // const html = await renderViaHTTP(nextUrl, '/hooks/use-pathname') + // const $ = load(html) // expect($('#pathname').attr('data-pathname')).toBe('/hooks/use-pathname') // }) // }) @@ -880,10 +897,10 @@ describe('app dir', () => { // describe('useSearchParams', () => { // it('should have the correct search params', async () => { // const html = await renderViaHTTP( - // next.url, + // nextUrl, // '/hooks/use-search-params?first=value&second=other%20value&third', // ) - // const $ = cheerio.load(html) + // const $ = load(html) // const el = $('#params') // expect(el.attr('data-param-first')).toBe('value') // expect(el.attr('data-param-second')).toBe('other value') @@ -894,7 +911,7 @@ describe('app dir', () => { // describe('useRouter', () => { // it('should allow access to the router', async () => { - // const browser = await webdriver(next.url, '/hooks/use-router') + // const browser = await webdriver(nextUrl, '/hooks/use-router') // try { // // Wait for the page to load, click the button (which uses a method @@ -913,8 +930,8 @@ describe('app dir', () => { // }) // it('should have consistent query and params handling', async () => { - // const html = await renderViaHTTP(next.url, '/param-and-query/params?slug=query') - // const $ = cheerio.load(html) + // const html = await renderViaHTTP(nextUrl, '/param-and-query/params?slug=query') + // const $ = load(html) // const el = $('#params-and-query') // expect(el.attr('data-params')).toBe('params') // expect(el.attr('data-query')).toBe('query') @@ -931,11 +948,11 @@ describe('app dir', () => { // 'export function getServerSideProps', // ) // await next.patchFile(pageFile, uncomment) - // const res = await fetchViaHTTP(next.url, '/client-with-errors/get-server-side-props') + // const res = await fetchViaHTTP(nextUrl, '/client-with-errors/get-server-side-props') // await next.patchFile(pageFile, content) // await check(async () => { - // const { status } = await fetchViaHTTP(next.url, '/client-with-errors/get-server-side-props') + // const { status } = await fetchViaHTTP(nextUrl, '/client-with-errors/get-server-side-props') // return status // }, /200/) @@ -948,10 +965,10 @@ describe('app dir', () => { // const content = await next.readFile(pageFile) // const uncomment = content.replace('// export function getStaticProps', 'export function getStaticProps') // await next.patchFile(pageFile, uncomment) - // const res = await fetchViaHTTP(next.url, '/client-with-errors/get-static-props') + // const res = await fetchViaHTTP(nextUrl, '/client-with-errors/get-static-props') // await next.patchFile(pageFile, content) // await check(async () => { - // const { status } = await fetchViaHTTP(next.url, '/client-with-errors/get-static-props') + // const { status } = await fetchViaHTTP(nextUrl, '/client-with-errors/get-static-props') // return status // }, /200/) @@ -964,7 +981,7 @@ describe('app dir', () => { // describe('css support', () => { // describe('server layouts', () => { // it('should support global css inside server layouts', async () => { - // const browser = await webdriver(next.url, '/dashboard') + // const browser = await webdriver(nextUrl, '/dashboard') // // Should body text in red // expect(await browser.eval(`window.getComputedStyle(document.querySelector('.p')).color`)).toBe( @@ -978,7 +995,7 @@ describe('app dir', () => { // }) // it('should support css modules inside server layouts', async () => { - // const browser = await webdriver(next.url, '/css/css-nested') + // const browser = await webdriver(nextUrl, '/css/css-nested') // expect(await browser.eval(`window.getComputedStyle(document.querySelector('#server-cssm')).color`)).toBe( // 'rgb(0, 128, 0)', // ) @@ -987,14 +1004,14 @@ describe('app dir', () => { // describe('server pages', () => { // it('should support global css inside server pages', async () => { - // const browser = await webdriver(next.url, '/css/css-page') + // const browser = await webdriver(nextUrl, '/css/css-page') // expect(await browser.eval(`window.getComputedStyle(document.querySelector('h1')).color`)).toBe( // 'rgb(255, 0, 0)', // ) // }) // it('should support css modules inside server pages', async () => { - // const browser = await webdriver(next.url, '/css/css-page') + // const browser = await webdriver(nextUrl, '/css/css-page') // expect(await browser.eval(`window.getComputedStyle(document.querySelector('#cssm')).color`)).toBe( // 'rgb(0, 0, 255)', // ) @@ -1003,7 +1020,7 @@ describe('app dir', () => { // describe('client layouts', () => { // it('should support css modules inside client layouts', async () => { - // const browser = await webdriver(next.url, '/client-nested') + // const browser = await webdriver(nextUrl, '/client-nested') // // Should render h1 in red // expect(await browser.eval(`window.getComputedStyle(document.querySelector('h1')).color`)).toBe( @@ -1012,7 +1029,7 @@ describe('app dir', () => { // }) // it('should support global css inside client layouts', async () => { - // const browser = await webdriver(next.url, '/client-nested') + // const browser = await webdriver(nextUrl, '/client-nested') // // Should render button in red // expect(await browser.eval(`window.getComputedStyle(document.querySelector('button')).color`)).toBe( @@ -1023,7 +1040,7 @@ describe('app dir', () => { // describe('client pages', () => { // it('should support css modules inside client pages', async () => { - // const browser = await webdriver(next.url, '/client-component-route') + // const browser = await webdriver(nextUrl, '/client-component-route') // // Should render p in red // expect(await browser.eval(`window.getComputedStyle(document.querySelector('p')).color`)).toBe( @@ -1032,7 +1049,7 @@ describe('app dir', () => { // }) // it('should support global css inside client pages', async () => { - // const browser = await webdriver(next.url, '/client-component-route') + // const browser = await webdriver(nextUrl, '/client-component-route') // // Should render `b` in blue // expect(await browser.eval(`window.getComputedStyle(document.querySelector('b')).color`)).toBe( @@ -1043,7 +1060,7 @@ describe('app dir', () => { // }) // ;(isDev ? describe.skip : describe)('Subresource Integrity', () => { // function fetchWithPolicy(policy: string | null) { - // return fetchViaHTTP(next.url, '/dashboard', undefined, { + // return fetchViaHTTP(nextUrl, '/dashboard', undefined, { // headers: policy // ? { // 'Content-Security-Policy': policy, @@ -1059,7 +1076,7 @@ describe('app dir', () => { // const html = await res.text() - // return cheerio.load(html) + // return load(html) // } // it('does not include nonce when not enabled', async () => { @@ -1112,9 +1129,9 @@ describe('app dir', () => { // }) // it('includes an integrity attribute on scripts', async () => { - // const html = await renderViaHTTP(next.url, '/dashboard') + // const html = await renderViaHTTP(nextUrl, '/dashboard') - // const $ = cheerio.load(html) + // const $ = load(html) // // Find all the script tags with src attributes. // const elements = $('script[src]') @@ -1141,7 +1158,7 @@ describe('app dir', () => { // // For each script tag, ensure that the integrity attribute is the // // correct hash of the script tag. // for (const [src, integrity] of files) { - // const res = await fetchViaHTTP(next.url, src) + // const res = await fetchViaHTTP(nextUrl, src) // expect(res.status).toBe(200) // const content = await res.text() @@ -1160,7 +1177,7 @@ describe('app dir', () => { // describe('template component', () => { // it('should render the template that holds state in a client component and reset on navigation', async () => { - // const browser = await webdriver(next.url, '/template/clientcomponent') + // const browser = await webdriver(nextUrl, '/template/clientcomponent') // expect(await browser.elementByCss('h1').text()).toBe('Template 0') // await browser.elementByCss('button').click() // expect(await browser.elementByCss('h1').text()).toBe('Template 1') @@ -1180,7 +1197,7 @@ describe('app dir', () => { // // TODO-APP: disable failing test and investigate later // it.skip('should render the template that is a server component and rerender on navigation', async () => { - // const browser = await webdriver(next.url, '/template/servercomponent') + // const browser = await webdriver(nextUrl, '/template/servercomponent') // expect(await browser.elementByCss('h1').text()).toStartWith('Template') // const currentTime = await browser.elementByCss('#performance-now').text() @@ -1203,14 +1220,14 @@ describe('app dir', () => { // // TODO-APP: This is disabled for development as the error overlay needs to be reworked. // ;(isDev ? describe.skip : describe)('error component', () => { // it('should trigger error component when an error happens during rendering', async () => { - // const browser = await webdriver(next.url, '/error/clientcomponent') + // const browser = await webdriver(nextUrl, '/error/clientcomponent') // await browser.elementByCss('#error-trigger-button').click().waitForElementByCss('#error-boundary-message') // expect(await browser.elementByCss('#error-boundary-message').text()).toBe('An error occurred: this is a test') // }) // it('should allow resetting error boundary', async () => { - // const browser = await webdriver(next.url, '/error/clientcomponent') + // const browser = await webdriver(nextUrl, '/error/clientcomponent') // // Try triggering and resetting a few times in a row // for (let i = 0; i < 5; i++) { @@ -1225,7 +1242,7 @@ describe('app dir', () => { // }) // it('should hydrate empty shell to handle server-side rendering errors', async () => { - // const browser = await webdriver(next.url, '/error/ssr-error-client-component') + // const browser = await webdriver(nextUrl, '/error/ssr-error-client-component') // const logs = await browser.log() // const errors = logs // .filter((x) => x.source === 'error') @@ -1238,11 +1255,11 @@ describe('app dir', () => { // describe('known bugs', () => { // it('should not share flight data between requests', async () => { // const fetches = await Promise.all( - // [...Array.from({ length: 5 })].map(() => renderViaHTTP(next.url, '/loading-bug/electronics')), + // [...Array.from({ length: 5 })].map(() => renderViaHTTP(nextUrl, '/loading-bug/electronics')), // ) // for (const text of fetches) { - // const $ = cheerio.load(text) + // const $ = load(text) // expect($('#category-id').text()).toBe('electronicsabc') // } // }) @@ -1250,18 +1267,18 @@ describe('app dir', () => { // describe('404', () => { // it.skip('should trigger 404 in a server component', async () => { - // const browser = await webdriver(next.url, '/not-found/servercomponent') + // const browser = await webdriver(nextUrl, '/not-found/servercomponent') // expect(await browser.waitForElementByCss('#not-found-component').text()).toBe('404!') // }) // it.skip('should trigger 404 in a client component', async () => { - // const browser = await webdriver(next.url, '/not-found/clientcomponent') + // const browser = await webdriver(nextUrl, '/not-found/clientcomponent') // expect(await browser.waitForElementByCss('#not-found-component').text()).toBe('404!') // }) // it('should trigger 404 client-side', async () => { - // const browser = await webdriver(next.url, '/not-found/client-side') + // const browser = await webdriver(nextUrl, '/not-found/client-side') // await browser.elementByCss('button').click().waitForElementByCss('#not-found-component') // expect(await browser.elementByCss('#not-found-component').text()).toBe('404!') // }) @@ -1270,20 +1287,20 @@ describe('app dir', () => { // describe('redirect', () => { // describe('components', () => { // it.skip('should redirect in a server component', async () => { - // const browser = await webdriver(next.url, '/redirect/servercomponent') + // const browser = await webdriver(nextUrl, '/redirect/servercomponent') // await browser.waitForElementByCss('#result-page') // expect(await browser.elementByCss('#result-page').text()).toBe('Result Page') // }) // it.skip('should redirect in a client component', async () => { - // const browser = await webdriver(next.url, '/redirect/clientcomponent') + // const browser = await webdriver(nextUrl, '/redirect/clientcomponent') // await browser.waitForElementByCss('#result-page') // expect(await browser.elementByCss('#result-page').text()).toBe('Result Page') // }) // // TODO-APP: Enable in development // ;(isDev ? it.skip : it)('should redirect client-side', async () => { - // const browser = await webdriver(next.url, '/redirect/client-side') + // const browser = await webdriver(nextUrl, '/redirect/client-side') // await browser.elementByCss('button').click().waitForElementByCss('#result-page') // expect(await browser.elementByCss('#result-page').text()).toBe('Result Page') // }) @@ -1291,31 +1308,31 @@ describe('app dir', () => { // describe('next.config.js redirects', () => { // it('should redirect from next.config.js', async () => { - // const browser = await webdriver(next.url, '/redirect/a') + // const browser = await webdriver(nextUrl, '/redirect/a') // expect(await browser.elementByCss('h1').text()).toBe('Dashboard') - // expect(await browser.url()).toBe(`${next.url}/dashboard`) + // expect(await browser.url()).toBe(`${nextUrl}/dashboard`) // }) // it('should redirect from next.config.js with link navigation', async () => { - // const browser = await webdriver(next.url, '/redirect/next-config-redirect') + // const browser = await webdriver(nextUrl, '/redirect/next-config-redirect') // await browser.elementByCss('#redirect-a').click().waitForElementByCss('h1') // expect(await browser.elementByCss('h1').text()).toBe('Dashboard') - // expect(await browser.url()).toBe(`${next.url}/dashboard`) + // expect(await browser.url()).toBe(`${nextUrl}/dashboard`) // }) // }) // describe('middleware redirects', () => { // it('should redirect from middleware', async () => { - // const browser = await webdriver(next.url, '/redirect-middleware-to-dashboard') + // const browser = await webdriver(nextUrl, '/redirect-middleware-to-dashboard') // expect(await browser.elementByCss('h1').text()).toBe('Dashboard') - // expect(await browser.url()).toBe(`${next.url}/dashboard`) + // expect(await browser.url()).toBe(`${nextUrl}/dashboard`) // }) // it('should redirect from middleware with link navigation', async () => { - // const browser = await webdriver(next.url, '/redirect/next-middleware-redirect') + // const browser = await webdriver(nextUrl, '/redirect/next-middleware-redirect') // await browser.elementByCss('#redirect-middleware').click().waitForElementByCss('h1') // expect(await browser.elementByCss('h1').text()).toBe('Dashboard') - // expect(await browser.url()).toBe(`${next.url}/dashboard`) + // expect(await browser.url()).toBe(`${nextUrl}/dashboard`) // }) // }) // }) diff --git a/test/e2e/next-test-lib/amp-test-utils.js b/test/e2e/next-test-lib/amp-test-utils.js new file mode 100644 index 0000000000..203addf321 --- /dev/null +++ b/test/e2e/next-test-lib/amp-test-utils.js @@ -0,0 +1,19 @@ +/* eslint-env jest */ +import amphtmlValidator from 'amphtml-validator' + +export async function validateAMP(html) { + const validator = await amphtmlValidator.getInstance() + const result = validator.validateString(html) + if (result.status !== 'PASS') { + for (let ii = 0; ii < result.errors.length; ii++) { + const error = result.errors[ii] + let msg = + 'line ' + error.line + ', col ' + error.col + ': ' + error.message + if (error.specUrl !== null) { + msg += ' (see ' + error.specUrl + ')' + } + ;(error.severity === 'ERROR' ? console.error : console.warn)(msg) + } + } + expect(result.status).toBe('PASS') +} diff --git a/test/e2e/next-test-lib/browsers/base.ts b/test/e2e/next-test-lib/browsers/base.ts new file mode 100644 index 0000000000..748270aca3 --- /dev/null +++ b/test/e2e/next-test-lib/browsers/base.ts @@ -0,0 +1,111 @@ +export type Event = 'request' + +// This is the base Browser interface all browser +// classes should build off of, it is the bare +// methods we aim to support across tests +export class BrowserInterface { + private promise: any + private then: any + private catch: any + + protected chain(nextCall: any): BrowserInterface { + if (!this.promise) { + this.promise = Promise.resolve(this) + } + this.promise = this.promise.then(nextCall) + this.then = (...args) => this.promise.then(...args) + this.catch = (...args) => this.promise.catch(...args) + return this + } + + async setup(browserName: string, locale?: string): Promise {} + async close(): Promise {} + async quit(): Promise {} + + elementsByCss(selector: string): BrowserInterface[] { + return [this] + } + elementByCss(selector: string): BrowserInterface { + return this + } + elementById(selector: string): BrowserInterface { + return this + } + touchStart(): BrowserInterface { + return this + } + click(opts?: { modifierKey?: boolean }): BrowserInterface { + return this + } + keydown(key: string): BrowserInterface { + return this + } + keyup(key: string): BrowserInterface { + return this + } + focusPage(): BrowserInterface { + return this + } + type(text: string): BrowserInterface { + return this + } + moveTo(): BrowserInterface { + return this + } + waitForElementByCss(selector: string, timeout?: number): BrowserInterface { + return this + } + waitForCondition(snippet: string, timeout?: number): BrowserInterface { + return this + } + back(): BrowserInterface { + return this + } + forward(): BrowserInterface { + return this + } + refresh(): BrowserInterface { + return this + } + setDimensions(opts: { height: number; width: number }): BrowserInterface { + return this + } + addCookie(opts: { name: string; value: string }): BrowserInterface { + return this + } + deleteCookies(): BrowserInterface { + return this + } + on(event: Event, cb: (...args: any[]) => void) {} + off(event: Event, cb: (...args: any[]) => void) {} + async loadPage( + url: string, + { disableCache: boolean, beforePageLoad: Function } + ): Promise {} + async get(url: string): Promise {} + + async getValue(): Promise {} + async getAttribute(name: string): Promise {} + async eval(snippet: string | Function): Promise {} + async evalAsync(snippet: string | Function): Promise {} + async text(): Promise { + return '' + } + async getComputedCss(prop: string): Promise { + return '' + } + async hasElementByCssSelector(selector: string): Promise { + return false + } + async log(): Promise< + { source: 'error' | 'info' | 'log'; message: string }[] + > { + return [] + } + async websocketFrames(): Promise { + return [] + } + async url(): Promise { + return '' + } +} diff --git a/test/e2e/next-test-lib/browsers/playwright.ts b/test/e2e/next-test-lib/browsers/playwright.ts new file mode 100644 index 0000000000..5650618dc1 --- /dev/null +++ b/test/e2e/next-test-lib/browsers/playwright.ts @@ -0,0 +1,345 @@ +import { BrowserInterface, Event } from './base' +import fs from 'fs-extra' +import { chromium, webkit, firefox, Browser, BrowserContext, Page, ElementHandle, devices } from 'playwright-chromium' +import path from 'path' + +let page: Page +let browser: Browser +let context: BrowserContext +let pageLogs: Array<{ source: string; message: string }> = [] +let websocketFrames: Array<{ payload: string | Buffer }> = [] + +const tracePlaywright = process.env.TRACE_PLAYWRIGHT + +export async function quit() { + await context?.close() + await browser?.close() +} + +export class Playwright extends BrowserInterface { + private activeTrace?: string + private eventCallbacks: Record void>> = { + request: new Set(), + } + + on(event: Event, cb: (...args: any[]) => void) { + if (!this.eventCallbacks[event]) { + throw new Error(`Invalid event passed to browser.on, received ${event}. Valid events are ${Object.keys(event)}`) + } + this.eventCallbacks[event]?.add(cb) + } + off(event: Event, cb: (...args: any[]) => void) { + this.eventCallbacks[event]?.delete(cb) + } + + async setup(browserName: string, locale?: string) { + if (browser) return + const headless = !!process.env.HEADLESS + let device + + if (process.env.DEVICE_NAME) { + device = devices[process.env.DEVICE_NAME] + + if (!device) { + throw new Error(`Invalid playwright device name ${process.env.DEVICE_NAME}`) + } + } + + if (browserName === 'safari') { + browser = await webkit.launch({ headless }) + } else if (browserName === 'firefox') { + browser = await firefox.launch({ headless }) + } else { + browser = await chromium.launch({ headless, devtools: !headless }) + } + context = await browser.newContext({ locale, ...device }) + } + + async get(url: string): Promise { + return page.goto(url) as any + } + + async loadPage(url: string, opts?: { disableCache: boolean; beforePageLoad?: (...args: any[]) => void }) { + if (this.activeTrace) { + const traceDir = path.join(__dirname, '../../traces') + const traceOutputPath = path.join( + traceDir, + `${path.relative(path.join(__dirname, '../../'), process.env.TEST_FILE_PATH ?? '').replace(/\//g, '-')}`, + `playwright-${this.activeTrace}-${Date.now()}.zip`, + ) + + await fs.remove(traceOutputPath) + await context.tracing + .stop({ + path: traceOutputPath, + }) + .catch((err) => console.error('failed to write playwright trace', err)) + } + + // clean-up existing pages + for (const oldPage of context.pages()) { + await oldPage.close() + } + page = await context.newPage() + pageLogs = [] + websocketFrames = [] + + page.on('console', (msg) => { + console.log('browser log:', msg) + pageLogs.push({ source: msg.type(), message: msg.text() }) + }) + page.on('crash', (page) => { + console.error('page crashed') + }) + page.on('pageerror', (error) => { + console.error('page error', error) + }) + page.on('request', (req) => { + this.eventCallbacks.request.forEach((cb) => cb(req)) + }) + + if (opts?.disableCache) { + // TODO: this doesn't seem to work (dev tools does not check the box as expected) + const session = await context.newCDPSession(page) + session.send('Network.setCacheDisabled', { cacheDisabled: true }) + } + + page.on('websocket', (ws) => { + if (tracePlaywright) { + page.evaluate(`console.log('connected to ws at ${ws.url()}')`).catch(() => {}) + + ws.on('close', () => page.evaluate(`console.log('closed websocket ${ws.url()}')`).catch(() => {})) + } + ws.on('framereceived', (frame) => { + websocketFrames.push({ payload: frame.payload }) + + if (tracePlaywright) { + if (!frame.payload.includes('pong')) { + page.evaluate(`console.log('received ws message ${frame.payload}')`).catch(() => {}) + } + } + }) + }) + + opts?.beforePageLoad?.(page) + + if (tracePlaywright) { + await context.tracing.start({ + screenshots: true, + snapshots: true, + }) + this.activeTrace = encodeURIComponent(url) + } + await page.goto(url, { waitUntil: 'load' }) + } + + back(): BrowserInterface { + return this.chain(() => { + return page.goBack() + }) + } + forward(): BrowserInterface { + return this.chain(() => { + return page.goForward() + }) + } + refresh(): BrowserInterface { + return this.chain(() => { + return page.reload() + }) + } + setDimensions({ width, height }: { height: number; width: number }): BrowserInterface { + return this.chain(() => page.setViewportSize({ width, height })) + } + addCookie(opts: { name: string; value: string }): BrowserInterface { + return this.chain(async () => + context.addCookies([ + { + path: '/', + domain: await page.evaluate('window.location.hostname'), + ...opts, + }, + ]), + ) + } + deleteCookies(): BrowserInterface { + return this.chain(async () => context.clearCookies()) + } + + focusPage() { + return this.chain(() => page.bringToFront()) + } + + private wrapElement(el: ElementHandle, selector: string) { + ;(el as any).selector = selector + ;(el as any).text = () => el.innerText() + ;(el as any).getComputedCss = (prop) => + page.evaluate( + function (args) { + return getComputedStyle(document.querySelector(args.selector)!)[args.prop] || null + }, + { selector, prop }, + ) + ;(el as any).getCssValue = (el as any).getComputedCss + ;(el as any).getValue = () => + page.evaluate( + function (args) { + return (document.querySelector(args.selector) as any).value + }, + { selector }, + ) + return el + } + + elementByCss(selector: string) { + return this.waitForElementByCss(selector) + } + + elementById(sel) { + return this.elementByCss(`#${sel}`) + } + + getValue() { + return this.chain((el) => + page.evaluate( + function (args) { + return document.querySelector(args.selector).value + }, + { selector: el.selector }, + ), + ) as any + } + + text() { + return this.chain((el) => el.text()) as any + } + + type(text) { + return this.chain((el) => el.type(text)) + } + + moveTo() { + return this.chain((el) => { + return page.hover(el.selector).then(() => el) + }) + } + + async getComputedCss(prop: string) { + return this.chain((el) => { + return el.getCssValue(prop) + }) as any + } + + async getAttribute(attr) { + return this.chain((el) => el.getAttribute(attr)) + } + + async hasElementByCssSelector(selector: string) { + return this.eval(`!!document.querySelector('${selector}')`) as any + } + + keydown(key: string): BrowserInterface { + return this.chain((el) => { + return page.keyboard.down(key).then(() => el) + }) + } + + keyup(key: string): BrowserInterface { + return this.chain((el) => { + return page.keyboard.up(key).then(() => el) + }) + } + + click() { + return this.chain((el) => { + return el.click().then(() => el) + }) + } + + touchStart() { + return this.chain((el: ElementHandle) => { + return el.dispatchEvent('touchstart').then(() => el) + }) + } + + elementsByCss(sel) { + return this.chain(() => + page.$$(sel).then((els) => { + return els.map((el) => { + const origGetAttribute = el.getAttribute.bind(el) + el.getAttribute = (name) => { + // ensure getAttribute defaults to empty string to + // match selenium + return origGetAttribute(name).then((val) => val || '') + } + return el + }) + }), + ) as any as BrowserInterface[] + } + + waitForElementByCss(selector, timeout?: number) { + return this.chain(() => { + return page.waitForSelector(selector, { timeout, state: 'attached' }).then(async (el) => { + // it seems selenium waits longer and tests rely on this behavior + // so we wait for the load event fire before returning + await page.waitForLoadState() + return this.wrapElement(el, selector) + }) + }) + } + + waitForCondition(condition, timeout) { + return this.chain(() => { + return page.waitForFunction(condition, { timeout }) + }) + } + + async eval(snippet) { + // TODO: should this and evalAsync be chained? Might lead + // to bad chains + return page + .evaluate(snippet) + .catch((err) => { + console.error('eval error:', err) + return null + }) + .then(async (val) => { + await page.waitForLoadState() + return val + }) + } + + async evalAsync(snippet) { + if (typeof snippet === 'function') { + snippet = snippet.toString() + } + + if (snippet.includes(`var callback = arguments[arguments.length - 1]`)) { + snippet = `(function() { + return new Promise((resolve, reject) => { + const origFunc = ${snippet} + try { + origFunc(resolve) + } catch (err) { + reject(err) + } + }) + })()` + } + + return page.evaluate(snippet).catch(() => null) + } + + async log() { + return this.chain(() => pageLogs) as any + } + + async websocketFrames() { + return this.chain(() => websocketFrames) as any + } + + async url() { + return this.chain(() => page.evaluate('window.location.href')) as any + } +} diff --git a/test/e2e/next-test-lib/browsers/selenium.ts b/test/e2e/next-test-lib/browsers/selenium.ts new file mode 100644 index 0000000000..e6e8c1aa00 --- /dev/null +++ b/test/e2e/next-test-lib/browsers/selenium.ts @@ -0,0 +1,358 @@ +import path from 'path' +import resolveFrom from 'resolve-from' +import { execSync } from 'child_process' +import { Options as ChromeOptions } from 'selenium-webdriver/chrome' +import { Options as SafariOptions } from 'selenium-webdriver/safari' +import { Options as FireFoxOptions } from 'selenium-webdriver/firefox' +import { Builder, By, ThenableWebDriver, until } from 'selenium-webdriver' + +import { BrowserInterface } from './base' + +const { + BROWSERSTACK, + BROWSERSTACK_USERNAME, + BROWSERSTACK_ACCESS_KEY, + HEADLESS, + CHROME_BIN, + LEGACY_SAFARI, + SKIP_LOCAL_SELENIUM_SERVER, +} = process.env + +if (process.env.ChromeWebDriver) { + process.env.PATH = `${process.env.ChromeWebDriver}${path.delimiter}${process.env.PATH}` +} + +let seleniumServer: any +let browserStackLocal: any +let browser: ThenableWebDriver + +export async function quit() { + await Promise.all([ + browser?.quit(), + new Promise((resolve) => { + browserStackLocal + ? browserStackLocal.killAllProcesses(() => resolve()) + : resolve() + }), + ]) + seleniumServer?.kill() + + browser = undefined + browserStackLocal = undefined + seleniumServer = undefined +} + +export class Selenium extends BrowserInterface { + private browserName: string + + // TODO: support setting locale + async setup(browserName: string, locale?: string) { + if (browser) return + this.browserName = browserName + + let capabilities = {} + const isSafari = browserName === 'safari' + const isFirefox = browserName === 'firefox' + const isIE = browserName === 'internet explorer' + const isBrowserStack = BROWSERSTACK + const localSeleniumServer = SKIP_LOCAL_SELENIUM_SERVER !== 'true' + + // install conditional packages globally so the entire + // monorepo doesn't need to rebuild when testing + let globalNodeModules: string + + if (isBrowserStack || localSeleniumServer) { + globalNodeModules = execSync('npm root -g').toString().trim() + } + + if (isBrowserStack) { + const { Local } = require(resolveFrom( + globalNodeModules, + 'browserstack-local' + )) + browserStackLocal = new Local() + + const localBrowserStackOpts = { + key: process.env.BROWSERSTACK_ACCESS_KEY, + // Add a unique local identifier to run parallel tests + // on BrowserStack + localIdentifier: new Date().getTime(), + } + await new Promise((resolve, reject) => { + browserStackLocal.start(localBrowserStackOpts, (err) => { + if (err) return reject(err) + console.log( + 'Started BrowserStackLocal', + browserStackLocal.isRunning() + ) + resolve() + }) + }) + + const safariOpts = { + os: 'OS X', + os_version: 'Mojave', + browser: 'Safari', + } + const safariLegacyOpts = { + os: 'OS X', + os_version: 'Sierra', + browserName: 'Safari', + browser_version: '10.1', + } + const ieOpts = { + os: 'Windows', + os_version: '10', + browser: 'IE', + } + const firefoxOpts = { + os: 'Windows', + os_version: '10', + browser: 'Firefox', + } + const sharedOpts = { + 'browserstack.local': true, + 'browserstack.video': false, + 'browserstack.user': BROWSERSTACK_USERNAME, + 'browserstack.key': BROWSERSTACK_ACCESS_KEY, + 'browserstack.localIdentifier': localBrowserStackOpts.localIdentifier, + } + + capabilities = { + ...capabilities, + ...sharedOpts, + + ...(isIE ? ieOpts : {}), + ...(isSafari ? (LEGACY_SAFARI ? safariLegacyOpts : safariOpts) : {}), + ...(isFirefox ? firefoxOpts : {}), + } + } else if (localSeleniumServer) { + console.log('Installing selenium server') + const seleniumServerMod = require(resolveFrom( + globalNodeModules, + 'selenium-standalone' + )) + + await new Promise((resolve, reject) => { + seleniumServerMod.install((err) => { + if (err) return reject(err) + resolve() + }) + }) + + console.log('Starting selenium server') + await new Promise((resolve, reject) => { + seleniumServerMod.start((err, child) => { + if (err) return reject(err) + seleniumServer = child + resolve() + }) + }) + console.log('Started selenium server') + } + + let chromeOptions = new ChromeOptions() + let firefoxOptions = new FireFoxOptions() + let safariOptions = new SafariOptions() + + if (HEADLESS) { + const screenSize = { width: 1280, height: 720 } + chromeOptions = chromeOptions.headless().windowSize(screenSize) as any + firefoxOptions = firefoxOptions.headless().windowSize(screenSize) + } + + if (CHROME_BIN) { + chromeOptions = chromeOptions.setChromeBinaryPath( + path.resolve(CHROME_BIN) + ) + } + + let seleniumServerUrl + + if (isBrowserStack) { + seleniumServerUrl = 'http://hub-cloud.browserstack.com/wd/hub' + } else if (localSeleniumServer) { + seleniumServerUrl = `http://localhost:4444/wd/hub` + } + + browser = new Builder() + .usingServer(seleniumServerUrl) + .withCapabilities(capabilities) + .forBrowser(browserName) + .setChromeOptions(chromeOptions) + .setFirefoxOptions(firefoxOptions) + .setSafariOptions(safariOptions) + .build() + } + + async get(url: string): Promise { + return browser.get(url) + } + + async loadPage(url: string) { + // in chrome we use a new tab for testing + if (this.browserName === 'chrome') { + const initialHandle = await browser.getWindowHandle() + + await browser.switchTo().newWindow('tab') + const newHandle = await browser.getWindowHandle() + + await browser.switchTo().window(initialHandle) + await browser.close() + await browser.switchTo().window(newHandle) + + // clean-up extra windows created from links and such + for (const handle of await browser.getAllWindowHandles()) { + if (handle !== newHandle) { + await browser.switchTo().window(handle) + await browser.close() + } + } + await browser.switchTo().window(newHandle) + } else { + await browser.get('about:blank') + } + return browser.get(url) + } + + back(): BrowserInterface { + return this.chain(() => { + return browser.navigate().back() + }) + } + forward(): BrowserInterface { + return this.chain(() => { + return browser.navigate().forward() + }) + } + refresh(): BrowserInterface { + return this.chain(() => { + return browser.navigate().refresh() + }) + } + setDimensions({ + width, + height, + }: { + height: number + width: number + }): BrowserInterface { + return this.chain(() => + browser.manage().window().setRect({ width, height, x: 0, y: 0 }) + ) + } + addCookie(opts: { name: string; value: string }): BrowserInterface { + return this.chain(() => browser.manage().addCookie(opts)) + } + deleteCookies(): BrowserInterface { + return this.chain(() => browser.manage().deleteAllCookies()) + } + + elementByCss(selector: string) { + return this.chain(() => { + return browser.findElement(By.css(selector)).then((el: any) => { + el.selector = selector + el.text = () => el.getText() + el.getComputedCss = (prop) => el.getCssValue(prop) + el.type = (text) => el.sendKeys(text) + el.getValue = () => + browser.executeScript( + `return document.querySelector('${selector}').value` + ) + return el + }) + }) + } + + elementById(sel) { + return this.elementByCss(`#${sel}`) + } + + getValue() { + return this.chain((el) => + browser.executeScript( + `return document.querySelector('${el.selector}').value` + ) + ) as any + } + + text() { + return this.chain((el) => el.getText()) as any + } + + type(text) { + return this.chain((el) => el.sendKeys(text)) + } + + moveTo() { + return this.chain((el) => { + return browser + .actions() + .move({ origin: el }) + .perform() + .then(() => el) + }) + } + + async getComputedCss(prop: string) { + return this.chain((el) => { + return el.getCssValue(prop) + }) as any + } + + async getAttribute(attr) { + return this.chain((el) => el.getAttribute(attr)) + } + + async hasElementByCssSelector(selector: string) { + return this.eval(`!!document.querySelector('${selector}')`) as any + } + + click() { + return this.chain((el) => { + return el.click().then(() => el) + }) + } + + elementsByCss(sel) { + return this.chain(() => + browser.findElements(By.css(sel)) + ) as any as BrowserInterface[] + } + + waitForElementByCss(sel, timeout) { + return this.chain(() => + browser.wait(until.elementLocated(By.css(sel)), timeout) + ) + } + + waitForCondition(condition, timeout) { + return this.chain(() => + browser.wait(async (driver) => { + return driver.executeScript('return ' + condition).catch(() => false) + }, timeout) + ) + } + + async eval(snippet) { + if (typeof snippet === 'string' && !snippet.startsWith('return')) { + snippet = `return ${snippet}` + } + return browser.executeScript(snippet) + } + + async evalAsync(snippet) { + if (typeof snippet === 'string' && !snippet.startsWith('return')) { + snippet = `return ${snippet}` + } + return browser.executeAsyncScript(snippet) + } + + async log() { + return this.chain(() => browser.manage().logs().get('browser')) as any + } + + async url() { + return this.chain(() => browser.getCurrentUrl()) as any + } +} diff --git a/test/e2e/next-test-lib/create-next-install.js b/test/e2e/next-test-lib/create-next-install.js new file mode 100644 index 0000000000..224cb1824a --- /dev/null +++ b/test/e2e/next-test-lib/create-next-install.js @@ -0,0 +1,122 @@ +const os = require('os') +const path = require('path') +const execa = require('execa') +const fs = require('fs-extra') +const childProcess = require('child_process') +const { randomBytes } = require('crypto') +const { linkPackages } = + require('../../.github/actions/next-stats-action/src/prepare/repo-setup')() + +async function createNextInstall( + dependencies, + installCommand, + packageJson = {}, + packageLockPath = '' +) { + const tmpDir = await fs.realpath(process.env.NEXT_TEST_DIR || os.tmpdir()) + const origRepoDir = path.join(__dirname, '../../') + const installDir = path.join( + tmpDir, + `next-install-${randomBytes(32).toString('hex')}` + ) + const tmpRepoDir = path.join( + tmpDir, + `next-repo-${randomBytes(32).toString('hex')}` + ) + + // ensure swc binary is present in the native folder if + // not already built + for (const folder of await fs.readdir( + path.join(origRepoDir, 'node_modules/@next') + )) { + if (folder.startsWith('swc-')) { + const swcPkgPath = path.join(origRepoDir, 'node_modules/@next', folder) + const outputPath = path.join(origRepoDir, 'packages/next-swc/native') + await fs.copy(swcPkgPath, outputPath, { + filter: (item) => { + return ( + item === swcPkgPath || + (item.endsWith('.node') && + !fs.pathExistsSync(path.join(outputPath, path.basename(item)))) + ) + }, + }) + } + } + + for (const item of ['package.json', 'packages']) { + await fs.copy(path.join(origRepoDir, item), path.join(tmpRepoDir, item), { + filter: (item) => { + return ( + !item.includes('node_modules') && + !item.includes('.DS_Store') && + // Exclude Rust compilation files + !/next[\\/]build[\\/]swc[\\/]target/.test(item) && + !/next-swc[\\/]target/.test(item) + ) + }, + }) + } + + let combinedDependencies = dependencies + + if (!(packageJson && packageJson.nextPrivateSkipLocalDeps)) { + const pkgPaths = await linkPackages(tmpRepoDir) + combinedDependencies = { + next: pkgPaths.get('next'), + ...Object.keys(dependencies).reduce((prev, pkg) => { + const pkgPath = pkgPaths.get(pkg) + prev[pkg] = pkgPath || dependencies[pkg] + return prev + }, {}), + } + } + + await fs.ensureDir(installDir) + await fs.writeFile( + path.join(installDir, 'package.json'), + JSON.stringify( + { + ...packageJson, + dependencies: combinedDependencies, + private: true, + }, + null, + 2 + ) + ) + + if (packageLockPath) { + await fs.copy( + packageLockPath, + path.join(installDir, path.basename(packageLockPath)) + ) + } + + if (installCommand) { + const installString = + typeof installCommand === 'function' + ? installCommand({ dependencies: combinedDependencies }) + : installCommand + + console.log('running install command', installString) + + childProcess.execSync(installString, { + cwd: installDir, + stdio: ['ignore', 'inherit', 'inherit'], + }) + } else { + await execa('pnpm', ['install', '--strict-peer-dependencies=false'], { + cwd: installDir, + stdio: ['ignore', 'inherit', 'inherit'], + env: process.env, + }) + } + + await fs.remove(tmpRepoDir) + return installDir +} + +module.exports = { + createNextInstall, +} diff --git a/test/e2e/next-test-lib/e2e-utils.ts b/test/e2e/next-test-lib/e2e-utils.ts new file mode 100644 index 0000000000..3a89868018 --- /dev/null +++ b/test/e2e/next-test-lib/e2e-utils.ts @@ -0,0 +1,164 @@ +import path from 'path' +import assert from 'assert' +import { NextConfig } from 'next' +import { InstallCommand, NextInstance, PackageJson } from './next-modes/base' +import { NextDevInstance } from './next-modes/next-dev' +import { NextStartInstance } from './next-modes/next-start' +import { NextDeployInstance } from './next-modes/next-deploy' + +// increase timeout to account for yarn install time +jest.setTimeout(240 * 1000) + +const testsFolder = path.join(__dirname, '..') + +let testFile +const testFileRegex = /\.test\.(js|tsx?)/ + +const visitedModules = new Set() +const checkParent = (mod) => { + if (!mod?.parent || visitedModules.has(mod)) return + testFile = mod.parent.filename || '' + visitedModules.add(mod) + + if (!testFileRegex.test(testFile)) { + checkParent(mod.parent) + } +} +checkParent(module) + +process.env.TEST_FILE_PATH = testFile + +let testMode = process.env.NEXT_TEST_MODE + +if (!testFileRegex.test(testFile)) { + throw new Error( + `e2e-utils imported from non-test file ${testFile} (must end with .test.(js,ts,tsx)` + ) +} + +const testFolderModes = ['e2e', 'development', 'production'] + +const testModeFromFile = testFolderModes.find((mode) => + testFile.startsWith(path.join(testsFolder, mode)) +) + +if (testModeFromFile === 'e2e') { + const validE2EModes = ['dev', 'start', 'deploy'] + + if (!process.env.NEXT_TEST_JOB && !testMode) { + require('console').warn( + 'Warn: no NEXT_TEST_MODE set, using default of start' + ) + testMode = 'start' + } + assert( + validE2EModes.includes(testMode), + `NEXT_TEST_MODE must be one of ${validE2EModes.join( + ', ' + )} for e2e tests but received ${testMode}` + ) +} else if (testModeFromFile === 'development') { + testMode = 'dev' +} else if (testModeFromFile === 'production') { + testMode = 'start' +} + +if (testMode === 'dev') { + ;(global as any).isNextDev = true +} else if (testMode === 'deploy') { + ;(global as any).isNextDeploy = true +} else { + ;(global as any).isNextStart = true +} + +if (!testMode) { + throw new Error( + `No 'NEXT_TEST_MODE' set in environment, this is required for e2e-utils` + ) +} +require('console').warn( + `Using test mode: ${testMode} in test folder ${testModeFromFile}` +) + +/** + * FileRef is wrapper around a file path that is meant be copied + * to the location where the next instance is being created + */ +export class FileRef { + public fsPath: string + + constructor(path: string) { + this.fsPath = path + } +} + +let nextInstance: NextInstance | undefined = undefined + +if (typeof afterAll === 'function') { + afterAll(async () => { + if (nextInstance) { + await nextInstance.destroy() + throw new Error( + `next instance not destroyed before exiting, make sure to call .destroy() after the tests after finished` + ) + } + }) +} + +/** + * Sets up and manages a Next.js instance in the configured + * test mode. The next instance will be isolated from the monorepo + * to prevent relying on modules that shouldn't be + */ +export async function createNext(opts: { + files: + | FileRef + | { + [filename: string]: string | FileRef + } + dependencies?: { + [name: string]: string + } + nextConfig?: NextConfig + skipStart?: boolean + installCommand?: InstallCommand + buildCommand?: string + packageJson?: PackageJson + startCommand?: string + packageLockPath?: string + env?: Record +}): Promise { + try { + if (nextInstance) { + throw new Error(`createNext called without destroying previous instance`) + } + + if (testMode === 'dev') { + // next dev + nextInstance = new NextDevInstance(opts) + } else if (testMode === 'deploy') { + // Vercel + nextInstance = new NextDeployInstance(opts) + } else { + // next build + next start + nextInstance = new NextStartInstance(opts) + } + + nextInstance.on('destroy', () => { + nextInstance = undefined + }) + + await nextInstance.setup() + + if (!opts.skipStart) { + await nextInstance.start() + } + return nextInstance! + } catch (err) { + require('console').error('Failed to create next instance', err) + try { + nextInstance.destroy() + } catch (_) {} + process.exit(1) + } +} diff --git a/test/e2e/next-test-lib/flat-map-polyfill.js b/test/e2e/next-test-lib/flat-map-polyfill.js new file mode 100644 index 0000000000..b9ad706cfe --- /dev/null +++ b/test/e2e/next-test-lib/flat-map-polyfill.js @@ -0,0 +1,37 @@ +if (!Array.prototype.flat) { + // eslint-disable-next-line no-extend-native + Object.defineProperty(Array.prototype, 'flat', { + configurable: true, + value: function flat() { + var depth = isNaN(arguments[0]) ? 1 : Number(arguments[0]) + + return depth + ? Array.prototype.reduce.call( + this, + function (acc, cur) { + if (Array.isArray(cur)) { + acc.push.apply(acc, flat.call(cur, depth - 1)) + } else { + acc.push(cur) + } + + return acc + }, + [] + ) + : Array.prototype.slice.call(this) + }, + writable: true, + }) +} + +if (!Array.prototype.flatMap) { + // eslint-disable-next-line no-extend-native + Object.defineProperty(Array.prototype, 'flatMap', { + configurable: true, + value: function flatMap() { + return Array.prototype.map.apply(this, arguments).flat() + }, + writable: true, + }) +} diff --git a/test/e2e/next-test-lib/mocks-require-hook.js b/test/e2e/next-test-lib/mocks-require-hook.js new file mode 100644 index 0000000000..7c5eac8563 --- /dev/null +++ b/test/e2e/next-test-lib/mocks-require-hook.js @@ -0,0 +1,24 @@ +const mod = require('module') + +const hookPropertyMap = new Map([ + [ + /node-polyfill-web-streams/, + require.resolve('../__mocks__/node-polyfill-web-streams.js'), + ], +]) + +function matchModule(request) { + for (const [key, value] of hookPropertyMap) { + if (key.test(request)) { + return value + } + } + return null +} + +const resolveFilename = mod._resolveFilename +mod._resolveFilename = function (request, parent, isMain, options) { + const hookResolved = matchModule(request) + if (hookResolved) request = hookResolved + return resolveFilename.call(mod, request, parent, isMain, options) +} diff --git a/test/e2e/next-test-lib/next-modes/base.ts b/test/e2e/next-test-lib/next-modes/base.ts new file mode 100644 index 0000000000..2e9b7432f9 --- /dev/null +++ b/test/e2e/next-test-lib/next-modes/base.ts @@ -0,0 +1,378 @@ +import os from 'os' +import path from 'path' +import fs from 'fs-extra' +import treeKill from 'tree-kill' +import { NextConfig } from 'next' +import { FileRef } from '../e2e-utils' +import { ChildProcess } from 'child_process' +import { createNextInstall } from '../create-next-install' + +type Event = 'stdout' | 'stderr' | 'error' | 'destroy' +export type InstallCommand = + | string + | ((ctx: { dependencies: { [key: string]: string } }) => string) + +export type PackageJson = { + [key: string]: unknown +} +export class NextInstance { + protected files: + | FileRef + | { + [filename: string]: string | FileRef + } + protected nextConfig?: NextConfig + protected installCommand?: InstallCommand + protected buildCommand?: string + protected startCommand?: string + protected dependencies?: { [name: string]: string } + protected events: { [eventName: string]: Set } + public testDir: string + protected isStopping: boolean + protected isDestroyed: boolean + protected childProcess: ChildProcess + protected _url: string + protected _parsedUrl: URL + protected packageJson: PackageJson + protected packageLockPath?: string + protected basePath?: string + protected env?: Record + public forcedPort?: string + + constructor({ + files, + dependencies, + nextConfig, + installCommand, + buildCommand, + startCommand, + packageJson = {}, + packageLockPath, + env, + }: { + files: + | FileRef + | { + [filename: string]: string | FileRef + } + dependencies?: { + [name: string]: string + } + packageJson?: PackageJson + packageLockPath?: string + nextConfig?: NextConfig + installCommand?: InstallCommand + buildCommand?: string + startCommand?: string + env?: Record + }) { + this.files = files + this.dependencies = dependencies + this.nextConfig = nextConfig + this.installCommand = installCommand + this.buildCommand = buildCommand + this.startCommand = startCommand + this.packageJson = packageJson + this.packageLockPath = packageLockPath + this.events = {} + this.isDestroyed = false + this.isStopping = false + this.env = env + } + + protected async createTestDir({ + skipInstall = false, + }: { skipInstall?: boolean } = {}) { + if (this.isDestroyed) { + throw new Error('next instance already destroyed') + } + require('console').log(`Creating test directory with isolated next...`) + + const skipIsolatedNext = !!process.env.NEXT_SKIP_ISOLATE + const tmpDir = skipIsolatedNext + ? path.join(__dirname, '../../tmp') + : process.env.NEXT_TEST_DIR || (await fs.realpath(os.tmpdir())) + this.testDir = path.join( + tmpDir, + `next-test-${Date.now()}-${(Math.random() * 1000) | 0}` + ) + + const reactVersion = process.env.NEXT_TEST_REACT_VERSION || 'latest' + const finalDependencies = { + react: reactVersion, + 'react-dom': reactVersion, + ...this.dependencies, + ...((this.packageJson.dependencies as object | undefined) || {}), + } + + if (skipInstall) { + const pkgScripts = (this.packageJson['scripts'] as {}) || {} + await fs.ensureDir(this.testDir) + await fs.writeFile( + path.join(this.testDir, 'package.json'), + JSON.stringify( + { + ...this.packageJson, + dependencies: { + ...finalDependencies, + next: + process.env.NEXT_TEST_VERSION || + require('next/package.json').version, + }, + scripts: { + ...pkgScripts, + build: + (pkgScripts['build'] || this.buildCommand || 'next build') + + ' && yarn post-build', + // since we can't get the build id as a build artifact, make it + // available under the static files + 'post-build': 'cp .next/BUILD_ID .next/static/__BUILD_ID', + }, + }, + null, + 2 + ) + ) + } else { + if ( + process.env.NEXT_TEST_STARTER && + !this.dependencies && + !this.installCommand && + !this.packageJson && + !(global as any).isNextDeploy + ) { + await fs.copy(process.env.NEXT_TEST_STARTER, this.testDir) + } else if (!skipIsolatedNext) { + this.testDir = await createNextInstall( + finalDependencies, + this.installCommand, + this.packageJson, + this.packageLockPath + ) + } + require('console').log('created next.js install, writing test files') + } + + if (this.files instanceof FileRef) { + // if a FileRef is passed directly to `files` we copy the + // entire folder to the test directory + const stats = await fs.stat(this.files.fsPath) + + if (!stats.isDirectory()) { + throw new Error( + `FileRef passed to "files" in "createNext" is not a directory ${this.files.fsPath}` + ) + } + await fs.copy(this.files.fsPath, this.testDir) + } else { + for (const filename of Object.keys(this.files)) { + const item = this.files[filename] + const outputFilename = path.join(this.testDir, filename) + + if (typeof item === 'string') { + await fs.ensureDir(path.dirname(outputFilename)) + await fs.writeFile(outputFilename, item) + } else { + await fs.copy(item.fsPath, outputFilename) + } + } + } + + let nextConfigFile = Object.keys(this.files).find((file) => + file.startsWith('next.config.') + ) + + if (await fs.pathExists(path.join(this.testDir, 'next.config.js'))) { + nextConfigFile = 'next.config.js' + } + + if (nextConfigFile && this.nextConfig) { + throw new Error( + `nextConfig provided on "createNext()" and as a file "${nextConfigFile}", use one or the other to continue` + ) + } + + if (this.nextConfig || ((global as any).isNextDeploy && !nextConfigFile)) { + const functions = [] + + await fs.writeFile( + path.join(this.testDir, 'next.config.js'), + ` + module.exports = ` + + JSON.stringify( + { + ...this.nextConfig, + } as NextConfig, + (key, val) => { + if (typeof val === 'function') { + functions.push( + val + .toString() + .replace(new RegExp(`${val.name}[\\s]{0,}\\(`), 'function(') + ) + return `__func_${functions.length - 1}` + } + return val + }, + 2 + ).replace(/"__func_[\d]{1,}"/g, function (str) { + return functions.shift() + }) + ) + } + + if ((global as any).isNextDeploy) { + const fileName = path.join( + this.testDir, + nextConfigFile || 'next.config.js' + ) + const content = await fs.readFile(fileName, 'utf8') + + if (content.includes('basePath')) { + this.basePath = + content.match(/['"`]?basePath['"`]?:.*?['"`](.*?)['"`]/)?.[1] || '' + } + + await fs.writeFile( + fileName, + `${content}\n` + + ` + // alias __NEXT_TEST_MODE for next-deploy as "_" is not a valid + // env variable during deploy + if (process.env.NEXT_PRIVATE_TEST_MODE) { + process.env.__NEXT_TEST_MODE = process.env.NEXT_PRIVATE_TEST_MODE + } + ` + ) + } + require('console').log(`Test directory created at ${this.testDir}`) + } + + public async clean() { + if (this.childProcess) { + throw new Error(`stop() must be called before cleaning`) + } + + const keptFiles = ['node_modules', 'package.json', 'yarn.lock'] + for (const file of await fs.readdir(this.testDir)) { + if (!keptFiles.includes(file)) { + await fs.remove(path.join(this.testDir, file)) + } + } + } + + public async export(): Promise<{ exitCode?: number; cliOutput?: string }> { + return {} + } + public async setup(): Promise {} + public async start(useDirArg: boolean = false): Promise {} + public async stop(): Promise { + this.isStopping = true + if (this.childProcess) { + let exitResolve + const exitPromise = new Promise((resolve) => { + exitResolve = resolve + }) + this.childProcess.addListener('exit', () => { + exitResolve() + }) + await new Promise((resolve) => { + treeKill(this.childProcess.pid, 'SIGKILL', (err) => { + if (err) { + require('console').error('tree-kill', err) + } + resolve() + }) + }) + this.childProcess.kill('SIGKILL') + await exitPromise + this.childProcess = undefined + require('console').log(`Stopped next server`) + } + } + + public async destroy(): Promise { + if (this.isDestroyed) { + throw new Error(`next instance already destroyed`) + } + this.isDestroyed = true + this.emit('destroy', []) + await this.stop() + + if (process.env.TRACE_PLAYWRIGHT) { + await fs + .copy( + path.join(this.testDir, '.next/trace'), + path.join( + __dirname, + '../../traces', + `${path + .relative( + path.join(__dirname, '../../'), + process.env.TEST_FILE_PATH + ) + .replace(/\//g, '-')}`, + `next-trace` + ) + ) + .catch(() => {}) + } + + if (!process.env.NEXT_TEST_SKIP_CLEANUP) { + await fs.remove(this.testDir) + } + require('console').log(`destroyed next instance`) + } + + public get url() { + return this._url + } + + public get appPort() { + return this._parsedUrl.port + } + + public get buildId(): string { + return '' + } + + public get cliOutput(): string { + return '' + } + + // TODO: block these in deploy mode + public async readFile(filename: string) { + return fs.readFile(path.join(this.testDir, filename), 'utf8') + } + public async patchFile(filename: string, content: string) { + const outputPath = path.join(this.testDir, filename) + await fs.ensureDir(path.dirname(outputPath)) + return fs.writeFile(outputPath, content) + } + public async renameFile(filename: string, newFilename: string) { + return fs.rename( + path.join(this.testDir, filename), + path.join(this.testDir, newFilename) + ) + } + public async deleteFile(filename: string) { + return fs.remove(path.join(this.testDir, filename)) + } + + public on(event: Event, cb: (...args: any[]) => any) { + if (!this.events[event]) { + this.events[event] = new Set() + } + this.events[event].add(cb) + } + + public off(event: Event, cb: (...args: any[]) => any) { + this.events[event]?.delete(cb) + } + + protected emit(event: Event, args: any[]) { + this.events[event]?.forEach((cb) => { + cb(...args) + }) + } +} diff --git a/test/e2e/next-test-lib/next-modes/next-deploy.ts b/test/e2e/next-test-lib/next-modes/next-deploy.ts new file mode 100644 index 0000000000..8cb141fa4d --- /dev/null +++ b/test/e2e/next-test-lib/next-modes/next-deploy.ts @@ -0,0 +1,169 @@ +import os from 'os' +import path from 'path' +import execa from 'execa' +import fs from 'fs-extra' +import { NextInstance } from './base' +import { + TEST_PROJECT_NAME, + TEST_TEAM_NAME, + TEST_TOKEN, +} from '../../../scripts/reset-vercel-project.mjs' +import fetch from 'node-fetch' + +export class NextDeployInstance extends NextInstance { + private _cliOutput: string + private _buildId: string + + public get buildId() { + // get deployment ID via fetch since we can't access + // build artifacts directly + return this._buildId + } + + public async setup() { + await super.createTestDir({ skipInstall: true }) + + // ensure Vercel CLI is installed + try { + const res = await execa('vercel', ['--version']) + require('console').log(`Using Vercel CLI version:`, res.stdout) + } catch (_) { + require('console').log(`Installing Vercel CLI`) + await execa('npm', ['i', '-g', 'vercel@latest'], { + stdio: 'inherit', + }) + } + const vercelFlags = ['--scope', TEST_TEAM_NAME] + const vercelEnv = { ...process.env, TOKEN: TEST_TOKEN } + + // create auth file in CI + if (process.env.NEXT_TEST_JOB) { + const vcConfigDir = path.join(os.homedir(), '.vercel') + await fs.ensureDir(vcConfigDir) + await fs.writeFile( + path.join(vcConfigDir, 'auth.json'), + JSON.stringify({ token: TEST_TOKEN }) + ) + vercelFlags.push('--global-config', vcConfigDir) + } + require('console').log(`Linking project at ${this.testDir}`) + + // link the project + const linkRes = await execa( + 'vercel', + ['link', '-p', TEST_PROJECT_NAME, '--confirm', ...vercelFlags], + { + cwd: this.testDir, + env: vercelEnv, + } + ) + + if (linkRes.exitCode !== 0) { + throw new Error( + `Failed to link project ${linkRes.stdout} ${linkRes.stderr} (${linkRes.exitCode})` + ) + } + require('console').log(`Deploying project at ${this.testDir}`) + + const additionalEnv = [] + + for (const key of Object.keys(this.env || {})) { + additionalEnv.push('--build-env') + additionalEnv.push(`${key}=${this.env[key]}`) + additionalEnv.push('--env') + additionalEnv.push(`${key}=${this.env[key]}`) + } + + if (process.env.VERCEL_CLI_VERSION) { + additionalEnv.push('--build-env') + additionalEnv.push(`VERCEL_CLI_VERSION=${process.env.VERCEL_CLI_VERSION}`) + } + + const deployRes = await execa( + 'vercel', + [ + 'deploy', + '--build-env', + 'NEXT_PRIVATE_TEST_MODE=1', + '--build-env', + 'NEXT_TELEMETRY_DISABLED=1', + ...additionalEnv, + '--force', + ...vercelFlags, + ], + { + cwd: this.testDir, + env: vercelEnv, + } + ) + + if (deployRes.exitCode !== 0) { + throw new Error( + `Failed to deploy project ${linkRes.stdout} ${linkRes.stderr} (${linkRes.exitCode})` + ) + } + // the CLI gives just the deployment URL back when not a TTY + this._url = deployRes.stdout + this._parsedUrl = new URL(this._url) + + require('console').log(`Deployment URL: ${this._url}`) + const buildIdUrl = `${this._url}${ + this.basePath || '' + }/_next/static/__BUILD_ID` + + const buildIdRes = await fetch(buildIdUrl) + + if (!buildIdRes.ok) { + require('console').error( + `Failed to load buildId ${buildIdUrl} (${buildIdRes.status})` + ) + } + this._buildId = (await buildIdRes.text()).trim() + + require('console').log(`Got buildId: ${this._buildId}`) + + const cliOutputRes = await fetch( + `https://vercel.com/api/v1/deployments/${this._parsedUrl.hostname}/events?builds=1&direction=backward`, + { + headers: { + Authorization: `Bearer ${TEST_TOKEN}`, + }, + } + ) + + if (!cliOutputRes.ok) { + throw new Error( + `Failed to get build output: ${await cliOutputRes.text()} (${ + cliOutputRes.status + })` + ) + } + this._cliOutput = (await cliOutputRes.json()) + .map((line) => line.text || '') + .join('\n') + } + + public get cliOutput() { + return this._cliOutput || '' + } + + public async start() { + // no-op as the deployment is created during setup() + } + + public async patchFile(filename: string, content: string): Promise { + throw new Error('patchFile is not available in deploy test mode') + } + public async readFile(filename: string): Promise { + throw new Error('readFile is not available in deploy test mode') + } + public async deleteFile(filename: string): Promise { + throw new Error('deleteFile is not available in deploy test mode') + } + public async renameFile( + filename: string, + newFilename: string + ): Promise { + throw new Error('renameFile is not available in deploy test mode') + } +} diff --git a/test/e2e/next-test-lib/next-modes/next-dev.ts b/test/e2e/next-test-lib/next-modes/next-dev.ts new file mode 100644 index 0000000000..067d8632a0 --- /dev/null +++ b/test/e2e/next-test-lib/next-modes/next-dev.ts @@ -0,0 +1,80 @@ +import { spawn } from 'child_process' +import { NextInstance } from './base' + +export class NextDevInstance extends NextInstance { + private _cliOutput: string + + public get buildId() { + return 'development' + } + + public async setup() { + await super.createTestDir() + } + + public get cliOutput() { + return this._cliOutput || '' + } + + public async start(useDirArg: boolean = false) { + if (this.childProcess) { + throw new Error('next already started') + } + let startArgs = ['yarn', 'next', useDirArg && this.testDir].filter( + Boolean + ) as string[] + + if (this.startCommand) { + startArgs = this.startCommand.split(' ') + } + + await new Promise((resolve) => { + this.childProcess = spawn(startArgs[0], startArgs.slice(1), { + cwd: useDirArg ? process.cwd() : this.testDir, + stdio: ['ignore', 'pipe', 'pipe'], + shell: false, + env: { + ...process.env, + ...this.env, + NODE_ENV: '' as any, + PORT: this.forcedPort || '0', + __NEXT_TEST_MODE: '1', + __NEXT_TEST_WITH_DEVTOOL: '1', + }, + }) + + this._cliOutput = '' + + this.childProcess.stdout.on('data', (chunk) => { + const msg = chunk.toString() + process.stdout.write(chunk) + this._cliOutput += msg + this.emit('stdout', [msg]) + }) + this.childProcess.stderr.on('data', (chunk) => { + const msg = chunk.toString() + process.stderr.write(chunk) + this._cliOutput += msg + this.emit('stderr', [msg]) + }) + + this.childProcess.on('close', (code, signal) => { + if (this.isStopping) return + if (code || signal) { + throw new Error( + `next dev exited unexpectedly with code/signal ${code || signal}` + ) + } + }) + const readyCb = (msg) => { + if (msg.includes('started server on') && msg.includes('url:')) { + this._url = msg.split('url: ').pop().trim() + this._parsedUrl = new URL(this._url) + this.off('stdout', readyCb) + resolve() + } + } + this.on('stdout', readyCb) + }) + } +} diff --git a/test/e2e/next-test-lib/next-modes/next-start.ts b/test/e2e/next-test-lib/next-modes/next-start.ts new file mode 100644 index 0000000000..51672583a4 --- /dev/null +++ b/test/e2e/next-test-lib/next-modes/next-start.ts @@ -0,0 +1,153 @@ +import path from 'path' +import fs from 'fs-extra' +import { NextInstance } from './base' +import { spawn, SpawnOptions } from 'child_process' + +export class NextStartInstance extends NextInstance { + private _buildId: string + private _cliOutput: string + private spawnOpts: SpawnOptions + + public get buildId() { + return this._buildId + } + + public get cliOutput() { + return this._cliOutput + } + + public async setup() { + await super.createTestDir() + } + + private handleStdio = (childProcess) => { + childProcess.stdout.on('data', (chunk) => { + const msg = chunk.toString() + process.stdout.write(chunk) + this._cliOutput += msg + this.emit('stdout', [msg]) + }) + childProcess.stderr.on('data', (chunk) => { + const msg = chunk.toString() + process.stderr.write(chunk) + this._cliOutput += msg + this.emit('stderr', [msg]) + }) + } + + public async start() { + if (this.childProcess) { + throw new Error('next already started') + } + this._cliOutput = '' + this.spawnOpts = { + cwd: this.testDir, + stdio: ['ignore', 'pipe', 'pipe'], + shell: false, + env: { + ...process.env, + ...this.env, + NODE_ENV: '' as any, + PORT: this.forcedPort || '0', + __NEXT_TEST_MODE: '1', + }, + } + let buildArgs = ['yarn', 'next', 'build'] + let startArgs = ['yarn', 'next', 'start'] + + if (this.buildCommand) { + buildArgs = this.buildCommand.split(' ') + } + if (this.startCommand) { + startArgs = this.startCommand.split(' ') + } + + await new Promise((resolve, reject) => { + console.log('running', buildArgs.join(' ')) + this.childProcess = spawn( + buildArgs[0], + buildArgs.slice(1), + this.spawnOpts + ) + this.handleStdio(this.childProcess) + this.childProcess.on('exit', (code, signal) => { + this.childProcess = null + if (code || signal) + reject( + new Error(`next build failed with code/signal ${code || signal}`) + ) + else resolve() + }) + }) + + this._buildId = ( + await fs.readFile( + path.join( + this.testDir, + this.nextConfig?.distDir || '.next', + 'BUILD_ID' + ), + 'utf8' + ) + ).trim() + + console.log('running', startArgs.join(' ')) + + await new Promise((resolve) => { + this.childProcess = spawn( + startArgs[0], + startArgs.slice(1), + this.spawnOpts + ) + this.handleStdio(this.childProcess) + + this.childProcess.on('close', (code, signal) => { + if (this.isStopping) return + if (code || signal) { + throw new Error( + `next start exited unexpectedly with code/signal ${code || signal}` + ) + } + }) + + const readyCb = (msg) => { + if (msg.includes('started server on') && msg.includes('url:')) { + this._url = msg.split('url: ').pop().trim() + this._parsedUrl = new URL(this._url) + this.off('stdout', readyCb) + resolve() + } + } + this.on('stdout', readyCb) + }) + } + + public async export() { + return new Promise((resolve) => { + const curOutput = this._cliOutput.length + const exportArgs = ['yarn', 'next', 'export'] + + if (this.childProcess) { + throw new Error( + `can not run export while server is running, use next.stop() first` + ) + } + console.log('running', exportArgs.join(' ')) + + this.childProcess = spawn( + exportArgs[0], + exportArgs.slice(1), + this.spawnOpts + ) + this.handleStdio(this.childProcess) + + this.childProcess.on('exit', (code, signal) => { + this.childProcess = undefined + resolve({ + exitCode: signal || code, + cliOutput: this.cliOutput.slice(curOutput), + }) + }) + }) + } +} diff --git a/test/e2e/next-test-lib/next-test-utils.js b/test/e2e/next-test-lib/next-test-utils.js new file mode 100644 index 0000000000..fc697612c4 --- /dev/null +++ b/test/e2e/next-test-lib/next-test-utils.js @@ -0,0 +1,636 @@ +// @ts-check +import spawn from 'cross-spawn' +import { existsSync, readFileSync, unlinkSync, writeFileSync, createReadStream } from 'fs' +import { writeFile } from 'fs-extra' +import getPort from 'get-port' +import http from 'http' +import https from 'https' +import server from 'next/dist/server/next' +import fetch from 'node-fetch' +import path from 'path' +import qs from 'querystring' + +export const nextServer = server + +export function initNextServerScript(scriptPath, successRegexp, env, failRegexp, opts) { + return new Promise((resolve, reject) => { + const instance = spawn( + 'node', + [ + ...((opts && opts.nodeArgs) || []), + '-r', + require.resolve('./mocks-require-hook'), + '--no-deprecation', + scriptPath, + ], + { + env, + cwd: opts && opts.cwd, + }, + ) + + function handleStdout(data) { + const message = data.toString() + if (successRegexp.test(message)) { + resolve(instance) + } + process.stdout.write(message) + + if (opts && opts.onStdout) { + opts.onStdout(message.toString()) + } + } + + function handleStderr(data) { + const message = data.toString() + if (failRegexp && failRegexp.test(message)) { + instance.kill() + return reject(new Error('received failRegexp')) + } + process.stderr.write(message) + + if (opts && opts.onStderr) { + opts.onStderr(message.toString()) + } + } + + instance.stdout.on('data', handleStdout) + instance.stderr.on('data', handleStderr) + + instance.on('close', () => { + instance.stdout.removeListener('data', handleStdout) + instance.stderr.removeListener('data', handleStderr) + }) + + instance.on('error', (err) => { + reject(err) + }) + }) +} + +/** + * @param {string | number} appPortOrUrl + * @param {string} [url] + * @param {string} [hostname] + * @returns + */ +export function getFullUrl(appPortOrUrl, url, hostname) { + let fullUrl = + typeof appPortOrUrl === 'string' && appPortOrUrl.startsWith('http') + ? appPortOrUrl + : `http://${hostname ? hostname : 'localhost'}:${appPortOrUrl}${url}` + + if (typeof appPortOrUrl === 'string' && url) { + const parsedUrl = new URL(fullUrl) + const parsedPathQuery = new URL(url, fullUrl) + + parsedUrl.hash = parsedPathQuery.hash + parsedUrl.search = parsedPathQuery.search + parsedUrl.pathname = parsedPathQuery.pathname + + if (hostname && parsedUrl.hostname === 'localhost') { + parsedUrl.hostname = hostname + } + fullUrl = parsedUrl.toString() + } + return fullUrl +} + +export function renderViaAPI(app, pathname, query) { + const url = `${pathname}${query ? `?${qs.stringify(query)}` : ''}` + return app.renderToHTML({ url }, {}, pathname, query) +} + +/** + * @param {string | number} appPort + * @param {string} pathname + * @param {Record | string | undefined} [query] + * @param {import('node-fetch').RequestInit} [opts] + * @returns {Promise} + */ +export function renderViaHTTP(appPort, pathname, query, opts) { + return fetchViaHTTP(appPort, pathname, query, opts).then((res) => res.text()) +} + +/** + * @param {string | number} appPort + * @param {string} pathname + * @param {Record | string | undefined} [query] + * @param {import('node-fetch').RequestInit} [opts] + * @returns {Promise} + */ +export function fetchViaHTTP(appPort, pathname, query, opts) { + const url = `${pathname}${typeof query === 'string' ? query : query ? `?${qs.stringify(query)}` : ''}` + return fetch(getFullUrl(appPort, url), { + // in node.js v17 fetch favors IPv6 but Next.js is + // listening on IPv4 by default so force IPv4 DNS resolving + agent: (parsedUrl) => { + if (parsedUrl.protocol === 'https:') { + return new https.Agent({ family: 4 }) + } + if (parsedUrl.protocol === 'http:') { + return new http.Agent({ family: 4 }) + } + }, + ...opts, + }) +} + +export function findPort() { + return getPort() +} + +export function runNextCommand(argv, options = {}) { + const nextDir = path.dirname(require.resolve('next/package')) + const nextBin = path.join(nextDir, 'dist/bin/next') + const cwd = options.cwd || nextDir + // Let Next.js decide the environment + const env = { + ...process.env, + NODE_ENV: '', + __NEXT_TEST_MODE: 'true', + NEXT_PRIVATE_OUTPUT_TRACE_ROOT: path.join(__dirname, '../../'), + ...options.env, + } + + return new Promise((resolve, reject) => { + console.log(`Running command "next ${argv.join(' ')}"`) + const instance = spawn( + 'node', + [ + ...(options.nodeArgs || []), + '-r', + require.resolve('./mocks-require-hook'), + '--no-deprecation', + nextBin, + ...argv, + ], + { + ...options.spawnOptions, + cwd, + env, + stdio: ['ignore', 'pipe', 'pipe'], + }, + ) + + if (typeof options.instance === 'function') { + options.instance(instance) + } + + let mergedStdio = '' + + let stderrOutput = '' + if (options.stderr) { + instance.stderr.on('data', function (chunk) { + mergedStdio += chunk + stderrOutput += chunk + + if (options.stderr === 'log') { + console.log(chunk.toString()) + } + }) + } else { + instance.stderr.on('data', function (chunk) { + mergedStdio += chunk + }) + } + + let stdoutOutput = '' + if (options.stdout) { + instance.stdout.on('data', function (chunk) { + mergedStdio += chunk + stdoutOutput += chunk + + if (options.stdout === 'log') { + console.log(chunk.toString()) + } + }) + } else { + instance.stdout.on('data', function (chunk) { + mergedStdio += chunk + }) + } + + instance.on('close', (code, signal) => { + if (!options.stderr && !options.stdout && !options.ignoreFail && code !== 0) { + return reject(new Error(`command failed with code ${code}\n${mergedStdio}`)) + } + + resolve({ + code, + signal, + stdout: stdoutOutput, + stderr: stderrOutput, + }) + }) + + instance.on('error', (err) => { + err.stdout = stdoutOutput + err.stderr = stderrOutput + reject(err) + }) + }) +} + +export function runNextCommandDev(argv, stdOut, opts = {}) { + const nextDir = path.dirname(require.resolve('next/package')) + const nextBin = path.join(nextDir, 'dist/bin/next') + const cwd = opts.cwd || nextDir + const env = { + ...process.env, + NODE_ENV: undefined, + __NEXT_TEST_MODE: 'true', + ...opts.env, + } + + const nodeArgs = opts.nodeArgs || [] + return new Promise((resolve, reject) => { + const instance = spawn( + 'node', + [...nodeArgs, '-r', require.resolve('./mocks-require-hook'), '--no-deprecation', nextBin, ...argv], + { + cwd, + env, + }, + ) + let didResolve = false + + function handleStdout(data) { + const message = data.toString() + const bootupMarkers = { + dev: /compiled .*successfully/i, + start: /started server/i, + } + if ( + (opts.bootupMarker && opts.bootupMarker.test(message)) || + bootupMarkers[opts.nextStart || stdOut ? 'start' : 'dev'].test(message) + ) { + if (!didResolve) { + didResolve = true + resolve(stdOut ? message : instance) + } + } + + if (typeof opts.onStdout === 'function') { + opts.onStdout(message) + } + + if (opts.stdout !== false) { + process.stdout.write(message) + } + } + + function handleStderr(data) { + const message = data.toString() + if (typeof opts.onStderr === 'function') { + opts.onStderr(message) + } + + if (opts.stderr !== false) { + process.stderr.write(message) + } + } + + instance.stdout.on('data', handleStdout) + instance.stderr.on('data', handleStderr) + + instance.on('close', () => { + instance.stdout.removeListener('data', handleStdout) + instance.stderr.removeListener('data', handleStderr) + if (!didResolve) { + didResolve = true + resolve() + } + }) + + instance.on('error', (err) => { + reject(err) + }) + }) +} + +// Launch the app in dev mode. +export function launchApp(dir, port, opts) { + return runNextCommandDev([dir, '-p', port], undefined, opts) +} + +export function nextBuild(dir, args = [], opts = {}) { + return runNextCommand(['build', dir, ...args], opts) +} + +export function nextExport(dir, { outdir }, opts = {}) { + return runNextCommand(['export', dir, '--outdir', outdir], opts) +} + +export function nextExportDefault(dir, opts = {}) { + return runNextCommand(['export', dir], opts) +} + +export function nextLint(dir, args = [], opts = {}) { + return runNextCommand(['lint', dir, ...args], opts) +} + +export function nextStart(dir, port, opts = {}) { + return runNextCommandDev(['start', '-p', port, dir], undefined, { + ...opts, + nextStart: true, + }) +} + +export function buildTS(args = [], cwd, env = {}) { + cwd = cwd || path.dirname(require.resolve('next/package')) + env = { ...process.env, NODE_ENV: undefined, ...env } + + return new Promise((resolve, reject) => { + const instance = spawn('node', ['--no-deprecation', require.resolve('typescript/lib/tsc'), ...args], { cwd, env }) + let output = '' + + const handleData = (chunk) => { + output += chunk.toString() + } + + instance.stdout.on('data', handleData) + instance.stderr.on('data', handleData) + + instance.on('exit', (code) => { + if (code) { + return reject(new Error('exited with code: ' + code + '\n' + output)) + } + resolve() + }) + }) +} + +export async function stopApp(server) { + if (server.__app) { + await server.__app.close() + } + await promiseCall(server, 'close') +} + +export function promiseCall(obj, method, ...args) { + return new Promise((resolve, reject) => { + const newArgs = [ + ...args, + function (err, res) { + if (err) return reject(err) + resolve(res) + }, + ] + + obj[method](...newArgs) + }) +} + +export function waitFor(millis) { + return new Promise((resolve) => setTimeout(resolve, millis)) +} + +// check for content in 1 second intervals timing out after +// 30 seconds +export async function check(contentFn, regex, hardError = true) { + let content + let lastErr + + for (let tries = 0; tries < 30; tries++) { + try { + content = await contentFn() + if (typeof regex === 'string') { + if (regex === content) { + return true + } + } else if (regex.test(content)) { + // found the content + return true + } + await waitFor(1000) + } catch (err) { + await waitFor(1000) + lastErr = err + } + } + console.error('TIMED OUT CHECK: ', { regex, content, lastErr }) + + if (hardError) { + throw new Error('TIMED OUT: ' + regex + '\n\n' + content) + } + return false +} + +export class File { + constructor(path) { + this.path = path + this.originalContent = existsSync(this.path) ? readFileSync(this.path, 'utf8') : null + } + + write(content) { + if (!this.originalContent) { + this.originalContent = content + } + writeFileSync(this.path, content, 'utf8') + } + + replace(pattern, newValue) { + const currentContent = readFileSync(this.path, 'utf8') + if (pattern instanceof RegExp) { + if (!pattern.test(currentContent)) { + throw new Error(`Failed to replace content.\n\nPattern: ${pattern.toString()}\n\nContent: ${currentContent}`) + } + } else if (typeof pattern === 'string') { + if (!currentContent.includes(pattern)) { + throw new Error(`Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`) + } + } else { + throw new Error(`Unknown replacement attempt type: ${pattern}`) + } + + const newContent = currentContent.replace(pattern, newValue) + this.write(newContent) + } + + delete() { + unlinkSync(this.path) + } + + restore() { + this.write(this.originalContent) + } +} + +export async function evaluate(browser, input) { + if (typeof input === 'function') { + const result = await browser.eval(input) + await new Promise((resolve) => setTimeout(resolve, 30)) + return result + } else { + throw new Error(`You must pass a function to be evaluated in the browser.`) + } +} + +export async function retry(fn, duration = 3000, interval = 500, description) { + if (duration % interval !== 0) { + throw new Error( + `invalid duration ${duration} and interval ${interval} mix, duration must be evenly divisible by interval`, + ) + } + + for (let i = duration; i >= 0; i -= interval) { + try { + return await fn() + } catch (err) { + if (i === 0) { + console.error(`Failed to retry${description ? ` ${description}` : ''} within ${duration}ms`) + throw err + } + console.warn(`Retrying${description ? ` ${description}` : ''} in ${interval}ms`) + await waitFor(interval) + } + } +} + +export async function hasRedbox(browser, expected = true) { + for (let i = 0; i < 30; i++) { + const result = await evaluate(browser, () => { + return Boolean( + [].slice + .call(document.querySelectorAll('nextjs-portal')) + .find((p) => + p.shadowRoot.querySelector('#nextjs__container_errors_label, #nextjs__container_build_error_label'), + ), + ) + }) + + if (result === expected) { + return result + } + await waitFor(1000) + } + return false +} + +export async function getRedboxHeader(browser) { + return retry( + () => + evaluate(browser, () => { + const portal = [].slice + .call(document.querySelectorAll('nextjs-portal')) + .find((p) => p.shadowRoot.querySelector('[data-nextjs-dialog-header')) + const root = portal.shadowRoot + return root + .querySelector('[data-nextjs-dialog-header]') + .innerText.replace(/__WEBPACK_DEFAULT_EXPORT__/, 'Unknown') + }), + 3000, + 500, + 'getRedboxHeader', + ) +} + +export async function getRedboxSource(browser) { + return retry( + () => + evaluate(browser, () => { + const portal = [].slice + .call(document.querySelectorAll('nextjs-portal')) + .find((p) => + p.shadowRoot.querySelector('#nextjs__container_errors_label, #nextjs__container_build_error_label'), + ) + const root = portal.shadowRoot + return root + .querySelector('[data-nextjs-codeframe], [data-nextjs-terminal]') + .innerText.replace(/__WEBPACK_DEFAULT_EXPORT__/, 'Unknown') + }), + 3000, + 500, + 'getRedboxSource', + ) +} + +export async function getRedboxDescription(browser) { + return retry( + () => + evaluate(browser, () => { + const portal = [].slice + .call(document.querySelectorAll('nextjs-portal')) + .find((p) => p.shadowRoot.querySelector('[data-nextjs-dialog-header]')) + const root = portal.shadowRoot + return root + .querySelector('#nextjs__container_errors_desc') + .innerText.replace(/__WEBPACK_DEFAULT_EXPORT__/, 'Unknown') + }), + 3000, + 500, + 'getRedboxDescription', + ) +} + +export function getBrowserBodyText(browser) { + return browser.eval('document.getElementsByTagName("body")[0].innerText') +} + +export function normalizeRegEx(src) { + return new RegExp(src).source.replace(/\^\//g, '^\\/') +} + +function readJson(path) { + return JSON.parse(readFileSync(path, 'utf8')) +} + +export function getBuildManifest(dir) { + return readJson(path.join(dir, '.next/build-manifest.json')) +} + +export function getPageFileFromBuildManifest(dir, page) { + const buildManifest = getBuildManifest(dir) + const pageFiles = buildManifest.pages[page] + if (!pageFiles) { + throw new Error(`No files for page ${page}`) + } + + const pageFile = pageFiles.find( + (file) => file.endsWith('.js') && file.includes(`pages${page === '' ? '/index' : page}`), + ) + if (!pageFile) { + throw new Error(`No page file for page ${page}`) + } + + return pageFile +} + +export function readNextBuildClientPageFile(appDir, page) { + const pageFile = getPageFileFromBuildManifest(appDir, page) + return readFileSync(path.join(appDir, '.next', pageFile), 'utf8') +} + +export function getPagesManifest(dir) { + const serverFile = path.join(dir, '.next/server/pages-manifest.json') + + if (existsSync(serverFile)) { + return readJson(serverFile) + } + return readJson(path.join(dir, '.next/serverless/pages-manifest.json')) +} + +export function updatePagesManifest(dir, content) { + const serverFile = path.join(dir, '.next/server/pages-manifest.json') + + if (existsSync(serverFile)) { + return writeFile(serverFile, content) + } + return writeFile(path.join(dir, '.next/serverless/pages-manifest.json'), content) +} + +export function getPageFileFromPagesManifest(dir, page) { + const pagesManifest = getPagesManifest(dir) + const pageFile = pagesManifest[page] + if (!pageFile) { + throw new Error(`No file for page ${page}`) + } + + return pageFile +} + +export function readNextBuildServerPageFile(appDir, page) { + const pageFile = getPageFileFromPagesManifest(appDir, page) + return readFileSync(path.join(appDir, '.next', 'server', pageFile), 'utf8') +} diff --git a/test/e2e/next-test-lib/next-webdriver.ts b/test/e2e/next-test-lib/next-webdriver.ts new file mode 100644 index 0000000000..e7966d2857 --- /dev/null +++ b/test/e2e/next-test-lib/next-webdriver.ts @@ -0,0 +1,112 @@ +import { getFullUrl } from './next-test-utils' +import { BrowserInterface } from './browsers/base' +;(global as any).browserName = process.env.BROWSER_NAME || 'chrome' + +let browserQuit: () => Promise + +if (typeof afterAll === 'function') { + afterAll(async () => { + if (browserQuit) { + await browserQuit() + } + }) +} + +/** + * + * @param appPortOrUrl can either be the port or the full URL + * @param url the path/query to append when using appPort + * @param options.waitHydration whether to wait for react hydration to finish + * @param options.retryWaitHydration allow retrying hydration wait if reload occurs + * @param options.disableCache disable cache for page load + * @param options.beforePageLoad the callback receiving page instance before loading page + * @returns thenable browser instance + */ +export default async function webdriver( + appPortOrUrl: string | number, + url: string, + options?: { + waitHydration?: boolean + retryWaitHydration?: boolean + disableCache?: boolean + beforePageLoad?: (page: any) => void + locale?: string + }, +): Promise { + let CurrentInterface: typeof BrowserInterface + + const defaultOptions = { + waitHydration: true, + retryWaitHydration: false, + disableCache: false, + } + options = Object.assign(defaultOptions, options) + const { waitHydration, retryWaitHydration, disableCache, beforePageLoad, locale } = options + + const { Playwright, quit } = await import('./browsers/playwright') + CurrentInterface = Playwright + browserQuit = quit + + const browser = new CurrentInterface() + const browserName = process.env.BROWSER_NAME || 'chrome' + await browser.setup(browserName, locale) + ;(global as any).browserName = browserName + + const fullUrl = getFullUrl(appPortOrUrl, url, 'localhost') + + console.log(`\n> Loading browser with ${fullUrl}\n`) + + await browser.loadPage(fullUrl, { disableCache, beforePageLoad }) + console.log(`\n> Loaded browser with ${fullUrl}\n`) + + // Wait for application to hydrate + if (waitHydration) { + console.log(`\n> Waiting hydration for ${fullUrl}\n`) + + const checkHydrated = async () => { + await browser.evalAsync(function () { + var callback = arguments[arguments.length - 1] + + // if it's not a Next.js app return + if ( + document.documentElement.innerHTML.indexOf('__NEXT_DATA__') === -1 && + // @ts-ignore next exists on window if it's a Next.js page. + typeof ((window as any).next && (window as any).next.version) === 'undefined' + ) { + console.log('Not a next.js page, resolving hydrate check') + callback() + } + + // TODO: should we also ensure router.isReady is true + // by default before resolving? + if ((window as any).__NEXT_HYDRATED) { + console.log('Next.js page already hydrated') + callback() + } else { + var timeout = setTimeout(callback, 10 * 1000) + ;(window as any).__NEXT_HYDRATED_CB = function () { + clearTimeout(timeout) + console.log('Next.js hydrate callback fired') + callback() + } + } + }) + } + + try { + await checkHydrated() + } catch (err) { + if (retryWaitHydration) { + // re-try in case the page reloaded during check + await new Promise((resolve) => setTimeout(resolve, 2000)) + await checkHydrated() + } else { + console.error('failed to check hydration') + throw err + } + } + + console.log(`\n> Hydration complete for ${fullUrl}\n`) + } + return browser +} diff --git a/test/e2e/next-test-lib/react-channel-require-hook.js b/test/e2e/next-test-lib/react-channel-require-hook.js new file mode 100644 index 0000000000..b4a1ab01e2 --- /dev/null +++ b/test/e2e/next-test-lib/react-channel-require-hook.js @@ -0,0 +1,26 @@ +const mod = require('module') + +// The value will be '17' or 'exp' to alias the actual react channel +const reactVersion = process.env.__NEXT_REACT_CHANNEL + +const reactDir = `react-${reactVersion}` +const reactDomDir = `react-dom-${reactVersion}` + +const hookPropertyMap = new Map([ + ['react', reactDir], + ['react/package.json', `${reactDir}/package.json`], + ['react/jsx-runtime', `${reactDir}/jsx-runtime`], + ['react/jsx-dev-runtime', `${reactDir}/jsx-dev-runtime`], + ['react-dom', `${reactDomDir}`], + ['react-dom/package.json', `${reactDomDir}/package.json`], + ['react-dom/client', `${reactDomDir}/client`], + ['react-dom/server', `${reactDomDir}/server`], + ['react-dom/server.browser', `${reactDomDir}/server.browser`], +]) + +const resolveFilename = mod._resolveFilename +mod._resolveFilename = function (request, parent, isMain, options) { + const hookResolved = hookPropertyMap.get(request) + if (hookResolved) request = hookResolved + return resolveFilename.call(mod, request, parent, isMain, options) +} diff --git a/tsconfig.json b/tsconfig.json index a68cb8ff2b..43b471ca49 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -69,6 +69,7 @@ // The following hack is to prevent TS using the chai types instead of jest types. // Source: https://github.com/cypress-io/cypress/issues/1087#issuecomment-552951441 "include": [ + "test", "node_modules/cypress", ], "exclude": [ diff --git a/vitest.config.ts b/vitest.config.ts new file mode 100644 index 0000000000..83a51ede49 --- /dev/null +++ b/vitest.config.ts @@ -0,0 +1,12 @@ +/* eslint-disable n/no-unpublished-import */ +import GithubActionsReporter from 'vitest-github-actions-reporter' +import { defineConfig } from 'vitest/config' + +export default defineConfig({ + test: { + testTimeout: 60000, + include: ['test/e2e/**/*.spec.ts'], + reporters: process.env.GITHUB_ACTIONS ? new GithubActionsReporter() : 'default', + }, +}) +/* eslint-enable n/no-unpublished-import */ From b91f352337d3866eb65086d96d38b82745259245 Mon Sep 17 00:00:00 2001 From: Matt Kane Date: Thu, 29 Sep 2022 15:08:14 +0100 Subject: [PATCH 017/172] chore: re-enable plugin --- .github/workflows/e2e-canary.yml | 2 +- demos/canary/netlify.toml | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/e2e-canary.yml b/.github/workflows/e2e-canary.yml index 3c7570f3f5..2b28b60c80 100644 --- a/.github/workflows/e2e-canary.yml +++ b/.github/workflows/e2e-canary.yml @@ -45,7 +45,7 @@ jobs: - name: Node uses: actions/setup-node@v2 with: - node-version: 'latest' + node-version: 16 - name: Install dependencies run: npm install - name: Run e2e tests diff --git a/demos/canary/netlify.toml b/demos/canary/netlify.toml index b89776e7df..6caa4cf186 100644 --- a/demos/canary/netlify.toml +++ b/demos/canary/netlify.toml @@ -7,8 +7,9 @@ ignore = "if [ $CACHED_COMMIT_REF == $COMMIT_REF ]; then (exit 1); else git diff TERM = "xterm" NODE_VERSION = "17" -# [[plugins]] -# package = "../plugin-wrapper/" +[[plugins]] +package = "../plugin-wrapper/" + # This is a fake plugin, that makes it run npm install [[plugins]] package = "@netlify/plugin-local-install-core" From 21520ad994bac2e2420858104d7b49a523a6f557 Mon Sep 17 00:00:00 2001 From: Matt Kane Date: Thu, 29 Sep 2022 15:21:28 +0100 Subject: [PATCH 018/172] chore: setup playwright --- .github/workflows/e2e-canary.yml | 17 +++++++++++------ package.json | 1 + 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/e2e-canary.yml b/.github/workflows/e2e-canary.yml index 2b28b60c80..c2408ed0b7 100644 --- a/.github/workflows/e2e-canary.yml +++ b/.github/workflows/e2e-canary.yml @@ -31,6 +31,17 @@ jobs: token: ${{ steps.get-token.outputs.token }} path: ./.github/actions/wait-for-netlify-deploy + - name: Node + uses: actions/setup-node@v2 + with: + node-version: 16 + + - name: Install npm dependencies + run: npm install + + - name: Install Playwright dependencies + run: npm run playwright:install + - name: Wait for Netlify Deploy id: deploy uses: ./.github/actions/wait-for-netlify-deploy @@ -42,12 +53,6 @@ jobs: if: ${{ steps.deploy.outputs.origin-url }} run: echo ${{ steps.deploy.outputs.origin-url }} - - name: Node - uses: actions/setup-node@v2 - with: - node-version: 16 - - name: Install dependencies - run: npm install - name: Run e2e tests if: ${{ steps.deploy.outputs.origin-url }} run: npm run test:e2e diff --git a/package.json b/package.json index 6205e960f9..467bf93e99 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,7 @@ "test": "run-s build:demo test:jest", "test:jest": "jest", "test:e2e": "vitest test/e2e", + "playwright:install": "playwright install-deps chromium", "test:jest:update": "jest --updateSnapshot", "test:update": "run-s build build:demo test:jest:update" }, From 6d40de08a00b0514b9ff8bf22dcec3b8e486b25b Mon Sep 17 00:00:00 2001 From: Matt Kane Date: Thu, 29 Sep 2022 15:27:36 +0100 Subject: [PATCH 019/172] chore: wait longer when first using playwright --- test/e2e/canary/appdir.spec.ts | 38 +++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/test/e2e/canary/appdir.spec.ts b/test/e2e/canary/appdir.spec.ts index 24e60c5a57..b59e490653 100644 --- a/test/e2e/canary/appdir.spec.ts +++ b/test/e2e/canary/appdir.spec.ts @@ -205,23 +205,27 @@ describe('app dir', () => { expect(await browser.url()).toBe(`${nextUrl}/rewritten-to-dashboard`) }) - it('should support rewrites on client-side navigation', async () => { - const browser = await webdriver(nextUrl, '/rewrites') - - try { - // Click the link. - await browser.elementById('link').click() - await browser.waitForElementByCss('#from-dashboard') - - // Check to see that we were rewritten and not redirected. - expect(await browser.url()).toBe(`${nextUrl}/rewritten-to-dashboard`) - - // Check to see that the page we navigated to is in fact the dashboard. - expect(await browser.elementByCss('#from-dashboard').text()).toBe('hello from app/dashboard') - } finally { - await browser.close() - } - }) + it( + 'should support rewrites on client-side navigation', + async () => { + const browser = await webdriver(nextUrl, '/rewrites') + + try { + // Click the link. + await browser.elementById('link').click() + await browser.waitForElementByCss('#from-dashboard') + + // Check to see that we were rewritten and not redirected. + expect(await browser.url()).toBe(`${nextUrl}/rewritten-to-dashboard`) + + // Check to see that the page we navigated to is in fact the dashboard. + expect(await browser.elementByCss('#from-dashboard').text()).toBe('hello from app/dashboard') + } finally { + await browser.close() + } + }, + { timeout: 1000 * 60 * 2 }, + ) }) it('should not rerender layout when navigating between routes in the same layout', async () => { From 3d69f4ec0e222cda16bc2e6d399ca660e0575598 Mon Sep 17 00:00:00 2001 From: Matt Kane Date: Thu, 29 Sep 2022 15:38:10 +0100 Subject: [PATCH 020/172] chore: run tests headless --- test/e2e/canary/appdir.spec.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/e2e/canary/appdir.spec.ts b/test/e2e/canary/appdir.spec.ts index b59e490653..3d443cba88 100644 --- a/test/e2e/canary/appdir.spec.ts +++ b/test/e2e/canary/appdir.spec.ts @@ -1,4 +1,4 @@ -import { describe, it, expect } from 'vitest' +import { describe, it, expect, beforeAll } from 'vitest' import { fetchViaHTTP, renderViaHTTP, waitFor } from '../next-test-lib/next-test-utils' import { load } from 'cheerio' @@ -6,6 +6,9 @@ import webdriver from '../next-test-lib/next-webdriver' const nextUrl = process.env.SITE_URL || 'http://localhost:8888' describe('app dir', () => { + beforeAll(() => { + process.env.HEADLESS = 'true' + }) it('should use application/octet-stream for flight', async () => { const res = await fetchViaHTTP( nextUrl, From 9e6b12eb8bd3981b4f40ff3a1934510837c7d24e Mon Sep 17 00:00:00 2001 From: Matt Kane Date: Thu, 29 Sep 2022 15:40:33 +0100 Subject: [PATCH 021/172] chore: install chromium --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 467bf93e99..f3a9198ece 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "test": "run-s build:demo test:jest", "test:jest": "jest", "test:e2e": "vitest test/e2e", - "playwright:install": "playwright install-deps chromium", + "playwright:install": "playwright install --with-deps chromium", "test:jest:update": "jest --updateSnapshot", "test:update": "run-s build build:demo test:jest:update" }, From 2977900455bb40aa7e1c4ab08c6b845be5c22016 Mon Sep 17 00:00:00 2001 From: Matt Kane Date: Thu, 29 Sep 2022 15:49:34 +0100 Subject: [PATCH 022/172] chore: longer timeout --- vitest.config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vitest.config.ts b/vitest.config.ts index 83a51ede49..7eebfc4380 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -4,7 +4,7 @@ import { defineConfig } from 'vitest/config' export default defineConfig({ test: { - testTimeout: 60000, + testTimeout: 1000 * 60 * 2, include: ['test/e2e/**/*.spec.ts'], reporters: process.env.GITHUB_ACTIONS ? new GithubActionsReporter() : 'default', }, From 572de53c0dfc5ecce9cb7def939615ed9c90e791 Mon Sep 17 00:00:00 2001 From: Matt Kane Date: Thu, 29 Sep 2022 17:24:18 +0100 Subject: [PATCH 023/172] chore: use undici --- .github/workflows/e2e-canary.yml | 1 + demos/canary/package-lock.json | 38 +++++++-------------- demos/canary/package.json | 2 +- test/e2e/canary/appdir.spec.ts | 41 ++++++++++++----------- test/e2e/next-test-lib/next-test-utils.js | 39 ++++++++++----------- vitest.config.ts | 4 +-- 6 files changed, 56 insertions(+), 69 deletions(-) diff --git a/.github/workflows/e2e-canary.yml b/.github/workflows/e2e-canary.yml index c2408ed0b7..e6ca4a3096 100644 --- a/.github/workflows/e2e-canary.yml +++ b/.github/workflows/e2e-canary.yml @@ -35,6 +35,7 @@ jobs: uses: actions/setup-node@v2 with: node-version: 16 + cache: 'npm' - name: Install npm dependencies run: npm install diff --git a/demos/canary/package-lock.json b/demos/canary/package-lock.json index 6241446df0..6fd158a6a5 100644 --- a/demos/canary/package-lock.json +++ b/demos/canary/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "license": "MIT", "dependencies": { - "nanoid": "^2.1.11", + "nanoid": "^3.3.4", "next": "^12.3.2-canary.13", "react": "0.0.0-experimental-ae7ad8b4c-20220927", "react-dom": "0.0.0-experimental-ae7ad8b4c-20220927" @@ -255,9 +255,15 @@ } }, "node_modules/nanoid": { - "version": "2.1.11", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-2.1.11.tgz", - "integrity": "sha512-s/snB+WGm6uwi0WjsZdaVcuf3KJXlfGl2LcxgwkEwJF0D/BWzVWAZW/XY4bFaiR7s0Jk3FPvlnepg1H1b1UwlA==" + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz", + "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } }, "node_modules/next": { "version": "12.3.2-canary.13", @@ -339,17 +345,6 @@ "node": "^10 || ^12 || >=14" } }, - "node_modules/postcss/node_modules/nanoid": { - "version": "3.3.4", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz", - "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==", - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, "node_modules/react": { "version": "0.0.0-experimental-ae7ad8b4c-20220927", "resolved": "https://registry.npmjs.org/react/-/react-0.0.0-experimental-ae7ad8b4c-20220927.tgz", @@ -533,9 +528,9 @@ } }, "nanoid": { - "version": "2.1.11", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-2.1.11.tgz", - "integrity": "sha512-s/snB+WGm6uwi0WjsZdaVcuf3KJXlfGl2LcxgwkEwJF0D/BWzVWAZW/XY4bFaiR7s0Jk3FPvlnepg1H1b1UwlA==" + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz", + "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==" }, "next": { "version": "12.3.2-canary.13", @@ -576,13 +571,6 @@ "nanoid": "^3.3.4", "picocolors": "^1.0.0", "source-map-js": "^1.0.2" - }, - "dependencies": { - "nanoid": { - "version": "3.3.4", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz", - "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==" - } } }, "react": { diff --git a/demos/canary/package.json b/demos/canary/package.json index 6a47e21c73..ae9aa57df8 100644 --- a/demos/canary/package.json +++ b/demos/canary/package.json @@ -8,7 +8,7 @@ "author": "", "license": "MIT", "dependencies": { - "nanoid": "^2.1.11", + "nanoid": "^3.3.4", "next": "^12.3.2-canary.13", "react": "0.0.0-experimental-ae7ad8b4c-20220927", "react-dom": "0.0.0-experimental-ae7ad8b4c-20220927" diff --git a/test/e2e/canary/appdir.spec.ts b/test/e2e/canary/appdir.spec.ts index 3d443cba88..e4dbb60620 100644 --- a/test/e2e/canary/appdir.spec.ts +++ b/test/e2e/canary/appdir.spec.ts @@ -174,6 +174,7 @@ describe('app dir', () => { it('should serve dynamic parameter', async () => { const html = await renderViaHTTP(nextUrl, '/dashboard/deployments/123') + const $ = load(html) // Should include the page text with the parameter expect($('p').text()).toBe('hello from app/dashboard/deployments/[id]. ID is: 123') @@ -200,7 +201,7 @@ describe('app dir', () => { expect(html).toContain('hello from app/partial-match-[id]. ID is: 123') }) - describe('rewrites', () => { + describe.skip('rewrites', () => { // TODO-APP: it.skip('should support rewrites on initial load', async () => { const browser = await webdriver(nextUrl, '/rewritten-to-dashboard') @@ -273,26 +274,26 @@ describe('app dir', () => { { timeout: 1000 * 60 * 2 }, ) - // describe('parallel routes', () => { - // it('should match parallel routes', async () => { - // const html = await renderViaHTTP(nextUrl, '/parallel/nested') - // expect(html).toContain('parallel/layout') - // expect(html).toContain('parallel/@foo/nested/layout') - // expect(html).toContain('parallel/@foo/nested/@a/page') - // expect(html).toContain('parallel/@foo/nested/@b/page') - // expect(html).toContain('parallel/@bar/nested/layout') - // expect(html).toContain('parallel/@bar/nested/@a/page') - // expect(html).toContain('parallel/@bar/nested/@b/page') - // expect(html).toContain('parallel/nested/page') - // }) + describe('parallel routes', () => { + it('should match parallel routes', async () => { + const html = await renderViaHTTP(nextUrl, '/parallel/nested') + expect(html).toContain('parallel/layout') + expect(html).toContain('parallel/@foo/nested/layout') + expect(html).toContain('parallel/@foo/nested/@a/page') + expect(html).toContain('parallel/@foo/nested/@b/page') + expect(html).toContain('parallel/@bar/nested/layout') + expect(html).toContain('parallel/@bar/nested/@a/page') + expect(html).toContain('parallel/@bar/nested/@b/page') + expect(html).toContain('parallel/nested/page') + }) - // it('should match parallel routes in route groups', async () => { - // const html = await renderViaHTTP(nextUrl, '/parallel/nested-2') - // expect(html).toContain('parallel/layout') - // expect(html).toContain('parallel/(new)/layout') - // expect(html).toContain('parallel/(new)/@baz/nested/page') - // }) - // }) + it('should match parallel routes in route groups', async () => { + const html = await renderViaHTTP(nextUrl, '/parallel/nested-2') + expect(html).toContain('parallel/layout') + expect(html).toContain('parallel/(new)/layout') + expect(html).toContain('parallel/(new)/@baz/nested/page') + }) + }) // describe('', () => { // it('should hard push', async () => { diff --git a/test/e2e/next-test-lib/next-test-utils.js b/test/e2e/next-test-lib/next-test-utils.js index fc697612c4..32229c92ef 100644 --- a/test/e2e/next-test-lib/next-test-utils.js +++ b/test/e2e/next-test-lib/next-test-utils.js @@ -1,14 +1,13 @@ // @ts-check import spawn from 'cross-spawn' -import { existsSync, readFileSync, unlinkSync, writeFileSync, createReadStream } from 'fs' +import { existsSync, readFileSync, unlinkSync, writeFileSync } from 'fs' import { writeFile } from 'fs-extra' import getPort from 'get-port' -import http from 'http' -import https from 'https' import server from 'next/dist/server/next' -import fetch from 'node-fetch' +import { fetch } from 'undici' import path from 'path' import qs from 'querystring' +import { TextDecoderStream } from 'stream/web' export const nextServer = server @@ -101,39 +100,37 @@ export function renderViaAPI(app, pathname, query) { return app.renderToHTML({ url }, {}, pathname, query) } +async function processChunkedResponse(response) { + let text = '' + const stream = response.body.pipeThrough(new TextDecoderStream()) + + for await (const chunk of stream) { + text += chunk + } + return text +} + /** * @param {string | number} appPort * @param {string} pathname * @param {Record | string | undefined} [query] - * @param {import('node-fetch').RequestInit} [opts] + * @param {import("undici").RequestInit} [opts] * @returns {Promise} */ export function renderViaHTTP(appPort, pathname, query, opts) { - return fetchViaHTTP(appPort, pathname, query, opts).then((res) => res.text()) + return fetchViaHTTP(appPort, pathname, query, opts).then(processChunkedResponse) } /** * @param {string | number} appPort * @param {string} pathname * @param {Record | string | undefined} [query] - * @param {import('node-fetch').RequestInit} [opts] - * @returns {Promise} + * @param {import("undici").RequestInit} [opts] + * @returns {Promise} */ export function fetchViaHTTP(appPort, pathname, query, opts) { const url = `${pathname}${typeof query === 'string' ? query : query ? `?${qs.stringify(query)}` : ''}` - return fetch(getFullUrl(appPort, url), { - // in node.js v17 fetch favors IPv6 but Next.js is - // listening on IPv4 by default so force IPv4 DNS resolving - agent: (parsedUrl) => { - if (parsedUrl.protocol === 'https:') { - return new https.Agent({ family: 4 }) - } - if (parsedUrl.protocol === 'http:') { - return new http.Agent({ family: 4 }) - } - }, - ...opts, - }) + return fetch(getFullUrl(appPort, url), opts) } export function findPort() { diff --git a/vitest.config.ts b/vitest.config.ts index 7eebfc4380..8e0b13e906 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -1,12 +1,12 @@ /* eslint-disable n/no-unpublished-import */ -import GithubActionsReporter from 'vitest-github-actions-reporter' +// import GithubActionsReporter from 'vitest-github-actions-reporter' import { defineConfig } from 'vitest/config' export default defineConfig({ test: { testTimeout: 1000 * 60 * 2, include: ['test/e2e/**/*.spec.ts'], - reporters: process.env.GITHUB_ACTIONS ? new GithubActionsReporter() : 'default', + // reporters: process.env.GITHUB_ACTIONS ? new GithubActionsReporter() : 'default', }, }) /* eslint-enable n/no-unpublished-import */ From f6d1c482efc8c2574fb2bec2ec74972c3ba38b87 Mon Sep 17 00:00:00 2001 From: Matt Kane Date: Thu, 29 Sep 2022 17:45:43 +0100 Subject: [PATCH 024/172] chore: enable remaining tests --- test/e2e/canary/appdir.spec.ts | 2044 ++++++++++++++++---------------- 1 file changed, 995 insertions(+), 1049 deletions(-) diff --git a/test/e2e/canary/appdir.spec.ts b/test/e2e/canary/appdir.spec.ts index e4dbb60620..c06dceca63 100644 --- a/test/e2e/canary/appdir.spec.ts +++ b/test/e2e/canary/appdir.spec.ts @@ -295,1056 +295,1002 @@ describe('app dir', () => { }) }) - // describe('', () => { - // it('should hard push', async () => { - // const browser = await webdriver(nextUrl, '/link-hard-push/123') - - // try { - // // Click the link on the page, and verify that the history entry was - // // added. - // expect(await browser.eval('window.history.length')).toBe(2) - // await browser.elementById('link').click() - // await browser.waitForElementByCss('#render-id-456') - // expect(await browser.eval('window.history.length')).toBe(3) - - // // Get the id on the rendered page. - // const firstID = await browser.elementById('render-id-456').text() - - // // Go back, and redo the navigation by clicking the link. - // await browser.back() - // await browser.elementById('link').click() - // await browser.waitForElementByCss('#render-id-456') - - // // Get the id again, and compare, they should not be the same. - // const secondID = await browser.elementById('render-id-456').text() - // expect(secondID).not.toBe(firstID) - // } finally { - // await browser.close() - // } - // }) - - // it('should hard replace', async () => { - // const browser = await webdriver(nextUrl, '/link-hard-replace/123') - - // try { - // // Click the link on the page, and verify that the history entry was NOT - // // added. - // expect(await browser.eval('window.history.length')).toBe(2) - // await browser.elementById('link').click() - // await browser.waitForElementByCss('#render-id-456') - // expect(await browser.eval('window.history.length')).toBe(2) - - // // Get the date again, and compare, they should not be the same. - // const firstId = await browser.elementById('render-id-456').text() - - // // Navigate to the subpage, verify that the history entry was NOT added. - // await browser.elementById('link').click() - // await browser.waitForElementByCss('#render-id-123') - // expect(await browser.eval('window.history.length')).toBe(2) - - // // Navigate back again, verify that the history entry was NOT added. - // await browser.elementById('link').click() - // await browser.waitForElementByCss('#render-id-456') - // expect(await browser.eval('window.history.length')).toBe(2) - - // // Get the date again, and compare, they should not be the same. - // const secondId = await browser.elementById('render-id-456').text() - // expect(firstId).not.toBe(secondId) - // } finally { - // await browser.close() - // } - // }) - - // it('should soft push', async () => { - // const browser = await webdriver(nextUrl, '/link-soft-push') - - // try { - // // Click the link on the page, and verify that the history entry was - // // added. - // expect(await browser.eval('window.history.length')).toBe(2) - // await browser.elementById('link').click() - // await browser.waitForElementByCss('#render-id') - // expect(await browser.eval('window.history.length')).toBe(3) - - // // Get the id on the rendered page. - // const firstID = await browser.elementById('render-id').text() - - // // Go back, and redo the navigation by clicking the link. - // await browser.back() - // await browser.elementById('link').click() - - // // Get the date again, and compare, they should be the same. - // const secondID = await browser.elementById('render-id').text() - // expect(firstID).toBe(secondID) - // } finally { - // await browser.close() - // } - // }) - - // // TODO-APP: investigate this test - // it.skip('should soft replace', async () => { - // const browser = await webdriver(nextUrl, '/link-soft-replace') - - // try { - // // Get the render ID so we can compare it. - // const firstID = await browser.elementById('render-id').text() - - // // Click the link on the page, and verify that the history entry was NOT - // // added. - // expect(await browser.eval('window.history.length')).toBe(2) - // await browser.elementById('self-link').click() - // await browser.waitForElementByCss('#render-id') - // expect(await browser.eval('window.history.length')).toBe(2) - - // // Get the id on the rendered page. - // const secondID = await browser.elementById('render-id').text() - // expect(secondID).toBe(firstID) - - // // Navigate to the subpage, verify that the history entry was NOT added. - // await browser.elementById('subpage-link').click() - // await browser.waitForElementByCss('#back-link') - // expect(await browser.eval('window.history.length')).toBe(2) - - // // Navigate back again, verify that the history entry was NOT added. - // await browser.elementById('back-link').click() - // await browser.waitForElementByCss('#render-id') - // expect(await browser.eval('window.history.length')).toBe(2) - - // // Get the date again, and compare, they should be the same. - // const thirdID = await browser.elementById('render-id').text() - // expect(thirdID).toBe(firstID) - // } finally { - // await browser.close() - // } - // }) - - // it('should be soft for back navigation', async () => { - // const browser = await webdriver(nextUrl, '/with-id') - - // try { - // // Get the id on the rendered page. - // const firstID = await browser.elementById('render-id').text() - - // // Click the link, and go back. - // await browser.elementById('link').click() - // await browser.waitForElementByCss('#from-navigation') - // await browser.back() - - // // Get the date again, and compare, they should be the same. - // const secondID = await browser.elementById('render-id').text() - // expect(firstID).toBe(secondID) - // } finally { - // await browser.close() - // } - // }) - - // it('should be soft for forward navigation', async () => { - // const browser = await webdriver(nextUrl, '/with-id') - - // try { - // // Click the link. - // await browser.elementById('link').click() - // await browser.waitForElementByCss('#from-navigation') - - // // Get the id on the rendered page. - // const firstID = await browser.elementById('render-id').text() - - // // Go back, then forward. - // await browser.back() - // await browser.forward() - - // // Get the date again, and compare, they should be the same. - // const secondID = await browser.elementById('render-id').text() - // expect(firstID).toBe(secondID) - // } finally { - // await browser.close() - // } - // }) - - // // TODO-APP: should enable when implemented - // it.skip('should allow linking from app page to pages page', async () => { - // const browser = await webdriver(nextUrl, '/pages-linking') - - // try { - // // Click the link. - // await browser.elementById('app-link').click() - // await browser.waitForElementByCss('#pages-link') - - // // Click the other link. - // await browser.elementById('pages-link').click() - // await browser.waitForElementByCss('#app-link') - // } finally { - // await browser.close() - // } - // }) - // }) - - // describe('server components', () => { - // // TODO-APP: why is this not servable but /dashboard+rootonly/hello.server.js - // // should be? Seems like they both either should be servable or not - // it('should not serve .server.js as a path', async () => { - // // Without .server.js should serve - // const html = await renderViaHTTP(nextUrl, '/should-not-serve-server') - // expect(html).toContain('hello from app/should-not-serve-server') - - // // Should not serve `.server` - // const res = await fetchViaHTTP(nextUrl, '/should-not-serve-server.server') - // expect(res.status).toBe(404) - // expect(await res.text()).toContain('This page could not be found') - - // // Should not serve `.server.js` - // const res2 = await fetchViaHTTP(nextUrl, '/should-not-serve-server.server.js') - // expect(res2.status).toBe(404) - // expect(await res2.text()).toContain('This page could not be found') - // }) - - // it('should not serve .client.js as a path', async () => { - // // Without .client.js should serve - // const html = await renderViaHTTP(nextUrl, '/should-not-serve-client') - // expect(html).toContain('hello from app/should-not-serve-client') - - // // Should not serve `.client` - // const res = await fetchViaHTTP(nextUrl, '/should-not-serve-client.client') - // expect(res.status).toBe(404) - // expect(await res.text()).toContain('This page could not be found') - - // // Should not serve `.client.js` - // const res2 = await fetchViaHTTP(nextUrl, '/should-not-serve-client.client.js') - // expect(res2.status).toBe(404) - // expect(await res2.text()).toContain('This page could not be found') - // }) - - // it('should serve shared component', async () => { - // // Without .client.js should serve - // const html = await renderViaHTTP(nextUrl, '/shared-component-route') - // expect(html).toContain('hello from app/shared-component-route') - // }) - - // describe('dynamic routes', () => { - // it('should only pass params that apply to the layout', async () => { - // const html = await renderViaHTTP(nextUrl, '/dynamic/books/hello-world') - // const $ = load(html) - - // expect($('#dynamic-layout-params').text()).toBe('{}') - // expect($('#category-layout-params').text()).toBe('{"category":"books"}') - // expect($('#id-layout-params').text()).toBe('{"category":"books","id":"hello-world"}') - // expect($('#id-page-params').text()).toBe('{"category":"books","id":"hello-world"}') - // }) - // }) - - // describe('catch-all routes', () => { - // it('should handle optional segments', async () => { - // const params = ['this', 'is', 'a', 'test'] - // const route = params.join('/') - // const html = await renderViaHTTP(nextUrl, `/optional-catch-all/${route}`) - // const $ = load(html) - // expect($('#text').attr('data-params')).toBe(route) - // }) - - // it('should handle optional segments root', async () => { - // const html = await renderViaHTTP(nextUrl, `/optional-catch-all`) - // const $ = load(html) - // expect($('#text').attr('data-params')).toBe('') - // }) - - // it('should handle required segments', async () => { - // const params = ['this', 'is', 'a', 'test'] - // const route = params.join('/') - // const html = await renderViaHTTP(nextUrl, `/catch-all/${route}`) - // const $ = load(html) - // expect($('#text').attr('data-params')).toBe(route) - - // // Components under catch-all should not be treated as route that errors during build. - // // They should be rendered properly when imported in page route. - // expect($('#widget').text()).toBe('widget') - // }) - - // it('should handle required segments root as not found', async () => { - // const res = await fetchViaHTTP(nextUrl, `/catch-all`) - // expect(res.status).toBe(404) - // expect(await res.text()).toContain('This page could not be found') - // }) - // }) - - // describe('should serve client component', () => { - // it('should serve server-side', async () => { - // const html = await renderViaHTTP(nextUrl, '/client-component-route') - // const $ = load(html) - // expect($('p').text()).toBe('hello from app/client-component-route. count: 0') - // }) - - // // TODO-APP: investigate hydration not kicking in on some runs - // it('should serve client-side', async () => { - // const browser = await webdriver(nextUrl, '/client-component-route') - - // // After hydration count should be 1 - // expect(await browser.elementByCss('p').text()).toBe('hello from app/client-component-route. count: 1') - // }) - // }) - - // describe('should include client component layout with server component route', () => { - // it('should include it server-side', async () => { - // const html = await renderViaHTTP(nextUrl, '/client-nested') - // const $ = load(html) - // // Should not be nested in dashboard - // expect($('h1').text()).toBe('Client Nested. Count: 0') - // // Should include the page text - // expect($('p').text()).toBe('hello from app/client-nested') - // }) - - // it('should include it client-side', async () => { - // const browser = await webdriver(nextUrl, '/client-nested') - - // // After hydration count should be 1 - // expect(await browser.elementByCss('h1').text()).toBe('Client Nested. Count: 1') - - // // After hydration count should be 1 - // expect(await browser.elementByCss('p').text()).toBe('hello from app/client-nested') - // }) - // }) - - // describe('Loading', () => { - // it('should render loading.js in initial html for slow page', async () => { - // const html = await renderViaHTTP(nextUrl, '/slow-page-with-loading') - // const $ = load(html) - - // expect($('#loading').text()).toBe('Loading...') - // }) - - // it('should render loading.js in browser for slow page', async () => { - // const browser = await webdriver(nextUrl, '/slow-page-with-loading', { - // waitHydration: false, - // }) - // // TODO-APP: `await webdriver()` causes waiting for the full page to complete streaming. At that point "Loading..." is replaced by the actual content - // // expect(await browser.elementByCss('#loading').text()).toBe('Loading...') - - // expect(await browser.elementByCss('#slow-page-message').text()).toBe('hello from slow page') - // }) - - // it('should render loading.js in initial html for slow layout', async () => { - // const html = await renderViaHTTP(nextUrl, '/slow-layout-with-loading/slow') - // const $ = load(html) - - // expect($('#loading').text()).toBe('Loading...') - // }) - - // it('should render loading.js in browser for slow layout', async () => { - // const browser = await webdriver(nextUrl, '/slow-layout-with-loading/slow', { - // waitHydration: false, - // }) - // // TODO-APP: `await webdriver()` causes waiting for the full page to complete streaming. At that point "Loading..." is replaced by the actual content - // // expect(await browser.elementByCss('#loading').text()).toBe('Loading...') - - // expect(await browser.elementByCss('#slow-layout-message').text()).toBe('hello from slow layout') - - // expect(await browser.elementByCss('#page-message').text()).toBe('Hello World') - // }) - - // it('should render loading.js in initial html for slow layout and page', async () => { - // const html = await renderViaHTTP(nextUrl, '/slow-layout-and-page-with-loading/slow') - // const $ = load(html) - - // expect($('#loading-layout').text()).toBe('Loading layout...') - // expect($('#loading-page').text()).toBe('Loading page...') - // }) - - // it('should render loading.js in browser for slow layout and page', async () => { - // const browser = await webdriver(nextUrl, '/slow-layout-and-page-with-loading/slow', { - // waitHydration: false, - // }) - // // TODO-APP: `await webdriver()` causes waiting for the full page to complete streaming. At that point "Loading..." is replaced by the actual content - // // expect(await browser.elementByCss('#loading-layout').text()).toBe('Loading...') - // // expect(await browser.elementByCss('#loading-page').text()).toBe('Loading...') - - // expect(await browser.elementByCss('#slow-layout-message').text()).toBe('hello from slow layout') - - // expect(await browser.elementByCss('#slow-page-message').text()).toBe('hello from slow page') - // }) - // }) - - // describe('middleware', () => { - // it.each(['rewrite', 'redirect'])( - // `should strip internal query parameters from requests to middleware for %s`, - // async (method) => { - // const browser = await webdriver(nextUrl, '/internal') - - // try { - // // Wait for and click the navigation element, this should trigger - // // the flight request that'll be caught by the middleware. If the - // // middleware sees any flight data on the request it'll redirect to - // // a page with an element of #failure, otherwise, we'll see the - // // element for #success. - // await browser.waitForElementByCss(`#navigate-${method}`).elementById(`navigate-${method}`).click() - // expect(await browser.waitForElementByCss('#success', 3000).text()).toBe('Success') - // } finally { - // await browser.close() - // } - // }, - // ) - // }) - - // describe('next/router', () => { - // // `useRouter` should not be accessible in server components. - // it.skip('should always return null when accessed from /app', async () => { - // const browser = await webdriver(nextUrl, '/old-router') - - // try { - // await browser.waitForElementByCss('#old-router') - - // const notNull = await browser.elementsByCss('.was-not-null') - // expect(notNull.length).toBe(0) - - // const wasNull = await browser.elementsByCss('.was-null') - // expect(wasNull.length).toBe(6) - // } finally { - // await browser.close() - // } - // }) - // }) - - // describe('hooks', () => { - // describe('cookies function', () => { - // it('should retrieve cookies in a server component', async () => { - // const browser = await webdriver(nextUrl, '/hooks/use-cookies') - - // try { - // await browser.waitForElementByCss('#does-not-have-cookie') - // browser.addCookie({ name: 'use-cookies', value: 'value' }) - // browser.refresh() - - // await browser.waitForElementByCss('#has-cookie') - // browser.deleteCookies() - // browser.refresh() - - // await browser.waitForElementByCss('#does-not-have-cookie') - // } finally { - // await browser.close() - // } - // }) - - // it('should access cookies on navigation', async () => { - // const browser = await webdriver(nextUrl, '/navigation') - - // try { - // // Click the cookies link to verify it can't see the cookie that's - // // not there. - // await browser.elementById('use-cookies').click() - // await browser.waitForElementByCss('#does-not-have-cookie') - - // // Go back and add the cookies. - // await browser.back() - // await browser.waitForElementByCss('#from-navigation') - // browser.addCookie({ name: 'use-cookies', value: 'value' }) - - // // Click the cookies link again to see that the cookie can be picked - // // up again. - // await browser.elementById('use-cookies').click() - // await browser.waitForElementByCss('#has-cookie') - - // // Go back and remove the cookies. - // await browser.back() - // await browser.waitForElementByCss('#from-navigation') - // browser.deleteCookies() - - // // Verify for the last time that after clicking the cookie link - // // again, there are no cookies. - // await browser.elementById('use-cookies').click() - // await browser.waitForElementByCss('#does-not-have-cookie') - // } finally { - // await browser.close() - // } - // }) - // }) - - // describe('headers function', () => { - // it('should have access to incoming headers in a server component', async () => { - // // Check to see that we can't see the header when it's not present. - // let html = await renderViaHTTP(nextUrl, '/hooks/use-headers', {}, { headers: {} }) - // let $ = load(html) - // expect($('#does-not-have-header').length).toBe(1) - // expect($('#has-header').length).toBe(0) - - // // Check to see that we can see the header when it's present. - // html = await renderViaHTTP(nextUrl, '/hooks/use-headers', {}, { headers: { 'x-use-headers': 'value' } }) - // $ = load(html) - // expect($('#has-header').length).toBe(1) - // expect($('#does-not-have-header').length).toBe(0) - // }) - - // it('should access headers on navigation', async () => { - // const browser = await webdriver(nextUrl, '/navigation') - - // try { - // await browser.elementById('use-headers').click() - // await browser.waitForElementByCss('#has-referer') - // } finally { - // await browser.close() - // } - // }) - // }) - - // describe('previewData function', () => { - // it('should return no preview data when there is none', async () => { - // const browser = await webdriver(nextUrl, '/hooks/use-preview-data') - - // try { - // await browser.waitForElementByCss('#does-not-have-preview-data') - // } finally { - // await browser.close() - // } - // }) - - // it('should return preview data when there is some', async () => { - // const browser = await webdriver(nextUrl, '/api/preview') - - // try { - // await browser.loadPage(`${nextUrl}/hooks/use-preview-data`, { - // disableCache: false, - // beforePageLoad: null, - // }) - // await browser.waitForElementByCss('#has-preview-data') - // } finally { - // await browser.close() - // } - // }) - // }) - - // describe('useRouter', () => { - // // TODO-APP: should enable when implemented - // it.skip('should throw an error when imported', async () => { - // const res = await fetchViaHTTP(nextUrl, '/hooks/use-router/server') - // expect(res.status).toBe(500) - // expect(await res.text()).toContain('Internal Server Error') - // }) - // }) - - // describe('useParams', () => { - // // TODO-APP: should enable when implemented - // it.skip('should throw an error when imported', async () => { - // const res = await fetchViaHTTP(nextUrl, '/hooks/use-params/server') - // expect(res.status).toBe(500) - // expect(await res.text()).toContain('Internal Server Error') - // }) - // }) - - // describe('useSearchParams', () => { - // // TODO-APP: should enable when implemented - // it.skip('should throw an error when imported', async () => { - // const res = await fetchViaHTTP(nextUrl, '/hooks/use-search-params/server') - // expect(res.status).toBe(500) - // expect(await res.text()).toContain('Internal Server Error') - // }) - // }) - - // describe('usePathname', () => { - // // TODO-APP: should enable when implemented - // it.skip('should throw an error when imported', async () => { - // const res = await fetchViaHTTP(nextUrl, '/hooks/use-pathname/server') - // expect(res.status).toBe(500) - // expect(await res.text()).toContain('Internal Server Error') - // }) - // }) - - // describe('useLayoutSegments', () => { - // // TODO-APP: should enable when implemented - // it.skip('should throw an error when imported', async () => { - // const res = await fetchViaHTTP(nextUrl, '/hooks/use-layout-segments/server') - // expect(res.status).toBe(500) - // expect(await res.text()).toContain('Internal Server Error') - // }) - // }) - - // describe('useSelectedLayoutSegment', () => { - // // TODO-APP: should enable when implemented - // it.skip('should throw an error when imported', async () => { - // const res = await fetchViaHTTP(nextUrl, '/hooks/use-selected-layout-segment/server') - // expect(res.status).toBe(500) - // expect(await res.text()).toContain('Internal Server Error') - // }) - // }) - // }) - // }) - - // describe('client components', () => { - // describe('hooks', () => { - // describe('cookies function', () => { - // // TODO-APP: should enable when implemented - // it.skip('should throw an error when imported', async () => { - // const res = await fetchViaHTTP(nextUrl, '/hooks/use-cookies/client') - // expect(res.status).toBe(500) - // expect(await res.text()).toContain('Internal Server Error') - // }) - // }) - - // describe('previewData function', () => { - // // TODO-APP: should enable when implemented - // it.skip('should throw an error when imported', async () => { - // const res = await fetchViaHTTP(nextUrl, '/hooks/use-preview-data/client') - // expect(res.status).toBe(500) - // expect(await res.text()).toContain('Internal Server Error') - // }) - // }) - - // describe('headers function', () => { - // // TODO-APP: should enable when implemented - // it.skip('should throw an error when imported', async () => { - // const res = await fetchViaHTTP(nextUrl, '/hooks/use-headers/client') - // expect(res.status).toBe(500) - // expect(await res.text()).toContain('Internal Server Error') - // }) - // }) - - // describe('usePathname', () => { - // it('should have the correct pathname', async () => { - // const html = await renderViaHTTP(nextUrl, '/hooks/use-pathname') - // const $ = load(html) - // expect($('#pathname').attr('data-pathname')).toBe('/hooks/use-pathname') - // }) - // }) - - // describe('useSearchParams', () => { - // it('should have the correct search params', async () => { - // const html = await renderViaHTTP( - // nextUrl, - // '/hooks/use-search-params?first=value&second=other%20value&third', - // ) - // const $ = load(html) - // const el = $('#params') - // expect(el.attr('data-param-first')).toBe('value') - // expect(el.attr('data-param-second')).toBe('other value') - // expect(el.attr('data-param-third')).toBe('') - // expect(el.attr('data-param-not-real')).toBe('N/A') - // }) - // }) - - // describe('useRouter', () => { - // it('should allow access to the router', async () => { - // const browser = await webdriver(nextUrl, '/hooks/use-router') - - // try { - // // Wait for the page to load, click the button (which uses a method - // // on the router) and then wait for the correct page to load. - // await browser.waitForElementByCss('#router') - // await browser.elementById('button-push').click() - // await browser.waitForElementByCss('#router-sub-page') - - // // Go back (confirming we did do a hard push), and wait for the - // // correct previous page. - // await browser.back() - // await browser.waitForElementByCss('#router') - // } finally { - // await browser.close() - // } - // }) - - // it('should have consistent query and params handling', async () => { - // const html = await renderViaHTTP(nextUrl, '/param-and-query/params?slug=query') - // const $ = load(html) - // const el = $('#params-and-query') - // expect(el.attr('data-params')).toBe('params') - // expect(el.attr('data-query')).toBe('query') - // }) - // }) - // }) - - // if (isDev) { - // it('should throw an error when getServerSideProps is used', async () => { - // const pageFile = 'app/client-with-errors/get-server-side-props/page.js' - // const content = await next.readFile(pageFile) - // const uncomment = content.replace( - // '// export function getServerSideProps', - // 'export function getServerSideProps', - // ) - // await next.patchFile(pageFile, uncomment) - // const res = await fetchViaHTTP(nextUrl, '/client-with-errors/get-server-side-props') - // await next.patchFile(pageFile, content) - - // await check(async () => { - // const { status } = await fetchViaHTTP(nextUrl, '/client-with-errors/get-server-side-props') - // return status - // }, /200/) - - // expect(res.status).toBe(500) - // expect(await res.text()).toContain('`getServerSideProps` is not allowed in Client Components') - // }) - - // it('should throw an error when getStaticProps is used', async () => { - // const pageFile = 'app/client-with-errors/get-static-props/page.js' - // const content = await next.readFile(pageFile) - // const uncomment = content.replace('// export function getStaticProps', 'export function getStaticProps') - // await next.patchFile(pageFile, uncomment) - // const res = await fetchViaHTTP(nextUrl, '/client-with-errors/get-static-props') - // await next.patchFile(pageFile, content) - // await check(async () => { - // const { status } = await fetchViaHTTP(nextUrl, '/client-with-errors/get-static-props') - // return status - // }, /200/) - - // expect(res.status).toBe(500) - // expect(await res.text()).toContain('`getStaticProps` is not allowed in Client Components') - // }) - // } - // }) - - // describe('css support', () => { - // describe('server layouts', () => { - // it('should support global css inside server layouts', async () => { - // const browser = await webdriver(nextUrl, '/dashboard') - - // // Should body text in red - // expect(await browser.eval(`window.getComputedStyle(document.querySelector('.p')).color`)).toBe( - // 'rgb(255, 0, 0)', - // ) - - // // Should inject global css for .green selectors - // expect(await browser.eval(`window.getComputedStyle(document.querySelector('.green')).color`)).toBe( - // 'rgb(0, 128, 0)', - // ) - // }) - - // it('should support css modules inside server layouts', async () => { - // const browser = await webdriver(nextUrl, '/css/css-nested') - // expect(await browser.eval(`window.getComputedStyle(document.querySelector('#server-cssm')).color`)).toBe( - // 'rgb(0, 128, 0)', - // ) - // }) - // }) - - // describe('server pages', () => { - // it('should support global css inside server pages', async () => { - // const browser = await webdriver(nextUrl, '/css/css-page') - // expect(await browser.eval(`window.getComputedStyle(document.querySelector('h1')).color`)).toBe( - // 'rgb(255, 0, 0)', - // ) - // }) - - // it('should support css modules inside server pages', async () => { - // const browser = await webdriver(nextUrl, '/css/css-page') - // expect(await browser.eval(`window.getComputedStyle(document.querySelector('#cssm')).color`)).toBe( - // 'rgb(0, 0, 255)', - // ) - // }) - // }) - - // describe('client layouts', () => { - // it('should support css modules inside client layouts', async () => { - // const browser = await webdriver(nextUrl, '/client-nested') - - // // Should render h1 in red - // expect(await browser.eval(`window.getComputedStyle(document.querySelector('h1')).color`)).toBe( - // 'rgb(255, 0, 0)', - // ) - // }) - - // it('should support global css inside client layouts', async () => { - // const browser = await webdriver(nextUrl, '/client-nested') - - // // Should render button in red - // expect(await browser.eval(`window.getComputedStyle(document.querySelector('button')).color`)).toBe( - // 'rgb(255, 0, 0)', - // ) - // }) - // }) - - // describe('client pages', () => { - // it('should support css modules inside client pages', async () => { - // const browser = await webdriver(nextUrl, '/client-component-route') - - // // Should render p in red - // expect(await browser.eval(`window.getComputedStyle(document.querySelector('p')).color`)).toBe( - // 'rgb(255, 0, 0)', - // ) - // }) - - // it('should support global css inside client pages', async () => { - // const browser = await webdriver(nextUrl, '/client-component-route') - - // // Should render `b` in blue - // expect(await browser.eval(`window.getComputedStyle(document.querySelector('b')).color`)).toBe( - // 'rgb(0, 0, 255)', - // ) - // }) - // }) - // }) - // ;(isDev ? describe.skip : describe)('Subresource Integrity', () => { - // function fetchWithPolicy(policy: string | null) { - // return fetchViaHTTP(nextUrl, '/dashboard', undefined, { - // headers: policy - // ? { - // 'Content-Security-Policy': policy, - // } - // : {}, - // }) - // } - - // async function renderWithPolicy(policy: string | null) { - // const res = await fetchWithPolicy(policy) - - // expect(res.ok).toBe(true) - - // const html = await res.text() - - // return load(html) - // } - - // it('does not include nonce when not enabled', async () => { - // const policies = [ - // `script-src 'nonce-'`, // invalid nonce - // 'style-src "nonce-cmFuZG9tCg=="', // no script or default src - // '', // empty string - // ] - - // for (const policy of policies) { - // const $ = await renderWithPolicy(policy) - - // // Find all the script tags without src attributes and with nonce - // // attributes. - // const elements = $('script[nonce]:not([src])') - - // // Expect there to be none. - // expect(elements.length).toBe(0) - // } - // }) - - // it('includes a nonce value with inline scripts when Content-Security-Policy header is defined', async () => { - // // A random nonce value, base64 encoded. - // const nonce = 'cmFuZG9tCg==' - - // // Validate all the cases where we could parse the nonce. - // const policies = [ - // `script-src 'nonce-${nonce}'`, // base case - // ` script-src 'nonce-${nonce}' `, // extra space added around sources and directive - // `style-src 'self'; script-src 'nonce-${nonce}'`, // extra directives - // `script-src 'self' 'nonce-${nonce}' 'nonce-othernonce'`, // extra nonces - // `default-src 'nonce-othernonce'; script-src 'nonce-${nonce}';`, // script and then fallback case - // `default-src 'nonce-${nonce}'`, // fallback case - // ] - - // for (const policy of policies) { - // const $ = await renderWithPolicy(policy) - - // // Find all the script tags without src attributes. - // const elements = $('script:not([src])') - - // // Expect there to be at least 1 script tag without a src attribute. - // expect(elements.length).toBeGreaterThan(0) - - // // Expect all inline scripts to have the nonce value. - // elements.each((i, el) => { - // expect(el.attribs.nonce).toBe(nonce) - // }) - // } - // }) - - // it('includes an integrity attribute on scripts', async () => { - // const html = await renderViaHTTP(nextUrl, '/dashboard') - - // const $ = load(html) - - // // Find all the script tags with src attributes. - // const elements = $('script[src]') - - // // Expect there to be at least 1 script tag with a src attribute. - // expect(elements.length).toBeGreaterThan(0) - - // // Collect all the scripts with integrity hashes so we can verify them. - // const files: [string, string][] = [] + describe('', () => { + it('should hard push', async () => { + const browser = await webdriver(nextUrl, '/link-hard-push/123') - // // For each of these attributes, ensure that there's an integrity - // // attribute and starts with the correct integrity hash prefix. - // elements.each((i, el) => { - // const { integrity } = el.attribs - // expect(integrity).toBeDefined() - // expect(integrity).toStartWith('sha256-') - - // const { src } = el.attribs - // expect(src).toBeDefined() - - // files.push([src, integrity]) - // }) - - // // For each script tag, ensure that the integrity attribute is the - // // correct hash of the script tag. - // for (const [src, integrity] of files) { - // const res = await fetchViaHTTP(nextUrl, src) - // expect(res.status).toBe(200) - // const content = await res.text() - - // const hash = crypto.createHash('sha256').update(content).digest().toString('base64') - - // expect(integrity).toEndWith(hash) - // } - // }) + try { + // Click the link on the page, and verify that the history entry was + // added. + expect(await browser.eval('window.history.length')).toBe(2) + await browser.elementById('link').click() + await browser.waitForElementByCss('#render-id-456') + expect(await browser.eval('window.history.length')).toBe(3) + + // Get the id on the rendered page. + const firstID = await browser.elementById('render-id-456').text() + + // Go back, and redo the navigation by clicking the link. + await browser.back() + await browser.elementById('link').click() + await browser.waitForElementByCss('#render-id-456') + + // Get the id again, and compare, they should not be the same. + const secondID = await browser.elementById('render-id-456').text() + expect(secondID).not.toBe(firstID) + } finally { + await browser.close() + } + }) + + it('should hard replace', async () => { + const browser = await webdriver(nextUrl, '/link-hard-replace/123') + + try { + // Click the link on the page, and verify that the history entry was NOT + // added. + expect(await browser.eval('window.history.length')).toBe(2) + await browser.elementById('link').click() + await browser.waitForElementByCss('#render-id-456') + expect(await browser.eval('window.history.length')).toBe(2) + + // Get the date again, and compare, they should not be the same. + const firstId = await browser.elementById('render-id-456').text() + + // Navigate to the subpage, verify that the history entry was NOT added. + await browser.elementById('link').click() + await browser.waitForElementByCss('#render-id-123') + expect(await browser.eval('window.history.length')).toBe(2) + + // Navigate back again, verify that the history entry was NOT added. + await browser.elementById('link').click() + await browser.waitForElementByCss('#render-id-456') + expect(await browser.eval('window.history.length')).toBe(2) + + // Get the date again, and compare, they should not be the same. + const secondId = await browser.elementById('render-id-456').text() + expect(firstId).not.toBe(secondId) + } finally { + await browser.close() + } + }) + + it('should soft push', async () => { + const browser = await webdriver(nextUrl, '/link-soft-push') + + try { + // Click the link on the page, and verify that the history entry was + // added. + expect(await browser.eval('window.history.length')).toBe(2) + await browser.elementById('link').click() + await browser.waitForElementByCss('#render-id') + expect(await browser.eval('window.history.length')).toBe(3) + + // Get the id on the rendered page. + const firstID = await browser.elementById('render-id').text() + + // Go back, and redo the navigation by clicking the link. + await browser.back() + await browser.elementById('link').click() + + // Get the date again, and compare, they should be the same. + const secondID = await browser.elementById('render-id').text() + expect(firstID).toBe(secondID) + } finally { + await browser.close() + } + }) + + // TODO-APP: investigate this test + it.skip('should soft replace', async () => { + const browser = await webdriver(nextUrl, '/link-soft-replace') + + try { + // Get the render ID so we can compare it. + const firstID = await browser.elementById('render-id').text() + + // Click the link on the page, and verify that the history entry was NOT + // added. + expect(await browser.eval('window.history.length')).toBe(2) + await browser.elementById('self-link').click() + await browser.waitForElementByCss('#render-id') + expect(await browser.eval('window.history.length')).toBe(2) + + // Get the id on the rendered page. + const secondID = await browser.elementById('render-id').text() + expect(secondID).toBe(firstID) + + // Navigate to the subpage, verify that the history entry was NOT added. + await browser.elementById('subpage-link').click() + await browser.waitForElementByCss('#back-link') + expect(await browser.eval('window.history.length')).toBe(2) + + // Navigate back again, verify that the history entry was NOT added. + await browser.elementById('back-link').click() + await browser.waitForElementByCss('#render-id') + expect(await browser.eval('window.history.length')).toBe(2) + + // Get the date again, and compare, they should be the same. + const thirdID = await browser.elementById('render-id').text() + expect(thirdID).toBe(firstID) + } finally { + await browser.close() + } + }) + + it('should be soft for back navigation', async () => { + const browser = await webdriver(nextUrl, '/with-id') + + try { + // Get the id on the rendered page. + const firstID = await browser.elementById('render-id').text() + + // Click the link, and go back. + await browser.elementById('link').click() + await browser.waitForElementByCss('#from-navigation') + await browser.back() + + // Get the date again, and compare, they should be the same. + const secondID = await browser.elementById('render-id').text() + expect(firstID).toBe(secondID) + } finally { + await browser.close() + } + }) + + it('should be soft for forward navigation', async () => { + const browser = await webdriver(nextUrl, '/with-id') + + try { + // Click the link. + await browser.elementById('link').click() + await browser.waitForElementByCss('#from-navigation') + + // Get the id on the rendered page. + const firstID = await browser.elementById('render-id').text() + + // Go back, then forward. + await browser.back() + await browser.forward() + + // Get the date again, and compare, they should be the same. + const secondID = await browser.elementById('render-id').text() + expect(firstID).toBe(secondID) + } finally { + await browser.close() + } + }) + + // TODO-APP: should enable when implemented + it.skip('should allow linking from app page to pages page', async () => { + const browser = await webdriver(nextUrl, '/pages-linking') + + try { + // Click the link. + await browser.elementById('app-link').click() + await browser.waitForElementByCss('#pages-link') + + // Click the other link. + await browser.elementById('pages-link').click() + await browser.waitForElementByCss('#app-link') + } finally { + await browser.close() + } + }) + }) + + describe('server components', () => { + // TODO-APP: why is this not servable but /dashboard+rootonly/hello.server.js + // should be? Seems like they both either should be servable or not + it('should not serve .server.js as a path', async () => { + // Without .server.js should serve + const html = await renderViaHTTP(nextUrl, '/should-not-serve-server') + expect(html).toContain('hello from app/should-not-serve-server') + + // Should not serve `.server` + const res = await fetchViaHTTP(nextUrl, '/should-not-serve-server.server') + expect(res.status).toBe(404) + expect(await res.text()).toContain('This page could not be found') + + // Should not serve `.server.js` + const res2 = await fetchViaHTTP(nextUrl, '/should-not-serve-server.server.js') + expect(res2.status).toBe(404) + expect(await res2.text()).toContain('This page could not be found') + }) + + it('should not serve .client.js as a path', async () => { + // Without .client.js should serve + const html = await renderViaHTTP(nextUrl, '/should-not-serve-client') + expect(html).toContain('hello from app/should-not-serve-client') + + // Should not serve `.client` + const res = await fetchViaHTTP(nextUrl, '/should-not-serve-client.client') + expect(res.status).toBe(404) + expect(await res.text()).toContain('This page could not be found') + + // Should not serve `.client.js` + const res2 = await fetchViaHTTP(nextUrl, '/should-not-serve-client.client.js') + expect(res2.status).toBe(404) + expect(await res2.text()).toContain('This page could not be found') + }) + + it('should serve shared component', async () => { + // Without .client.js should serve + const html = await renderViaHTTP(nextUrl, '/shared-component-route') + expect(html).toContain('hello from app/shared-component-route') + }) + + describe('dynamic routes', () => { + it('should only pass params that apply to the layout', async () => { + const html = await renderViaHTTP(nextUrl, '/dynamic/books/hello-world') + const $ = load(html) + + expect($('#dynamic-layout-params').text()).toBe('{}') + expect($('#category-layout-params').text()).toBe('{"category":"books"}') + expect($('#id-layout-params').text()).toBe('{"category":"books","id":"hello-world"}') + expect($('#id-page-params').text()).toBe('{"category":"books","id":"hello-world"}') + }) + }) + + describe('catch-all routes', () => { + it('should handle optional segments', async () => { + const params = ['this', 'is', 'a', 'test'] + const route = params.join('/') + const html = await renderViaHTTP(nextUrl, `/optional-catch-all/${route}`) + const $ = load(html) + expect($('#text').attr('data-params')).toBe(route) + }) + + it('should handle optional segments root', async () => { + const html = await renderViaHTTP(nextUrl, `/optional-catch-all`) + const $ = load(html) + expect($('#text').attr('data-params')).toBe('') + }) + + it('should handle required segments', async () => { + const params = ['this', 'is', 'a', 'test'] + const route = params.join('/') + const html = await renderViaHTTP(nextUrl, `/catch-all/${route}`) + const $ = load(html) + expect($('#text').attr('data-params')).toBe(route) + + // Components under catch-all should not be treated as route that errors during build. + // They should be rendered properly when imported in page route. + expect($('#widget').text()).toBe('widget') + }) + + it('should handle required segments root as not found', async () => { + const res = await fetchViaHTTP(nextUrl, `/catch-all`) + expect(res.status).toBe(404) + expect(await res.text()).toContain('This page could not be found') + }) + }) + + describe('should serve client component', () => { + it('should serve server-side', async () => { + const html = await renderViaHTTP(nextUrl, '/client-component-route') + const $ = load(html) + expect($('p').text()).toBe('hello from app/client-component-route. count: 0') + }) + + // TODO-APP: investigate hydration not kicking in on some runs + it('should serve client-side', async () => { + const browser = await webdriver(nextUrl, '/client-component-route') + + // After hydration count should be 1 + expect(await browser.elementByCss('p').text()).toBe('hello from app/client-component-route. count: 1') + }) + }) + + describe('should include client component layout with server component route', () => { + it('should include it server-side', async () => { + const html = await renderViaHTTP(nextUrl, '/client-nested') + const $ = load(html) + // Should not be nested in dashboard + expect($('h1').text()).toBe('Client Nested. Count: 0') + // Should include the page text + expect($('p').text()).toBe('hello from app/client-nested') + }) + + it('should include it client-side', async () => { + const browser = await webdriver(nextUrl, '/client-nested') + + // After hydration count should be 1 + expect(await browser.elementByCss('h1').text()).toBe('Client Nested. Count: 1') + + // After hydration count should be 1 + expect(await browser.elementByCss('p').text()).toBe('hello from app/client-nested') + }) + }) + + describe('Loading', () => { + it('should render loading.js in initial html for slow page', async () => { + const html = await renderViaHTTP(nextUrl, '/slow-page-with-loading') + const $ = load(html) + + expect($('#loading').text()).toBe('Loading...') + }) - // it('throws when escape characters are included in nonce', async () => { - // const res = await fetchWithPolicy(`script-src 'nonce-">"'`) + it('should render loading.js in browser for slow page', async () => { + const browser = await webdriver(nextUrl, '/slow-page-with-loading', { + waitHydration: false, + }) + // TODO-APP: `await webdriver()` causes waiting for the full page to complete streaming. At that point "Loading..." is replaced by the actual content + // expect(await browser.elementByCss('#loading').text()).toBe('Loading...') - // expect(res.status).toBe(500) - // }) - // }) - - // describe('template component', () => { - // it('should render the template that holds state in a client component and reset on navigation', async () => { - // const browser = await webdriver(nextUrl, '/template/clientcomponent') - // expect(await browser.elementByCss('h1').text()).toBe('Template 0') - // await browser.elementByCss('button').click() - // expect(await browser.elementByCss('h1').text()).toBe('Template 1') - - // await browser.elementByCss('#link').click() - // await browser.waitForElementByCss('#other-page') - - // expect(await browser.elementByCss('h1').text()).toBe('Template 0') - // await browser.elementByCss('button').click() - // expect(await browser.elementByCss('h1').text()).toBe('Template 1') - - // await browser.elementByCss('#link').click() - // await browser.waitForElementByCss('#page') - - // expect(await browser.elementByCss('h1').text()).toBe('Template 0') - // }) - - // // TODO-APP: disable failing test and investigate later - // it.skip('should render the template that is a server component and rerender on navigation', async () => { - // const browser = await webdriver(nextUrl, '/template/servercomponent') - // expect(await browser.elementByCss('h1').text()).toStartWith('Template') - - // const currentTime = await browser.elementByCss('#performance-now').text() - - // await browser.elementByCss('#link').click() - // await browser.waitForElementByCss('#other-page') - - // expect(await browser.elementByCss('h1').text()).toStartWith('Template') - - // // template should rerender on navigation even when it's a server component - // expect(await browser.elementByCss('#performance-now').text()).toBe(currentTime) - - // await browser.elementByCss('#link').click() - // await browser.waitForElementByCss('#page') - - // expect(await browser.elementByCss('#performance-now').text()).toBe(currentTime) - // }) - // }) - - // // TODO-APP: This is disabled for development as the error overlay needs to be reworked. - // ;(isDev ? describe.skip : describe)('error component', () => { - // it('should trigger error component when an error happens during rendering', async () => { - // const browser = await webdriver(nextUrl, '/error/clientcomponent') - // await browser.elementByCss('#error-trigger-button').click().waitForElementByCss('#error-boundary-message') - - // expect(await browser.elementByCss('#error-boundary-message').text()).toBe('An error occurred: this is a test') - // }) - - // it('should allow resetting error boundary', async () => { - // const browser = await webdriver(nextUrl, '/error/clientcomponent') - - // // Try triggering and resetting a few times in a row - // for (let i = 0; i < 5; i++) { - // await browser.elementByCss('#error-trigger-button').click().waitForElementByCss('#error-boundary-message') - - // expect(await browser.elementByCss('#error-boundary-message').text()).toBe('An error occurred: this is a test') - - // await browser.elementByCss('#reset').click().waitForElementByCss('#error-trigger-button') - - // expect(await browser.elementByCss('#error-trigger-button').text()).toBe('Trigger Error!') - // } - // }) - - // it('should hydrate empty shell to handle server-side rendering errors', async () => { - // const browser = await webdriver(nextUrl, '/error/ssr-error-client-component') - // const logs = await browser.log() - // const errors = logs - // .filter((x) => x.source === 'error') - // .map((x) => x.message) - // .join('\n') - // expect(errors).toInclude('Error during SSR') - // }) - // }) - - // describe('known bugs', () => { - // it('should not share flight data between requests', async () => { - // const fetches = await Promise.all( - // [...Array.from({ length: 5 })].map(() => renderViaHTTP(nextUrl, '/loading-bug/electronics')), - // ) - - // for (const text of fetches) { - // const $ = load(text) - // expect($('#category-id').text()).toBe('electronicsabc') - // } - // }) - // }) - - // describe('404', () => { - // it.skip('should trigger 404 in a server component', async () => { - // const browser = await webdriver(nextUrl, '/not-found/servercomponent') - - // expect(await browser.waitForElementByCss('#not-found-component').text()).toBe('404!') - // }) - - // it.skip('should trigger 404 in a client component', async () => { - // const browser = await webdriver(nextUrl, '/not-found/clientcomponent') - // expect(await browser.waitForElementByCss('#not-found-component').text()).toBe('404!') - // }) - - // it('should trigger 404 client-side', async () => { - // const browser = await webdriver(nextUrl, '/not-found/client-side') - // await browser.elementByCss('button').click().waitForElementByCss('#not-found-component') - // expect(await browser.elementByCss('#not-found-component').text()).toBe('404!') - // }) - // }) - - // describe('redirect', () => { - // describe('components', () => { - // it.skip('should redirect in a server component', async () => { - // const browser = await webdriver(nextUrl, '/redirect/servercomponent') - // await browser.waitForElementByCss('#result-page') - // expect(await browser.elementByCss('#result-page').text()).toBe('Result Page') - // }) - - // it.skip('should redirect in a client component', async () => { - // const browser = await webdriver(nextUrl, '/redirect/clientcomponent') - // await browser.waitForElementByCss('#result-page') - // expect(await browser.elementByCss('#result-page').text()).toBe('Result Page') - // }) - - // // TODO-APP: Enable in development - // ;(isDev ? it.skip : it)('should redirect client-side', async () => { - // const browser = await webdriver(nextUrl, '/redirect/client-side') - // await browser.elementByCss('button').click().waitForElementByCss('#result-page') - // expect(await browser.elementByCss('#result-page').text()).toBe('Result Page') - // }) - // }) - - // describe('next.config.js redirects', () => { - // it('should redirect from next.config.js', async () => { - // const browser = await webdriver(nextUrl, '/redirect/a') - // expect(await browser.elementByCss('h1').text()).toBe('Dashboard') - // expect(await browser.url()).toBe(`${nextUrl}/dashboard`) - // }) - - // it('should redirect from next.config.js with link navigation', async () => { - // const browser = await webdriver(nextUrl, '/redirect/next-config-redirect') - // await browser.elementByCss('#redirect-a').click().waitForElementByCss('h1') - // expect(await browser.elementByCss('h1').text()).toBe('Dashboard') - // expect(await browser.url()).toBe(`${nextUrl}/dashboard`) - // }) - // }) - - // describe('middleware redirects', () => { - // it('should redirect from middleware', async () => { - // const browser = await webdriver(nextUrl, '/redirect-middleware-to-dashboard') - // expect(await browser.elementByCss('h1').text()).toBe('Dashboard') - // expect(await browser.url()).toBe(`${nextUrl}/dashboard`) - // }) - - // it('should redirect from middleware with link navigation', async () => { - // const browser = await webdriver(nextUrl, '/redirect/next-middleware-redirect') - // await browser.elementByCss('#redirect-middleware').click().waitForElementByCss('h1') - // expect(await browser.elementByCss('h1').text()).toBe('Dashboard') - // expect(await browser.url()).toBe(`${nextUrl}/dashboard`) - // }) - // }) - // }) - // } - - // runTests() + expect(await browser.elementByCss('#slow-page-message').text()).toBe('hello from slow page') + }) + + it('should render loading.js in initial html for slow layout', async () => { + const html = await renderViaHTTP(nextUrl, '/slow-layout-with-loading/slow') + const $ = load(html) + + expect($('#loading').text()).toBe('Loading...') + }) + + it('should render loading.js in browser for slow layout', async () => { + const browser = await webdriver(nextUrl, '/slow-layout-with-loading/slow', { + waitHydration: false, + }) + // TODO-APP: `await webdriver()` causes waiting for the full page to complete streaming. At that point "Loading..." is replaced by the actual content + // expect(await browser.elementByCss('#loading').text()).toBe('Loading...') + + expect(await browser.elementByCss('#slow-layout-message').text()).toBe('hello from slow layout') + + expect(await browser.elementByCss('#page-message').text()).toBe('Hello World') + }) + + it('should render loading.js in initial html for slow layout and page', async () => { + const html = await renderViaHTTP(nextUrl, '/slow-layout-and-page-with-loading/slow') + const $ = load(html) + + expect($('#loading-layout').text()).toBe('Loading layout...') + expect($('#loading-page').text()).toBe('Loading page...') + }) + + it('should render loading.js in browser for slow layout and page', async () => { + const browser = await webdriver(nextUrl, '/slow-layout-and-page-with-loading/slow', { + waitHydration: false, + }) + // TODO-APP: `await webdriver()` causes waiting for the full page to complete streaming. At that point "Loading..." is replaced by the actual content + // expect(await browser.elementByCss('#loading-layout').text()).toBe('Loading...') + // expect(await browser.elementByCss('#loading-page').text()).toBe('Loading...') + + expect(await browser.elementByCss('#slow-layout-message').text()).toBe('hello from slow layout') + + expect(await browser.elementByCss('#slow-page-message').text()).toBe('hello from slow page') + }) + }) + + describe('middleware', () => { + it.each(['rewrite', 'redirect'])( + `should strip internal query parameters from requests to middleware for %s`, + async (method) => { + const browser = await webdriver(nextUrl, '/internal') + + try { + // Wait for and click the navigation element, this should trigger + // the flight request that'll be caught by the middleware. If the + // middleware sees any flight data on the request it'll redirect to + // a page with an element of #failure, otherwise, we'll see the + // element for #success. + await browser.waitForElementByCss(`#navigate-${method}`).elementById(`navigate-${method}`).click() + expect(await browser.waitForElementByCss('#success', 3000).text()).toBe('Success') + } finally { + await browser.close() + } + }, + ) + }) + + describe('next/router', () => { + // `useRouter` should not be accessible in server components. + it.skip('should always return null when accessed from /app', async () => { + const browser = await webdriver(nextUrl, '/old-router') + + try { + await browser.waitForElementByCss('#old-router') + + const notNull = await browser.elementsByCss('.was-not-null') + expect(notNull.length).toBe(0) + + const wasNull = await browser.elementsByCss('.was-null') + expect(wasNull.length).toBe(6) + } finally { + await browser.close() + } + }) + }) + + describe('hooks', () => { + describe('cookies function', () => { + it('should retrieve cookies in a server component', async () => { + const browser = await webdriver(nextUrl, '/hooks/use-cookies') + + try { + await browser.waitForElementByCss('#does-not-have-cookie') + browser.addCookie({ name: 'use-cookies', value: 'value' }) + browser.refresh() + + await browser.waitForElementByCss('#has-cookie') + browser.deleteCookies() + browser.refresh() + + await browser.waitForElementByCss('#does-not-have-cookie') + } finally { + await browser.close() + } + }) + + it('should access cookies on navigation', async () => { + const browser = await webdriver(nextUrl, '/navigation') + + try { + // Click the cookies link to verify it can't see the cookie that's + // not there. + await browser.elementById('use-cookies').click() + await browser.waitForElementByCss('#does-not-have-cookie') + + // Go back and add the cookies. + await browser.back() + await browser.waitForElementByCss('#from-navigation') + browser.addCookie({ name: 'use-cookies', value: 'value' }) + + // Click the cookies link again to see that the cookie can be picked + // up again. + await browser.elementById('use-cookies').click() + await browser.waitForElementByCss('#has-cookie') + + // Go back and remove the cookies. + await browser.back() + await browser.waitForElementByCss('#from-navigation') + browser.deleteCookies() + + // Verify for the last time that after clicking the cookie link + // again, there are no cookies. + await browser.elementById('use-cookies').click() + await browser.waitForElementByCss('#does-not-have-cookie') + } finally { + await browser.close() + } + }) + }) + + describe('headers function', () => { + it('should have access to incoming headers in a server component', async () => { + // Check to see that we can't see the header when it's not present. + let html = await renderViaHTTP(nextUrl, '/hooks/use-headers', {}, { headers: {} }) + let $ = load(html) + expect($('#does-not-have-header').length).toBe(1) + expect($('#has-header').length).toBe(0) + + // Check to see that we can see the header when it's present. + html = await renderViaHTTP(nextUrl, '/hooks/use-headers', {}, { headers: { 'x-use-headers': 'value' } }) + $ = load(html) + expect($('#has-header').length).toBe(1) + expect($('#does-not-have-header').length).toBe(0) + }) + + it('should access headers on navigation', async () => { + const browser = await webdriver(nextUrl, '/navigation') + + try { + await browser.elementById('use-headers').click() + await browser.waitForElementByCss('#has-referer') + } finally { + await browser.close() + } + }) + }) + + describe('previewData function', () => { + it('should return no preview data when there is none', async () => { + const browser = await webdriver(nextUrl, '/hooks/use-preview-data') + + try { + await browser.waitForElementByCss('#does-not-have-preview-data') + } finally { + await browser.close() + } + }) + + it('should return preview data when there is some', async () => { + const browser = await webdriver(nextUrl, '/api/preview') + + try { + await browser.loadPage(`${nextUrl}/hooks/use-preview-data`, { + disableCache: false, + beforePageLoad: null, + }) + await browser.waitForElementByCss('#has-preview-data') + } finally { + await browser.close() + } + }) + }) + + describe('useRouter', () => { + // TODO-APP: should enable when implemented + it.skip('should throw an error when imported', async () => { + const res = await fetchViaHTTP(nextUrl, '/hooks/use-router/server') + expect(res.status).toBe(500) + expect(await res.text()).toContain('Internal Server Error') + }) + }) + + describe('useParams', () => { + // TODO-APP: should enable when implemented + it.skip('should throw an error when imported', async () => { + const res = await fetchViaHTTP(nextUrl, '/hooks/use-params/server') + expect(res.status).toBe(500) + expect(await res.text()).toContain('Internal Server Error') + }) + }) + + describe('useSearchParams', () => { + // TODO-APP: should enable when implemented + it.skip('should throw an error when imported', async () => { + const res = await fetchViaHTTP(nextUrl, '/hooks/use-search-params/server') + expect(res.status).toBe(500) + expect(await res.text()).toContain('Internal Server Error') + }) + }) + + describe('usePathname', () => { + // TODO-APP: should enable when implemented + it.skip('should throw an error when imported', async () => { + const res = await fetchViaHTTP(nextUrl, '/hooks/use-pathname/server') + expect(res.status).toBe(500) + expect(await res.text()).toContain('Internal Server Error') + }) + }) + + describe('useLayoutSegments', () => { + // TODO-APP: should enable when implemented + it.skip('should throw an error when imported', async () => { + const res = await fetchViaHTTP(nextUrl, '/hooks/use-layout-segments/server') + expect(res.status).toBe(500) + expect(await res.text()).toContain('Internal Server Error') + }) + }) + + describe('useSelectedLayoutSegment', () => { + // TODO-APP: should enable when implemented + it.skip('should throw an error when imported', async () => { + const res = await fetchViaHTTP(nextUrl, '/hooks/use-selected-layout-segment/server') + expect(res.status).toBe(500) + expect(await res.text()).toContain('Internal Server Error') + }) + }) + }) + }) + + describe('client components', () => { + describe('hooks', () => { + describe('cookies function', () => { + // TODO-APP: should enable when implemented + it.skip('should throw an error when imported', async () => { + const res = await fetchViaHTTP(nextUrl, '/hooks/use-cookies/client') + expect(res.status).toBe(500) + expect(await res.text()).toContain('Internal Server Error') + }) + }) + + describe('previewData function', () => { + // TODO-APP: should enable when implemented + it.skip('should throw an error when imported', async () => { + const res = await fetchViaHTTP(nextUrl, '/hooks/use-preview-data/client') + expect(res.status).toBe(500) + expect(await res.text()).toContain('Internal Server Error') + }) + }) + + describe('headers function', () => { + // TODO-APP: should enable when implemented + it.skip('should throw an error when imported', async () => { + const res = await fetchViaHTTP(nextUrl, '/hooks/use-headers/client') + expect(res.status).toBe(500) + expect(await res.text()).toContain('Internal Server Error') + }) + }) + + describe('usePathname', () => { + it('should have the correct pathname', async () => { + const html = await renderViaHTTP(nextUrl, '/hooks/use-pathname') + const $ = load(html) + expect($('#pathname').attr('data-pathname')).toBe('/hooks/use-pathname') + }) + }) + + describe('useSearchParams', () => { + it('should have the correct search params', async () => { + const html = await renderViaHTTP(nextUrl, '/hooks/use-search-params?first=value&second=other%20value&third') + const $ = load(html) + const el = $('#params') + expect(el.attr('data-param-first')).toBe('value') + expect(el.attr('data-param-second')).toBe('other value') + expect(el.attr('data-param-third')).toBe('') + expect(el.attr('data-param-not-real')).toBe('N/A') + }) + }) + + describe('useRouter', () => { + it('should allow access to the router', async () => { + const browser = await webdriver(nextUrl, '/hooks/use-router') + + try { + // Wait for the page to load, click the button (which uses a method + // on the router) and then wait for the correct page to load. + await browser.waitForElementByCss('#router') + await browser.elementById('button-push').click() + await browser.waitForElementByCss('#router-sub-page') + + // Go back (confirming we did do a hard push), and wait for the + // correct previous page. + await browser.back() + await browser.waitForElementByCss('#router') + } finally { + await browser.close() + } + }) + + it('should have consistent query and params handling', async () => { + const html = await renderViaHTTP(nextUrl, '/param-and-query/params?slug=query') + const $ = load(html) + const el = $('#params-and-query') + expect(el.attr('data-params')).toBe('params') + expect(el.attr('data-query')).toBe('query') + }) + }) + }) + }) + + describe('css support', () => { + describe('server layouts', () => { + it('should support global css inside server layouts', async () => { + const browser = await webdriver(nextUrl, '/dashboard') + + // Should body text in red + expect(await browser.eval(`window.getComputedStyle(document.querySelector('.p')).color`)).toBe('rgb(255, 0, 0)') + + // Should inject global css for .green selectors + expect(await browser.eval(`window.getComputedStyle(document.querySelector('.green')).color`)).toBe( + 'rgb(0, 128, 0)', + ) + }) + + it('should support css modules inside server layouts', async () => { + const browser = await webdriver(nextUrl, '/css/css-nested') + expect(await browser.eval(`window.getComputedStyle(document.querySelector('#server-cssm')).color`)).toBe( + 'rgb(0, 128, 0)', + ) + }) + }) + + describe('server pages', () => { + it('should support global css inside server pages', async () => { + const browser = await webdriver(nextUrl, '/css/css-page') + expect(await browser.eval(`window.getComputedStyle(document.querySelector('h1')).color`)).toBe('rgb(255, 0, 0)') + }) + + it('should support css modules inside server pages', async () => { + const browser = await webdriver(nextUrl, '/css/css-page') + expect(await browser.eval(`window.getComputedStyle(document.querySelector('#cssm')).color`)).toBe( + 'rgb(0, 0, 255)', + ) + }) + }) + + describe('client layouts', () => { + it('should support css modules inside client layouts', async () => { + const browser = await webdriver(nextUrl, '/client-nested') + + // Should render h1 in red + expect(await browser.eval(`window.getComputedStyle(document.querySelector('h1')).color`)).toBe('rgb(255, 0, 0)') + }) + + it('should support global css inside client layouts', async () => { + const browser = await webdriver(nextUrl, '/client-nested') + + // Should render button in red + expect(await browser.eval(`window.getComputedStyle(document.querySelector('button')).color`)).toBe( + 'rgb(255, 0, 0)', + ) + }) + }) + + describe('client pages', () => { + it('should support css modules inside client pages', async () => { + const browser = await webdriver(nextUrl, '/client-component-route') + + // Should render p in red + expect(await browser.eval(`window.getComputedStyle(document.querySelector('p')).color`)).toBe('rgb(255, 0, 0)') + }) + + it('should support global css inside client pages', async () => { + const browser = await webdriver(nextUrl, '/client-component-route') + + // Should render `b` in blue + expect(await browser.eval(`window.getComputedStyle(document.querySelector('b')).color`)).toBe('rgb(0, 0, 255)') + }) + }) + }) + describe('Subresource Integrity', () => { + function fetchWithPolicy(policy: string | null) { + return fetchViaHTTP(nextUrl, '/dashboard', undefined, { + headers: policy + ? { + 'Content-Security-Policy': policy, + } + : {}, + }) + } + + async function renderWithPolicy(policy: string | null) { + const res = await fetchWithPolicy(policy) + + expect(res.ok).toBe(true) + + const html = await res.text() + + return load(html) + } + + it('does not include nonce when not enabled', async () => { + const policies = [ + `script-src 'nonce-'`, // invalid nonce + 'style-src "nonce-cmFuZG9tCg=="', // no script or default src + '', // empty string + ] + + for (const policy of policies) { + const $ = await renderWithPolicy(policy) + + // Find all the script tags without src attributes and with nonce + // attributes. + const elements = $('script[nonce]:not([src])') + + // Expect there to be none. + expect(elements.length).toBe(0) + } + }) + + it('includes a nonce value with inline scripts when Content-Security-Policy header is defined', async () => { + // A random nonce value, base64 encoded. + const nonce = 'cmFuZG9tCg==' + + // Validate all the cases where we could parse the nonce. + const policies = [ + `script-src 'nonce-${nonce}'`, // base case + ` script-src 'nonce-${nonce}' `, // extra space added around sources and directive + `style-src 'self'; script-src 'nonce-${nonce}'`, // extra directives + `script-src 'self' 'nonce-${nonce}' 'nonce-othernonce'`, // extra nonces + `default-src 'nonce-othernonce'; script-src 'nonce-${nonce}';`, // script and then fallback case + `default-src 'nonce-${nonce}'`, // fallback case + ] + + for (const policy of policies) { + const $ = await renderWithPolicy(policy) + + // Find all the script tags without src attributes. + const elements = $('script:not([src])') + + // Expect there to be at least 1 script tag without a src attribute. + expect(elements.length).toBeGreaterThan(0) + + // Expect all inline scripts to have the nonce value. + elements.each((i, el) => { + expect(el.attribs.nonce).toBe(nonce) + }) + } + }) + + it('includes an integrity attribute on scripts', async () => { + const html = await renderViaHTTP(nextUrl, '/dashboard') + + const $ = load(html) + + // Find all the script tags with src attributes. + const elements = $('script[src]') + + // Expect there to be at least 1 script tag with a src attribute. + expect(elements.length).toBeGreaterThan(0) + + // Collect all the scripts with integrity hashes so we can verify them. + const files: [string, string][] = [] + + // For each of these attributes, ensure that there's an integrity + // attribute and starts with the correct integrity hash prefix. + elements.each((i, el) => { + const { integrity } = el.attribs + expect(integrity).toBeDefined() + expect(integrity).toStartWith('sha256-') + + const { src } = el.attribs + expect(src).toBeDefined() + + files.push([src, integrity]) + }) + + // For each script tag, ensure that the integrity attribute is the + // correct hash of the script tag. + for (const [src, integrity] of files) { + const res = await fetchViaHTTP(nextUrl, src) + expect(res.status).toBe(200) + const content = await res.text() + + const hash = crypto.createHash('sha256').update(content).digest().toString('base64') + + expect(integrity).toEndWith(hash) + } + }) + + it('throws when escape characters are included in nonce', async () => { + const res = await fetchWithPolicy(`script-src 'nonce-">"'`) + + expect(res.status).toBe(500) + }) + }) + + describe('template component', () => { + it('should render the template that holds state in a client component and reset on navigation', async () => { + const browser = await webdriver(nextUrl, '/template/clientcomponent') + expect(await browser.elementByCss('h1').text()).toBe('Template 0') + await browser.elementByCss('button').click() + expect(await browser.elementByCss('h1').text()).toBe('Template 1') + + await browser.elementByCss('#link').click() + await browser.waitForElementByCss('#other-page') + + expect(await browser.elementByCss('h1').text()).toBe('Template 0') + await browser.elementByCss('button').click() + expect(await browser.elementByCss('h1').text()).toBe('Template 1') + + await browser.elementByCss('#link').click() + await browser.waitForElementByCss('#page') + + expect(await browser.elementByCss('h1').text()).toBe('Template 0') + }) + + // TODO-APP: disable failing test and investigate later + it.skip('should render the template that is a server component and rerender on navigation', async () => { + const browser = await webdriver(nextUrl, '/template/servercomponent') + expect(await browser.elementByCss('h1').text()).toStartWith('Template') + + const currentTime = await browser.elementByCss('#performance-now').text() + + await browser.elementByCss('#link').click() + await browser.waitForElementByCss('#other-page') + + expect(await browser.elementByCss('h1').text()).toStartWith('Template') + + // template should rerender on navigation even when it's a server component + expect(await browser.elementByCss('#performance-now').text()).toBe(currentTime) + + await browser.elementByCss('#link').click() + await browser.waitForElementByCss('#page') + + expect(await browser.elementByCss('#performance-now').text()).toBe(currentTime) + }) + }) + + // TODO-APP: This is disabled for development as the error overlay needs to be reworked. + describe('error component', () => { + it('should trigger error component when an error happens during rendering', async () => { + const browser = await webdriver(nextUrl, '/error/clientcomponent') + await browser.elementByCss('#error-trigger-button').click().waitForElementByCss('#error-boundary-message') + + expect(await browser.elementByCss('#error-boundary-message').text()).toBe('An error occurred: this is a test') + }) + + it('should allow resetting error boundary', async () => { + const browser = await webdriver(nextUrl, '/error/clientcomponent') + + // Try triggering and resetting a few times in a row + for (let i = 0; i < 5; i++) { + await browser.elementByCss('#error-trigger-button').click().waitForElementByCss('#error-boundary-message') + + expect(await browser.elementByCss('#error-boundary-message').text()).toBe('An error occurred: this is a test') + + await browser.elementByCss('#reset').click().waitForElementByCss('#error-trigger-button') + + expect(await browser.elementByCss('#error-trigger-button').text()).toBe('Trigger Error!') + } + }) + + it('should hydrate empty shell to handle server-side rendering errors', async () => { + const browser = await webdriver(nextUrl, '/error/ssr-error-client-component') + const logs = await browser.log() + const errors = logs + .filter((x) => x.source === 'error') + .map((x) => x.message) + .join('\n') + expect(errors).toInclude('Error during SSR') + }) + }) + + describe('known bugs', () => { + it('should not share flight data between requests', async () => { + const fetches = await Promise.all( + [...Array.from({ length: 5 })].map(() => renderViaHTTP(nextUrl, '/loading-bug/electronics')), + ) + + for (const text of fetches) { + const $ = load(text) + expect($('#category-id').text()).toBe('electronicsabc') + } + }) + }) + + describe('404', () => { + it.skip('should trigger 404 in a server component', async () => { + const browser = await webdriver(nextUrl, '/not-found/servercomponent') + + expect(await browser.waitForElementByCss('#not-found-component').text()).toBe('404!') + }) + + it.skip('should trigger 404 in a client component', async () => { + const browser = await webdriver(nextUrl, '/not-found/clientcomponent') + expect(await browser.waitForElementByCss('#not-found-component').text()).toBe('404!') + }) + + it('should trigger 404 client-side', async () => { + const browser = await webdriver(nextUrl, '/not-found/client-side') + await browser.elementByCss('button').click().waitForElementByCss('#not-found-component') + expect(await browser.elementByCss('#not-found-component').text()).toBe('404!') + }) + }) + + describe('redirect', () => { + describe('components', () => { + it.skip('should redirect in a server component', async () => { + const browser = await webdriver(nextUrl, '/redirect/servercomponent') + await browser.waitForElementByCss('#result-page') + expect(await browser.elementByCss('#result-page').text()).toBe('Result Page') + }) + + it.skip('should redirect in a client component', async () => { + const browser = await webdriver(nextUrl, '/redirect/clientcomponent') + await browser.waitForElementByCss('#result-page') + expect(await browser.elementByCss('#result-page').text()).toBe('Result Page') + }) + + // TODO-APP: Enable in development + it('should redirect client-side', async () => { + const browser = await webdriver(nextUrl, '/redirect/client-side') + await browser.elementByCss('button').click().waitForElementByCss('#result-page') + expect(await browser.elementByCss('#result-page').text()).toBe('Result Page') + }) + }) + + describe('next.config.js redirects', () => { + it('should redirect from next.config.js', async () => { + const browser = await webdriver(nextUrl, '/redirect/a') + expect(await browser.elementByCss('h1').text()).toBe('Dashboard') + expect(await browser.url()).toBe(`${nextUrl}/dashboard`) + }) + + it('should redirect from next.config.js with link navigation', async () => { + const browser = await webdriver(nextUrl, '/redirect/next-config-redirect') + await browser.elementByCss('#redirect-a').click().waitForElementByCss('h1') + expect(await browser.elementByCss('h1').text()).toBe('Dashboard') + expect(await browser.url()).toBe(`${nextUrl}/dashboard`) + }) + }) + + describe('middleware redirects', () => { + it('should redirect from middleware', async () => { + const browser = await webdriver(nextUrl, '/redirect-middleware-to-dashboard') + expect(await browser.elementByCss('h1').text()).toBe('Dashboard') + expect(await browser.url()).toBe(`${nextUrl}/dashboard`) + }) + + it('should redirect from middleware with link navigation', async () => { + const browser = await webdriver(nextUrl, '/redirect/next-middleware-redirect') + await browser.elementByCss('#redirect-middleware').click().waitForElementByCss('h1') + expect(await browser.elementByCss('h1').text()).toBe('Dashboard') + expect(await browser.url()).toBe(`${nextUrl}/dashboard`) + }) + }) + }) }) From b6d70171bc626ce1094a8f1dfea2b3e31b5f6441 Mon Sep 17 00:00:00 2001 From: Matt Kane Date: Fri, 30 Sep 2022 10:19:02 +0100 Subject: [PATCH 025/172] chore: fix test syntax --- test/e2e/canary/appdir.spec.ts | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/test/e2e/canary/appdir.spec.ts b/test/e2e/canary/appdir.spec.ts index c06dceca63..8cc668228e 100644 --- a/test/e2e/canary/appdir.spec.ts +++ b/test/e2e/canary/appdir.spec.ts @@ -1,5 +1,5 @@ import { describe, it, expect, beforeAll } from 'vitest' - +import crypto from 'crypto' import { fetchViaHTTP, renderViaHTTP, waitFor } from '../next-test-lib/next-test-utils' import { load } from 'cheerio' import webdriver from '../next-test-lib/next-webdriver' @@ -1104,7 +1104,7 @@ describe('app dir', () => { elements.each((i, el) => { const { integrity } = el.attribs expect(integrity).toBeDefined() - expect(integrity).toStartWith('sha256-') + expect(integrity.startsWith('sha256-')).toBeTruthy() const { src } = el.attribs expect(src).toBeDefined() @@ -1121,7 +1121,7 @@ describe('app dir', () => { const hash = crypto.createHash('sha256').update(content).digest().toString('base64') - expect(integrity).toEndWith(hash) + expect(integrity.endsWith(hash)).toBeTruthy() } }) @@ -1155,14 +1155,13 @@ describe('app dir', () => { // TODO-APP: disable failing test and investigate later it.skip('should render the template that is a server component and rerender on navigation', async () => { const browser = await webdriver(nextUrl, '/template/servercomponent') - expect(await browser.elementByCss('h1').text()).toStartWith('Template') - + expect((await browser.elementByCss('h1').text()).startsWith('Template')).toBeTruthy() const currentTime = await browser.elementByCss('#performance-now').text() await browser.elementByCss('#link').click() await browser.waitForElementByCss('#other-page') - expect(await browser.elementByCss('h1').text()).toStartWith('Template') + expect((await browser.elementByCss('h1').text()).startsWith('Template')).toBeTruthy() // template should rerender on navigation even when it's a server component expect(await browser.elementByCss('#performance-now').text()).toBe(currentTime) @@ -1205,7 +1204,7 @@ describe('app dir', () => { .filter((x) => x.source === 'error') .map((x) => x.message) .join('\n') - expect(errors).toInclude('Error during SSR') + expect(errors).includes('Error during SSR') }) }) From c34b4fbb6c713aea9dd35ce15d984a8bdd8a5f59 Mon Sep 17 00:00:00 2001 From: Matt Kane Date: Fri, 30 Sep 2022 12:42:57 +0100 Subject: [PATCH 026/172] chore: update demos --- demos/canary/app/css/css-page/page.js | 1 + demos/canary/app/css/css-page/unused/page.js | 12 ++++++++++++ demos/canary/app/css/css-page/unused/styles.js | 4 ++++ .../canary/app/css/css-page/unused/unused.module.css | 3 +++ demos/canary/app/hooks/use-headers/page.js | 11 ++++------- demos/canary/app/navigation/page.js | 4 ++-- demos/canary/app/not-found/404.js | 3 --- demos/canary/app/not-found/not-found.js | 3 +++ 8 files changed, 29 insertions(+), 12 deletions(-) create mode 100644 demos/canary/app/css/css-page/unused/page.js create mode 100644 demos/canary/app/css/css-page/unused/styles.js create mode 100644 demos/canary/app/css/css-page/unused/unused.module.css delete mode 100644 demos/canary/app/not-found/404.js create mode 100644 demos/canary/app/not-found/not-found.js diff --git a/demos/canary/app/css/css-page/page.js b/demos/canary/app/css/css-page/page.js index 2fbdf86ded..10799b9671 100644 --- a/demos/canary/app/css/css-page/page.js +++ b/demos/canary/app/css/css-page/page.js @@ -1,4 +1,5 @@ import './style.css' + import styles from './style.module.css' export default function Page() { diff --git a/demos/canary/app/css/css-page/unused/page.js b/demos/canary/app/css/css-page/unused/page.js new file mode 100644 index 0000000000..b3fa35d7cf --- /dev/null +++ b/demos/canary/app/css/css-page/unused/page.js @@ -0,0 +1,12 @@ +import { styles } from './styles' + +export default function Page() { + return ( + <> +

Page

+
+ CSSM +
+ + ) +} diff --git a/demos/canary/app/css/css-page/unused/styles.js b/demos/canary/app/css/css-page/unused/styles.js new file mode 100644 index 0000000000..d191a9a4e1 --- /dev/null +++ b/demos/canary/app/css/css-page/unused/styles.js @@ -0,0 +1,4 @@ +import unused from './unused.module.css' +import styles from '../style.module.css' + +export { unused, styles } diff --git a/demos/canary/app/css/css-page/unused/unused.module.css b/demos/canary/app/css/css-page/unused/unused.module.css new file mode 100644 index 0000000000..67ed738ab1 --- /dev/null +++ b/demos/canary/app/css/css-page/unused/unused.module.css @@ -0,0 +1,3 @@ +.this_should_not_be_included { + color: red; +} diff --git a/demos/canary/app/hooks/use-headers/page.js b/demos/canary/app/hooks/use-headers/page.js index 354dd65e1f..8cd829dfbc 100644 --- a/demos/canary/app/hooks/use-headers/page.js +++ b/demos/canary/app/hooks/use-headers/page.js @@ -1,10 +1,9 @@ import { headers } from 'next/dist/client/components/hooks-server' export default function Page() { - const headers = headers() - - const hasHeader = - 'x-use-headers' in headers && headers['x-use-headers'] === 'value' + const headersList = headers() + const hasHeader = headersList.get('x-use-headers') === 'value' + const referer = headersList.get('referer') return ( <> @@ -14,9 +13,7 @@ export default function Page() { ) : (

Does not have x-use-headers header

)} - {'referer' in headers && headers['referer'] && ( -

Has referer header

- )} + {referer &&

Has referer header

} ) } diff --git a/demos/canary/app/navigation/page.js b/demos/canary/app/navigation/page.js index 130d71a07a..3cd67c44d3 100644 --- a/demos/canary/app/navigation/page.js +++ b/demos/canary/app/navigation/page.js @@ -7,10 +7,10 @@ export default function Page() {

{nanoid()}

hello from /navigation

- cookies + Cookies - headers + Headers ) diff --git a/demos/canary/app/not-found/404.js b/demos/canary/app/not-found/404.js deleted file mode 100644 index 42acdf4c58..0000000000 --- a/demos/canary/app/not-found/404.js +++ /dev/null @@ -1,3 +0,0 @@ -export default function NotFound() { - return

404!

-} diff --git a/demos/canary/app/not-found/not-found.js b/demos/canary/app/not-found/not-found.js new file mode 100644 index 0000000000..a022a980b3 --- /dev/null +++ b/demos/canary/app/not-found/not-found.js @@ -0,0 +1,3 @@ +export default function NotFound() { + return

Not Found!

+} From 3ff8ecc1b10463e0c323d74a09ad14a168f8d8e8 Mon Sep 17 00:00:00 2001 From: Matt Kane Date: Fri, 30 Sep 2022 16:09:45 +0100 Subject: [PATCH 027/172] chore: update canary --- demos/canary/package-lock.json | 284 ++++++++++++++++----------------- demos/canary/package.json | 6 +- 2 files changed, 145 insertions(+), 145 deletions(-) diff --git a/demos/canary/package-lock.json b/demos/canary/package-lock.json index 6fd158a6a5..af06b55d78 100644 --- a/demos/canary/package-lock.json +++ b/demos/canary/package-lock.json @@ -10,20 +10,20 @@ "license": "MIT", "dependencies": { "nanoid": "^3.3.4", - "next": "^12.3.2-canary.13", - "react": "0.0.0-experimental-ae7ad8b4c-20220927", - "react-dom": "0.0.0-experimental-ae7ad8b4c-20220927" + "next": "^12.3.2-canary.15", + "react": "^0.0.0-experimental-20a257c25-20220929", + "react-dom": "^0.0.0-experimental-20a257c25-20220929" } }, "node_modules/@next/env": { - "version": "12.3.2-canary.13", - "resolved": "https://registry.npmjs.org/@next/env/-/env-12.3.2-canary.13.tgz", - "integrity": "sha512-TRLZ8d5Al5ly2WcidmjCJZ2TIdLpWjGDjW5wV9NuPjgUuMC+B53NWqNVdtZIfiarh+jAIxgTU9imzzKkfhKW9g==" + "version": "12.3.2-canary.15", + "resolved": "https://registry.npmjs.org/@next/env/-/env-12.3.2-canary.15.tgz", + "integrity": "sha512-S2Km53IQvjAJeHodFSh4I6MisTaPRbaIfKReuCJFXbOrk+w7ir703G76PqOppkRbxEbWcGI3sqtURQ2EGzMa5A==" }, "node_modules/@next/swc-android-arm-eabi": { - "version": "12.3.2-canary.13", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.3.2-canary.13.tgz", - "integrity": "sha512-He3VS7EhxcJZXNEJGA+vt0yUp5aVFTPiCttENXvo2U2TRa0PdaFDGf9GQbSU6AmErfB/qbigJvfMJ1gg0yQyNw==", + "version": "12.3.2-canary.15", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.3.2-canary.15.tgz", + "integrity": "sha512-T+Tj2m2EpLn6jnhBc2WbXtpgaNpqisKPOJpe8fTUMaG2Z9rJQxCTJveRsbXsbD8Oo9bwViIFk3zmbSx2nQ7/rw==", "cpu": [ "arm" ], @@ -36,9 +36,9 @@ } }, "node_modules/@next/swc-android-arm64": { - "version": "12.3.2-canary.13", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-12.3.2-canary.13.tgz", - "integrity": "sha512-IXp1apXYP+IorT6JKNcgh9+zTbcSVYGT2kXrUIDUUQS9cc09sqEB+mctukj4kRnoGti4s+FKfi27Ox4qdzUmLQ==", + "version": "12.3.2-canary.15", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-12.3.2-canary.15.tgz", + "integrity": "sha512-WIuGUvt+encdFB6ykOvLprAckaaMhjdPIBiivpjAoipeCq0sXOp/1lWF0x2/g+8/fqH/eippXjKfMdA97MkMuw==", "cpu": [ "arm64" ], @@ -51,9 +51,9 @@ } }, "node_modules/@next/swc-darwin-arm64": { - "version": "12.3.2-canary.13", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.3.2-canary.13.tgz", - "integrity": "sha512-keCbkKK6Zb2wB1D87+Hu0NK7zLExqYoG6yYpueRiyHh34nvlkH2JyrXyFn7mIE7xnzqZ5wyomFzbe3rVqbp6MQ==", + "version": "12.3.2-canary.15", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.3.2-canary.15.tgz", + "integrity": "sha512-0wzzftgiMFnA/wZL5WLqrdSBMpJ//t+kk5174WlMzpV/uwUWirIZALbCrdfb14pMXE/WzmddYN1nLs78S8I21Q==", "cpu": [ "arm64" ], @@ -66,9 +66,9 @@ } }, "node_modules/@next/swc-darwin-x64": { - "version": "12.3.2-canary.13", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.3.2-canary.13.tgz", - "integrity": "sha512-TizA7hbfHVJ1xO4rNyH3Wori4nOI1gI2dgV+c4CnMkwzcf2e6pKOvAY8eTEJGWygvQsfXlgKrfMCRMo0GsVjXQ==", + "version": "12.3.2-canary.15", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.3.2-canary.15.tgz", + "integrity": "sha512-Kr5tC7OOKasjjYV6vxIxGOHr0VBQNLRK8J7g/mg5mgzcn689bpnJPnMvc51dDxkj2KimK1/u4yJR3OFHY6ufWg==", "cpu": [ "x64" ], @@ -81,9 +81,9 @@ } }, "node_modules/@next/swc-freebsd-x64": { - "version": "12.3.2-canary.13", - "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.3.2-canary.13.tgz", - "integrity": "sha512-E3cEa+hWRSD+kSLq7GgfYN/jYs0e3uQhN8a9rU4cGHiRqnw+yji9q3bfUOkpGRcl47KmzAoDfYcKhfbsLHb0Ig==", + "version": "12.3.2-canary.15", + "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.3.2-canary.15.tgz", + "integrity": "sha512-X7wOCmmz10Ihw+rAYdybU5M6ATrUVvVNgoG9ITNVxFc+ATPnDsLBPZuV4e7iI/vV5xOJ2EpTBqI4j4rozNUUhQ==", "cpu": [ "x64" ], @@ -96,9 +96,9 @@ } }, "node_modules/@next/swc-linux-arm-gnueabihf": { - "version": "12.3.2-canary.13", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.3.2-canary.13.tgz", - "integrity": "sha512-nAuzx6ZJBE5T04/C8sdFl5sgZE4MSiDq4W2PEBK54sbO9lgdFJw5N9kz7H971aJgmEA1CEz+xg5oYdYzV/jLFw==", + "version": "12.3.2-canary.15", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.3.2-canary.15.tgz", + "integrity": "sha512-oj5oiu6NQA8K0kKi8B/wSx75rE026KiCWe1OG60SefTvumG0QQWWU8arAPvego3bi2cLQnLQ5upseXmMM/pFkA==", "cpu": [ "arm" ], @@ -111,9 +111,9 @@ } }, "node_modules/@next/swc-linux-arm64-gnu": { - "version": "12.3.2-canary.13", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.3.2-canary.13.tgz", - "integrity": "sha512-Xel0K86aRe7tlDqKNce5AOxhzGv5dWsok9S3Z9NvYVdWS4r0XOepQLXQDY1wShpYjsKoYSAslBZPAO8DpTi4bw==", + "version": "12.3.2-canary.15", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.3.2-canary.15.tgz", + "integrity": "sha512-fbzxvXOfhIKkocMi4+wEfxWQLSAa+JiNua0ky5huS86QoyS/b+rH6ovYpAZlYp/FL2Dll5K/GtwwVF/EfcBvaQ==", "cpu": [ "arm64" ], @@ -126,9 +126,9 @@ } }, "node_modules/@next/swc-linux-arm64-musl": { - "version": "12.3.2-canary.13", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.3.2-canary.13.tgz", - "integrity": "sha512-KJElZjEmgMuIcL+9tdzq5XCO6KLRYV1xjT1qX2RbCTJ5Qwa9AC3IUCequFLk8WSZbGRrTA/imDSu5BYG/pK5Jg==", + "version": "12.3.2-canary.15", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.3.2-canary.15.tgz", + "integrity": "sha512-6/s+1XR4R8NRLuFraK/0jy85yWKcKjXC+KtGggM73Mo8uIBENWj2cpDXLZj8iMdo20vGAce1G3ZEEegWHU+Onw==", "cpu": [ "arm64" ], @@ -141,9 +141,9 @@ } }, "node_modules/@next/swc-linux-x64-gnu": { - "version": "12.3.2-canary.13", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.3.2-canary.13.tgz", - "integrity": "sha512-o6wYKB7cM1ATyXHXJ5Sbv0Z1okYVBxFZCJkjk1HlS1vrGFIynyWBZm9tu87ujI0cIHjWtA5s+N3EET722zjhkQ==", + "version": "12.3.2-canary.15", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.3.2-canary.15.tgz", + "integrity": "sha512-Djpl2Q+3St0ourt0Dc2eBFsnzrEdEQCuZLnbtcIbBlecdEQHVVjVhRGNnmEVPNj3PwkV6/qdrxLqmpOSON17rA==", "cpu": [ "x64" ], @@ -156,9 +156,9 @@ } }, "node_modules/@next/swc-linux-x64-musl": { - "version": "12.3.2-canary.13", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.3.2-canary.13.tgz", - "integrity": "sha512-sKwYbzdBxW5Q5MqCgFJT7PmymTXpplzyzYbIKWPcAgatKpRanSEFpCE/8xYKrKWPq6OfwclklB1s9gV/si5D5w==", + "version": "12.3.2-canary.15", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.3.2-canary.15.tgz", + "integrity": "sha512-QjYq7pQOHFK8C8XpPFKJYbYs0Gp8yByIbEZPYBWkYSRnvU6ikC8E+hqdEG+yl8qmw6i3JLKkXnr6m9xbW/dyiQ==", "cpu": [ "x64" ], @@ -171,9 +171,9 @@ } }, "node_modules/@next/swc-win32-arm64-msvc": { - "version": "12.3.2-canary.13", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.3.2-canary.13.tgz", - "integrity": "sha512-P6vKqOnt8N19Zwz9m7425YD5DJx1+Q35BXNHaBaqJxpRICRdu/y1u+Y3Q53lsUiH9pej2XCqCAcekHie49uVJg==", + "version": "12.3.2-canary.15", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.3.2-canary.15.tgz", + "integrity": "sha512-S+T7MmDLgsYNSOcjAwaT4jJSWJxfVrNIeXo4nQvSFu2ZZ/phOLj9k/ytwqD210csNBO4WdI2jS7vh7ROMyl6Lw==", "cpu": [ "arm64" ], @@ -186,9 +186,9 @@ } }, "node_modules/@next/swc-win32-ia32-msvc": { - "version": "12.3.2-canary.13", - "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.3.2-canary.13.tgz", - "integrity": "sha512-0mLk3ZW5nyKpWOF93LZdNSgYSoHJwlAF09zIODLSKUrtJN0HYs7cLpP+2WzsSSDR8kAJErAgP87AzpjBV3vOxg==", + "version": "12.3.2-canary.15", + "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.3.2-canary.15.tgz", + "integrity": "sha512-ormAAguhEoHdopXfuz3FnrzURdb5FMLz+qDe3qD/C3T/J5h95faqrRsD+2fn8cuODabZ6GKtWA24UpxfqaUiUA==", "cpu": [ "ia32" ], @@ -201,9 +201,9 @@ } }, "node_modules/@next/swc-win32-x64-msvc": { - "version": "12.3.2-canary.13", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.3.2-canary.13.tgz", - "integrity": "sha512-djLdLB2FsHuxNVLekGrrQGiPR3MmSM0RXaAhpe0xqeClqDGqR0O01M6RUhMqv4KcPK0icUcc+X9P1gxWXRyhIQ==", + "version": "12.3.2-canary.15", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.3.2-canary.15.tgz", + "integrity": "sha512-oW54WmU7khYxAOWSoCV+te+RpBGAhfOsQcAq0ijUL2F9qi+YpTixTakCobYNzIxj3QsvmVikInvkNwR/Rfpzcw==", "cpu": [ "x64" ], @@ -266,11 +266,11 @@ } }, "node_modules/next": { - "version": "12.3.2-canary.13", - "resolved": "https://registry.npmjs.org/next/-/next-12.3.2-canary.13.tgz", - "integrity": "sha512-3nkpYO/a0mIZBCd+EImahBoeXRfq+CtaQnn/QrTmTMjsYg9oV1LRq8i1sYSiJxJ1ikHUGm9mw6jCyuazRvyrjQ==", + "version": "12.3.2-canary.15", + "resolved": "https://registry.npmjs.org/next/-/next-12.3.2-canary.15.tgz", + "integrity": "sha512-S60rVNp41ALhqKgdSe4tgcFl4u5MBQehRL9X+oPs8TMxGWazUXKQKH36LZrFkQxKnoYAx3PoTpuunnZSVCiXrw==", "dependencies": { - "@next/env": "12.3.2-canary.13", + "@next/env": "12.3.2-canary.15", "@swc/helpers": "0.4.11", "caniuse-lite": "^1.0.30001406", "postcss": "8.4.14", @@ -284,19 +284,19 @@ "node": ">=12.22.0" }, "optionalDependencies": { - "@next/swc-android-arm-eabi": "12.3.2-canary.13", - "@next/swc-android-arm64": "12.3.2-canary.13", - "@next/swc-darwin-arm64": "12.3.2-canary.13", - "@next/swc-darwin-x64": "12.3.2-canary.13", - "@next/swc-freebsd-x64": "12.3.2-canary.13", - "@next/swc-linux-arm-gnueabihf": "12.3.2-canary.13", - "@next/swc-linux-arm64-gnu": "12.3.2-canary.13", - "@next/swc-linux-arm64-musl": "12.3.2-canary.13", - "@next/swc-linux-x64-gnu": "12.3.2-canary.13", - "@next/swc-linux-x64-musl": "12.3.2-canary.13", - "@next/swc-win32-arm64-msvc": "12.3.2-canary.13", - "@next/swc-win32-ia32-msvc": "12.3.2-canary.13", - "@next/swc-win32-x64-msvc": "12.3.2-canary.13" + "@next/swc-android-arm-eabi": "12.3.2-canary.15", + "@next/swc-android-arm64": "12.3.2-canary.15", + "@next/swc-darwin-arm64": "12.3.2-canary.15", + "@next/swc-darwin-x64": "12.3.2-canary.15", + "@next/swc-freebsd-x64": "12.3.2-canary.15", + "@next/swc-linux-arm-gnueabihf": "12.3.2-canary.15", + "@next/swc-linux-arm64-gnu": "12.3.2-canary.15", + "@next/swc-linux-arm64-musl": "12.3.2-canary.15", + "@next/swc-linux-x64-gnu": "12.3.2-canary.15", + "@next/swc-linux-x64-musl": "12.3.2-canary.15", + "@next/swc-win32-arm64-msvc": "12.3.2-canary.15", + "@next/swc-win32-ia32-msvc": "12.3.2-canary.15", + "@next/swc-win32-x64-msvc": "12.3.2-canary.15" }, "peerDependencies": { "fibers": ">= 3.1.0", @@ -346,9 +346,9 @@ } }, "node_modules/react": { - "version": "0.0.0-experimental-ae7ad8b4c-20220927", - "resolved": "https://registry.npmjs.org/react/-/react-0.0.0-experimental-ae7ad8b4c-20220927.tgz", - "integrity": "sha512-Fl0Cbo7/nsZpP0DXx1BmyxfG698WcWwXc3FPrRiE1QwuYQX20DSIYyLVG0dYnhgvjCeDwqa5+iB1pY7oiPsYrQ==", + "version": "0.0.0-experimental-20a257c25-20220929", + "resolved": "https://registry.npmjs.org/react/-/react-0.0.0-experimental-20a257c25-20220929.tgz", + "integrity": "sha512-Mdc2CNI0pZP62OmkCYyORCnSu+SpU2pdyfe1yO2YPf6veaPgIE7Vl1Gt0uc80EjDtB+z6M+qMzYoPlgbiC/x3g==", "dependencies": { "loose-envify": "^1.1.0" }, @@ -357,21 +357,21 @@ } }, "node_modules/react-dom": { - "version": "0.0.0-experimental-ae7ad8b4c-20220927", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-0.0.0-experimental-ae7ad8b4c-20220927.tgz", - "integrity": "sha512-sDbnAhUleyQzdQ4HJKDml3l62Rct7JcHbIVWX4hLmnFs+oskCUrMfs7eCC9UVCBWC2+huUpZCiD69x44m+l2+A==", + "version": "0.0.0-experimental-20a257c25-20220929", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-0.0.0-experimental-20a257c25-20220929.tgz", + "integrity": "sha512-VlrVZYM+V8OTKIczOXFejf5jN6UiGxM+vPZ7oJBKU2RDM3Zbs0ZgRWJVudEQt9UZD2smZT8fdGw0Nk8gPA+mhA==", "dependencies": { "loose-envify": "^1.1.0", - "scheduler": "0.0.0-experimental-ae7ad8b4c-20220927" + "scheduler": "0.0.0-experimental-20a257c25-20220929" }, "peerDependencies": { - "react": "0.0.0-experimental-ae7ad8b4c-20220927" + "react": "0.0.0-experimental-20a257c25-20220929" } }, "node_modules/scheduler": { - "version": "0.0.0-experimental-ae7ad8b4c-20220927", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.0.0-experimental-ae7ad8b4c-20220927.tgz", - "integrity": "sha512-0sMHQklwZ6WbISng47exj1LeAAZkqYVaBOjmywwyjeyWGwNpLx526/DNZVgdE5/a79FhZRQ7bhfuFdCmC5B4aQ==", + "version": "0.0.0-experimental-20a257c25-20220929", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.0.0-experimental-20a257c25-20220929.tgz", + "integrity": "sha512-OETCVxQg07uvZUkE2iHTlCYulLgOhCH7ADKrinlrFTC5yaNaVtxd/wEyZW9IKBTxX/ENTjV9Xz5SynjyX5vMZA==", "dependencies": { "loose-envify": "^1.1.0" } @@ -419,86 +419,86 @@ }, "dependencies": { "@next/env": { - "version": "12.3.2-canary.13", - "resolved": "https://registry.npmjs.org/@next/env/-/env-12.3.2-canary.13.tgz", - "integrity": "sha512-TRLZ8d5Al5ly2WcidmjCJZ2TIdLpWjGDjW5wV9NuPjgUuMC+B53NWqNVdtZIfiarh+jAIxgTU9imzzKkfhKW9g==" + "version": "12.3.2-canary.15", + "resolved": "https://registry.npmjs.org/@next/env/-/env-12.3.2-canary.15.tgz", + "integrity": "sha512-S2Km53IQvjAJeHodFSh4I6MisTaPRbaIfKReuCJFXbOrk+w7ir703G76PqOppkRbxEbWcGI3sqtURQ2EGzMa5A==" }, "@next/swc-android-arm-eabi": { - "version": "12.3.2-canary.13", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.3.2-canary.13.tgz", - "integrity": "sha512-He3VS7EhxcJZXNEJGA+vt0yUp5aVFTPiCttENXvo2U2TRa0PdaFDGf9GQbSU6AmErfB/qbigJvfMJ1gg0yQyNw==", + "version": "12.3.2-canary.15", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.3.2-canary.15.tgz", + "integrity": "sha512-T+Tj2m2EpLn6jnhBc2WbXtpgaNpqisKPOJpe8fTUMaG2Z9rJQxCTJveRsbXsbD8Oo9bwViIFk3zmbSx2nQ7/rw==", "optional": true }, "@next/swc-android-arm64": { - "version": "12.3.2-canary.13", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-12.3.2-canary.13.tgz", - "integrity": "sha512-IXp1apXYP+IorT6JKNcgh9+zTbcSVYGT2kXrUIDUUQS9cc09sqEB+mctukj4kRnoGti4s+FKfi27Ox4qdzUmLQ==", + "version": "12.3.2-canary.15", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-12.3.2-canary.15.tgz", + "integrity": "sha512-WIuGUvt+encdFB6ykOvLprAckaaMhjdPIBiivpjAoipeCq0sXOp/1lWF0x2/g+8/fqH/eippXjKfMdA97MkMuw==", "optional": true }, "@next/swc-darwin-arm64": { - "version": "12.3.2-canary.13", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.3.2-canary.13.tgz", - "integrity": "sha512-keCbkKK6Zb2wB1D87+Hu0NK7zLExqYoG6yYpueRiyHh34nvlkH2JyrXyFn7mIE7xnzqZ5wyomFzbe3rVqbp6MQ==", + "version": "12.3.2-canary.15", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.3.2-canary.15.tgz", + "integrity": "sha512-0wzzftgiMFnA/wZL5WLqrdSBMpJ//t+kk5174WlMzpV/uwUWirIZALbCrdfb14pMXE/WzmddYN1nLs78S8I21Q==", "optional": true }, "@next/swc-darwin-x64": { - "version": "12.3.2-canary.13", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.3.2-canary.13.tgz", - "integrity": "sha512-TizA7hbfHVJ1xO4rNyH3Wori4nOI1gI2dgV+c4CnMkwzcf2e6pKOvAY8eTEJGWygvQsfXlgKrfMCRMo0GsVjXQ==", + "version": "12.3.2-canary.15", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.3.2-canary.15.tgz", + "integrity": "sha512-Kr5tC7OOKasjjYV6vxIxGOHr0VBQNLRK8J7g/mg5mgzcn689bpnJPnMvc51dDxkj2KimK1/u4yJR3OFHY6ufWg==", "optional": true }, "@next/swc-freebsd-x64": { - "version": "12.3.2-canary.13", - "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.3.2-canary.13.tgz", - "integrity": "sha512-E3cEa+hWRSD+kSLq7GgfYN/jYs0e3uQhN8a9rU4cGHiRqnw+yji9q3bfUOkpGRcl47KmzAoDfYcKhfbsLHb0Ig==", + "version": "12.3.2-canary.15", + "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.3.2-canary.15.tgz", + "integrity": "sha512-X7wOCmmz10Ihw+rAYdybU5M6ATrUVvVNgoG9ITNVxFc+ATPnDsLBPZuV4e7iI/vV5xOJ2EpTBqI4j4rozNUUhQ==", "optional": true }, "@next/swc-linux-arm-gnueabihf": { - "version": "12.3.2-canary.13", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.3.2-canary.13.tgz", - "integrity": "sha512-nAuzx6ZJBE5T04/C8sdFl5sgZE4MSiDq4W2PEBK54sbO9lgdFJw5N9kz7H971aJgmEA1CEz+xg5oYdYzV/jLFw==", + "version": "12.3.2-canary.15", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.3.2-canary.15.tgz", + "integrity": "sha512-oj5oiu6NQA8K0kKi8B/wSx75rE026KiCWe1OG60SefTvumG0QQWWU8arAPvego3bi2cLQnLQ5upseXmMM/pFkA==", "optional": true }, "@next/swc-linux-arm64-gnu": { - "version": "12.3.2-canary.13", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.3.2-canary.13.tgz", - "integrity": "sha512-Xel0K86aRe7tlDqKNce5AOxhzGv5dWsok9S3Z9NvYVdWS4r0XOepQLXQDY1wShpYjsKoYSAslBZPAO8DpTi4bw==", + "version": "12.3.2-canary.15", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.3.2-canary.15.tgz", + "integrity": "sha512-fbzxvXOfhIKkocMi4+wEfxWQLSAa+JiNua0ky5huS86QoyS/b+rH6ovYpAZlYp/FL2Dll5K/GtwwVF/EfcBvaQ==", "optional": true }, "@next/swc-linux-arm64-musl": { - "version": "12.3.2-canary.13", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.3.2-canary.13.tgz", - "integrity": "sha512-KJElZjEmgMuIcL+9tdzq5XCO6KLRYV1xjT1qX2RbCTJ5Qwa9AC3IUCequFLk8WSZbGRrTA/imDSu5BYG/pK5Jg==", + "version": "12.3.2-canary.15", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.3.2-canary.15.tgz", + "integrity": "sha512-6/s+1XR4R8NRLuFraK/0jy85yWKcKjXC+KtGggM73Mo8uIBENWj2cpDXLZj8iMdo20vGAce1G3ZEEegWHU+Onw==", "optional": true }, "@next/swc-linux-x64-gnu": { - "version": "12.3.2-canary.13", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.3.2-canary.13.tgz", - "integrity": "sha512-o6wYKB7cM1ATyXHXJ5Sbv0Z1okYVBxFZCJkjk1HlS1vrGFIynyWBZm9tu87ujI0cIHjWtA5s+N3EET722zjhkQ==", + "version": "12.3.2-canary.15", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.3.2-canary.15.tgz", + "integrity": "sha512-Djpl2Q+3St0ourt0Dc2eBFsnzrEdEQCuZLnbtcIbBlecdEQHVVjVhRGNnmEVPNj3PwkV6/qdrxLqmpOSON17rA==", "optional": true }, "@next/swc-linux-x64-musl": { - "version": "12.3.2-canary.13", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.3.2-canary.13.tgz", - "integrity": "sha512-sKwYbzdBxW5Q5MqCgFJT7PmymTXpplzyzYbIKWPcAgatKpRanSEFpCE/8xYKrKWPq6OfwclklB1s9gV/si5D5w==", + "version": "12.3.2-canary.15", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.3.2-canary.15.tgz", + "integrity": "sha512-QjYq7pQOHFK8C8XpPFKJYbYs0Gp8yByIbEZPYBWkYSRnvU6ikC8E+hqdEG+yl8qmw6i3JLKkXnr6m9xbW/dyiQ==", "optional": true }, "@next/swc-win32-arm64-msvc": { - "version": "12.3.2-canary.13", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.3.2-canary.13.tgz", - "integrity": "sha512-P6vKqOnt8N19Zwz9m7425YD5DJx1+Q35BXNHaBaqJxpRICRdu/y1u+Y3Q53lsUiH9pej2XCqCAcekHie49uVJg==", + "version": "12.3.2-canary.15", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.3.2-canary.15.tgz", + "integrity": "sha512-S+T7MmDLgsYNSOcjAwaT4jJSWJxfVrNIeXo4nQvSFu2ZZ/phOLj9k/ytwqD210csNBO4WdI2jS7vh7ROMyl6Lw==", "optional": true }, "@next/swc-win32-ia32-msvc": { - "version": "12.3.2-canary.13", - "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.3.2-canary.13.tgz", - "integrity": "sha512-0mLk3ZW5nyKpWOF93LZdNSgYSoHJwlAF09zIODLSKUrtJN0HYs7cLpP+2WzsSSDR8kAJErAgP87AzpjBV3vOxg==", + "version": "12.3.2-canary.15", + "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.3.2-canary.15.tgz", + "integrity": "sha512-ormAAguhEoHdopXfuz3FnrzURdb5FMLz+qDe3qD/C3T/J5h95faqrRsD+2fn8cuODabZ6GKtWA24UpxfqaUiUA==", "optional": true }, "@next/swc-win32-x64-msvc": { - "version": "12.3.2-canary.13", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.3.2-canary.13.tgz", - "integrity": "sha512-djLdLB2FsHuxNVLekGrrQGiPR3MmSM0RXaAhpe0xqeClqDGqR0O01M6RUhMqv4KcPK0icUcc+X9P1gxWXRyhIQ==", + "version": "12.3.2-canary.15", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.3.2-canary.15.tgz", + "integrity": "sha512-oW54WmU7khYxAOWSoCV+te+RpBGAhfOsQcAq0ijUL2F9qi+YpTixTakCobYNzIxj3QsvmVikInvkNwR/Rfpzcw==", "optional": true }, "@swc/helpers": { @@ -533,24 +533,24 @@ "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==" }, "next": { - "version": "12.3.2-canary.13", - "resolved": "https://registry.npmjs.org/next/-/next-12.3.2-canary.13.tgz", - "integrity": "sha512-3nkpYO/a0mIZBCd+EImahBoeXRfq+CtaQnn/QrTmTMjsYg9oV1LRq8i1sYSiJxJ1ikHUGm9mw6jCyuazRvyrjQ==", + "version": "12.3.2-canary.15", + "resolved": "https://registry.npmjs.org/next/-/next-12.3.2-canary.15.tgz", + "integrity": "sha512-S60rVNp41ALhqKgdSe4tgcFl4u5MBQehRL9X+oPs8TMxGWazUXKQKH36LZrFkQxKnoYAx3PoTpuunnZSVCiXrw==", "requires": { - "@next/env": "12.3.2-canary.13", - "@next/swc-android-arm-eabi": "12.3.2-canary.13", - "@next/swc-android-arm64": "12.3.2-canary.13", - "@next/swc-darwin-arm64": "12.3.2-canary.13", - "@next/swc-darwin-x64": "12.3.2-canary.13", - "@next/swc-freebsd-x64": "12.3.2-canary.13", - "@next/swc-linux-arm-gnueabihf": "12.3.2-canary.13", - "@next/swc-linux-arm64-gnu": "12.3.2-canary.13", - "@next/swc-linux-arm64-musl": "12.3.2-canary.13", - "@next/swc-linux-x64-gnu": "12.3.2-canary.13", - "@next/swc-linux-x64-musl": "12.3.2-canary.13", - "@next/swc-win32-arm64-msvc": "12.3.2-canary.13", - "@next/swc-win32-ia32-msvc": "12.3.2-canary.13", - "@next/swc-win32-x64-msvc": "12.3.2-canary.13", + "@next/env": "12.3.2-canary.15", + "@next/swc-android-arm-eabi": "12.3.2-canary.15", + "@next/swc-android-arm64": "12.3.2-canary.15", + "@next/swc-darwin-arm64": "12.3.2-canary.15", + "@next/swc-darwin-x64": "12.3.2-canary.15", + "@next/swc-freebsd-x64": "12.3.2-canary.15", + "@next/swc-linux-arm-gnueabihf": "12.3.2-canary.15", + "@next/swc-linux-arm64-gnu": "12.3.2-canary.15", + "@next/swc-linux-arm64-musl": "12.3.2-canary.15", + "@next/swc-linux-x64-gnu": "12.3.2-canary.15", + "@next/swc-linux-x64-musl": "12.3.2-canary.15", + "@next/swc-win32-arm64-msvc": "12.3.2-canary.15", + "@next/swc-win32-ia32-msvc": "12.3.2-canary.15", + "@next/swc-win32-x64-msvc": "12.3.2-canary.15", "@swc/helpers": "0.4.11", "caniuse-lite": "^1.0.30001406", "postcss": "8.4.14", @@ -574,26 +574,26 @@ } }, "react": { - "version": "0.0.0-experimental-ae7ad8b4c-20220927", - "resolved": "https://registry.npmjs.org/react/-/react-0.0.0-experimental-ae7ad8b4c-20220927.tgz", - "integrity": "sha512-Fl0Cbo7/nsZpP0DXx1BmyxfG698WcWwXc3FPrRiE1QwuYQX20DSIYyLVG0dYnhgvjCeDwqa5+iB1pY7oiPsYrQ==", + "version": "0.0.0-experimental-20a257c25-20220929", + "resolved": "https://registry.npmjs.org/react/-/react-0.0.0-experimental-20a257c25-20220929.tgz", + "integrity": "sha512-Mdc2CNI0pZP62OmkCYyORCnSu+SpU2pdyfe1yO2YPf6veaPgIE7Vl1Gt0uc80EjDtB+z6M+qMzYoPlgbiC/x3g==", "requires": { "loose-envify": "^1.1.0" } }, "react-dom": { - "version": "0.0.0-experimental-ae7ad8b4c-20220927", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-0.0.0-experimental-ae7ad8b4c-20220927.tgz", - "integrity": "sha512-sDbnAhUleyQzdQ4HJKDml3l62Rct7JcHbIVWX4hLmnFs+oskCUrMfs7eCC9UVCBWC2+huUpZCiD69x44m+l2+A==", + "version": "0.0.0-experimental-20a257c25-20220929", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-0.0.0-experimental-20a257c25-20220929.tgz", + "integrity": "sha512-VlrVZYM+V8OTKIczOXFejf5jN6UiGxM+vPZ7oJBKU2RDM3Zbs0ZgRWJVudEQt9UZD2smZT8fdGw0Nk8gPA+mhA==", "requires": { "loose-envify": "^1.1.0", - "scheduler": "0.0.0-experimental-ae7ad8b4c-20220927" + "scheduler": "0.0.0-experimental-20a257c25-20220929" } }, "scheduler": { - "version": "0.0.0-experimental-ae7ad8b4c-20220927", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.0.0-experimental-ae7ad8b4c-20220927.tgz", - "integrity": "sha512-0sMHQklwZ6WbISng47exj1LeAAZkqYVaBOjmywwyjeyWGwNpLx526/DNZVgdE5/a79FhZRQ7bhfuFdCmC5B4aQ==", + "version": "0.0.0-experimental-20a257c25-20220929", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.0.0-experimental-20a257c25-20220929.tgz", + "integrity": "sha512-OETCVxQg07uvZUkE2iHTlCYulLgOhCH7ADKrinlrFTC5yaNaVtxd/wEyZW9IKBTxX/ENTjV9Xz5SynjyX5vMZA==", "requires": { "loose-envify": "^1.1.0" } diff --git a/demos/canary/package.json b/demos/canary/package.json index ae9aa57df8..1483535b48 100644 --- a/demos/canary/package.json +++ b/demos/canary/package.json @@ -9,8 +9,8 @@ "license": "MIT", "dependencies": { "nanoid": "^3.3.4", - "next": "^12.3.2-canary.13", - "react": "0.0.0-experimental-ae7ad8b4c-20220927", - "react-dom": "0.0.0-experimental-ae7ad8b4c-20220927" + "next": "^12.3.2-canary.15", + "react": "^0.0.0-experimental-20a257c25-20220929", + "react-dom": "^0.0.0-experimental-20a257c25-20220929" } } From 9ff1d95d6c4a9442350e905574e28c45cdb2bb91 Mon Sep 17 00:00:00 2001 From: Matt Kane Date: Fri, 30 Sep 2022 17:15:21 +0100 Subject: [PATCH 028/172] chore: fix 404 test --- test/e2e/canary/appdir.spec.ts | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/test/e2e/canary/appdir.spec.ts b/test/e2e/canary/appdir.spec.ts index 8cc668228e..a14813a639 100644 --- a/test/e2e/canary/appdir.spec.ts +++ b/test/e2e/canary/appdir.spec.ts @@ -1221,22 +1221,21 @@ describe('app dir', () => { }) }) - describe('404', () => { - it.skip('should trigger 404 in a server component', async () => { + describe('not-found', () => { + it.skip('should trigger not-found in a server component', async () => { const browser = await webdriver(nextUrl, '/not-found/servercomponent') - expect(await browser.waitForElementByCss('#not-found-component').text()).toBe('404!') + expect(await browser.waitForElementByCss('#not-found-component').text()).toBe('Not Found!') }) - it.skip('should trigger 404 in a client component', async () => { + it.skip('should trigger not-found in a client component', async () => { const browser = await webdriver(nextUrl, '/not-found/clientcomponent') - expect(await browser.waitForElementByCss('#not-found-component').text()).toBe('404!') + expect(await browser.waitForElementByCss('#not-found-component').text()).toBe('Not Found!') }) - - it('should trigger 404 client-side', async () => { + it('should trigger not-found client-side', async () => { const browser = await webdriver(nextUrl, '/not-found/client-side') await browser.elementByCss('button').click().waitForElementByCss('#not-found-component') - expect(await browser.elementByCss('#not-found-component').text()).toBe('404!') + expect(await browser.elementByCss('#not-found-component').text()).toBe('Not Found!') }) }) From 8397658426492e9ec91c9d818135750074c5f00e Mon Sep 17 00:00:00 2001 From: Matt Kane Date: Fri, 30 Sep 2022 17:28:25 +0100 Subject: [PATCH 029/172] chore: disable test that depends on an upstream fix --- test/e2e/canary/appdir.spec.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/e2e/canary/appdir.spec.ts b/test/e2e/canary/appdir.spec.ts index a14813a639..1d713559d5 100644 --- a/test/e2e/canary/appdir.spec.ts +++ b/test/e2e/canary/appdir.spec.ts @@ -661,8 +661,9 @@ describe('app dir', () => { expect(await browser.elementByCss('#slow-page-message').text()).toBe('hello from slow page') }) }) - - describe('middleware', () => { + // Skipping until the adapter doesn't use a global to see if it's middleware + // See todo: https://github.com/vercel/next.js/blob/canary/packages/next/server/web/adapter.ts#L49 + describe.skip('middleware', () => { it.each(['rewrite', 'redirect'])( `should strip internal query parameters from requests to middleware for %s`, async (method) => { From 2410ed7f7361fa77a66019e7439777e7bb84a8ad Mon Sep 17 00:00:00 2001 From: Matt Kane Date: Sat, 1 Oct 2022 11:28:22 +0100 Subject: [PATCH 030/172] chore: fix handling of "self" object --- packages/runtime/src/helpers/edge.ts | 15 ++++++++------- test/e2e/canary/appdir.spec.ts | 4 +--- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/packages/runtime/src/helpers/edge.ts b/packages/runtime/src/helpers/edge.ts index c7abc6918a..2ad75ad924 100644 --- a/packages/runtime/src/helpers/edge.ts +++ b/packages/runtime/src/helpers/edge.ts @@ -71,12 +71,13 @@ const sanitizeName = (name: string) => `next_${name.replace(/\W/g, '_')}` /** * Initialization added to the top of the edge function bundle */ -const bootstrap = /* js */ ` -globalThis.process = { env: {...Deno.env.toObject(), NEXT_RUNTIME: 'edge', 'NEXT_PRIVATE_MINIMAL_MODE': '1' } } -globalThis._ENTRIES ||= {} -// Deno defines "window", but naughty libraries think this means it's a browser -delete globalThis.window - +const preamble = /* js */ ` + // Deno defines "window", but naughty libraries think this means it's a browser + delete globalThis.window + globalThis.process = { env: {...Deno.env.toObject(), NEXT_RUNTIME: 'edge', 'NEXT_PRIVATE_MINIMAL_MODE': '1' } } + // Next uses "self" as a function-scoped global-like object + const self = {} + let _ENTRIES = {} ` const IMPORT_UNSUPPORTED = [ @@ -94,7 +95,7 @@ const getMiddlewareBundle = async ({ netlifyConfig: NetlifyConfig }): Promise => { const { publish } = netlifyConfig.build - const chunks: Array = [bootstrap] + const chunks: Array = [preamble] for (const file of edgeFunctionDefinition.files) { const filePath = join(publish, file) diff --git a/test/e2e/canary/appdir.spec.ts b/test/e2e/canary/appdir.spec.ts index 1d713559d5..7f6e36bff1 100644 --- a/test/e2e/canary/appdir.spec.ts +++ b/test/e2e/canary/appdir.spec.ts @@ -661,9 +661,7 @@ describe('app dir', () => { expect(await browser.elementByCss('#slow-page-message').text()).toBe('hello from slow page') }) }) - // Skipping until the adapter doesn't use a global to see if it's middleware - // See todo: https://github.com/vercel/next.js/blob/canary/packages/next/server/web/adapter.ts#L49 - describe.skip('middleware', () => { + describe('middleware', () => { it.each(['rewrite', 'redirect'])( `should strip internal query parameters from requests to middleware for %s`, async (method) => { From c35db5508f1de79fec0e68dc1bde06fd27424347 Mon Sep 17 00:00:00 2001 From: Matt Kane Date: Sat, 1 Oct 2022 16:22:35 +0100 Subject: [PATCH 031/172] chore: update packages --- demos/canary/package-lock.json | 284 ++++++++++++++++----------------- demos/canary/package.json | 6 +- test/e2e/canary/appdir.spec.ts | 4 +- 3 files changed, 147 insertions(+), 147 deletions(-) diff --git a/demos/canary/package-lock.json b/demos/canary/package-lock.json index af06b55d78..b8d93a9ee6 100644 --- a/demos/canary/package-lock.json +++ b/demos/canary/package-lock.json @@ -10,20 +10,20 @@ "license": "MIT", "dependencies": { "nanoid": "^3.3.4", - "next": "^12.3.2-canary.15", - "react": "^0.0.0-experimental-20a257c25-20220929", - "react-dom": "^0.0.0-experimental-20a257c25-20220929" + "next": "^12.3.2-canary.16", + "react": "^0.0.0-experimental-cb5084d1c-20220924", + "react-dom": "^0.0.0-experimental-cb5084d1c-20220924" } }, "node_modules/@next/env": { - "version": "12.3.2-canary.15", - "resolved": "https://registry.npmjs.org/@next/env/-/env-12.3.2-canary.15.tgz", - "integrity": "sha512-S2Km53IQvjAJeHodFSh4I6MisTaPRbaIfKReuCJFXbOrk+w7ir703G76PqOppkRbxEbWcGI3sqtURQ2EGzMa5A==" + "version": "12.3.2-canary.16", + "resolved": "https://registry.npmjs.org/@next/env/-/env-12.3.2-canary.16.tgz", + "integrity": "sha512-puD7S8eI+iIjCgt2G3zKq5Pe57fw8bKSFQEPrQXD0ZqASyGUwMKt2KfwjG8QKxKa6EGtNRGY3pCIYNnW2pz0qw==" }, "node_modules/@next/swc-android-arm-eabi": { - "version": "12.3.2-canary.15", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.3.2-canary.15.tgz", - "integrity": "sha512-T+Tj2m2EpLn6jnhBc2WbXtpgaNpqisKPOJpe8fTUMaG2Z9rJQxCTJveRsbXsbD8Oo9bwViIFk3zmbSx2nQ7/rw==", + "version": "12.3.2-canary.16", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.3.2-canary.16.tgz", + "integrity": "sha512-9Iy7H9wRykIORW4I9yh/4edSQtXLXq4p+INFVmj2D6Rgyrtb9O/NUOq33acp7szMbgGA2AzRbyc4O7nsYGqX8w==", "cpu": [ "arm" ], @@ -36,9 +36,9 @@ } }, "node_modules/@next/swc-android-arm64": { - "version": "12.3.2-canary.15", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-12.3.2-canary.15.tgz", - "integrity": "sha512-WIuGUvt+encdFB6ykOvLprAckaaMhjdPIBiivpjAoipeCq0sXOp/1lWF0x2/g+8/fqH/eippXjKfMdA97MkMuw==", + "version": "12.3.2-canary.16", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-12.3.2-canary.16.tgz", + "integrity": "sha512-xFQGTygMzFI0CWgJfjhUYU52eSn6dJBeXgZH8jJK5boeA+QoawfZvX//7H42APz/XXMizPK/GHqDfP23EUJuZA==", "cpu": [ "arm64" ], @@ -51,9 +51,9 @@ } }, "node_modules/@next/swc-darwin-arm64": { - "version": "12.3.2-canary.15", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.3.2-canary.15.tgz", - "integrity": "sha512-0wzzftgiMFnA/wZL5WLqrdSBMpJ//t+kk5174WlMzpV/uwUWirIZALbCrdfb14pMXE/WzmddYN1nLs78S8I21Q==", + "version": "12.3.2-canary.16", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.3.2-canary.16.tgz", + "integrity": "sha512-s9hJW/0lnEuxw05SqX5SM0jBqK7bd2cLtGkDxfzuY4biA3l5ICenO8ZS2WY8PpIfOd2ECm+/H+2U8tGEkInpBg==", "cpu": [ "arm64" ], @@ -66,9 +66,9 @@ } }, "node_modules/@next/swc-darwin-x64": { - "version": "12.3.2-canary.15", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.3.2-canary.15.tgz", - "integrity": "sha512-Kr5tC7OOKasjjYV6vxIxGOHr0VBQNLRK8J7g/mg5mgzcn689bpnJPnMvc51dDxkj2KimK1/u4yJR3OFHY6ufWg==", + "version": "12.3.2-canary.16", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.3.2-canary.16.tgz", + "integrity": "sha512-FkYh9QK559GloKygmNeB7WbBvCQWHVv3uvUnGeD+uq98xR+y/Ks2lo/5Wg5ksGs0+TAhB7sds5nGQAJtfo9eHQ==", "cpu": [ "x64" ], @@ -81,9 +81,9 @@ } }, "node_modules/@next/swc-freebsd-x64": { - "version": "12.3.2-canary.15", - "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.3.2-canary.15.tgz", - "integrity": "sha512-X7wOCmmz10Ihw+rAYdybU5M6ATrUVvVNgoG9ITNVxFc+ATPnDsLBPZuV4e7iI/vV5xOJ2EpTBqI4j4rozNUUhQ==", + "version": "12.3.2-canary.16", + "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.3.2-canary.16.tgz", + "integrity": "sha512-Qjz+xeMcPuIv/3s3EnMI0pGqWFaNscHx7G68Hr3LD7gUr9p0ep+89V98+bx/l6Y44nRlTX/k+fSrEX9vag6b0g==", "cpu": [ "x64" ], @@ -96,9 +96,9 @@ } }, "node_modules/@next/swc-linux-arm-gnueabihf": { - "version": "12.3.2-canary.15", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.3.2-canary.15.tgz", - "integrity": "sha512-oj5oiu6NQA8K0kKi8B/wSx75rE026KiCWe1OG60SefTvumG0QQWWU8arAPvego3bi2cLQnLQ5upseXmMM/pFkA==", + "version": "12.3.2-canary.16", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.3.2-canary.16.tgz", + "integrity": "sha512-gBBXAsX6Uj75XnqQvs5/lQeIdvFL/Lm1hZx9Osrat49KVwto1vgojoZpHP78rwkVqj+FuvZe3QhPt52IlGnYOw==", "cpu": [ "arm" ], @@ -111,9 +111,9 @@ } }, "node_modules/@next/swc-linux-arm64-gnu": { - "version": "12.3.2-canary.15", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.3.2-canary.15.tgz", - "integrity": "sha512-fbzxvXOfhIKkocMi4+wEfxWQLSAa+JiNua0ky5huS86QoyS/b+rH6ovYpAZlYp/FL2Dll5K/GtwwVF/EfcBvaQ==", + "version": "12.3.2-canary.16", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.3.2-canary.16.tgz", + "integrity": "sha512-pHGSWFGCWAwEAskMwiQ3+5hMyH5O7AXxtyYL8M1gouzFnL9xPWgI88qxg4XI4yqUJm0mokHT8vmY9Mqm83FMQQ==", "cpu": [ "arm64" ], @@ -126,9 +126,9 @@ } }, "node_modules/@next/swc-linux-arm64-musl": { - "version": "12.3.2-canary.15", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.3.2-canary.15.tgz", - "integrity": "sha512-6/s+1XR4R8NRLuFraK/0jy85yWKcKjXC+KtGggM73Mo8uIBENWj2cpDXLZj8iMdo20vGAce1G3ZEEegWHU+Onw==", + "version": "12.3.2-canary.16", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.3.2-canary.16.tgz", + "integrity": "sha512-qFrKNV8b5+81nDhJ8lp8hlIhsq10M1zkvTvlBlS4+fDAVD2856aGOPw6rT/YVaWVdbYV6q3knundo3rZE3mbUg==", "cpu": [ "arm64" ], @@ -141,9 +141,9 @@ } }, "node_modules/@next/swc-linux-x64-gnu": { - "version": "12.3.2-canary.15", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.3.2-canary.15.tgz", - "integrity": "sha512-Djpl2Q+3St0ourt0Dc2eBFsnzrEdEQCuZLnbtcIbBlecdEQHVVjVhRGNnmEVPNj3PwkV6/qdrxLqmpOSON17rA==", + "version": "12.3.2-canary.16", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.3.2-canary.16.tgz", + "integrity": "sha512-TFvVXmzFD3vnogr/Myxv9XY9Jsl2LZOu8etTGGJilrQaPUrjLtYQwyPZwuzgz2f+tzilA5+rsvAKzBYUfgjjIA==", "cpu": [ "x64" ], @@ -156,9 +156,9 @@ } }, "node_modules/@next/swc-linux-x64-musl": { - "version": "12.3.2-canary.15", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.3.2-canary.15.tgz", - "integrity": "sha512-QjYq7pQOHFK8C8XpPFKJYbYs0Gp8yByIbEZPYBWkYSRnvU6ikC8E+hqdEG+yl8qmw6i3JLKkXnr6m9xbW/dyiQ==", + "version": "12.3.2-canary.16", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.3.2-canary.16.tgz", + "integrity": "sha512-tdZ0K91VesLOeOYTdCJWhlv9oc7MjwfZnebWNjiynXc+ta+zFSrfvuk913XDcppZ6PJmVhP69abo19lT1XxepA==", "cpu": [ "x64" ], @@ -171,9 +171,9 @@ } }, "node_modules/@next/swc-win32-arm64-msvc": { - "version": "12.3.2-canary.15", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.3.2-canary.15.tgz", - "integrity": "sha512-S+T7MmDLgsYNSOcjAwaT4jJSWJxfVrNIeXo4nQvSFu2ZZ/phOLj9k/ytwqD210csNBO4WdI2jS7vh7ROMyl6Lw==", + "version": "12.3.2-canary.16", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.3.2-canary.16.tgz", + "integrity": "sha512-+bW+6Z7pVjvNCjU+uQJbHtX0ep9ahIwkBvYagTWNuY5ga75Jqs6SFCNHslnezTIPIkvpiJ2RDFY/qW/Zr3OsLA==", "cpu": [ "arm64" ], @@ -186,9 +186,9 @@ } }, "node_modules/@next/swc-win32-ia32-msvc": { - "version": "12.3.2-canary.15", - "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.3.2-canary.15.tgz", - "integrity": "sha512-ormAAguhEoHdopXfuz3FnrzURdb5FMLz+qDe3qD/C3T/J5h95faqrRsD+2fn8cuODabZ6GKtWA24UpxfqaUiUA==", + "version": "12.3.2-canary.16", + "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.3.2-canary.16.tgz", + "integrity": "sha512-a4rpyGkY94In/Ysmksuyx7smEXa2SEYyLXVsgcCHpLBMIi7iZsgtgummGF8NoyYJnZVlpARmke8DpTE1Rc+b/A==", "cpu": [ "ia32" ], @@ -201,9 +201,9 @@ } }, "node_modules/@next/swc-win32-x64-msvc": { - "version": "12.3.2-canary.15", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.3.2-canary.15.tgz", - "integrity": "sha512-oW54WmU7khYxAOWSoCV+te+RpBGAhfOsQcAq0ijUL2F9qi+YpTixTakCobYNzIxj3QsvmVikInvkNwR/Rfpzcw==", + "version": "12.3.2-canary.16", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.3.2-canary.16.tgz", + "integrity": "sha512-U9s8RxfuE7hcUtI4UOzSCxhVqh73Rw8yH7/5xg4LOIoKWZpqogxzwt0VBOnNPO1Tw41+OqHuV7uaZVj2gCE/4w==", "cpu": [ "x64" ], @@ -266,11 +266,11 @@ } }, "node_modules/next": { - "version": "12.3.2-canary.15", - "resolved": "https://registry.npmjs.org/next/-/next-12.3.2-canary.15.tgz", - "integrity": "sha512-S60rVNp41ALhqKgdSe4tgcFl4u5MBQehRL9X+oPs8TMxGWazUXKQKH36LZrFkQxKnoYAx3PoTpuunnZSVCiXrw==", + "version": "12.3.2-canary.16", + "resolved": "https://registry.npmjs.org/next/-/next-12.3.2-canary.16.tgz", + "integrity": "sha512-8acaz4W9Qa/jhIhoKEmAerWWiKR5XPjxQZXV/vRQoN6sLd3RmY2emsA2FpvFNeUTjglwRng4lYwDeeEb6xQTEQ==", "dependencies": { - "@next/env": "12.3.2-canary.15", + "@next/env": "12.3.2-canary.16", "@swc/helpers": "0.4.11", "caniuse-lite": "^1.0.30001406", "postcss": "8.4.14", @@ -284,19 +284,19 @@ "node": ">=12.22.0" }, "optionalDependencies": { - "@next/swc-android-arm-eabi": "12.3.2-canary.15", - "@next/swc-android-arm64": "12.3.2-canary.15", - "@next/swc-darwin-arm64": "12.3.2-canary.15", - "@next/swc-darwin-x64": "12.3.2-canary.15", - "@next/swc-freebsd-x64": "12.3.2-canary.15", - "@next/swc-linux-arm-gnueabihf": "12.3.2-canary.15", - "@next/swc-linux-arm64-gnu": "12.3.2-canary.15", - "@next/swc-linux-arm64-musl": "12.3.2-canary.15", - "@next/swc-linux-x64-gnu": "12.3.2-canary.15", - "@next/swc-linux-x64-musl": "12.3.2-canary.15", - "@next/swc-win32-arm64-msvc": "12.3.2-canary.15", - "@next/swc-win32-ia32-msvc": "12.3.2-canary.15", - "@next/swc-win32-x64-msvc": "12.3.2-canary.15" + "@next/swc-android-arm-eabi": "12.3.2-canary.16", + "@next/swc-android-arm64": "12.3.2-canary.16", + "@next/swc-darwin-arm64": "12.3.2-canary.16", + "@next/swc-darwin-x64": "12.3.2-canary.16", + "@next/swc-freebsd-x64": "12.3.2-canary.16", + "@next/swc-linux-arm-gnueabihf": "12.3.2-canary.16", + "@next/swc-linux-arm64-gnu": "12.3.2-canary.16", + "@next/swc-linux-arm64-musl": "12.3.2-canary.16", + "@next/swc-linux-x64-gnu": "12.3.2-canary.16", + "@next/swc-linux-x64-musl": "12.3.2-canary.16", + "@next/swc-win32-arm64-msvc": "12.3.2-canary.16", + "@next/swc-win32-ia32-msvc": "12.3.2-canary.16", + "@next/swc-win32-x64-msvc": "12.3.2-canary.16" }, "peerDependencies": { "fibers": ">= 3.1.0", @@ -346,9 +346,9 @@ } }, "node_modules/react": { - "version": "0.0.0-experimental-20a257c25-20220929", - "resolved": "https://registry.npmjs.org/react/-/react-0.0.0-experimental-20a257c25-20220929.tgz", - "integrity": "sha512-Mdc2CNI0pZP62OmkCYyORCnSu+SpU2pdyfe1yO2YPf6veaPgIE7Vl1Gt0uc80EjDtB+z6M+qMzYoPlgbiC/x3g==", + "version": "0.0.0-experimental-cb5084d1c-20220924", + "resolved": "https://registry.npmjs.org/react/-/react-0.0.0-experimental-cb5084d1c-20220924.tgz", + "integrity": "sha512-66AdfxkJrwCaCEKT0LQRd9J9GQ9T+yN7Wx9XT+tNxKycYQ0Exm+DZxOTedagWDlsFMXroyhrTWzgdC18R2PaOQ==", "dependencies": { "loose-envify": "^1.1.0" }, @@ -357,21 +357,21 @@ } }, "node_modules/react-dom": { - "version": "0.0.0-experimental-20a257c25-20220929", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-0.0.0-experimental-20a257c25-20220929.tgz", - "integrity": "sha512-VlrVZYM+V8OTKIczOXFejf5jN6UiGxM+vPZ7oJBKU2RDM3Zbs0ZgRWJVudEQt9UZD2smZT8fdGw0Nk8gPA+mhA==", + "version": "0.0.0-experimental-cb5084d1c-20220924", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-0.0.0-experimental-cb5084d1c-20220924.tgz", + "integrity": "sha512-0IHzPGHESn3uu8nI1w5596GX8bCGCE94DpaHkKSGWOlB6uhoVecU0fyOCkkNuB4cMc9WeOWiH2gsM100EWZDPQ==", "dependencies": { "loose-envify": "^1.1.0", - "scheduler": "0.0.0-experimental-20a257c25-20220929" + "scheduler": "0.0.0-experimental-cb5084d1c-20220924" }, "peerDependencies": { - "react": "0.0.0-experimental-20a257c25-20220929" + "react": "0.0.0-experimental-cb5084d1c-20220924" } }, "node_modules/scheduler": { - "version": "0.0.0-experimental-20a257c25-20220929", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.0.0-experimental-20a257c25-20220929.tgz", - "integrity": "sha512-OETCVxQg07uvZUkE2iHTlCYulLgOhCH7ADKrinlrFTC5yaNaVtxd/wEyZW9IKBTxX/ENTjV9Xz5SynjyX5vMZA==", + "version": "0.0.0-experimental-cb5084d1c-20220924", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.0.0-experimental-cb5084d1c-20220924.tgz", + "integrity": "sha512-SeszKCdhM5OHxNMStjpKIAaloARUMZqIpDZjkZeGuRsyr7YlAqvlsCXyee4ZQOOU1pbr7BIvQntKy5Hil+DQJA==", "dependencies": { "loose-envify": "^1.1.0" } @@ -419,86 +419,86 @@ }, "dependencies": { "@next/env": { - "version": "12.3.2-canary.15", - "resolved": "https://registry.npmjs.org/@next/env/-/env-12.3.2-canary.15.tgz", - "integrity": "sha512-S2Km53IQvjAJeHodFSh4I6MisTaPRbaIfKReuCJFXbOrk+w7ir703G76PqOppkRbxEbWcGI3sqtURQ2EGzMa5A==" + "version": "12.3.2-canary.16", + "resolved": "https://registry.npmjs.org/@next/env/-/env-12.3.2-canary.16.tgz", + "integrity": "sha512-puD7S8eI+iIjCgt2G3zKq5Pe57fw8bKSFQEPrQXD0ZqASyGUwMKt2KfwjG8QKxKa6EGtNRGY3pCIYNnW2pz0qw==" }, "@next/swc-android-arm-eabi": { - "version": "12.3.2-canary.15", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.3.2-canary.15.tgz", - "integrity": "sha512-T+Tj2m2EpLn6jnhBc2WbXtpgaNpqisKPOJpe8fTUMaG2Z9rJQxCTJveRsbXsbD8Oo9bwViIFk3zmbSx2nQ7/rw==", + "version": "12.3.2-canary.16", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.3.2-canary.16.tgz", + "integrity": "sha512-9Iy7H9wRykIORW4I9yh/4edSQtXLXq4p+INFVmj2D6Rgyrtb9O/NUOq33acp7szMbgGA2AzRbyc4O7nsYGqX8w==", "optional": true }, "@next/swc-android-arm64": { - "version": "12.3.2-canary.15", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-12.3.2-canary.15.tgz", - "integrity": "sha512-WIuGUvt+encdFB6ykOvLprAckaaMhjdPIBiivpjAoipeCq0sXOp/1lWF0x2/g+8/fqH/eippXjKfMdA97MkMuw==", + "version": "12.3.2-canary.16", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-12.3.2-canary.16.tgz", + "integrity": "sha512-xFQGTygMzFI0CWgJfjhUYU52eSn6dJBeXgZH8jJK5boeA+QoawfZvX//7H42APz/XXMizPK/GHqDfP23EUJuZA==", "optional": true }, "@next/swc-darwin-arm64": { - "version": "12.3.2-canary.15", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.3.2-canary.15.tgz", - "integrity": "sha512-0wzzftgiMFnA/wZL5WLqrdSBMpJ//t+kk5174WlMzpV/uwUWirIZALbCrdfb14pMXE/WzmddYN1nLs78S8I21Q==", + "version": "12.3.2-canary.16", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.3.2-canary.16.tgz", + "integrity": "sha512-s9hJW/0lnEuxw05SqX5SM0jBqK7bd2cLtGkDxfzuY4biA3l5ICenO8ZS2WY8PpIfOd2ECm+/H+2U8tGEkInpBg==", "optional": true }, "@next/swc-darwin-x64": { - "version": "12.3.2-canary.15", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.3.2-canary.15.tgz", - "integrity": "sha512-Kr5tC7OOKasjjYV6vxIxGOHr0VBQNLRK8J7g/mg5mgzcn689bpnJPnMvc51dDxkj2KimK1/u4yJR3OFHY6ufWg==", + "version": "12.3.2-canary.16", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.3.2-canary.16.tgz", + "integrity": "sha512-FkYh9QK559GloKygmNeB7WbBvCQWHVv3uvUnGeD+uq98xR+y/Ks2lo/5Wg5ksGs0+TAhB7sds5nGQAJtfo9eHQ==", "optional": true }, "@next/swc-freebsd-x64": { - "version": "12.3.2-canary.15", - "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.3.2-canary.15.tgz", - "integrity": "sha512-X7wOCmmz10Ihw+rAYdybU5M6ATrUVvVNgoG9ITNVxFc+ATPnDsLBPZuV4e7iI/vV5xOJ2EpTBqI4j4rozNUUhQ==", + "version": "12.3.2-canary.16", + "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.3.2-canary.16.tgz", + "integrity": "sha512-Qjz+xeMcPuIv/3s3EnMI0pGqWFaNscHx7G68Hr3LD7gUr9p0ep+89V98+bx/l6Y44nRlTX/k+fSrEX9vag6b0g==", "optional": true }, "@next/swc-linux-arm-gnueabihf": { - "version": "12.3.2-canary.15", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.3.2-canary.15.tgz", - "integrity": "sha512-oj5oiu6NQA8K0kKi8B/wSx75rE026KiCWe1OG60SefTvumG0QQWWU8arAPvego3bi2cLQnLQ5upseXmMM/pFkA==", + "version": "12.3.2-canary.16", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.3.2-canary.16.tgz", + "integrity": "sha512-gBBXAsX6Uj75XnqQvs5/lQeIdvFL/Lm1hZx9Osrat49KVwto1vgojoZpHP78rwkVqj+FuvZe3QhPt52IlGnYOw==", "optional": true }, "@next/swc-linux-arm64-gnu": { - "version": "12.3.2-canary.15", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.3.2-canary.15.tgz", - "integrity": "sha512-fbzxvXOfhIKkocMi4+wEfxWQLSAa+JiNua0ky5huS86QoyS/b+rH6ovYpAZlYp/FL2Dll5K/GtwwVF/EfcBvaQ==", + "version": "12.3.2-canary.16", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.3.2-canary.16.tgz", + "integrity": "sha512-pHGSWFGCWAwEAskMwiQ3+5hMyH5O7AXxtyYL8M1gouzFnL9xPWgI88qxg4XI4yqUJm0mokHT8vmY9Mqm83FMQQ==", "optional": true }, "@next/swc-linux-arm64-musl": { - "version": "12.3.2-canary.15", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.3.2-canary.15.tgz", - "integrity": "sha512-6/s+1XR4R8NRLuFraK/0jy85yWKcKjXC+KtGggM73Mo8uIBENWj2cpDXLZj8iMdo20vGAce1G3ZEEegWHU+Onw==", + "version": "12.3.2-canary.16", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.3.2-canary.16.tgz", + "integrity": "sha512-qFrKNV8b5+81nDhJ8lp8hlIhsq10M1zkvTvlBlS4+fDAVD2856aGOPw6rT/YVaWVdbYV6q3knundo3rZE3mbUg==", "optional": true }, "@next/swc-linux-x64-gnu": { - "version": "12.3.2-canary.15", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.3.2-canary.15.tgz", - "integrity": "sha512-Djpl2Q+3St0ourt0Dc2eBFsnzrEdEQCuZLnbtcIbBlecdEQHVVjVhRGNnmEVPNj3PwkV6/qdrxLqmpOSON17rA==", + "version": "12.3.2-canary.16", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.3.2-canary.16.tgz", + "integrity": "sha512-TFvVXmzFD3vnogr/Myxv9XY9Jsl2LZOu8etTGGJilrQaPUrjLtYQwyPZwuzgz2f+tzilA5+rsvAKzBYUfgjjIA==", "optional": true }, "@next/swc-linux-x64-musl": { - "version": "12.3.2-canary.15", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.3.2-canary.15.tgz", - "integrity": "sha512-QjYq7pQOHFK8C8XpPFKJYbYs0Gp8yByIbEZPYBWkYSRnvU6ikC8E+hqdEG+yl8qmw6i3JLKkXnr6m9xbW/dyiQ==", + "version": "12.3.2-canary.16", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.3.2-canary.16.tgz", + "integrity": "sha512-tdZ0K91VesLOeOYTdCJWhlv9oc7MjwfZnebWNjiynXc+ta+zFSrfvuk913XDcppZ6PJmVhP69abo19lT1XxepA==", "optional": true }, "@next/swc-win32-arm64-msvc": { - "version": "12.3.2-canary.15", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.3.2-canary.15.tgz", - "integrity": "sha512-S+T7MmDLgsYNSOcjAwaT4jJSWJxfVrNIeXo4nQvSFu2ZZ/phOLj9k/ytwqD210csNBO4WdI2jS7vh7ROMyl6Lw==", + "version": "12.3.2-canary.16", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.3.2-canary.16.tgz", + "integrity": "sha512-+bW+6Z7pVjvNCjU+uQJbHtX0ep9ahIwkBvYagTWNuY5ga75Jqs6SFCNHslnezTIPIkvpiJ2RDFY/qW/Zr3OsLA==", "optional": true }, "@next/swc-win32-ia32-msvc": { - "version": "12.3.2-canary.15", - "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.3.2-canary.15.tgz", - "integrity": "sha512-ormAAguhEoHdopXfuz3FnrzURdb5FMLz+qDe3qD/C3T/J5h95faqrRsD+2fn8cuODabZ6GKtWA24UpxfqaUiUA==", + "version": "12.3.2-canary.16", + "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.3.2-canary.16.tgz", + "integrity": "sha512-a4rpyGkY94In/Ysmksuyx7smEXa2SEYyLXVsgcCHpLBMIi7iZsgtgummGF8NoyYJnZVlpARmke8DpTE1Rc+b/A==", "optional": true }, "@next/swc-win32-x64-msvc": { - "version": "12.3.2-canary.15", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.3.2-canary.15.tgz", - "integrity": "sha512-oW54WmU7khYxAOWSoCV+te+RpBGAhfOsQcAq0ijUL2F9qi+YpTixTakCobYNzIxj3QsvmVikInvkNwR/Rfpzcw==", + "version": "12.3.2-canary.16", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.3.2-canary.16.tgz", + "integrity": "sha512-U9s8RxfuE7hcUtI4UOzSCxhVqh73Rw8yH7/5xg4LOIoKWZpqogxzwt0VBOnNPO1Tw41+OqHuV7uaZVj2gCE/4w==", "optional": true }, "@swc/helpers": { @@ -533,24 +533,24 @@ "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==" }, "next": { - "version": "12.3.2-canary.15", - "resolved": "https://registry.npmjs.org/next/-/next-12.3.2-canary.15.tgz", - "integrity": "sha512-S60rVNp41ALhqKgdSe4tgcFl4u5MBQehRL9X+oPs8TMxGWazUXKQKH36LZrFkQxKnoYAx3PoTpuunnZSVCiXrw==", + "version": "12.3.2-canary.16", + "resolved": "https://registry.npmjs.org/next/-/next-12.3.2-canary.16.tgz", + "integrity": "sha512-8acaz4W9Qa/jhIhoKEmAerWWiKR5XPjxQZXV/vRQoN6sLd3RmY2emsA2FpvFNeUTjglwRng4lYwDeeEb6xQTEQ==", "requires": { - "@next/env": "12.3.2-canary.15", - "@next/swc-android-arm-eabi": "12.3.2-canary.15", - "@next/swc-android-arm64": "12.3.2-canary.15", - "@next/swc-darwin-arm64": "12.3.2-canary.15", - "@next/swc-darwin-x64": "12.3.2-canary.15", - "@next/swc-freebsd-x64": "12.3.2-canary.15", - "@next/swc-linux-arm-gnueabihf": "12.3.2-canary.15", - "@next/swc-linux-arm64-gnu": "12.3.2-canary.15", - "@next/swc-linux-arm64-musl": "12.3.2-canary.15", - "@next/swc-linux-x64-gnu": "12.3.2-canary.15", - "@next/swc-linux-x64-musl": "12.3.2-canary.15", - "@next/swc-win32-arm64-msvc": "12.3.2-canary.15", - "@next/swc-win32-ia32-msvc": "12.3.2-canary.15", - "@next/swc-win32-x64-msvc": "12.3.2-canary.15", + "@next/env": "12.3.2-canary.16", + "@next/swc-android-arm-eabi": "12.3.2-canary.16", + "@next/swc-android-arm64": "12.3.2-canary.16", + "@next/swc-darwin-arm64": "12.3.2-canary.16", + "@next/swc-darwin-x64": "12.3.2-canary.16", + "@next/swc-freebsd-x64": "12.3.2-canary.16", + "@next/swc-linux-arm-gnueabihf": "12.3.2-canary.16", + "@next/swc-linux-arm64-gnu": "12.3.2-canary.16", + "@next/swc-linux-arm64-musl": "12.3.2-canary.16", + "@next/swc-linux-x64-gnu": "12.3.2-canary.16", + "@next/swc-linux-x64-musl": "12.3.2-canary.16", + "@next/swc-win32-arm64-msvc": "12.3.2-canary.16", + "@next/swc-win32-ia32-msvc": "12.3.2-canary.16", + "@next/swc-win32-x64-msvc": "12.3.2-canary.16", "@swc/helpers": "0.4.11", "caniuse-lite": "^1.0.30001406", "postcss": "8.4.14", @@ -574,26 +574,26 @@ } }, "react": { - "version": "0.0.0-experimental-20a257c25-20220929", - "resolved": "https://registry.npmjs.org/react/-/react-0.0.0-experimental-20a257c25-20220929.tgz", - "integrity": "sha512-Mdc2CNI0pZP62OmkCYyORCnSu+SpU2pdyfe1yO2YPf6veaPgIE7Vl1Gt0uc80EjDtB+z6M+qMzYoPlgbiC/x3g==", + "version": "0.0.0-experimental-cb5084d1c-20220924", + "resolved": "https://registry.npmjs.org/react/-/react-0.0.0-experimental-cb5084d1c-20220924.tgz", + "integrity": "sha512-66AdfxkJrwCaCEKT0LQRd9J9GQ9T+yN7Wx9XT+tNxKycYQ0Exm+DZxOTedagWDlsFMXroyhrTWzgdC18R2PaOQ==", "requires": { "loose-envify": "^1.1.0" } }, "react-dom": { - "version": "0.0.0-experimental-20a257c25-20220929", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-0.0.0-experimental-20a257c25-20220929.tgz", - "integrity": "sha512-VlrVZYM+V8OTKIczOXFejf5jN6UiGxM+vPZ7oJBKU2RDM3Zbs0ZgRWJVudEQt9UZD2smZT8fdGw0Nk8gPA+mhA==", + "version": "0.0.0-experimental-cb5084d1c-20220924", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-0.0.0-experimental-cb5084d1c-20220924.tgz", + "integrity": "sha512-0IHzPGHESn3uu8nI1w5596GX8bCGCE94DpaHkKSGWOlB6uhoVecU0fyOCkkNuB4cMc9WeOWiH2gsM100EWZDPQ==", "requires": { "loose-envify": "^1.1.0", - "scheduler": "0.0.0-experimental-20a257c25-20220929" + "scheduler": "0.0.0-experimental-cb5084d1c-20220924" } }, "scheduler": { - "version": "0.0.0-experimental-20a257c25-20220929", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.0.0-experimental-20a257c25-20220929.tgz", - "integrity": "sha512-OETCVxQg07uvZUkE2iHTlCYulLgOhCH7ADKrinlrFTC5yaNaVtxd/wEyZW9IKBTxX/ENTjV9Xz5SynjyX5vMZA==", + "version": "0.0.0-experimental-cb5084d1c-20220924", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.0.0-experimental-cb5084d1c-20220924.tgz", + "integrity": "sha512-SeszKCdhM5OHxNMStjpKIAaloARUMZqIpDZjkZeGuRsyr7YlAqvlsCXyee4ZQOOU1pbr7BIvQntKy5Hil+DQJA==", "requires": { "loose-envify": "^1.1.0" } diff --git a/demos/canary/package.json b/demos/canary/package.json index 1483535b48..da78934527 100644 --- a/demos/canary/package.json +++ b/demos/canary/package.json @@ -9,8 +9,8 @@ "license": "MIT", "dependencies": { "nanoid": "^3.3.4", - "next": "^12.3.2-canary.15", - "react": "^0.0.0-experimental-20a257c25-20220929", - "react-dom": "^0.0.0-experimental-20a257c25-20220929" + "next": "^12.3.2-canary.16", + "react": "^0.0.0-experimental-cb5084d1c-20220924", + "react-dom": "^0.0.0-experimental-cb5084d1c-20220924" } } diff --git a/test/e2e/canary/appdir.spec.ts b/test/e2e/canary/appdir.spec.ts index 7f6e36bff1..a2078aee2e 100644 --- a/test/e2e/canary/appdir.spec.ts +++ b/test/e2e/canary/appdir.spec.ts @@ -112,8 +112,8 @@ describe('app dir', () => { // Should render the page text expect($('p').text()).toBe('hello from app/dashboard/rootonly/hello') }) - - it('should use new root layout when provided', async () => { + // TODO Disabling because this also fails upstream + it.skip('should use new root layout when provided', async () => { const html = await renderViaHTTP(nextUrl, '/dashboard/another') const $ = load(html) From 622e7ebab3b2e11f0f5326b4742f7b63bbb16bb0 Mon Sep 17 00:00:00 2001 From: Matt Kane Date: Mon, 3 Oct 2022 10:23:05 +0100 Subject: [PATCH 032/172] chore: update canary --- demos/canary/package-lock.json | 238 ++++++++++++++++----------------- demos/canary/package.json | 2 +- 2 files changed, 120 insertions(+), 120 deletions(-) diff --git a/demos/canary/package-lock.json b/demos/canary/package-lock.json index b8d93a9ee6..8438507b0e 100644 --- a/demos/canary/package-lock.json +++ b/demos/canary/package-lock.json @@ -10,20 +10,20 @@ "license": "MIT", "dependencies": { "nanoid": "^3.3.4", - "next": "^12.3.2-canary.16", + "next": "^12.3.2-canary.17", "react": "^0.0.0-experimental-cb5084d1c-20220924", "react-dom": "^0.0.0-experimental-cb5084d1c-20220924" } }, "node_modules/@next/env": { - "version": "12.3.2-canary.16", - "resolved": "https://registry.npmjs.org/@next/env/-/env-12.3.2-canary.16.tgz", - "integrity": "sha512-puD7S8eI+iIjCgt2G3zKq5Pe57fw8bKSFQEPrQXD0ZqASyGUwMKt2KfwjG8QKxKa6EGtNRGY3pCIYNnW2pz0qw==" + "version": "12.3.2-canary.17", + "resolved": "https://registry.npmjs.org/@next/env/-/env-12.3.2-canary.17.tgz", + "integrity": "sha512-EXo+OkgCXrHm0bf+XLQbu5sBAElal7XG3/+NFrtK9EbEIPqflIkg1cQdZUdHelvSEWajXJG5/WWX8MmnjKk1Vw==" }, "node_modules/@next/swc-android-arm-eabi": { - "version": "12.3.2-canary.16", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.3.2-canary.16.tgz", - "integrity": "sha512-9Iy7H9wRykIORW4I9yh/4edSQtXLXq4p+INFVmj2D6Rgyrtb9O/NUOq33acp7szMbgGA2AzRbyc4O7nsYGqX8w==", + "version": "12.3.2-canary.17", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.3.2-canary.17.tgz", + "integrity": "sha512-QeJOO1pC3sZxBWjdF9zBLqyCw9y/9Y1f/L4BuOl36t1ppm8fkViKAOBgYxDef8x1R21pgixGHm9Qp7jmD25hsw==", "cpu": [ "arm" ], @@ -36,9 +36,9 @@ } }, "node_modules/@next/swc-android-arm64": { - "version": "12.3.2-canary.16", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-12.3.2-canary.16.tgz", - "integrity": "sha512-xFQGTygMzFI0CWgJfjhUYU52eSn6dJBeXgZH8jJK5boeA+QoawfZvX//7H42APz/XXMizPK/GHqDfP23EUJuZA==", + "version": "12.3.2-canary.17", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-12.3.2-canary.17.tgz", + "integrity": "sha512-1usBEiiuyB38n0upHTEypLjOnQW1PWGSCiRNGobySUxRVi/AXMQO5L1xbjO3STRo7H8Uklh3iheG8mRBftkYIA==", "cpu": [ "arm64" ], @@ -51,9 +51,9 @@ } }, "node_modules/@next/swc-darwin-arm64": { - "version": "12.3.2-canary.16", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.3.2-canary.16.tgz", - "integrity": "sha512-s9hJW/0lnEuxw05SqX5SM0jBqK7bd2cLtGkDxfzuY4biA3l5ICenO8ZS2WY8PpIfOd2ECm+/H+2U8tGEkInpBg==", + "version": "12.3.2-canary.17", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.3.2-canary.17.tgz", + "integrity": "sha512-Zxqnpc5SQmnBsJ4c3AJhPsPYBWl5yXoe89F92lQMBD7OQB34Rhw8ahugHQWykJiGoSJIOrYZ+v6FEiddsTTQnw==", "cpu": [ "arm64" ], @@ -66,9 +66,9 @@ } }, "node_modules/@next/swc-darwin-x64": { - "version": "12.3.2-canary.16", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.3.2-canary.16.tgz", - "integrity": "sha512-FkYh9QK559GloKygmNeB7WbBvCQWHVv3uvUnGeD+uq98xR+y/Ks2lo/5Wg5ksGs0+TAhB7sds5nGQAJtfo9eHQ==", + "version": "12.3.2-canary.17", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.3.2-canary.17.tgz", + "integrity": "sha512-VcqS1r+es5d42EjQrm7/JIx1LWZYgWJwqL6mLZtBbnicT43Yqi7KqGTOzVIqznUeRBjsSnNL43iJJhCL1cPqwQ==", "cpu": [ "x64" ], @@ -81,9 +81,9 @@ } }, "node_modules/@next/swc-freebsd-x64": { - "version": "12.3.2-canary.16", - "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.3.2-canary.16.tgz", - "integrity": "sha512-Qjz+xeMcPuIv/3s3EnMI0pGqWFaNscHx7G68Hr3LD7gUr9p0ep+89V98+bx/l6Y44nRlTX/k+fSrEX9vag6b0g==", + "version": "12.3.2-canary.17", + "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.3.2-canary.17.tgz", + "integrity": "sha512-eTbFU5X/ToDCuFXt/vSXizgXUWD/lUojHe1g2IzJz0+E+/npPIytuUOAa6IIND4zoykAujOE0k/UglixE4BDNA==", "cpu": [ "x64" ], @@ -96,9 +96,9 @@ } }, "node_modules/@next/swc-linux-arm-gnueabihf": { - "version": "12.3.2-canary.16", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.3.2-canary.16.tgz", - "integrity": "sha512-gBBXAsX6Uj75XnqQvs5/lQeIdvFL/Lm1hZx9Osrat49KVwto1vgojoZpHP78rwkVqj+FuvZe3QhPt52IlGnYOw==", + "version": "12.3.2-canary.17", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.3.2-canary.17.tgz", + "integrity": "sha512-5DZSV8jjtnptSM1PjKJzqwG9ZNWqPCzv+VXnYffMpNki2wR9QpP+QAGVNf3Vd/BXHWg8hZkbatyO06pVFOf7rQ==", "cpu": [ "arm" ], @@ -111,9 +111,9 @@ } }, "node_modules/@next/swc-linux-arm64-gnu": { - "version": "12.3.2-canary.16", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.3.2-canary.16.tgz", - "integrity": "sha512-pHGSWFGCWAwEAskMwiQ3+5hMyH5O7AXxtyYL8M1gouzFnL9xPWgI88qxg4XI4yqUJm0mokHT8vmY9Mqm83FMQQ==", + "version": "12.3.2-canary.17", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.3.2-canary.17.tgz", + "integrity": "sha512-oXez7wsXETgiKzCrsOZi6u2Ur6FR5Ts3wYGMm1smGZ99XFAq5AMoSQqgl8HpnKeR/PboiCjuGI4KhNSAYgUD5Q==", "cpu": [ "arm64" ], @@ -126,9 +126,9 @@ } }, "node_modules/@next/swc-linux-arm64-musl": { - "version": "12.3.2-canary.16", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.3.2-canary.16.tgz", - "integrity": "sha512-qFrKNV8b5+81nDhJ8lp8hlIhsq10M1zkvTvlBlS4+fDAVD2856aGOPw6rT/YVaWVdbYV6q3knundo3rZE3mbUg==", + "version": "12.3.2-canary.17", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.3.2-canary.17.tgz", + "integrity": "sha512-BEfTE2Ni0FPb7vsZ0+Ti9Q/nj9ghuH54hPFAKCU1U6MrVVKqIEVK+p6oQKvCw8LTArwNTmGLfYozlgLojzZoPA==", "cpu": [ "arm64" ], @@ -141,9 +141,9 @@ } }, "node_modules/@next/swc-linux-x64-gnu": { - "version": "12.3.2-canary.16", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.3.2-canary.16.tgz", - "integrity": "sha512-TFvVXmzFD3vnogr/Myxv9XY9Jsl2LZOu8etTGGJilrQaPUrjLtYQwyPZwuzgz2f+tzilA5+rsvAKzBYUfgjjIA==", + "version": "12.3.2-canary.17", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.3.2-canary.17.tgz", + "integrity": "sha512-deC/gnNDYiDKtV6skwqKWRf3+Ok++gIxGoUsXxvTYWX1PeV7twYC9u6VP5TAF57fyAlDTkzlMxS1iZbpK6CQVQ==", "cpu": [ "x64" ], @@ -156,9 +156,9 @@ } }, "node_modules/@next/swc-linux-x64-musl": { - "version": "12.3.2-canary.16", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.3.2-canary.16.tgz", - "integrity": "sha512-tdZ0K91VesLOeOYTdCJWhlv9oc7MjwfZnebWNjiynXc+ta+zFSrfvuk913XDcppZ6PJmVhP69abo19lT1XxepA==", + "version": "12.3.2-canary.17", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.3.2-canary.17.tgz", + "integrity": "sha512-GknEVtX7Xu/ShRfoqtZCmKk06BOrBJsNC2f8f0FHMhMJ0FwIWx3GV0JRQyXUyFhB+yXI1OWjDGNCBVWHtd2+Vw==", "cpu": [ "x64" ], @@ -171,9 +171,9 @@ } }, "node_modules/@next/swc-win32-arm64-msvc": { - "version": "12.3.2-canary.16", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.3.2-canary.16.tgz", - "integrity": "sha512-+bW+6Z7pVjvNCjU+uQJbHtX0ep9ahIwkBvYagTWNuY5ga75Jqs6SFCNHslnezTIPIkvpiJ2RDFY/qW/Zr3OsLA==", + "version": "12.3.2-canary.17", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.3.2-canary.17.tgz", + "integrity": "sha512-GwQCiAh4gnvxZwBq96RywqTueULthdBBcNM2SW83ONEg/9hAEKYbSJPQOLKhidwL10Nha+Mpz2gnJ3iFu3rtOQ==", "cpu": [ "arm64" ], @@ -186,9 +186,9 @@ } }, "node_modules/@next/swc-win32-ia32-msvc": { - "version": "12.3.2-canary.16", - "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.3.2-canary.16.tgz", - "integrity": "sha512-a4rpyGkY94In/Ysmksuyx7smEXa2SEYyLXVsgcCHpLBMIi7iZsgtgummGF8NoyYJnZVlpARmke8DpTE1Rc+b/A==", + "version": "12.3.2-canary.17", + "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.3.2-canary.17.tgz", + "integrity": "sha512-j3RiaO7MN6phgh6XbTJhP/g1FSzvxf70QDYPjPHCVKMKxuJXDkFcuKHmhgRU1YX3eEmc71jDlzL0J/QYlCbUlw==", "cpu": [ "ia32" ], @@ -201,9 +201,9 @@ } }, "node_modules/@next/swc-win32-x64-msvc": { - "version": "12.3.2-canary.16", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.3.2-canary.16.tgz", - "integrity": "sha512-U9s8RxfuE7hcUtI4UOzSCxhVqh73Rw8yH7/5xg4LOIoKWZpqogxzwt0VBOnNPO1Tw41+OqHuV7uaZVj2gCE/4w==", + "version": "12.3.2-canary.17", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.3.2-canary.17.tgz", + "integrity": "sha512-ePn9BMvWcgC39oaXV6r8FrfQJwB5wQBIVJlllyGuE4FYmsYRO1X9tnOJKVSVQE9JwLVXrrvKdr8dOTcLv3AAEQ==", "cpu": [ "x64" ], @@ -266,11 +266,11 @@ } }, "node_modules/next": { - "version": "12.3.2-canary.16", - "resolved": "https://registry.npmjs.org/next/-/next-12.3.2-canary.16.tgz", - "integrity": "sha512-8acaz4W9Qa/jhIhoKEmAerWWiKR5XPjxQZXV/vRQoN6sLd3RmY2emsA2FpvFNeUTjglwRng4lYwDeeEb6xQTEQ==", + "version": "12.3.2-canary.17", + "resolved": "https://registry.npmjs.org/next/-/next-12.3.2-canary.17.tgz", + "integrity": "sha512-K+3kK2zFbwYwfV8a1PLKHD7IC5AWzCF6HwryXvksWWl85aKlmR00DcfCNhiT1gAaqdg9GACPNDU6TX+nFFQwGg==", "dependencies": { - "@next/env": "12.3.2-canary.16", + "@next/env": "12.3.2-canary.17", "@swc/helpers": "0.4.11", "caniuse-lite": "^1.0.30001406", "postcss": "8.4.14", @@ -284,19 +284,19 @@ "node": ">=12.22.0" }, "optionalDependencies": { - "@next/swc-android-arm-eabi": "12.3.2-canary.16", - "@next/swc-android-arm64": "12.3.2-canary.16", - "@next/swc-darwin-arm64": "12.3.2-canary.16", - "@next/swc-darwin-x64": "12.3.2-canary.16", - "@next/swc-freebsd-x64": "12.3.2-canary.16", - "@next/swc-linux-arm-gnueabihf": "12.3.2-canary.16", - "@next/swc-linux-arm64-gnu": "12.3.2-canary.16", - "@next/swc-linux-arm64-musl": "12.3.2-canary.16", - "@next/swc-linux-x64-gnu": "12.3.2-canary.16", - "@next/swc-linux-x64-musl": "12.3.2-canary.16", - "@next/swc-win32-arm64-msvc": "12.3.2-canary.16", - "@next/swc-win32-ia32-msvc": "12.3.2-canary.16", - "@next/swc-win32-x64-msvc": "12.3.2-canary.16" + "@next/swc-android-arm-eabi": "12.3.2-canary.17", + "@next/swc-android-arm64": "12.3.2-canary.17", + "@next/swc-darwin-arm64": "12.3.2-canary.17", + "@next/swc-darwin-x64": "12.3.2-canary.17", + "@next/swc-freebsd-x64": "12.3.2-canary.17", + "@next/swc-linux-arm-gnueabihf": "12.3.2-canary.17", + "@next/swc-linux-arm64-gnu": "12.3.2-canary.17", + "@next/swc-linux-arm64-musl": "12.3.2-canary.17", + "@next/swc-linux-x64-gnu": "12.3.2-canary.17", + "@next/swc-linux-x64-musl": "12.3.2-canary.17", + "@next/swc-win32-arm64-msvc": "12.3.2-canary.17", + "@next/swc-win32-ia32-msvc": "12.3.2-canary.17", + "@next/swc-win32-x64-msvc": "12.3.2-canary.17" }, "peerDependencies": { "fibers": ">= 3.1.0", @@ -419,86 +419,86 @@ }, "dependencies": { "@next/env": { - "version": "12.3.2-canary.16", - "resolved": "https://registry.npmjs.org/@next/env/-/env-12.3.2-canary.16.tgz", - "integrity": "sha512-puD7S8eI+iIjCgt2G3zKq5Pe57fw8bKSFQEPrQXD0ZqASyGUwMKt2KfwjG8QKxKa6EGtNRGY3pCIYNnW2pz0qw==" + "version": "12.3.2-canary.17", + "resolved": "https://registry.npmjs.org/@next/env/-/env-12.3.2-canary.17.tgz", + "integrity": "sha512-EXo+OkgCXrHm0bf+XLQbu5sBAElal7XG3/+NFrtK9EbEIPqflIkg1cQdZUdHelvSEWajXJG5/WWX8MmnjKk1Vw==" }, "@next/swc-android-arm-eabi": { - "version": "12.3.2-canary.16", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.3.2-canary.16.tgz", - "integrity": "sha512-9Iy7H9wRykIORW4I9yh/4edSQtXLXq4p+INFVmj2D6Rgyrtb9O/NUOq33acp7szMbgGA2AzRbyc4O7nsYGqX8w==", + "version": "12.3.2-canary.17", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.3.2-canary.17.tgz", + "integrity": "sha512-QeJOO1pC3sZxBWjdF9zBLqyCw9y/9Y1f/L4BuOl36t1ppm8fkViKAOBgYxDef8x1R21pgixGHm9Qp7jmD25hsw==", "optional": true }, "@next/swc-android-arm64": { - "version": "12.3.2-canary.16", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-12.3.2-canary.16.tgz", - "integrity": "sha512-xFQGTygMzFI0CWgJfjhUYU52eSn6dJBeXgZH8jJK5boeA+QoawfZvX//7H42APz/XXMizPK/GHqDfP23EUJuZA==", + "version": "12.3.2-canary.17", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-12.3.2-canary.17.tgz", + "integrity": "sha512-1usBEiiuyB38n0upHTEypLjOnQW1PWGSCiRNGobySUxRVi/AXMQO5L1xbjO3STRo7H8Uklh3iheG8mRBftkYIA==", "optional": true }, "@next/swc-darwin-arm64": { - "version": "12.3.2-canary.16", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.3.2-canary.16.tgz", - "integrity": "sha512-s9hJW/0lnEuxw05SqX5SM0jBqK7bd2cLtGkDxfzuY4biA3l5ICenO8ZS2WY8PpIfOd2ECm+/H+2U8tGEkInpBg==", + "version": "12.3.2-canary.17", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.3.2-canary.17.tgz", + "integrity": "sha512-Zxqnpc5SQmnBsJ4c3AJhPsPYBWl5yXoe89F92lQMBD7OQB34Rhw8ahugHQWykJiGoSJIOrYZ+v6FEiddsTTQnw==", "optional": true }, "@next/swc-darwin-x64": { - "version": "12.3.2-canary.16", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.3.2-canary.16.tgz", - "integrity": "sha512-FkYh9QK559GloKygmNeB7WbBvCQWHVv3uvUnGeD+uq98xR+y/Ks2lo/5Wg5ksGs0+TAhB7sds5nGQAJtfo9eHQ==", + "version": "12.3.2-canary.17", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.3.2-canary.17.tgz", + "integrity": "sha512-VcqS1r+es5d42EjQrm7/JIx1LWZYgWJwqL6mLZtBbnicT43Yqi7KqGTOzVIqznUeRBjsSnNL43iJJhCL1cPqwQ==", "optional": true }, "@next/swc-freebsd-x64": { - "version": "12.3.2-canary.16", - "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.3.2-canary.16.tgz", - "integrity": "sha512-Qjz+xeMcPuIv/3s3EnMI0pGqWFaNscHx7G68Hr3LD7gUr9p0ep+89V98+bx/l6Y44nRlTX/k+fSrEX9vag6b0g==", + "version": "12.3.2-canary.17", + "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.3.2-canary.17.tgz", + "integrity": "sha512-eTbFU5X/ToDCuFXt/vSXizgXUWD/lUojHe1g2IzJz0+E+/npPIytuUOAa6IIND4zoykAujOE0k/UglixE4BDNA==", "optional": true }, "@next/swc-linux-arm-gnueabihf": { - "version": "12.3.2-canary.16", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.3.2-canary.16.tgz", - "integrity": "sha512-gBBXAsX6Uj75XnqQvs5/lQeIdvFL/Lm1hZx9Osrat49KVwto1vgojoZpHP78rwkVqj+FuvZe3QhPt52IlGnYOw==", + "version": "12.3.2-canary.17", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.3.2-canary.17.tgz", + "integrity": "sha512-5DZSV8jjtnptSM1PjKJzqwG9ZNWqPCzv+VXnYffMpNki2wR9QpP+QAGVNf3Vd/BXHWg8hZkbatyO06pVFOf7rQ==", "optional": true }, "@next/swc-linux-arm64-gnu": { - "version": "12.3.2-canary.16", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.3.2-canary.16.tgz", - "integrity": "sha512-pHGSWFGCWAwEAskMwiQ3+5hMyH5O7AXxtyYL8M1gouzFnL9xPWgI88qxg4XI4yqUJm0mokHT8vmY9Mqm83FMQQ==", + "version": "12.3.2-canary.17", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.3.2-canary.17.tgz", + "integrity": "sha512-oXez7wsXETgiKzCrsOZi6u2Ur6FR5Ts3wYGMm1smGZ99XFAq5AMoSQqgl8HpnKeR/PboiCjuGI4KhNSAYgUD5Q==", "optional": true }, "@next/swc-linux-arm64-musl": { - "version": "12.3.2-canary.16", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.3.2-canary.16.tgz", - "integrity": "sha512-qFrKNV8b5+81nDhJ8lp8hlIhsq10M1zkvTvlBlS4+fDAVD2856aGOPw6rT/YVaWVdbYV6q3knundo3rZE3mbUg==", + "version": "12.3.2-canary.17", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.3.2-canary.17.tgz", + "integrity": "sha512-BEfTE2Ni0FPb7vsZ0+Ti9Q/nj9ghuH54hPFAKCU1U6MrVVKqIEVK+p6oQKvCw8LTArwNTmGLfYozlgLojzZoPA==", "optional": true }, "@next/swc-linux-x64-gnu": { - "version": "12.3.2-canary.16", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.3.2-canary.16.tgz", - "integrity": "sha512-TFvVXmzFD3vnogr/Myxv9XY9Jsl2LZOu8etTGGJilrQaPUrjLtYQwyPZwuzgz2f+tzilA5+rsvAKzBYUfgjjIA==", + "version": "12.3.2-canary.17", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.3.2-canary.17.tgz", + "integrity": "sha512-deC/gnNDYiDKtV6skwqKWRf3+Ok++gIxGoUsXxvTYWX1PeV7twYC9u6VP5TAF57fyAlDTkzlMxS1iZbpK6CQVQ==", "optional": true }, "@next/swc-linux-x64-musl": { - "version": "12.3.2-canary.16", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.3.2-canary.16.tgz", - "integrity": "sha512-tdZ0K91VesLOeOYTdCJWhlv9oc7MjwfZnebWNjiynXc+ta+zFSrfvuk913XDcppZ6PJmVhP69abo19lT1XxepA==", + "version": "12.3.2-canary.17", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.3.2-canary.17.tgz", + "integrity": "sha512-GknEVtX7Xu/ShRfoqtZCmKk06BOrBJsNC2f8f0FHMhMJ0FwIWx3GV0JRQyXUyFhB+yXI1OWjDGNCBVWHtd2+Vw==", "optional": true }, "@next/swc-win32-arm64-msvc": { - "version": "12.3.2-canary.16", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.3.2-canary.16.tgz", - "integrity": "sha512-+bW+6Z7pVjvNCjU+uQJbHtX0ep9ahIwkBvYagTWNuY5ga75Jqs6SFCNHslnezTIPIkvpiJ2RDFY/qW/Zr3OsLA==", + "version": "12.3.2-canary.17", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.3.2-canary.17.tgz", + "integrity": "sha512-GwQCiAh4gnvxZwBq96RywqTueULthdBBcNM2SW83ONEg/9hAEKYbSJPQOLKhidwL10Nha+Mpz2gnJ3iFu3rtOQ==", "optional": true }, "@next/swc-win32-ia32-msvc": { - "version": "12.3.2-canary.16", - "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.3.2-canary.16.tgz", - "integrity": "sha512-a4rpyGkY94In/Ysmksuyx7smEXa2SEYyLXVsgcCHpLBMIi7iZsgtgummGF8NoyYJnZVlpARmke8DpTE1Rc+b/A==", + "version": "12.3.2-canary.17", + "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.3.2-canary.17.tgz", + "integrity": "sha512-j3RiaO7MN6phgh6XbTJhP/g1FSzvxf70QDYPjPHCVKMKxuJXDkFcuKHmhgRU1YX3eEmc71jDlzL0J/QYlCbUlw==", "optional": true }, "@next/swc-win32-x64-msvc": { - "version": "12.3.2-canary.16", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.3.2-canary.16.tgz", - "integrity": "sha512-U9s8RxfuE7hcUtI4UOzSCxhVqh73Rw8yH7/5xg4LOIoKWZpqogxzwt0VBOnNPO1Tw41+OqHuV7uaZVj2gCE/4w==", + "version": "12.3.2-canary.17", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.3.2-canary.17.tgz", + "integrity": "sha512-ePn9BMvWcgC39oaXV6r8FrfQJwB5wQBIVJlllyGuE4FYmsYRO1X9tnOJKVSVQE9JwLVXrrvKdr8dOTcLv3AAEQ==", "optional": true }, "@swc/helpers": { @@ -533,24 +533,24 @@ "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==" }, "next": { - "version": "12.3.2-canary.16", - "resolved": "https://registry.npmjs.org/next/-/next-12.3.2-canary.16.tgz", - "integrity": "sha512-8acaz4W9Qa/jhIhoKEmAerWWiKR5XPjxQZXV/vRQoN6sLd3RmY2emsA2FpvFNeUTjglwRng4lYwDeeEb6xQTEQ==", + "version": "12.3.2-canary.17", + "resolved": "https://registry.npmjs.org/next/-/next-12.3.2-canary.17.tgz", + "integrity": "sha512-K+3kK2zFbwYwfV8a1PLKHD7IC5AWzCF6HwryXvksWWl85aKlmR00DcfCNhiT1gAaqdg9GACPNDU6TX+nFFQwGg==", "requires": { - "@next/env": "12.3.2-canary.16", - "@next/swc-android-arm-eabi": "12.3.2-canary.16", - "@next/swc-android-arm64": "12.3.2-canary.16", - "@next/swc-darwin-arm64": "12.3.2-canary.16", - "@next/swc-darwin-x64": "12.3.2-canary.16", - "@next/swc-freebsd-x64": "12.3.2-canary.16", - "@next/swc-linux-arm-gnueabihf": "12.3.2-canary.16", - "@next/swc-linux-arm64-gnu": "12.3.2-canary.16", - "@next/swc-linux-arm64-musl": "12.3.2-canary.16", - "@next/swc-linux-x64-gnu": "12.3.2-canary.16", - "@next/swc-linux-x64-musl": "12.3.2-canary.16", - "@next/swc-win32-arm64-msvc": "12.3.2-canary.16", - "@next/swc-win32-ia32-msvc": "12.3.2-canary.16", - "@next/swc-win32-x64-msvc": "12.3.2-canary.16", + "@next/env": "12.3.2-canary.17", + "@next/swc-android-arm-eabi": "12.3.2-canary.17", + "@next/swc-android-arm64": "12.3.2-canary.17", + "@next/swc-darwin-arm64": "12.3.2-canary.17", + "@next/swc-darwin-x64": "12.3.2-canary.17", + "@next/swc-freebsd-x64": "12.3.2-canary.17", + "@next/swc-linux-arm-gnueabihf": "12.3.2-canary.17", + "@next/swc-linux-arm64-gnu": "12.3.2-canary.17", + "@next/swc-linux-arm64-musl": "12.3.2-canary.17", + "@next/swc-linux-x64-gnu": "12.3.2-canary.17", + "@next/swc-linux-x64-musl": "12.3.2-canary.17", + "@next/swc-win32-arm64-msvc": "12.3.2-canary.17", + "@next/swc-win32-ia32-msvc": "12.3.2-canary.17", + "@next/swc-win32-x64-msvc": "12.3.2-canary.17", "@swc/helpers": "0.4.11", "caniuse-lite": "^1.0.30001406", "postcss": "8.4.14", diff --git a/demos/canary/package.json b/demos/canary/package.json index da78934527..c4908e8430 100644 --- a/demos/canary/package.json +++ b/demos/canary/package.json @@ -9,7 +9,7 @@ "license": "MIT", "dependencies": { "nanoid": "^3.3.4", - "next": "^12.3.2-canary.16", + "next": "^12.3.2-canary.17", "react": "^0.0.0-experimental-cb5084d1c-20220924", "react-dom": "^0.0.0-experimental-cb5084d1c-20220924" } From 8cb5cc5fe1589652f94644a4cd85a12e3b9be8a0 Mon Sep 17 00:00:00 2001 From: Matt Kane Date: Mon, 3 Oct 2022 14:16:51 +0100 Subject: [PATCH 033/172] chore: tidy and add license for next.js code --- demos/canary/README.md | 2 ++ packages/runtime/src/helpers/config.ts | 2 +- packages/runtime/src/helpers/edge.ts | 1 + packages/runtime/src/templates/edge/bundle.js | 2 +- packages/runtime/src/templates/getPageResolver.ts | 2 +- test/e2e/canary/appdir.spec.ts | 4 ++++ test/e2e/next-test-lib/README.md | 4 ++++ 7 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 demos/canary/README.md create mode 100644 test/e2e/next-test-lib/README.md diff --git a/demos/canary/README.md b/demos/canary/README.md new file mode 100644 index 0000000000..dee0600447 --- /dev/null +++ b/demos/canary/README.md @@ -0,0 +1,2 @@ +Based on [Next.js app dir e2e tests](https://github.com/vercel/next.js/blob/canary/test/e2e/app-dir/app). +[License](https://github.com/vercel/next.js/blob/canary/license.md). diff --git a/packages/runtime/src/helpers/config.ts b/packages/runtime/src/helpers/config.ts index 0bcc775044..09902a0615 100644 --- a/packages/runtime/src/helpers/config.ts +++ b/packages/runtime/src/helpers/config.ts @@ -90,7 +90,7 @@ export const configureHandlerFunctions = async ({ netlifyConfig, publish, ignore /* eslint-enable no-underscore-dangle */ ;[HANDLER_FUNCTION_NAME, ODB_FUNCTION_NAME].forEach((functionName) => { - netlifyConfig.functions[functionName] ||= { included_files: [], external_node_modules: ['react', 'react-dom'] } + netlifyConfig.functions[functionName] ||= { included_files: [], external_node_modules: [] } netlifyConfig.functions[functionName].node_bundler = 'nft' netlifyConfig.functions[functionName].included_files ||= [] netlifyConfig.functions[functionName].included_files.push( diff --git a/packages/runtime/src/helpers/edge.ts b/packages/runtime/src/helpers/edge.ts index 2ad75ad924..bdb8d79354 100644 --- a/packages/runtime/src/helpers/edge.ts +++ b/packages/runtime/src/helpers/edge.ts @@ -169,6 +169,7 @@ const writeEdgeFunction = async ({ } // If the EF matches a page, it's an app dir page so needs a matcher too + // The object will be empty if appDir isn't enabled in the Next config if (pageRegexMap && edgeFunctionDefinition.page in appPathRoutesManifest) { const regexp = pageRegexMap.get(appPathRoutesManifest[edgeFunctionDefinition.page]) if (regexp) { diff --git a/packages/runtime/src/templates/edge/bundle.js b/packages/runtime/src/templates/edge/bundle.js index 0765289028..757d42d69f 100644 --- a/packages/runtime/src/templates/edge/bundle.js +++ b/packages/runtime/src/templates/edge/bundle.js @@ -2,6 +2,6 @@ * This placeholder is replaced with the compiled Next.js bundle at build time * @param {Object} props * @param {import("./runtime.ts").RequestData} props.request - * @returns {Promise} + * @returns {Promise} */ export default async ({ request }) => {} diff --git a/packages/runtime/src/templates/getPageResolver.ts b/packages/runtime/src/templates/getPageResolver.ts index b2c504c342..0fd28f60fe 100644 --- a/packages/runtime/src/templates/getPageResolver.ts +++ b/packages/runtime/src/templates/getPageResolver.ts @@ -14,7 +14,7 @@ export const getPageResolver = async ({ publish, target }: { publish: string; ta const functionDir = posix.resolve(posix.join('.netlify', 'functions', HANDLER_FUNCTION_NAME)) const root = posix.resolve(slash(publish), target === 'server' ? 'server' : 'serverless') - const pages = await glob('{pages,app}/**/*.{js.nft.json}', { + const pages = await glob('{pages,app}/**/*.js.nft.json', { cwd: root, dot: true, }) diff --git a/test/e2e/canary/appdir.spec.ts b/test/e2e/canary/appdir.spec.ts index a2078aee2e..f501c92eba 100644 --- a/test/e2e/canary/appdir.spec.ts +++ b/test/e2e/canary/appdir.spec.ts @@ -1,3 +1,7 @@ +/* + * Adapted from https://github.com/vercel/next.js/blob/canary/test/e2e/app-dir/index.test.ts + */ + import { describe, it, expect, beforeAll } from 'vitest' import crypto from 'crypto' import { fetchViaHTTP, renderViaHTTP, waitFor } from '../next-test-lib/next-test-utils' diff --git a/test/e2e/next-test-lib/README.md b/test/e2e/next-test-lib/README.md new file mode 100644 index 0000000000..feb18f0c67 --- /dev/null +++ b/test/e2e/next-test-lib/README.md @@ -0,0 +1,4 @@ +# next-test-utils + +Adapted from [next-test-utils](https://github.com/vercel/next.js/blob/canary/test/lib). +[License](https://github.com/vercel/next.js/blob/canary/license.md) From 5c270d81326f622922cba27d358d39a2bbe8f6b9 Mon Sep 17 00:00:00 2001 From: Matt Kane Date: Mon, 3 Oct 2022 14:53:17 +0100 Subject: [PATCH 034/172] chore: handle empty static manifest --- packages/runtime/src/helpers/edge.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/runtime/src/helpers/edge.ts b/packages/runtime/src/helpers/edge.ts index b0f2998ecc..c85a7f5125 100644 --- a/packages/runtime/src/helpers/edge.ts +++ b/packages/runtime/src/helpers/edge.ts @@ -280,7 +280,10 @@ export const writeEdgeFunctions = async ({ const appPathRoutesManifest = await loadAppPathRoutesManifest(netlifyConfig) const pageRegexMap = new Map( - [...routesManifest.dynamicRoutes, ...routesManifest.staticRoutes].map((route) => [route.page, route.regex]), + [...(routesManifest.dynamicRoutes || []), ...(routesManifest.staticRoutes || [])].map((route) => [ + route.page, + route.regex, + ]), ) for (const edgeFunctionDefinition of Object.values(middlewareManifest.functions)) { From ca325de8e8ab7f3b89a073bbad1eeca77b27a5e7 Mon Sep 17 00:00:00 2001 From: Matt Kane Date: Mon, 3 Oct 2022 15:58:07 +0100 Subject: [PATCH 035/172] chore: downgrasde canary because of regression --- demos/canary/netlify.toml | 18 ++- demos/canary/package-lock.json | 238 ++++++++++++++++----------------- demos/canary/package.json | 2 +- package-lock.json | 62 ++++----- 4 files changed, 153 insertions(+), 167 deletions(-) diff --git a/demos/canary/netlify.toml b/demos/canary/netlify.toml index 6caa4cf186..f4ea00b6e0 100644 --- a/demos/canary/netlify.toml +++ b/demos/canary/netlify.toml @@ -17,13 +17,11 @@ package = "@netlify/plugin-local-install-core" # Uncomment this if testing the built files rather than dev [dev] framework = "#static" - -[[redirects]] -from = "/_next/static/*" -to = "/static/:splat" -status = 200 - -[[redirects]] -from = "/*" -to = "/.netlify/functions/___netlify-handler" -status = 200 +# [[redirects]] +# from = "/_next/static/*" +# to = "/static/:splat" +# status = 200 +# [[redirects]] +# from = "/*" +# to = "/.netlify/functions/___netlify-handler" +# status = 200 diff --git a/demos/canary/package-lock.json b/demos/canary/package-lock.json index 8438507b0e..b8d93a9ee6 100644 --- a/demos/canary/package-lock.json +++ b/demos/canary/package-lock.json @@ -10,20 +10,20 @@ "license": "MIT", "dependencies": { "nanoid": "^3.3.4", - "next": "^12.3.2-canary.17", + "next": "^12.3.2-canary.16", "react": "^0.0.0-experimental-cb5084d1c-20220924", "react-dom": "^0.0.0-experimental-cb5084d1c-20220924" } }, "node_modules/@next/env": { - "version": "12.3.2-canary.17", - "resolved": "https://registry.npmjs.org/@next/env/-/env-12.3.2-canary.17.tgz", - "integrity": "sha512-EXo+OkgCXrHm0bf+XLQbu5sBAElal7XG3/+NFrtK9EbEIPqflIkg1cQdZUdHelvSEWajXJG5/WWX8MmnjKk1Vw==" + "version": "12.3.2-canary.16", + "resolved": "https://registry.npmjs.org/@next/env/-/env-12.3.2-canary.16.tgz", + "integrity": "sha512-puD7S8eI+iIjCgt2G3zKq5Pe57fw8bKSFQEPrQXD0ZqASyGUwMKt2KfwjG8QKxKa6EGtNRGY3pCIYNnW2pz0qw==" }, "node_modules/@next/swc-android-arm-eabi": { - "version": "12.3.2-canary.17", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.3.2-canary.17.tgz", - "integrity": "sha512-QeJOO1pC3sZxBWjdF9zBLqyCw9y/9Y1f/L4BuOl36t1ppm8fkViKAOBgYxDef8x1R21pgixGHm9Qp7jmD25hsw==", + "version": "12.3.2-canary.16", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.3.2-canary.16.tgz", + "integrity": "sha512-9Iy7H9wRykIORW4I9yh/4edSQtXLXq4p+INFVmj2D6Rgyrtb9O/NUOq33acp7szMbgGA2AzRbyc4O7nsYGqX8w==", "cpu": [ "arm" ], @@ -36,9 +36,9 @@ } }, "node_modules/@next/swc-android-arm64": { - "version": "12.3.2-canary.17", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-12.3.2-canary.17.tgz", - "integrity": "sha512-1usBEiiuyB38n0upHTEypLjOnQW1PWGSCiRNGobySUxRVi/AXMQO5L1xbjO3STRo7H8Uklh3iheG8mRBftkYIA==", + "version": "12.3.2-canary.16", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-12.3.2-canary.16.tgz", + "integrity": "sha512-xFQGTygMzFI0CWgJfjhUYU52eSn6dJBeXgZH8jJK5boeA+QoawfZvX//7H42APz/XXMizPK/GHqDfP23EUJuZA==", "cpu": [ "arm64" ], @@ -51,9 +51,9 @@ } }, "node_modules/@next/swc-darwin-arm64": { - "version": "12.3.2-canary.17", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.3.2-canary.17.tgz", - "integrity": "sha512-Zxqnpc5SQmnBsJ4c3AJhPsPYBWl5yXoe89F92lQMBD7OQB34Rhw8ahugHQWykJiGoSJIOrYZ+v6FEiddsTTQnw==", + "version": "12.3.2-canary.16", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.3.2-canary.16.tgz", + "integrity": "sha512-s9hJW/0lnEuxw05SqX5SM0jBqK7bd2cLtGkDxfzuY4biA3l5ICenO8ZS2WY8PpIfOd2ECm+/H+2U8tGEkInpBg==", "cpu": [ "arm64" ], @@ -66,9 +66,9 @@ } }, "node_modules/@next/swc-darwin-x64": { - "version": "12.3.2-canary.17", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.3.2-canary.17.tgz", - "integrity": "sha512-VcqS1r+es5d42EjQrm7/JIx1LWZYgWJwqL6mLZtBbnicT43Yqi7KqGTOzVIqznUeRBjsSnNL43iJJhCL1cPqwQ==", + "version": "12.3.2-canary.16", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.3.2-canary.16.tgz", + "integrity": "sha512-FkYh9QK559GloKygmNeB7WbBvCQWHVv3uvUnGeD+uq98xR+y/Ks2lo/5Wg5ksGs0+TAhB7sds5nGQAJtfo9eHQ==", "cpu": [ "x64" ], @@ -81,9 +81,9 @@ } }, "node_modules/@next/swc-freebsd-x64": { - "version": "12.3.2-canary.17", - "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.3.2-canary.17.tgz", - "integrity": "sha512-eTbFU5X/ToDCuFXt/vSXizgXUWD/lUojHe1g2IzJz0+E+/npPIytuUOAa6IIND4zoykAujOE0k/UglixE4BDNA==", + "version": "12.3.2-canary.16", + "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.3.2-canary.16.tgz", + "integrity": "sha512-Qjz+xeMcPuIv/3s3EnMI0pGqWFaNscHx7G68Hr3LD7gUr9p0ep+89V98+bx/l6Y44nRlTX/k+fSrEX9vag6b0g==", "cpu": [ "x64" ], @@ -96,9 +96,9 @@ } }, "node_modules/@next/swc-linux-arm-gnueabihf": { - "version": "12.3.2-canary.17", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.3.2-canary.17.tgz", - "integrity": "sha512-5DZSV8jjtnptSM1PjKJzqwG9ZNWqPCzv+VXnYffMpNki2wR9QpP+QAGVNf3Vd/BXHWg8hZkbatyO06pVFOf7rQ==", + "version": "12.3.2-canary.16", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.3.2-canary.16.tgz", + "integrity": "sha512-gBBXAsX6Uj75XnqQvs5/lQeIdvFL/Lm1hZx9Osrat49KVwto1vgojoZpHP78rwkVqj+FuvZe3QhPt52IlGnYOw==", "cpu": [ "arm" ], @@ -111,9 +111,9 @@ } }, "node_modules/@next/swc-linux-arm64-gnu": { - "version": "12.3.2-canary.17", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.3.2-canary.17.tgz", - "integrity": "sha512-oXez7wsXETgiKzCrsOZi6u2Ur6FR5Ts3wYGMm1smGZ99XFAq5AMoSQqgl8HpnKeR/PboiCjuGI4KhNSAYgUD5Q==", + "version": "12.3.2-canary.16", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.3.2-canary.16.tgz", + "integrity": "sha512-pHGSWFGCWAwEAskMwiQ3+5hMyH5O7AXxtyYL8M1gouzFnL9xPWgI88qxg4XI4yqUJm0mokHT8vmY9Mqm83FMQQ==", "cpu": [ "arm64" ], @@ -126,9 +126,9 @@ } }, "node_modules/@next/swc-linux-arm64-musl": { - "version": "12.3.2-canary.17", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.3.2-canary.17.tgz", - "integrity": "sha512-BEfTE2Ni0FPb7vsZ0+Ti9Q/nj9ghuH54hPFAKCU1U6MrVVKqIEVK+p6oQKvCw8LTArwNTmGLfYozlgLojzZoPA==", + "version": "12.3.2-canary.16", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.3.2-canary.16.tgz", + "integrity": "sha512-qFrKNV8b5+81nDhJ8lp8hlIhsq10M1zkvTvlBlS4+fDAVD2856aGOPw6rT/YVaWVdbYV6q3knundo3rZE3mbUg==", "cpu": [ "arm64" ], @@ -141,9 +141,9 @@ } }, "node_modules/@next/swc-linux-x64-gnu": { - "version": "12.3.2-canary.17", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.3.2-canary.17.tgz", - "integrity": "sha512-deC/gnNDYiDKtV6skwqKWRf3+Ok++gIxGoUsXxvTYWX1PeV7twYC9u6VP5TAF57fyAlDTkzlMxS1iZbpK6CQVQ==", + "version": "12.3.2-canary.16", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.3.2-canary.16.tgz", + "integrity": "sha512-TFvVXmzFD3vnogr/Myxv9XY9Jsl2LZOu8etTGGJilrQaPUrjLtYQwyPZwuzgz2f+tzilA5+rsvAKzBYUfgjjIA==", "cpu": [ "x64" ], @@ -156,9 +156,9 @@ } }, "node_modules/@next/swc-linux-x64-musl": { - "version": "12.3.2-canary.17", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.3.2-canary.17.tgz", - "integrity": "sha512-GknEVtX7Xu/ShRfoqtZCmKk06BOrBJsNC2f8f0FHMhMJ0FwIWx3GV0JRQyXUyFhB+yXI1OWjDGNCBVWHtd2+Vw==", + "version": "12.3.2-canary.16", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.3.2-canary.16.tgz", + "integrity": "sha512-tdZ0K91VesLOeOYTdCJWhlv9oc7MjwfZnebWNjiynXc+ta+zFSrfvuk913XDcppZ6PJmVhP69abo19lT1XxepA==", "cpu": [ "x64" ], @@ -171,9 +171,9 @@ } }, "node_modules/@next/swc-win32-arm64-msvc": { - "version": "12.3.2-canary.17", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.3.2-canary.17.tgz", - "integrity": "sha512-GwQCiAh4gnvxZwBq96RywqTueULthdBBcNM2SW83ONEg/9hAEKYbSJPQOLKhidwL10Nha+Mpz2gnJ3iFu3rtOQ==", + "version": "12.3.2-canary.16", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.3.2-canary.16.tgz", + "integrity": "sha512-+bW+6Z7pVjvNCjU+uQJbHtX0ep9ahIwkBvYagTWNuY5ga75Jqs6SFCNHslnezTIPIkvpiJ2RDFY/qW/Zr3OsLA==", "cpu": [ "arm64" ], @@ -186,9 +186,9 @@ } }, "node_modules/@next/swc-win32-ia32-msvc": { - "version": "12.3.2-canary.17", - "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.3.2-canary.17.tgz", - "integrity": "sha512-j3RiaO7MN6phgh6XbTJhP/g1FSzvxf70QDYPjPHCVKMKxuJXDkFcuKHmhgRU1YX3eEmc71jDlzL0J/QYlCbUlw==", + "version": "12.3.2-canary.16", + "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.3.2-canary.16.tgz", + "integrity": "sha512-a4rpyGkY94In/Ysmksuyx7smEXa2SEYyLXVsgcCHpLBMIi7iZsgtgummGF8NoyYJnZVlpARmke8DpTE1Rc+b/A==", "cpu": [ "ia32" ], @@ -201,9 +201,9 @@ } }, "node_modules/@next/swc-win32-x64-msvc": { - "version": "12.3.2-canary.17", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.3.2-canary.17.tgz", - "integrity": "sha512-ePn9BMvWcgC39oaXV6r8FrfQJwB5wQBIVJlllyGuE4FYmsYRO1X9tnOJKVSVQE9JwLVXrrvKdr8dOTcLv3AAEQ==", + "version": "12.3.2-canary.16", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.3.2-canary.16.tgz", + "integrity": "sha512-U9s8RxfuE7hcUtI4UOzSCxhVqh73Rw8yH7/5xg4LOIoKWZpqogxzwt0VBOnNPO1Tw41+OqHuV7uaZVj2gCE/4w==", "cpu": [ "x64" ], @@ -266,11 +266,11 @@ } }, "node_modules/next": { - "version": "12.3.2-canary.17", - "resolved": "https://registry.npmjs.org/next/-/next-12.3.2-canary.17.tgz", - "integrity": "sha512-K+3kK2zFbwYwfV8a1PLKHD7IC5AWzCF6HwryXvksWWl85aKlmR00DcfCNhiT1gAaqdg9GACPNDU6TX+nFFQwGg==", + "version": "12.3.2-canary.16", + "resolved": "https://registry.npmjs.org/next/-/next-12.3.2-canary.16.tgz", + "integrity": "sha512-8acaz4W9Qa/jhIhoKEmAerWWiKR5XPjxQZXV/vRQoN6sLd3RmY2emsA2FpvFNeUTjglwRng4lYwDeeEb6xQTEQ==", "dependencies": { - "@next/env": "12.3.2-canary.17", + "@next/env": "12.3.2-canary.16", "@swc/helpers": "0.4.11", "caniuse-lite": "^1.0.30001406", "postcss": "8.4.14", @@ -284,19 +284,19 @@ "node": ">=12.22.0" }, "optionalDependencies": { - "@next/swc-android-arm-eabi": "12.3.2-canary.17", - "@next/swc-android-arm64": "12.3.2-canary.17", - "@next/swc-darwin-arm64": "12.3.2-canary.17", - "@next/swc-darwin-x64": "12.3.2-canary.17", - "@next/swc-freebsd-x64": "12.3.2-canary.17", - "@next/swc-linux-arm-gnueabihf": "12.3.2-canary.17", - "@next/swc-linux-arm64-gnu": "12.3.2-canary.17", - "@next/swc-linux-arm64-musl": "12.3.2-canary.17", - "@next/swc-linux-x64-gnu": "12.3.2-canary.17", - "@next/swc-linux-x64-musl": "12.3.2-canary.17", - "@next/swc-win32-arm64-msvc": "12.3.2-canary.17", - "@next/swc-win32-ia32-msvc": "12.3.2-canary.17", - "@next/swc-win32-x64-msvc": "12.3.2-canary.17" + "@next/swc-android-arm-eabi": "12.3.2-canary.16", + "@next/swc-android-arm64": "12.3.2-canary.16", + "@next/swc-darwin-arm64": "12.3.2-canary.16", + "@next/swc-darwin-x64": "12.3.2-canary.16", + "@next/swc-freebsd-x64": "12.3.2-canary.16", + "@next/swc-linux-arm-gnueabihf": "12.3.2-canary.16", + "@next/swc-linux-arm64-gnu": "12.3.2-canary.16", + "@next/swc-linux-arm64-musl": "12.3.2-canary.16", + "@next/swc-linux-x64-gnu": "12.3.2-canary.16", + "@next/swc-linux-x64-musl": "12.3.2-canary.16", + "@next/swc-win32-arm64-msvc": "12.3.2-canary.16", + "@next/swc-win32-ia32-msvc": "12.3.2-canary.16", + "@next/swc-win32-x64-msvc": "12.3.2-canary.16" }, "peerDependencies": { "fibers": ">= 3.1.0", @@ -419,86 +419,86 @@ }, "dependencies": { "@next/env": { - "version": "12.3.2-canary.17", - "resolved": "https://registry.npmjs.org/@next/env/-/env-12.3.2-canary.17.tgz", - "integrity": "sha512-EXo+OkgCXrHm0bf+XLQbu5sBAElal7XG3/+NFrtK9EbEIPqflIkg1cQdZUdHelvSEWajXJG5/WWX8MmnjKk1Vw==" + "version": "12.3.2-canary.16", + "resolved": "https://registry.npmjs.org/@next/env/-/env-12.3.2-canary.16.tgz", + "integrity": "sha512-puD7S8eI+iIjCgt2G3zKq5Pe57fw8bKSFQEPrQXD0ZqASyGUwMKt2KfwjG8QKxKa6EGtNRGY3pCIYNnW2pz0qw==" }, "@next/swc-android-arm-eabi": { - "version": "12.3.2-canary.17", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.3.2-canary.17.tgz", - "integrity": "sha512-QeJOO1pC3sZxBWjdF9zBLqyCw9y/9Y1f/L4BuOl36t1ppm8fkViKAOBgYxDef8x1R21pgixGHm9Qp7jmD25hsw==", + "version": "12.3.2-canary.16", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.3.2-canary.16.tgz", + "integrity": "sha512-9Iy7H9wRykIORW4I9yh/4edSQtXLXq4p+INFVmj2D6Rgyrtb9O/NUOq33acp7szMbgGA2AzRbyc4O7nsYGqX8w==", "optional": true }, "@next/swc-android-arm64": { - "version": "12.3.2-canary.17", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-12.3.2-canary.17.tgz", - "integrity": "sha512-1usBEiiuyB38n0upHTEypLjOnQW1PWGSCiRNGobySUxRVi/AXMQO5L1xbjO3STRo7H8Uklh3iheG8mRBftkYIA==", + "version": "12.3.2-canary.16", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-12.3.2-canary.16.tgz", + "integrity": "sha512-xFQGTygMzFI0CWgJfjhUYU52eSn6dJBeXgZH8jJK5boeA+QoawfZvX//7H42APz/XXMizPK/GHqDfP23EUJuZA==", "optional": true }, "@next/swc-darwin-arm64": { - "version": "12.3.2-canary.17", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.3.2-canary.17.tgz", - "integrity": "sha512-Zxqnpc5SQmnBsJ4c3AJhPsPYBWl5yXoe89F92lQMBD7OQB34Rhw8ahugHQWykJiGoSJIOrYZ+v6FEiddsTTQnw==", + "version": "12.3.2-canary.16", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.3.2-canary.16.tgz", + "integrity": "sha512-s9hJW/0lnEuxw05SqX5SM0jBqK7bd2cLtGkDxfzuY4biA3l5ICenO8ZS2WY8PpIfOd2ECm+/H+2U8tGEkInpBg==", "optional": true }, "@next/swc-darwin-x64": { - "version": "12.3.2-canary.17", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.3.2-canary.17.tgz", - "integrity": "sha512-VcqS1r+es5d42EjQrm7/JIx1LWZYgWJwqL6mLZtBbnicT43Yqi7KqGTOzVIqznUeRBjsSnNL43iJJhCL1cPqwQ==", + "version": "12.3.2-canary.16", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.3.2-canary.16.tgz", + "integrity": "sha512-FkYh9QK559GloKygmNeB7WbBvCQWHVv3uvUnGeD+uq98xR+y/Ks2lo/5Wg5ksGs0+TAhB7sds5nGQAJtfo9eHQ==", "optional": true }, "@next/swc-freebsd-x64": { - "version": "12.3.2-canary.17", - "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.3.2-canary.17.tgz", - "integrity": "sha512-eTbFU5X/ToDCuFXt/vSXizgXUWD/lUojHe1g2IzJz0+E+/npPIytuUOAa6IIND4zoykAujOE0k/UglixE4BDNA==", + "version": "12.3.2-canary.16", + "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.3.2-canary.16.tgz", + "integrity": "sha512-Qjz+xeMcPuIv/3s3EnMI0pGqWFaNscHx7G68Hr3LD7gUr9p0ep+89V98+bx/l6Y44nRlTX/k+fSrEX9vag6b0g==", "optional": true }, "@next/swc-linux-arm-gnueabihf": { - "version": "12.3.2-canary.17", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.3.2-canary.17.tgz", - "integrity": "sha512-5DZSV8jjtnptSM1PjKJzqwG9ZNWqPCzv+VXnYffMpNki2wR9QpP+QAGVNf3Vd/BXHWg8hZkbatyO06pVFOf7rQ==", + "version": "12.3.2-canary.16", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.3.2-canary.16.tgz", + "integrity": "sha512-gBBXAsX6Uj75XnqQvs5/lQeIdvFL/Lm1hZx9Osrat49KVwto1vgojoZpHP78rwkVqj+FuvZe3QhPt52IlGnYOw==", "optional": true }, "@next/swc-linux-arm64-gnu": { - "version": "12.3.2-canary.17", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.3.2-canary.17.tgz", - "integrity": "sha512-oXez7wsXETgiKzCrsOZi6u2Ur6FR5Ts3wYGMm1smGZ99XFAq5AMoSQqgl8HpnKeR/PboiCjuGI4KhNSAYgUD5Q==", + "version": "12.3.2-canary.16", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.3.2-canary.16.tgz", + "integrity": "sha512-pHGSWFGCWAwEAskMwiQ3+5hMyH5O7AXxtyYL8M1gouzFnL9xPWgI88qxg4XI4yqUJm0mokHT8vmY9Mqm83FMQQ==", "optional": true }, "@next/swc-linux-arm64-musl": { - "version": "12.3.2-canary.17", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.3.2-canary.17.tgz", - "integrity": "sha512-BEfTE2Ni0FPb7vsZ0+Ti9Q/nj9ghuH54hPFAKCU1U6MrVVKqIEVK+p6oQKvCw8LTArwNTmGLfYozlgLojzZoPA==", + "version": "12.3.2-canary.16", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.3.2-canary.16.tgz", + "integrity": "sha512-qFrKNV8b5+81nDhJ8lp8hlIhsq10M1zkvTvlBlS4+fDAVD2856aGOPw6rT/YVaWVdbYV6q3knundo3rZE3mbUg==", "optional": true }, "@next/swc-linux-x64-gnu": { - "version": "12.3.2-canary.17", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.3.2-canary.17.tgz", - "integrity": "sha512-deC/gnNDYiDKtV6skwqKWRf3+Ok++gIxGoUsXxvTYWX1PeV7twYC9u6VP5TAF57fyAlDTkzlMxS1iZbpK6CQVQ==", + "version": "12.3.2-canary.16", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.3.2-canary.16.tgz", + "integrity": "sha512-TFvVXmzFD3vnogr/Myxv9XY9Jsl2LZOu8etTGGJilrQaPUrjLtYQwyPZwuzgz2f+tzilA5+rsvAKzBYUfgjjIA==", "optional": true }, "@next/swc-linux-x64-musl": { - "version": "12.3.2-canary.17", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.3.2-canary.17.tgz", - "integrity": "sha512-GknEVtX7Xu/ShRfoqtZCmKk06BOrBJsNC2f8f0FHMhMJ0FwIWx3GV0JRQyXUyFhB+yXI1OWjDGNCBVWHtd2+Vw==", + "version": "12.3.2-canary.16", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.3.2-canary.16.tgz", + "integrity": "sha512-tdZ0K91VesLOeOYTdCJWhlv9oc7MjwfZnebWNjiynXc+ta+zFSrfvuk913XDcppZ6PJmVhP69abo19lT1XxepA==", "optional": true }, "@next/swc-win32-arm64-msvc": { - "version": "12.3.2-canary.17", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.3.2-canary.17.tgz", - "integrity": "sha512-GwQCiAh4gnvxZwBq96RywqTueULthdBBcNM2SW83ONEg/9hAEKYbSJPQOLKhidwL10Nha+Mpz2gnJ3iFu3rtOQ==", + "version": "12.3.2-canary.16", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.3.2-canary.16.tgz", + "integrity": "sha512-+bW+6Z7pVjvNCjU+uQJbHtX0ep9ahIwkBvYagTWNuY5ga75Jqs6SFCNHslnezTIPIkvpiJ2RDFY/qW/Zr3OsLA==", "optional": true }, "@next/swc-win32-ia32-msvc": { - "version": "12.3.2-canary.17", - "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.3.2-canary.17.tgz", - "integrity": "sha512-j3RiaO7MN6phgh6XbTJhP/g1FSzvxf70QDYPjPHCVKMKxuJXDkFcuKHmhgRU1YX3eEmc71jDlzL0J/QYlCbUlw==", + "version": "12.3.2-canary.16", + "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.3.2-canary.16.tgz", + "integrity": "sha512-a4rpyGkY94In/Ysmksuyx7smEXa2SEYyLXVsgcCHpLBMIi7iZsgtgummGF8NoyYJnZVlpARmke8DpTE1Rc+b/A==", "optional": true }, "@next/swc-win32-x64-msvc": { - "version": "12.3.2-canary.17", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.3.2-canary.17.tgz", - "integrity": "sha512-ePn9BMvWcgC39oaXV6r8FrfQJwB5wQBIVJlllyGuE4FYmsYRO1X9tnOJKVSVQE9JwLVXrrvKdr8dOTcLv3AAEQ==", + "version": "12.3.2-canary.16", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.3.2-canary.16.tgz", + "integrity": "sha512-U9s8RxfuE7hcUtI4UOzSCxhVqh73Rw8yH7/5xg4LOIoKWZpqogxzwt0VBOnNPO1Tw41+OqHuV7uaZVj2gCE/4w==", "optional": true }, "@swc/helpers": { @@ -533,24 +533,24 @@ "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==" }, "next": { - "version": "12.3.2-canary.17", - "resolved": "https://registry.npmjs.org/next/-/next-12.3.2-canary.17.tgz", - "integrity": "sha512-K+3kK2zFbwYwfV8a1PLKHD7IC5AWzCF6HwryXvksWWl85aKlmR00DcfCNhiT1gAaqdg9GACPNDU6TX+nFFQwGg==", + "version": "12.3.2-canary.16", + "resolved": "https://registry.npmjs.org/next/-/next-12.3.2-canary.16.tgz", + "integrity": "sha512-8acaz4W9Qa/jhIhoKEmAerWWiKR5XPjxQZXV/vRQoN6sLd3RmY2emsA2FpvFNeUTjglwRng4lYwDeeEb6xQTEQ==", "requires": { - "@next/env": "12.3.2-canary.17", - "@next/swc-android-arm-eabi": "12.3.2-canary.17", - "@next/swc-android-arm64": "12.3.2-canary.17", - "@next/swc-darwin-arm64": "12.3.2-canary.17", - "@next/swc-darwin-x64": "12.3.2-canary.17", - "@next/swc-freebsd-x64": "12.3.2-canary.17", - "@next/swc-linux-arm-gnueabihf": "12.3.2-canary.17", - "@next/swc-linux-arm64-gnu": "12.3.2-canary.17", - "@next/swc-linux-arm64-musl": "12.3.2-canary.17", - "@next/swc-linux-x64-gnu": "12.3.2-canary.17", - "@next/swc-linux-x64-musl": "12.3.2-canary.17", - "@next/swc-win32-arm64-msvc": "12.3.2-canary.17", - "@next/swc-win32-ia32-msvc": "12.3.2-canary.17", - "@next/swc-win32-x64-msvc": "12.3.2-canary.17", + "@next/env": "12.3.2-canary.16", + "@next/swc-android-arm-eabi": "12.3.2-canary.16", + "@next/swc-android-arm64": "12.3.2-canary.16", + "@next/swc-darwin-arm64": "12.3.2-canary.16", + "@next/swc-darwin-x64": "12.3.2-canary.16", + "@next/swc-freebsd-x64": "12.3.2-canary.16", + "@next/swc-linux-arm-gnueabihf": "12.3.2-canary.16", + "@next/swc-linux-arm64-gnu": "12.3.2-canary.16", + "@next/swc-linux-arm64-musl": "12.3.2-canary.16", + "@next/swc-linux-x64-gnu": "12.3.2-canary.16", + "@next/swc-linux-x64-musl": "12.3.2-canary.16", + "@next/swc-win32-arm64-msvc": "12.3.2-canary.16", + "@next/swc-win32-ia32-msvc": "12.3.2-canary.16", + "@next/swc-win32-x64-msvc": "12.3.2-canary.16", "@swc/helpers": "0.4.11", "caniuse-lite": "^1.0.30001406", "postcss": "8.4.14", diff --git a/demos/canary/package.json b/demos/canary/package.json index c4908e8430..da78934527 100644 --- a/demos/canary/package.json +++ b/demos/canary/package.json @@ -9,7 +9,7 @@ "license": "MIT", "dependencies": { "nanoid": "^3.3.4", - "next": "^12.3.2-canary.17", + "next": "^12.3.2-canary.16", "react": "^0.0.0-experimental-cb5084d1c-20220924", "react-dom": "^0.0.0-experimental-cb5084d1c-20220924" } diff --git a/package-lock.json b/package-lock.json index f39e36315f..997da1bbb2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5637,13 +5637,13 @@ "version": "15.7.5", "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz", "integrity": "sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==", - "devOptional": true + "dev": true }, "node_modules/@types/react": { "version": "17.0.50", "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.50.tgz", "integrity": "sha512-ZCBHzpDb5skMnc1zFXAXnL3l1FAdi+xZvwxK+PkglMmBrwjpp9nKaWuEvrGnSifCJmBFGxZOOFuwC6KH/s0NuA==", - "devOptional": true, + "dev": true, "dependencies": { "@types/prop-types": "*", "@types/scheduler": "*", @@ -5669,7 +5669,7 @@ "version": "0.16.2", "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.2.tgz", "integrity": "sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==", - "devOptional": true + "dev": true }, "node_modules/@types/sinonjs__fake-timers": { "version": "6.0.4", @@ -9453,7 +9453,7 @@ "version": "3.0.11", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.11.tgz", "integrity": "sha512-sa6P2wJ+CAbgyy4KFssIb/JNMLxFvKF1pCYCSXS8ZMuqZnMsrxqI2E5sPyoTpxoPU/gVZMzr2zjOfg8GIZOMsw==", - "devOptional": true + "dev": true }, "node_modules/custom-routes": { "resolved": "demos/custom-routes", @@ -13841,7 +13841,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.0.0.tgz", "integrity": "sha512-zIE9hX70qew5qTUjSS7wi1iwj/l7+m54KWU247nhM3v806UdGj1yDndXj+IOYxxtW9zyLI+xqFNZjTuDaLUqFw==", - "devOptional": true + "dev": true }, "node_modules/import-fresh": { "version": "3.3.0", @@ -21094,7 +21094,7 @@ "version": "1.50.1", "resolved": "https://registry.npmjs.org/sass/-/sass-1.50.1.tgz", "integrity": "sha512-noTnY41KnlW2A9P8sdwESpDmo+KBNkukI1i8+hOK3footBUcohNHtdOJbckp46XO95nuvcHDDZ+4tmOnpK3hjw==", - "devOptional": true, + "dev": true, "dependencies": { "chokidar": ">=3.0.0 <4.0.0", "immutable": "^4.0.0", @@ -24306,7 +24306,7 @@ }, "packages/runtime": { "name": "@netlify/plugin-nextjs", - "version": "4.23.3", + "version": "4.23.4", "license": "MIT", "dependencies": { "@netlify/esbuild": "0.14.39", @@ -26847,8 +26847,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-3.0.0.tgz", "integrity": "sha512-V3wD15YHfHz6y0KdhYFjyy9vWtEVALT9UrxfN3zqlI6dMioHnJrqOYfyPKol3oqrnCM9uwkcdCwkJ0WUcbLMTQ==", - "dev": true, - "requires": {} + "dev": true }, "chalk": { "version": "5.0.1", @@ -27199,8 +27198,7 @@ "version": "17.0.0", "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-17.0.0.tgz", "integrity": "sha512-/2ks1GKyqSOkH7JFvXJicu0iMpoojkwB+f5Du/1SC0PtBL+s8v30k9njRZ21pm2drKYm2342jFnGWzttxPmZVg==", - "dev": true, - "requires": {} + "dev": true }, "eslint-import-resolver-typescript": { "version": "3.3.0", @@ -28129,13 +28127,13 @@ "version": "15.7.5", "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz", "integrity": "sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==", - "devOptional": true + "dev": true }, "@types/react": { "version": "17.0.50", "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.50.tgz", "integrity": "sha512-ZCBHzpDb5skMnc1zFXAXnL3l1FAdi+xZvwxK+PkglMmBrwjpp9nKaWuEvrGnSifCJmBFGxZOOFuwC6KH/s0NuA==", - "devOptional": true, + "dev": true, "requires": { "@types/prop-types": "*", "@types/scheduler": "*", @@ -28161,7 +28159,7 @@ "version": "0.16.2", "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.2.tgz", "integrity": "sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==", - "devOptional": true + "dev": true }, "@types/sinonjs__fake-timers": { "version": "6.0.4", @@ -28469,8 +28467,7 @@ "version": "5.3.2", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true, - "requires": {} + "dev": true }, "acorn-walk": { "version": "7.2.0", @@ -31009,7 +31006,7 @@ "version": "3.0.11", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.11.tgz", "integrity": "sha512-sa6P2wJ+CAbgyy4KFssIb/JNMLxFvKF1pCYCSXS8ZMuqZnMsrxqI2E5sPyoTpxoPU/gVZMzr2zjOfg8GIZOMsw==", - "devOptional": true + "dev": true }, "custom-routes": { "version": "file:demos/custom-routes", @@ -32308,8 +32305,7 @@ "version": "8.5.0", "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.5.0.tgz", "integrity": "sha512-obmWKLUNCnhtQRKc+tmnYuQl0pFU1ibYJQ5BGhTVB08bHe9wC8qUeG7c08dj9XX+AuPj1YSGSQIHl1pnDHZR0Q==", - "dev": true, - "requires": {} + "dev": true }, "eslint-formatter-codeframe": { "version": "7.32.1", @@ -32754,8 +32750,7 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-6.0.1.tgz", "integrity": "sha512-uM4Tgo5u3UWQiroOyDEsYcVMOo7re3zmno0IZmB5auxoaQNIceAbXEkSt8RNrKtaYehARHG06pYK6K1JhtP0Zw==", - "dev": true, - "requires": {} + "dev": true }, "eslint-plugin-react": { "version": "7.29.4", @@ -32803,8 +32798,7 @@ "version": "4.5.0", "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.5.0.tgz", "integrity": "sha512-8k1gRt7D7h03kd+SAAlzXkQwWK22BnK6GKZG+FJA6BAGy22CFvl8kCIXKpVux0cCxMWDQUPqSok0LKaZ0aOcCw==", - "dev": true, - "requires": {} + "dev": true }, "eslint-plugin-unicorn": { "version": "43.0.2", @@ -34283,7 +34277,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.0.0.tgz", "integrity": "sha512-zIE9hX70qew5qTUjSS7wi1iwj/l7+m54KWU247nhM3v806UdGj1yDndXj+IOYxxtW9zyLI+xqFNZjTuDaLUqFw==", - "devOptional": true + "dev": true }, "import-fresh": { "version": "3.3.0", @@ -35345,8 +35339,7 @@ "version": "1.2.2", "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz", "integrity": "sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w==", - "dev": true, - "requires": {} + "dev": true }, "jest-regex-util": { "version": "27.5.1", @@ -39819,7 +39812,7 @@ "version": "1.50.1", "resolved": "https://registry.npmjs.org/sass/-/sass-1.50.1.tgz", "integrity": "sha512-noTnY41KnlW2A9P8sdwESpDmo+KBNkukI1i8+hOK3footBUcohNHtdOJbckp46XO95nuvcHDDZ+4tmOnpK3hjw==", - "devOptional": true, + "dev": true, "requires": { "chokidar": ">=3.0.0 <4.0.0", "immutable": "^4.0.0", @@ -40080,14 +40073,12 @@ "styled-jsx": { "version": "5.0.2", "resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.0.2.tgz", - "integrity": "sha512-LqPQrbBh3egD57NBcHET4qcgshPks+yblyhPlH2GY8oaDgKs8SK4C3dBh3oSJjgzJ3G5t1SYEZGHkP+QEpX9EQ==", - "requires": {} + "integrity": "sha512-LqPQrbBh3egD57NBcHET4qcgshPks+yblyhPlH2GY8oaDgKs8SK4C3dBh3oSJjgzJ3G5t1SYEZGHkP+QEpX9EQ==" }, "use-sync-external-store": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.1.0.tgz", - "integrity": "sha512-SEnieB2FPKEVne66NpXPd1Np4R1lTNKfjuy3XdIoPQKYBAFdzbzSZlSn1KJZUiihQLQC5Znot4SBz1EOTBwQAQ==", - "requires": {} + "integrity": "sha512-SEnieB2FPKEVne66NpXPd1Np4R1lTNKfjuy3XdIoPQKYBAFdzbzSZlSn1KJZUiihQLQC5Znot4SBz1EOTBwQAQ==" } } }, @@ -41654,8 +41645,7 @@ "ws": { "version": "8.5.0", "resolved": "https://registry.npmjs.org/ws/-/ws-8.5.0.tgz", - "integrity": "sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg==", - "requires": {} + "integrity": "sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg==" } } }, @@ -41781,8 +41771,7 @@ "use-sync-external-store": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz", - "integrity": "sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==", - "requires": {} + "integrity": "sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==" }, "util-deprecate": { "version": "1.0.2", @@ -42252,8 +42241,7 @@ "version": "7.5.7", "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.7.tgz", "integrity": "sha512-KMvVuFzpKBuiIXW3E4u3mySRO2/mCHSyZDJQM5NQ9Q9KHWHWh0NHgfbRMLLrceUK5qAL4ytALJbpRMjixFZh8A==", - "dev": true, - "requires": {} + "dev": true }, "xdg-basedir": { "version": "4.0.0", From 30cd451cf16495d25dc2397cca52e82d58fd9109 Mon Sep 17 00:00:00 2001 From: Matt Kane Date: Tue, 4 Oct 2022 09:58:38 +0100 Subject: [PATCH 036/172] chore: logging for windows --- .../runtime/src/templates/getPageResolver.ts | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/packages/runtime/src/templates/getPageResolver.ts b/packages/runtime/src/templates/getPageResolver.ts index 0fd28f60fe..3118909374 100644 --- a/packages/runtime/src/templates/getPageResolver.ts +++ b/packages/runtime/src/templates/getPageResolver.ts @@ -13,7 +13,7 @@ import { HANDLER_FUNCTION_NAME } from '../constants' export const getPageResolver = async ({ publish, target }: { publish: string; target: string }) => { const functionDir = posix.resolve(posix.join('.netlify', 'functions', HANDLER_FUNCTION_NAME)) const root = posix.resolve(slash(publish), target === 'server' ? 'server' : 'serverless') - + console.log({ root, functionDir }) const pages = await glob('{pages,app}/**/*.js.nft.json', { cwd: root, dot: true, @@ -23,13 +23,24 @@ export const getPageResolver = async ({ publish, target }: { publish: string; ta pages.map(async (page) => { const dir = posix.dirname(page) const { files } = await readJSON(posix.join(root, page)) - return files.map((file) => posix.resolve(root, dir, file)) + + return files.map((file) => { + const resolved = posix.resolve(root, dir, file) + console.log('glob', { root, dir, file, resolved }) + return resolved + }) }), ) const deduped = [...new Set(dependencies.flat())] - const pageFiles = deduped.map((file) => `require.resolve('${posix.relative(functionDir, file)}')`).sort() + const pageFiles = deduped + .map((file) => { + const relative = posix.relative(functionDir, file) + console.log({ functionDir, file, relative }) + return `require.resolve('${relative}')` + }) + .sort() return outdent` // This file is purely to allow nft to know about these pages. From ee962b87842b775e02900975509dd4ac26f27d01 Mon Sep 17 00:00:00 2001 From: Matt Kane Date: Wed, 5 Oct 2022 16:12:03 +0100 Subject: [PATCH 037/172] Apply suggestions from code review Co-authored-by: Erica Pisani --- demos/canary/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demos/canary/README.md b/demos/canary/README.md index dee0600447..500c3bd0e9 100644 --- a/demos/canary/README.md +++ b/demos/canary/README.md @@ -1,2 +1,2 @@ -Based on [Next.js app dir e2e tests](https://github.com/vercel/next.js/blob/canary/test/e2e/app-dir/app). +Based on [Next.js `e2e/app-dir` tests](https://github.com/vercel/next.js/blob/canary/test/e2e/app-dir/app). [License](https://github.com/vercel/next.js/blob/canary/license.md). From ee7747326a997c6216118c75b590b0ffcae49f6a Mon Sep 17 00:00:00 2001 From: Matt Kane Date: Thu, 6 Oct 2022 09:47:13 +0100 Subject: [PATCH 038/172] chore: update next canary --- demos/canary/package-lock.json | 240 ++++++++++++++++----------------- demos/canary/package.json | 2 +- 2 files changed, 121 insertions(+), 121 deletions(-) diff --git a/demos/canary/package-lock.json b/demos/canary/package-lock.json index b8d93a9ee6..be26b0017c 100644 --- a/demos/canary/package-lock.json +++ b/demos/canary/package-lock.json @@ -10,20 +10,20 @@ "license": "MIT", "dependencies": { "nanoid": "^3.3.4", - "next": "^12.3.2-canary.16", + "next": "^12.3.2-canary.21", "react": "^0.0.0-experimental-cb5084d1c-20220924", "react-dom": "^0.0.0-experimental-cb5084d1c-20220924" } }, "node_modules/@next/env": { - "version": "12.3.2-canary.16", - "resolved": "https://registry.npmjs.org/@next/env/-/env-12.3.2-canary.16.tgz", - "integrity": "sha512-puD7S8eI+iIjCgt2G3zKq5Pe57fw8bKSFQEPrQXD0ZqASyGUwMKt2KfwjG8QKxKa6EGtNRGY3pCIYNnW2pz0qw==" + "version": "12.3.2-canary.21", + "resolved": "https://registry.npmjs.org/@next/env/-/env-12.3.2-canary.21.tgz", + "integrity": "sha512-FPLie0ru1snn2iLCw60N6wpftFummKCrnJc2J1xrahaKfGPZlCuaJ9rT9l8SceD0+Lp8j1R0zsaxLqVfBuIJjg==" }, "node_modules/@next/swc-android-arm-eabi": { - "version": "12.3.2-canary.16", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.3.2-canary.16.tgz", - "integrity": "sha512-9Iy7H9wRykIORW4I9yh/4edSQtXLXq4p+INFVmj2D6Rgyrtb9O/NUOq33acp7szMbgGA2AzRbyc4O7nsYGqX8w==", + "version": "12.3.2-canary.21", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.3.2-canary.21.tgz", + "integrity": "sha512-02zaX38d/qzEyMjgCavpIT2LB9Wh9iE4SkwCzwoAyUmPitZUW86JT+uz7uO9ioIQzqYrkoPCaryxMc3Sxd+SPA==", "cpu": [ "arm" ], @@ -36,9 +36,9 @@ } }, "node_modules/@next/swc-android-arm64": { - "version": "12.3.2-canary.16", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-12.3.2-canary.16.tgz", - "integrity": "sha512-xFQGTygMzFI0CWgJfjhUYU52eSn6dJBeXgZH8jJK5boeA+QoawfZvX//7H42APz/XXMizPK/GHqDfP23EUJuZA==", + "version": "12.3.2-canary.21", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-12.3.2-canary.21.tgz", + "integrity": "sha512-oMeCHAR2uQtprpy77bbVAZC9N9pEEXzKDBMS/XG8O2ElU+QWBqdr1m8eU+x9IRm8yeq0D8NUZDOBzqiJTvdz6A==", "cpu": [ "arm64" ], @@ -51,9 +51,9 @@ } }, "node_modules/@next/swc-darwin-arm64": { - "version": "12.3.2-canary.16", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.3.2-canary.16.tgz", - "integrity": "sha512-s9hJW/0lnEuxw05SqX5SM0jBqK7bd2cLtGkDxfzuY4biA3l5ICenO8ZS2WY8PpIfOd2ECm+/H+2U8tGEkInpBg==", + "version": "12.3.2-canary.21", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.3.2-canary.21.tgz", + "integrity": "sha512-Q72JTUiyR/0viPgjAMAXjyhmuvrli6vew9Nh2HnIvLPjayFiItwxaKnDOGKoPv5GtW2fq2W237KEIlJLnZvK1A==", "cpu": [ "arm64" ], @@ -66,9 +66,9 @@ } }, "node_modules/@next/swc-darwin-x64": { - "version": "12.3.2-canary.16", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.3.2-canary.16.tgz", - "integrity": "sha512-FkYh9QK559GloKygmNeB7WbBvCQWHVv3uvUnGeD+uq98xR+y/Ks2lo/5Wg5ksGs0+TAhB7sds5nGQAJtfo9eHQ==", + "version": "12.3.2-canary.21", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.3.2-canary.21.tgz", + "integrity": "sha512-xi5bfH5OULUalohfEawLISQKvb5iZoyiccWBcnxT4u1lf8gi+NpMQsxfMJq7fOflGhbKTpbjmcoJvy13niABNg==", "cpu": [ "x64" ], @@ -81,9 +81,9 @@ } }, "node_modules/@next/swc-freebsd-x64": { - "version": "12.3.2-canary.16", - "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.3.2-canary.16.tgz", - "integrity": "sha512-Qjz+xeMcPuIv/3s3EnMI0pGqWFaNscHx7G68Hr3LD7gUr9p0ep+89V98+bx/l6Y44nRlTX/k+fSrEX9vag6b0g==", + "version": "12.3.2-canary.21", + "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.3.2-canary.21.tgz", + "integrity": "sha512-HIMlzRtStNPi+yI2fmVCDDtmXeEiW2R+khtiQ17GJk/2sL25HhcMQYLqnKJFBnWbnVQ0v149uBl+zXahpUed+A==", "cpu": [ "x64" ], @@ -96,9 +96,9 @@ } }, "node_modules/@next/swc-linux-arm-gnueabihf": { - "version": "12.3.2-canary.16", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.3.2-canary.16.tgz", - "integrity": "sha512-gBBXAsX6Uj75XnqQvs5/lQeIdvFL/Lm1hZx9Osrat49KVwto1vgojoZpHP78rwkVqj+FuvZe3QhPt52IlGnYOw==", + "version": "12.3.2-canary.21", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.3.2-canary.21.tgz", + "integrity": "sha512-4yNd2VyKn8EdlP3w2CAS+vDktXDXGiojAxVfWliqPnoPPEcdHbB+9gHL/DdE0h2PTunsNBYsBj4fm1PbH/dMiA==", "cpu": [ "arm" ], @@ -111,9 +111,9 @@ } }, "node_modules/@next/swc-linux-arm64-gnu": { - "version": "12.3.2-canary.16", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.3.2-canary.16.tgz", - "integrity": "sha512-pHGSWFGCWAwEAskMwiQ3+5hMyH5O7AXxtyYL8M1gouzFnL9xPWgI88qxg4XI4yqUJm0mokHT8vmY9Mqm83FMQQ==", + "version": "12.3.2-canary.21", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.3.2-canary.21.tgz", + "integrity": "sha512-9lMy55dulV22nFEyklTIkKuSiJYAx3TfGmhp8UgXyEuasMZp/yHV8Z8Zn+x/ts0S0rXXk6pRIv84KBEXzQGaew==", "cpu": [ "arm64" ], @@ -126,9 +126,9 @@ } }, "node_modules/@next/swc-linux-arm64-musl": { - "version": "12.3.2-canary.16", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.3.2-canary.16.tgz", - "integrity": "sha512-qFrKNV8b5+81nDhJ8lp8hlIhsq10M1zkvTvlBlS4+fDAVD2856aGOPw6rT/YVaWVdbYV6q3knundo3rZE3mbUg==", + "version": "12.3.2-canary.21", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.3.2-canary.21.tgz", + "integrity": "sha512-DmjzN4YTtO6swU2JGQSjqrNf6artun1uUpmzsTHp9TSGCrYiac9DeWz876aWPF2NhXBwNC2Gktw526Q53bPO4w==", "cpu": [ "arm64" ], @@ -141,9 +141,9 @@ } }, "node_modules/@next/swc-linux-x64-gnu": { - "version": "12.3.2-canary.16", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.3.2-canary.16.tgz", - "integrity": "sha512-TFvVXmzFD3vnogr/Myxv9XY9Jsl2LZOu8etTGGJilrQaPUrjLtYQwyPZwuzgz2f+tzilA5+rsvAKzBYUfgjjIA==", + "version": "12.3.2-canary.21", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.3.2-canary.21.tgz", + "integrity": "sha512-39MREKbFcKt23R0tbWWI1oTGQCPB8aw2UYmFiGx2VOgbPLZ9MFo3ogmvxmFEXdEXPX1Wz8knbv0QqnJ/6JGH7g==", "cpu": [ "x64" ], @@ -156,9 +156,9 @@ } }, "node_modules/@next/swc-linux-x64-musl": { - "version": "12.3.2-canary.16", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.3.2-canary.16.tgz", - "integrity": "sha512-tdZ0K91VesLOeOYTdCJWhlv9oc7MjwfZnebWNjiynXc+ta+zFSrfvuk913XDcppZ6PJmVhP69abo19lT1XxepA==", + "version": "12.3.2-canary.21", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.3.2-canary.21.tgz", + "integrity": "sha512-2YHom1X30cF7w0Pkx3ZyzYX/aUCGPKPNGKCCtq5Jdx2C94bX3am9DXCYo+fnf3Vyn59YCAFKVpwNMU/mwaoFkw==", "cpu": [ "x64" ], @@ -171,9 +171,9 @@ } }, "node_modules/@next/swc-win32-arm64-msvc": { - "version": "12.3.2-canary.16", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.3.2-canary.16.tgz", - "integrity": "sha512-+bW+6Z7pVjvNCjU+uQJbHtX0ep9ahIwkBvYagTWNuY5ga75Jqs6SFCNHslnezTIPIkvpiJ2RDFY/qW/Zr3OsLA==", + "version": "12.3.2-canary.21", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.3.2-canary.21.tgz", + "integrity": "sha512-CKOs+lcjRMWPnX/SvkEnQvLBhP8hw7KiLGTmJ+MLxhChXvUctQOibVqWs165ycIQ5PwRnahAQnMCXY90wwy42w==", "cpu": [ "arm64" ], @@ -186,9 +186,9 @@ } }, "node_modules/@next/swc-win32-ia32-msvc": { - "version": "12.3.2-canary.16", - "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.3.2-canary.16.tgz", - "integrity": "sha512-a4rpyGkY94In/Ysmksuyx7smEXa2SEYyLXVsgcCHpLBMIi7iZsgtgummGF8NoyYJnZVlpARmke8DpTE1Rc+b/A==", + "version": "12.3.2-canary.21", + "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.3.2-canary.21.tgz", + "integrity": "sha512-5LFKpcQHC618SyHwI43EFmnd8569RPk9MB0paIQE51ssY9zwdBq5GtjkX3q6gvCf+dpdkZQLLHlTeOORN7bQDA==", "cpu": [ "ia32" ], @@ -201,9 +201,9 @@ } }, "node_modules/@next/swc-win32-x64-msvc": { - "version": "12.3.2-canary.16", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.3.2-canary.16.tgz", - "integrity": "sha512-U9s8RxfuE7hcUtI4UOzSCxhVqh73Rw8yH7/5xg4LOIoKWZpqogxzwt0VBOnNPO1Tw41+OqHuV7uaZVj2gCE/4w==", + "version": "12.3.2-canary.21", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.3.2-canary.21.tgz", + "integrity": "sha512-1cXz2iL81/H15s2kbho7UUDE0LX7Xx957SPhEx1urR9f3AmuUM3FU2GsW+05qhV3Yp0QVD3r+bppy8SX00XZRw==", "cpu": [ "x64" ], @@ -266,11 +266,11 @@ } }, "node_modules/next": { - "version": "12.3.2-canary.16", - "resolved": "https://registry.npmjs.org/next/-/next-12.3.2-canary.16.tgz", - "integrity": "sha512-8acaz4W9Qa/jhIhoKEmAerWWiKR5XPjxQZXV/vRQoN6sLd3RmY2emsA2FpvFNeUTjglwRng4lYwDeeEb6xQTEQ==", + "version": "12.3.2-canary.21", + "resolved": "https://registry.npmjs.org/next/-/next-12.3.2-canary.21.tgz", + "integrity": "sha512-d9p4xur6gwuyFJa2qPtAGXVS+xiBQ0gWyN3ZM/4BoyExnKlNj7ETXsQtMAS5W8Vt7iglaotxXhNT6xBrgBqmZw==", "dependencies": { - "@next/env": "12.3.2-canary.16", + "@next/env": "12.3.2-canary.21", "@swc/helpers": "0.4.11", "caniuse-lite": "^1.0.30001406", "postcss": "8.4.14", @@ -281,22 +281,22 @@ "next": "dist/bin/next" }, "engines": { - "node": ">=12.22.0" + "node": ">=14.0.0" }, "optionalDependencies": { - "@next/swc-android-arm-eabi": "12.3.2-canary.16", - "@next/swc-android-arm64": "12.3.2-canary.16", - "@next/swc-darwin-arm64": "12.3.2-canary.16", - "@next/swc-darwin-x64": "12.3.2-canary.16", - "@next/swc-freebsd-x64": "12.3.2-canary.16", - "@next/swc-linux-arm-gnueabihf": "12.3.2-canary.16", - "@next/swc-linux-arm64-gnu": "12.3.2-canary.16", - "@next/swc-linux-arm64-musl": "12.3.2-canary.16", - "@next/swc-linux-x64-gnu": "12.3.2-canary.16", - "@next/swc-linux-x64-musl": "12.3.2-canary.16", - "@next/swc-win32-arm64-msvc": "12.3.2-canary.16", - "@next/swc-win32-ia32-msvc": "12.3.2-canary.16", - "@next/swc-win32-x64-msvc": "12.3.2-canary.16" + "@next/swc-android-arm-eabi": "12.3.2-canary.21", + "@next/swc-android-arm64": "12.3.2-canary.21", + "@next/swc-darwin-arm64": "12.3.2-canary.21", + "@next/swc-darwin-x64": "12.3.2-canary.21", + "@next/swc-freebsd-x64": "12.3.2-canary.21", + "@next/swc-linux-arm-gnueabihf": "12.3.2-canary.21", + "@next/swc-linux-arm64-gnu": "12.3.2-canary.21", + "@next/swc-linux-arm64-musl": "12.3.2-canary.21", + "@next/swc-linux-x64-gnu": "12.3.2-canary.21", + "@next/swc-linux-x64-musl": "12.3.2-canary.21", + "@next/swc-win32-arm64-msvc": "12.3.2-canary.21", + "@next/swc-win32-ia32-msvc": "12.3.2-canary.21", + "@next/swc-win32-x64-msvc": "12.3.2-canary.21" }, "peerDependencies": { "fibers": ">= 3.1.0", @@ -419,86 +419,86 @@ }, "dependencies": { "@next/env": { - "version": "12.3.2-canary.16", - "resolved": "https://registry.npmjs.org/@next/env/-/env-12.3.2-canary.16.tgz", - "integrity": "sha512-puD7S8eI+iIjCgt2G3zKq5Pe57fw8bKSFQEPrQXD0ZqASyGUwMKt2KfwjG8QKxKa6EGtNRGY3pCIYNnW2pz0qw==" + "version": "12.3.2-canary.21", + "resolved": "https://registry.npmjs.org/@next/env/-/env-12.3.2-canary.21.tgz", + "integrity": "sha512-FPLie0ru1snn2iLCw60N6wpftFummKCrnJc2J1xrahaKfGPZlCuaJ9rT9l8SceD0+Lp8j1R0zsaxLqVfBuIJjg==" }, "@next/swc-android-arm-eabi": { - "version": "12.3.2-canary.16", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.3.2-canary.16.tgz", - "integrity": "sha512-9Iy7H9wRykIORW4I9yh/4edSQtXLXq4p+INFVmj2D6Rgyrtb9O/NUOq33acp7szMbgGA2AzRbyc4O7nsYGqX8w==", + "version": "12.3.2-canary.21", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.3.2-canary.21.tgz", + "integrity": "sha512-02zaX38d/qzEyMjgCavpIT2LB9Wh9iE4SkwCzwoAyUmPitZUW86JT+uz7uO9ioIQzqYrkoPCaryxMc3Sxd+SPA==", "optional": true }, "@next/swc-android-arm64": { - "version": "12.3.2-canary.16", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-12.3.2-canary.16.tgz", - "integrity": "sha512-xFQGTygMzFI0CWgJfjhUYU52eSn6dJBeXgZH8jJK5boeA+QoawfZvX//7H42APz/XXMizPK/GHqDfP23EUJuZA==", + "version": "12.3.2-canary.21", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-12.3.2-canary.21.tgz", + "integrity": "sha512-oMeCHAR2uQtprpy77bbVAZC9N9pEEXzKDBMS/XG8O2ElU+QWBqdr1m8eU+x9IRm8yeq0D8NUZDOBzqiJTvdz6A==", "optional": true }, "@next/swc-darwin-arm64": { - "version": "12.3.2-canary.16", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.3.2-canary.16.tgz", - "integrity": "sha512-s9hJW/0lnEuxw05SqX5SM0jBqK7bd2cLtGkDxfzuY4biA3l5ICenO8ZS2WY8PpIfOd2ECm+/H+2U8tGEkInpBg==", + "version": "12.3.2-canary.21", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.3.2-canary.21.tgz", + "integrity": "sha512-Q72JTUiyR/0viPgjAMAXjyhmuvrli6vew9Nh2HnIvLPjayFiItwxaKnDOGKoPv5GtW2fq2W237KEIlJLnZvK1A==", "optional": true }, "@next/swc-darwin-x64": { - "version": "12.3.2-canary.16", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.3.2-canary.16.tgz", - "integrity": "sha512-FkYh9QK559GloKygmNeB7WbBvCQWHVv3uvUnGeD+uq98xR+y/Ks2lo/5Wg5ksGs0+TAhB7sds5nGQAJtfo9eHQ==", + "version": "12.3.2-canary.21", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.3.2-canary.21.tgz", + "integrity": "sha512-xi5bfH5OULUalohfEawLISQKvb5iZoyiccWBcnxT4u1lf8gi+NpMQsxfMJq7fOflGhbKTpbjmcoJvy13niABNg==", "optional": true }, "@next/swc-freebsd-x64": { - "version": "12.3.2-canary.16", - "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.3.2-canary.16.tgz", - "integrity": "sha512-Qjz+xeMcPuIv/3s3EnMI0pGqWFaNscHx7G68Hr3LD7gUr9p0ep+89V98+bx/l6Y44nRlTX/k+fSrEX9vag6b0g==", + "version": "12.3.2-canary.21", + "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.3.2-canary.21.tgz", + "integrity": "sha512-HIMlzRtStNPi+yI2fmVCDDtmXeEiW2R+khtiQ17GJk/2sL25HhcMQYLqnKJFBnWbnVQ0v149uBl+zXahpUed+A==", "optional": true }, "@next/swc-linux-arm-gnueabihf": { - "version": "12.3.2-canary.16", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.3.2-canary.16.tgz", - "integrity": "sha512-gBBXAsX6Uj75XnqQvs5/lQeIdvFL/Lm1hZx9Osrat49KVwto1vgojoZpHP78rwkVqj+FuvZe3QhPt52IlGnYOw==", + "version": "12.3.2-canary.21", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.3.2-canary.21.tgz", + "integrity": "sha512-4yNd2VyKn8EdlP3w2CAS+vDktXDXGiojAxVfWliqPnoPPEcdHbB+9gHL/DdE0h2PTunsNBYsBj4fm1PbH/dMiA==", "optional": true }, "@next/swc-linux-arm64-gnu": { - "version": "12.3.2-canary.16", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.3.2-canary.16.tgz", - "integrity": "sha512-pHGSWFGCWAwEAskMwiQ3+5hMyH5O7AXxtyYL8M1gouzFnL9xPWgI88qxg4XI4yqUJm0mokHT8vmY9Mqm83FMQQ==", + "version": "12.3.2-canary.21", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.3.2-canary.21.tgz", + "integrity": "sha512-9lMy55dulV22nFEyklTIkKuSiJYAx3TfGmhp8UgXyEuasMZp/yHV8Z8Zn+x/ts0S0rXXk6pRIv84KBEXzQGaew==", "optional": true }, "@next/swc-linux-arm64-musl": { - "version": "12.3.2-canary.16", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.3.2-canary.16.tgz", - "integrity": "sha512-qFrKNV8b5+81nDhJ8lp8hlIhsq10M1zkvTvlBlS4+fDAVD2856aGOPw6rT/YVaWVdbYV6q3knundo3rZE3mbUg==", + "version": "12.3.2-canary.21", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.3.2-canary.21.tgz", + "integrity": "sha512-DmjzN4YTtO6swU2JGQSjqrNf6artun1uUpmzsTHp9TSGCrYiac9DeWz876aWPF2NhXBwNC2Gktw526Q53bPO4w==", "optional": true }, "@next/swc-linux-x64-gnu": { - "version": "12.3.2-canary.16", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.3.2-canary.16.tgz", - "integrity": "sha512-TFvVXmzFD3vnogr/Myxv9XY9Jsl2LZOu8etTGGJilrQaPUrjLtYQwyPZwuzgz2f+tzilA5+rsvAKzBYUfgjjIA==", + "version": "12.3.2-canary.21", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.3.2-canary.21.tgz", + "integrity": "sha512-39MREKbFcKt23R0tbWWI1oTGQCPB8aw2UYmFiGx2VOgbPLZ9MFo3ogmvxmFEXdEXPX1Wz8knbv0QqnJ/6JGH7g==", "optional": true }, "@next/swc-linux-x64-musl": { - "version": "12.3.2-canary.16", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.3.2-canary.16.tgz", - "integrity": "sha512-tdZ0K91VesLOeOYTdCJWhlv9oc7MjwfZnebWNjiynXc+ta+zFSrfvuk913XDcppZ6PJmVhP69abo19lT1XxepA==", + "version": "12.3.2-canary.21", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.3.2-canary.21.tgz", + "integrity": "sha512-2YHom1X30cF7w0Pkx3ZyzYX/aUCGPKPNGKCCtq5Jdx2C94bX3am9DXCYo+fnf3Vyn59YCAFKVpwNMU/mwaoFkw==", "optional": true }, "@next/swc-win32-arm64-msvc": { - "version": "12.3.2-canary.16", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.3.2-canary.16.tgz", - "integrity": "sha512-+bW+6Z7pVjvNCjU+uQJbHtX0ep9ahIwkBvYagTWNuY5ga75Jqs6SFCNHslnezTIPIkvpiJ2RDFY/qW/Zr3OsLA==", + "version": "12.3.2-canary.21", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.3.2-canary.21.tgz", + "integrity": "sha512-CKOs+lcjRMWPnX/SvkEnQvLBhP8hw7KiLGTmJ+MLxhChXvUctQOibVqWs165ycIQ5PwRnahAQnMCXY90wwy42w==", "optional": true }, "@next/swc-win32-ia32-msvc": { - "version": "12.3.2-canary.16", - "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.3.2-canary.16.tgz", - "integrity": "sha512-a4rpyGkY94In/Ysmksuyx7smEXa2SEYyLXVsgcCHpLBMIi7iZsgtgummGF8NoyYJnZVlpARmke8DpTE1Rc+b/A==", + "version": "12.3.2-canary.21", + "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.3.2-canary.21.tgz", + "integrity": "sha512-5LFKpcQHC618SyHwI43EFmnd8569RPk9MB0paIQE51ssY9zwdBq5GtjkX3q6gvCf+dpdkZQLLHlTeOORN7bQDA==", "optional": true }, "@next/swc-win32-x64-msvc": { - "version": "12.3.2-canary.16", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.3.2-canary.16.tgz", - "integrity": "sha512-U9s8RxfuE7hcUtI4UOzSCxhVqh73Rw8yH7/5xg4LOIoKWZpqogxzwt0VBOnNPO1Tw41+OqHuV7uaZVj2gCE/4w==", + "version": "12.3.2-canary.21", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.3.2-canary.21.tgz", + "integrity": "sha512-1cXz2iL81/H15s2kbho7UUDE0LX7Xx957SPhEx1urR9f3AmuUM3FU2GsW+05qhV3Yp0QVD3r+bppy8SX00XZRw==", "optional": true }, "@swc/helpers": { @@ -533,24 +533,24 @@ "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==" }, "next": { - "version": "12.3.2-canary.16", - "resolved": "https://registry.npmjs.org/next/-/next-12.3.2-canary.16.tgz", - "integrity": "sha512-8acaz4W9Qa/jhIhoKEmAerWWiKR5XPjxQZXV/vRQoN6sLd3RmY2emsA2FpvFNeUTjglwRng4lYwDeeEb6xQTEQ==", + "version": "12.3.2-canary.21", + "resolved": "https://registry.npmjs.org/next/-/next-12.3.2-canary.21.tgz", + "integrity": "sha512-d9p4xur6gwuyFJa2qPtAGXVS+xiBQ0gWyN3ZM/4BoyExnKlNj7ETXsQtMAS5W8Vt7iglaotxXhNT6xBrgBqmZw==", "requires": { - "@next/env": "12.3.2-canary.16", - "@next/swc-android-arm-eabi": "12.3.2-canary.16", - "@next/swc-android-arm64": "12.3.2-canary.16", - "@next/swc-darwin-arm64": "12.3.2-canary.16", - "@next/swc-darwin-x64": "12.3.2-canary.16", - "@next/swc-freebsd-x64": "12.3.2-canary.16", - "@next/swc-linux-arm-gnueabihf": "12.3.2-canary.16", - "@next/swc-linux-arm64-gnu": "12.3.2-canary.16", - "@next/swc-linux-arm64-musl": "12.3.2-canary.16", - "@next/swc-linux-x64-gnu": "12.3.2-canary.16", - "@next/swc-linux-x64-musl": "12.3.2-canary.16", - "@next/swc-win32-arm64-msvc": "12.3.2-canary.16", - "@next/swc-win32-ia32-msvc": "12.3.2-canary.16", - "@next/swc-win32-x64-msvc": "12.3.2-canary.16", + "@next/env": "12.3.2-canary.21", + "@next/swc-android-arm-eabi": "12.3.2-canary.21", + "@next/swc-android-arm64": "12.3.2-canary.21", + "@next/swc-darwin-arm64": "12.3.2-canary.21", + "@next/swc-darwin-x64": "12.3.2-canary.21", + "@next/swc-freebsd-x64": "12.3.2-canary.21", + "@next/swc-linux-arm-gnueabihf": "12.3.2-canary.21", + "@next/swc-linux-arm64-gnu": "12.3.2-canary.21", + "@next/swc-linux-arm64-musl": "12.3.2-canary.21", + "@next/swc-linux-x64-gnu": "12.3.2-canary.21", + "@next/swc-linux-x64-musl": "12.3.2-canary.21", + "@next/swc-win32-arm64-msvc": "12.3.2-canary.21", + "@next/swc-win32-ia32-msvc": "12.3.2-canary.21", + "@next/swc-win32-x64-msvc": "12.3.2-canary.21", "@swc/helpers": "0.4.11", "caniuse-lite": "^1.0.30001406", "postcss": "8.4.14", diff --git a/demos/canary/package.json b/demos/canary/package.json index da78934527..1ccd3f22ab 100644 --- a/demos/canary/package.json +++ b/demos/canary/package.json @@ -9,7 +9,7 @@ "license": "MIT", "dependencies": { "nanoid": "^3.3.4", - "next": "^12.3.2-canary.16", + "next": "^12.3.2-canary.21", "react": "^0.0.0-experimental-cb5084d1c-20220924", "react-dom": "^0.0.0-experimental-cb5084d1c-20220924" } From 40480f444052974680a8d795f3b555602b8aa574 Mon Sep 17 00:00:00 2001 From: Matt Kane Date: Fri, 7 Oct 2022 11:59:08 +0100 Subject: [PATCH 039/172] chore: remove npmrc --- demos/canary/.npmrc | 1 - 1 file changed, 1 deletion(-) delete mode 100644 demos/canary/.npmrc diff --git a/demos/canary/.npmrc b/demos/canary/.npmrc deleted file mode 100644 index 521a9f7c07..0000000000 --- a/demos/canary/.npmrc +++ /dev/null @@ -1 +0,0 @@ -legacy-peer-deps=true From d9db61520a2a663e32df348da0a50d27b7db997a Mon Sep 17 00:00:00 2001 From: Matt Kane Date: Fri, 7 Oct 2022 12:07:38 +0100 Subject: [PATCH 040/172] chore: update next and react --- demos/canary/package-lock.json | 284 ++++++++++++++++----------------- demos/canary/package.json | 6 +- 2 files changed, 145 insertions(+), 145 deletions(-) diff --git a/demos/canary/package-lock.json b/demos/canary/package-lock.json index be26b0017c..886119691e 100644 --- a/demos/canary/package-lock.json +++ b/demos/canary/package-lock.json @@ -10,20 +10,20 @@ "license": "MIT", "dependencies": { "nanoid": "^3.3.4", - "next": "^12.3.2-canary.21", - "react": "^0.0.0-experimental-cb5084d1c-20220924", - "react-dom": "^0.0.0-experimental-cb5084d1c-20220924" + "next": "^12.3.2-canary.22", + "react": "^0.0.0-experimental-e40893d09-20221005", + "react-dom": "^0.0.0-experimental-e40893d09-20221005" } }, "node_modules/@next/env": { - "version": "12.3.2-canary.21", - "resolved": "https://registry.npmjs.org/@next/env/-/env-12.3.2-canary.21.tgz", - "integrity": "sha512-FPLie0ru1snn2iLCw60N6wpftFummKCrnJc2J1xrahaKfGPZlCuaJ9rT9l8SceD0+Lp8j1R0zsaxLqVfBuIJjg==" + "version": "12.3.2-canary.22", + "resolved": "https://registry.npmjs.org/@next/env/-/env-12.3.2-canary.22.tgz", + "integrity": "sha512-hKYjqd0LQUOk/jMpsQBQJAFC+rdO5bKoKMUW2Y2P0EnEYMXMWeDOH1edfX0T8k+777mIY6gvg1CBiVCqodlIZA==" }, "node_modules/@next/swc-android-arm-eabi": { - "version": "12.3.2-canary.21", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.3.2-canary.21.tgz", - "integrity": "sha512-02zaX38d/qzEyMjgCavpIT2LB9Wh9iE4SkwCzwoAyUmPitZUW86JT+uz7uO9ioIQzqYrkoPCaryxMc3Sxd+SPA==", + "version": "12.3.2-canary.22", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.3.2-canary.22.tgz", + "integrity": "sha512-PCbt69lrZwSowJIndDiH+8TNzJjxJwk34oCgfziTYxG1mVlUshQC7FsOrST8JGd9AwmJ2kuniaArvuTPb0H1+Q==", "cpu": [ "arm" ], @@ -36,9 +36,9 @@ } }, "node_modules/@next/swc-android-arm64": { - "version": "12.3.2-canary.21", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-12.3.2-canary.21.tgz", - "integrity": "sha512-oMeCHAR2uQtprpy77bbVAZC9N9pEEXzKDBMS/XG8O2ElU+QWBqdr1m8eU+x9IRm8yeq0D8NUZDOBzqiJTvdz6A==", + "version": "12.3.2-canary.22", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-12.3.2-canary.22.tgz", + "integrity": "sha512-Nj1xAWFr+4GLEde6EzcKF5xNE/UaPjHvBj3IDVtcliKAeZR/VUiHWGgzgo34IamP7kPDwQrdcChwYooZYHdRTw==", "cpu": [ "arm64" ], @@ -51,9 +51,9 @@ } }, "node_modules/@next/swc-darwin-arm64": { - "version": "12.3.2-canary.21", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.3.2-canary.21.tgz", - "integrity": "sha512-Q72JTUiyR/0viPgjAMAXjyhmuvrli6vew9Nh2HnIvLPjayFiItwxaKnDOGKoPv5GtW2fq2W237KEIlJLnZvK1A==", + "version": "12.3.2-canary.22", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.3.2-canary.22.tgz", + "integrity": "sha512-3VZcZWq7nqU+XOD40TzaEiLfVAPkd7cJUH0W1QjZkgY6R/8tWRkkEAAfikGvxL8LAhYELbyRpjT9HR3LWDj2iQ==", "cpu": [ "arm64" ], @@ -66,9 +66,9 @@ } }, "node_modules/@next/swc-darwin-x64": { - "version": "12.3.2-canary.21", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.3.2-canary.21.tgz", - "integrity": "sha512-xi5bfH5OULUalohfEawLISQKvb5iZoyiccWBcnxT4u1lf8gi+NpMQsxfMJq7fOflGhbKTpbjmcoJvy13niABNg==", + "version": "12.3.2-canary.22", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.3.2-canary.22.tgz", + "integrity": "sha512-qflk5zjlp9fU5+synJv9b2dZ+NajpG72nnKE01XhKwoAckn/llJMRBZIQzW8mo8awr5HEoGd3A/KedYVhyJpOA==", "cpu": [ "x64" ], @@ -81,9 +81,9 @@ } }, "node_modules/@next/swc-freebsd-x64": { - "version": "12.3.2-canary.21", - "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.3.2-canary.21.tgz", - "integrity": "sha512-HIMlzRtStNPi+yI2fmVCDDtmXeEiW2R+khtiQ17GJk/2sL25HhcMQYLqnKJFBnWbnVQ0v149uBl+zXahpUed+A==", + "version": "12.3.2-canary.22", + "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.3.2-canary.22.tgz", + "integrity": "sha512-6BLMvtsSuaPWsdPoeNrV0Wynjox6fm/SGQJwEeC36Di6i2b3WrW2D3kttwtP1zUrKme04pde+R8NIs8DordCZg==", "cpu": [ "x64" ], @@ -96,9 +96,9 @@ } }, "node_modules/@next/swc-linux-arm-gnueabihf": { - "version": "12.3.2-canary.21", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.3.2-canary.21.tgz", - "integrity": "sha512-4yNd2VyKn8EdlP3w2CAS+vDktXDXGiojAxVfWliqPnoPPEcdHbB+9gHL/DdE0h2PTunsNBYsBj4fm1PbH/dMiA==", + "version": "12.3.2-canary.22", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.3.2-canary.22.tgz", + "integrity": "sha512-tMLpKI5XXOZxT/XCaNqAZvuJmsg9ZfLU8I4tYIuPMJcWg4xY9JXxttZ3UHpFejUxiY2pUWmEGlh7wJxGxL17dg==", "cpu": [ "arm" ], @@ -111,9 +111,9 @@ } }, "node_modules/@next/swc-linux-arm64-gnu": { - "version": "12.3.2-canary.21", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.3.2-canary.21.tgz", - "integrity": "sha512-9lMy55dulV22nFEyklTIkKuSiJYAx3TfGmhp8UgXyEuasMZp/yHV8Z8Zn+x/ts0S0rXXk6pRIv84KBEXzQGaew==", + "version": "12.3.2-canary.22", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.3.2-canary.22.tgz", + "integrity": "sha512-wMdUoIPKQiLgfXnYw+5I/ZhnAqz8FYzI6hn7rOap0IM8kFiMm6TnZj7P3ODgE8tZ+47fs9Gx68jVVLZVptrQeg==", "cpu": [ "arm64" ], @@ -126,9 +126,9 @@ } }, "node_modules/@next/swc-linux-arm64-musl": { - "version": "12.3.2-canary.21", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.3.2-canary.21.tgz", - "integrity": "sha512-DmjzN4YTtO6swU2JGQSjqrNf6artun1uUpmzsTHp9TSGCrYiac9DeWz876aWPF2NhXBwNC2Gktw526Q53bPO4w==", + "version": "12.3.2-canary.22", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.3.2-canary.22.tgz", + "integrity": "sha512-JlOhERUS5tk2WRBnw0wWvJJzVJweGiCcvkNHWJtHlPlvEK8jdfBnBpX7VIVYwqTihCIUS44o51/Lb2/pWbEPwg==", "cpu": [ "arm64" ], @@ -141,9 +141,9 @@ } }, "node_modules/@next/swc-linux-x64-gnu": { - "version": "12.3.2-canary.21", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.3.2-canary.21.tgz", - "integrity": "sha512-39MREKbFcKt23R0tbWWI1oTGQCPB8aw2UYmFiGx2VOgbPLZ9MFo3ogmvxmFEXdEXPX1Wz8knbv0QqnJ/6JGH7g==", + "version": "12.3.2-canary.22", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.3.2-canary.22.tgz", + "integrity": "sha512-HH8FxA8PKs8RKQ2bGG2ogGk3ETR/5bDcH6XiwFUUXcbiFjlzSnCZReHDctbtWDsWWr1X3zfl81m1/H8bTt5dlQ==", "cpu": [ "x64" ], @@ -156,9 +156,9 @@ } }, "node_modules/@next/swc-linux-x64-musl": { - "version": "12.3.2-canary.21", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.3.2-canary.21.tgz", - "integrity": "sha512-2YHom1X30cF7w0Pkx3ZyzYX/aUCGPKPNGKCCtq5Jdx2C94bX3am9DXCYo+fnf3Vyn59YCAFKVpwNMU/mwaoFkw==", + "version": "12.3.2-canary.22", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.3.2-canary.22.tgz", + "integrity": "sha512-xYV5bwO6DcLbcQlpzhqyVevFikHLzAM4BN/idzhmtBRQGSWiLkbImunOVX0IQgaSgNjK6rPjFOPnGgRXYINNUw==", "cpu": [ "x64" ], @@ -171,9 +171,9 @@ } }, "node_modules/@next/swc-win32-arm64-msvc": { - "version": "12.3.2-canary.21", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.3.2-canary.21.tgz", - "integrity": "sha512-CKOs+lcjRMWPnX/SvkEnQvLBhP8hw7KiLGTmJ+MLxhChXvUctQOibVqWs165ycIQ5PwRnahAQnMCXY90wwy42w==", + "version": "12.3.2-canary.22", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.3.2-canary.22.tgz", + "integrity": "sha512-ORVOh8u9c/s9q4XbkCJXtirsH/rDIDgEPN/QN4E+2mNxuzF9Yhn5cGbKxwSHk+Y+JF+0l7IF4E1yt4vye4KFpw==", "cpu": [ "arm64" ], @@ -186,9 +186,9 @@ } }, "node_modules/@next/swc-win32-ia32-msvc": { - "version": "12.3.2-canary.21", - "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.3.2-canary.21.tgz", - "integrity": "sha512-5LFKpcQHC618SyHwI43EFmnd8569RPk9MB0paIQE51ssY9zwdBq5GtjkX3q6gvCf+dpdkZQLLHlTeOORN7bQDA==", + "version": "12.3.2-canary.22", + "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.3.2-canary.22.tgz", + "integrity": "sha512-wepqFNoESBmeNjJLlXWSM8T7/oSmKAWiDjkflIKJnvGAIfifvOj8HRXbCM5SYSd0jeNBjIXNLFj0fEEyOuL96w==", "cpu": [ "ia32" ], @@ -201,9 +201,9 @@ } }, "node_modules/@next/swc-win32-x64-msvc": { - "version": "12.3.2-canary.21", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.3.2-canary.21.tgz", - "integrity": "sha512-1cXz2iL81/H15s2kbho7UUDE0LX7Xx957SPhEx1urR9f3AmuUM3FU2GsW+05qhV3Yp0QVD3r+bppy8SX00XZRw==", + "version": "12.3.2-canary.22", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.3.2-canary.22.tgz", + "integrity": "sha512-Sffgisb3qiMJk66qxSNd+N5wNNwVHLMheanzxVwBRtMu/6kLYvePiMOy2EK9nJIXt9GctBS7IyG16kNqKFQb7w==", "cpu": [ "x64" ], @@ -266,11 +266,11 @@ } }, "node_modules/next": { - "version": "12.3.2-canary.21", - "resolved": "https://registry.npmjs.org/next/-/next-12.3.2-canary.21.tgz", - "integrity": "sha512-d9p4xur6gwuyFJa2qPtAGXVS+xiBQ0gWyN3ZM/4BoyExnKlNj7ETXsQtMAS5W8Vt7iglaotxXhNT6xBrgBqmZw==", + "version": "12.3.2-canary.22", + "resolved": "https://registry.npmjs.org/next/-/next-12.3.2-canary.22.tgz", + "integrity": "sha512-/ej8/UJW3UiO75sPtjUfS1eibJsstYWEpm2iHBKj7WV6mdMnfRySNAJAgdKRnDS2HtSrL9rbXKD1k1AZ8UYS5Q==", "dependencies": { - "@next/env": "12.3.2-canary.21", + "@next/env": "12.3.2-canary.22", "@swc/helpers": "0.4.11", "caniuse-lite": "^1.0.30001406", "postcss": "8.4.14", @@ -284,19 +284,19 @@ "node": ">=14.0.0" }, "optionalDependencies": { - "@next/swc-android-arm-eabi": "12.3.2-canary.21", - "@next/swc-android-arm64": "12.3.2-canary.21", - "@next/swc-darwin-arm64": "12.3.2-canary.21", - "@next/swc-darwin-x64": "12.3.2-canary.21", - "@next/swc-freebsd-x64": "12.3.2-canary.21", - "@next/swc-linux-arm-gnueabihf": "12.3.2-canary.21", - "@next/swc-linux-arm64-gnu": "12.3.2-canary.21", - "@next/swc-linux-arm64-musl": "12.3.2-canary.21", - "@next/swc-linux-x64-gnu": "12.3.2-canary.21", - "@next/swc-linux-x64-musl": "12.3.2-canary.21", - "@next/swc-win32-arm64-msvc": "12.3.2-canary.21", - "@next/swc-win32-ia32-msvc": "12.3.2-canary.21", - "@next/swc-win32-x64-msvc": "12.3.2-canary.21" + "@next/swc-android-arm-eabi": "12.3.2-canary.22", + "@next/swc-android-arm64": "12.3.2-canary.22", + "@next/swc-darwin-arm64": "12.3.2-canary.22", + "@next/swc-darwin-x64": "12.3.2-canary.22", + "@next/swc-freebsd-x64": "12.3.2-canary.22", + "@next/swc-linux-arm-gnueabihf": "12.3.2-canary.22", + "@next/swc-linux-arm64-gnu": "12.3.2-canary.22", + "@next/swc-linux-arm64-musl": "12.3.2-canary.22", + "@next/swc-linux-x64-gnu": "12.3.2-canary.22", + "@next/swc-linux-x64-musl": "12.3.2-canary.22", + "@next/swc-win32-arm64-msvc": "12.3.2-canary.22", + "@next/swc-win32-ia32-msvc": "12.3.2-canary.22", + "@next/swc-win32-x64-msvc": "12.3.2-canary.22" }, "peerDependencies": { "fibers": ">= 3.1.0", @@ -346,9 +346,9 @@ } }, "node_modules/react": { - "version": "0.0.0-experimental-cb5084d1c-20220924", - "resolved": "https://registry.npmjs.org/react/-/react-0.0.0-experimental-cb5084d1c-20220924.tgz", - "integrity": "sha512-66AdfxkJrwCaCEKT0LQRd9J9GQ9T+yN7Wx9XT+tNxKycYQ0Exm+DZxOTedagWDlsFMXroyhrTWzgdC18R2PaOQ==", + "version": "0.0.0-experimental-e40893d09-20221005", + "resolved": "https://registry.npmjs.org/react/-/react-0.0.0-experimental-e40893d09-20221005.tgz", + "integrity": "sha512-Ecty2+zCaj6yG/4QC5cdhwRQ2kF3FuMMniyUxvmfvtlz9oOMus3tQpnEeITD01rN/nkDO8CXqQfdChSk/qVL6w==", "dependencies": { "loose-envify": "^1.1.0" }, @@ -357,21 +357,21 @@ } }, "node_modules/react-dom": { - "version": "0.0.0-experimental-cb5084d1c-20220924", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-0.0.0-experimental-cb5084d1c-20220924.tgz", - "integrity": "sha512-0IHzPGHESn3uu8nI1w5596GX8bCGCE94DpaHkKSGWOlB6uhoVecU0fyOCkkNuB4cMc9WeOWiH2gsM100EWZDPQ==", + "version": "0.0.0-experimental-e40893d09-20221005", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-0.0.0-experimental-e40893d09-20221005.tgz", + "integrity": "sha512-Zw1FWTy9XEiiLU1KCYFpLUs1KAMiNfWW1Clz0DCX1diGLeSfBhp2Jd3/7+v8U9SWs3jFFZJ2ttTOgTs+T2aheA==", "dependencies": { "loose-envify": "^1.1.0", - "scheduler": "0.0.0-experimental-cb5084d1c-20220924" + "scheduler": "0.0.0-experimental-e40893d09-20221005" }, "peerDependencies": { - "react": "0.0.0-experimental-cb5084d1c-20220924" + "react": "0.0.0-experimental-e40893d09-20221005" } }, "node_modules/scheduler": { - "version": "0.0.0-experimental-cb5084d1c-20220924", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.0.0-experimental-cb5084d1c-20220924.tgz", - "integrity": "sha512-SeszKCdhM5OHxNMStjpKIAaloARUMZqIpDZjkZeGuRsyr7YlAqvlsCXyee4ZQOOU1pbr7BIvQntKy5Hil+DQJA==", + "version": "0.0.0-experimental-e40893d09-20221005", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.0.0-experimental-e40893d09-20221005.tgz", + "integrity": "sha512-rvE4D7bJ9P97/Ukc8zh3fTbRi5kGB4xBus3fuWhs1afwSJH7P5LIo6mtL9eO7o69KdxyYfcjjIB2i+P8yrSOGA==", "dependencies": { "loose-envify": "^1.1.0" } @@ -419,86 +419,86 @@ }, "dependencies": { "@next/env": { - "version": "12.3.2-canary.21", - "resolved": "https://registry.npmjs.org/@next/env/-/env-12.3.2-canary.21.tgz", - "integrity": "sha512-FPLie0ru1snn2iLCw60N6wpftFummKCrnJc2J1xrahaKfGPZlCuaJ9rT9l8SceD0+Lp8j1R0zsaxLqVfBuIJjg==" + "version": "12.3.2-canary.22", + "resolved": "https://registry.npmjs.org/@next/env/-/env-12.3.2-canary.22.tgz", + "integrity": "sha512-hKYjqd0LQUOk/jMpsQBQJAFC+rdO5bKoKMUW2Y2P0EnEYMXMWeDOH1edfX0T8k+777mIY6gvg1CBiVCqodlIZA==" }, "@next/swc-android-arm-eabi": { - "version": "12.3.2-canary.21", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.3.2-canary.21.tgz", - "integrity": "sha512-02zaX38d/qzEyMjgCavpIT2LB9Wh9iE4SkwCzwoAyUmPitZUW86JT+uz7uO9ioIQzqYrkoPCaryxMc3Sxd+SPA==", + "version": "12.3.2-canary.22", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.3.2-canary.22.tgz", + "integrity": "sha512-PCbt69lrZwSowJIndDiH+8TNzJjxJwk34oCgfziTYxG1mVlUshQC7FsOrST8JGd9AwmJ2kuniaArvuTPb0H1+Q==", "optional": true }, "@next/swc-android-arm64": { - "version": "12.3.2-canary.21", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-12.3.2-canary.21.tgz", - "integrity": "sha512-oMeCHAR2uQtprpy77bbVAZC9N9pEEXzKDBMS/XG8O2ElU+QWBqdr1m8eU+x9IRm8yeq0D8NUZDOBzqiJTvdz6A==", + "version": "12.3.2-canary.22", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-12.3.2-canary.22.tgz", + "integrity": "sha512-Nj1xAWFr+4GLEde6EzcKF5xNE/UaPjHvBj3IDVtcliKAeZR/VUiHWGgzgo34IamP7kPDwQrdcChwYooZYHdRTw==", "optional": true }, "@next/swc-darwin-arm64": { - "version": "12.3.2-canary.21", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.3.2-canary.21.tgz", - "integrity": "sha512-Q72JTUiyR/0viPgjAMAXjyhmuvrli6vew9Nh2HnIvLPjayFiItwxaKnDOGKoPv5GtW2fq2W237KEIlJLnZvK1A==", + "version": "12.3.2-canary.22", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.3.2-canary.22.tgz", + "integrity": "sha512-3VZcZWq7nqU+XOD40TzaEiLfVAPkd7cJUH0W1QjZkgY6R/8tWRkkEAAfikGvxL8LAhYELbyRpjT9HR3LWDj2iQ==", "optional": true }, "@next/swc-darwin-x64": { - "version": "12.3.2-canary.21", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.3.2-canary.21.tgz", - "integrity": "sha512-xi5bfH5OULUalohfEawLISQKvb5iZoyiccWBcnxT4u1lf8gi+NpMQsxfMJq7fOflGhbKTpbjmcoJvy13niABNg==", + "version": "12.3.2-canary.22", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.3.2-canary.22.tgz", + "integrity": "sha512-qflk5zjlp9fU5+synJv9b2dZ+NajpG72nnKE01XhKwoAckn/llJMRBZIQzW8mo8awr5HEoGd3A/KedYVhyJpOA==", "optional": true }, "@next/swc-freebsd-x64": { - "version": "12.3.2-canary.21", - "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.3.2-canary.21.tgz", - "integrity": "sha512-HIMlzRtStNPi+yI2fmVCDDtmXeEiW2R+khtiQ17GJk/2sL25HhcMQYLqnKJFBnWbnVQ0v149uBl+zXahpUed+A==", + "version": "12.3.2-canary.22", + "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.3.2-canary.22.tgz", + "integrity": "sha512-6BLMvtsSuaPWsdPoeNrV0Wynjox6fm/SGQJwEeC36Di6i2b3WrW2D3kttwtP1zUrKme04pde+R8NIs8DordCZg==", "optional": true }, "@next/swc-linux-arm-gnueabihf": { - "version": "12.3.2-canary.21", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.3.2-canary.21.tgz", - "integrity": "sha512-4yNd2VyKn8EdlP3w2CAS+vDktXDXGiojAxVfWliqPnoPPEcdHbB+9gHL/DdE0h2PTunsNBYsBj4fm1PbH/dMiA==", + "version": "12.3.2-canary.22", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.3.2-canary.22.tgz", + "integrity": "sha512-tMLpKI5XXOZxT/XCaNqAZvuJmsg9ZfLU8I4tYIuPMJcWg4xY9JXxttZ3UHpFejUxiY2pUWmEGlh7wJxGxL17dg==", "optional": true }, "@next/swc-linux-arm64-gnu": { - "version": "12.3.2-canary.21", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.3.2-canary.21.tgz", - "integrity": "sha512-9lMy55dulV22nFEyklTIkKuSiJYAx3TfGmhp8UgXyEuasMZp/yHV8Z8Zn+x/ts0S0rXXk6pRIv84KBEXzQGaew==", + "version": "12.3.2-canary.22", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.3.2-canary.22.tgz", + "integrity": "sha512-wMdUoIPKQiLgfXnYw+5I/ZhnAqz8FYzI6hn7rOap0IM8kFiMm6TnZj7P3ODgE8tZ+47fs9Gx68jVVLZVptrQeg==", "optional": true }, "@next/swc-linux-arm64-musl": { - "version": "12.3.2-canary.21", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.3.2-canary.21.tgz", - "integrity": "sha512-DmjzN4YTtO6swU2JGQSjqrNf6artun1uUpmzsTHp9TSGCrYiac9DeWz876aWPF2NhXBwNC2Gktw526Q53bPO4w==", + "version": "12.3.2-canary.22", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.3.2-canary.22.tgz", + "integrity": "sha512-JlOhERUS5tk2WRBnw0wWvJJzVJweGiCcvkNHWJtHlPlvEK8jdfBnBpX7VIVYwqTihCIUS44o51/Lb2/pWbEPwg==", "optional": true }, "@next/swc-linux-x64-gnu": { - "version": "12.3.2-canary.21", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.3.2-canary.21.tgz", - "integrity": "sha512-39MREKbFcKt23R0tbWWI1oTGQCPB8aw2UYmFiGx2VOgbPLZ9MFo3ogmvxmFEXdEXPX1Wz8knbv0QqnJ/6JGH7g==", + "version": "12.3.2-canary.22", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.3.2-canary.22.tgz", + "integrity": "sha512-HH8FxA8PKs8RKQ2bGG2ogGk3ETR/5bDcH6XiwFUUXcbiFjlzSnCZReHDctbtWDsWWr1X3zfl81m1/H8bTt5dlQ==", "optional": true }, "@next/swc-linux-x64-musl": { - "version": "12.3.2-canary.21", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.3.2-canary.21.tgz", - "integrity": "sha512-2YHom1X30cF7w0Pkx3ZyzYX/aUCGPKPNGKCCtq5Jdx2C94bX3am9DXCYo+fnf3Vyn59YCAFKVpwNMU/mwaoFkw==", + "version": "12.3.2-canary.22", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.3.2-canary.22.tgz", + "integrity": "sha512-xYV5bwO6DcLbcQlpzhqyVevFikHLzAM4BN/idzhmtBRQGSWiLkbImunOVX0IQgaSgNjK6rPjFOPnGgRXYINNUw==", "optional": true }, "@next/swc-win32-arm64-msvc": { - "version": "12.3.2-canary.21", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.3.2-canary.21.tgz", - "integrity": "sha512-CKOs+lcjRMWPnX/SvkEnQvLBhP8hw7KiLGTmJ+MLxhChXvUctQOibVqWs165ycIQ5PwRnahAQnMCXY90wwy42w==", + "version": "12.3.2-canary.22", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.3.2-canary.22.tgz", + "integrity": "sha512-ORVOh8u9c/s9q4XbkCJXtirsH/rDIDgEPN/QN4E+2mNxuzF9Yhn5cGbKxwSHk+Y+JF+0l7IF4E1yt4vye4KFpw==", "optional": true }, "@next/swc-win32-ia32-msvc": { - "version": "12.3.2-canary.21", - "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.3.2-canary.21.tgz", - "integrity": "sha512-5LFKpcQHC618SyHwI43EFmnd8569RPk9MB0paIQE51ssY9zwdBq5GtjkX3q6gvCf+dpdkZQLLHlTeOORN7bQDA==", + "version": "12.3.2-canary.22", + "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.3.2-canary.22.tgz", + "integrity": "sha512-wepqFNoESBmeNjJLlXWSM8T7/oSmKAWiDjkflIKJnvGAIfifvOj8HRXbCM5SYSd0jeNBjIXNLFj0fEEyOuL96w==", "optional": true }, "@next/swc-win32-x64-msvc": { - "version": "12.3.2-canary.21", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.3.2-canary.21.tgz", - "integrity": "sha512-1cXz2iL81/H15s2kbho7UUDE0LX7Xx957SPhEx1urR9f3AmuUM3FU2GsW+05qhV3Yp0QVD3r+bppy8SX00XZRw==", + "version": "12.3.2-canary.22", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.3.2-canary.22.tgz", + "integrity": "sha512-Sffgisb3qiMJk66qxSNd+N5wNNwVHLMheanzxVwBRtMu/6kLYvePiMOy2EK9nJIXt9GctBS7IyG16kNqKFQb7w==", "optional": true }, "@swc/helpers": { @@ -533,24 +533,24 @@ "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==" }, "next": { - "version": "12.3.2-canary.21", - "resolved": "https://registry.npmjs.org/next/-/next-12.3.2-canary.21.tgz", - "integrity": "sha512-d9p4xur6gwuyFJa2qPtAGXVS+xiBQ0gWyN3ZM/4BoyExnKlNj7ETXsQtMAS5W8Vt7iglaotxXhNT6xBrgBqmZw==", + "version": "12.3.2-canary.22", + "resolved": "https://registry.npmjs.org/next/-/next-12.3.2-canary.22.tgz", + "integrity": "sha512-/ej8/UJW3UiO75sPtjUfS1eibJsstYWEpm2iHBKj7WV6mdMnfRySNAJAgdKRnDS2HtSrL9rbXKD1k1AZ8UYS5Q==", "requires": { - "@next/env": "12.3.2-canary.21", - "@next/swc-android-arm-eabi": "12.3.2-canary.21", - "@next/swc-android-arm64": "12.3.2-canary.21", - "@next/swc-darwin-arm64": "12.3.2-canary.21", - "@next/swc-darwin-x64": "12.3.2-canary.21", - "@next/swc-freebsd-x64": "12.3.2-canary.21", - "@next/swc-linux-arm-gnueabihf": "12.3.2-canary.21", - "@next/swc-linux-arm64-gnu": "12.3.2-canary.21", - "@next/swc-linux-arm64-musl": "12.3.2-canary.21", - "@next/swc-linux-x64-gnu": "12.3.2-canary.21", - "@next/swc-linux-x64-musl": "12.3.2-canary.21", - "@next/swc-win32-arm64-msvc": "12.3.2-canary.21", - "@next/swc-win32-ia32-msvc": "12.3.2-canary.21", - "@next/swc-win32-x64-msvc": "12.3.2-canary.21", + "@next/env": "12.3.2-canary.22", + "@next/swc-android-arm-eabi": "12.3.2-canary.22", + "@next/swc-android-arm64": "12.3.2-canary.22", + "@next/swc-darwin-arm64": "12.3.2-canary.22", + "@next/swc-darwin-x64": "12.3.2-canary.22", + "@next/swc-freebsd-x64": "12.3.2-canary.22", + "@next/swc-linux-arm-gnueabihf": "12.3.2-canary.22", + "@next/swc-linux-arm64-gnu": "12.3.2-canary.22", + "@next/swc-linux-arm64-musl": "12.3.2-canary.22", + "@next/swc-linux-x64-gnu": "12.3.2-canary.22", + "@next/swc-linux-x64-musl": "12.3.2-canary.22", + "@next/swc-win32-arm64-msvc": "12.3.2-canary.22", + "@next/swc-win32-ia32-msvc": "12.3.2-canary.22", + "@next/swc-win32-x64-msvc": "12.3.2-canary.22", "@swc/helpers": "0.4.11", "caniuse-lite": "^1.0.30001406", "postcss": "8.4.14", @@ -574,26 +574,26 @@ } }, "react": { - "version": "0.0.0-experimental-cb5084d1c-20220924", - "resolved": "https://registry.npmjs.org/react/-/react-0.0.0-experimental-cb5084d1c-20220924.tgz", - "integrity": "sha512-66AdfxkJrwCaCEKT0LQRd9J9GQ9T+yN7Wx9XT+tNxKycYQ0Exm+DZxOTedagWDlsFMXroyhrTWzgdC18R2PaOQ==", + "version": "0.0.0-experimental-e40893d09-20221005", + "resolved": "https://registry.npmjs.org/react/-/react-0.0.0-experimental-e40893d09-20221005.tgz", + "integrity": "sha512-Ecty2+zCaj6yG/4QC5cdhwRQ2kF3FuMMniyUxvmfvtlz9oOMus3tQpnEeITD01rN/nkDO8CXqQfdChSk/qVL6w==", "requires": { "loose-envify": "^1.1.0" } }, "react-dom": { - "version": "0.0.0-experimental-cb5084d1c-20220924", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-0.0.0-experimental-cb5084d1c-20220924.tgz", - "integrity": "sha512-0IHzPGHESn3uu8nI1w5596GX8bCGCE94DpaHkKSGWOlB6uhoVecU0fyOCkkNuB4cMc9WeOWiH2gsM100EWZDPQ==", + "version": "0.0.0-experimental-e40893d09-20221005", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-0.0.0-experimental-e40893d09-20221005.tgz", + "integrity": "sha512-Zw1FWTy9XEiiLU1KCYFpLUs1KAMiNfWW1Clz0DCX1diGLeSfBhp2Jd3/7+v8U9SWs3jFFZJ2ttTOgTs+T2aheA==", "requires": { "loose-envify": "^1.1.0", - "scheduler": "0.0.0-experimental-cb5084d1c-20220924" + "scheduler": "0.0.0-experimental-e40893d09-20221005" } }, "scheduler": { - "version": "0.0.0-experimental-cb5084d1c-20220924", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.0.0-experimental-cb5084d1c-20220924.tgz", - "integrity": "sha512-SeszKCdhM5OHxNMStjpKIAaloARUMZqIpDZjkZeGuRsyr7YlAqvlsCXyee4ZQOOU1pbr7BIvQntKy5Hil+DQJA==", + "version": "0.0.0-experimental-e40893d09-20221005", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.0.0-experimental-e40893d09-20221005.tgz", + "integrity": "sha512-rvE4D7bJ9P97/Ukc8zh3fTbRi5kGB4xBus3fuWhs1afwSJH7P5LIo6mtL9eO7o69KdxyYfcjjIB2i+P8yrSOGA==", "requires": { "loose-envify": "^1.1.0" } diff --git a/demos/canary/package.json b/demos/canary/package.json index 1ccd3f22ab..055d89c498 100644 --- a/demos/canary/package.json +++ b/demos/canary/package.json @@ -9,8 +9,8 @@ "license": "MIT", "dependencies": { "nanoid": "^3.3.4", - "next": "^12.3.2-canary.21", - "react": "^0.0.0-experimental-cb5084d1c-20220924", - "react-dom": "^0.0.0-experimental-cb5084d1c-20220924" + "next": "^12.3.2-canary.22", + "react": "^0.0.0-experimental-e40893d09-20221005", + "react-dom": "^0.0.0-experimental-e40893d09-20221005" } } From 410a405f5843bd4366b18173e9eb707476f383c8 Mon Sep 17 00:00:00 2001 From: Matt Kane Date: Fri, 7 Oct 2022 12:42:58 +0100 Subject: [PATCH 041/172] chore: update test site --- .../app/(rootonly)/dashboard/hello/page.js | 4 ++ .../app/dashboard/deployments/[id]/data.json | 3 ++ .../app/dashboard/deployments/[id]/page.js | 9 ++++ .../index/dynamic-imports/dynamic-client.js | 2 +- .../index/dynamic-imports/dynamic-server.js | 2 +- .../app/nested-navigation/CategoryNav.js | 28 +++++++++++ .../app/nested-navigation/TabNavItem.js | 9 ++++ .../[categorySlug]/SubCategoryNav.js | 31 ++++++++++++ .../[categorySlug]/[subCategorySlug]/page.js | 11 ++++ .../[categorySlug]/layout.js | 14 ++++++ .../nested-navigation/[categorySlug]/page.js | 9 ++++ .../app/nested-navigation/getCategories.js | 50 +++++++++++++++++++ demos/canary/app/nested-navigation/layout.js | 17 +++++++ demos/canary/app/nested-navigation/page.js | 3 ++ 14 files changed, 190 insertions(+), 2 deletions(-) create mode 100644 demos/canary/app/dashboard/deployments/[id]/data.json create mode 100644 demos/canary/app/nested-navigation/CategoryNav.js create mode 100644 demos/canary/app/nested-navigation/TabNavItem.js create mode 100644 demos/canary/app/nested-navigation/[categorySlug]/SubCategoryNav.js create mode 100644 demos/canary/app/nested-navigation/[categorySlug]/[subCategorySlug]/page.js create mode 100644 demos/canary/app/nested-navigation/[categorySlug]/layout.js create mode 100644 demos/canary/app/nested-navigation/[categorySlug]/page.js create mode 100644 demos/canary/app/nested-navigation/getCategories.js create mode 100644 demos/canary/app/nested-navigation/layout.js create mode 100644 demos/canary/app/nested-navigation/page.js diff --git a/demos/canary/app/(rootonly)/dashboard/hello/page.js b/demos/canary/app/(rootonly)/dashboard/hello/page.js index f7d874bf7c..20fef22a73 100644 --- a/demos/canary/app/(rootonly)/dashboard/hello/page.js +++ b/demos/canary/app/(rootonly)/dashboard/hello/page.js @@ -5,3 +5,7 @@ export default function HelloPage(props) { ) } + +export const config = { + runtime: 'experimental-edge', +} diff --git a/demos/canary/app/dashboard/deployments/[id]/data.json b/demos/canary/app/dashboard/deployments/[id]/data.json new file mode 100644 index 0000000000..f2a886f39d --- /dev/null +++ b/demos/canary/app/dashboard/deployments/[id]/data.json @@ -0,0 +1,3 @@ +{ + "hello": "world" +} diff --git a/demos/canary/app/dashboard/deployments/[id]/page.js b/demos/canary/app/dashboard/deployments/[id]/page.js index 7d548c4226..2dd26002d2 100644 --- a/demos/canary/app/dashboard/deployments/[id]/page.js +++ b/demos/canary/app/dashboard/deployments/[id]/page.js @@ -1,6 +1,15 @@ import { experimental_use as use } from 'react' +import fs from 'fs' +import path from 'path' async function getData({ params }) { + const data = JSON.parse( + fs.readFileSync( + path.join(process.cwd(), 'app/dashboard/deployments/[id]/data.json') + ) + ) + console.log('data.json', data) + return { id: params.id, } diff --git a/demos/canary/app/dashboard/index/dynamic-imports/dynamic-client.js b/demos/canary/app/dashboard/index/dynamic-imports/dynamic-client.js index 63dcccc63c..2d0f36e76b 100644 --- a/demos/canary/app/dashboard/index/dynamic-imports/dynamic-client.js +++ b/demos/canary/app/dashboard/index/dynamic-imports/dynamic-client.js @@ -1,6 +1,6 @@ 'client' -import dynamic from 'next/dist/client/components/shared/dynamic' +import dynamic from 'next/dynamic' const Dynamic = dynamic(() => import('../text-dynamic-client')) diff --git a/demos/canary/app/dashboard/index/dynamic-imports/dynamic-server.js b/demos/canary/app/dashboard/index/dynamic-imports/dynamic-server.js index 0d9406e90f..665da40efa 100644 --- a/demos/canary/app/dashboard/index/dynamic-imports/dynamic-server.js +++ b/demos/canary/app/dashboard/index/dynamic-imports/dynamic-server.js @@ -1,4 +1,4 @@ -import dynamic from 'next/dist/client/components/shared/dynamic' +import dynamic from 'next/dynamic' const Dynamic = dynamic(() => import('../text-dynamic-server')) diff --git a/demos/canary/app/nested-navigation/CategoryNav.js b/demos/canary/app/nested-navigation/CategoryNav.js new file mode 100644 index 0000000000..718d82ec07 --- /dev/null +++ b/demos/canary/app/nested-navigation/CategoryNav.js @@ -0,0 +1,28 @@ +'client' + +import { TabNavItem } from './TabNavItem' +import { useSelectedLayoutSegment } from 'next/dist/client/components/hooks-client' + +const CategoryNav = ({ categories }) => { + const selectedLayoutSegment = useSelectedLayoutSegment() + + return ( +
+ + Home + + + {categories.map((item) => ( + + {item.name} + + ))} +
+ ) +} + +export default CategoryNav diff --git a/demos/canary/app/nested-navigation/TabNavItem.js b/demos/canary/app/nested-navigation/TabNavItem.js new file mode 100644 index 0000000000..3e1cbf3dd9 --- /dev/null +++ b/demos/canary/app/nested-navigation/TabNavItem.js @@ -0,0 +1,9 @@ +import Link from 'next/link' + +export const TabNavItem = ({ children, href }) => { + return ( + + {children} + + ) +} diff --git a/demos/canary/app/nested-navigation/[categorySlug]/SubCategoryNav.js b/demos/canary/app/nested-navigation/[categorySlug]/SubCategoryNav.js new file mode 100644 index 0000000000..4118c34c77 --- /dev/null +++ b/demos/canary/app/nested-navigation/[categorySlug]/SubCategoryNav.js @@ -0,0 +1,31 @@ +'client' + +import { TabNavItem } from '../TabNavItem' +import { useSelectedLayoutSegment } from 'next/dist/client/components/hooks-client' + +const SubCategoryNav = ({ category }) => { + const selectedLayoutSegment = useSelectedLayoutSegment() + + return ( +
+ + All + + + {category.items.map((item) => ( + + {item.name} + + ))} +
+ ) +} + +export default SubCategoryNav diff --git a/demos/canary/app/nested-navigation/[categorySlug]/[subCategorySlug]/page.js b/demos/canary/app/nested-navigation/[categorySlug]/[subCategorySlug]/page.js new file mode 100644 index 0000000000..a43f15792c --- /dev/null +++ b/demos/canary/app/nested-navigation/[categorySlug]/[subCategorySlug]/page.js @@ -0,0 +1,11 @@ +import { experimental_use as use } from 'react' +import { fetchSubCategory } from '../../getCategories' + +export default function Page({ params }) { + const category = use( + fetchSubCategory(params.categorySlug, params.subCategorySlug) + ) + if (!category) return null + + return

{category.name}

+} diff --git a/demos/canary/app/nested-navigation/[categorySlug]/layout.js b/demos/canary/app/nested-navigation/[categorySlug]/layout.js new file mode 100644 index 0000000000..63bee78e87 --- /dev/null +++ b/demos/canary/app/nested-navigation/[categorySlug]/layout.js @@ -0,0 +1,14 @@ +import { experimental_use as use } from 'react' +import { fetchCategoryBySlug } from '../getCategories' +import SubCategoryNav from './SubCategoryNav' + +export default function Layout({ children, params }) { + const category = use(fetchCategoryBySlug(params.categorySlug)) + if (!category) return null + return ( + <> + + {children} + + ) +} diff --git a/demos/canary/app/nested-navigation/[categorySlug]/page.js b/demos/canary/app/nested-navigation/[categorySlug]/page.js new file mode 100644 index 0000000000..b2e0a866c0 --- /dev/null +++ b/demos/canary/app/nested-navigation/[categorySlug]/page.js @@ -0,0 +1,9 @@ +import { experimental_use as use } from 'react' +import { fetchCategoryBySlug } from '../getCategories' + +export default function Page({ params }) { + const category = use(fetchCategoryBySlug(params.categorySlug)) + if (!category) return null + + return

All {category.name}

+} diff --git a/demos/canary/app/nested-navigation/getCategories.js b/demos/canary/app/nested-navigation/getCategories.js new file mode 100644 index 0000000000..c5da031c72 --- /dev/null +++ b/demos/canary/app/nested-navigation/getCategories.js @@ -0,0 +1,50 @@ +export const getCategories = () => [ + { + name: 'Electronics', + slug: 'electronics', + count: 11, + items: [ + { name: 'Phones', slug: 'phones', count: 4 }, + { name: 'Tablets', slug: 'tablets', count: 5 }, + { name: 'Laptops', slug: 'laptops', count: 2 }, + ], + }, + { + name: 'Clothing', + slug: 'clothing', + count: 12, + items: [ + { name: 'Tops', slug: 'tops', count: 3 }, + { name: 'Shorts', slug: 'shorts', count: 4 }, + { name: 'Shoes', slug: 'shoes', count: 5 }, + ], + }, + { + name: 'Books', + slug: 'books', + count: 10, + items: [ + { name: 'Fiction', slug: 'fiction', count: 5 }, + { name: 'Biography', slug: 'biography', count: 2 }, + { name: 'Education', slug: 'education', count: 3 }, + ], + }, +] + +export async function fetchCategoryBySlug(slug) { + // Assuming it always return expected categories + return getCategories().find((category) => category.slug === slug) +} + +export async function fetchCategories() { + return getCategories() +} + +async function findSubCategory(category, subCategorySlug) { + return category?.items.find((category) => category.slug === subCategorySlug) +} + +export async function fetchSubCategory(categorySlug, subCategorySlug) { + const category = await fetchCategoryBySlug(categorySlug) + return findSubCategory(category, subCategorySlug) +} diff --git a/demos/canary/app/nested-navigation/layout.js b/demos/canary/app/nested-navigation/layout.js new file mode 100644 index 0000000000..43a2a79ec9 --- /dev/null +++ b/demos/canary/app/nested-navigation/layout.js @@ -0,0 +1,17 @@ +import { experimental_use as use } from 'react' +import { fetchCategories } from './getCategories' +import React from 'react' +import CategoryNav from './CategoryNav' + +export default function Layout({ children }) { + const categories = use(fetchCategories()) + return ( +
+
+ +
+ +
{children}
+
+ ) +} diff --git a/demos/canary/app/nested-navigation/page.js b/demos/canary/app/nested-navigation/page.js new file mode 100644 index 0000000000..9833f2b17c --- /dev/null +++ b/demos/canary/app/nested-navigation/page.js @@ -0,0 +1,3 @@ +export default function Page() { + return

Home

+} From 64491147d99bebc275accbcf34efdd191297391b Mon Sep 17 00:00:00 2001 From: Matt Kane Date: Fri, 7 Oct 2022 12:52:07 +0100 Subject: [PATCH 042/172] chore: update tests --- test/e2e/canary/appdir.spec.ts | 167 ++++++++++++++++++++++----------- 1 file changed, 113 insertions(+), 54 deletions(-) diff --git a/test/e2e/canary/appdir.spec.ts b/test/e2e/canary/appdir.spec.ts index f501c92eba..c0c5978c73 100644 --- a/test/e2e/canary/appdir.spec.ts +++ b/test/e2e/canary/appdir.spec.ts @@ -8,6 +8,7 @@ import { fetchViaHTTP, renderViaHTTP, waitFor } from '../next-test-lib/next-test import { load } from 'cheerio' import webdriver from '../next-test-lib/next-webdriver' const nextUrl = process.env.SITE_URL || 'http://localhost:8888' +const next = { url: nextUrl } describe('app dir', () => { beforeAll(() => { @@ -77,6 +78,11 @@ describe('app dir', () => { expect(html).toContain('hello from dynamic on client') }) + it('should serve polyfills for browsers that do not support modules', async () => { + const html = await renderViaHTTP(nextUrl, '/dashboard/index') + expect(html).toMatch(/ + + + +
+ + + + ) + } + `, + 'pages/index.js': ` + export default function Home() { + return ( + <> +

Home page

+ + ) + } + `, + }, + dependencies: { + react: 'latest', + 'react-dom': 'latest', + }, + }) + }) + afterAll(() => next.destroy()) + + it('Script is injected server-side', async () => { + let browser: BrowserInterface + + try { + browser = await webdriver(next.url, '/') + + const script = await browser.eval( + `document.querySelector('script[data-nscript="beforeInteractive"]')` + ) + expect(script).not.toBeNull() + } finally { + if (browser) await browser.close() + } + }) +}) + +describe('beforeInteractive in document body', () => { + let next: NextInstance + + beforeAll(async () => { + next = await createNext({ + files: { + 'pages/_document.js': ` + import { Html, Head, Main, NextScript } from 'next/document' + import Script from 'next/script' + + export default function Document() { + return ( + + + +
+ + ` + ) + + try { + browser = await webdriver(next.url, '/') + + // Partytown modifies type to "text/partytown-x" after it has been executed in the web worker + await check(async () => { + const processedWorkerScripts = await browser.eval( + `document.querySelectorAll('script[type="text/partytown-x"]').length` + ) + return processedWorkerScripts + '' + }, '1') + + const text = await browser.elementById('text').text() + expect(text).toBe('abc') + } finally { + if (browser) await browser.close() + await next.destroy() + } + }) + + it('Inline worker script through dangerouslySetInnerHtml is modified by Partytown to execute on a worker thread', async () => { + let next: NextInstance + let browser: BrowserInterface + + next = await createNextApp( + ` - - -
- - - - ) - } - `, - 'pages/index.js': ` - export default function Home() { - return ( - <> -

Home page

- - ) - } - `, - }, - dependencies: { - react: 'latest', - 'react-dom': 'latest', - }, - }) - }) - afterAll(() => next.destroy()) - - it('Script is injected server-side', async () => { - let browser: BrowserInterface - - try { - browser = await webdriver(next.url, '/') - - const script = await browser.eval( - `document.querySelector('script[data-nscript="beforeInteractive"]')` - ) - expect(script).not.toBeNull() - } finally { - if (browser) await browser.close() - } - }) -}) - -describe('beforeInteractive in document body', () => { - let next: NextInstance - - beforeAll(async () => { - next = await createNext({ - files: { - 'pages/_document.js': ` - import { Html, Head, Main, NextScript } from 'next/document' - import Script from 'next/script' - - export default function Document() { - return ( - - - -
- - ` - ) - - try { - browser = await webdriver(next.url, '/') - - // Partytown modifies type to "text/partytown-x" after it has been executed in the web worker - await check(async () => { - const processedWorkerScripts = await browser.eval( - `document.querySelectorAll('script[type="text/partytown-x"]').length` - ) - return processedWorkerScripts + '' - }, '1') - - const text = await browser.elementById('text').text() - expect(text).toBe('abc') - } finally { - if (browser) await browser.close() - await next.destroy() - } - }) - - it('Inline worker script through dangerouslySetInnerHtml is modified by Partytown to execute on a worker thread', async () => { - let next: NextInstance - let browser: BrowserInterface - - next = await createNextApp( - ` + "'` + ) + + expect(res.status).toBe(500) + }) + }) + + describe('template component', () => { + it('should render the template that holds state in a client component and reset on navigation', async () => { + const browser = await webdriver(next.url, '/template/clientcomponent') + expect(await browser.elementByCss('h1').text()).toBe('Template 0') + await browser.elementByCss('button').click() + expect(await browser.elementByCss('h1').text()).toBe('Template 1') + + await browser.elementByCss('#link').click() + await browser.waitForElementByCss('#other-page') + + expect(await browser.elementByCss('h1').text()).toBe('Template 0') + await browser.elementByCss('button').click() + expect(await browser.elementByCss('h1').text()).toBe('Template 1') + + await browser.elementByCss('#link').click() + await browser.waitForElementByCss('#page') + + expect(await browser.elementByCss('h1').text()).toBe('Template 0') + }) + + // TODO-APP: disable failing test and investigate later + ;(isDev ? it.skip : it)( + 'should render the template that is a server component and rerender on navigation', + async () => { + const browser = await webdriver(next.url, '/template/servercomponent') + // eslint-disable-next-line jest/no-standalone-expect + expect(await browser.elementByCss('h1').text()).toStartWith( + 'Template' + ) + + const currentTime = await browser + .elementByCss('#performance-now') + .text() + + await browser.elementByCss('#link').click() + await browser.waitForElementByCss('#other-page') + + // eslint-disable-next-line jest/no-standalone-expect + expect(await browser.elementByCss('h1').text()).toStartWith( + 'Template' + ) + + // template should rerender on navigation even when it's a server component + // eslint-disable-next-line jest/no-standalone-expect + expect(await browser.elementByCss('#performance-now').text()).toBe( + currentTime + ) + + await browser.elementByCss('#link').click() + await browser.waitForElementByCss('#page') + + // eslint-disable-next-line jest/no-standalone-expect + expect(await browser.elementByCss('#performance-now').text()).toBe( + currentTime + ) + } + ) + }) + + describe('error component', () => { + it('should trigger error component when an error happens during rendering', async () => { + const browser = await webdriver(next.url, '/error/client-component') + await browser.elementByCss('#error-trigger-button').click() + + if (isDev) { + expect(await hasRedbox(browser)).toBe(true) + expect(await getRedboxHeader(browser)).toMatch(/this is a test/) + } else { + await browser + expect( + await browser + .waitForElementByCss('#error-boundary-message') + .elementByCss('#error-boundary-message') + .text() + ).toBe('An error occurred: this is a test') + } + }) + + it('should trigger error component when an error happens during server components rendering', async () => { + const browser = await webdriver(next.url, '/error/server-component') + + if (isDev) { + expect( + await browser + .waitForElementByCss('#error-boundary-message') + .elementByCss('#error-boundary-message') + .text() + ).toBe('this is a test') + expect( + await browser.waitForElementByCss('#error-boundary-digest').text() + // Digest of the error message should be stable. + ).not.toBe('') + // TODO-APP: ensure error overlay is shown for errors that happened before/during hydration + // expect(await hasRedbox(browser)).toBe(true) + // expect(await getRedboxHeader(browser)).toMatch(/this is a test/) + } else { + await browser + expect( + await browser.waitForElementByCss('#error-boundary-message').text() + ).toBe( + 'An error occurred in the Server Components render. The specific message is omitted in production builds to avoid leaking sensitive details. A digest property is included on this error instance which may provide additional details about the nature of the error.' + ) + expect( + await browser.waitForElementByCss('#error-boundary-digest').text() + // Digest of the error message should be stable. + ).not.toBe('') + } + }) + + it('should use default error boundary for prod and overlay for dev when no error component specified', async () => { + const browser = await webdriver( + next.url, + '/error/global-error-boundary' + ) + await browser.elementByCss('#error-trigger-button').click() + // .waitForElementByCss('body') + + if (isDev) { + expect(await hasRedbox(browser)).toBe(true) + console.log('getRedboxHeader', await getRedboxHeader(browser)) + // expect(await getRedboxHeader(browser)).toMatch(/An error occurred: this is a test/) + } else { + expect( + await browser + .waitForElementByCss('body') + .elementByCss('body') + .text() + ).toBe( + 'Application error: a client-side exception has occurred (see the browser console for more information).' + ) + } + }) + + if (!isDev) { + it('should allow resetting error boundary', async () => { + const browser = await webdriver(next.url, '/error/client-component') + + // Try triggering and resetting a few times in a row + for (let i = 0; i < 5; i++) { + await browser + .elementByCss('#error-trigger-button') + .click() + .waitForElementByCss('#error-boundary-message') + + expect( + await browser.elementByCss('#error-boundary-message').text() + ).toBe('An error occurred: this is a test') + + await browser + .elementByCss('#reset') + .click() + .waitForElementByCss('#error-trigger-button') + + expect( + await browser.elementByCss('#error-trigger-button').text() + ).toBe('Trigger Error!') + } + }) + + it('should hydrate empty shell to handle server-side rendering errors', async () => { + const browser = await webdriver( + next.url, + '/error/ssr-error-client-component' + ) + const logs = await browser.log() + const errors = logs + .filter((x) => x.source === 'error') + .map((x) => x.message) + .join('\n') + expect(errors).toInclude('Error during SSR') + }) + } + }) + + describe('known bugs', () => { + describe('should support React cache', () => { + it('server component', async () => { + const browser = await webdriver( + next.url, + '/react-cache/server-component' + ) + const val1 = await browser.elementByCss('#value-1').text() + const val2 = await browser.elementByCss('#value-2').text() + expect(val1).toBe(val2) + }) + + it('server component client-navigation', async () => { + const browser = await webdriver(next.url, '/react-cache') + + await browser + .elementByCss('#to-server-component') + .click() + .waitForElementByCss('#value-1', 10000) + const val1 = await browser.elementByCss('#value-1').text() + const val2 = await browser.elementByCss('#value-2').text() + expect(val1).toBe(val2) + }) + + it('client component', async () => { + const browser = await webdriver( + next.url, + '/react-cache/client-component' + ) + const val1 = await browser.elementByCss('#value-1').text() + const val2 = await browser.elementByCss('#value-2').text() + expect(val1).toBe(val2) + }) + + it('client component client-navigation', async () => { + const browser = await webdriver(next.url, '/react-cache') + + await browser + .elementByCss('#to-client-component') + .click() + .waitForElementByCss('#value-1', 10000) + const val1 = await browser.elementByCss('#value-1').text() + const val2 = await browser.elementByCss('#value-2').text() + expect(val1).toBe(val2) + }) + }) + + describe('should support React fetch instrumentation', () => { + it('server component', async () => { + const browser = await webdriver( + next.url, + '/react-fetch/server-component' + ) + const val1 = await browser.elementByCss('#value-1').text() + const val2 = await browser.elementByCss('#value-2').text() + expect(val1).toBe(val2) + }) + + it('server component client-navigation', async () => { + const browser = await webdriver(next.url, '/react-fetch') + + await browser + .elementByCss('#to-server-component') + .click() + .waitForElementByCss('#value-1', 10000) + const val1 = await browser.elementByCss('#value-1').text() + const val2 = await browser.elementByCss('#value-2').text() + expect(val1).toBe(val2) + }) + + // TODO-APP: React doesn't have fetch deduping for client components yet. + it.skip('client component', async () => { + const browser = await webdriver( + next.url, + '/react-fetch/client-component' + ) + const val1 = await browser.elementByCss('#value-1').text() + const val2 = await browser.elementByCss('#value-2').text() + expect(val1).toBe(val2) + }) + + // TODO-APP: React doesn't have fetch deduping for client components yet. + it.skip('client component client-navigation', async () => { + const browser = await webdriver(next.url, '/react-fetch') + + await browser + .elementByCss('#to-client-component') + .click() + .waitForElementByCss('#value-1', 10000) + const val1 = await browser.elementByCss('#value-1').text() + const val2 = await browser.elementByCss('#value-2').text() + expect(val1).toBe(val2) + }) + }) + it('should not share flight data between requests', async () => { + const fetches = await Promise.all( + [...new Array(5)].map(() => + renderViaHTTP(next.url, '/loading-bug/electronics') + ) + ) + + for (const text of fetches) { + const $ = cheerio.load(text) + expect($('#category-id').text()).toBe('electronicsabc') + } + }) + it('should handle as on next/link', async () => { + const browser = await webdriver(next.url, '/link-with-as') + expect( + await browser + .elementByCss('#link-to-info-123') + .click() + .waitForElementByCss('#message') + .text() + ).toBe(`hello from app/dashboard/deployments/info/[id]. ID is: 123`) + }) + it('should handle next/link back to initially loaded page', async () => { + const browser = await webdriver(next.url, '/linking/about') + expect( + await browser + .elementByCss('a[href="/linking"]') + .click() + .waitForElementByCss('#home-page') + .text() + ).toBe(`Home page`) + + expect( + await browser + .elementByCss('a[href="/linking/about"]') + .click() + .waitForElementByCss('#about-page') + .text() + ).toBe(`About page`) + }) + it('should not do additional pushState when already on the page', async () => { + const browser = await webdriver(next.url, '/linking/about') + const goToLinkingPage = async () => { + expect( + await browser + .elementByCss('a[href="/linking"]') + .click() + .waitForElementByCss('#home-page') + .text() + ).toBe(`Home page`) + } + + await goToLinkingPage() + await waitFor(1000) + await goToLinkingPage() + await waitFor(1000) + await goToLinkingPage() + await waitFor(1000) + + expect( + await browser.back().waitForElementByCss('#about-page', 2000).text() + ).toBe(`About page`) + }) + }) + + describe('not-found', () => { + it('should trigger not-found in a server component', async () => { + const browser = await webdriver(next.url, '/not-found/servercomponent') + + expect( + await browser.waitForElementByCss('#not-found-component').text() + ).toBe('Not Found!') + expect( + await browser + .waitForElementByCss('meta[name="robots"]') + .getAttribute('content') + ).toBe('noindex') + }) + + it('should trigger not-found in a client component', async () => { + const browser = await webdriver(next.url, '/not-found/clientcomponent') + expect( + await browser.waitForElementByCss('#not-found-component').text() + ).toBe('Not Found!') + expect( + await browser + .waitForElementByCss('meta[name="robots"]') + .getAttribute('content') + ).toBe('noindex') + }) + it('should trigger not-found client-side', async () => { + const browser = await webdriver(next.url, '/not-found/client-side') + await browser + .elementByCss('button') + .click() + .waitForElementByCss('#not-found-component') + expect(await browser.elementByCss('#not-found-component').text()).toBe( + 'Not Found!' + ) + expect( + await browser + .waitForElementByCss('meta[name="robots"]') + .getAttribute('content') + ).toBe('noindex') + }) + }) + + describe('bots', () => { + if (!(global as any).isNextDeploy) { + it('should block rendering for bots and return 404 status', async () => { + const res = await fetchViaHTTP( + next.url, + '/not-found/servercomponent', + '', + { + headers: { + 'User-Agent': 'Googlebot', + }, + } + ) + + expect(res.status).toBe(404) + expect(await res.text()).toInclude('"noindex"') + }) + } + }) + + describe('redirect', () => { + describe('components', () => { + it('should redirect in a server component', async () => { + const browser = await webdriver(next.url, '/redirect/servercomponent') + await browser.waitForElementByCss('#result-page') + expect(await browser.elementByCss('#result-page').text()).toBe( + 'Result Page' + ) + }) + + it('should redirect in a client component', async () => { + const browser = await webdriver(next.url, '/redirect/clientcomponent') + await browser.waitForElementByCss('#result-page') + expect(await browser.elementByCss('#result-page').text()).toBe( + 'Result Page' + ) + }) + + // TODO-APP: Enable in development + it('should redirect client-side', async () => { + const browser = await webdriver(next.url, '/redirect/client-side') + await browser + .elementByCss('button') + .click() + .waitForElementByCss('#result-page') + // eslint-disable-next-line jest/no-standalone-expect + expect(await browser.elementByCss('#result-page').text()).toBe( + 'Result Page' + ) + }) + }) + + describe('next.config.js redirects', () => { + it('should redirect from next.config.js', async () => { + const browser = await webdriver(next.url, '/redirect/a') + expect(await browser.elementByCss('h1').text()).toBe('Dashboard') + expect(await browser.url()).toBe(next.url + '/dashboard') + }) + + it('should redirect from next.config.js with link navigation', async () => { + const browser = await webdriver( + next.url, + '/redirect/next-config-redirect' + ) + await browser + .elementByCss('#redirect-a') + .click() + .waitForElementByCss('h1') + expect(await browser.elementByCss('h1').text()).toBe('Dashboard') + expect(await browser.url()).toBe(next.url + '/dashboard') + }) + }) + + describe('middleware redirects', () => { + it('should redirect from middleware', async () => { + const browser = await webdriver( + next.url, + '/redirect-middleware-to-dashboard' + ) + expect(await browser.elementByCss('h1').text()).toBe('Dashboard') + expect(await browser.url()).toBe(next.url + '/dashboard') + }) + + it('should redirect from middleware with link navigation', async () => { + const browser = await webdriver( + next.url, + '/redirect/next-middleware-redirect' + ) + await browser + .elementByCss('#redirect-middleware') + .click() + .waitForElementByCss('h1') + expect(await browser.elementByCss('h1').text()).toBe('Dashboard') + expect(await browser.url()).toBe(next.url + '/dashboard') + }) + }) + }) + + describe('nested navigation', () => { + it('should navigate to nested pages', async () => { + const browser = await webdriver(next.url, '/nested-navigation') + expect(await browser.elementByCss('h1').text()).toBe('Home') + + const pages = [ + ['Electronics', ['Phones', 'Tablets', 'Laptops']], + ['Clothing', ['Tops', 'Shorts', 'Shoes']], + ['Books', ['Fiction', 'Biography', 'Education']], + ] as const + + for (const [category, subCategories] of pages) { + expect( + await browser + .elementByCss( + `a[href="/nested-navigation/${category.toLowerCase()}"]` + ) + .click() + .waitForElementByCss(`#all-${category.toLowerCase()}`) + .text() + ).toBe(`All ${category}`) + + for (const subcategory of subCategories) { + expect( + await browser + .elementByCss( + `a[href="/nested-navigation/${category.toLowerCase()}/${subcategory.toLowerCase()}"]` + ) + .click() + .waitForElementByCss(`#${subcategory.toLowerCase()}`) + .text() + ).toBe(`${subcategory}`) + } + } + }) + }) + + describe('next/script', () => { + if (!(global as any).isNextDeploy) { + it('should support next/script and render in correct order', async () => { + const browser = await webdriver(next.url, '/script') + + // Wait for lazyOnload scripts to be ready. + await new Promise((resolve) => setTimeout(resolve, 1000)) + + expect(await browser.eval(`window._script_order`)).toStrictEqual([ + 1, + 1.5, + 2, + 2.5, + 'render', + 3, + 4, + ]) + }) + } + + it('should insert preload tags for beforeInteractive and afterInteractive scripts', async () => { + const html = await renderViaHTTP(next.url, '/script') + expect(html).toContain( + '' + ) + expect(html).toContain( + '' + ) + expect(html).toContain( + '' + ) + + // test4.js has lazyOnload which doesn't need to be preloaded + expect(html).not.toContain( + '"'`) - - expect(res.status).toBe(500) - }) - }) - - describe('template component', () => { - it('should render the template that holds state in a client component and reset on navigation', async () => { - const browser = await webdriver(next.url, '/template/clientcomponent') - expect(await browser.elementByCss('h1').text()).toBe('Template 0') - await browser.elementByCss('button').click() - expect(await browser.elementByCss('h1').text()).toBe('Template 1') - - await browser.elementByCss('#link').click() - await browser.waitForElementByCss('#other-page') - - expect(await browser.elementByCss('h1').text()).toBe('Template 0') - await browser.elementByCss('button').click() - expect(await browser.elementByCss('h1').text()).toBe('Template 1') - - await browser.elementByCss('#link').click() - await browser.waitForElementByCss('#page') - - expect(await browser.elementByCss('h1').text()).toBe('Template 0') - }) - - // TODO-APP: disable failing test and investigate later - it('should render the template that is a server component and rerender on navigation', async () => { - const browser = await webdriver(next.url, '/template/servercomponent') - // eslint-disable-next-line jest/no-standalone-expect - expect(await (await browser.elementByCss('h1').text()).startsWith('Template')).toBeTruthy() - - const currentTime = await browser.elementByCss('#performance-now').text() - - await browser.elementByCss('#link').click() - await browser.waitForElementByCss('#other-page') - - // eslint-disable-next-line jest/no-standalone-expect - expect((await browser.elementByCss('h1').text()).startsWith('Template')).toBeTruthy() - - // template should rerender on navigation even when it's a server component - // eslint-disable-next-line jest/no-standalone-expect - expect(await browser.elementByCss('#performance-now').text()).toBe(currentTime) - - await browser.elementByCss('#link').click() - await browser.waitForElementByCss('#page') - - // eslint-disable-next-line jest/no-standalone-expect - expect(await browser.elementByCss('#performance-now').text()).toBe(currentTime) - }) - }) - - describe('error component', () => { - it('should trigger error component when an error happens during rendering', async () => { - const browser = await webdriver(next.url, '/error/client-component') - await browser.elementByCss('#error-trigger-button').click() - - await browser - expect( - await browser.waitForElementByCss('#error-boundary-message').elementByCss('#error-boundary-message').text(), - ).toBe('An error occurred: this is a test') - }) - - it('should use default error boundary for prod and overlay for dev when no error component specified', async () => { - const browser = await webdriver(next.url, '/error/global-error-boundary') - await browser.elementByCss('#error-trigger-button').click() - // .waitForElementByCss('body') - - expect(await browser.waitForElementByCss('body').elementByCss('body').text()).toBe( - 'Application error: a client-side exception has occurred (see the browser console for more information).', - ) - }) - - it('should allow resetting error boundary', async () => { - const browser = await webdriver(next.url, '/error/client-component') - - // Try triggering and resetting a few times in a row - for (let i = 0; i < 5; i++) { - await browser.elementByCss('#error-trigger-button').click().waitForElementByCss('#error-boundary-message') - - expect(await browser.elementByCss('#error-boundary-message').text()).toBe('An error occurred: this is a test') - - await browser.elementByCss('#reset').click().waitForElementByCss('#error-trigger-button') - - expect(await browser.elementByCss('#error-trigger-button').text()).toBe('Trigger Error!') - } - }) - - it('should hydrate empty shell to handle server-side rendering errors', async () => { - const browser = await webdriver(next.url, '/error/ssr-error-client-component') - const logs = await browser.log() - const errors = logs - .filter((x) => x.source === 'error') - .map((x) => x.message) - .join('\n') - expect(errors.includes('Error during SSR')).toBeTruthy() - }) - }) - - describe('known bugs', () => { - it('should not share flight data between requests', async () => { - const fetches = await Promise.all( - [...new Array(5)].map(() => renderViaHTTP(next.url, '/loading-bug/electronics')), - ) - - for (const text of fetches) { - const $ = load(text) - expect($('#category-id').text()).toBe('electronicsabc') - } - }) - it('should handle as on next/link', async () => { - const browser = await webdriver(next.url, '/link-with-as') - expect(await browser.elementByCss('#link-to-info-123').click().waitForElementByCss('#message').text()).toBe( - `hello from app/dashboard/deployments/info/[id]. ID is: 123`, - ) - }) - it('should handle next/link back to initially loaded page', async () => { - const browser = await webdriver(next.url, '/linking/about') - expect(await browser.elementByCss('a[href="/linking"]').click().waitForElementByCss('#home-page').text()).toBe( - `Home page`, - ) - - expect( - await browser.elementByCss('a[href="/linking/about"]').click().waitForElementByCss('#about-page').text(), - ).toBe(`About page`) - }) - }) - - describe('not-found', () => { - it('should trigger not-found in a server component', async () => { - const browser = await webdriver(next.url, '/not-found/servercomponent') - - expect(await browser.waitForElementByCss('#not-found-component').text()).toBe('Not Found!') - expect(await browser.waitForElementByCss('meta[name="robots"]').getAttribute('content')).toBe('noindex') - }) - - it('should trigger not-found in a client component', async () => { - const browser = await webdriver(next.url, '/not-found/clientcomponent') - expect(await browser.waitForElementByCss('#not-found-component').text()).toBe('Not Found!') - expect(await browser.waitForElementByCss('meta[name="robots"]').getAttribute('content')).toBe('noindex') - }) - it('should trigger not-found client-side', async () => { - const browser = await webdriver(next.url, '/not-found/client-side') - await browser.elementByCss('button').click().waitForElementByCss('#not-found-component') - expect(await browser.elementByCss('#not-found-component').text()).toBe('Not Found!') - expect(await browser.waitForElementByCss('meta[name="robots"]').getAttribute('content')).toBe('noindex') - }) - }) - describe('redirect', () => { - describe('components', () => { - it.skip('should redirect in a server component', async () => { - const browser = await webdriver(next.url, '/redirect/servercomponent') - await browser.waitForElementByCss('#result-page') - expect(await browser.elementByCss('#result-page').text()).toBe('Result Page') - }) - - it.skip('should redirect in a client component', async () => { - const browser = await webdriver(next.url, '/redirect/clientcomponent') - await browser.waitForElementByCss('#result-page') - expect(await browser.elementByCss('#result-page').text()).toBe('Result Page') - }) - - // TODO-APP: Enable in development - it('should redirect client-side', async () => { - const browser = await webdriver(next.url, '/redirect/client-side') - await browser.elementByCss('button').click().waitForElementByCss('#result-page') - expect(await browser.elementByCss('#result-page').text()).toBe('Result Page') - }) - }) - - describe('next.config.js redirects', () => { - it('should redirect from next.config.js', async () => { - const browser = await webdriver(next.url, '/redirect/a') - expect(await browser.elementByCss('h1').text()).toBe('Dashboard') - expect(await browser.url()).toBe(next.url + '/dashboard') - }) - - it('should redirect from next.config.js with link navigation', async () => { - const browser = await webdriver(next.url, '/redirect/next-config-redirect') - await browser.elementByCss('#redirect-a').click().waitForElementByCss('h1') - expect(await browser.elementByCss('h1').text()).toBe('Dashboard') - expect(await browser.url()).toBe(next.url + '/dashboard') - }) - }) - - describe('middleware redirects', () => { - it('should redirect from middleware', async () => { - const browser = await webdriver(next.url, '/redirect-middleware-to-dashboard') - expect(await browser.elementByCss('h1').text()).toBe('Dashboard') - expect(await browser.url()).toBe(next.url + '/dashboard') - }) - - it('should redirect from middleware with link navigation', async () => { - const browser = await webdriver(next.url, '/redirect/next-middleware-redirect') - await browser.elementByCss('#redirect-middleware').click().waitForElementByCss('h1') - expect(await browser.elementByCss('h1').text()).toBe('Dashboard') - expect(await browser.url()).toBe(next.url + '/dashboard') - }) - }) - }) - - describe('nested navigation', () => { - it('should navigate to nested pages', async () => { - const browser = await webdriver(next.url, '/nested-navigation') - expect(await browser.elementByCss('h1').text()).toBe('Home') - - const pages = [ - ['Electronics', ['Phones', 'Tablets', 'Laptops']], - ['Clothing', ['Tops', 'Shorts', 'Shoes']], - ['Books', ['Fiction', 'Biography', 'Education']], - ] as const - - for (const [category, subCategories] of pages) { - expect( - await browser - .elementByCss(`a[href="/nested-navigation/${category.toLowerCase()}"]`) - .click() - .waitForElementByCss(`#all-${category.toLowerCase()}`) - .text(), - ).toBe(`All ${category}`) - - for (const subcategory of subCategories) { - expect( - await browser - .elementByCss(`a[href="/nested-navigation/${category.toLowerCase()}/${subcategory.toLowerCase()}"]`) - .click() - .waitForElementByCss(`#${subcategory.toLowerCase()}`) - .text(), - ).toBe(`${subcategory}`) - } - } - }) - }) - - describe('next/script', () => { - it('should support next/script and render in correct order', async () => { - const browser = await webdriver(next.url, '/script') - - // Wait for lazyOnload scripts to be ready. - await new Promise((resolve) => setTimeout(resolve, 1000)) - - expect(await browser.eval(`window._script_order`)).toStrictEqual([1, 1.5, 2, 2.5, 'render', 3, 4]) - }) - - it('should insert preload tags for beforeInteractive and afterInteractive scripts', async () => { - const html = await renderViaHTTP(next.url, '/script') - expect(html).toContain('') - expect(html).toContain('') - expect(html).toContain('') - - // test4.js has lazyOnload which doesn't need to be preloaded - expect(html).not.toContain('"'` - ) + const res = await fetchWithPolicy(`script-src 'nonce-">"'`) expect(res.status).toBe(500) }) @@ -2019,36 +1731,26 @@ describe('app dir', () => { async () => { const browser = await webdriver(next.url, '/template/servercomponent') // eslint-disable-next-line jest/no-standalone-expect - expect(await browser.elementByCss('h1').text()).toStartWith( - 'Template' - ) + expect(await browser.elementByCss('h1').text()).toStartWith('Template') - const currentTime = await browser - .elementByCss('#performance-now') - .text() + const currentTime = await browser.elementByCss('#performance-now').text() await browser.elementByCss('#link').click() await browser.waitForElementByCss('#other-page') // eslint-disable-next-line jest/no-standalone-expect - expect(await browser.elementByCss('h1').text()).toStartWith( - 'Template' - ) + expect(await browser.elementByCss('h1').text()).toStartWith('Template') // template should rerender on navigation even when it's a server component // eslint-disable-next-line jest/no-standalone-expect - expect(await browser.elementByCss('#performance-now').text()).toBe( - currentTime - ) + expect(await browser.elementByCss('#performance-now').text()).toBe(currentTime) await browser.elementByCss('#link').click() await browser.waitForElementByCss('#page') // eslint-disable-next-line jest/no-standalone-expect - expect(await browser.elementByCss('#performance-now').text()).toBe( - currentTime - ) - } + expect(await browser.elementByCss('#performance-now').text()).toBe(currentTime) + }, ) }) @@ -2063,10 +1765,7 @@ describe('app dir', () => { } else { await browser expect( - await browser - .waitForElementByCss('#error-boundary-message') - .elementByCss('#error-boundary-message') - .text() + await browser.waitForElementByCss('#error-boundary-message').elementByCss('#error-boundary-message').text(), ).toBe('An error occurred: this is a test') } }) @@ -2076,13 +1775,10 @@ describe('app dir', () => { if (isDev) { expect( - await browser - .waitForElementByCss('#error-boundary-message') - .elementByCss('#error-boundary-message') - .text() + await browser.waitForElementByCss('#error-boundary-message').elementByCss('#error-boundary-message').text(), ).toBe('this is a test') expect( - await browser.waitForElementByCss('#error-boundary-digest').text() + await browser.waitForElementByCss('#error-boundary-digest').text(), // Digest of the error message should be stable. ).not.toBe('') // TODO-APP: ensure error overlay is shown for errors that happened before/during hydration @@ -2090,23 +1786,18 @@ describe('app dir', () => { // expect(await getRedboxHeader(browser)).toMatch(/this is a test/) } else { await browser - expect( - await browser.waitForElementByCss('#error-boundary-message').text() - ).toBe( - 'An error occurred in the Server Components render. The specific message is omitted in production builds to avoid leaking sensitive details. A digest property is included on this error instance which may provide additional details about the nature of the error.' + expect(await browser.waitForElementByCss('#error-boundary-message').text()).toBe( + 'An error occurred in the Server Components render. The specific message is omitted in production builds to avoid leaking sensitive details. A digest property is included on this error instance which may provide additional details about the nature of the error.', ) expect( - await browser.waitForElementByCss('#error-boundary-digest').text() + await browser.waitForElementByCss('#error-boundary-digest').text(), // Digest of the error message should be stable. ).not.toBe('') } }) it('should use default error boundary for prod and overlay for dev when no error component specified', async () => { - const browser = await webdriver( - next.url, - '/error/global-error-boundary' - ) + const browser = await webdriver(next.url, '/error/global-error-boundary') await browser.elementByCss('#error-trigger-button').click() // .waitForElementByCss('body') @@ -2115,13 +1806,8 @@ describe('app dir', () => { console.log('getRedboxHeader', await getRedboxHeader(browser)) // expect(await getRedboxHeader(browser)).toMatch(/An error occurred: this is a test/) } else { - expect( - await browser - .waitForElementByCss('body') - .elementByCss('body') - .text() - ).toBe( - 'Application error: a client-side exception has occurred (see the browser console for more information).' + expect(await browser.waitForElementByCss('body').elementByCss('body').text()).toBe( + 'Application error: a client-side exception has occurred (see the browser console for more information).', ) } }) @@ -2132,31 +1818,20 @@ describe('app dir', () => { // Try triggering and resetting a few times in a row for (let i = 0; i < 5; i++) { - await browser - .elementByCss('#error-trigger-button') - .click() - .waitForElementByCss('#error-boundary-message') + await browser.elementByCss('#error-trigger-button').click().waitForElementByCss('#error-boundary-message') - expect( - await browser.elementByCss('#error-boundary-message').text() - ).toBe('An error occurred: this is a test') + expect(await browser.elementByCss('#error-boundary-message').text()).toBe( + 'An error occurred: this is a test', + ) - await browser - .elementByCss('#reset') - .click() - .waitForElementByCss('#error-trigger-button') + await browser.elementByCss('#reset').click().waitForElementByCss('#error-trigger-button') - expect( - await browser.elementByCss('#error-trigger-button').text() - ).toBe('Trigger Error!') + expect(await browser.elementByCss('#error-trigger-button').text()).toBe('Trigger Error!') } }) it('should hydrate empty shell to handle server-side rendering errors', async () => { - const browser = await webdriver( - next.url, - '/error/ssr-error-client-component' - ) + const browser = await webdriver(next.url, '/error/ssr-error-client-component') const logs = await browser.log() const errors = logs .filter((x) => x.source === 'error') @@ -2170,10 +1845,7 @@ describe('app dir', () => { describe('known bugs', () => { describe('should support React cache', () => { it('server component', async () => { - const browser = await webdriver( - next.url, - '/react-cache/server-component' - ) + const browser = await webdriver(next.url, '/react-cache/server-component') const val1 = await browser.elementByCss('#value-1').text() const val2 = await browser.elementByCss('#value-2').text() expect(val1).toBe(val2) @@ -2182,20 +1854,14 @@ describe('app dir', () => { it('server component client-navigation', async () => { const browser = await webdriver(next.url, '/react-cache') - await browser - .elementByCss('#to-server-component') - .click() - .waitForElementByCss('#value-1', 10000) + await browser.elementByCss('#to-server-component').click().waitForElementByCss('#value-1', 10000) const val1 = await browser.elementByCss('#value-1').text() const val2 = await browser.elementByCss('#value-2').text() expect(val1).toBe(val2) }) it('client component', async () => { - const browser = await webdriver( - next.url, - '/react-cache/client-component' - ) + const browser = await webdriver(next.url, '/react-cache/client-component') const val1 = await browser.elementByCss('#value-1').text() const val2 = await browser.elementByCss('#value-2').text() expect(val1).toBe(val2) @@ -2204,10 +1870,7 @@ describe('app dir', () => { it('client component client-navigation', async () => { const browser = await webdriver(next.url, '/react-cache') - await browser - .elementByCss('#to-client-component') - .click() - .waitForElementByCss('#value-1', 10000) + await browser.elementByCss('#to-client-component').click().waitForElementByCss('#value-1', 10000) const val1 = await browser.elementByCss('#value-1').text() const val2 = await browser.elementByCss('#value-2').text() expect(val1).toBe(val2) @@ -2216,10 +1879,7 @@ describe('app dir', () => { describe('should support React fetch instrumentation', () => { it('server component', async () => { - const browser = await webdriver( - next.url, - '/react-fetch/server-component' - ) + const browser = await webdriver(next.url, '/react-fetch/server-component') const val1 = await browser.elementByCss('#value-1').text() const val2 = await browser.elementByCss('#value-2').text() expect(val1).toBe(val2) @@ -2228,10 +1888,7 @@ describe('app dir', () => { it('server component client-navigation', async () => { const browser = await webdriver(next.url, '/react-fetch') - await browser - .elementByCss('#to-server-component') - .click() - .waitForElementByCss('#value-1', 10000) + await browser.elementByCss('#to-server-component').click().waitForElementByCss('#value-1', 10000) const val1 = await browser.elementByCss('#value-1').text() const val2 = await browser.elementByCss('#value-2').text() expect(val1).toBe(val2) @@ -2239,10 +1896,7 @@ describe('app dir', () => { // TODO-APP: React doesn't have fetch deduping for client components yet. it.skip('client component', async () => { - const browser = await webdriver( - next.url, - '/react-fetch/client-component' - ) + const browser = await webdriver(next.url, '/react-fetch/client-component') const val1 = await browser.elementByCss('#value-1').text() const val2 = await browser.elementByCss('#value-2').text() expect(val1).toBe(val2) @@ -2252,10 +1906,7 @@ describe('app dir', () => { it.skip('client component client-navigation', async () => { const browser = await webdriver(next.url, '/react-fetch') - await browser - .elementByCss('#to-client-component') - .click() - .waitForElementByCss('#value-1', 10000) + await browser.elementByCss('#to-client-component').click().waitForElementByCss('#value-1', 10000) const val1 = await browser.elementByCss('#value-1').text() const val2 = await browser.elementByCss('#value-2').text() expect(val1).toBe(val2) @@ -2263,9 +1914,7 @@ describe('app dir', () => { }) it('should not share flight data between requests', async () => { const fetches = await Promise.all( - [...new Array(5)].map(() => - renderViaHTTP(next.url, '/loading-bug/electronics') - ) + [...new Array(5)].map(() => renderViaHTTP(next.url, '/loading-bug/electronics')), ) for (const text of fetches) { @@ -2275,41 +1924,25 @@ describe('app dir', () => { }) it('should handle as on next/link', async () => { const browser = await webdriver(next.url, '/link-with-as') - expect( - await browser - .elementByCss('#link-to-info-123') - .click() - .waitForElementByCss('#message') - .text() - ).toBe(`hello from app/dashboard/deployments/info/[id]. ID is: 123`) + expect(await browser.elementByCss('#link-to-info-123').click().waitForElementByCss('#message').text()).toBe( + `hello from app/dashboard/deployments/info/[id]. ID is: 123`, + ) }) it('should handle next/link back to initially loaded page', async () => { const browser = await webdriver(next.url, '/linking/about') - expect( - await browser - .elementByCss('a[href="/linking"]') - .click() - .waitForElementByCss('#home-page') - .text() - ).toBe(`Home page`) + expect(await browser.elementByCss('a[href="/linking"]').click().waitForElementByCss('#home-page').text()).toBe( + `Home page`, + ) expect( - await browser - .elementByCss('a[href="/linking/about"]') - .click() - .waitForElementByCss('#about-page') - .text() + await browser.elementByCss('a[href="/linking/about"]').click().waitForElementByCss('#about-page').text(), ).toBe(`About page`) }) it('should not do additional pushState when already on the page', async () => { const browser = await webdriver(next.url, '/linking/about') const goToLinkingPage = async () => { expect( - await browser - .elementByCss('a[href="/linking"]') - .click() - .waitForElementByCss('#home-page') - .text() + await browser.elementByCss('a[href="/linking"]').click().waitForElementByCss('#home-page').text(), ).toBe(`Home page`) } @@ -2320,9 +1953,7 @@ describe('app dir', () => { await goToLinkingPage() await waitFor(1000) - expect( - await browser.back().waitForElementByCss('#about-page', 2000).text() - ).toBe(`About page`) + expect(await browser.back().waitForElementByCss('#about-page', 2000).text()).toBe(`About page`) }) }) @@ -2330,57 +1961,31 @@ describe('app dir', () => { it('should trigger not-found in a server component', async () => { const browser = await webdriver(next.url, '/not-found/servercomponent') - expect( - await browser.waitForElementByCss('#not-found-component').text() - ).toBe('Not Found!') - expect( - await browser - .waitForElementByCss('meta[name="robots"]') - .getAttribute('content') - ).toBe('noindex') + expect(await browser.waitForElementByCss('#not-found-component').text()).toBe('Not Found!') + expect(await browser.waitForElementByCss('meta[name="robots"]').getAttribute('content')).toBe('noindex') }) it('should trigger not-found in a client component', async () => { const browser = await webdriver(next.url, '/not-found/clientcomponent') - expect( - await browser.waitForElementByCss('#not-found-component').text() - ).toBe('Not Found!') - expect( - await browser - .waitForElementByCss('meta[name="robots"]') - .getAttribute('content') - ).toBe('noindex') + expect(await browser.waitForElementByCss('#not-found-component').text()).toBe('Not Found!') + expect(await browser.waitForElementByCss('meta[name="robots"]').getAttribute('content')).toBe('noindex') }) it('should trigger not-found client-side', async () => { const browser = await webdriver(next.url, '/not-found/client-side') - await browser - .elementByCss('button') - .click() - .waitForElementByCss('#not-found-component') - expect(await browser.elementByCss('#not-found-component').text()).toBe( - 'Not Found!' - ) - expect( - await browser - .waitForElementByCss('meta[name="robots"]') - .getAttribute('content') - ).toBe('noindex') + await browser.elementByCss('button').click().waitForElementByCss('#not-found-component') + expect(await browser.elementByCss('#not-found-component').text()).toBe('Not Found!') + expect(await browser.waitForElementByCss('meta[name="robots"]').getAttribute('content')).toBe('noindex') }) }) describe('bots', () => { if (!(global as any).isNextDeploy) { it('should block rendering for bots and return 404 status', async () => { - const res = await fetchViaHTTP( - next.url, - '/not-found/servercomponent', - '', - { - headers: { - 'User-Agent': 'Googlebot', - }, - } - ) + const res = await fetchViaHTTP(next.url, '/not-found/servercomponent', '', { + headers: { + 'User-Agent': 'Googlebot', + }, + }) expect(res.status).toBe(404) expect(await res.text()).toInclude('"noindex"') @@ -2393,30 +1998,21 @@ describe('app dir', () => { it('should redirect in a server component', async () => { const browser = await webdriver(next.url, '/redirect/servercomponent') await browser.waitForElementByCss('#result-page') - expect(await browser.elementByCss('#result-page').text()).toBe( - 'Result Page' - ) + expect(await browser.elementByCss('#result-page').text()).toBe('Result Page') }) it('should redirect in a client component', async () => { const browser = await webdriver(next.url, '/redirect/clientcomponent') await browser.waitForElementByCss('#result-page') - expect(await browser.elementByCss('#result-page').text()).toBe( - 'Result Page' - ) + expect(await browser.elementByCss('#result-page').text()).toBe('Result Page') }) // TODO-APP: Enable in development it('should redirect client-side', async () => { const browser = await webdriver(next.url, '/redirect/client-side') - await browser - .elementByCss('button') - .click() - .waitForElementByCss('#result-page') + await browser.elementByCss('button').click().waitForElementByCss('#result-page') // eslint-disable-next-line jest/no-standalone-expect - expect(await browser.elementByCss('#result-page').text()).toBe( - 'Result Page' - ) + expect(await browser.elementByCss('#result-page').text()).toBe('Result Page') }) }) @@ -2428,14 +2024,8 @@ describe('app dir', () => { }) it('should redirect from next.config.js with link navigation', async () => { - const browser = await webdriver( - next.url, - '/redirect/next-config-redirect' - ) - await browser - .elementByCss('#redirect-a') - .click() - .waitForElementByCss('h1') + const browser = await webdriver(next.url, '/redirect/next-config-redirect') + await browser.elementByCss('#redirect-a').click().waitForElementByCss('h1') expect(await browser.elementByCss('h1').text()).toBe('Dashboard') expect(await browser.url()).toBe(next.url + '/dashboard') }) @@ -2443,23 +2033,14 @@ describe('app dir', () => { describe('middleware redirects', () => { it('should redirect from middleware', async () => { - const browser = await webdriver( - next.url, - '/redirect-middleware-to-dashboard' - ) + const browser = await webdriver(next.url, '/redirect-middleware-to-dashboard') expect(await browser.elementByCss('h1').text()).toBe('Dashboard') expect(await browser.url()).toBe(next.url + '/dashboard') }) it('should redirect from middleware with link navigation', async () => { - const browser = await webdriver( - next.url, - '/redirect/next-middleware-redirect' - ) - await browser - .elementByCss('#redirect-middleware') - .click() - .waitForElementByCss('h1') + const browser = await webdriver(next.url, '/redirect/next-middleware-redirect') + await browser.elementByCss('#redirect-middleware').click().waitForElementByCss('h1') expect(await browser.elementByCss('h1').text()).toBe('Dashboard') expect(await browser.url()).toBe(next.url + '/dashboard') }) @@ -2480,23 +2061,19 @@ describe('app dir', () => { for (const [category, subCategories] of pages) { expect( await browser - .elementByCss( - `a[href="/nested-navigation/${category.toLowerCase()}"]` - ) + .elementByCss(`a[href="/nested-navigation/${category.toLowerCase()}"]`) .click() .waitForElementByCss(`#all-${category.toLowerCase()}`) - .text() + .text(), ).toBe(`All ${category}`) for (const subcategory of subCategories) { expect( await browser - .elementByCss( - `a[href="/nested-navigation/${category.toLowerCase()}/${subcategory.toLowerCase()}"]` - ) + .elementByCss(`a[href="/nested-navigation/${category.toLowerCase()}/${subcategory.toLowerCase()}"]`) .click() .waitForElementByCss(`#${subcategory.toLowerCase()}`) - .text() + .text(), ).toBe(`${subcategory}`) } } @@ -2511,43 +2088,25 @@ describe('app dir', () => { // Wait for lazyOnload scripts to be ready. await new Promise((resolve) => setTimeout(resolve, 1000)) - expect(await browser.eval(`window._script_order`)).toStrictEqual([ - 1, - 1.5, - 2, - 2.5, - 'render', - 3, - 4, - ]) + expect(await browser.eval(`window._script_order`)).toStrictEqual([1, 1.5, 2, 2.5, 'render', 3, 4]) }) } it('should insert preload tags for beforeInteractive and afterInteractive scripts', async () => { const html = await renderViaHTTP(next.url, '/script') - expect(html).toContain( - '' - ) - expect(html).toContain( - '' - ) - expect(html).toContain( - '' - ) + expect(html).toContain('') + expect(html).toContain('') + expect(html).toContain('') // test4.js has lazyOnload which doesn't need to be preloaded - expect(html).not.toContain( - ' -