diff --git a/.eslintrc.js b/.eslintrc.js index c8bfdeba1f..69ae1605ad 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -29,6 +29,7 @@ module.exports = { 'unicorn/filename-case': 0, 'unicorn/no-array-push-push': 0, 'unicorn/numeric-separators-style': 0, + 'max-lines': 0, }, parserOptions: { sourceType: 'module', diff --git a/.github/workflows/cypress-canary.yml b/.github/workflows/cypress-canary.yml index 19f48db40a..6ba293aefc 100644 --- a/.github/workflows/cypress-canary.yml +++ b/.github/workflows/cypress-canary.yml @@ -1,7 +1,7 @@ name: Run e2e (canary demo) on: pull_request: - types: [opened, labeled, unlabeled, synchronize] + types: [opened, synchronize] push: branches: - main diff --git a/.github/workflows/cypress-demo-nx.yml b/.github/workflows/cypress-demo-nx.yml index 570a2209fe..48c498f94d 100644 --- a/.github/workflows/cypress-demo-nx.yml +++ b/.github/workflows/cypress-demo-nx.yml @@ -1,7 +1,7 @@ name: Run e2e (Nx monorepo) on: pull_request: - types: [opened, labeled, unlabeled, synchronize] + types: [opened, synchronize] push: branches: - main diff --git a/.github/workflows/cypress-demo-static.yml b/.github/workflows/cypress-demo-static.yml index 8a18a4c93f..586920b514 100644 --- a/.github/workflows/cypress-demo-static.yml +++ b/.github/workflows/cypress-demo-static.yml @@ -1,7 +1,7 @@ name: Run e2e (static root) on: pull_request: - types: [opened, labeled, unlabeled, synchronize] + types: [opened, synchronize] push: branches: - main diff --git a/.github/workflows/cypress-demo.yml b/.github/workflows/cypress-demo.yml index 0072322035..41666d0b72 100644 --- a/.github/workflows/cypress-demo.yml +++ b/.github/workflows/cypress-demo.yml @@ -1,7 +1,7 @@ name: Run e2e (default demo) on: pull_request: - types: [opened, labeled, unlabeled, synchronize] + types: [opened, synchronize] push: branches: - main diff --git a/.github/workflows/cypress-middleware.yml b/.github/workflows/cypress-middleware.yml index 68f12bdbf4..eb4611dbd9 100644 --- a/.github/workflows/cypress-middleware.yml +++ b/.github/workflows/cypress-middleware.yml @@ -1,7 +1,7 @@ name: Run e2e (middleware demo) on: pull_request: - types: [opened, labeled, unlabeled, synchronize] + types: [opened, synchronize] push: branches: - main diff --git a/.github/workflows/e2e-appdir.yml b/.github/workflows/e2e-appdir.yml new file mode 100644 index 0000000000..fd008522c0 --- /dev/null +++ b/.github/workflows/e2e-appdir.yml @@ -0,0 +1,71 @@ +name: Next.js appdir test suite + +on: + pull_request: + types: [opened, synchronize] + push: + branches: [main] + +jobs: + setup: + runs-on: ubuntu-latest + outputs: + test-files: ${{ steps['set-test-files'].outputs['test-files'] }} + steps: + - uses: actions/checkout@v3 + - run: npm install + - id: set-test-files + name: Get test files + # Extracts the list of all test files as JSON and trims to be relative to the test dir to be easier to read + run: + echo "test-files=$(npx jest -c test/e2e/jest.config.appdir.js --listTests --json | jq -cM 'map(.[env.PWD | + length + 10:])')" >> $GITHUB_OUTPUT + # echo "test-files=$(npx jest -c test/e2e/jest.config.all.js --listTests --json | jq -cM 'map(.[env.PWD | length + # + 10:])')" >> $GITHUB_OUTPUT + + test: + runs-on: ubuntu-latest + name: test (${{ matrix.test-file }}) + needs: + - setup + strategy: + fail-fast: false + matrix: + # Creates a job for each chunk ID. This will be assigned one or more test files to run + test-file: ${{ fromJson(needs.setup.outputs['test-files']) }} + steps: + - uses: actions/checkout@v3 + - run: npm install + - name: Run tests + run: npx jest --reporters=jest-junit --reporters=default -c test/e2e/jest.config.all.js ${{ matrix.test-file }} + env: + NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_BOT_AUTH_TOKEN }} + NETLIFY_SITE_ID: 1d5a5c76-d445-4ae5-b694-b0d3f2e2c395 + NEXT_TEST_VERSION: canary + - uses: actions/upload-artifact@v3 + if: ${{ always() }} + name: Upload test results + with: + name: test-results + path: reports/jest-*.xml + report: + name: Report appDir e2e test results + runs-on: ubuntu-latest + if: ${{ always() }} + needs: + - test + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@v3 + with: + path: reports + - name: Combine reports + # The test reporter can handle multiple files, but these have random filenames so the output is better when combined + run: npx junit-report-merger test-results.xml reports/**/*.xml + - uses: phoenix-actions/test-reporting@v10 + with: + name: Jest Tests + output-to: 'step-summary' + path: 'test-results.xml' + max-annotations: 49 + reporter: jest-junit diff --git a/.github/workflows/e2e-next.yml b/.github/workflows/e2e-next.yml index b435fe4119..0fdb8113aa 100644 --- a/.github/workflows/e2e-next.yml +++ b/.github/workflows/e2e-next.yml @@ -2,6 +2,7 @@ name: Next.js e2e test suite on: pull_request: + types: [opened, synchronize] push: branches: [main] @@ -41,17 +42,6 @@ jobs: NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_BOT_AUTH_TOKEN }} NETLIFY_SITE_ID: 1d5a5c76-d445-4ae5-b694-b0d3f2e2c395 # RUN_SKIPPED_TESTS: true - # - uses: phoenix-actions/test-reporting@v10 - # if: ${{ always() }} - # name: Report Test Results - # # Generates annotations for the test failures - # id: test-report - # with: - # name: E2E Test chunk ${{ matrix.chunk }} - # path: 'reports/**/*.xml' # Path to test results (inside artifact .zip) - # output-to: 'checks' - # max-annotations: 49 # Maximum number of annotations to be created - # reporter: jest-junit # Format of test results - uses: actions/upload-artifact@v3 # upload test results @@ -61,6 +51,7 @@ jobs: name: test-results path: reports/jest-*.xml report: + name: Report Next.js e2e test results runs-on: ubuntu-latest if: ${{ always() }} needs: diff --git a/cypress/integration/nx/general.spec.ts b/cypress/integration/nx/general.spec.ts index 49c6f04220..e794b265ea 100644 --- a/cypress/integration/nx/general.spec.ts +++ b/cypress/integration/nx/general.spec.ts @@ -10,10 +10,10 @@ describe('Default site', () => { cy.url().should('eq', `${Cypress.config().baseUrl}/`) }) - it('serves generated public files', async () => { - cy.request('service-worker.js').then((res) => { + it('serves generated public files', () => { + cy.request('favicon.ico').then((res) => { expect(res.status).to.eq(200) - expect(res.headers['content-type']).to.match(/javascript/) + expect(res.headers['content-type']).to.match(/image/) }) }) diff --git a/demos/base-path/package.json b/demos/base-path/package.json index c0256f1a91..6368c5c87f 100644 --- a/demos/base-path/package.json +++ b/demos/base-path/package.json @@ -14,7 +14,7 @@ "typescript": "^4.6.3" }, "dependencies": { - "next": "^13.0.3" + "next": "^13.0.6" }, "scripts": { "test": "echo \"Error: no test specified\" && exit 1" diff --git a/demos/custom-routes/package.json b/demos/custom-routes/package.json index 73789498a7..3dbb163d92 100644 --- a/demos/custom-routes/package.json +++ b/demos/custom-routes/package.json @@ -15,7 +15,7 @@ "typescript": "^4.7.4" }, "dependencies": { - "next": "^13.0.3" + "next": "^13.0.6" }, "scripts": { "build": "next build", diff --git a/demos/default/package.json b/demos/default/package.json index 1b1bcb1ef8..e3813a596f 100644 --- a/demos/default/package.json +++ b/demos/default/package.json @@ -22,7 +22,7 @@ "@reach/dialog": "^0.16.2", "@reach/visually-hidden": "^0.16.0", "@vercel/og": "^0.0.21", - "next": "^13.0.3", + "next": "^13.0.6", "react": "^18.2.0", "react-dom": "^18.2.0" }, diff --git a/demos/middleware/package.json b/demos/middleware/package.json index d21c8f2cb4..6ad583ce2d 100644 --- a/demos/middleware/package.json +++ b/demos/middleware/package.json @@ -12,7 +12,7 @@ "@netlify/next": "*", "@netlify/plugin-nextjs": "*", "isomorphic-unfetch": "^3.1.0", - "next": "^13.0.3", + "next": "^13.0.6", "react": "^18.2.0", "react-dom": "^18.2.0" }, diff --git a/demos/next-auth/package.json b/demos/next-auth/package.json index a326f1c0c5..79e563e79f 100644 --- a/demos/next-auth/package.json +++ b/demos/next-auth/package.json @@ -23,7 +23,7 @@ ], "license": "MIT", "dependencies": { - "next": "^13.0.3", + "next": "^13.0.6", "next-auth": "^4.15.0", "nodemailer": "^6.6.3", "react": "^18.2.0", diff --git a/demos/next-export/package.json b/demos/next-export/package.json index 44ce55cf66..70a78d4464 100644 --- a/demos/next-export/package.json +++ b/demos/next-export/package.json @@ -3,7 +3,7 @@ "version": "1.0.0", "description": "", "dependencies": { - "next": "^13.0.3" + "next": "^13.0.6" }, "devDependencies": { "@netlify/next": "*", diff --git a/demos/next-i18next/package.json b/demos/next-i18next/package.json index f02e29c21c..753f080827 100644 --- a/demos/next-i18next/package.json +++ b/demos/next-i18next/package.json @@ -9,7 +9,7 @@ "lint": "next lint" }, "dependencies": { - "next": "^13.0.3", + "next": "^13.0.6", "next-i18next": "^11.0.0", "react": "^18.2.0", "react-dom": "^18.2.0" diff --git a/demos/nx-next-monorepo-demo/apps/demo-monorepo/public/favicon.ico b/demos/nx-next-monorepo-demo/apps/demo-monorepo/public/favicon.ico new file mode 100755 index 0000000000..718d6fea48 Binary files /dev/null and b/demos/nx-next-monorepo-demo/apps/demo-monorepo/public/favicon.ico differ diff --git a/demos/nx-next-monorepo-demo/package-lock.json b/demos/nx-next-monorepo-demo/package-lock.json index ddd86c6086..15a554d829 100644 --- a/demos/nx-next-monorepo-demo/package-lock.json +++ b/demos/nx-next-monorepo-demo/package-lock.json @@ -1785,7 +1785,7 @@ }, "node_modules/@cypress/request": { "version": "2.88.10", - "devOptional": true, + "dev": true, "license": "Apache-2.0", "dependencies": { "aws-sign2": "~0.7.0", @@ -1813,7 +1813,7 @@ }, "node_modules/@cypress/request/node_modules/qs": { "version": "6.5.3", - "devOptional": true, + "dev": true, "license": "BSD-3-Clause", "engines": { "node": ">=0.6" @@ -1836,7 +1836,7 @@ }, "node_modules/@cypress/xvfb": { "version": "1.2.4", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "debug": "^3.1.0", @@ -1845,7 +1845,7 @@ }, "node_modules/@cypress/xvfb/node_modules/debug": { "version": "3.2.7", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "ms": "^2.1.1" @@ -1853,7 +1853,7 @@ }, "node_modules/@eslint/eslintrc": { "version": "1.3.2", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "ajv": "^6.12.4", @@ -1875,12 +1875,12 @@ }, "node_modules/@eslint/eslintrc/node_modules/argparse": { "version": "2.0.1", - "devOptional": true, + "dev": true, "license": "Python-2.0" }, "node_modules/@eslint/eslintrc/node_modules/globals": { "version": "13.17.0", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "type-fest": "^0.20.2" @@ -1894,7 +1894,7 @@ }, "node_modules/@eslint/eslintrc/node_modules/js-yaml": { "version": "4.1.0", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "argparse": "^2.0.1" @@ -1905,7 +1905,7 @@ }, "node_modules/@eslint/eslintrc/node_modules/minimatch": { "version": "3.1.2", - "devOptional": true, + "dev": true, "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" @@ -1916,7 +1916,7 @@ }, "node_modules/@eslint/eslintrc/node_modules/type-fest": { "version": "0.20.2", - "devOptional": true, + "dev": true, "license": "(MIT OR CC0-1.0)", "engines": { "node": ">=10" @@ -1927,7 +1927,7 @@ }, "node_modules/@humanwhocodes/config-array": { "version": "0.9.5", - "devOptional": true, + "dev": true, "license": "Apache-2.0", "dependencies": { "@humanwhocodes/object-schema": "^1.2.1", @@ -1940,7 +1940,7 @@ }, "node_modules/@humanwhocodes/object-schema": { "version": "1.2.1", - "devOptional": true, + "dev": true, "license": "BSD-3-Clause" }, "node_modules/@istanbuljs/load-nyc-config": { @@ -5485,12 +5485,12 @@ }, "node_modules/@types/sinonjs__fake-timers": { "version": "8.1.1", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/@types/sizzle": { "version": "2.3.3", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/@types/sockjs": { @@ -6016,7 +6016,7 @@ }, "node_modules/acorn-jsx": { "version": "5.3.2", - "devOptional": true, + "dev": true, "license": "MIT", "peerDependencies": { "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" @@ -6042,7 +6042,7 @@ }, "node_modules/aggregate-error": { "version": "3.1.0", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "clean-stack": "^2.0.0", @@ -6169,7 +6169,7 @@ }, "node_modules/arch": { "version": "2.2.0", - "devOptional": true, + "dev": true, "funding": [ { "type": "github", @@ -6273,7 +6273,7 @@ }, "node_modules/asn1": { "version": "0.2.6", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "safer-buffer": "~2.1.0" @@ -6281,7 +6281,7 @@ }, "node_modules/assert-plus": { "version": "1.0.0", - "devOptional": true, + "dev": true, "license": "MIT", "engines": { "node": ">=0.8" @@ -6294,7 +6294,7 @@ }, "node_modules/astral-regex": { "version": "2.0.0", - "devOptional": true, + "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -6310,7 +6310,7 @@ }, "node_modules/at-least-node": { "version": "1.0.0", - "devOptional": true, + "dev": true, "license": "ISC", "engines": { "node": ">= 4.0.0" @@ -6359,7 +6359,7 @@ }, "node_modules/aws-sign2": { "version": "0.7.0", - "devOptional": true, + "dev": true, "license": "Apache-2.0", "engines": { "node": "*" @@ -6367,7 +6367,7 @@ }, "node_modules/aws4": { "version": "1.11.0", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/axe-core": { @@ -6647,7 +6647,7 @@ }, "node_modules/bcrypt-pbkdf": { "version": "1.0.2", - "devOptional": true, + "dev": true, "license": "BSD-3-Clause", "dependencies": { "tweetnacl": "^0.14.3" @@ -6678,7 +6678,7 @@ }, "node_modules/blob-util": { "version": "2.0.2", - "devOptional": true, + "dev": true, "license": "Apache-2.0" }, "node_modules/bluebird": { @@ -6840,7 +6840,7 @@ }, "node_modules/buffer-crc32": { "version": "0.2.13", - "devOptional": true, + "dev": true, "license": "MIT", "engines": { "node": "*" @@ -6869,7 +6869,7 @@ }, "node_modules/cachedir": { "version": "2.3.0", - "devOptional": true, + "dev": true, "license": "MIT", "engines": { "node": ">=6" @@ -6929,7 +6929,7 @@ }, "node_modules/caseless": { "version": "0.12.0", - "devOptional": true, + "dev": true, "license": "Apache-2.0" }, "node_modules/chalk": { @@ -6955,7 +6955,7 @@ }, "node_modules/check-more-types": { "version": "2.24.0", - "devOptional": true, + "dev": true, "license": "MIT", "engines": { "node": ">= 0.8.0" @@ -7003,7 +7003,7 @@ }, "node_modules/clean-stack": { "version": "2.2.0", - "devOptional": true, + "dev": true, "license": "MIT", "engines": { "node": ">=6" @@ -7031,7 +7031,7 @@ }, "node_modules/cli-table3": { "version": "0.6.3", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "string-width": "^4.2.0" @@ -7045,7 +7045,7 @@ }, "node_modules/cli-truncate": { "version": "2.1.0", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "slice-ansi": "^3.0.0", @@ -7150,7 +7150,7 @@ }, "node_modules/common-tags": { "version": "1.8.2", - "devOptional": true, + "dev": true, "license": "MIT", "engines": { "node": ">=4.0.0" @@ -7763,7 +7763,7 @@ }, "node_modules/cypress": { "version": "10.10.0", - "devOptional": true, + "dev": true, "hasInstallScript": true, "license": "MIT", "dependencies": { @@ -7819,17 +7819,17 @@ }, "node_modules/cypress/node_modules/@types/node": { "version": "14.18.32", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/cypress/node_modules/bluebird": { "version": "3.7.2", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/cypress/node_modules/commander": { "version": "5.1.0", - "devOptional": true, + "dev": true, "license": "MIT", "engines": { "node": ">= 6" @@ -7837,7 +7837,7 @@ }, "node_modules/cypress/node_modules/execa": { "version": "4.1.0", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "cross-spawn": "^7.0.0", @@ -7859,7 +7859,7 @@ }, "node_modules/cypress/node_modules/fs-extra": { "version": "9.1.0", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "at-least-node": "^1.0.0", @@ -7873,7 +7873,7 @@ }, "node_modules/cypress/node_modules/get-stream": { "version": "5.2.0", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "pump": "^3.0.0" @@ -7887,7 +7887,7 @@ }, "node_modules/cypress/node_modules/human-signals": { "version": "1.1.1", - "devOptional": true, + "dev": true, "license": "Apache-2.0", "engines": { "node": ">=8.12.0" @@ -7895,7 +7895,7 @@ }, "node_modules/cypress/node_modules/supports-color": { "version": "8.1.1", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "has-flag": "^4.0.0" @@ -7914,7 +7914,7 @@ }, "node_modules/dashdash": { "version": "1.14.1", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "assert-plus": "^1.0.0" @@ -7950,7 +7950,7 @@ }, "node_modules/dayjs": { "version": "1.11.5", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/debug": { @@ -7986,7 +7986,7 @@ }, "node_modules/deep-is": { "version": "0.1.4", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/deepmerge": { @@ -8101,7 +8101,7 @@ }, "node_modules/doctrine": { "version": "3.0.0", - "devOptional": true, + "dev": true, "license": "Apache-2.0", "dependencies": { "esutils": "^2.0.2" @@ -8193,7 +8193,7 @@ }, "node_modules/ecc-jsbn": { "version": "0.1.2", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "jsbn": "~0.1.0", @@ -8473,7 +8473,7 @@ }, "node_modules/eslint": { "version": "8.15.0", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "@eslint/eslintrc": "^1.2.3", @@ -8857,7 +8857,7 @@ }, "node_modules/eslint-utils": { "version": "3.0.0", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "eslint-visitor-keys": "^2.0.0" @@ -8874,7 +8874,7 @@ }, "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { "version": "2.1.0", - "devOptional": true, + "dev": true, "license": "Apache-2.0", "engines": { "node": ">=10" @@ -8882,7 +8882,7 @@ }, "node_modules/eslint-visitor-keys": { "version": "3.3.0", - "devOptional": true, + "dev": true, "license": "Apache-2.0", "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -8890,12 +8890,12 @@ }, "node_modules/eslint/node_modules/argparse": { "version": "2.0.1", - "devOptional": true, + "dev": true, "license": "Python-2.0" }, "node_modules/eslint/node_modules/escape-string-regexp": { "version": "4.0.0", - "devOptional": true, + "dev": true, "license": "MIT", "engines": { "node": ">=10" @@ -8906,7 +8906,7 @@ }, "node_modules/eslint/node_modules/eslint-scope": { "version": "7.1.1", - "devOptional": true, + "dev": true, "license": "BSD-2-Clause", "dependencies": { "esrecurse": "^4.3.0", @@ -8918,7 +8918,7 @@ }, "node_modules/eslint/node_modules/glob-parent": { "version": "6.0.2", - "devOptional": true, + "dev": true, "license": "ISC", "dependencies": { "is-glob": "^4.0.3" @@ -8929,7 +8929,7 @@ }, "node_modules/eslint/node_modules/globals": { "version": "13.17.0", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "type-fest": "^0.20.2" @@ -8943,7 +8943,7 @@ }, "node_modules/eslint/node_modules/js-yaml": { "version": "4.1.0", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "argparse": "^2.0.1" @@ -8954,7 +8954,7 @@ }, "node_modules/eslint/node_modules/minimatch": { "version": "3.1.2", - "devOptional": true, + "dev": true, "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" @@ -8965,7 +8965,7 @@ }, "node_modules/eslint/node_modules/type-fest": { "version": "0.20.2", - "devOptional": true, + "dev": true, "license": "(MIT OR CC0-1.0)", "engines": { "node": ">=10" @@ -8976,7 +8976,7 @@ }, "node_modules/espree": { "version": "9.4.0", - "devOptional": true, + "dev": true, "license": "BSD-2-Clause", "dependencies": { "acorn": "^8.8.0", @@ -9048,7 +9048,7 @@ }, "node_modules/eventemitter2": { "version": "6.4.7", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/eventemitter3": { @@ -9085,7 +9085,7 @@ }, "node_modules/executable": { "version": "4.1.1", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "pify": "^2.2.0" @@ -9204,12 +9204,12 @@ }, "node_modules/extend": { "version": "3.0.2", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/extract-zip": { "version": "2.0.1", - "devOptional": true, + "dev": true, "license": "BSD-2-Clause", "dependencies": { "debug": "^4.1.1", @@ -9228,7 +9228,7 @@ }, "node_modules/extract-zip/node_modules/get-stream": { "version": "5.2.0", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "pump": "^3.0.0" @@ -9242,7 +9242,7 @@ }, "node_modules/extsprintf": { "version": "1.3.0", - "devOptional": true, + "dev": true, "engines": [ "node >=0.6.0" ], @@ -9272,7 +9272,7 @@ }, "node_modules/fast-levenshtein": { "version": "2.0.6", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/fastq": { @@ -9301,7 +9301,7 @@ }, "node_modules/fd-slicer": { "version": "1.1.0", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "pend": "~1.2.0" @@ -9322,7 +9322,7 @@ }, "node_modules/file-entry-cache": { "version": "6.0.1", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "flat-cache": "^3.0.4" @@ -9448,7 +9448,7 @@ }, "node_modules/flat-cache": { "version": "3.0.4", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "flatted": "^3.1.0", @@ -9460,7 +9460,7 @@ }, "node_modules/flatted": { "version": "3.2.7", - "devOptional": true, + "dev": true, "license": "ISC" }, "node_modules/follow-redirects": { @@ -9483,7 +9483,7 @@ }, "node_modules/forever-agent": { "version": "0.6.1", - "devOptional": true, + "dev": true, "license": "Apache-2.0", "engines": { "node": "*" @@ -9550,7 +9550,7 @@ }, "node_modules/form-data": { "version": "2.3.3", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "asynckit": "^0.4.0", @@ -9644,7 +9644,7 @@ }, "node_modules/functional-red-black-tree": { "version": "1.0.1", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/functions-have-names": { @@ -9729,7 +9729,7 @@ }, "node_modules/getos": { "version": "3.2.1", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "async": "^3.2.0" @@ -9737,7 +9737,7 @@ }, "node_modules/getpass": { "version": "0.1.7", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "assert-plus": "^1.0.0" @@ -9787,7 +9787,7 @@ }, "node_modules/global-dirs": { "version": "3.0.0", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "ini": "2.0.0" @@ -10071,7 +10071,7 @@ }, "node_modules/http-signature": { "version": "1.3.6", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "assert-plus": "^1.0.0", @@ -10243,7 +10243,7 @@ }, "node_modules/indent-string": { "version": "4.0.0", - "devOptional": true, + "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -10263,7 +10263,7 @@ }, "node_modules/ini": { "version": "2.0.0", - "devOptional": true, + "dev": true, "license": "ISC", "engines": { "node": ">=10" @@ -10355,7 +10355,7 @@ }, "node_modules/is-ci": { "version": "3.0.1", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "ci-info": "^3.2.0" @@ -10434,7 +10434,7 @@ }, "node_modules/is-installed-globally": { "version": "0.4.0", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "global-dirs": "^3.0.0", @@ -10485,7 +10485,7 @@ }, "node_modules/is-path-inside": { "version": "3.0.3", - "devOptional": true, + "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -10586,12 +10586,12 @@ }, "node_modules/is-typedarray": { "version": "1.0.0", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/is-unicode-supported": { "version": "0.1.0", - "devOptional": true, + "dev": true, "license": "MIT", "engines": { "node": ">=10" @@ -10638,7 +10638,7 @@ }, "node_modules/isstream": { "version": "0.1.2", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/istanbul-lib-coverage": { @@ -11603,7 +11603,7 @@ }, "node_modules/jsbn": { "version": "0.1.1", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/jsdom": { @@ -11707,7 +11707,7 @@ }, "node_modules/json-schema": { "version": "0.4.0", - "devOptional": true, + "dev": true, "license": "(AFL-2.1 OR BSD-3-Clause)" }, "node_modules/json-schema-traverse": { @@ -11716,12 +11716,12 @@ }, "node_modules/json-stable-stringify-without-jsonify": { "version": "1.0.1", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/json-stringify-safe": { "version": "5.0.1", - "devOptional": true, + "dev": true, "license": "ISC" }, "node_modules/json5": { @@ -11750,7 +11750,7 @@ }, "node_modules/jsprim": { "version": "2.0.2", - "devOptional": true, + "dev": true, "engines": [ "node >=0.6.0" ], @@ -11811,7 +11811,7 @@ }, "node_modules/lazy-ass": { "version": "1.6.0", - "devOptional": true, + "dev": true, "license": "MIT", "engines": { "node": "> 0.8" @@ -11906,7 +11906,7 @@ }, "node_modules/levn": { "version": "0.4.1", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "prelude-ls": "^1.2.1", @@ -11944,7 +11944,7 @@ }, "node_modules/listr2": { "version": "3.14.0", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "cli-truncate": "^2.1.0", @@ -11970,12 +11970,12 @@ }, "node_modules/listr2/node_modules/colorette": { "version": "2.0.19", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/listr2/node_modules/rxjs": { "version": "7.5.6", - "devOptional": true, + "dev": true, "license": "Apache-2.0", "dependencies": { "tslib": "^2.1.0" @@ -12031,12 +12031,12 @@ }, "node_modules/lodash.merge": { "version": "4.6.2", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/lodash.once": { "version": "4.1.1", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/lodash.uniq": { @@ -12045,7 +12045,7 @@ }, "node_modules/log-symbols": { "version": "4.1.0", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "chalk": "^4.1.0", @@ -12060,7 +12060,7 @@ }, "node_modules/log-update": { "version": "4.0.0", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "ansi-escapes": "^4.3.0", @@ -12077,7 +12077,7 @@ }, "node_modules/log-update/node_modules/slice-ansi": { "version": "4.0.0", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", @@ -12093,7 +12093,7 @@ }, "node_modules/log-update/node_modules/wrap-ansi": { "version": "6.2.0", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", @@ -12806,7 +12806,7 @@ }, "node_modules/optionator": { "version": "0.9.1", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "deep-is": "^0.1.3", @@ -12822,7 +12822,7 @@ }, "node_modules/ospath": { "version": "1.2.2", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/p-finally": { @@ -12860,7 +12860,7 @@ }, "node_modules/p-map": { "version": "4.0.0", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "aggregate-error": "^3.0.0" @@ -13026,12 +13026,12 @@ }, "node_modules/pend": { "version": "1.2.0", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/performance-now": { "version": "2.1.0", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/picocolors": { @@ -13675,7 +13675,7 @@ }, "node_modules/prelude-ls": { "version": "1.2.1", - "devOptional": true, + "dev": true, "license": "MIT", "engines": { "node": ">= 0.8.0" @@ -13683,7 +13683,7 @@ }, "node_modules/prettier": { "version": "2.7.1", - "devOptional": true, + "dev": true, "license": "MIT", "bin": { "prettier": "bin-prettier.js" @@ -13697,7 +13697,7 @@ }, "node_modules/pretty-bytes": { "version": "5.6.0", - "devOptional": true, + "dev": true, "license": "MIT", "engines": { "node": ">=6" @@ -13787,7 +13787,7 @@ }, "node_modules/proxy-from-env": { "version": "1.0.0", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/prr": { @@ -13797,12 +13797,12 @@ }, "node_modules/psl": { "version": "1.9.0", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/pump": { "version": "3.0.0", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "end-of-stream": "^1.1.0", @@ -14043,7 +14043,7 @@ }, "node_modules/regexpp": { "version": "3.2.0", - "devOptional": true, + "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -14089,7 +14089,7 @@ }, "node_modules/request-progress": { "version": "3.0.0", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "throttleit": "^1.0.0" @@ -14181,7 +14181,7 @@ }, "node_modules/rfdc": { "version": "1.3.0", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/rimraf": { @@ -14714,7 +14714,7 @@ }, "node_modules/slice-ansi": { "version": "3.0.0", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", @@ -14826,7 +14826,7 @@ }, "node_modules/sshpk": { "version": "1.17.0", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "asn1": "~0.2.3", @@ -15360,12 +15360,12 @@ }, "node_modules/text-table": { "version": "0.2.0", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/throttleit": { "version": "1.0.0", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/through": { @@ -15416,7 +15416,7 @@ }, "node_modules/tough-cookie": { "version": "2.5.0", - "devOptional": true, + "dev": true, "license": "BSD-3-Clause", "dependencies": { "psl": "^1.1.28", @@ -15605,7 +15605,7 @@ }, "node_modules/tunnel-agent": { "version": "0.6.0", - "devOptional": true, + "dev": true, "license": "Apache-2.0", "dependencies": { "safe-buffer": "^5.0.1" @@ -15616,12 +15616,12 @@ }, "node_modules/tweetnacl": { "version": "0.14.5", - "devOptional": true, + "dev": true, "license": "Unlicense" }, "node_modules/type-check": { "version": "0.4.0", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "prelude-ls": "^1.2.1" @@ -15664,6 +15664,7 @@ }, "node_modules/typescript": { "version": "4.8.4", + "dev": true, "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", @@ -15744,7 +15745,7 @@ }, "node_modules/untildify": { "version": "4.0.0", - "devOptional": true, + "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -15876,7 +15877,7 @@ }, "node_modules/verror": { "version": "1.10.0", - "devOptional": true, + "dev": true, "engines": [ "node >=0.6.0" ], @@ -15889,7 +15890,7 @@ }, "node_modules/verror/node_modules/core-util-is": { "version": "1.0.2", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/w3c-hr-time": { @@ -16292,7 +16293,7 @@ }, "node_modules/word-wrap": { "version": "1.2.3", - "devOptional": true, + "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -16423,7 +16424,7 @@ }, "node_modules/yauzl": { "version": "2.10.0", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "buffer-crc32": "~0.2.3", @@ -17457,7 +17458,7 @@ }, "@cypress/request": { "version": "2.88.10", - "devOptional": true, + "dev": true, "requires": { "aws-sign2": "~0.7.0", "aws4": "^1.8.0", @@ -17481,7 +17482,7 @@ "dependencies": { "qs": { "version": "6.5.3", - "devOptional": true + "dev": true } } }, @@ -17495,7 +17496,7 @@ }, "@cypress/xvfb": { "version": "1.2.4", - "devOptional": true, + "dev": true, "requires": { "debug": "^3.1.0", "lodash.once": "^4.1.1" @@ -17503,7 +17504,7 @@ "dependencies": { "debug": { "version": "3.2.7", - "devOptional": true, + "dev": true, "requires": { "ms": "^2.1.1" } @@ -17512,7 +17513,7 @@ }, "@eslint/eslintrc": { "version": "1.3.2", - "devOptional": true, + "dev": true, "requires": { "ajv": "^6.12.4", "debug": "^4.3.2", @@ -17527,38 +17528,38 @@ "dependencies": { "argparse": { "version": "2.0.1", - "devOptional": true + "dev": true }, "globals": { "version": "13.17.0", - "devOptional": true, + "dev": true, "requires": { "type-fest": "^0.20.2" } }, "js-yaml": { "version": "4.1.0", - "devOptional": true, + "dev": true, "requires": { "argparse": "^2.0.1" } }, "minimatch": { "version": "3.1.2", - "devOptional": true, + "dev": true, "requires": { "brace-expansion": "^1.1.7" } }, "type-fest": { "version": "0.20.2", - "devOptional": true + "dev": true } } }, "@humanwhocodes/config-array": { "version": "0.9.5", - "devOptional": true, + "dev": true, "requires": { "@humanwhocodes/object-schema": "^1.2.1", "debug": "^4.1.1", @@ -17567,7 +17568,7 @@ }, "@humanwhocodes/object-schema": { "version": "1.2.1", - "devOptional": true + "dev": true }, "@istanbuljs/load-nyc-config": { "version": "1.1.0", @@ -19627,36 +19628,28 @@ } }, "@svgr/babel-plugin-add-jsx-attribute": { - "version": "6.5.1", - "requires": {} + "version": "6.5.1" }, "@svgr/babel-plugin-remove-jsx-attribute": { - "version": "6.5.0", - "requires": {} + "version": "6.5.0" }, "@svgr/babel-plugin-remove-jsx-empty-expression": { - "version": "6.5.0", - "requires": {} + "version": "6.5.0" }, "@svgr/babel-plugin-replace-jsx-attribute-value": { - "version": "6.5.1", - "requires": {} + "version": "6.5.1" }, "@svgr/babel-plugin-svg-dynamic-title": { - "version": "6.5.1", - "requires": {} + "version": "6.5.1" }, "@svgr/babel-plugin-svg-em-dimensions": { - "version": "6.5.1", - "requires": {} + "version": "6.5.1" }, "@svgr/babel-plugin-transform-react-native-svg": { - "version": "6.5.1", - "requires": {} + "version": "6.5.1" }, "@svgr/babel-plugin-transform-svg-component": { - "version": "6.5.1", - "requires": {} + "version": "6.5.1" }, "@svgr/babel-preset": { "version": "6.5.1", @@ -20020,11 +20013,11 @@ }, "@types/sinonjs__fake-timers": { "version": "8.1.1", - "devOptional": true + "dev": true }, "@types/sizzle": { "version": "2.3.3", - "devOptional": true + "dev": true }, "@types/sockjs": { "version": "0.3.33", @@ -20362,13 +20355,11 @@ } }, "acorn-import-assertions": { - "version": "1.8.0", - "requires": {} + "version": "1.8.0" }, "acorn-jsx": { "version": "5.3.2", - "devOptional": true, - "requires": {} + "dev": true }, "acorn-walk": { "version": "8.2.0" @@ -20382,7 +20373,7 @@ }, "aggregate-error": { "version": "3.1.0", - "devOptional": true, + "dev": true, "requires": { "clean-stack": "^2.0.0", "indent-string": "^4.0.0" @@ -20418,8 +20409,7 @@ } }, "ajv-keywords": { - "version": "3.5.2", - "requires": {} + "version": "3.5.2" }, "ansi-colors": { "version": "4.1.3" @@ -20451,7 +20441,7 @@ }, "arch": { "version": "2.2.0", - "devOptional": true + "dev": true }, "arg": { "version": "4.1.3" @@ -20505,14 +20495,14 @@ }, "asn1": { "version": "0.2.6", - "devOptional": true, + "dev": true, "requires": { "safer-buffer": "~2.1.0" } }, "assert-plus": { "version": "1.0.0", - "devOptional": true + "dev": true }, "ast-types-flow": { "version": "0.0.7", @@ -20520,7 +20510,7 @@ }, "astral-regex": { "version": "2.0.0", - "devOptional": true + "dev": true }, "async": { "version": "3.2.4" @@ -20530,7 +20520,7 @@ }, "at-least-node": { "version": "1.0.0", - "devOptional": true + "dev": true }, "atob": { "version": "2.1.2" @@ -20548,11 +20538,11 @@ }, "aws-sign2": { "version": "0.7.0", - "devOptional": true + "dev": true }, "aws4": { "version": "1.11.0", - "devOptional": true + "dev": true }, "axe-core": { "version": "4.4.3", @@ -20739,7 +20729,7 @@ }, "bcrypt-pbkdf": { "version": "1.0.2", - "devOptional": true, + "dev": true, "requires": { "tweetnacl": "^0.14.3" } @@ -20760,7 +20750,7 @@ }, "blob-util": { "version": "2.0.2", - "devOptional": true + "dev": true }, "bluebird": { "version": "3.7.1" @@ -20862,7 +20852,7 @@ }, "buffer-crc32": { "version": "0.2.13", - "devOptional": true + "dev": true }, "buffer-from": { "version": "1.1.2" @@ -20875,7 +20865,7 @@ }, "cachedir": { "version": "2.3.0", - "devOptional": true + "dev": true }, "call-bind": { "version": "1.0.2", @@ -20904,7 +20894,7 @@ }, "caseless": { "version": "0.12.0", - "devOptional": true + "dev": true }, "chalk": { "version": "4.1.0", @@ -20918,7 +20908,7 @@ }, "check-more-types": { "version": "2.24.0", - "devOptional": true + "dev": true }, "chokidar": { "version": "3.5.3", @@ -20944,7 +20934,7 @@ }, "clean-stack": { "version": "2.2.0", - "devOptional": true + "dev": true }, "cli-cursor": { "version": "3.1.0", @@ -20957,7 +20947,7 @@ }, "cli-table3": { "version": "0.6.3", - "devOptional": true, + "dev": true, "requires": { "@colors/colors": "1.5.0", "string-width": "^4.2.0" @@ -20965,7 +20955,7 @@ }, "cli-truncate": { "version": "2.1.0", - "devOptional": true, + "dev": true, "requires": { "slice-ansi": "^3.0.0", "string-width": "^4.2.0" @@ -21033,7 +21023,7 @@ }, "common-tags": { "version": "1.8.2", - "devOptional": true + "dev": true }, "commondir": { "version": "1.0.1" @@ -21213,8 +21203,7 @@ } }, "css-declaration-sorter": { - "version": "6.3.1", - "requires": {} + "version": "6.3.1" }, "css-loader": { "version": "6.7.1", @@ -21365,8 +21354,7 @@ } }, "cssnano-utils": { - "version": "3.1.0", - "requires": {} + "version": "3.1.0" }, "csso": { "version": "4.2.0", @@ -21397,7 +21385,7 @@ }, "cypress": { "version": "10.10.0", - "devOptional": true, + "dev": true, "requires": { "@cypress/request": "^2.88.10", "@cypress/xvfb": "^1.2.4", @@ -21445,19 +21433,19 @@ "dependencies": { "@types/node": { "version": "14.18.32", - "devOptional": true + "dev": true }, "bluebird": { "version": "3.7.2", - "devOptional": true + "dev": true }, "commander": { "version": "5.1.0", - "devOptional": true + "dev": true }, "execa": { "version": "4.1.0", - "devOptional": true, + "dev": true, "requires": { "cross-spawn": "^7.0.0", "get-stream": "^5.0.0", @@ -21472,7 +21460,7 @@ }, "fs-extra": { "version": "9.1.0", - "devOptional": true, + "dev": true, "requires": { "at-least-node": "^1.0.0", "graceful-fs": "^4.2.0", @@ -21482,18 +21470,18 @@ }, "get-stream": { "version": "5.2.0", - "devOptional": true, + "dev": true, "requires": { "pump": "^3.0.0" } }, "human-signals": { "version": "1.1.1", - "devOptional": true + "dev": true }, "supports-color": { "version": "8.1.1", - "devOptional": true, + "dev": true, "requires": { "has-flag": "^4.0.0" } @@ -21506,7 +21494,7 @@ }, "dashdash": { "version": "1.14.1", - "devOptional": true, + "dev": true, "requires": { "assert-plus": "^1.0.0" } @@ -21532,7 +21520,7 @@ }, "dayjs": { "version": "1.11.5", - "devOptional": true + "dev": true }, "debug": { "version": "4.3.4", @@ -21552,7 +21540,7 @@ }, "deep-is": { "version": "0.1.4", - "devOptional": true + "dev": true }, "deepmerge": { "version": "4.2.2" @@ -21612,7 +21600,7 @@ }, "doctrine": { "version": "3.0.0", - "devOptional": true, + "dev": true, "requires": { "esutils": "^2.0.2" } @@ -21666,7 +21654,7 @@ }, "ecc-jsbn": { "version": "0.1.2", - "devOptional": true, + "dev": true, "requires": { "jsbn": "~0.1.0", "safer-buffer": "^2.1.0" @@ -21846,7 +21834,7 @@ }, "eslint": { "version": "8.15.0", - "devOptional": true, + "dev": true, "requires": { "@eslint/eslintrc": "^1.2.3", "@humanwhocodes/config-array": "^0.9.2", @@ -21887,15 +21875,15 @@ "dependencies": { "argparse": { "version": "2.0.1", - "devOptional": true + "dev": true }, "escape-string-regexp": { "version": "4.0.0", - "devOptional": true + "dev": true }, "eslint-scope": { "version": "7.1.1", - "devOptional": true, + "dev": true, "requires": { "esrecurse": "^4.3.0", "estraverse": "^5.2.0" @@ -21903,35 +21891,35 @@ }, "glob-parent": { "version": "6.0.2", - "devOptional": true, + "dev": true, "requires": { "is-glob": "^4.0.3" } }, "globals": { "version": "13.17.0", - "devOptional": true, + "dev": true, "requires": { "type-fest": "^0.20.2" } }, "js-yaml": { "version": "4.1.0", - "devOptional": true, + "dev": true, "requires": { "argparse": "^2.0.1" } }, "minimatch": { "version": "3.1.2", - "devOptional": true, + "dev": true, "requires": { "brace-expansion": "^1.1.7" } }, "type-fest": { "version": "0.20.2", - "devOptional": true + "dev": true } } }, @@ -21954,8 +21942,7 @@ }, "eslint-config-prettier": { "version": "8.1.0", - "dev": true, - "requires": {} + "dev": true }, "eslint-import-resolver-node": { "version": "0.3.6", @@ -22149,8 +22136,7 @@ }, "eslint-plugin-react-hooks": { "version": "4.6.0", - "dev": true, - "requires": {} + "dev": true }, "eslint-scope": { "version": "5.1.1", @@ -22166,24 +22152,24 @@ }, "eslint-utils": { "version": "3.0.0", - "devOptional": true, + "dev": true, "requires": { "eslint-visitor-keys": "^2.0.0" }, "dependencies": { "eslint-visitor-keys": { "version": "2.1.0", - "devOptional": true + "dev": true } } }, "eslint-visitor-keys": { "version": "3.3.0", - "devOptional": true + "dev": true }, "espree": { "version": "9.4.0", - "devOptional": true, + "dev": true, "requires": { "acorn": "^8.8.0", "acorn-jsx": "^5.3.2", @@ -22219,7 +22205,7 @@ }, "eventemitter2": { "version": "6.4.7", - "devOptional": true + "dev": true }, "eventemitter3": { "version": "4.0.7" @@ -22243,7 +22229,7 @@ }, "executable": { "version": "4.1.1", - "devOptional": true, + "dev": true, "requires": { "pify": "^2.2.0" } @@ -22329,11 +22315,11 @@ }, "extend": { "version": "3.0.2", - "devOptional": true + "dev": true }, "extract-zip": { "version": "2.0.1", - "devOptional": true, + "dev": true, "requires": { "@types/yauzl": "^2.9.1", "debug": "^4.1.1", @@ -22343,7 +22329,7 @@ "dependencies": { "get-stream": { "version": "5.2.0", - "devOptional": true, + "dev": true, "requires": { "pump": "^3.0.0" } @@ -22352,7 +22338,7 @@ }, "extsprintf": { "version": "1.3.0", - "devOptional": true + "dev": true }, "fast-deep-equal": { "version": "3.1.3" @@ -22372,7 +22358,7 @@ }, "fast-levenshtein": { "version": "2.0.6", - "devOptional": true + "dev": true }, "fastq": { "version": "1.13.0", @@ -22394,7 +22380,7 @@ }, "fd-slicer": { "version": "1.1.0", - "devOptional": true, + "dev": true, "requires": { "pend": "~1.2.0" } @@ -22407,7 +22393,7 @@ }, "file-entry-cache": { "version": "6.0.1", - "devOptional": true, + "dev": true, "requires": { "flat-cache": "^3.0.4" } @@ -22488,7 +22474,7 @@ }, "flat-cache": { "version": "3.0.4", - "devOptional": true, + "dev": true, "requires": { "flatted": "^3.1.0", "rimraf": "^3.0.2" @@ -22496,14 +22482,14 @@ }, "flatted": { "version": "3.2.7", - "devOptional": true + "dev": true }, "follow-redirects": { "version": "1.15.2" }, "forever-agent": { "version": "0.6.1", - "devOptional": true + "dev": true }, "fork-ts-checker-webpack-plugin": { "version": "7.2.13", @@ -22539,7 +22525,7 @@ }, "form-data": { "version": "2.3.3", - "devOptional": true, + "dev": true, "requires": { "asynckit": "^0.4.0", "combined-stream": "^1.0.6", @@ -22591,7 +22577,7 @@ }, "functional-red-black-tree": { "version": "1.0.1", - "devOptional": true + "dev": true }, "functions-have-names": { "version": "1.2.3", @@ -22638,14 +22624,14 @@ }, "getos": { "version": "3.2.1", - "devOptional": true, + "dev": true, "requires": { "async": "^3.2.0" } }, "getpass": { "version": "0.1.7", - "devOptional": true, + "dev": true, "requires": { "assert-plus": "^1.0.0" } @@ -22680,7 +22666,7 @@ }, "global-dirs": { "version": "3.0.0", - "devOptional": true, + "dev": true, "requires": { "ini": "2.0.0" } @@ -22859,7 +22845,7 @@ }, "http-signature": { "version": "1.3.6", - "devOptional": true, + "dev": true, "requires": { "assert-plus": "^1.0.0", "jsprim": "^2.0.2", @@ -22887,8 +22873,7 @@ "version": "1.1.0" }, "icss-utils": { - "version": "5.1.0", - "requires": {} + "version": "5.1.0" }, "identity-obj-proxy": { "version": "3.0.0", @@ -22946,7 +22931,7 @@ }, "indent-string": { "version": "4.0.0", - "devOptional": true + "dev": true }, "inflight": { "version": "1.0.6", @@ -22960,7 +22945,7 @@ }, "ini": { "version": "2.0.0", - "devOptional": true + "dev": true }, "internal-slot": { "version": "1.0.3", @@ -23010,7 +22995,7 @@ }, "is-ci": { "version": "3.0.1", - "devOptional": true, + "dev": true, "requires": { "ci-info": "^3.2.0" } @@ -23048,7 +23033,7 @@ }, "is-installed-globally": { "version": "0.4.0", - "devOptional": true, + "dev": true, "requires": { "global-dirs": "^3.0.0", "is-path-inside": "^3.0.2" @@ -23073,7 +23058,7 @@ }, "is-path-inside": { "version": "3.0.3", - "devOptional": true + "dev": true }, "is-plain-obj": { "version": "3.0.0" @@ -23125,11 +23110,11 @@ }, "is-typedarray": { "version": "1.0.0", - "devOptional": true + "dev": true }, "is-unicode-supported": { "version": "0.1.0", - "devOptional": true + "dev": true }, "is-weakref": { "version": "1.0.2", @@ -23155,7 +23140,7 @@ }, "isstream": { "version": "0.1.2", - "devOptional": true + "dev": true }, "istanbul-lib-coverage": { "version": "3.2.0" @@ -23555,8 +23540,7 @@ } }, "jest-pnp-resolver": { - "version": "1.2.2", - "requires": {} + "version": "1.2.2" }, "jest-regex-util": { "version": "28.0.2" @@ -23850,7 +23834,7 @@ }, "jsbn": { "version": "0.1.1", - "devOptional": true + "dev": true }, "jsdom": { "version": "19.0.0", @@ -23922,18 +23906,18 @@ }, "json-schema": { "version": "0.4.0", - "devOptional": true + "dev": true }, "json-schema-traverse": { "version": "0.4.1" }, "json-stable-stringify-without-jsonify": { "version": "1.0.1", - "devOptional": true + "dev": true }, "json-stringify-safe": { "version": "5.0.1", - "devOptional": true + "dev": true }, "json5": { "version": "2.2.1" @@ -23950,7 +23934,7 @@ }, "jsprim": { "version": "2.0.2", - "devOptional": true, + "dev": true, "requires": { "assert-plus": "1.0.0", "extsprintf": "1.3.0", @@ -23989,7 +23973,7 @@ }, "lazy-ass": { "version": "1.6.0", - "devOptional": true + "dev": true }, "less": { "version": "3.12.2", @@ -24040,7 +24024,7 @@ }, "levn": { "version": "0.4.1", - "devOptional": true, + "dev": true, "requires": { "prelude-ls": "^1.2.1", "type-check": "~0.4.0" @@ -24060,7 +24044,7 @@ }, "listr2": { "version": "3.14.0", - "devOptional": true, + "dev": true, "requires": { "cli-truncate": "^2.1.0", "colorette": "^2.0.16", @@ -24074,11 +24058,11 @@ "dependencies": { "colorette": { "version": "2.0.19", - "devOptional": true + "dev": true }, "rxjs": { "version": "7.5.6", - "devOptional": true, + "dev": true, "requires": { "tslib": "^2.1.0" } @@ -24116,18 +24100,18 @@ }, "lodash.merge": { "version": "4.6.2", - "devOptional": true + "dev": true }, "lodash.once": { "version": "4.1.1", - "devOptional": true + "dev": true }, "lodash.uniq": { "version": "4.5.0" }, "log-symbols": { "version": "4.1.0", - "devOptional": true, + "dev": true, "requires": { "chalk": "^4.1.0", "is-unicode-supported": "^0.1.0" @@ -24135,7 +24119,7 @@ }, "log-update": { "version": "4.0.0", - "devOptional": true, + "dev": true, "requires": { "ansi-escapes": "^4.3.0", "cli-cursor": "^3.1.0", @@ -24145,7 +24129,7 @@ "dependencies": { "slice-ansi": { "version": "4.0.0", - "devOptional": true, + "dev": true, "requires": { "ansi-styles": "^4.0.0", "astral-regex": "^2.0.0", @@ -24154,7 +24138,7 @@ }, "wrap-ansi": { "version": "6.2.0", - "devOptional": true, + "dev": true, "requires": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -24571,7 +24555,7 @@ }, "optionator": { "version": "0.9.1", - "devOptional": true, + "dev": true, "requires": { "deep-is": "^0.1.3", "fast-levenshtein": "^2.0.6", @@ -24583,7 +24567,7 @@ }, "ospath": { "version": "1.2.2", - "devOptional": true + "dev": true }, "p-finally": { "version": "1.0.0" @@ -24602,7 +24586,7 @@ }, "p-map": { "version": "4.0.0", - "devOptional": true, + "dev": true, "requires": { "aggregate-error": "^3.0.0" } @@ -24706,11 +24690,11 @@ }, "pend": { "version": "1.2.0", - "devOptional": true + "dev": true }, "performance-now": { "version": "2.1.0", - "devOptional": true + "dev": true }, "picocolors": { "version": "1.0.0" @@ -24811,20 +24795,16 @@ } }, "postcss-discard-comments": { - "version": "5.1.2", - "requires": {} + "version": "5.1.2" }, "postcss-discard-duplicates": { - "version": "5.1.0", - "requires": {} + "version": "5.1.0" }, "postcss-discard-empty": { - "version": "5.1.1", - "requires": {} + "version": "5.1.1" }, "postcss-discard-overridden": { - "version": "5.1.0", - "requires": {} + "version": "5.1.0" }, "postcss-import": { "version": "14.1.0", @@ -24915,8 +24895,7 @@ } }, "postcss-modules-extract-imports": { - "version": "3.0.0", - "requires": {} + "version": "3.0.0" }, "postcss-modules-local-by-default": { "version": "4.0.0", @@ -24939,8 +24918,7 @@ } }, "postcss-normalize-charset": { - "version": "5.1.0", - "requires": {} + "version": "5.1.0" }, "postcss-normalize-display-values": { "version": "5.1.0", @@ -25037,15 +25015,15 @@ }, "prelude-ls": { "version": "1.2.1", - "devOptional": true + "dev": true }, "prettier": { "version": "2.7.1", - "devOptional": true + "dev": true }, "pretty-bytes": { "version": "5.6.0", - "devOptional": true + "dev": true }, "pretty-format": { "version": "28.1.3", @@ -25104,7 +25082,7 @@ }, "proxy-from-env": { "version": "1.0.0", - "devOptional": true + "dev": true }, "prr": { "version": "1.0.1", @@ -25112,11 +25090,11 @@ }, "psl": { "version": "1.9.0", - "devOptional": true + "dev": true }, "pump": { "version": "3.0.0", - "devOptional": true, + "dev": true, "requires": { "end-of-stream": "^1.1.0", "once": "^1.3.1" @@ -25259,7 +25237,7 @@ }, "regexpp": { "version": "3.2.0", - "devOptional": true + "dev": true }, "regexpu-core": { "version": "5.2.1", @@ -25288,7 +25266,7 @@ }, "request-progress": { "version": "3.0.0", - "devOptional": true, + "dev": true, "requires": { "throttleit": "^1.0.0" } @@ -25338,7 +25316,7 @@ }, "rfdc": { "version": "1.3.0", - "devOptional": true + "dev": true }, "rimraf": { "version": "3.0.2", @@ -25398,8 +25376,7 @@ } }, "rollup-plugin-peer-deps-external": { - "version": "2.2.4", - "requires": {} + "version": "2.2.4" }, "rollup-plugin-postcss": { "version": "4.0.2", @@ -25678,7 +25655,7 @@ }, "slice-ansi": { "version": "3.0.0", - "devOptional": true, + "dev": true, "requires": { "ansi-styles": "^4.0.0", "astral-regex": "^2.0.0", @@ -25755,7 +25732,7 @@ }, "sshpk": { "version": "1.17.0", - "devOptional": true, + "dev": true, "requires": { "asn1": "~0.2.3", "assert-plus": "^1.0.0", @@ -25876,8 +25853,7 @@ "version": "0.3.0" }, "style-loader": { - "version": "3.3.1", - "requires": {} + "version": "3.3.1" }, "styled-jsx": { "version": "5.1.0", @@ -26057,11 +26033,11 @@ }, "text-table": { "version": "0.2.0", - "devOptional": true + "dev": true }, "throttleit": { "version": "1.0.0", - "devOptional": true + "dev": true }, "through": { "version": "2.3.8" @@ -26092,7 +26068,7 @@ }, "tough-cookie": { "version": "2.5.0", - "devOptional": true, + "dev": true, "requires": { "psl": "^1.1.28", "punycode": "^2.1.1" @@ -26195,18 +26171,18 @@ }, "tunnel-agent": { "version": "0.6.0", - "devOptional": true, + "dev": true, "requires": { "safe-buffer": "^5.0.1" } }, "tweetnacl": { "version": "0.14.5", - "devOptional": true + "dev": true }, "type-check": { "version": "0.4.0", - "devOptional": true, + "dev": true, "requires": { "prelude-ls": "^1.2.1" } @@ -26228,7 +26204,8 @@ "version": "1.0.9" }, "typescript": { - "version": "4.8.4" + "version": "4.8.4", + "dev": true }, "unbox-primitive": { "version": "1.0.2", @@ -26270,7 +26247,7 @@ }, "untildify": { "version": "4.0.0", - "devOptional": true + "dev": true }, "upath2": { "version": "3.1.19", @@ -26341,7 +26318,7 @@ }, "verror": { "version": "1.10.0", - "devOptional": true, + "dev": true, "requires": { "assert-plus": "^1.0.0", "core-util-is": "1.0.2", @@ -26350,7 +26327,7 @@ "dependencies": { "core-util-is": { "version": "1.0.2", - "devOptional": true + "dev": true } } }, @@ -26603,7 +26580,7 @@ }, "word-wrap": { "version": "1.2.3", - "devOptional": true + "dev": true }, "wrap-ansi": { "version": "7.0.0", @@ -26624,8 +26601,7 @@ } }, "ws": { - "version": "8.9.0", - "requires": {} + "version": "8.9.0" }, "xml-name-validator": { "version": "4.0.0", @@ -26675,7 +26651,7 @@ }, "yauzl": { "version": "2.10.0", - "devOptional": true, + "dev": true, "requires": { "buffer-crc32": "~0.2.3", "fd-slicer": "~1.1.0" diff --git a/demos/nx-next-monorepo-demo/package.json b/demos/nx-next-monorepo-demo/package.json index 5068f626bd..053e164d6e 100644 --- a/demos/nx-next-monorepo-demo/package.json +++ b/demos/nx-next-monorepo-demo/package.json @@ -12,7 +12,7 @@ "@netlify/plugin-nextjs": "file:plugin-wrapper", "@nrwl/next": "15.0.11", "core-js": "^3.6.5", - "next": "^13.0.3", + "next": "^13.0.6", "react": "^18.2.0", "react-dom": "18.2.0", "regenerator-runtime": "0.13.10", diff --git a/demos/static-root/package.json b/demos/static-root/package.json index 8884647bd9..ee49f8b4dd 100644 --- a/demos/static-root/package.json +++ b/demos/static-root/package.json @@ -3,7 +3,7 @@ "version": "1.0.0", "description": "", "dependencies": { - "next": "^13.0.3" + "next": "^13.0.6" }, "devDependencies": { "@netlify/next": "*", diff --git a/demos/turborepo-next-monorepo-demo/package.json b/demos/turborepo-next-monorepo-demo/package.json index b7341ce984..e3dfa45bea 100644 --- a/demos/turborepo-next-monorepo-demo/package.json +++ b/demos/turborepo-next-monorepo-demo/package.json @@ -23,7 +23,7 @@ }, "dependencies": { "@types/react": "^18.0.0", - "next": "^13.0.3", + "next": "^13.0.6", "react": "^18.2.0", "react-dom": "^18.2.0" }, diff --git a/package-lock.json b/package-lock.json index 56740da775..aeb41b4f8a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,6 @@ "license": "MIT", "workspaces": [ "packages/*", - "demos/canary", "demos/default", "demos/next-auth", "demos/static-root", @@ -22,7 +21,7 @@ "demos/next-with-edge-functions" ], "dependencies": { - "next": "^13.0.3" + "next": "^13.0.6" }, "devDependencies": { "@babel/core": "^7.15.8", @@ -49,6 +48,7 @@ "execa": "^5.1.1", "husky": "^7.0.4", "jest": "^27.0.0", + "jest-extended": "^3.2.0", "jest-fetch-mock": "^3.0.3", "jest-junit": "^14.0.1", "netlify-plugin-cypress": "^2.2.0", @@ -67,12 +67,23 @@ "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", "license": "MIT", "dependencies": { - "next": "^13.0.3" + "next": "^13.0.6" }, "devDependencies": { "@netlify/next": "*", @@ -87,82 +98,34 @@ } }, "demos/canary": { - "version": "0.1.0", + "name": "app-dir", + "version": "1.0.0", + "extraneous": true, + "license": "MIT", "dependencies": { - "next": "^12.3.1", - "react": "^18.2.0", - "react-dom": "^18.2.0" + "nanoid": "^3.3.4", + "next": "^13.0.0", + "react": "latest", + "react-dom": "latest", + "sass": "latest", + "swr": "2.0.0-rc.0" }, "devDependencies": { - "@netlify/next": "*", - "@netlify/plugin-nextjs": "*", - "@types/fs-extra": "^9.0.13", - "@types/jest": "^27.4.1", - "@types/node": "^17.0.25", - "critters": "^0.0.16", - "husky": "^7.0.4", - "if-env": "^1.0.4", - "npm-run-all": "^4.1.5", + "@netlify/plugin-nextjs": "file:plugin-wrapper", "typescript": "^4.6.3" } }, - "demos/canary/node_modules/next": { - "version": "12.3.3", - "resolved": "https://registry.npmjs.org/next/-/next-12.3.3.tgz", - "integrity": "sha512-Rx2Y6Wl5R8E77NOfBupp/B9OPCklqfqD0yN2+rDivhMjd6hjVFH5n0WTDI4PWwDmZsdNcYt6NV85kJ3PLR+eNQ==", - "dependencies": { - "@next/env": "12.3.3", - "@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.3", - "@next/swc-android-arm64": "12.3.3", - "@next/swc-darwin-arm64": "12.3.3", - "@next/swc-darwin-x64": "12.3.3", - "@next/swc-freebsd-x64": "12.3.3", - "@next/swc-linux-arm-gnueabihf": "12.3.3", - "@next/swc-linux-arm64-gnu": "12.3.3", - "@next/swc-linux-arm64-musl": "12.3.3", - "@next/swc-linux-x64-gnu": "12.3.3", - "@next/swc-linux-x64-musl": "12.3.3", - "@next/swc-win32-arm64-msvc": "12.3.3", - "@next/swc-win32-ia32-msvc": "12.3.3", - "@next/swc-win32-x64-msvc": "12.3.3" - }, - "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 - } - } + "demos/canary/plugin-wrapper": { + "name": "local-plugin", + "version": "1.0.0-alpha-local-wrapper", + "extraneous": true, + "license": "MIT" }, "demos/custom-routes": { "version": "1.0.0", "license": "MIT", "dependencies": { - "next": "^13.0.3" + "next": "^13.0.6" }, "devDependencies": { "@netlify/next": "*", @@ -186,7 +149,7 @@ "@reach/dialog": "^0.16.2", "@reach/visually-hidden": "^0.16.0", "@vercel/og": "^0.0.21", - "next": "^13.0.3", + "next": "^13.0.6", "react": "^18.2.0", "react-dom": "^18.2.0" }, @@ -209,7 +172,7 @@ "@netlify/next": "*", "@netlify/plugin-nextjs": "*", "isomorphic-unfetch": "^3.1.0", - "next": "^13.0.3", + "next": "^13.0.6", "react": "^18.2.0", "react-dom": "^18.2.0" }, @@ -228,7 +191,7 @@ "version": "0.0.0", "license": "MIT", "dependencies": { - "next": "^13.0.3", + "next": "^13.0.6", "next-auth": "^4.15.0", "nodemailer": "^6.6.3", "react": "^18.2.0", @@ -254,7 +217,7 @@ "version": "1.0.0", "license": "MIT", "dependencies": { - "next": "^13.0.3" + "next": "^13.0.6" }, "devDependencies": { "@netlify/next": "*", @@ -321,7 +284,7 @@ "version": "1.0.0", "license": "MIT", "dependencies": { - "next": "^13.0.3" + "next": "^13.0.6" }, "devDependencies": { "@netlify/next": "*", @@ -3123,6 +3086,18 @@ "node": "*" } }, + "node_modules/@jest/schemas": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", + "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", + "dev": true, + "dependencies": { + "@sinclair/typebox": "^0.24.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, "node_modules/@jest/source-map": { "version": "27.5.1", "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-27.5.1.tgz", @@ -4887,11 +4862,6 @@ "node": ">=10" } }, - "node_modules/@next/env": { - "version": "12.3.3", - "resolved": "https://registry.npmjs.org/@next/env/-/env-12.3.3.tgz", - "integrity": "sha512-H2pKuOasV9RgvVaWosB2rGSNeQShQpiDaF4EEjLyagIc3HwqdOw2/VAG/8Lq+adOwPv2P73O1hulTNad3k5MDw==" - }, "node_modules/@next/eslint-plugin-next": { "version": "12.3.4", "resolved": "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-12.3.4.tgz", @@ -4943,201 +4913,6 @@ "node": "*" } }, - "node_modules/@next/swc-android-arm-eabi": { - "version": "12.3.3", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.3.3.tgz", - "integrity": "sha512-5O/ZIX6hlIRGMy1R2f/8WiCZ4Hp4WTC0FcTuz8ycQ28j/mzDnmzjVoayVVr+ZmfEKQayFrRu+vxHjFyY0JGQlQ==", - "cpu": [ - "arm" - ], - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-android-arm64": { - "version": "12.3.3", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-12.3.3.tgz", - "integrity": "sha512-2QWreRmlxYRDtnLYn+BI8oukHwcP7W0zGIY5R2mEXRjI4ARqCLdu8RmcT9Vemw7RfeAVKA/4cv/9PY0pCcQpNA==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-darwin-arm64": { - "version": "12.3.3", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.3.3.tgz", - "integrity": "sha512-GtZdDLerM+VToCMFp+W+WhnT6sxHePQH4xZZiYD/Y8KFiwHbDRcJr2FPG0bAJnGNiSvv/QQnBq74wjZ9+7vhcQ==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-darwin-x64": { - "version": "12.3.3", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.3.3.tgz", - "integrity": "sha512-gRYvTKrRYynjFQUDJ+upHMcBiNz0ii0m7zGgmUTlTSmrBWqVSzx79EHYT7Nn4GWHM+a/W+2VXfu+lqHcJeQ9gQ==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-freebsd-x64": { - "version": "12.3.3", - "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.3.3.tgz", - "integrity": "sha512-r+GLATzCjjQI82bgrIPXWEYBwZonSO64OThk5wU6HduZlDYTEDxZsFNoNoesCDWCgRrgg+OXj7WLNy1WlvfX7w==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-linux-arm-gnueabihf": { - "version": "12.3.3", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.3.3.tgz", - "integrity": "sha512-juvRj1QX9jmQScL4nV0rROtYUFgWP76zfdn1fdfZ2BhvwUugIAq8x+jLVGlnXKUhDrP9+RrAufqXjjVkK+uBxA==", - "cpu": [ - "arm" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-linux-arm64-gnu": { - "version": "12.3.3", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.3.3.tgz", - "integrity": "sha512-hzinybStPB+SzS68hR5rzOngOH7Yd/jFuWGeg9qS5WifYXHpqwGH2BQeKpjVV0iJuyO9r309JKrRWMrbfhnuBA==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-linux-arm64-musl": { - "version": "12.3.3", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.3.3.tgz", - "integrity": "sha512-oyfQYljCwf+9zUu1YkTZbRbyxmcHzvJPMGOxC3kJOReh3kCUoGcmvAxUPMtFD6FSYjJ+eaog4+2IFHtYuAw/bQ==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-linux-x64-gnu": { - "version": "12.3.3", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.3.3.tgz", - "integrity": "sha512-epv4FMazj/XG70KTTnrZ0H1VtL6DeWOvyHLHYy7f5PdgDpBXpDTFjVqhP8NFNH8HmaDDdeL1NvQD07AXhyvUKA==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-linux-x64-musl": { - "version": "12.3.3", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.3.3.tgz", - "integrity": "sha512-bG5QODFy59XnSFTiPyIAt+rbPdphtvQMibtOVvyjwIwsBUw7swJ6k+6PSPVYEYpi6SHzi3qYBsro39ayGJKQJg==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-win32-arm64-msvc": { - "version": "12.3.3", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.3.3.tgz", - "integrity": "sha512-FbnT3reJ3MbTJ5W0hvlCCGGVDSpburzT5XGC9ljBJ4kr+85iNTLjv7+vrPeDdwHEqtGmdZgnabkLVCI4yFyCag==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-win32-ia32-msvc": { - "version": "12.3.3", - "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.3.3.tgz", - "integrity": "sha512-M/fKZC2tMGWA6eTsIniNEBpx2prdR8lIxvSO3gv5P6ymZOGVWCvEMksnTkPAjHnU6d8r8eCiuGKm3UNo7zCTpQ==", - "cpu": [ - "ia32" - ], - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-win32-x64-msvc": { - "version": "12.3.3", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.3.3.tgz", - "integrity": "sha512-Ku9mfGwmNtk44o4B/jEWUxBAT4tJ3S7QbBMLJdL1GmtRZ05LGL36OqWjLvBPr8dFiHOQQbYoAmYfQw7zeGypYA==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - }, "node_modules/@nicolo-ribaudo/eslint-scope-5-internals": { "version": "5.1.1-v1", "resolved": "https://registry.npmjs.org/@nicolo-ribaudo/eslint-scope-5-internals/-/eslint-scope-5-internals-5.1.1-v1.tgz", @@ -5310,6 +5085,12 @@ "node": ">= 8.0.0" } }, + "node_modules/@sinclair/typebox": { + "version": "0.24.51", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.24.51.tgz", + "integrity": "sha512-1P1OROm/rdubP5aFDSZQILU0vrLCJ4fvHt6EoqHEM+2D/G5MK3bIaymUKLit8Js9gbns5UyJnkP/TZROLw4tUA==", + "dev": true + }, "node_modules/@sindresorhus/is": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-2.1.1.tgz", @@ -5396,14 +5177,6 @@ "@sinonjs/commons": "^1.7.0" } }, - "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/@szmarczak/http-timer": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-4.0.6.tgz", @@ -5697,13 +5470,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": "18.0.26", "resolved": "https://registry.npmjs.org/@types/react/-/react-18.0.26.tgz", "integrity": "sha512-hCR3PJQsAIXyxhTNSiDFY//LhnMZWpNNr5etoCqx/iUfGc5gXWtQR2Phl908jVR6uPXacojQWTg4qRpkxTuGug==", - "devOptional": true, + "dev": true, "dependencies": { "@types/prop-types": "*", "@types/scheduler": "*", @@ -5729,7 +5502,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/semver": { "version": "7.3.13", @@ -5738,9 +5511,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": { @@ -7552,10 +7325,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/canary": { - "resolved": "demos/canary", - "link": true - }, "node_modules/caniuse-lite": { "version": "1.0.30001431", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001431.tgz", @@ -9545,33 +9314,32 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.1.tgz", "integrity": "sha512-DJR/VvkAvSZW9bTouZue2sSxDwdTN92uHjqeKVm+0dAqdfNykRzQ95tay8aXMBAAPpUiq4Qcug2L7neoRh2Egw==", - "devOptional": true + "dev": true }, "node_modules/custom-routes": { "resolved": "demos/custom-routes", "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", @@ -9590,15 +9358,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": { @@ -9700,19 +9468,70 @@ "node": ">=8.12.0" } }, - "node_modules/cypress/node_modules/semver": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", - "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "node_modules/cypress/node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cypress/node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/cypress/node_modules/npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", "dev": true, "dependencies": { - "lru-cache": "^6.0.0" + "path-key": "^3.0.0" }, - "bin": { - "semver": "bin/semver.js" + "engines": { + "node": ">=8" + } + }, + "node_modules/cypress/node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "dependencies": { + "mimic-fn": "^2.1.0" }, "engines": { - "node": ">=10" + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cypress/node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "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", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true, + "engines": { + "node": ">=6" } }, "node_modules/cypress/node_modules/supports-color": { @@ -12154,9 +11973,9 @@ } }, "node_modules/eventemitter2": { - "version": "6.4.9", - "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-6.4.9.tgz", - "integrity": "sha512-JEPTiaOt9f04oa6NOkc4aH+nVp5I3wEjpHbIPqfgCdD5v5bUzy7xQqwcVO2aDQgOWhI28da57HksMrzK9HlRxg==", + "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": { @@ -13879,7 +13698,7 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.1.0.tgz", "integrity": "sha512-oNkuqVTA8jqG1Q6c+UglTOD1xhC1BtjKI7XkCXRkZHrN5m18/XsnUp8Q89GkQO/z+0WjonSvl0FLhDYftp46nQ==", - "devOptional": true + "dev": true }, "node_modules/import-fresh": { "version": "3.3.0", @@ -15233,6 +15052,92 @@ "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, + "node_modules/jest-extended": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/jest-extended/-/jest-extended-3.2.0.tgz", + "integrity": "sha512-jy+1nwlPLPPR6O8O9Mn+BWCBq/jL/9OgdKEG8ekOSQoLyVvAO5nND8ll3UxoajzBu4kYyn7zUKYWRdnTfQPcVw==", + "dev": true, + "dependencies": { + "jest-diff": "^29.0.0", + "jest-get-type": "^29.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "jest": ">=27.2.5" + }, + "peerDependenciesMeta": { + "jest": { + "optional": true + } + } + }, + "node_modules/jest-extended/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/jest-extended/node_modules/diff-sequences": { + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.3.1.tgz", + "integrity": "sha512-hlM3QR272NXCi4pq+N4Kok4kOp6EsgOM3ZSpJI7Da3UAs+Ttsi8MRmB6trM/lhyzUxGfOgnpkHtgqm5Q/CTcfQ==", + "dev": true, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-extended/node_modules/jest-diff": { + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.3.1.tgz", + "integrity": "sha512-vU8vyiO7568tmin2lA3r2DP8oRvzhvRcD4DjpXc6uGveQodyk7CKLhQlCSiwgx3g0pFaE88/KLZ0yaTWMc4Uiw==", + "dev": true, + "dependencies": { + "chalk": "^4.0.0", + "diff-sequences": "^29.3.1", + "jest-get-type": "^29.2.0", + "pretty-format": "^29.3.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-extended/node_modules/jest-get-type": { + "version": "29.2.0", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.2.0.tgz", + "integrity": "sha512-uXNJlg8hKFEnDgFsrCjznB+sTxdkuqiCL6zMgA75qEbAJjJYTs9XPrvDctrEig2GDow22T/LvHgO57iJhXB/UA==", + "dev": true, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-extended/node_modules/pretty-format": { + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.3.1.tgz", + "integrity": "sha512-FyLnmb1cYJV8biEIiRyzRFvs2lry7PPIvOqKVe1GCUEYg4YGmlx1qG9EJNMxArYm7piII4qb8UV1Pncq5dxmcg==", + "dev": true, + "dependencies": { + "@jest/schemas": "^29.0.0", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-extended/node_modules/react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "dev": true + }, "node_modules/jest-fetch-mock": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/jest-fetch-mock/-/jest-fetch-mock-3.0.3.tgz", @@ -18017,11 +17922,11 @@ } }, "node_modules/next": { - "version": "13.0.5", - "resolved": "https://registry.npmjs.org/next/-/next-13.0.5.tgz", - "integrity": "sha512-awpc3DkphyKydwCotcBnuKwh6hMqkT5xdiBK4OatJtOZurDPBYLP62jtM2be/4OunpmwIbsS0Eyv+ZGU97ciEg==", + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/next/-/next-13.0.6.tgz", + "integrity": "sha512-COvigvms2LRt1rrzfBQcMQ2GZd86Mvk1z+LOLY5pniFtL4VrTmhZ9salrbKfSiXbhsD01TrDdD68ec3ABDyscA==", "dependencies": { - "@next/env": "13.0.5", + "@next/env": "13.0.6", "@swc/helpers": "0.4.14", "caniuse-lite": "^1.0.30001406", "postcss": "8.4.14", @@ -18034,19 +17939,19 @@ "node": ">=14.6.0" }, "optionalDependencies": { - "@next/swc-android-arm-eabi": "13.0.5", - "@next/swc-android-arm64": "13.0.5", - "@next/swc-darwin-arm64": "13.0.5", - "@next/swc-darwin-x64": "13.0.5", - "@next/swc-freebsd-x64": "13.0.5", - "@next/swc-linux-arm-gnueabihf": "13.0.5", - "@next/swc-linux-arm64-gnu": "13.0.5", - "@next/swc-linux-arm64-musl": "13.0.5", - "@next/swc-linux-x64-gnu": "13.0.5", - "@next/swc-linux-x64-musl": "13.0.5", - "@next/swc-win32-arm64-msvc": "13.0.5", - "@next/swc-win32-ia32-msvc": "13.0.5", - "@next/swc-win32-x64-msvc": "13.0.5" + "@next/swc-android-arm-eabi": "13.0.6", + "@next/swc-android-arm64": "13.0.6", + "@next/swc-darwin-arm64": "13.0.6", + "@next/swc-darwin-x64": "13.0.6", + "@next/swc-freebsd-x64": "13.0.6", + "@next/swc-linux-arm-gnueabihf": "13.0.6", + "@next/swc-linux-arm64-gnu": "13.0.6", + "@next/swc-linux-arm64-musl": "13.0.6", + "@next/swc-linux-x64-gnu": "13.0.6", + "@next/swc-linux-x64-musl": "13.0.6", + "@next/swc-win32-arm64-msvc": "13.0.6", + "@next/swc-win32-ia32-msvc": "13.0.6", + "@next/swc-win32-x64-msvc": "13.0.6" }, "peerDependencies": { "fibers": ">= 3.1.0", @@ -18110,14 +18015,14 @@ "link": true }, "node_modules/next/node_modules/@next/env": { - "version": "13.0.5", - "resolved": "https://registry.npmjs.org/@next/env/-/env-13.0.5.tgz", - "integrity": "sha512-F3KLtiDrUslAZhTYTh8Zk5ZaavbYwLUn3NYPBnOjAXU8hWm0QVGVzKIOuURQ098ofRU4e9oglf3Sj9pFx5nI5w==" + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/env/-/env-13.0.6.tgz", + "integrity": "sha512-yceT6DCHKqPRS1cAm8DHvDvK74DLIkDQdm5iV+GnIts8h0QbdHvkUIkdOvQoOODgpr6018skbmSQp12z5OWIQQ==" }, "node_modules/next/node_modules/@next/swc-android-arm-eabi": { - "version": "13.0.5", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-13.0.5.tgz", - "integrity": "sha512-YO691dxHlviy6H0eghgwqn+5kU9J3iQnKERHTDSppqjjGDBl6ab4wz9XfI5AhljjkaTg3TknHoIEWFDoZ4Ve8g==", + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-13.0.6.tgz", + "integrity": "sha512-FGFSj3v2Bluw8fD/X+1eXIEB0PhoJE0zfutsAauRhmNpjjZshLDgoXMWm1jTRL/04K/o9gwwO2+A8+sPVCH1uw==", "cpu": [ "arm" ], @@ -18130,9 +18035,9 @@ } }, "node_modules/next/node_modules/@next/swc-android-arm64": { - "version": "13.0.5", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-13.0.5.tgz", - "integrity": "sha512-ugbwffkUmp8cd2afehDC8LtQeFUxElRUBBngfB5UYSWBx18HW4OgzkPFIY8jUBH16zifvGZWXbICXJWDHrOLtw==", + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-13.0.6.tgz", + "integrity": "sha512-7MgbtU7kimxuovVsd7jSJWMkIHBDBUsNLmmlkrBRHTvgzx5nDBXogP0hzZm7EImdOPwVMPpUHRQMBP9mbsiJYQ==", "cpu": [ "arm64" ], @@ -18145,9 +18050,9 @@ } }, "node_modules/next/node_modules/@next/swc-darwin-arm64": { - "version": "13.0.5", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.0.5.tgz", - "integrity": "sha512-mshlh8QOtOalfZbc17uNAftWgqHTKnrv6QUwBe+mpGz04eqsSUzVz1JGZEdIkmuDxOz00cK2NPoc+VHDXh99IQ==", + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.0.6.tgz", + "integrity": "sha512-AUVEpVTxbP/fxdFsjVI9d5a0CFn6NVV7A/RXOb0Y+pXKIIZ1V5rFjPwpYfIfyOo2lrqgehMNQcyMRoTrhq04xg==", "cpu": [ "arm64" ], @@ -18160,9 +18065,9 @@ } }, "node_modules/next/node_modules/@next/swc-darwin-x64": { - "version": "13.0.5", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-13.0.5.tgz", - "integrity": "sha512-SfigOKW4Z2UB3ruUPyvrlDIkcJq1hiw1wvYApWugD+tQsAkYZKEoz+/8emCmeYZ6Gwgi1WHV+z52Oj8u7bEHPg==", + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-13.0.6.tgz", + "integrity": "sha512-SasCDJlshglsPnbzhWaIF6VEGkQy2NECcAOxPwaPr0cwbbt4aUlZ7QmskNzgolr5eAjFS/xTr7CEeKJtZpAAtQ==", "cpu": [ "x64" ], @@ -18175,9 +18080,9 @@ } }, "node_modules/next/node_modules/@next/swc-freebsd-x64": { - "version": "13.0.5", - "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-13.0.5.tgz", - "integrity": "sha512-0NJg8HZr4yG8ynmMGFXQf+Mahvq4ZgBmUwSlLXXymgxEQgH17erH/LoR69uITtW+KTsALgk9axEt5AAabM4ucg==", + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-13.0.6.tgz", + "integrity": "sha512-6Lbxd9gAdXneTkwHyYW/qtX1Tdw7ND9UbiGsGz/SP43ZInNWnW6q0au4hEVPZ9bOWWRKzcVoeTBdoMpQk9Hx9w==", "cpu": [ "x64" ], @@ -18190,9 +18095,9 @@ } }, "node_modules/next/node_modules/@next/swc-linux-arm-gnueabihf": { - "version": "13.0.5", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-13.0.5.tgz", - "integrity": "sha512-Cye+h3oDT3NDWjACMlRaolL8fokpKie34FlPj9nfoW7bYKmoMBY1d4IO/GgBF+5xEl7HkH0Ny/qex63vQ0pN+A==", + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-13.0.6.tgz", + "integrity": "sha512-wNdi5A519e1P+ozEuYOhWPzzE6m1y7mkO6NFwn6watUwO0X9nZs7fT9THmnekvmFQpaZ6U+xf2MQ9poQoCh6jQ==", "cpu": [ "arm" ], @@ -18205,9 +18110,9 @@ } }, "node_modules/next/node_modules/@next/swc-linux-arm64-gnu": { - "version": "13.0.5", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.0.5.tgz", - "integrity": "sha512-5BfDS/VoRDR5QUGG9oedOCEZGmV2zxUVFYLUJVPMSMeIgqkjxWQBiG2BUHZI6/LGk9yvHmjx7BTvtBCLtRg6IQ==", + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.0.6.tgz", + "integrity": "sha512-e8KTRnleQY1KLk5PwGV5hrmvKksCc74QRpHl5ffWnEEAtL2FE0ave5aIkXqErsPdXkiKuA/owp3LjQrP+/AH7Q==", "cpu": [ "arm64" ], @@ -18220,9 +18125,9 @@ } }, "node_modules/next/node_modules/@next/swc-linux-arm64-musl": { - "version": "13.0.5", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.0.5.tgz", - "integrity": "sha512-xenvqlXz+KxVKAB1YR723gnVNszpsCvKZkiFFaAYqDGJ502YuqU2fwLsaSm/ASRizNcBYeo9HPLTyc3r/9cdMQ==", + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.0.6.tgz", + "integrity": "sha512-/7RF03C3mhjYpHN+pqOolgME3guiHU5T3TsejuyteqyEyzdEyLHod+jcYH6ft7UZ71a6TdOewvmbLOtzHW2O8A==", "cpu": [ "arm64" ], @@ -18235,9 +18140,9 @@ } }, "node_modules/next/node_modules/@next/swc-linux-x64-gnu": { - "version": "13.0.5", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.0.5.tgz", - "integrity": "sha512-9Ahi1bbdXwhrWQmOyoTod23/hhK05da/FzodiNqd6drrMl1y7+RujoEcU8Dtw3H1mGWB+yuTlWo8B4Iba8hqiQ==", + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.0.6.tgz", + "integrity": "sha512-kxyEXnYHpOEkFnmrlwB1QlzJtjC6sAJytKcceIyFUHbCaD3W/Qb5tnclcnHKTaFccizZRePXvV25Ok/eUSpKTw==", "cpu": [ "x64" ], @@ -18250,9 +18155,9 @@ } }, "node_modules/next/node_modules/@next/swc-linux-x64-musl": { - "version": "13.0.5", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.0.5.tgz", - "integrity": "sha512-V+1mnh49qmS9fOZxVRbzjhBEz9IUGJ7AQ80JPWAYQM5LI4TxfdiF4APLPvJ52rOmNeTqnVz1bbKtVOso+7EZ4w==", + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.0.6.tgz", + "integrity": "sha512-N0c6gubS3WW1oYYgo02xzZnNatfVQP/CiJq2ax+DJ55ePV62IACbRCU99TZNXXg+Kos6vNW4k+/qgvkvpGDeyA==", "cpu": [ "x64" ], @@ -18265,9 +18170,9 @@ } }, "node_modules/next/node_modules/@next/swc-win32-arm64-msvc": { - "version": "13.0.5", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.0.5.tgz", - "integrity": "sha512-wRE9rkp7I+/3Jf2T9PFIJOKq3adMWYEFkPOA7XAkUfYbQHlDJm/U5cVCWUsKByyQq5RThwufI91sgd19MfxRxg==", + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.0.6.tgz", + "integrity": "sha512-QjeMB2EBqBFPb/ac0CYr7GytbhUkrG4EwFWbcE0vsRp4H8grt25kYpFQckL4Jak3SUrp7vKfDwZ/SwO7QdO8vw==", "cpu": [ "arm64" ], @@ -18280,9 +18185,9 @@ } }, "node_modules/next/node_modules/@next/swc-win32-ia32-msvc": { - "version": "13.0.5", - "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.0.5.tgz", - "integrity": "sha512-Q1XQSLEhFuFhkKFdJIGt7cYQ4T3u6P5wrtUNreg5M+7P+fjSiC8+X+Vjcw+oebaacsdl0pWZlK+oACGafush1w==", + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.0.6.tgz", + "integrity": "sha512-EQzXtdqRTcmhT/tCq81rIwE36Y3fNHPInaCuJzM/kftdXfa0F+64y7FAoMO13npX8EG1+SamXgp/emSusKrCXg==", "cpu": [ "ia32" ], @@ -18295,9 +18200,9 @@ } }, "node_modules/next/node_modules/@next/swc-win32-x64-msvc": { - "version": "13.0.5", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.0.5.tgz", - "integrity": "sha512-t5gRblrwwiNZP6cT7NkxlgxrFgHWtv9ei5vUraCLgBqzvIsa7X+PnarZUeQCXqz6Jg9JSGGT9j8lvzD97UqeJQ==", + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.0.6.tgz", + "integrity": "sha512-pSkqZ//UP/f2sS9T7IvHLfEWDPTX0vRyXJnAUNisKvO3eF3e1xdhDX7dix/X3Z3lnN4UjSwOzclAI87JFbOwmQ==", "cpu": [ "x64" ], @@ -19909,13 +19814,13 @@ } }, "node_modules/playwright-chromium": { - "version": "1.27.1", - "resolved": "https://registry.npmjs.org/playwright-chromium/-/playwright-chromium-1.27.1.tgz", - "integrity": "sha512-AXAfmNHVnqByo7dKLwLqEC3aKIUlATwDUHCBwVw/qyRCgGUEoufeFUxFXB7pJ4nppwThph7TFe3fHfoETPqSvg==", + "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.27.1" + "playwright-core": "1.26.1" }, "bin": { "playwright": "cli.js" @@ -19925,9 +19830,9 @@ } }, "node_modules/playwright-core": { - "version": "1.27.1", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.27.1.tgz", - "integrity": "sha512-9EmeXDncC2Pmp/z+teoVYlvmPWUC6ejSSYZUln7YaP89Z6lpAaiaAnqroUt/BoLo8tn7WYShcfaCh+xofZa44Q==", + "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" @@ -20419,6 +20324,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/querystringify": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", @@ -22660,25 +22575,6 @@ "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": "9.2.3", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-9.2.3.tgz", @@ -23775,6 +23671,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": { "version": "1.5.10", "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", @@ -23797,6 +23703,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", @@ -23847,14 +23759,6 @@ } } }, - "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/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -24535,7 +24439,7 @@ "devDependencies": { "@netlify/edge-functions": "^2.0.0", "@types/node": "^17.0.25", - "next": "^13.0.3", + "next": "^13.0.6", "npm-run-all": "^4.1.5", "typescript": "^4.6.3" }, @@ -24581,7 +24485,7 @@ "@types/jest": "^27.4.1", "@types/merge-stream": "^1.1.2", "@types/node": "^17.0.25", - "next": "^13.0.3", + "next": "^13.0.6", "npm-run-all": "^4.1.5", "typescript": "^4.6.3" }, @@ -24602,6 +24506,201 @@ "engines": { "node": ">=10" } + }, + "node_modules/@next/swc-android-arm-eabi": { + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-13.0.6.tgz", + "integrity": "sha512-FGFSj3v2Bluw8fD/X+1eXIEB0PhoJE0zfutsAauRhmNpjjZshLDgoXMWm1jTRL/04K/o9gwwO2+A8+sPVCH1uw==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-android-arm64": { + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-13.0.6.tgz", + "integrity": "sha512-7MgbtU7kimxuovVsd7jSJWMkIHBDBUsNLmmlkrBRHTvgzx5nDBXogP0hzZm7EImdOPwVMPpUHRQMBP9mbsiJYQ==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-darwin-arm64": { + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.0.6.tgz", + "integrity": "sha512-AUVEpVTxbP/fxdFsjVI9d5a0CFn6NVV7A/RXOb0Y+pXKIIZ1V5rFjPwpYfIfyOo2lrqgehMNQcyMRoTrhq04xg==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-darwin-x64": { + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-13.0.6.tgz", + "integrity": "sha512-SasCDJlshglsPnbzhWaIF6VEGkQy2NECcAOxPwaPr0cwbbt4aUlZ7QmskNzgolr5eAjFS/xTr7CEeKJtZpAAtQ==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-freebsd-x64": { + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-13.0.6.tgz", + "integrity": "sha512-6Lbxd9gAdXneTkwHyYW/qtX1Tdw7ND9UbiGsGz/SP43ZInNWnW6q0au4hEVPZ9bOWWRKzcVoeTBdoMpQk9Hx9w==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-linux-arm-gnueabihf": { + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-13.0.6.tgz", + "integrity": "sha512-wNdi5A519e1P+ozEuYOhWPzzE6m1y7mkO6NFwn6watUwO0X9nZs7fT9THmnekvmFQpaZ6U+xf2MQ9poQoCh6jQ==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-linux-arm64-gnu": { + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.0.6.tgz", + "integrity": "sha512-e8KTRnleQY1KLk5PwGV5hrmvKksCc74QRpHl5ffWnEEAtL2FE0ave5aIkXqErsPdXkiKuA/owp3LjQrP+/AH7Q==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-linux-arm64-musl": { + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.0.6.tgz", + "integrity": "sha512-/7RF03C3mhjYpHN+pqOolgME3guiHU5T3TsejuyteqyEyzdEyLHod+jcYH6ft7UZ71a6TdOewvmbLOtzHW2O8A==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-linux-x64-gnu": { + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.0.6.tgz", + "integrity": "sha512-kxyEXnYHpOEkFnmrlwB1QlzJtjC6sAJytKcceIyFUHbCaD3W/Qb5tnclcnHKTaFccizZRePXvV25Ok/eUSpKTw==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-linux-x64-musl": { + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.0.6.tgz", + "integrity": "sha512-N0c6gubS3WW1oYYgo02xzZnNatfVQP/CiJq2ax+DJ55ePV62IACbRCU99TZNXXg+Kos6vNW4k+/qgvkvpGDeyA==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-win32-arm64-msvc": { + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.0.6.tgz", + "integrity": "sha512-QjeMB2EBqBFPb/ac0CYr7GytbhUkrG4EwFWbcE0vsRp4H8grt25kYpFQckL4Jak3SUrp7vKfDwZ/SwO7QdO8vw==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-win32-ia32-msvc": { + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.0.6.tgz", + "integrity": "sha512-EQzXtdqRTcmhT/tCq81rIwE36Y3fNHPInaCuJzM/kftdXfa0F+64y7FAoMO13npX8EG1+SamXgp/emSusKrCXg==", + "cpu": [ + "ia32" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-win32-x64-msvc": { + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.0.6.tgz", + "integrity": "sha512-pSkqZ//UP/f2sS9T7IvHLfEWDPTX0vRyXJnAUNisKvO3eF3e1xdhDX7dix/X3Z3lnN4UjSwOzclAI87JFbOwmQ==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } } }, "dependencies": { @@ -26654,6 +26753,15 @@ } } }, + "@jest/schemas": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", + "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", + "dev": true, + "requires": { + "@sinclair/typebox": "^0.24.1" + } + }, "@jest/source-map": { "version": "27.5.1", "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-27.5.1.tgz", @@ -27642,7 +27750,7 @@ "requires": { "@netlify/edge-functions": "^2.0.0", "@types/node": "^17.0.25", - "next": "^13.0.3", + "next": "^13.0.6", "npm-run-all": "^4.1.5", "typescript": "^4.6.3" } @@ -27674,7 +27782,7 @@ "globby": "^11.0.4", "merge-stream": "^2.0.0", "moize": "^6.1.0", - "next": "^13.0.3", + "next": "^13.0.6", "node-fetch": "^2.6.6", "node-stream-zip": "^1.15.0", "npm-run-all": "^4.1.5", @@ -27872,11 +27980,6 @@ } } }, - "@next/env": { - "version": "12.3.3", - "resolved": "https://registry.npmjs.org/@next/env/-/env-12.3.3.tgz", - "integrity": "sha512-H2pKuOasV9RgvVaWosB2rGSNeQShQpiDaF4EEjLyagIc3HwqdOw2/VAG/8Lq+adOwPv2P73O1hulTNad3k5MDw==" - }, "@next/eslint-plugin-next": { "version": "12.3.4", "resolved": "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-12.3.4.tgz", @@ -27921,84 +28024,6 @@ } } }, - "@next/swc-android-arm-eabi": { - "version": "12.3.3", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.3.3.tgz", - "integrity": "sha512-5O/ZIX6hlIRGMy1R2f/8WiCZ4Hp4WTC0FcTuz8ycQ28j/mzDnmzjVoayVVr+ZmfEKQayFrRu+vxHjFyY0JGQlQ==", - "optional": true - }, - "@next/swc-android-arm64": { - "version": "12.3.3", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-12.3.3.tgz", - "integrity": "sha512-2QWreRmlxYRDtnLYn+BI8oukHwcP7W0zGIY5R2mEXRjI4ARqCLdu8RmcT9Vemw7RfeAVKA/4cv/9PY0pCcQpNA==", - "optional": true - }, - "@next/swc-darwin-arm64": { - "version": "12.3.3", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.3.3.tgz", - "integrity": "sha512-GtZdDLerM+VToCMFp+W+WhnT6sxHePQH4xZZiYD/Y8KFiwHbDRcJr2FPG0bAJnGNiSvv/QQnBq74wjZ9+7vhcQ==", - "optional": true - }, - "@next/swc-darwin-x64": { - "version": "12.3.3", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.3.3.tgz", - "integrity": "sha512-gRYvTKrRYynjFQUDJ+upHMcBiNz0ii0m7zGgmUTlTSmrBWqVSzx79EHYT7Nn4GWHM+a/W+2VXfu+lqHcJeQ9gQ==", - "optional": true - }, - "@next/swc-freebsd-x64": { - "version": "12.3.3", - "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.3.3.tgz", - "integrity": "sha512-r+GLATzCjjQI82bgrIPXWEYBwZonSO64OThk5wU6HduZlDYTEDxZsFNoNoesCDWCgRrgg+OXj7WLNy1WlvfX7w==", - "optional": true - }, - "@next/swc-linux-arm-gnueabihf": { - "version": "12.3.3", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.3.3.tgz", - "integrity": "sha512-juvRj1QX9jmQScL4nV0rROtYUFgWP76zfdn1fdfZ2BhvwUugIAq8x+jLVGlnXKUhDrP9+RrAufqXjjVkK+uBxA==", - "optional": true - }, - "@next/swc-linux-arm64-gnu": { - "version": "12.3.3", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.3.3.tgz", - "integrity": "sha512-hzinybStPB+SzS68hR5rzOngOH7Yd/jFuWGeg9qS5WifYXHpqwGH2BQeKpjVV0iJuyO9r309JKrRWMrbfhnuBA==", - "optional": true - }, - "@next/swc-linux-arm64-musl": { - "version": "12.3.3", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.3.3.tgz", - "integrity": "sha512-oyfQYljCwf+9zUu1YkTZbRbyxmcHzvJPMGOxC3kJOReh3kCUoGcmvAxUPMtFD6FSYjJ+eaog4+2IFHtYuAw/bQ==", - "optional": true - }, - "@next/swc-linux-x64-gnu": { - "version": "12.3.3", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.3.3.tgz", - "integrity": "sha512-epv4FMazj/XG70KTTnrZ0H1VtL6DeWOvyHLHYy7f5PdgDpBXpDTFjVqhP8NFNH8HmaDDdeL1NvQD07AXhyvUKA==", - "optional": true - }, - "@next/swc-linux-x64-musl": { - "version": "12.3.3", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.3.3.tgz", - "integrity": "sha512-bG5QODFy59XnSFTiPyIAt+rbPdphtvQMibtOVvyjwIwsBUw7swJ6k+6PSPVYEYpi6SHzi3qYBsro39ayGJKQJg==", - "optional": true - }, - "@next/swc-win32-arm64-msvc": { - "version": "12.3.3", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.3.3.tgz", - "integrity": "sha512-FbnT3reJ3MbTJ5W0hvlCCGGVDSpburzT5XGC9ljBJ4kr+85iNTLjv7+vrPeDdwHEqtGmdZgnabkLVCI4yFyCag==", - "optional": true - }, - "@next/swc-win32-ia32-msvc": { - "version": "12.3.3", - "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.3.3.tgz", - "integrity": "sha512-M/fKZC2tMGWA6eTsIniNEBpx2prdR8lIxvSO3gv5P6ymZOGVWCvEMksnTkPAjHnU6d8r8eCiuGKm3UNo7zCTpQ==", - "optional": true - }, - "@next/swc-win32-x64-msvc": { - "version": "12.3.3", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.3.3.tgz", - "integrity": "sha512-Ku9mfGwmNtk44o4B/jEWUxBAT4tJ3S7QbBMLJdL1GmtRZ05LGL36OqWjLvBPr8dFiHOQQbYoAmYfQw7zeGypYA==", - "optional": true - }, "@nicolo-ribaudo/eslint-scope-5-internals": { "version": "5.1.1-v1", "resolved": "https://registry.npmjs.org/@nicolo-ribaudo/eslint-scope-5-internals/-/eslint-scope-5-internals-5.1.1-v1.tgz", @@ -28124,6 +28149,12 @@ "string.prototype.codepointat": "^0.2.1" } }, + "@sinclair/typebox": { + "version": "0.24.51", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.24.51.tgz", + "integrity": "sha512-1P1OROm/rdubP5aFDSZQILU0vrLCJ4fvHt6EoqHEM+2D/G5MK3bIaymUKLit8Js9gbns5UyJnkP/TZROLw4tUA==", + "dev": true + }, "@sindresorhus/is": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-2.1.1.tgz", @@ -28184,14 +28215,6 @@ "@sinonjs/commons": "^1.7.0" } }, - "@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" - } - }, "@szmarczak/http-timer": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-4.0.6.tgz", @@ -28469,13 +28492,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": "18.0.26", "resolved": "https://registry.npmjs.org/@types/react/-/react-18.0.26.tgz", "integrity": "sha512-hCR3PJQsAIXyxhTNSiDFY//LhnMZWpNNr5etoCqx/iUfGc5gXWtQR2Phl908jVR6uPXacojQWTg4qRpkxTuGug==", - "devOptional": true, + "dev": true, "requires": { "@types/prop-types": "*", "@types/scheduler": "*", @@ -28501,7 +28524,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/semver": { "version": "7.3.13", @@ -28510,9 +28533,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": { @@ -28821,8 +28844,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", @@ -28879,8 +28901,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 }, "ansi-align": { "version": "3.0.1", @@ -29487,7 +29508,7 @@ "@types/node": "^17.0.25", "husky": "^7.0.4", "if-env": "^1.0.4", - "next": "^13.0.3", + "next": "^13.0.6", "npm-run-all": "^4.1.5", "typescript": "^4.6.3" } @@ -29878,52 +29899,6 @@ "resolved": "https://registry.npmjs.org/camelize/-/camelize-1.0.1.tgz", "integrity": "sha512-dU+Tx2fsypxTgtLoE36npi3UqcjSSMNYfkqgmoEhtZrraP5VWq0K7FkWVTYa8eMPtnU/G2txVsfdCJTn9uzpuQ==" }, - "canary": { - "version": "file:demos/canary", - "requires": { - "@netlify/next": "*", - "@netlify/plugin-nextjs": "*", - "@types/fs-extra": "^9.0.13", - "@types/jest": "^27.4.1", - "@types/node": "^17.0.25", - "critters": "^0.0.16", - "husky": "^7.0.4", - "if-env": "^1.0.4", - "next": "^12.3.1", - "npm-run-all": "^4.1.5", - "react": "^18.2.0", - "react-dom": "^18.2.0", - "typescript": "^4.6.3" - }, - "dependencies": { - "next": { - "version": "12.3.3", - "resolved": "https://registry.npmjs.org/next/-/next-12.3.3.tgz", - "integrity": "sha512-Rx2Y6Wl5R8E77NOfBupp/B9OPCklqfqD0yN2+rDivhMjd6hjVFH5n0WTDI4PWwDmZsdNcYt6NV85kJ3PLR+eNQ==", - "requires": { - "@next/env": "12.3.3", - "@next/swc-android-arm-eabi": "12.3.3", - "@next/swc-android-arm64": "12.3.3", - "@next/swc-darwin-arm64": "12.3.3", - "@next/swc-darwin-x64": "12.3.3", - "@next/swc-freebsd-x64": "12.3.3", - "@next/swc-linux-arm-gnueabihf": "12.3.3", - "@next/swc-linux-arm64-gnu": "12.3.3", - "@next/swc-linux-arm64-musl": "12.3.3", - "@next/swc-linux-x64-gnu": "12.3.3", - "@next/swc-linux-x64-musl": "12.3.3", - "@next/swc-win32-arm64-msvc": "12.3.3", - "@next/swc-win32-ia32-msvc": "12.3.3", - "@next/swc-win32-x64-msvc": "12.3.3", - "@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" - } - } - } - }, "caniuse-lite": { "version": "1.0.30001431", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001431.tgz", @@ -30914,8 +30889,7 @@ "version": "4.2.0", "resolved": "https://registry.npmjs.org/cosmiconfig-typescript-loader/-/cosmiconfig-typescript-loader-4.2.0.tgz", "integrity": "sha512-NkANeMnaHrlaSSlpKGyvn2R4rqUDeE/9E5YHx+b4nwo0R8dZyAqcih8/gxpCZvqWP9Vf6xuLpMSzSgdVEIM78g==", - "dev": true, - "requires": {} + "dev": true }, "cp-file": { "version": "9.1.0", @@ -31459,7 +31433,7 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.1.tgz", "integrity": "sha512-DJR/VvkAvSZW9bTouZue2sSxDwdTN92uHjqeKVm+0dAqdfNykRzQ95tay8aXMBAAPpUiq4Qcug2L7neoRh2Egw==", - "devOptional": true + "dev": true }, "custom-routes": { "version": "file:demos/custom-routes", @@ -31472,31 +31446,30 @@ "@types/react": "^18.0.25", "husky": "^7.0.4", "if-env": "^1.0.4", - "next": "^13.0.3", + "next": "^13.0.6", "npm-run-all": "^4.1.5", "typescript": "^4.7.4" } }, "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", @@ -31515,15 +31488,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": { @@ -31592,15 +31565,48 @@ "integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==", "dev": true }, - "semver": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", - "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true + }, + "mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true + }, + "npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", "dev": true, "requires": { - "lru-cache": "^6.0.0" + "path-key": "^3.0.0" + } + }, + "onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "requires": { + "mimic-fn": "^2.1.0" } }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true + }, + "strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true + }, "supports-color": { "version": "8.1.1", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", @@ -31769,7 +31775,7 @@ "critters": "^0.0.16", "husky": "^7.0.4", "if-env": "^1.0.4", - "next": "^13.0.3", + "next": "^13.0.6", "npm-run-all": "^4.1.5", "react": "^18.2.0", "react-dom": "^18.2.0", @@ -32632,15 +32638,13 @@ "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-config-standard": { "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-formatter-codeframe": { "version": "7.32.1", @@ -33086,8 +33090,7 @@ "version": "6.1.1", "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-6.1.1.tgz", "integrity": "sha512-tjqWDwVZQo7UIPMeDReOpUgHCmCiH+ePnVT+5zVapL0uuHnegBUs2smM13CzOs2Xb5+MHMRFTs9v24yjba4Oig==", - "dev": true, - "requires": {} + "dev": true }, "eslint-plugin-react": { "version": "7.31.10", @@ -33145,8 +33148,7 @@ "version": "4.6.0", "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.0.tgz", "integrity": "sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g==", - "dev": true, - "requires": {} + "dev": true }, "eslint-plugin-unicorn": { "version": "43.0.2", @@ -33434,9 +33436,9 @@ } }, "eventemitter2": { - "version": "6.4.9", - "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-6.4.9.tgz", - "integrity": "sha512-JEPTiaOt9f04oa6NOkc4aH+nVp5I3wEjpHbIPqfgCdD5v5bUzy7xQqwcVO2aDQgOWhI28da57HksMrzK9HlRxg==", + "version": "6.4.7", + "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-6.4.7.tgz", + "integrity": "sha512-tYUSVOGeQPKt/eC1ABfhHy5Xd96N3oIijJvN3O9+TsC28T5V9yX9oEfEK5faP0EFSNVOG97qtAS68GBrQB2hDg==", "dev": true }, "execa": { @@ -34727,7 +34729,7 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.1.0.tgz", "integrity": "sha512-oNkuqVTA8jqG1Q6c+UglTOD1xhC1BtjKI7XkCXRkZHrN5m18/XsnUp8Q89GkQO/z+0WjonSvl0FLhDYftp46nQ==", - "devOptional": true + "dev": true }, "import-fresh": { "version": "3.3.0", @@ -35701,6 +35703,65 @@ "jest-util": "^27.5.1" } }, + "jest-extended": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/jest-extended/-/jest-extended-3.2.0.tgz", + "integrity": "sha512-jy+1nwlPLPPR6O8O9Mn+BWCBq/jL/9OgdKEG8ekOSQoLyVvAO5nND8ll3UxoajzBu4kYyn7zUKYWRdnTfQPcVw==", + "dev": true, + "requires": { + "jest-diff": "^29.0.0", + "jest-get-type": "^29.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true + }, + "diff-sequences": { + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.3.1.tgz", + "integrity": "sha512-hlM3QR272NXCi4pq+N4Kok4kOp6EsgOM3ZSpJI7Da3UAs+Ttsi8MRmB6trM/lhyzUxGfOgnpkHtgqm5Q/CTcfQ==", + "dev": true + }, + "jest-diff": { + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.3.1.tgz", + "integrity": "sha512-vU8vyiO7568tmin2lA3r2DP8oRvzhvRcD4DjpXc6uGveQodyk7CKLhQlCSiwgx3g0pFaE88/KLZ0yaTWMc4Uiw==", + "dev": true, + "requires": { + "chalk": "^4.0.0", + "diff-sequences": "^29.3.1", + "jest-get-type": "^29.2.0", + "pretty-format": "^29.3.1" + } + }, + "jest-get-type": { + "version": "29.2.0", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.2.0.tgz", + "integrity": "sha512-uXNJlg8hKFEnDgFsrCjznB+sTxdkuqiCL6zMgA75qEbAJjJYTs9XPrvDctrEig2GDow22T/LvHgO57iJhXB/UA==", + "dev": true + }, + "pretty-format": { + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.3.1.tgz", + "integrity": "sha512-FyLnmb1cYJV8biEIiRyzRFvs2lry7PPIvOqKVe1GCUEYg4YGmlx1qG9EJNMxArYm7piII4qb8UV1Pncq5dxmcg==", + "dev": true, + "requires": { + "@jest/schemas": "^29.0.0", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + } + }, + "react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "dev": true + } + } + }, "jest-fetch-mock": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/jest-fetch-mock/-/jest-fetch-mock-3.0.3.tgz", @@ -35839,8 +35900,7 @@ "version": "1.2.3", "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", - "dev": true, - "requires": {} + "dev": true }, "jest-regex-util": { "version": "27.5.1", @@ -37549,7 +37609,7 @@ "@types/react": "^18.0.25", "husky": "^7.0.4", "isomorphic-unfetch": "^3.1.0", - "next": "^13.0.3", + "next": "^13.0.6", "npm-run-all": "^4.1.5", "react": "^18.2.0", "react-dom": "^18.2.0", @@ -37922,24 +37982,24 @@ } }, "next": { - "version": "13.0.5", - "resolved": "https://registry.npmjs.org/next/-/next-13.0.5.tgz", - "integrity": "sha512-awpc3DkphyKydwCotcBnuKwh6hMqkT5xdiBK4OatJtOZurDPBYLP62jtM2be/4OunpmwIbsS0Eyv+ZGU97ciEg==", - "requires": { - "@next/env": "13.0.5", - "@next/swc-android-arm-eabi": "13.0.5", - "@next/swc-android-arm64": "13.0.5", - "@next/swc-darwin-arm64": "13.0.5", - "@next/swc-darwin-x64": "13.0.5", - "@next/swc-freebsd-x64": "13.0.5", - "@next/swc-linux-arm-gnueabihf": "13.0.5", - "@next/swc-linux-arm64-gnu": "13.0.5", - "@next/swc-linux-arm64-musl": "13.0.5", - "@next/swc-linux-x64-gnu": "13.0.5", - "@next/swc-linux-x64-musl": "13.0.5", - "@next/swc-win32-arm64-msvc": "13.0.5", - "@next/swc-win32-ia32-msvc": "13.0.5", - "@next/swc-win32-x64-msvc": "13.0.5", + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/next/-/next-13.0.6.tgz", + "integrity": "sha512-COvigvms2LRt1rrzfBQcMQ2GZd86Mvk1z+LOLY5pniFtL4VrTmhZ9salrbKfSiXbhsD01TrDdD68ec3ABDyscA==", + "requires": { + "@next/env": "13.0.6", + "@next/swc-android-arm-eabi": "13.0.6", + "@next/swc-android-arm64": "13.0.6", + "@next/swc-darwin-arm64": "13.0.6", + "@next/swc-darwin-x64": "13.0.6", + "@next/swc-freebsd-x64": "13.0.6", + "@next/swc-linux-arm-gnueabihf": "13.0.6", + "@next/swc-linux-arm64-gnu": "13.0.6", + "@next/swc-linux-arm64-musl": "13.0.6", + "@next/swc-linux-x64-gnu": "13.0.6", + "@next/swc-linux-x64-musl": "13.0.6", + "@next/swc-win32-arm64-msvc": "13.0.6", + "@next/swc-win32-ia32-msvc": "13.0.6", + "@next/swc-win32-x64-msvc": "13.0.6", "@swc/helpers": "0.4.14", "caniuse-lite": "^1.0.30001406", "postcss": "8.4.14", @@ -37947,86 +38007,86 @@ }, "dependencies": { "@next/env": { - "version": "13.0.5", - "resolved": "https://registry.npmjs.org/@next/env/-/env-13.0.5.tgz", - "integrity": "sha512-F3KLtiDrUslAZhTYTh8Zk5ZaavbYwLUn3NYPBnOjAXU8hWm0QVGVzKIOuURQ098ofRU4e9oglf3Sj9pFx5nI5w==" + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/env/-/env-13.0.6.tgz", + "integrity": "sha512-yceT6DCHKqPRS1cAm8DHvDvK74DLIkDQdm5iV+GnIts8h0QbdHvkUIkdOvQoOODgpr6018skbmSQp12z5OWIQQ==" }, "@next/swc-android-arm-eabi": { - "version": "13.0.5", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-13.0.5.tgz", - "integrity": "sha512-YO691dxHlviy6H0eghgwqn+5kU9J3iQnKERHTDSppqjjGDBl6ab4wz9XfI5AhljjkaTg3TknHoIEWFDoZ4Ve8g==", + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-13.0.6.tgz", + "integrity": "sha512-FGFSj3v2Bluw8fD/X+1eXIEB0PhoJE0zfutsAauRhmNpjjZshLDgoXMWm1jTRL/04K/o9gwwO2+A8+sPVCH1uw==", "optional": true }, "@next/swc-android-arm64": { - "version": "13.0.5", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-13.0.5.tgz", - "integrity": "sha512-ugbwffkUmp8cd2afehDC8LtQeFUxElRUBBngfB5UYSWBx18HW4OgzkPFIY8jUBH16zifvGZWXbICXJWDHrOLtw==", + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-13.0.6.tgz", + "integrity": "sha512-7MgbtU7kimxuovVsd7jSJWMkIHBDBUsNLmmlkrBRHTvgzx5nDBXogP0hzZm7EImdOPwVMPpUHRQMBP9mbsiJYQ==", "optional": true }, "@next/swc-darwin-arm64": { - "version": "13.0.5", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.0.5.tgz", - "integrity": "sha512-mshlh8QOtOalfZbc17uNAftWgqHTKnrv6QUwBe+mpGz04eqsSUzVz1JGZEdIkmuDxOz00cK2NPoc+VHDXh99IQ==", + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.0.6.tgz", + "integrity": "sha512-AUVEpVTxbP/fxdFsjVI9d5a0CFn6NVV7A/RXOb0Y+pXKIIZ1V5rFjPwpYfIfyOo2lrqgehMNQcyMRoTrhq04xg==", "optional": true }, "@next/swc-darwin-x64": { - "version": "13.0.5", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-13.0.5.tgz", - "integrity": "sha512-SfigOKW4Z2UB3ruUPyvrlDIkcJq1hiw1wvYApWugD+tQsAkYZKEoz+/8emCmeYZ6Gwgi1WHV+z52Oj8u7bEHPg==", + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-13.0.6.tgz", + "integrity": "sha512-SasCDJlshglsPnbzhWaIF6VEGkQy2NECcAOxPwaPr0cwbbt4aUlZ7QmskNzgolr5eAjFS/xTr7CEeKJtZpAAtQ==", "optional": true }, "@next/swc-freebsd-x64": { - "version": "13.0.5", - "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-13.0.5.tgz", - "integrity": "sha512-0NJg8HZr4yG8ynmMGFXQf+Mahvq4ZgBmUwSlLXXymgxEQgH17erH/LoR69uITtW+KTsALgk9axEt5AAabM4ucg==", + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-13.0.6.tgz", + "integrity": "sha512-6Lbxd9gAdXneTkwHyYW/qtX1Tdw7ND9UbiGsGz/SP43ZInNWnW6q0au4hEVPZ9bOWWRKzcVoeTBdoMpQk9Hx9w==", "optional": true }, "@next/swc-linux-arm-gnueabihf": { - "version": "13.0.5", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-13.0.5.tgz", - "integrity": "sha512-Cye+h3oDT3NDWjACMlRaolL8fokpKie34FlPj9nfoW7bYKmoMBY1d4IO/GgBF+5xEl7HkH0Ny/qex63vQ0pN+A==", + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-13.0.6.tgz", + "integrity": "sha512-wNdi5A519e1P+ozEuYOhWPzzE6m1y7mkO6NFwn6watUwO0X9nZs7fT9THmnekvmFQpaZ6U+xf2MQ9poQoCh6jQ==", "optional": true }, "@next/swc-linux-arm64-gnu": { - "version": "13.0.5", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.0.5.tgz", - "integrity": "sha512-5BfDS/VoRDR5QUGG9oedOCEZGmV2zxUVFYLUJVPMSMeIgqkjxWQBiG2BUHZI6/LGk9yvHmjx7BTvtBCLtRg6IQ==", + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.0.6.tgz", + "integrity": "sha512-e8KTRnleQY1KLk5PwGV5hrmvKksCc74QRpHl5ffWnEEAtL2FE0ave5aIkXqErsPdXkiKuA/owp3LjQrP+/AH7Q==", "optional": true }, "@next/swc-linux-arm64-musl": { - "version": "13.0.5", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.0.5.tgz", - "integrity": "sha512-xenvqlXz+KxVKAB1YR723gnVNszpsCvKZkiFFaAYqDGJ502YuqU2fwLsaSm/ASRizNcBYeo9HPLTyc3r/9cdMQ==", + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.0.6.tgz", + "integrity": "sha512-/7RF03C3mhjYpHN+pqOolgME3guiHU5T3TsejuyteqyEyzdEyLHod+jcYH6ft7UZ71a6TdOewvmbLOtzHW2O8A==", "optional": true }, "@next/swc-linux-x64-gnu": { - "version": "13.0.5", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.0.5.tgz", - "integrity": "sha512-9Ahi1bbdXwhrWQmOyoTod23/hhK05da/FzodiNqd6drrMl1y7+RujoEcU8Dtw3H1mGWB+yuTlWo8B4Iba8hqiQ==", + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.0.6.tgz", + "integrity": "sha512-kxyEXnYHpOEkFnmrlwB1QlzJtjC6sAJytKcceIyFUHbCaD3W/Qb5tnclcnHKTaFccizZRePXvV25Ok/eUSpKTw==", "optional": true }, "@next/swc-linux-x64-musl": { - "version": "13.0.5", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.0.5.tgz", - "integrity": "sha512-V+1mnh49qmS9fOZxVRbzjhBEz9IUGJ7AQ80JPWAYQM5LI4TxfdiF4APLPvJ52rOmNeTqnVz1bbKtVOso+7EZ4w==", + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.0.6.tgz", + "integrity": "sha512-N0c6gubS3WW1oYYgo02xzZnNatfVQP/CiJq2ax+DJ55ePV62IACbRCU99TZNXXg+Kos6vNW4k+/qgvkvpGDeyA==", "optional": true }, "@next/swc-win32-arm64-msvc": { - "version": "13.0.5", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.0.5.tgz", - "integrity": "sha512-wRE9rkp7I+/3Jf2T9PFIJOKq3adMWYEFkPOA7XAkUfYbQHlDJm/U5cVCWUsKByyQq5RThwufI91sgd19MfxRxg==", + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.0.6.tgz", + "integrity": "sha512-QjeMB2EBqBFPb/ac0CYr7GytbhUkrG4EwFWbcE0vsRp4H8grt25kYpFQckL4Jak3SUrp7vKfDwZ/SwO7QdO8vw==", "optional": true }, "@next/swc-win32-ia32-msvc": { - "version": "13.0.5", - "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.0.5.tgz", - "integrity": "sha512-Q1XQSLEhFuFhkKFdJIGt7cYQ4T3u6P5wrtUNreg5M+7P+fjSiC8+X+Vjcw+oebaacsdl0pWZlK+oACGafush1w==", + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.0.6.tgz", + "integrity": "sha512-EQzXtdqRTcmhT/tCq81rIwE36Y3fNHPInaCuJzM/kftdXfa0F+64y7FAoMO13npX8EG1+SamXgp/emSusKrCXg==", "optional": true }, "@next/swc-win32-x64-msvc": { - "version": "13.0.5", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.0.5.tgz", - "integrity": "sha512-t5gRblrwwiNZP6cT7NkxlgxrFgHWtv9ei5vUraCLgBqzvIsa7X+PnarZUeQCXqz6Jg9JSGGT9j8lvzD97UqeJQ==", + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.0.6.tgz", + "integrity": "sha512-pSkqZ//UP/f2sS9T7IvHLfEWDPTX0vRyXJnAUNisKvO3eF3e1xdhDX7dix/X3Z3lnN4UjSwOzclAI87JFbOwmQ==", "optional": true }, "@swc/helpers": { @@ -38073,7 +38133,7 @@ "@types/node": "^17.0.14", "@types/react": "^18.0.0", "husky": "^7.0.4", - "next": "^13.0.3", + "next": "^13.0.6", "next-auth": "^4.15.0", "nodemailer": "^6.6.3", "npm-run-all": "^4.1.5", @@ -38092,7 +38152,7 @@ "@types/node": "^17.0.25", "husky": "^7.0.4", "if-env": "^1.0.4", - "next": "^13.0.3", + "next": "^13.0.6", "npm-run-all": "^4.1.5", "typescript": "^4.6.3" } @@ -39281,18 +39341,18 @@ } }, "playwright-chromium": { - "version": "1.27.1", - "resolved": "https://registry.npmjs.org/playwright-chromium/-/playwright-chromium-1.27.1.tgz", - "integrity": "sha512-AXAfmNHVnqByo7dKLwLqEC3aKIUlATwDUHCBwVw/qyRCgGUEoufeFUxFXB7pJ4nppwThph7TFe3fHfoETPqSvg==", + "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.27.1" + "playwright-core": "1.26.1" } }, "playwright-core": { - "version": "1.27.1", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.27.1.tgz", - "integrity": "sha512-9EmeXDncC2Pmp/z+teoVYlvmPWUC6ejSSYZUln7YaP89Z6lpAaiaAnqroUt/BoLo8tn7WYShcfaCh+xofZa44Q==", + "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": { @@ -39645,6 +39705,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 + }, "querystringify": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", @@ -41145,7 +41211,7 @@ "@types/node": "^17.0.25", "husky": "^7.0.4", "if-env": "^1.0.4", - "next": "^13.0.3", + "next": "^13.0.6", "npm-run-all": "^4.1.5", "typescript": "^4.6.3" } @@ -41388,12 +41454,6 @@ "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "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==", - "requires": {} - }, "supports-color": { "version": "9.2.3", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-9.2.3.tgz", @@ -42158,8 +42218,7 @@ "ws": { "version": "8.11.0", "resolved": "https://registry.npmjs.org/ws/-/ws-8.11.0.tgz", - "integrity": "sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg==", - "requires": {} + "integrity": "sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg==" } } }, @@ -42242,6 +42301,24 @@ "integrity": "sha512-Am1ousAhSLBeB9cG/7k7r2R0zj50uDRlZHPGbazid5s9rlF1F/QKYObEKSIunSjIOkJZqwRRLpvewjEkM7pSqg==", "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": { "version": "1.5.10", "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", @@ -42284,12 +42361,6 @@ "tslib": "^2.0.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==", - "requires": {} - }, "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -42652,8 +42723,7 @@ "version": "7.5.9", "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", - "dev": true, - "requires": {} + "dev": true }, "xdg-basedir": { "version": "4.0.0", @@ -42817,6 +42887,84 @@ "compress-commons": "^4.1.0", "readable-stream": "^3.6.0" } + }, + "@next/swc-android-arm-eabi": { + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-13.0.6.tgz", + "integrity": "sha512-FGFSj3v2Bluw8fD/X+1eXIEB0PhoJE0zfutsAauRhmNpjjZshLDgoXMWm1jTRL/04K/o9gwwO2+A8+sPVCH1uw==", + "optional": true + }, + "@next/swc-android-arm64": { + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-13.0.6.tgz", + "integrity": "sha512-7MgbtU7kimxuovVsd7jSJWMkIHBDBUsNLmmlkrBRHTvgzx5nDBXogP0hzZm7EImdOPwVMPpUHRQMBP9mbsiJYQ==", + "optional": true + }, + "@next/swc-darwin-arm64": { + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.0.6.tgz", + "integrity": "sha512-AUVEpVTxbP/fxdFsjVI9d5a0CFn6NVV7A/RXOb0Y+pXKIIZ1V5rFjPwpYfIfyOo2lrqgehMNQcyMRoTrhq04xg==", + "optional": true + }, + "@next/swc-darwin-x64": { + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-13.0.6.tgz", + "integrity": "sha512-SasCDJlshglsPnbzhWaIF6VEGkQy2NECcAOxPwaPr0cwbbt4aUlZ7QmskNzgolr5eAjFS/xTr7CEeKJtZpAAtQ==", + "optional": true + }, + "@next/swc-freebsd-x64": { + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-13.0.6.tgz", + "integrity": "sha512-6Lbxd9gAdXneTkwHyYW/qtX1Tdw7ND9UbiGsGz/SP43ZInNWnW6q0au4hEVPZ9bOWWRKzcVoeTBdoMpQk9Hx9w==", + "optional": true + }, + "@next/swc-linux-arm-gnueabihf": { + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-13.0.6.tgz", + "integrity": "sha512-wNdi5A519e1P+ozEuYOhWPzzE6m1y7mkO6NFwn6watUwO0X9nZs7fT9THmnekvmFQpaZ6U+xf2MQ9poQoCh6jQ==", + "optional": true + }, + "@next/swc-linux-arm64-gnu": { + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.0.6.tgz", + "integrity": "sha512-e8KTRnleQY1KLk5PwGV5hrmvKksCc74QRpHl5ffWnEEAtL2FE0ave5aIkXqErsPdXkiKuA/owp3LjQrP+/AH7Q==", + "optional": true + }, + "@next/swc-linux-arm64-musl": { + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.0.6.tgz", + "integrity": "sha512-/7RF03C3mhjYpHN+pqOolgME3guiHU5T3TsejuyteqyEyzdEyLHod+jcYH6ft7UZ71a6TdOewvmbLOtzHW2O8A==", + "optional": true + }, + "@next/swc-linux-x64-gnu": { + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.0.6.tgz", + "integrity": "sha512-kxyEXnYHpOEkFnmrlwB1QlzJtjC6sAJytKcceIyFUHbCaD3W/Qb5tnclcnHKTaFccizZRePXvV25Ok/eUSpKTw==", + "optional": true + }, + "@next/swc-linux-x64-musl": { + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.0.6.tgz", + "integrity": "sha512-N0c6gubS3WW1oYYgo02xzZnNatfVQP/CiJq2ax+DJ55ePV62IACbRCU99TZNXXg+Kos6vNW4k+/qgvkvpGDeyA==", + "optional": true + }, + "@next/swc-win32-arm64-msvc": { + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.0.6.tgz", + "integrity": "sha512-QjeMB2EBqBFPb/ac0CYr7GytbhUkrG4EwFWbcE0vsRp4H8grt25kYpFQckL4Jak3SUrp7vKfDwZ/SwO7QdO8vw==", + "optional": true + }, + "@next/swc-win32-ia32-msvc": { + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.0.6.tgz", + "integrity": "sha512-EQzXtdqRTcmhT/tCq81rIwE36Y3fNHPInaCuJzM/kftdXfa0F+64y7FAoMO13npX8EG1+SamXgp/emSusKrCXg==", + "optional": true + }, + "@next/swc-win32-x64-msvc": { + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.0.6.tgz", + "integrity": "sha512-pSkqZ//UP/f2sS9T7IvHLfEWDPTX0vRyXJnAUNisKvO3eF3e1xdhDX7dix/X3Z3lnN4UjSwOzclAI87JFbOwmQ==", + "optional": true } } } diff --git a/package.json b/package.json index da5527322b..8237f9f8d4 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:*", @@ -21,6 +21,7 @@ "test:next": "jest -c test/e2e/jest.config.js", "test:next:disabled": "RUN_SKIPPED_TESTS=1 jest -c test/e2e/jest.config.disabled.js", "test:next:all": "RUN_SKIPPED_TESTS=1 jest -c test/e2e/jest.config.all.js", + "test:next:appdir": "NEXT_TEST_VERSION=canary jest -c test/e2e/jest.config.appdir.js", "test:jest": "jest", "playwright:install": "playwright install --with-deps chromium", "test:jest:update": "jest --updateSnapshot", @@ -70,6 +71,7 @@ "execa": "^5.1.1", "husky": "^7.0.4", "jest": "^27.0.0", + "jest-extended": "^3.2.0", "jest-fetch-mock": "^3.0.3", "jest-junit": "^14.0.1", "netlify-plugin-cypress": "^2.2.0", @@ -85,7 +87,7 @@ "typescript": "^4.3.4" }, "dependencies": { - "next": "^13.0.3" + "next": "^13.0.6" }, "engines": { "node": ">=16.0.0" @@ -118,7 +120,6 @@ }, "workspaces": [ "packages/*", - "demos/canary", "demos/default", "demos/next-auth", "demos/static-root", diff --git a/packages/next/package.json b/packages/next/package.json index dd986e83f4..0a23a770e6 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -8,7 +8,7 @@ ], "devDependencies": { "@types/node": "^17.0.25", - "next": "^13.0.3", + "next": "^13.0.6", "npm-run-all": "^4.1.5", "typescript": "^4.6.3", "@netlify/edge-functions": "^2.0.0" diff --git a/packages/runtime/package.json b/packages/runtime/package.json index 8afc6f17cc..17f7187082 100644 --- a/packages/runtime/package.json +++ b/packages/runtime/package.json @@ -41,7 +41,7 @@ "@types/jest": "^27.4.1", "@types/merge-stream": "^1.1.2", "@types/node": "^17.0.25", - "next": "^13.0.3", + "next": "^13.0.6", "npm-run-all": "^4.1.5", "typescript": "^4.6.3" }, diff --git a/packages/runtime/src/helpers/config.ts b/packages/runtime/src/helpers/config.ts index 9eecd91a26..9cd17265a4 100644 --- a/packages/runtime/src/helpers/config.ts +++ b/packages/runtime/src/helpers/config.ts @@ -1,4 +1,3 @@ -/* eslint-disable max-lines */ import type { NetlifyConfig } from '@netlify/build' import destr from 'destr' import { readJSON, writeJSON } from 'fs-extra' @@ -239,4 +238,3 @@ export const generateCustomHeaders = (nextConfig: NextConfig, netlifyHeaders: Ne } } } -/* eslint-enable max-lines */ diff --git a/packages/runtime/src/helpers/edge.ts b/packages/runtime/src/helpers/edge.ts index b42dcfecd3..927ac58783 100644 --- a/packages/runtime/src/helpers/edge.ts +++ b/packages/runtime/src/helpers/edge.ts @@ -1,4 +1,3 @@ -/* eslint-disable max-lines */ import { promises as fs, existsSync } from 'fs' import { resolve, join } from 'path' @@ -12,6 +11,7 @@ import { outdent } from 'outdent' import { getRequiredServerFiles, NextConfig } from './config' import { makeLocaleOptional, stripLookahead } from './matchers' +import { RoutesManifest } from './types' // This is the format as of next@12.2 interface EdgeFunctionDefinitionV1 { @@ -52,24 +52,30 @@ export interface FunctionManifest { function: string name?: string path: string + cache?: 'manual' } | { function: string name?: string pattern: string + cache?: 'manual' } > 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 */ @@ -85,6 +91,7 @@ import { // 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' } } +globalThis.EdgeRuntime = "netlify-edge" let _ENTRIES = {} // Next.js uses this extension to the Headers API implemented by Cloudflare workerd @@ -189,12 +196,18 @@ const writeEdgeFunction = async ({ edgeFunctionDefinition, edgeFunctionRoot, netlifyConfig, + pageRegexMap, + appPathRoutesManifest = {}, nextConfig, + cache, }: { edgeFunctionDefinition: EdgeFunctionDefinition edgeFunctionRoot: string netlifyConfig: NetlifyConfig + pageRegexMap?: Map + appPathRoutesManifest?: Record nextConfig: NextConfig + cache?: 'manual' }): Promise< Array<{ function: string @@ -235,12 +248,21 @@ const writeEdgeFunction = async ({ matchers.push(...edgeFunctionDefinition.matchers) } + // 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) { + matchers.push({ regexp }) + } + } + await writeJson(join(edgeFunctionDir, 'matchers.json'), matchers) // We add a defintion for each matching path return matchers.map((matcher) => { const pattern = stripLookahead(matcher.regexp) - return { function: name, pattern, name: edgeFunctionDefinition.name } + return { function: name, pattern, name: edgeFunctionDefinition.name, cache } }) } export const cleanupEdgeFunctions = ({ @@ -273,7 +295,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, @@ -285,6 +313,7 @@ export const writeEdgeFunctions = async (netlifyConfig: NetlifyConfig) => { const { publish } = netlifyConfig.build const nextConfigFile = await getRequiredServerFiles(publish) const nextConfig = nextConfigFile.config + const usesAppDir = nextConfig.experimental?.appDir await copy(getEdgeTemplatePath('../edge-shared'), join(edgeFunctionRoot, 'edge-shared')) await writeJSON(join(edgeFunctionRoot, 'edge-shared', 'nextConfig.json'), nextConfig) @@ -332,13 +361,27 @@ 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)) { usesEdge = true const functionDefinitions = await writeEdgeFunction({ edgeFunctionDefinition, edgeFunctionRoot, netlifyConfig, + pageRegexMap, + appPathRoutesManifest, nextConfig, + // cache: "manual" is currently experimental, so we restrict it to sites that use experimental appDir + cache: usesAppDir ? 'manual' : undefined, }) manifest.functions.push(...functionDefinitions) } @@ -352,5 +395,3 @@ export const writeEdgeFunctions = async (netlifyConfig: NetlifyConfig) => { } await writeJson(join(edgeFunctionRoot, 'manifest.json'), manifest) } - -/* eslint-enable max-lines */ diff --git a/packages/runtime/src/helpers/files.ts b/packages/runtime/src/helpers/files.ts index ef43af64e4..02c397e4c1 100644 --- a/packages/runtime/src/helpers/files.ts +++ b/packages/runtime/src/helpers/files.ts @@ -1,4 +1,3 @@ -/* eslint-disable max-lines */ import { cpus } from 'os' import type { NetlifyConfig } from '@netlify/build' @@ -86,7 +85,6 @@ export const moveStaticPages = async ({ }): Promise => { console.log('Moving static page files to serve from CDN...') const outputDir = join(netlifyConfig.build.publish, target === 'server' ? 'server' : 'serverless') - const root = join(outputDir, 'pages') const buildId = readFileSync(join(netlifyConfig.build.publish, 'BUILD_ID'), 'utf8').trim() const dataDir = join('_next', 'data', buildId) await ensureDir(join(netlifyConfig.build.publish, dataDir)) @@ -117,15 +115,18 @@ export const moveStaticPages = async ({ } }) - const files: Array = [] + let fileCount = 0 const filesManifest: Record = {} - const moveFile = async (file) => { + const moveFile = async (file: string) => { + // Strip the initial 'app' or 'pages' directory from the output path + const pathname = file.split('/').slice(1).join('/') + // .rsc data files go next to the html file const isData = file.endsWith('.json') - const source = join(root, file) - const targetFile = isData ? join(dataDir, file) : file + const source = join(outputDir, file) + const targetFile = isData ? join(dataDir, pathname) : pathname const targetPath = basePath ? join(basePath, targetFile) : targetFile - files.push(file) + fileCount += 1 filesManifest[file] = targetPath const dest = join(netlifyConfig.build.publish, targetPath) @@ -137,8 +138,8 @@ export const moveStaticPages = async ({ } } // Move all static files, except error documents and nft manifests - const pages = await globby(['**/*.{html,json}', '!**/(500|404|*.js.nft).{html,json}'], { - cwd: root, + const pages = await globby(['{app,pages}/**/*.{html,json,rsc}', '!**/(500|404|*.js.nft).{html,json}'], { + cwd: outputDir, dot: true, }) @@ -150,35 +151,38 @@ export const moveStaticPages = async ({ // Limit concurrent file moves to number of cpus or 2 if there is only 1 const limit = pLimit(Math.max(2, cpus().length)) const promises = pages.map((rawPath) => { + // Convert to POSIX path const filePath = slash(rawPath) + // Remove the initial 'app' or 'pages' directory from the output path + const pagePath = filePath.split('/').slice(1).join('/') // Don't move ISR files, as they're used for the first request - if (isrFiles.has(filePath)) { + if (isrFiles.has(pagePath)) { return } - if (isDynamicRoute(filePath)) { + if (isDynamicRoute(pagePath)) { return } - if (matchesRedirect(filePath, redirects)) { - matchedRedirects.add(filePath) + if (matchesRedirect(pagePath, redirects)) { + matchedRedirects.add(pagePath) return } - if (matchesRewrite(filePath, rewrites)) { - matchedRewrites.add(filePath) + if (matchesRewrite(pagePath, rewrites)) { + matchedRewrites.add(pagePath) return } // Middleware matches against the unlocalised path - const unlocalizedPath = stripLocale(rawPath, i18n?.locales) + const unlocalizedPath = stripLocale(pagePath, i18n?.locales) const middlewarePath = matchMiddleware(middleware, unlocalizedPath) // If a file matches middleware it can't be offloaded to the CDN, and needs to stay at the origin to be served by next/server if (middlewarePath) { matchingMiddleware.add(middlewarePath) - matchedPages.add(rawPath) + matchedPages.add(filePath) return } return limit(moveFile, filePath) }) await Promise.all(promises) - console.log(`Moved ${files.length} files`) + console.log(`Moved ${fileCount} files`) if (matchedPages.size !== 0) { console.log( @@ -446,4 +450,3 @@ export const movePublicFiles = async ({ await copy(publicDir, `${publish}/`) } } -/* eslint-enable max-lines */ diff --git a/packages/runtime/src/helpers/functions.ts b/packages/runtime/src/helpers/functions.ts index 5015726dd7..f451abb321 100644 --- a/packages/runtime/src/helpers/functions.ts +++ b/packages/runtime/src/helpers/functions.ts @@ -1,4 +1,3 @@ -/* eslint-disable max-lines */ import type { NetlifyConfig, NetlifyPluginConstants } from '@netlify/build' import bridgeFile from '@vercel/node-bridge' import chalk from 'chalk' @@ -30,11 +29,14 @@ export const generateFunctions = async ( ): Promise => { const publish = resolve(PUBLISH_DIR) const functionsDir = resolve(INTERNAL_FUNCTIONS_SRC || FUNCTIONS_SRC) - console.log({ functionsDir }) const functionDir = join(functionsDir, HANDLER_FUNCTION_NAME) const publishDir = relative(functionDir, publish) for (const { route, config, compiled } of apiRoutes) { + // Don't write a lambda if the runtime is edge + if (config.runtime === 'experimental-edge') { + continue + } const apiHandlerSource = await getApiHandler({ page: route, config, @@ -230,4 +232,3 @@ export const warnOnApiRoutes = async ({ ) } } -/* eslint-enable max-lines */ diff --git a/packages/runtime/src/helpers/redirects.ts b/packages/runtime/src/helpers/redirects.ts index 22d777c88b..3781712e95 100644 --- a/packages/runtime/src/helpers/redirects.ts +++ b/packages/runtime/src/helpers/redirects.ts @@ -1,4 +1,3 @@ -/* eslint-disable max-lines */ import type { NetlifyConfig } from '@netlify/build' import { yellowBright } from 'chalk' import { readJSON } from 'fs-extra' @@ -330,4 +329,3 @@ export const generateRedirects = async ({ ) } } -/* eslint-enable max-lines */ diff --git a/packages/runtime/src/helpers/utils.ts b/packages/runtime/src/helpers/utils.ts index 35e5487ba4..2a12ff2a50 100644 --- a/packages/runtime/src/helpers/utils.ts +++ b/packages/runtime/src/helpers/utils.ts @@ -1,4 +1,3 @@ -/* eslint-disable max-lines */ import type { NetlifyConfig } from '@netlify/build' import type { Header } from '@netlify/build/types/config/netlify_config' import globby from 'globby' @@ -291,5 +290,3 @@ export const getRemotePatterns = (experimental: ExperimentalConfigWithLegacy, im } return [] } - -/* eslint-enable max-lines */ diff --git a/packages/runtime/src/helpers/verification.ts b/packages/runtime/src/helpers/verification.ts index 3d94517b6e..ed1f6e1108 100644 --- a/packages/runtime/src/helpers/verification.ts +++ b/packages/runtime/src/helpers/verification.ts @@ -1,4 +1,3 @@ -/* eslint-disable max-lines */ import { existsSync, promises } from 'fs' import path, { relative, join } from 'path' @@ -213,4 +212,3 @@ export const warnForRootRedirects = ({ appDir }: { appDir: string }) => { ) } } -/* eslint-enable max-lines */ diff --git a/packages/runtime/src/index.ts b/packages/runtime/src/index.ts index 05f9eb0b2d..8806d686a9 100644 --- a/packages/runtime/src/index.ts +++ b/packages/runtime/src/index.ts @@ -1,4 +1,3 @@ -/* eslint-disable max-lines */ import { join, relative } from 'path' import type { NetlifyPlugin } from '@netlify/build' @@ -80,12 +79,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) @@ -186,7 +184,7 @@ const plugin: NetlifyPlugin = { apiRoutes, }) - await writeEdgeFunctions(netlifyConfig) + await writeEdgeFunctions({ netlifyConfig, routesManifest }) }, async onPostBuild({ @@ -221,13 +219,18 @@ const plugin: NetlifyPlugin = { await checkZipSize(join(FUNCTIONS_DIST, `${ODB_FUNCTION_NAME}.zip`)) const nextConfig = await getNextConfig({ publish, failBuild }) - const { basePath, appDir } = nextConfig + const { basePath, appDir, experimental } = nextConfig generateCustomHeaders(nextConfig, headers) warnForProblematicUserRewrites({ basePath, redirects }) warnForRootRedirects({ appDir }) await warnOnApiRoutes({ FUNCTIONS_DIST }) + if (experimental?.appDir) { + console.log( + '🧪 Thank you for testing "appDir" support on Netlify. For known issues and to give feedback, visit https://ntl.fyi/next-13-feedback', + ) + } }, } // The types haven't been updated yet @@ -254,5 +257,3 @@ const nextRuntime = ( } module.exports = nextRuntime - -/* eslint-enable max-lines */ diff --git a/packages/runtime/src/templates/edge/runtime.ts b/packages/runtime/src/templates/edge/runtime.ts index 59d7a4a9cd..45c25eb94a 100644 --- a/packages/runtime/src/templates/edge/runtime.ts +++ b/packages/runtime/src/templates/edge/runtime.ts @@ -13,6 +13,12 @@ export interface FetchEventResult { waitUntil: Promise } +export interface I18NConfig { + defaultLocale: string + localeDetection?: false + locales: string[] +} + export interface RequestData { geo?: { city?: string @@ -27,7 +33,7 @@ export interface RequestData { method: string nextConfig?: { basePath?: string - i18n?: Record + i18n?: I18NConfig | null trailingSlash?: boolean } page?: { diff --git a/packages/runtime/src/templates/getApiHandler.ts b/packages/runtime/src/templates/getApiHandler.ts index 9c7b17e702..b0b82bd76c 100644 --- a/packages/runtime/src/templates/getApiHandler.ts +++ b/packages/runtime/src/templates/getApiHandler.ts @@ -137,7 +137,7 @@ export const getApiHandler = ({ const { config } = require("${publishDir}/required-server-files.json") let staticManifest const path = require("path"); - const pageRoot = path.resolve(path.join(__dirname, "${publishDir}", "serverless", "pages")); + const pageRoot = path.resolve(path.join(__dirname, "${publishDir}", "server")); const handler = (${makeHandler.toString()})(config, "${appDir}", pageRoot, ${JSON.stringify(page)}) exports.handler = ${ config.type === ApiRouteType.SCHEDULED ? `schedule(${JSON.stringify(config.schedule)}, handler);` : 'handler' diff --git a/packages/runtime/src/templates/getHandler.ts b/packages/runtime/src/templates/getHandler.ts index 4bd1dfec96..0e62c09855 100644 --- a/packages/runtime/src/templates/getHandler.ts +++ b/packages/runtime/src/templates/getHandler.ts @@ -17,7 +17,13 @@ const { URLSearchParams, URL } = require('url') const { Bridge } = require('@vercel/node-bridge/bridge') -const { augmentFsModule, getMaxAge, getMultiValueHeaders, getNextServer } = require('./handlerUtils') +const { + augmentFsModule, + getMaxAge, + getMultiValueHeaders, + getPrefetchResponse, + getNextServer, +} = require('./handlerUtils') /* eslint-enable @typescript-eslint/no-var-requires */ type Mutable = { @@ -53,8 +59,8 @@ const makeHandler = (conf: NextConfig, app, pageRoot, staticManifest: Array<[str for (const [key, value] of Object.entries(conf.env)) { process.env[key] = String(value) } - // Set during the request as it needs the host header. Hoisted so we can define the function once - let base: string + // Set during the request as it needs to get it from the request URL. Defaults to the URL env var + let base = process.env.URL augmentFsModule({ promises, staticManifest, pageRoot, getBase: () => base }) @@ -67,9 +73,7 @@ const makeHandler = (conf: NextConfig, app, pageRoot, staticManifest: Array<[str } const url = new URL(event.rawUrl) const port = Number.parseInt(url.port) || 80 - const { host } = event.headers - const protocol = event.headers['x-forwarded-proto'] || 'http' - base = `${protocol}://${host}` + base = url.origin const NextServer: NextServerType = getNextServer() const nextServer = new NextServer({ @@ -95,6 +99,10 @@ const makeHandler = (conf: NextConfig, app, pageRoot, staticManifest: Array<[str return async function handler(event: HandlerEvent, context: HandlerContext) { let requestMode = mode + const prefetchResponse = getPrefetchResponse(event, mode) + if (prefetchResponse) { + return prefetchResponse + } // Ensure that paths are encoded - but don't double-encode them event.path = new URL(event.rawUrl).pathname // Next expects to be able to parse the query from the URL @@ -169,7 +177,7 @@ export const getHandler = ({ isODB = false, publishDir = '../../../.next', appDi const { promises } = require("fs"); // We copy the file here rather than requiring from the node module const { Bridge } = require("./bridge"); - const { augmentFsModule, getMaxAge, getMultiValueHeaders, getNextServer } = require('./handlerUtils') + const { augmentFsModule, getMaxAge, getMultiValueHeaders, getPrefetchResponse, getNextServer } = require('./handlerUtils') ${isODB ? `const { builder } = require("@netlify/functions")` : ''} const { config } = require("${publishDir}/required-server-files.json") @@ -178,7 +186,7 @@ export const getHandler = ({ isODB = false, publishDir = '../../../.next', appDi staticManifest = require("${publishDir}/static-manifest.json") } catch {} const path = require("path"); - const pageRoot = path.resolve(path.join(__dirname, "${publishDir}", config.target === "server" ? "server" : "serverless", "pages")); + const pageRoot = path.resolve(path.join(__dirname, "${publishDir}", "server")); exports.handler = ${ isODB ? `builder((${makeHandler.toString()})(config, "${appDir}", pageRoot, staticManifest, 'odb'));` diff --git a/packages/runtime/src/templates/handlerUtils.ts b/packages/runtime/src/templates/handlerUtils.ts index b68a8b5f30..c2af09db9a 100644 --- a/packages/runtime/src/templates/handlerUtils.ts +++ b/packages/runtime/src/templates/handlerUtils.ts @@ -4,6 +4,7 @@ import path from 'path' import { pipeline } from 'stream' import { promisify } from 'util' +import { HandlerEvent, HandlerResponse } from '@netlify/functions' import { http, https } from 'follow-redirects' import type NextNodeServer from 'next/dist/server/next-server' @@ -107,24 +108,25 @@ export const augmentFsModule = ({ const statsOrig = promises.stat // ...then money-patch it to see if it's requesting a CDN file promises.readFile = (async (file, options) => { - const base = getBase() + const baseUrl = getBase() + // We only care about page files if (file.startsWith(pageRoot)) { - // We only want the part after `pages/` + // We only want the part after `.next/server/` const filePath = file.slice(pageRoot.length + 1) // Is it in the CDN and not local? if (staticFiles.has(filePath) && !existsSync(file)) { // This name is safe to use, because it's one that was already created by Next const cacheFile = path.join(cacheDir, filePath) - const url = `${base}/${staticFiles.get(filePath)}` + const url = `${baseUrl}/${staticFiles.get(filePath)}` // If it's already downloading we can wait for it to finish if (downloadPromises.has(url)) { await downloadPromises.get(url) } // Have we already cached it? We download every time if running locally to avoid staleness - if ((!existsSync(cacheFile) || process.env.NETLIFY_DEV) && base) { + if ((!existsSync(cacheFile) || process.env.NETLIFY_DEV) && baseUrl) { await promises.mkdir(path.dirname(cacheFile), { recursive: true }) try { @@ -147,7 +149,7 @@ export const augmentFsModule = ({ promises.stat = ((file, options) => { // We only care about page files if (file.startsWith(pageRoot)) { - // We only want the part after `pages/` + // We only want the part after `.next/server` const cacheFile = path.join(cacheDir, file.slice(pageRoot.length + 1)) if (existsSync(cacheFile)) { return statsOrig(cacheFile, options) @@ -188,3 +190,21 @@ export const getNextServer = (): NextServerType => { } return NextServer } +/** + * Prefetch requests are used to check for middleware redirects, and shouldn't trigger SSR. + */ +export const getPrefetchResponse = (event: HandlerEvent, mode: string): HandlerResponse | false => { + if (event.headers['x-middleware-prefetch'] && mode === 'ssr') { + return { + statusCode: 200, + body: '{}', + headers: { + 'Content-Type': 'application/json', + 'x-middleware-skip': '1', + // https://github.com/vercel/next.js/pull/42936/files#r1027563953 + vary: 'x-middleware-prefetch', + }, + } + } + return false +} diff --git a/test/__snapshots__/index.js.snap b/test/__snapshots__/index.js.snap index e9bea87306..8ae1301935 100644 --- a/test/__snapshots__/index.js.snap +++ b/test/__snapshots__/index.js.snap @@ -288,235 +288,355 @@ exports.resolvePages = () => { exports[`onBuild() generates static files manifest 1`] = ` Array [ Array [ - "en/broken-image.html", + "pages/en/broken-image.html", "en/broken-image.html", ], Array [ - "en/css.html", + "pages/en/css.html", "en/css.html", ], Array [ - "en/env.html", + "pages/en/env.html", "en/env.html", ], Array [ - "en/font.html", + "pages/en/font.html", "en/font.html", ], Array [ - "en/getStaticProps/1.html", + "pages/en/getStaticProps/1.html", "en/getStaticProps/1.html", ], Array [ - "en/getStaticProps/1.json", + "pages/en/getStaticProps/1.json", "_next/data/build-id/en/getStaticProps/1.json", ], Array [ - "en/getStaticProps/2.html", + "pages/en/getStaticProps/2.html", "en/getStaticProps/2.html", ], Array [ - "en/getStaticProps/2.json", + "pages/en/getStaticProps/2.json", "_next/data/build-id/en/getStaticProps/2.json", ], Array [ - "en/getStaticProps/env.html", + "pages/en/getStaticProps/env.html", "en/getStaticProps/env.html", ], Array [ - "en/getStaticProps/env.json", + "pages/en/getStaticProps/env.json", "_next/data/build-id/en/getStaticProps/env.json", ], Array [ - "en/getStaticProps/static.html", + "pages/en/getStaticProps/static.html", "en/getStaticProps/static.html", ], Array [ - "en/getStaticProps/static.json", + "pages/en/getStaticProps/static.json", "_next/data/build-id/en/getStaticProps/static.json", ], Array [ - "en/getStaticProps/withFallback/1.html", + "pages/en/getStaticProps/with-revalidate-404.html", + "en/getStaticProps/with-revalidate-404.html", + ], + Array [ + "pages/en/getStaticProps/with-revalidate-404.json", + "_next/data/build-id/en/getStaticProps/with-revalidate-404.json", + ], + Array [ + "pages/en/getStaticProps/with-revalidate.html", + "en/getStaticProps/with-revalidate.html", + ], + Array [ + "pages/en/getStaticProps/with-revalidate.json", + "_next/data/build-id/en/getStaticProps/with-revalidate.json", + ], + Array [ + "pages/en/getStaticProps/withFallback/1.html", "en/getStaticProps/withFallback/1.html", ], Array [ - "en/getStaticProps/withFallback/1.json", + "pages/en/getStaticProps/withFallback/1.json", "_next/data/build-id/en/getStaticProps/withFallback/1.json", ], Array [ - "en/getStaticProps/withFallback/2.html", + "pages/en/getStaticProps/withFallback/2.html", "en/getStaticProps/withFallback/2.html", ], Array [ - "en/getStaticProps/withFallback/2.json", + "pages/en/getStaticProps/withFallback/2.json", "_next/data/build-id/en/getStaticProps/withFallback/2.json", ], Array [ - "en/getStaticProps/withFallback/my/path/1.html", + "pages/en/getStaticProps/withFallback/my/path/1.html", "en/getStaticProps/withFallback/my/path/1.html", ], Array [ - "en/getStaticProps/withFallback/my/path/1.json", + "pages/en/getStaticProps/withFallback/my/path/1.json", "_next/data/build-id/en/getStaticProps/withFallback/my/path/1.json", ], Array [ - "en/getStaticProps/withFallback/my/path/2.html", + "pages/en/getStaticProps/withFallback/my/path/2.html", "en/getStaticProps/withFallback/my/path/2.html", ], Array [ - "en/getStaticProps/withFallback/my/path/2.json", + "pages/en/getStaticProps/withFallback/my/path/2.json", "_next/data/build-id/en/getStaticProps/withFallback/my/path/2.json", ], Array [ - "en/getStaticProps/withFallbackBlocking/1.html", + "pages/en/getStaticProps/withFallbackBlocking/1.html", "en/getStaticProps/withFallbackBlocking/1.html", ], Array [ - "en/getStaticProps/withFallbackBlocking/1.json", + "pages/en/getStaticProps/withFallbackBlocking/1.json", "_next/data/build-id/en/getStaticProps/withFallbackBlocking/1.json", ], Array [ - "en/getStaticProps/withFallbackBlocking/2.html", + "pages/en/getStaticProps/withFallbackBlocking/2.html", "en/getStaticProps/withFallbackBlocking/2.html", ], Array [ - "en/getStaticProps/withFallbackBlocking/2.json", + "pages/en/getStaticProps/withFallbackBlocking/2.json", "_next/data/build-id/en/getStaticProps/withFallbackBlocking/2.json", ], Array [ - "en/image.html", + "pages/en/getStaticProps/withRevalidate/1.html", + "en/getStaticProps/withRevalidate/1.html", + ], + Array [ + "pages/en/getStaticProps/withRevalidate/1.json", + "_next/data/build-id/en/getStaticProps/withRevalidate/1.json", + ], + Array [ + "pages/en/getStaticProps/withRevalidate/2.html", + "en/getStaticProps/withRevalidate/2.html", + ], + Array [ + "pages/en/getStaticProps/withRevalidate/2.json", + "_next/data/build-id/en/getStaticProps/withRevalidate/2.json", + ], + Array [ + "pages/en/getStaticProps/withRevalidate/withFallback/1.html", + "en/getStaticProps/withRevalidate/withFallback/1.html", + ], + Array [ + "pages/en/getStaticProps/withRevalidate/withFallback/1.json", + "_next/data/build-id/en/getStaticProps/withRevalidate/withFallback/1.json", + ], + Array [ + "pages/en/getStaticProps/withRevalidate/withFallback/2.html", + "en/getStaticProps/withRevalidate/withFallback/2.html", + ], + Array [ + "pages/en/getStaticProps/withRevalidate/withFallback/2.json", + "_next/data/build-id/en/getStaticProps/withRevalidate/withFallback/2.json", + ], + Array [ + "pages/en/getStaticProps/withRevalidate/withFallbackBlocking/1.html", + "en/getStaticProps/withRevalidate/withFallbackBlocking/1.html", + ], + Array [ + "pages/en/getStaticProps/withRevalidate/withFallbackBlocking/1.json", + "_next/data/build-id/en/getStaticProps/withRevalidate/withFallbackBlocking/1.json", + ], + Array [ + "pages/en/getStaticProps/withRevalidate/withFallbackBlocking/2.html", + "en/getStaticProps/withRevalidate/withFallbackBlocking/2.html", + ], + Array [ + "pages/en/getStaticProps/withRevalidate/withFallbackBlocking/2.json", + "_next/data/build-id/en/getStaticProps/withRevalidate/withFallbackBlocking/2.json", + ], + Array [ + "pages/en/image.html", "en/image.html", ], Array [ - "en/layouts.html", + "pages/en/layouts.html", "en/layouts.html", ], Array [ - "en/previewTest.html", + "pages/en/old/image.html", + "en/old/image.html", + ], + Array [ + "pages/en/previewTest.html", "en/previewTest.html", ], Array [ - "en/previewTest.json", + "pages/en/previewTest.json", "_next/data/build-id/en/previewTest.json", ], Array [ - "en/script.html", + "pages/en/redirectme.html", + "en/redirectme.html", + ], + Array [ + "pages/en/script.html", "en/script.html", ], Array [ - "en/static.html", + "pages/en/static.html", "en/static.html", ], Array [ - "es/broken-image.html", + "pages/es/broken-image.html", "es/broken-image.html", ], Array [ - "es/css.html", + "pages/es/css.html", "es/css.html", ], Array [ - "es/env.html", + "pages/es/env.html", "es/env.html", ], Array [ - "es/font.html", + "pages/es/font.html", "es/font.html", ], Array [ - "es/getStaticProps/env.html", + "pages/es/getStaticProps/env.html", "es/getStaticProps/env.html", ], Array [ - "es/getStaticProps/env.json", + "pages/es/getStaticProps/env.json", "_next/data/build-id/es/getStaticProps/env.json", ], Array [ - "es/getStaticProps/static.html", + "pages/es/getStaticProps/static.html", "es/getStaticProps/static.html", ], Array [ - "es/getStaticProps/static.json", + "pages/es/getStaticProps/static.json", "_next/data/build-id/es/getStaticProps/static.json", ], Array [ - "es/image.html", + "pages/es/getStaticProps/with-revalidate-404.html", + "es/getStaticProps/with-revalidate-404.html", + ], + Array [ + "pages/es/getStaticProps/with-revalidate-404.json", + "_next/data/build-id/es/getStaticProps/with-revalidate-404.json", + ], + Array [ + "pages/es/getStaticProps/with-revalidate.html", + "es/getStaticProps/with-revalidate.html", + ], + Array [ + "pages/es/getStaticProps/with-revalidate.json", + "_next/data/build-id/es/getStaticProps/with-revalidate.json", + ], + Array [ + "pages/es/image.html", "es/image.html", ], Array [ - "es/layouts.html", + "pages/es/layouts.html", "es/layouts.html", ], Array [ - "es/previewTest.html", + "pages/es/old/image.html", + "es/old/image.html", + ], + Array [ + "pages/es/previewTest.html", "es/previewTest.html", ], Array [ - "es/previewTest.json", + "pages/es/previewTest.json", "_next/data/build-id/es/previewTest.json", ], Array [ - "es/script.html", + "pages/es/redirectme.html", + "es/redirectme.html", + ], + Array [ + "pages/es/script.html", "es/script.html", ], Array [ - "es/static.html", + "pages/es/static.html", "es/static.html", ], Array [ - "fr/broken-image.html", + "pages/fr/broken-image.html", "fr/broken-image.html", ], Array [ - "fr/css.html", + "pages/fr/css.html", "fr/css.html", ], Array [ - "fr/env.html", + "pages/fr/env.html", "fr/env.html", ], Array [ - "fr/font.html", + "pages/fr/font.html", "fr/font.html", ], Array [ - "fr/getStaticProps/env.html", + "pages/fr/getStaticProps/env.html", "fr/getStaticProps/env.html", ], Array [ - "fr/getStaticProps/env.json", + "pages/fr/getStaticProps/env.json", "_next/data/build-id/fr/getStaticProps/env.json", ], Array [ - "fr/getStaticProps/static.html", + "pages/fr/getStaticProps/static.html", "fr/getStaticProps/static.html", ], Array [ - "fr/getStaticProps/static.json", + "pages/fr/getStaticProps/static.json", "_next/data/build-id/fr/getStaticProps/static.json", ], Array [ - "fr/image.html", + "pages/fr/getStaticProps/with-revalidate-404.html", + "fr/getStaticProps/with-revalidate-404.html", + ], + Array [ + "pages/fr/getStaticProps/with-revalidate-404.json", + "_next/data/build-id/fr/getStaticProps/with-revalidate-404.json", + ], + Array [ + "pages/fr/getStaticProps/with-revalidate.html", + "fr/getStaticProps/with-revalidate.html", + ], + Array [ + "pages/fr/getStaticProps/with-revalidate.json", + "_next/data/build-id/fr/getStaticProps/with-revalidate.json", + ], + Array [ + "pages/fr/image.html", "fr/image.html", ], Array [ - "fr/layouts.html", + "pages/fr/layouts.html", "fr/layouts.html", ], Array [ - "fr/previewTest.html", + "pages/fr/old/image.html", + "fr/old/image.html", + ], + Array [ + "pages/fr/previewTest.html", "fr/previewTest.html", ], Array [ - "fr/previewTest.json", + "pages/fr/previewTest.json", "_next/data/build-id/fr/previewTest.json", ], Array [ - "fr/script.html", + "pages/fr/redirectme.html", + "fr/redirectme.html", + ], + Array [ + "pages/fr/script.html", "fr/script.html", ], Array [ - "fr/static.html", + "pages/fr/static.html", "fr/static.html", ], ] diff --git a/test/e2e/app-dir/app-alias.test.ts b/test/e2e/app-dir/app-alias.test.ts new file mode 100644 index 0000000000..4b24e0d8c3 --- /dev/null +++ b/test/e2e/app-dir/app-alias.test.ts @@ -0,0 +1,52 @@ +import { createNext, FileRef } from 'e2e-utils' +import { NextInstance } from 'test/lib/next-modes/base' +import { renderViaHTTP } from 'next-test-utils' +import webdriver from 'next-webdriver' +import path from 'path' +import { readJSON } from 'fs-extra' + +describe('app-dir alias handling', () => { + //if ((global as any).isNextDeploy) { + // it('should skip next deploy for now', () => {}) + // return + //} + + let next: NextInstance + + beforeAll(async () => { + next = await createNext({ + files: new FileRef(path.join(__dirname, 'app-alias')), + dependencies: { + react: 'latest', + 'react-dom': 'latest', + typescript: 'latest', + '@types/react': 'latest', + '@types/node': 'latest', + }, + packageJson: { + type: 'module', + }, + }) + }, 600000) + afterAll(() => next.destroy()) + + it('should handle typescript paths alias correctly', async () => { + const html = await renderViaHTTP(next.url, '/button') + expect(html).toContain('click') + }) + + it('should resolve css imports from outside with src folder presented', async () => { + const browser = await webdriver(next.url, '/button') + const fontSize = await browser.elementByCss('button').getComputedCss('font-size') + expect(fontSize).toBe('50px') + }) + + if (!(global as any).isNextDev) { + it('should generate app-build-manifest correctly', async () => { + // Remove other page CSS files: + const manifest = await readJSON(path.join(next.testDir, '.next', 'app-build-manifest.json')) + + expect(manifest.pages).not.toBeEmptyObject() + }) + } +}) diff --git a/test/e2e/app-dir/app-alias/next.config.js b/test/e2e/app-dir/app-alias/next.config.js new file mode 100644 index 0000000000..3d6be3a00f --- /dev/null +++ b/test/e2e/app-dir/app-alias/next.config.js @@ -0,0 +1,5 @@ +export default { + experimental: { + appDir: true, + }, +} diff --git a/test/e2e/app-dir/app-alias/package.json b/test/e2e/app-dir/app-alias/package.json new file mode 100644 index 0000000000..3dbc1ca591 --- /dev/null +++ b/test/e2e/app-dir/app-alias/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/test/e2e/app-dir/app-alias/src/app/button/page.tsx b/test/e2e/app-dir/app-alias/src/app/button/page.tsx new file mode 100644 index 0000000000..54c20b4f88 --- /dev/null +++ b/test/e2e/app-dir/app-alias/src/app/button/page.tsx @@ -0,0 +1,10 @@ +import Button from '@/ui/button' +import React from 'react' + +export default function page() { + if ('useState' in React) { + throw new Error('React is not resolved correctly.') + } + + return +} diff --git a/test/e2e/app-dir/app-alias/src/app/layout.tsx b/test/e2e/app-dir/app-alias/src/app/layout.tsx new file mode 100644 index 0000000000..cbdfcab503 --- /dev/null +++ b/test/e2e/app-dir/app-alias/src/app/layout.tsx @@ -0,0 +1,10 @@ +export default function Root({ children }: { children: React.ReactNode }) { + return ( + + +
top bar
+ {children} + + + ) +} diff --git a/test/e2e/app-dir/app-alias/src/app/typing/page.tsx b/test/e2e/app-dir/app-alias/src/app/typing/page.tsx new file mode 100644 index 0000000000..593d8b7f4b --- /dev/null +++ b/test/e2e/app-dir/app-alias/src/app/typing/page.tsx @@ -0,0 +1,11 @@ +// Typing test +// eslint-disable-next-line +function noop() { + fetch('/button', { next: { revalidate: 0 } }) + const request = new Request('/button', { next: { revalidate: 0 } }) + fetch(request) +} + +export default function page() { + return 'typing' +} diff --git a/test/e2e/app-dir/app-alias/tsconfig.json b/test/e2e/app-dir/app-alias/tsconfig.json new file mode 100644 index 0000000000..5939f6892d --- /dev/null +++ b/test/e2e/app-dir/app-alias/tsconfig.json @@ -0,0 +1,29 @@ +{ + "compilerOptions": { + "target": "ES6", + "lib": ["dom", "dom.iterable", "esnext"], + "allowJs": true, + "skipLibCheck": true, + "strict": true, + "forceConsistentCasingInFileNames": true, + "noEmit": true, + "esModuleInterop": true, + "module": "esnext", + "moduleResolution": "node", + "resolveJsonModule": true, + "isolatedModules": true, + "jsx": "preserve", + "incremental": true, + "baseUrl": ".", + "paths": { + "@/ui/*": ["ui/*"] + }, + "plugins": [ + { + "name": "next" + } + ] + }, + "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], + "exclude": ["node_modules"] +} diff --git a/test/e2e/app-dir/app-alias/ui/button.tsx b/test/e2e/app-dir/app-alias/ui/button.tsx new file mode 100644 index 0000000000..4219fce04e --- /dev/null +++ b/test/e2e/app-dir/app-alias/ui/button.tsx @@ -0,0 +1,5 @@ +import styles from './style.module.css' + +export default function Button(props: any) { + return + + + ) +} diff --git a/test/e2e/app-dir/app/app/catch-all-link/page.js b/test/e2e/app-dir/app/app/catch-all-link/page.js new file mode 100644 index 0000000000..1170d49fa5 --- /dev/null +++ b/test/e2e/app-dir/app/app/catch-all-link/page.js @@ -0,0 +1,21 @@ +import Link from 'next/link' + +export default function Page() { + return ( + <> +
+ + To catch-all + +
+
+ + To optional catch-all + +
+ + ) +} diff --git a/test/e2e/app-dir/app/app/catch-all-optional/[[...slug]]/page.js b/test/e2e/app-dir/app/app/catch-all-optional/[[...slug]]/page.js new file mode 100644 index 0000000000..7a7a7b4d92 --- /dev/null +++ b/test/e2e/app-dir/app/app/catch-all-optional/[[...slug]]/page.js @@ -0,0 +1,7 @@ +export default function Page({ params }) { + return ( +

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

+ ) +} diff --git a/test/e2e/app-dir/app/app/catch-all/[...slug]/components/widget.js b/test/e2e/app-dir/app/app/catch-all/[...slug]/components/widget.js new file mode 100644 index 0000000000..606d3f10a2 --- /dev/null +++ b/test/e2e/app-dir/app/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/test/e2e/app-dir/app/app/catch-all/[...slug]/not-a-page.js b/test/e2e/app-dir/app/app/catch-all/[...slug]/not-a-page.js new file mode 100644 index 0000000000..b49da2a9ee --- /dev/null +++ b/test/e2e/app-dir/app/app/catch-all/[...slug]/not-a-page.js @@ -0,0 +1,3 @@ +export default function NotAPage() { + return

Not a page

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

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

+ + + + ) +} diff --git a/test/e2e/app-dir/app/app/client-component-route/page.js b/test/e2e/app-dir/app/app/client-component-route/page.js new file mode 100644 index 0000000000..95f2952533 --- /dev/null +++ b/test/e2e/app-dir/app/app/client-component-route/page.js @@ -0,0 +1,20 @@ +'use 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/test/e2e/app-dir/app/app/client-component-route/style.css b/test/e2e/app-dir/app/app/client-component-route/style.css new file mode 100644 index 0000000000..073d4283ae --- /dev/null +++ b/test/e2e/app-dir/app/app/client-component-route/style.css @@ -0,0 +1,3 @@ +b { + color: blue; +} diff --git a/test/e2e/app-dir/app/app/client-component-route/style.module.css b/test/e2e/app-dir/app/app/client-component-route/style.module.css new file mode 100644 index 0000000000..c6dd2c88fa --- /dev/null +++ b/test/e2e/app-dir/app/app/client-component-route/style.module.css @@ -0,0 +1,3 @@ +.red { + color: red; +} diff --git a/test/e2e/app-dir/app/app/client-nested/layout.js b/test/e2e/app-dir/app/app/client-nested/layout.js new file mode 100644 index 0000000000..51cc84b7b6 --- /dev/null +++ b/test/e2e/app-dir/app/app/client-nested/layout.js @@ -0,0 +1,20 @@ +'use 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/test/e2e/app-dir/app/app/client-nested/page.js b/test/e2e/app-dir/app/app/client-nested/page.js new file mode 100644 index 0000000000..2b6a107426 --- /dev/null +++ b/test/e2e/app-dir/app/app/client-nested/page.js @@ -0,0 +1,7 @@ +export default function ClientPage() { + return ( + <> +

hello from app/client-nested

+ + ) +} diff --git a/test/e2e/app-dir/app/app/client-nested/style.css b/test/e2e/app-dir/app/app/client-nested/style.css new file mode 100644 index 0000000000..23b1956407 --- /dev/null +++ b/test/e2e/app-dir/app/app/client-nested/style.css @@ -0,0 +1,3 @@ +button { + color: red; +} diff --git a/test/e2e/app-dir/app/app/client-nested/style.module.css b/test/e2e/app-dir/app/app/client-nested/style.module.css new file mode 100644 index 0000000000..c6dd2c88fa --- /dev/null +++ b/test/e2e/app-dir/app/app/client-nested/style.module.css @@ -0,0 +1,3 @@ +.red { + color: red; +} diff --git a/test/e2e/app-dir/app/app/css/css-client/client-foo.css b/test/e2e/app-dir/app/app/css/css-client/client-foo.css new file mode 100644 index 0000000000..94ff8d4b48 --- /dev/null +++ b/test/e2e/app-dir/app/app/css/css-client/client-foo.css @@ -0,0 +1,3 @@ +.foo { + color: blue; +} diff --git a/test/e2e/app-dir/app/app/css/css-client/client-layout.css b/test/e2e/app-dir/app/app/css/css-client/client-layout.css new file mode 100644 index 0000000000..5bc2906308 --- /dev/null +++ b/test/e2e/app-dir/app/app/css/css-client/client-layout.css @@ -0,0 +1,3 @@ +body { + background: cyan; +} diff --git a/test/e2e/app-dir/app/app/css/css-client/client-page.css b/test/e2e/app-dir/app/app/css/css-client/client-page.css new file mode 100644 index 0000000000..f3e551c053 --- /dev/null +++ b/test/e2e/app-dir/app/app/css/css-client/client-page.css @@ -0,0 +1,6 @@ +h1 { + color: red !important; +} +h1::after { + content: ' (from css-client!!!!)'; +} diff --git a/test/e2e/app-dir/app/app/css/css-client/foo.js b/test/e2e/app-dir/app/app/css/css-client/foo.js new file mode 100644 index 0000000000..98d4f855cc --- /dev/null +++ b/test/e2e/app-dir/app/app/css/css-client/foo.js @@ -0,0 +1,5 @@ +import './client-foo.css' + +export default function Foo() { + return foo +} diff --git a/test/e2e/app-dir/app/app/css/css-client/inner/ClientComponent.module.css b/test/e2e/app-dir/app/app/css/css-client/inner/ClientComponent.module.css new file mode 100644 index 0000000000..3d250634ed --- /dev/null +++ b/test/e2e/app-dir/app/app/css/css-client/inner/ClientComponent.module.css @@ -0,0 +1,3 @@ +.yuge { + font-size: 100px; +} diff --git a/test/e2e/app-dir/app/app/css/css-client/inner/foo.js b/test/e2e/app-dir/app/app/css/css-client/inner/foo.js new file mode 100644 index 0000000000..b607d6dde7 --- /dev/null +++ b/test/e2e/app-dir/app/app/css/css-client/inner/foo.js @@ -0,0 +1,11 @@ +'use client' + +import styles from './ClientComponent.module.css' + +export default function ClientComponent() { + return ( +
+ Client Component +
+ ) +} diff --git a/test/e2e/app-dir/app/app/css/css-client/inner/page.js b/test/e2e/app-dir/app/app/css/css-client/inner/page.js new file mode 100644 index 0000000000..5c14cc9307 --- /dev/null +++ b/test/e2e/app-dir/app/app/css/css-client/inner/page.js @@ -0,0 +1,5 @@ +import Foo from './foo' + +export default function Page() { + return +} diff --git a/test/e2e/app-dir/app/app/css/css-client/layout.js b/test/e2e/app-dir/app/app/css/css-client/layout.js new file mode 100644 index 0000000000..f460e79edb --- /dev/null +++ b/test/e2e/app-dir/app/app/css/css-client/layout.js @@ -0,0 +1,14 @@ +'use client' + +import './client-layout.css' + +import Foo from './foo' + +export default function ServerLayout({ children }) { + return ( + <> + {children} + + + ) +} diff --git a/test/e2e/app-dir/app/app/css/css-client/page.js b/test/e2e/app-dir/app/app/css/css-client/page.js new file mode 100644 index 0000000000..c62ea6373f --- /dev/null +++ b/test/e2e/app-dir/app/app/css/css-client/page.js @@ -0,0 +1,17 @@ +'use client' + +import 'next/link' + +import './client-page.css' +import styles from './inner/ClientComponent.module.css' + +export default function Page() { + return ( + <> +

Page!!!

+
+ huge +
+ + ) +} diff --git a/test/e2e/app-dir/app/app/css/css-nested/layout.js b/test/e2e/app-dir/app/app/css/css-nested/layout.js new file mode 100644 index 0000000000..348b447307 --- /dev/null +++ b/test/e2e/app-dir/app/app/css/css-nested/layout.js @@ -0,0 +1,14 @@ +'use 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/test/e2e/app-dir/app/app/css/css-nested/page.js b/test/e2e/app-dir/app/app/css/css-nested/page.js new file mode 100644 index 0000000000..47bf2fce4f --- /dev/null +++ b/test/e2e/app-dir/app/app/css/css-nested/page.js @@ -0,0 +1,5 @@ +'use client' + +export default function Page() { + return null +} diff --git a/test/e2e/app-dir/app/app/css/css-nested/style.css b/test/e2e/app-dir/app/app/css/css-nested/style.css new file mode 100644 index 0000000000..3eeea95774 --- /dev/null +++ b/test/e2e/app-dir/app/app/css/css-nested/style.css @@ -0,0 +1,3 @@ +.client-css { + color: green; +} diff --git a/test/e2e/app-dir/app/app/css/css-nested/style.module.css b/test/e2e/app-dir/app/app/css/css-nested/style.module.css new file mode 100644 index 0000000000..3eeea95774 --- /dev/null +++ b/test/e2e/app-dir/app/app/css/css-nested/style.module.css @@ -0,0 +1,3 @@ +.client-css { + color: green; +} diff --git a/test/e2e/app-dir/app/app/css/css-page/layout.js b/test/e2e/app-dir/app/app/css/css-page/layout.js new file mode 100644 index 0000000000..81c0ed0f47 --- /dev/null +++ b/test/e2e/app-dir/app/app/css/css-page/layout.js @@ -0,0 +1,5 @@ +import './style2.css' + +export default function ServerLayout({ children }) { + return <>{children} +} diff --git a/test/e2e/app-dir/app/app/css/css-page/page.js b/test/e2e/app-dir/app/app/css/css-page/page.js new file mode 100644 index 0000000000..10799b9671 --- /dev/null +++ b/test/e2e/app-dir/app/app/css/css-page/page.js @@ -0,0 +1,14 @@ +import './style.css' + +import styles from './style.module.css' + +export default function Page() { + return ( + <> +

Page

+
+ CSSM +
+ + ) +} diff --git a/test/e2e/app-dir/app/app/css/css-page/style.css b/test/e2e/app-dir/app/app/css/css-page/style.css new file mode 100644 index 0000000000..adc68fa6a4 --- /dev/null +++ b/test/e2e/app-dir/app/app/css/css-page/style.css @@ -0,0 +1,3 @@ +h1 { + color: red; +} diff --git a/test/e2e/app-dir/app/app/css/css-page/style.module.css b/test/e2e/app-dir/app/app/css/css-page/style.module.css new file mode 100644 index 0000000000..3991f65d58 --- /dev/null +++ b/test/e2e/app-dir/app/app/css/css-page/style.module.css @@ -0,0 +1,3 @@ +.mod { + color: blue; +} diff --git a/test/e2e/app-dir/app/app/css/css-page/style2.css b/test/e2e/app-dir/app/app/css/css-page/style2.css new file mode 100644 index 0000000000..cfddd0e039 --- /dev/null +++ b/test/e2e/app-dir/app/app/css/css-page/style2.css @@ -0,0 +1,3 @@ +body { + background: #ccc; +} diff --git a/test/e2e/app-dir/app/app/css/css-page/unused-nested/inner/page.js b/test/e2e/app-dir/app/app/css/css-page/unused-nested/inner/page.js new file mode 100644 index 0000000000..6878a343aa --- /dev/null +++ b/test/e2e/app-dir/app/app/css/css-page/unused-nested/inner/page.js @@ -0,0 +1,3 @@ +export default function Inner() { + return

Inner Page

+} diff --git a/test/e2e/app-dir/app/app/css/css-page/unused-nested/layout.js b/test/e2e/app-dir/app/app/css/css-page/unused-nested/layout.js new file mode 100644 index 0000000000..38e9850585 --- /dev/null +++ b/test/e2e/app-dir/app/app/css/css-page/unused-nested/layout.js @@ -0,0 +1,10 @@ +import { layout } from './styles' + +export default function ServerLayout({ children }) { + return ( + <> +

Layout

+ {children} + + ) +} diff --git a/test/e2e/app-dir/app/app/css/css-page/unused-nested/only-used-in-first-page.module.css b/test/e2e/app-dir/app/app/css/css-page/unused-nested/only-used-in-first-page.module.css new file mode 100644 index 0000000000..c71dcc347d --- /dev/null +++ b/test/e2e/app-dir/app/app/css/css-page/unused-nested/only-used-in-first-page.module.css @@ -0,0 +1,3 @@ +.this_should_not_be_included_in_inner_path { + color: wheat; +} diff --git a/test/e2e/app-dir/app/app/css/css-page/unused-nested/only-used-in-layout.module.css b/test/e2e/app-dir/app/app/css/css-page/unused-nested/only-used-in-layout.module.css new file mode 100644 index 0000000000..43b5b99d39 --- /dev/null +++ b/test/e2e/app-dir/app/app/css/css-page/unused-nested/only-used-in-layout.module.css @@ -0,0 +1,3 @@ +.mod { + color: tomato; +} diff --git a/test/e2e/app-dir/app/app/css/css-page/unused-nested/page.js b/test/e2e/app-dir/app/app/css/css-page/unused-nested/page.js new file mode 100644 index 0000000000..531ae6e120 --- /dev/null +++ b/test/e2e/app-dir/app/app/css/css-page/unused-nested/page.js @@ -0,0 +1,5 @@ +import { page } from './styles' + +export default function Page() { + return

Page

+} diff --git a/test/e2e/app-dir/app/app/css/css-page/unused-nested/styles.js b/test/e2e/app-dir/app/app/css/css-page/unused-nested/styles.js new file mode 100644 index 0000000000..f649cef70e --- /dev/null +++ b/test/e2e/app-dir/app/app/css/css-page/unused-nested/styles.js @@ -0,0 +1,4 @@ +import layout from './only-used-in-layout.module.css' +import page from './only-used-in-first-page.module.css' + +export { layout, page } diff --git a/test/e2e/app-dir/app/app/css/css-page/unused/page.js b/test/e2e/app-dir/app/app/css/css-page/unused/page.js new file mode 100644 index 0000000000..b3fa35d7cf --- /dev/null +++ b/test/e2e/app-dir/app/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/test/e2e/app-dir/app/app/css/css-page/unused/styles.js b/test/e2e/app-dir/app/app/css/css-page/unused/styles.js new file mode 100644 index 0000000000..d191a9a4e1 --- /dev/null +++ b/test/e2e/app-dir/app/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/test/e2e/app-dir/app/app/css/css-page/unused/unused.module.css b/test/e2e/app-dir/app/app/css/css-page/unused/unused.module.css new file mode 100644 index 0000000000..67ed738ab1 --- /dev/null +++ b/test/e2e/app-dir/app/app/css/css-page/unused/unused.module.css @@ -0,0 +1,3 @@ +.this_should_not_be_included { + color: red; +} diff --git a/test/e2e/app-dir/app/app/css/foo.js b/test/e2e/app-dir/app/app/css/foo.js new file mode 100644 index 0000000000..d31bab07a9 --- /dev/null +++ b/test/e2e/app-dir/app/app/css/foo.js @@ -0,0 +1 @@ +import './style.module.css' diff --git a/test/e2e/app-dir/app/app/css/layout.js b/test/e2e/app-dir/app/app/css/layout.js new file mode 100644 index 0000000000..3b1bdd72bb --- /dev/null +++ b/test/e2e/app-dir/app/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/test/e2e/app-dir/app/app/css/sass-client/global.sass b/test/e2e/app-dir/app/app/css/sass-client/global.sass new file mode 100644 index 0000000000..febf593dd7 --- /dev/null +++ b/test/e2e/app-dir/app/app/css/sass-client/global.sass @@ -0,0 +1,3 @@ +#sass-client-layout + color: brown + diff --git a/test/e2e/app-dir/app/app/css/sass-client/global.scss b/test/e2e/app-dir/app/app/css/sass-client/global.scss new file mode 100644 index 0000000000..d9a5d9d523 --- /dev/null +++ b/test/e2e/app-dir/app/app/css/sass-client/global.scss @@ -0,0 +1,3 @@ +#scss-client-layout { + color: burlywood; +} diff --git a/test/e2e/app-dir/app/app/css/sass-client/inner/global.sass b/test/e2e/app-dir/app/app/css/sass-client/inner/global.sass new file mode 100644 index 0000000000..6cf30f33ff --- /dev/null +++ b/test/e2e/app-dir/app/app/css/sass-client/inner/global.sass @@ -0,0 +1,3 @@ +#sass-client-page + color: wheat + diff --git a/test/e2e/app-dir/app/app/css/sass-client/inner/global.scss b/test/e2e/app-dir/app/app/css/sass-client/inner/global.scss new file mode 100644 index 0000000000..05c93b6448 --- /dev/null +++ b/test/e2e/app-dir/app/app/css/sass-client/inner/global.scss @@ -0,0 +1,3 @@ +#scss-client-page { + color: tomato; +} diff --git a/test/e2e/app-dir/app/app/css/sass-client/inner/page.js b/test/e2e/app-dir/app/app/css/sass-client/inner/page.js new file mode 100644 index 0000000000..ad208ca881 --- /dev/null +++ b/test/e2e/app-dir/app/app/css/sass-client/inner/page.js @@ -0,0 +1,19 @@ +'use client' + +import './global.scss' +import './global.sass' +import sass from './styles.module.sass' +import scss from './styles.module.scss' + +export default function Page() { + return ( + <> +
+ sass client page +
+
+ scss client page +
+ + ) +} diff --git a/test/e2e/app-dir/app/app/css/sass-client/inner/styles.module.sass b/test/e2e/app-dir/app/app/css/sass-client/inner/styles.module.sass new file mode 100644 index 0000000000..e1f5b5d0e4 --- /dev/null +++ b/test/e2e/app-dir/app/app/css/sass-client/inner/styles.module.sass @@ -0,0 +1,2 @@ +.mod + background-color: indigo diff --git a/test/e2e/app-dir/app/app/css/sass-client/inner/styles.module.scss b/test/e2e/app-dir/app/app/css/sass-client/inner/styles.module.scss new file mode 100644 index 0000000000..e84d60fe47 --- /dev/null +++ b/test/e2e/app-dir/app/app/css/sass-client/inner/styles.module.scss @@ -0,0 +1,3 @@ +.mod { + background-color: aqua; +} diff --git a/test/e2e/app-dir/app/app/css/sass-client/layout.js b/test/e2e/app-dir/app/app/css/sass-client/layout.js new file mode 100644 index 0000000000..fa6713af90 --- /dev/null +++ b/test/e2e/app-dir/app/app/css/sass-client/layout.js @@ -0,0 +1,20 @@ +'use client' + +import './global.scss' +import './global.sass' +import sass from './styles.module.sass' +import scss from './styles.module.scss' + +export default function Layout({ children }) { + return ( + <> +
+ sass client layout +
+
+ scss client layout +
+ {children} + + ) +} diff --git a/test/e2e/app-dir/app/app/css/sass-client/styles.module.sass b/test/e2e/app-dir/app/app/css/sass-client/styles.module.sass new file mode 100644 index 0000000000..725bb78d16 --- /dev/null +++ b/test/e2e/app-dir/app/app/css/sass-client/styles.module.sass @@ -0,0 +1,2 @@ +.mod + background-color: darksalmon diff --git a/test/e2e/app-dir/app/app/css/sass-client/styles.module.scss b/test/e2e/app-dir/app/app/css/sass-client/styles.module.scss new file mode 100644 index 0000000000..185167dd39 --- /dev/null +++ b/test/e2e/app-dir/app/app/css/sass-client/styles.module.scss @@ -0,0 +1,3 @@ +.mod { + background-color: darkred; +} diff --git a/test/e2e/app-dir/app/app/css/sass/global.sass b/test/e2e/app-dir/app/app/css/sass/global.sass new file mode 100644 index 0000000000..f692b6266a --- /dev/null +++ b/test/e2e/app-dir/app/app/css/sass/global.sass @@ -0,0 +1,3 @@ +#sass-server-layout + color: brown + diff --git a/test/e2e/app-dir/app/app/css/sass/global.scss b/test/e2e/app-dir/app/app/css/sass/global.scss new file mode 100644 index 0000000000..1f8677ff44 --- /dev/null +++ b/test/e2e/app-dir/app/app/css/sass/global.scss @@ -0,0 +1,3 @@ +#scss-server-layout { + color: burlywood; +} diff --git a/test/e2e/app-dir/app/app/css/sass/inner/global.sass b/test/e2e/app-dir/app/app/css/sass/inner/global.sass new file mode 100644 index 0000000000..509da5744d --- /dev/null +++ b/test/e2e/app-dir/app/app/css/sass/inner/global.sass @@ -0,0 +1,3 @@ +#sass-server-page + color: wheat + diff --git a/test/e2e/app-dir/app/app/css/sass/inner/global.scss b/test/e2e/app-dir/app/app/css/sass/inner/global.scss new file mode 100644 index 0000000000..8cce88945a --- /dev/null +++ b/test/e2e/app-dir/app/app/css/sass/inner/global.scss @@ -0,0 +1,3 @@ +#scss-server-page { + color: tomato; +} diff --git a/test/e2e/app-dir/app/app/css/sass/inner/page.js b/test/e2e/app-dir/app/app/css/sass/inner/page.js new file mode 100644 index 0000000000..fdb01e5056 --- /dev/null +++ b/test/e2e/app-dir/app/app/css/sass/inner/page.js @@ -0,0 +1,17 @@ +import './global.scss' +import './global.sass' +import sass from './styles.module.sass' +import scss from './styles.module.scss' + +export default function Page() { + return ( + <> +
+ sass server page +
+
+ scss server page +
+ + ) +} diff --git a/test/e2e/app-dir/app/app/css/sass/inner/styles.module.sass b/test/e2e/app-dir/app/app/css/sass/inner/styles.module.sass new file mode 100644 index 0000000000..e1f5b5d0e4 --- /dev/null +++ b/test/e2e/app-dir/app/app/css/sass/inner/styles.module.sass @@ -0,0 +1,2 @@ +.mod + background-color: indigo diff --git a/test/e2e/app-dir/app/app/css/sass/inner/styles.module.scss b/test/e2e/app-dir/app/app/css/sass/inner/styles.module.scss new file mode 100644 index 0000000000..e84d60fe47 --- /dev/null +++ b/test/e2e/app-dir/app/app/css/sass/inner/styles.module.scss @@ -0,0 +1,3 @@ +.mod { + background-color: aqua; +} diff --git a/test/e2e/app-dir/app/app/css/sass/layout.js b/test/e2e/app-dir/app/app/css/sass/layout.js new file mode 100644 index 0000000000..a0b928bdf9 --- /dev/null +++ b/test/e2e/app-dir/app/app/css/sass/layout.js @@ -0,0 +1,18 @@ +import './global.scss' +import './global.sass' +import sass from './styles.module.sass' +import scss from './styles.module.scss' + +export default function Layout({ children }) { + return ( + <> +
+ sass server layout +
+
+ scss server layout +
+ {children} + + ) +} diff --git a/test/e2e/app-dir/app/app/css/sass/styles.module.sass b/test/e2e/app-dir/app/app/css/sass/styles.module.sass new file mode 100644 index 0000000000..725bb78d16 --- /dev/null +++ b/test/e2e/app-dir/app/app/css/sass/styles.module.sass @@ -0,0 +1,2 @@ +.mod + background-color: darksalmon diff --git a/test/e2e/app-dir/app/app/css/sass/styles.module.scss b/test/e2e/app-dir/app/app/css/sass/styles.module.scss new file mode 100644 index 0000000000..185167dd39 --- /dev/null +++ b/test/e2e/app-dir/app/app/css/sass/styles.module.scss @@ -0,0 +1,3 @@ +.mod { + background-color: darkred; +} diff --git a/test/e2e/app-dir/app/app/css/style.css b/test/e2e/app-dir/app/app/css/style.css new file mode 100644 index 0000000000..26994cddda --- /dev/null +++ b/test/e2e/app-dir/app/app/css/style.css @@ -0,0 +1,3 @@ +.server-css { + color: blue; +} diff --git a/test/e2e/app-dir/app/app/css/style.module.css b/test/e2e/app-dir/app/app/css/style.module.css new file mode 100644 index 0000000000..efd81fda05 --- /dev/null +++ b/test/e2e/app-dir/app/app/css/style.module.css @@ -0,0 +1,3 @@ +.server-css { + color: green; +} diff --git a/test/e2e/app-dir/app/app/dashboard/(custom)/deployments/breakdown/page.js b/test/e2e/app-dir/app/app/dashboard/(custom)/deployments/breakdown/page.js new file mode 100644 index 0000000000..b4cdd2011b --- /dev/null +++ b/test/e2e/app-dir/app/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/test/e2e/app-dir/app/app/dashboard/(custom)/layout.js b/test/e2e/app-dir/app/app/dashboard/(custom)/layout.js new file mode 100644 index 0000000000..e861cd39c8 --- /dev/null +++ b/test/e2e/app-dir/app/app/dashboard/(custom)/layout.js @@ -0,0 +1,8 @@ +export default function CustomDashboardRootLayout({ children }) { + return ( + <> +

Custom dashboard

+ {children} + + ) +} diff --git a/test/e2e/app-dir/app/app/dashboard/client-comp-client.jsx b/test/e2e/app-dir/app/app/dashboard/client-comp-client.jsx new file mode 100644 index 0000000000..30ff456074 --- /dev/null +++ b/test/e2e/app-dir/app/app/dashboard/client-comp-client.jsx @@ -0,0 +1,18 @@ +'use 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/test/e2e/app-dir/app/app/dashboard/client-comp.module.css b/test/e2e/app-dir/app/app/dashboard/client-comp.module.css new file mode 100644 index 0000000000..c0ddc6d764 --- /dev/null +++ b/test/e2e/app-dir/app/app/dashboard/client-comp.module.css @@ -0,0 +1,3 @@ +.client { + color: #2e5aea; +} diff --git a/test/e2e/app-dir/app/app/dashboard/deployments/[id]/data.json b/test/e2e/app-dir/app/app/dashboard/deployments/[id]/data.json new file mode 100644 index 0000000000..f2a886f39d --- /dev/null +++ b/test/e2e/app-dir/app/app/dashboard/deployments/[id]/data.json @@ -0,0 +1,3 @@ +{ + "hello": "world" +} diff --git a/test/e2e/app-dir/app/app/dashboard/deployments/[id]/page.js b/test/e2e/app-dir/app/app/dashboard/deployments/[id]/page.js new file mode 100644 index 0000000000..363008ebc1 --- /dev/null +++ b/test/e2e/app-dir/app/app/dashboard/deployments/[id]/page.js @@ -0,0 +1,26 @@ +import { 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, + } +} + +export default function DeploymentsPage(props) { + const data = use(getData(props)) + + return ( + <> +

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

+ + ) +} diff --git a/test/e2e/app-dir/app/app/dashboard/deployments/info/[id]/page.js b/test/e2e/app-dir/app/app/dashboard/deployments/info/[id]/page.js new file mode 100644 index 0000000000..df11944f5a --- /dev/null +++ b/test/e2e/app-dir/app/app/dashboard/deployments/info/[id]/page.js @@ -0,0 +1,9 @@ +export default function Page({ params }) { + return ( + <> +

+ hello from app/dashboard/deployments/info/[id]. ID is: {params.id} +

+ + ) +} diff --git a/test/e2e/app-dir/app/app/dashboard/deployments/info/page.js b/test/e2e/app-dir/app/app/dashboard/deployments/info/page.js new file mode 100644 index 0000000000..b435a2cba7 --- /dev/null +++ b/test/e2e/app-dir/app/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/test/e2e/app-dir/app/app/dashboard/deployments/layout.js b/test/e2e/app-dir/app/app/dashboard/deployments/layout.js new file mode 100644 index 0000000000..ebcc23c1d3 --- /dev/null +++ b/test/e2e/app-dir/app/app/dashboard/deployments/layout.js @@ -0,0 +1,18 @@ +import { 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/test/e2e/app-dir/app/app/dashboard/global.css b/test/e2e/app-dir/app/app/dashboard/global.css new file mode 100644 index 0000000000..a83c888e23 --- /dev/null +++ b/test/e2e/app-dir/app/app/dashboard/global.css @@ -0,0 +1,3 @@ +.dangerous-text { + color: red; +} diff --git a/test/e2e/app-dir/app/app/dashboard/index/dynamic-imports/dynamic-client.js b/test/e2e/app-dir/app/app/dashboard/index/dynamic-imports/dynamic-client.js new file mode 100644 index 0000000000..bfa17f6a14 --- /dev/null +++ b/test/e2e/app-dir/app/app/dashboard/index/dynamic-imports/dynamic-client.js @@ -0,0 +1,9 @@ +'use client' + +import dynamic from 'next/dynamic' + +const Dynamic = dynamic(() => import('../text-dynamic-client')) + +export function NextDynamicClientComponent() { + return +} diff --git a/test/e2e/app-dir/app/app/dashboard/index/dynamic-imports/dynamic-server.js b/test/e2e/app-dir/app/app/dashboard/index/dynamic-imports/dynamic-server.js new file mode 100644 index 0000000000..267a1febc5 --- /dev/null +++ b/test/e2e/app-dir/app/app/dashboard/index/dynamic-imports/dynamic-server.js @@ -0,0 +1,9 @@ +import dynamic from 'next/dynamic' + +const Dynamic = dynamic(() => import('../text-dynamic-server'), { + ssr: false, +}) + +export function NextDynamicServerComponent() { + return +} diff --git a/test/e2e/app-dir/app/app/dashboard/index/dynamic-imports/react-lazy-client.js b/test/e2e/app-dir/app/app/dashboard/index/dynamic-imports/react-lazy-client.js new file mode 100644 index 0000000000..e8010fd28c --- /dev/null +++ b/test/e2e/app-dir/app/app/dashboard/index/dynamic-imports/react-lazy-client.js @@ -0,0 +1,15 @@ +'use client' + +import { useState, lazy } from 'react' + +const Lazy = lazy(() => import('../text-lazy-client.js')) + +export function LazyClientComponent() { + let [state] = useState('use client') + return ( + <> + +

hello from {state}

+ + ) +} diff --git a/test/e2e/app-dir/app/app/dashboard/index/dynamic.module.css b/test/e2e/app-dir/app/app/dashboard/index/dynamic.module.css new file mode 100644 index 0000000000..97af642339 --- /dev/null +++ b/test/e2e/app-dir/app/app/dashboard/index/dynamic.module.css @@ -0,0 +1,3 @@ +.dynamic { + color: blue; +} diff --git a/test/e2e/app-dir/app/app/dashboard/index/lazy.module.css b/test/e2e/app-dir/app/app/dashboard/index/lazy.module.css new file mode 100644 index 0000000000..4369b2c770 --- /dev/null +++ b/test/e2e/app-dir/app/app/dashboard/index/lazy.module.css @@ -0,0 +1,3 @@ +.lazy { + color: purple; +} diff --git a/test/e2e/app-dir/app/app/dashboard/index/page.js b/test/e2e/app-dir/app/app/dashboard/index/page.js new file mode 100644 index 0000000000..c946b76e18 --- /dev/null +++ b/test/e2e/app-dir/app/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/test/e2e/app-dir/app/app/dashboard/index/text-dynamic-client.js b/test/e2e/app-dir/app/app/dashboard/index/text-dynamic-client.js new file mode 100644 index 0000000000..55479cd44b --- /dev/null +++ b/test/e2e/app-dir/app/app/dashboard/index/text-dynamic-client.js @@ -0,0 +1,13 @@ +'use 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/test/e2e/app-dir/app/app/dashboard/index/text-dynamic-server.js b/test/e2e/app-dir/app/app/dashboard/index/text-dynamic-server.js new file mode 100644 index 0000000000..9f87f73b47 --- /dev/null +++ b/test/e2e/app-dir/app/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/test/e2e/app-dir/app/app/dashboard/index/text-lazy-client.js b/test/e2e/app-dir/app/app/dashboard/index/text-lazy-client.js new file mode 100644 index 0000000000..53a7186881 --- /dev/null +++ b/test/e2e/app-dir/app/app/dashboard/index/text-lazy-client.js @@ -0,0 +1,13 @@ +'use client' + +import styles from './lazy.module.css' + +export default function LazyComponent() { + return ( + <> +

+ hello from lazy +

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

hello from app/dashboard/integrations

+ + ) +} diff --git a/test/e2e/app-dir/app/app/dashboard/layout.js b/test/e2e/app-dir/app/app/dashboard/layout.js new file mode 100644 index 0000000000..ff3ee29947 --- /dev/null +++ b/test/e2e/app-dir/app/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/test/e2e/app-dir/app/app/dashboard/page.js b/test/e2e/app-dir/app/app/dashboard/page.js new file mode 100644 index 0000000000..5a3e15c25c --- /dev/null +++ b/test/e2e/app-dir/app/app/dashboard/page.js @@ -0,0 +1,16 @@ +import ClientComp from './client-comp-client' + +export default function DashboardPage(props) { + return ( + <> +

+ hello from app/dashboard +

+

BOLD

+

this is green

+ + + ) +} + +export const runtime = 'experimental-edge' diff --git a/test/e2e/app-dir/app/app/dashboard/page/page.jsx b/test/e2e/app-dir/app/app/dashboard/page/page.jsx new file mode 100644 index 0000000000..d328445b83 --- /dev/null +++ b/test/e2e/app-dir/app/app/dashboard/page/page.jsx @@ -0,0 +1,7 @@ +export default function DashboardPagePage() { + return ( + <> +

hello dashboard/page!

+ + ) +} diff --git a/test/e2e/app-dir/app/app/dashboard/style.css b/test/e2e/app-dir/app/app/dashboard/style.css new file mode 100644 index 0000000000..fa95e11ba9 --- /dev/null +++ b/test/e2e/app-dir/app/app/dashboard/style.css @@ -0,0 +1,3 @@ +.green { + color: green; +} diff --git a/test/e2e/app-dir/app/app/dynamic-pages-route-app-overlap/app-dir/page.js b/test/e2e/app-dir/app/app/dynamic-pages-route-app-overlap/app-dir/page.js new file mode 100644 index 0000000000..2b52933140 --- /dev/null +++ b/test/e2e/app-dir/app/app/dynamic-pages-route-app-overlap/app-dir/page.js @@ -0,0 +1,7 @@ +export default function Page() { + return ( +

+ hello from app/dynamic-pages-route-app-overlap/app-dir/page +

+ ) +} diff --git a/test/e2e/app-dir/app/app/dynamic/[category]/[id]/layout.js b/test/e2e/app-dir/app/app/dynamic/[category]/[id]/layout.js new file mode 100644 index 0000000000..0d09ad0787 --- /dev/null +++ b/test/e2e/app-dir/app/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/test/e2e/app-dir/app/app/dynamic/[category]/[id]/page.js b/test/e2e/app-dir/app/app/dynamic/[category]/[id]/page.js new file mode 100644 index 0000000000..02df487f6d --- /dev/null +++ b/test/e2e/app-dir/app/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/test/e2e/app-dir/app/app/dynamic/[category]/layout.js b/test/e2e/app-dir/app/app/dynamic/[category]/layout.js new file mode 100644 index 0000000000..2744b8a839 --- /dev/null +++ b/test/e2e/app-dir/app/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/test/e2e/app-dir/app/app/dynamic/layout.js b/test/e2e/app-dir/app/app/dynamic/layout.js new file mode 100644 index 0000000000..549e0e30e6 --- /dev/null +++ b/test/e2e/app-dir/app/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/test/e2e/app-dir/app/app/edge-apis/cookies/page.js b/test/e2e/app-dir/app/app/edge-apis/cookies/page.js new file mode 100644 index 0000000000..15fa568241 --- /dev/null +++ b/test/e2e/app-dir/app/app/edge-apis/cookies/page.js @@ -0,0 +1,8 @@ +import { cookies } from 'next/headers' + +export const runtime = 'experimental-edge' + +export default function Page() { + cookies() + return

Hello!

+} diff --git a/test/e2e/app-dir/app/app/error/client-component/error.js b/test/e2e/app-dir/app/app/error/client-component/error.js new file mode 100644 index 0000000000..305cea13a0 --- /dev/null +++ b/test/e2e/app-dir/app/app/error/client-component/error.js @@ -0,0 +1,14 @@ +'use client' + +import styles from './style.module.css' + +export default function ErrorBoundary({ error, reset }) { + return ( + <> +

An error occurred: {error.message}

+ + + ) +} diff --git a/test/e2e/app-dir/app/app/error/client-component/page.js b/test/e2e/app-dir/app/app/error/client-component/page.js new file mode 100644 index 0000000000..a7801e4f11 --- /dev/null +++ b/test/e2e/app-dir/app/app/error/client-component/page.js @@ -0,0 +1,20 @@ +'use 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/test/e2e/app-dir/app/app/error/client-component/style.module.css b/test/e2e/app-dir/app/app/error/client-component/style.module.css new file mode 100644 index 0000000000..4a83fef4cc --- /dev/null +++ b/test/e2e/app-dir/app/app/error/client-component/style.module.css @@ -0,0 +1,3 @@ +.button { + font-size: 50px; +} diff --git a/test/e2e/app-dir/app/app/error/global-error-boundary/page.js b/test/e2e/app-dir/app/app/error/global-error-boundary/page.js new file mode 100644 index 0000000000..a7801e4f11 --- /dev/null +++ b/test/e2e/app-dir/app/app/error/global-error-boundary/page.js @@ -0,0 +1,20 @@ +'use 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/test/e2e/app-dir/app/app/error/server-component/custom-digest/page.js b/test/e2e/app-dir/app/app/error/server-component/custom-digest/page.js new file mode 100644 index 0000000000..3c1af09b5b --- /dev/null +++ b/test/e2e/app-dir/app/app/error/server-component/custom-digest/page.js @@ -0,0 +1,7 @@ +export const revalidate = 0 + +export default function Page() { + const err = new Error('this is a test') + err.digest = 'custom' + throw err +} diff --git a/test/e2e/app-dir/app/app/error/server-component/error.js b/test/e2e/app-dir/app/app/error/server-component/error.js new file mode 100644 index 0000000000..e1089170d0 --- /dev/null +++ b/test/e2e/app-dir/app/app/error/server-component/error.js @@ -0,0 +1,13 @@ +'use client' + +export default function ErrorBoundary({ error, reset }) { + return ( + <> +

{error.message}

+

{error.digest}

+ + + ) +} diff --git a/test/e2e/app-dir/app/app/error/server-component/page.js b/test/e2e/app-dir/app/app/error/server-component/page.js new file mode 100644 index 0000000000..35108577dc --- /dev/null +++ b/test/e2e/app-dir/app/app/error/server-component/page.js @@ -0,0 +1,5 @@ +export const revalidate = 0 + +export default function Page() { + throw new Error('this is a test') +} diff --git a/test/e2e/app-dir/app/app/error/ssr-error-client-component/client-component.js b/test/e2e/app-dir/app/app/error/ssr-error-client-component/client-component.js new file mode 100644 index 0000000000..92a343352a --- /dev/null +++ b/test/e2e/app-dir/app/app/error/ssr-error-client-component/client-component.js @@ -0,0 +1,5 @@ +'use client' + +export default function Page() { + throw new Error('Error during SSR') +} diff --git a/test/e2e/app-dir/app/app/error/ssr-error-client-component/page.js b/test/e2e/app-dir/app/app/error/ssr-error-client-component/page.js new file mode 100644 index 0000000000..5b6bb43c2c --- /dev/null +++ b/test/e2e/app-dir/app/app/error/ssr-error-client-component/page.js @@ -0,0 +1,8 @@ +import ClientComp from './client-component' +import { headers } from 'next/headers' + +export default function Page() { + // Opt-in to SSR. + headers() + return +} diff --git a/test/e2e/app-dir/app/app/extension/page.server.js b/test/e2e/app-dir/app/app/extension/page.server.js new file mode 100644 index 0000000000..6e4c138067 --- /dev/null +++ b/test/e2e/app-dir/app/app/extension/page.server.js @@ -0,0 +1,3 @@ +export default function Page() { + return

Result Page

+} diff --git a/test/e2e/app-dir/app/app/hooks/use-cookies/page.js b/test/e2e/app-dir/app/app/hooks/use-cookies/page.js new file mode 100644 index 0000000000..f8095a3682 --- /dev/null +++ b/test/e2e/app-dir/app/app/hooks/use-cookies/page.js @@ -0,0 +1,17 @@ +import { cookies } from 'next/headers' + +export default function Page() { + const cookiesList = cookies() + const hasCookie = cookiesList.has('use-cookies') + + return ( + <> +

hello from /hooks/use-cookies

+ {hasCookie ? ( + + ) : ( + + )} + + ) +} diff --git a/test/e2e/app-dir/app/app/hooks/use-headers/page.js b/test/e2e/app-dir/app/app/hooks/use-headers/page.js new file mode 100644 index 0000000000..c55642f17f --- /dev/null +++ b/test/e2e/app-dir/app/app/hooks/use-headers/page.js @@ -0,0 +1,19 @@ +import { headers } from 'next/headers' + +export default function Page() { + const headersList = headers() + const hasHeader = headersList.get('x-use-headers') === 'value' + const referer = headersList.get('referer') + + return ( + <> +

hello from /hooks/use-headers

+ {hasHeader ? ( +

Has x-use-headers header

+ ) : ( +

Does not have x-use-headers header

+ )} + {referer &&

Has referer header

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

+ hello from {pathname} +

+ + ) +} diff --git a/test/e2e/app-dir/app/app/hooks/use-pathname/server/page.js b/test/e2e/app-dir/app/app/hooks/use-pathname/server/page.js new file mode 100644 index 0000000000..ef644a55fd --- /dev/null +++ b/test/e2e/app-dir/app/app/hooks/use-pathname/server/page.js @@ -0,0 +1,8 @@ +// import { usePathname } from 'next/navigation' + +export default function Page() { + // This should throw an error. + // usePathname() + + return null +} diff --git a/test/e2e/app-dir/app/app/hooks/use-preview-data/page.js b/test/e2e/app-dir/app/app/hooks/use-preview-data/page.js new file mode 100644 index 0000000000..bff5cf0c25 --- /dev/null +++ b/test/e2e/app-dir/app/app/hooks/use-preview-data/page.js @@ -0,0 +1,18 @@ +import { previewData } from 'next/headers' + +export default function Page() { + const data = previewData() + + 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/test/e2e/app-dir/app/app/hooks/use-router/page.js b/test/e2e/app-dir/app/app/hooks/use-router/page.js new file mode 100644 index 0000000000..cd9dd1a5a2 --- /dev/null +++ b/test/e2e/app-dir/app/app/hooks/use-router/page.js @@ -0,0 +1,19 @@ +'use client' + +import { useRouter } from 'next/navigation' + +export default function Page() { + const router = useRouter() + + return ( + <> +

hello from /hooks/use-router

+ + + ) +} diff --git a/test/e2e/app-dir/app/app/hooks/use-router/server/page.js b/test/e2e/app-dir/app/app/hooks/use-router/server/page.js new file mode 100644 index 0000000000..7a426aed28 --- /dev/null +++ b/test/e2e/app-dir/app/app/hooks/use-router/server/page.js @@ -0,0 +1,8 @@ +// import { useRouter } from 'next/navigation' + +export default function Page() { + // This should throw an error. + // useRouter() + + return null +} diff --git a/test/e2e/app-dir/app/app/hooks/use-router/sub-page/page.js b/test/e2e/app-dir/app/app/hooks/use-router/sub-page/page.js new file mode 100644 index 0000000000..5d4d6fb4b4 --- /dev/null +++ b/test/e2e/app-dir/app/app/hooks/use-router/sub-page/page.js @@ -0,0 +1,5 @@ +'use client' + +export default function Page() { + return

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

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

{params.get('first') ?? 'N/A'}

+

{params.get('second') ?? 'N/A'}

+

{params.get('third') ?? 'N/A'}

+

{params.get('notReal') ?? 'N/A'}

+ + ) +} diff --git a/test/e2e/app-dir/app/app/hooks/use-search-params/server/page.js b/test/e2e/app-dir/app/app/hooks/use-search-params/server/page.js new file mode 100644 index 0000000000..b84536b7ec --- /dev/null +++ b/test/e2e/app-dir/app/app/hooks/use-search-params/server/page.js @@ -0,0 +1,8 @@ +// import { useSearchParams } from 'next/navigation' + +export default function Page() { + // This should throw an error. + // useSearchParams() + + return null +} diff --git a/test/e2e/app-dir/app/app/hooks/use-selected-layout-segment/first/[dynamic]/(group)/second/[...catchall]/page.js b/test/e2e/app-dir/app/app/hooks/use-selected-layout-segment/first/[dynamic]/(group)/second/[...catchall]/page.js new file mode 100644 index 0000000000..5cda7e23ca --- /dev/null +++ b/test/e2e/app-dir/app/app/hooks/use-selected-layout-segment/first/[dynamic]/(group)/second/[...catchall]/page.js @@ -0,0 +1,18 @@ +'use client' + +import { + useSelectedLayoutSegments, + useSelectedLayoutSegment, +} from 'next/navigation' + +export default function Page() { + const selectedLayoutSegments = useSelectedLayoutSegments() + const selectedLayoutSegment = useSelectedLayoutSegment() + + return ( + <> +

{JSON.stringify(selectedLayoutSegments)}

+

{JSON.stringify(selectedLayoutSegment)}

+ + ) +} diff --git a/test/e2e/app-dir/app/app/hooks/use-selected-layout-segment/first/[dynamic]/(group)/second/page.js b/test/e2e/app-dir/app/app/hooks/use-selected-layout-segment/first/[dynamic]/(group)/second/page.js new file mode 100644 index 0000000000..c17431379f --- /dev/null +++ b/test/e2e/app-dir/app/app/hooks/use-selected-layout-segment/first/[dynamic]/(group)/second/page.js @@ -0,0 +1,3 @@ +export default function Page() { + return null +} diff --git a/test/e2e/app-dir/app/app/hooks/use-selected-layout-segment/first/[dynamic]/page.js b/test/e2e/app-dir/app/app/hooks/use-selected-layout-segment/first/[dynamic]/page.js new file mode 100644 index 0000000000..c17431379f --- /dev/null +++ b/test/e2e/app-dir/app/app/hooks/use-selected-layout-segment/first/[dynamic]/page.js @@ -0,0 +1,3 @@ +export default function Page() { + return null +} diff --git a/test/e2e/app-dir/app/app/hooks/use-selected-layout-segment/first/layout.js b/test/e2e/app-dir/app/app/hooks/use-selected-layout-segment/first/layout.js new file mode 100644 index 0000000000..e79045c5ed --- /dev/null +++ b/test/e2e/app-dir/app/app/hooks/use-selected-layout-segment/first/layout.js @@ -0,0 +1,19 @@ +'use client' + +import { + useSelectedLayoutSegments, + useSelectedLayoutSegment, +} from 'next/navigation' + +export default function Layout({ children }) { + const selectedLayoutSegments = useSelectedLayoutSegments() + const selectedLayoutSegment = useSelectedLayoutSegment() + + return ( + <> +

{JSON.stringify(selectedLayoutSegments)}

+

{JSON.stringify(selectedLayoutSegment)}

+ {children} + + ) +} diff --git a/test/e2e/app-dir/app/app/hooks/use-selected-layout-segment/first/page.js b/test/e2e/app-dir/app/app/hooks/use-selected-layout-segment/first/page.js new file mode 100644 index 0000000000..c17431379f --- /dev/null +++ b/test/e2e/app-dir/app/app/hooks/use-selected-layout-segment/first/page.js @@ -0,0 +1,3 @@ +export default function Page() { + return null +} diff --git a/test/e2e/app-dir/app/app/hooks/use-selected-layout-segment/layout.js b/test/e2e/app-dir/app/app/hooks/use-selected-layout-segment/layout.js new file mode 100644 index 0000000000..3eeae83e65 --- /dev/null +++ b/test/e2e/app-dir/app/app/hooks/use-selected-layout-segment/layout.js @@ -0,0 +1,19 @@ +'use client' + +import { + useSelectedLayoutSegments, + useSelectedLayoutSegment, +} from 'next/navigation' + +export default function Layout({ children }) { + const selectedLayoutSegments = useSelectedLayoutSegments() + const selectedLayoutSegment = useSelectedLayoutSegment() + + return ( + <> +

{JSON.stringify(selectedLayoutSegments)}

+

{JSON.stringify(selectedLayoutSegment)}

+ {children} + + ) +} diff --git a/test/e2e/app-dir/app/app/hooks/use-selected-layout-segment/server/page.js b/test/e2e/app-dir/app/app/hooks/use-selected-layout-segment/server/page.js new file mode 100644 index 0000000000..c38d4f5ab1 --- /dev/null +++ b/test/e2e/app-dir/app/app/hooks/use-selected-layout-segment/server/page.js @@ -0,0 +1,9 @@ +// TODO-APP: enable once test is not skipped. +// import { useSelectedLayoutSegment } from 'next/navigation' + +export default function Page() { + // This should throw an error. + // useSelectedLayoutSegment() + + return null +} diff --git a/test/e2e/app-dir/app/app/internal/failure/page.js b/test/e2e/app-dir/app/app/internal/failure/page.js new file mode 100644 index 0000000000..9bd06ec2a3 --- /dev/null +++ b/test/e2e/app-dir/app/app/internal/failure/page.js @@ -0,0 +1,3 @@ +export default function Page() { + return
Failure
+} diff --git a/test/e2e/app-dir/app/app/internal/page.js b/test/e2e/app-dir/app/app/internal/page.js new file mode 100644 index 0000000000..134daec5bb --- /dev/null +++ b/test/e2e/app-dir/app/app/internal/page.js @@ -0,0 +1,23 @@ +import Link from 'next/link' +import Head from 'next/head' + +export default function Page() { + return ( +
+
+ {/* NOTE: next/head will not work in RSC for now but not break either */} + + internal-title + + + Navigate Rewrite + +
+
+ + Navigate Redirect + +
+
+ ) +} diff --git a/test/e2e/app-dir/app/app/internal/success/page.js b/test/e2e/app-dir/app/app/internal/success/page.js new file mode 100644 index 0000000000..90c6aecd4e --- /dev/null +++ b/test/e2e/app-dir/app/app/internal/success/page.js @@ -0,0 +1,3 @@ +export default function Page() { + return
Success
+} diff --git a/test/e2e/app-dir/app/app/layout.js b/test/e2e/app-dir/app/app/layout.js new file mode 100644 index 0000000000..65adafbd7e --- /dev/null +++ b/test/e2e/app-dir/app/app/layout.js @@ -0,0 +1,25 @@ +import { use } from 'react' + +import '../styles/global.css' +import './style.css' + +export const revalidate = 0 + +async function getData() { + return { + world: 'world', + } +} + +export default function Root({ children }) { + const { world } = use(getData()) + + return ( + + + {`hello ${world}`} + + {children} + + ) +} diff --git a/test/e2e/app-dir/app/app/link-hard-push/[id]/page.js b/test/e2e/app-dir/app/app/link-hard-push/[id]/page.js new file mode 100644 index 0000000000..0ce09bfa6a --- /dev/null +++ b/test/e2e/app-dir/app/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/test/e2e/app-dir/app/app/link-hard-replace/[id]/page.js b/test/e2e/app-dir/app/app/link-hard-replace/[id]/page.js new file mode 100644 index 0000000000..6f69c10520 --- /dev/null +++ b/test/e2e/app-dir/app/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/test/e2e/app-dir/app/app/link-hard-replace/page.js b/test/e2e/app-dir/app/app/link-hard-replace/page.js new file mode 100644 index 0000000000..0f099a798f --- /dev/null +++ b/test/e2e/app-dir/app/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/test/e2e/app-dir/app/app/link-hard-replace/subpage/page.js b/test/e2e/app-dir/app/app/link-hard-replace/subpage/page.js new file mode 100644 index 0000000000..ecb43519aa --- /dev/null +++ b/test/e2e/app-dir/app/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/test/e2e/app-dir/app/app/link-soft-push/page.js b/test/e2e/app-dir/app/app/link-soft-push/page.js new file mode 100644 index 0000000000..a83690e8b5 --- /dev/null +++ b/test/e2e/app-dir/app/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/test/e2e/app-dir/app/app/link-soft-replace/page.js b/test/e2e/app-dir/app/app/link-soft-replace/page.js new file mode 100644 index 0000000000..26a535bb1a --- /dev/null +++ b/test/e2e/app-dir/app/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/test/e2e/app-dir/app/app/link-soft-replace/subpage/page.js b/test/e2e/app-dir/app/app/link-soft-replace/subpage/page.js new file mode 100644 index 0000000000..b1fe8890da --- /dev/null +++ b/test/e2e/app-dir/app/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/test/e2e/app-dir/app/app/link-with-as/page.js b/test/e2e/app-dir/app/app/link-with-as/page.js new file mode 100644 index 0000000000..8e3eff7d0c --- /dev/null +++ b/test/e2e/app-dir/app/app/link-with-as/page.js @@ -0,0 +1,15 @@ +import Link from 'next/link' + +export default function Page() { + return ( + <> + + To info 123 + + + ) +} diff --git a/test/e2e/app-dir/app/app/linking/about/page.js b/test/e2e/app-dir/app/app/linking/about/page.js new file mode 100644 index 0000000000..dfc1aee084 --- /dev/null +++ b/test/e2e/app-dir/app/app/linking/about/page.js @@ -0,0 +1,3 @@ +export default function AboutPage() { + return

About page

+} diff --git a/test/e2e/app-dir/app/app/linking/layout.js b/test/e2e/app-dir/app/app/linking/layout.js new file mode 100644 index 0000000000..f836cd6b0c --- /dev/null +++ b/test/e2e/app-dir/app/app/linking/layout.js @@ -0,0 +1,15 @@ +import Link from 'next/link' + +export default function Layout({ children }) { + return ( + <> +
+ +
+ {children} + + ) +} diff --git a/test/e2e/app-dir/app/app/linking/page.js b/test/e2e/app-dir/app/app/linking/page.js new file mode 100644 index 0000000000..ee48946c44 --- /dev/null +++ b/test/e2e/app-dir/app/app/linking/page.js @@ -0,0 +1,3 @@ +export default function Page() { + return

Home page

+} diff --git a/test/e2e/app-dir/app/app/loading-bug/[categorySlug]/loading.js b/test/e2e/app-dir/app/app/loading-bug/[categorySlug]/loading.js new file mode 100644 index 0000000000..1ddb4d6b40 --- /dev/null +++ b/test/e2e/app-dir/app/app/loading-bug/[categorySlug]/loading.js @@ -0,0 +1,5 @@ +import './style.css' + +export default function Loading() { + return

Loading...

+} diff --git a/test/e2e/app-dir/app/app/loading-bug/[categorySlug]/page.js b/test/e2e/app-dir/app/app/loading-bug/[categorySlug]/page.js new file mode 100644 index 0000000000..ade6718153 --- /dev/null +++ b/test/e2e/app-dir/app/app/loading-bug/[categorySlug]/page.js @@ -0,0 +1,15 @@ +// @ts-ignore +import { 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/test/e2e/app-dir/app/app/loading-bug/[categorySlug]/style.css b/test/e2e/app-dir/app/app/loading-bug/[categorySlug]/style.css new file mode 100644 index 0000000000..60f1eab971 --- /dev/null +++ b/test/e2e/app-dir/app/app/loading-bug/[categorySlug]/style.css @@ -0,0 +1,3 @@ +body { + color: red; +} diff --git a/test/e2e/app-dir/app/app/navigation/link.js b/test/e2e/app-dir/app/app/navigation/link.js new file mode 100644 index 0000000000..a0ffc24e69 --- /dev/null +++ b/test/e2e/app-dir/app/app/navigation/link.js @@ -0,0 +1,27 @@ +'use client' + +import { useRouter } from 'next/navigation' +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.refresh() + }) + }} + > + {children} + + ) +} diff --git a/test/e2e/app-dir/app/app/navigation/page.js b/test/e2e/app-dir/app/app/navigation/page.js new file mode 100644 index 0000000000..3cd67c44d3 --- /dev/null +++ b/test/e2e/app-dir/app/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

+ + Cookies + + + Headers + + + ) +} diff --git a/test/e2e/app-dir/app/app/nested-navigation/CategoryNav.js b/test/e2e/app-dir/app/app/nested-navigation/CategoryNav.js new file mode 100644 index 0000000000..506b8204f6 --- /dev/null +++ b/test/e2e/app-dir/app/app/nested-navigation/CategoryNav.js @@ -0,0 +1,28 @@ +'use client' + +import { TabNavItem } from './TabNavItem' +import { useSelectedLayoutSegments } from 'next/navigation' + +const CategoryNav = ({ categories }) => { + const selectedLayoutSegment = useSelectedLayoutSegments() + + return ( +
+ + Home + + + {categories.map((item) => ( + + {item.name} + + ))} +
+ ) +} + +export default CategoryNav diff --git a/test/e2e/app-dir/app/app/nested-navigation/TabNavItem.js b/test/e2e/app-dir/app/app/nested-navigation/TabNavItem.js new file mode 100644 index 0000000000..3e74c679f9 --- /dev/null +++ b/test/e2e/app-dir/app/app/nested-navigation/TabNavItem.js @@ -0,0 +1,9 @@ +import Link from 'next/link' + +export const TabNavItem = ({ children, href }) => { + return ( + + {children} + + ) +} diff --git a/test/e2e/app-dir/app/app/nested-navigation/[categorySlug]/SubCategoryNav.js b/test/e2e/app-dir/app/app/nested-navigation/[categorySlug]/SubCategoryNav.js new file mode 100644 index 0000000000..83b738afdd --- /dev/null +++ b/test/e2e/app-dir/app/app/nested-navigation/[categorySlug]/SubCategoryNav.js @@ -0,0 +1,31 @@ +'use client' + +import { TabNavItem } from '../TabNavItem' +import { useSelectedLayoutSegments } from 'next/navigation' + +const SubCategoryNav = ({ category }) => { + const selectedLayoutSegment = useSelectedLayoutSegments() + + return ( +
+ + All + + + {category.items.map((item) => ( + + {item.name} + + ))} +
+ ) +} + +export default SubCategoryNav diff --git a/test/e2e/app-dir/app/app/nested-navigation/[categorySlug]/[subCategorySlug]/page.js b/test/e2e/app-dir/app/app/nested-navigation/[categorySlug]/[subCategorySlug]/page.js new file mode 100644 index 0000000000..87b6421410 --- /dev/null +++ b/test/e2e/app-dir/app/app/nested-navigation/[categorySlug]/[subCategorySlug]/page.js @@ -0,0 +1,11 @@ +import { 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/test/e2e/app-dir/app/app/nested-navigation/[categorySlug]/layout.js b/test/e2e/app-dir/app/app/nested-navigation/[categorySlug]/layout.js new file mode 100644 index 0000000000..7e4117a4c6 --- /dev/null +++ b/test/e2e/app-dir/app/app/nested-navigation/[categorySlug]/layout.js @@ -0,0 +1,14 @@ +import { 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/test/e2e/app-dir/app/app/nested-navigation/[categorySlug]/page.js b/test/e2e/app-dir/app/app/nested-navigation/[categorySlug]/page.js new file mode 100644 index 0000000000..2b8e7512dc --- /dev/null +++ b/test/e2e/app-dir/app/app/nested-navigation/[categorySlug]/page.js @@ -0,0 +1,9 @@ +import { 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/test/e2e/app-dir/app/app/nested-navigation/getCategories.js b/test/e2e/app-dir/app/app/nested-navigation/getCategories.js new file mode 100644 index 0000000000..c5da031c72 --- /dev/null +++ b/test/e2e/app-dir/app/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/test/e2e/app-dir/app/app/nested-navigation/layout.js b/test/e2e/app-dir/app/app/nested-navigation/layout.js new file mode 100644 index 0000000000..0eac112eea --- /dev/null +++ b/test/e2e/app-dir/app/app/nested-navigation/layout.js @@ -0,0 +1,17 @@ +import { 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/test/e2e/app-dir/app/app/nested-navigation/page.js b/test/e2e/app-dir/app/app/nested-navigation/page.js new file mode 100644 index 0000000000..9833f2b17c --- /dev/null +++ b/test/e2e/app-dir/app/app/nested-navigation/page.js @@ -0,0 +1,3 @@ +export default function Page() { + return

Home

+} diff --git a/test/e2e/app-dir/app/app/not-found/client-side/page.js b/test/e2e/app-dir/app/app/not-found/client-side/page.js new file mode 100644 index 0000000000..17f0fe828d --- /dev/null +++ b/test/e2e/app-dir/app/app/not-found/client-side/page.js @@ -0,0 +1,17 @@ +'use client' + +import { notFound } from 'next/navigation' +import React from 'react' + +export default function Page() { + const [notFoundEnabled, enableNotFound] = React.useState(false) + + if (notFoundEnabled) { + notFound() + } + return ( + + ) +} diff --git a/test/e2e/app-dir/app/app/not-found/clientcomponent/client-component.js b/test/e2e/app-dir/app/app/not-found/clientcomponent/client-component.js new file mode 100644 index 0000000000..f75ceca70c --- /dev/null +++ b/test/e2e/app-dir/app/app/not-found/clientcomponent/client-component.js @@ -0,0 +1,7 @@ +'use client' +import { notFound } from 'next/navigation' + +export default function ClientComp() { + notFound() + return <> +} diff --git a/test/e2e/app-dir/app/app/not-found/clientcomponent/page.js b/test/e2e/app-dir/app/app/not-found/clientcomponent/page.js new file mode 100644 index 0000000000..0664907792 --- /dev/null +++ b/test/e2e/app-dir/app/app/not-found/clientcomponent/page.js @@ -0,0 +1,9 @@ +// TODO-APP: enable when flight error serialization is implemented +import ClientComp from './client-component' +import { headers } from 'next/headers' + +export default function Page() { + // Opt-in to SSR. + headers() + return +} diff --git a/test/e2e/app-dir/app/app/not-found/not-found.js b/test/e2e/app-dir/app/app/not-found/not-found.js new file mode 100644 index 0000000000..eab732a108 --- /dev/null +++ b/test/e2e/app-dir/app/app/not-found/not-found.js @@ -0,0 +1,9 @@ +import styles from './style.module.css' + +export default function NotFound() { + return ( +

+ Not Found! +

+ ) +} diff --git a/test/e2e/app-dir/app/app/not-found/servercomponent/page.js b/test/e2e/app-dir/app/app/not-found/servercomponent/page.js new file mode 100644 index 0000000000..180403e6e0 --- /dev/null +++ b/test/e2e/app-dir/app/app/not-found/servercomponent/page.js @@ -0,0 +1,7 @@ +// TODO-APP: enable when flight error serialization is implemented +import { notFound } from 'next/navigation' + +export default function Page() { + notFound() + return <> +} diff --git a/test/e2e/app-dir/app/app/not-found/style.module.css b/test/e2e/app-dir/app/app/not-found/style.module.css new file mode 100644 index 0000000000..c6dd2c88fa --- /dev/null +++ b/test/e2e/app-dir/app/app/not-found/style.module.css @@ -0,0 +1,3 @@ +.red { + color: red; +} diff --git a/test/e2e/app-dir/app/app/pages-linking/page.js b/test/e2e/app-dir/app/app/pages-linking/page.js new file mode 100644 index 0000000000..d32b739de9 --- /dev/null +++ b/test/e2e/app-dir/app/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/test/e2e/app-dir/app/app/parallel/(new)/@baz/nested-2/page.js b/test/e2e/app-dir/app/app/parallel/(new)/@baz/nested-2/page.js new file mode 100644 index 0000000000..05c172f81b --- /dev/null +++ b/test/e2e/app-dir/app/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/test/e2e/app-dir/app/app/parallel/(new)/layout.js b/test/e2e/app-dir/app/app/parallel/(new)/layout.js new file mode 100644 index 0000000000..491d122a96 --- /dev/null +++ b/test/e2e/app-dir/app/app/parallel/(new)/layout.js @@ -0,0 +1,10 @@ +export default function Layout({ baz }) { + return ( +
+ parallel/(new)/layout: +
+ {baz} +
+
+ ) +} diff --git a/test/e2e/app-dir/app/app/parallel/@bar/nested/@a/page.js b/test/e2e/app-dir/app/app/parallel/@bar/nested/@a/page.js new file mode 100644 index 0000000000..d1c6fc71e1 --- /dev/null +++ b/test/e2e/app-dir/app/app/parallel/@bar/nested/@a/page.js @@ -0,0 +1,3 @@ +export default function Page() { + return
parallel/@bar/nested/@a/page
+} diff --git a/test/e2e/app-dir/app/app/parallel/@bar/nested/@b/page.js b/test/e2e/app-dir/app/app/parallel/@bar/nested/@b/page.js new file mode 100644 index 0000000000..15ef0b7a39 --- /dev/null +++ b/test/e2e/app-dir/app/app/parallel/@bar/nested/@b/page.js @@ -0,0 +1,3 @@ +export default function Page() { + return
parallel/@bar/nested/@b/page
+} diff --git a/test/e2e/app-dir/app/app/parallel/@bar/nested/layout.js b/test/e2e/app-dir/app/app/parallel/@bar/nested/layout.js new file mode 100644 index 0000000000..4ba7b39938 --- /dev/null +++ b/test/e2e/app-dir/app/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/test/e2e/app-dir/app/app/parallel/@bar/page.js b/test/e2e/app-dir/app/app/parallel/@bar/page.js new file mode 100644 index 0000000000..568f5ed064 --- /dev/null +++ b/test/e2e/app-dir/app/app/parallel/@bar/page.js @@ -0,0 +1,3 @@ +export default function Page() { + return
Bar
+} diff --git a/test/e2e/app-dir/app/app/parallel/@foo/nested/@a/page.js b/test/e2e/app-dir/app/app/parallel/@foo/nested/@a/page.js new file mode 100644 index 0000000000..31c604844a --- /dev/null +++ b/test/e2e/app-dir/app/app/parallel/@foo/nested/@a/page.js @@ -0,0 +1,3 @@ +export default function Page() { + return
parallel/@foo/nested/@a/page
+} diff --git a/test/e2e/app-dir/app/app/parallel/@foo/nested/@b/page.js b/test/e2e/app-dir/app/app/parallel/@foo/nested/@b/page.js new file mode 100644 index 0000000000..79481da1a0 --- /dev/null +++ b/test/e2e/app-dir/app/app/parallel/@foo/nested/@b/page.js @@ -0,0 +1,3 @@ +export default function Page() { + return
parallel/@foo/nested/@b/page
+} diff --git a/test/e2e/app-dir/app/app/parallel/@foo/nested/layout.js b/test/e2e/app-dir/app/app/parallel/@foo/nested/layout.js new file mode 100644 index 0000000000..19d532a374 --- /dev/null +++ b/test/e2e/app-dir/app/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/test/e2e/app-dir/app/app/parallel/@foo/page.js b/test/e2e/app-dir/app/app/parallel/@foo/page.js new file mode 100644 index 0000000000..9e30ce2b2b --- /dev/null +++ b/test/e2e/app-dir/app/app/parallel/@foo/page.js @@ -0,0 +1,3 @@ +export default function Page() { + return
Foo
+} diff --git a/test/e2e/app-dir/app/app/parallel/layout.js b/test/e2e/app-dir/app/app/parallel/layout.js new file mode 100644 index 0000000000..a1474ba6d0 --- /dev/null +++ b/test/e2e/app-dir/app/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/test/e2e/app-dir/app/app/parallel/nested/page.js b/test/e2e/app-dir/app/app/parallel/nested/page.js new file mode 100644 index 0000000000..d7992d7198 --- /dev/null +++ b/test/e2e/app-dir/app/app/parallel/nested/page.js @@ -0,0 +1,3 @@ +export default function Page() { + return
parallel/nested/page
+} diff --git a/test/e2e/app-dir/app/app/parallel/style.css b/test/e2e/app-dir/app/app/parallel/style.css new file mode 100644 index 0000000000..723ece56ac --- /dev/null +++ b/test/e2e/app-dir/app/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/test/e2e/app-dir/app/app/param-and-query/[slug]/page.js b/test/e2e/app-dir/app/app/param-and-query/[slug]/page.js new file mode 100644 index 0000000000..fab82d7a8a --- /dev/null +++ b/test/e2e/app-dir/app/app/param-and-query/[slug]/page.js @@ -0,0 +1,13 @@ +'use client' + +export default function Page({ params, searchParams }) { + return ( +

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

+ ) +} diff --git a/test/e2e/app-dir/app/app/partial-match-[id]/page.js b/test/e2e/app-dir/app/app/partial-match-[id]/page.js new file mode 100644 index 0000000000..33429192f2 --- /dev/null +++ b/test/e2e/app-dir/app/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/test/e2e/app-dir/app/app/react-cache/client-component/page.js b/test/e2e/app-dir/app/app/react-cache/client-component/page.js new file mode 100644 index 0000000000..5cca1ce3ad --- /dev/null +++ b/test/e2e/app-dir/app/app/react-cache/client-component/page.js @@ -0,0 +1,16 @@ +'use client' +import { cache } from 'react' + +const getRandomMemoized = cache(() => Math.random()) + +export default function Page() { + const val1 = getRandomMemoized() + const val2 = getRandomMemoized() + return ( + <> +

React Cache Client Component

+

{val1}

+

{val2}

+ + ) +} diff --git a/test/e2e/app-dir/app/app/react-cache/page.js b/test/e2e/app-dir/app/app/react-cache/page.js new file mode 100644 index 0000000000..14049016a7 --- /dev/null +++ b/test/e2e/app-dir/app/app/react-cache/page.js @@ -0,0 +1,17 @@ +import Link from 'next/link' +export default function Page() { + return ( + <> +

+ + To Server Component + +

+

+ + To Client Component + +

+ + ) +} diff --git a/test/e2e/app-dir/app/app/react-cache/server-component/page.js b/test/e2e/app-dir/app/app/react-cache/server-component/page.js new file mode 100644 index 0000000000..94ecf7429b --- /dev/null +++ b/test/e2e/app-dir/app/app/react-cache/server-component/page.js @@ -0,0 +1,15 @@ +import { cache } from 'react' + +const getRandomMemoized = cache(() => Math.random()) + +export default function Page() { + const val1 = getRandomMemoized() + const val2 = getRandomMemoized() + return ( + <> +

React Cache Server Component

+

{val1}

+

{val2}

+ + ) +} diff --git a/test/e2e/app-dir/app/app/react-fetch/page.js b/test/e2e/app-dir/app/app/react-fetch/page.js new file mode 100644 index 0000000000..59e6d2a8bd --- /dev/null +++ b/test/e2e/app-dir/app/app/react-fetch/page.js @@ -0,0 +1,17 @@ +import Link from 'next/link' +export default function Page() { + return ( + <> +

+ + To Server Component + +

+

+ + To Client Component + +

+ + ) +} diff --git a/test/e2e/app-dir/app/app/react-fetch/server-component/page.js b/test/e2e/app-dir/app/app/react-fetch/server-component/page.js new file mode 100644 index 0000000000..a1ae02f41e --- /dev/null +++ b/test/e2e/app-dir/app/app/react-fetch/server-component/page.js @@ -0,0 +1,18 @@ +async function getRandomMemoizedByFetch() { + const res = await fetch( + 'https://next-data-api-endpoint.vercel.app/api/random' + ) + return res.text() +} + +export default async function Page() { + const val1 = await getRandomMemoizedByFetch() + const val2 = await getRandomMemoizedByFetch() + return ( + <> +

React Fetch Server Component

+

{val1}

+

{val2}

+ + ) +} diff --git a/test/e2e/app-dir/app/app/redirect/client-side/page.js b/test/e2e/app-dir/app/app/redirect/client-side/page.js new file mode 100644 index 0000000000..1e05432703 --- /dev/null +++ b/test/e2e/app-dir/app/app/redirect/client-side/page.js @@ -0,0 +1,19 @@ +'use client' + +import { redirect } from 'next/navigation' +import React from 'react' + +export default function Page() { + const [shouldRedirect, setShouldRedirect] = React.useState(false) + + if (shouldRedirect) { + redirect('/redirect/result') + } + return ( + + ) +} diff --git a/test/e2e/app-dir/app/app/redirect/clientcomponent/client-component.js b/test/e2e/app-dir/app/app/redirect/clientcomponent/client-component.js new file mode 100644 index 0000000000..8539aedf94 --- /dev/null +++ b/test/e2e/app-dir/app/app/redirect/clientcomponent/client-component.js @@ -0,0 +1,7 @@ +'use client' +import { redirect } from 'next/navigation' + +export default function ClientComp() { + redirect('/redirect/result') + return <> +} diff --git a/test/e2e/app-dir/app/app/redirect/clientcomponent/page.js b/test/e2e/app-dir/app/app/redirect/clientcomponent/page.js new file mode 100644 index 0000000000..5b6bb43c2c --- /dev/null +++ b/test/e2e/app-dir/app/app/redirect/clientcomponent/page.js @@ -0,0 +1,8 @@ +import ClientComp from './client-component' +import { headers } from 'next/headers' + +export default function Page() { + // Opt-in to SSR. + headers() + return +} diff --git a/test/e2e/app-dir/app/app/redirect/next-config-redirect/page.js b/test/e2e/app-dir/app/app/redirect/next-config-redirect/page.js new file mode 100644 index 0000000000..b2f96fb405 --- /dev/null +++ b/test/e2e/app-dir/app/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/test/e2e/app-dir/app/app/redirect/next-middleware-redirect/page.js b/test/e2e/app-dir/app/app/redirect/next-middleware-redirect/page.js new file mode 100644 index 0000000000..7323ef64ad --- /dev/null +++ b/test/e2e/app-dir/app/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/test/e2e/app-dir/app/app/redirect/result/page.js b/test/e2e/app-dir/app/app/redirect/result/page.js new file mode 100644 index 0000000000..6e4c138067 --- /dev/null +++ b/test/e2e/app-dir/app/app/redirect/result/page.js @@ -0,0 +1,3 @@ +export default function Page() { + return

Result Page

+} diff --git a/test/e2e/app-dir/app/app/redirect/servercomponent/page.js b/test/e2e/app-dir/app/app/redirect/servercomponent/page.js new file mode 100644 index 0000000000..f89eb0874b --- /dev/null +++ b/test/e2e/app-dir/app/app/redirect/servercomponent/page.js @@ -0,0 +1,6 @@ +import { redirect } from 'next/navigation' + +export default function Page() { + redirect('/redirect/result') + return <> +} diff --git a/test/e2e/app-dir/app/app/rewrites/page.js b/test/e2e/app-dir/app/app/rewrites/page.js new file mode 100644 index 0000000000..eeae4be136 --- /dev/null +++ b/test/e2e/app-dir/app/app/rewrites/page.js @@ -0,0 +1,9 @@ +import Link from 'next/link' + +export default function Page() { + return ( + + To Dashboard Rewritten + + ) +} diff --git a/test/e2e/app-dir/app/app/same-layout/first/page.js b/test/e2e/app-dir/app/app/same-layout/first/page.js new file mode 100644 index 0000000000..2c2ebede77 --- /dev/null +++ b/test/e2e/app-dir/app/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/test/e2e/app-dir/app/app/same-layout/layout.js b/test/e2e/app-dir/app/app/same-layout/layout.js new file mode 100644 index 0000000000..42734ad725 --- /dev/null +++ b/test/e2e/app-dir/app/app/same-layout/layout.js @@ -0,0 +1,10 @@ +import { nanoid } from 'nanoid' + +export default function Layout({ children }) { + return ( + <> +

{nanoid()}

+
{children}
+ + ) +} diff --git a/test/e2e/app-dir/app/app/same-layout/second/page.js b/test/e2e/app-dir/app/app/same-layout/second/page.js new file mode 100644 index 0000000000..9eefb7df26 --- /dev/null +++ b/test/e2e/app-dir/app/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/test/e2e/app-dir/app/app/script/client.js b/test/e2e/app-dir/app/app/script/client.js new file mode 100644 index 0000000000..5372bb0d48 --- /dev/null +++ b/test/e2e/app-dir/app/app/script/client.js @@ -0,0 +1,15 @@ +'use client' + +export default function Client() { + if (typeof window !== 'undefined') { + window._script_order = window._script_order || [] + + if (window._script_order[window._script_order.length - 1] !== 'render') { + window._script_order.push('render') + } + + console.log(window._script_order) + } + + return null +} diff --git a/test/e2e/app-dir/app/app/script/page.js b/test/e2e/app-dir/app/app/script/page.js new file mode 100644 index 0000000000..2ee6b4c273 --- /dev/null +++ b/test/e2e/app-dir/app/app/script/page.js @@ -0,0 +1,30 @@ +import Script from 'next/script' + +import Client from './client' + +export default function Page() { + return ( +
+

next/script

+ + + "'`) + + 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('