diff --git a/.alexrc b/.alexrc index 1f1de4b4382a9..d50d2433b6386 100644 --- a/.alexrc +++ b/.alexrc @@ -18,6 +18,7 @@ "host-hostess", "invalid", "remains", + "special", "white" ] } diff --git a/packages/next-swc/.cargo/config.toml b/.cargo/config.toml similarity index 100% rename from packages/next-swc/.cargo/config.toml rename to .cargo/config.toml diff --git a/packages/next-swc/.config/nextest.toml b/.config/nextest.toml similarity index 100% rename from packages/next-swc/.config/nextest.toml rename to .config/nextest.toml diff --git a/.eslintignore b/.eslintignore index 2ccbb94acecb3..1909ecb580b1a 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,6 +1,7 @@ node_modules **/.next/** **/_next/** +**/.vscode/** **/dist/** e2e-tests/** examples/with-eslint/** diff --git a/.eslintrc.json b/.eslintrc.json index b40e889bddedd..b0e16775944ce 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -63,7 +63,7 @@ "@typescript-eslint/consistent-type-assertions": "warn", "no-array-constructor": "off", "@typescript-eslint/no-array-constructor": "warn", - "@typescript-eslint/no-namespace": "error", + "@typescript-eslint/no-namespace": "off", "no-use-before-define": "off", "@typescript-eslint/no-use-before-define": [ "warn", diff --git a/.github/.kodiak.toml b/.github/.kodiak.toml index ee535afe225c9..c993778527988 100644 --- a/.github/.kodiak.toml +++ b/.github/.kodiak.toml @@ -6,7 +6,7 @@ automerge_label = "ready to land" require_automerge_label = false method = "squash" delete_branch_on_merge = true -optimistic_updates = true +optimistic_updates = false prioritize_ready_to_merge = true notify_on_conflict = false @@ -16,4 +16,4 @@ body = "pull_request_body" include_coauthors= true include_pr_number = true body_type = "markdown" -strip_html_comments = true +strip_html_comments = true \ No newline at end of file diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index fe3e428898b69..656d628179b73 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -12,18 +12,23 @@ /.prettier* @vercel/next-js @leerob /*.md @vercel/next-js @leerob /packages/create-next-app/ @vercel/next-js +/pnpm-lock.yaml @vercel/next-js @vercel/web-tooling + +# Image Component (@styfle) + +/**/*image* @timneutkens @ijjk @shuding @styfle @huozhi +/**/*image*/** @timneutkens @ijjk @shuding @styfle @huozhi +/packages/next/client/use-intersection.tsx @timneutkens @ijjk @shuding @styfle +/packages/next/server/lib/squoosh/ @timneutkens @ijjk @shuding @styfle +/packages/next/server/serve-static.ts @timneutkens @ijjk @shuding @styfle @huozhi +/packages/next/server/config.ts @timneutkens @ijjk @shuding @styfle @huozhi # Tooling & Telemetry /packages/next/src/build/ @timneutkens @ijjk @shuding @vercel/web-tooling @huozhi /packages/next/src/telemetry/ @timneutkens @ijjk @shuding @padmaia /packages/next-swc/ @timneutkens @ijjk @shuding @vercel/web-tooling - -# Image Component (@styfle) - -/**/*image* @timneutkens @ijjk @shuding @styfle -/**/*image*/** @timneutkens @ijjk @shuding @styfle -/packages/next/client/use-intersection.tsx @timneutkens @ijjk @shuding @styfle -/packages/next/server/lib/squoosh/ @timneutkens @ijjk @shuding @styfle -/packages/next/server/serve-static.ts @timneutkens @ijjk @shuding @styfle -/packages/next/server/config.ts @timneutkens @ijjk @shuding @styfle +Cargo.toml @timneutkens @ijjk @shuding @vercel/web-tooling +Cargo.lock @timneutkens @ijjk @shuding @vercel/web-tooling +/.cargo/config.toml @timneutkens @ijjk @shuding @vercel/web-tooling +/.config/nextest.toml @timneutkens @ijjk @shuding @vercel/web-tooling \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/1.bug_report.yml b/.github/ISSUE_TEMPLATE/1.bug_report.yml index 1461c7aa28d47..28340adfd5cb7 100644 --- a/.github/ISSUE_TEMPLATE/1.bug_report.yml +++ b/.github/ISSUE_TEMPLATE/1.bug_report.yml @@ -32,28 +32,29 @@ body: - 'Data fetching (gS(S)P, getInitialProps)' - 'Dynamic imports (next/dynamic)' - 'ESLint (eslint-config-next)' - - 'Font optimization (@next/font)' + - 'Font optimization (next/font)' - 'Image optimization (next/image, next/legacy/image)' - 'Internationalization (i18n)' - 'Jest (next/jest)' - 'MDX (@next/mdx)' - 'Metadata (metadata, generateMetadata, next/head, head.js)' - 'Middleware / Edge (API routes, runtime)' + - 'Operating System (Windows, MacOS, Linux)' - 'Package manager (npm, pnpm, Yarn)' - 'Routing (next/router, next/navigation, next/link)' - 'Script optimization (next/script)' - 'Standalone mode (output: "standalone")' - - 'Static HTML Export (next export)' + - 'Static HTML Export (output: "export")' - 'SWC minifier (swcMinify: true)' - 'SWC transpilation' - 'Turbopack (--turbo)' - - 'TypeScript' + - 'TypeScript (plugin, built-in types)' - type: input attributes: label: Link to the code that reproduces this issue description: | - A link to a GitHub repository, a [CodeSandbox](https://codesandbox.io/p/sandbox/github/vercel/next.js/tree/canary/examples/reproduction-template) or a [StackBlitz](https://stackblitz.com/fork/github/vercel/next.js/tree/canary/examples/reproduction-template) minimal reproduction. Minimal reproductions should be created from our [bug report template with `npx create-next-app -e reproduction-template`](https://github.com/vercel/next.js/tree/canary/examples/reproduction-template) and should include only changes that contribute to the issue. - To report an App Router related issue, you can use these templates: [CodeSandbox](https://codesandbox.io/p/sandbox/github/vercel/next.js/tree/canary/examples/reproduction-template-app-dir), [StackBlitz](https://stackblitz.com/fork/github/vercel/next.js/tree/canary/examples/reproduction-template-app-dir) or [`npx create-next-app -e reproduction-template-app-dir`](https://github.com/vercel/next.js/tree/canary/examples/reproduction-template-app-dir) + A link to a [GitHub repository](https://github.com/vercel/next.js/tree/canary/examples/reproduction-template) or a [CodeSandbox](https://codesandbox.io/p/sandbox/github/vercel/next.js/tree/canary/examples/reproduction-template) minimal reproduction. Minimal reproductions should be created from our [bug report template with `npx create-next-app -e reproduction-template`](https://github.com/vercel/next.js/tree/canary/examples/reproduction-template) and should include only changes that contribute to the issue. + To report an App Router related issue, you can use these templates: [CodeSandbox](https://codesandbox.io/p/sandbox/github/vercel/next.js/tree/canary/examples/reproduction-template-app-dir) or [`npx create-next-app -e reproduction-template-app-dir`](https://github.com/vercel/next.js/tree/canary/examples/reproduction-template-app-dir) validations: required: true - type: textarea @@ -90,4 +91,4 @@ body: - type: input attributes: label: How are you deploying your application? (if relevant) - description: 'For example: next start, next export, Vercel, Other platform' + description: 'For example: next start, Vercel, Other platform' diff --git a/.github/ISSUE_TEMPLATE/2.example_bug_report.yml b/.github/ISSUE_TEMPLATE/2.example_bug_report.yml index 2416ce6857473..04c4d53cbb9bb 100644 --- a/.github/ISSUE_TEMPLATE/2.example_bug_report.yml +++ b/.github/ISSUE_TEMPLATE/2.example_bug_report.yml @@ -34,7 +34,7 @@ body: - type: input attributes: label: How are you deploying your application? (if relevant) - description: 'For example: next start, next export, Vercel, Other platform' + description: 'For example: next start, Vercel, Other platform' - type: textarea attributes: label: Describe the Bug diff --git a/.github/actions/issue-validator/canary.md b/.github/actions/issue-validator/canary.md index 9f27fff657478..1f8d0fd59c7fa 100644 --- a/.github/actions/issue-validator/canary.md +++ b/.github/actions/issue-validator/canary.md @@ -10,7 +10,7 @@ If the issue does not reproduce with the `canary` version, then it has already b ### **How can I quickly verify if my issue has been fixed in `canary`?** -The safest way is to install `next@canary` in your project and test it, but you can also search through [closed Next.js issues](https://github.com/vercel/next.js/issues?q=is%3Aissue+is%3Aclosed) for duplicates or check the [Next.js releases](https://github.com/vercel/next.js/releases). You can also use the GitHub [template](https://github.com/vercel/next.js/tree/canary/examples/reproduction-template) (preferred), or the [CodeSandbox](https://codesandbox.io/s/github/vercel/next.js/tree/canary/examples/reproduction-template) or [StackBlitz](https://stackblitz.com/fork/github/vercel/next.js/tree/canary/examples/reproduction-template) templates to create a reproduction with `canary` from scratch. +The safest way is to install `next@canary` in your project and test it, but you can also search through [closed Next.js issues](https://github.com/vercel/next.js/issues?q=is%3Aissue+is%3Aclosed) for duplicates or check the [Next.js releases](https://github.com/vercel/next.js/releases). You can also use the GitHub templates (preferred) for [pages](https://github.com/vercel/next.js/tree/canary/examples/reproduction-template) and [App Router](https://github.com/vercel/next.js/tree/canary/examples/reproduction-template-app-dir), or the [CodeSandbox: `pages`](https://codesandbox.io/s/github/vercel/next.js/tree/canary/examples/reproduction-template) or [CodeSandbox: App Router](https://github.com/vercel/next.js/tree/canary/examples/reproduction-template-app-dir) templates to create a reproduction with `canary` from scratch. ### **My issue has been open for a long time, why do I need to verify `canary` now?** diff --git a/.github/actions/issue-validator/repro.md b/.github/actions/issue-validator/repro.md index 0dbfa09a35ad9..484297011d8ee 100644 --- a/.github/actions/issue-validator/repro.md +++ b/.github/actions/issue-validator/repro.md @@ -2,7 +2,7 @@ We cannot recreate the issue with the provided information. **Please add a repro ### **Why was this issue marked with the `please add a complete reproduction` label?** -To be able to investigate, we need access to a reproduction to identify what triggered the issue. We prefer a link to a public GitHub repository ([template](https://github.com/vercel/next.js/tree/canary/examples/reproduction-template)), but you can also use a tool like [CodeSandbox](https://codesandbox.io/s/github/vercel/next.js/tree/canary/examples/reproduction-template) or [StackBlitz](https://stackblitz.com/fork/github/vercel/next.js/tree/canary/examples/reproduction-template). +To be able to investigate, we need access to a reproduction to identify what triggered the issue. We prefer a link to a public GitHub repository ([template for `pages`](https://github.com/vercel/next.js/tree/canary/examples/reproduction-template), [template for App Router](https://github.com/vercel/next.js/tree/canary/examples/reproduction-template-app-dir)), but you can also use these templates: [CodeSandbox: `pages`](https://codesandbox.io/s/github/vercel/next.js/tree/canary/examples/reproduction-template) or [CodeSandbox: App Router](https://github.com/vercel/next.js/tree/canary/examples/reproduction-template-app-dir). To make sure the issue is resolved as quickly as possible, please make sure that the reproduction is as **minimal** as possible. This means that you should **remove unnecessary code, files, and dependencies** that do not contribute to the issue. diff --git a/.github/actions/next-stats-action/src/prepare/repo-setup.js b/.github/actions/next-stats-action/src/prepare/repo-setup.js index 21ad117508bdc..2f2895e76effa 100644 --- a/.github/actions/next-stats-action/src/prepare/repo-setup.js +++ b/.github/actions/next-stats-action/src/prepare/repo-setup.js @@ -55,146 +55,111 @@ module.exports = (actionInfo) => { } }, async linkPackages({ repoDir, nextSwcVersion }) { - let useTestPack = process.env.NEXT_TEST_PACK + const pkgPaths = new Map() + const pkgDatas = new Map() + let pkgs - if (useTestPack) { - execa.sync('pnpm', ['turbo', 'run', 'test-pack'], { - cwd: repoDir, - env: { NEXT_SWC_VERSION: nextSwcVersion }, - }) - - const pkgPaths = new Map() - const pkgs = (await fs.readdir(path.join(repoDir, 'packages'))).filter( - (item) => !item.startsWith('.') - ) - - pkgs.forEach((pkgDirname) => { - const { name } = require(path.join( - repoDir, - 'packages', - pkgDirname, - 'package.json' - )) - pkgPaths.set( - name, - path.join( - repoDir, - 'packages', - pkgDirname, - `packed-${pkgDirname}.tgz` - ) - ) - }) - return pkgPaths - } else { - // TODO: remove after next stable release (current v13.1.2) - const pkgPaths = new Map() - const pkgDatas = new Map() - let pkgs - - try { - pkgs = await fs.readdir(path.join(repoDir, 'packages')) - } catch (err) { - if (err.code === 'ENOENT') { - require('console').log('no packages to link') - return pkgPaths - } - throw err + try { + pkgs = await fs.readdir(path.join(repoDir, 'packages')) + } catch (err) { + if (err.code === 'ENOENT') { + require('console').log('no packages to link') + return pkgPaths } + throw err + } - for (const pkg of pkgs) { - const pkgPath = path.join(repoDir, 'packages', pkg) - const packedPkgPath = path.join(pkgPath, `${pkg}-packed.tgz`) + for (const pkg of pkgs) { + const pkgPath = path.join(repoDir, 'packages', pkg) + const packedPkgPath = path.join(pkgPath, `${pkg}-packed.tgz`) - const pkgDataPath = path.join(pkgPath, 'package.json') - if (!fs.existsSync(pkgDataPath)) { - require('console').log(`Skipping ${pkgDataPath}`) - continue - } - const pkgData = require(pkgDataPath) - const { name } = pkgData - pkgDatas.set(name, { - pkgDataPath, - pkg, - pkgPath, - pkgData, - packedPkgPath, - }) - pkgPaths.set(name, packedPkgPath) + const pkgDataPath = path.join(pkgPath, 'package.json') + if (!fs.existsSync(pkgDataPath)) { + require('console').log(`Skipping ${pkgDataPath}`) + continue } + const pkgData = require(pkgDataPath) + const { name } = pkgData + pkgDatas.set(name, { + pkgDataPath, + pkg, + pkgPath, + pkgData, + packedPkgPath, + }) + pkgPaths.set(name, packedPkgPath) + } - for (const pkg of pkgDatas.keys()) { - const { pkgDataPath, pkgData } = pkgDatas.get(pkg) + for (const pkg of pkgDatas.keys()) { + const { pkgDataPath, pkgData } = pkgDatas.get(pkg) - for (const pkg of pkgDatas.keys()) { - const { packedPkgPath } = pkgDatas.get(pkg) - if (!pkgData.dependencies || !pkgData.dependencies[pkg]) continue - pkgData.dependencies[pkg] = packedPkgPath - } + for (const pkg of pkgDatas.keys()) { + const { packedPkgPath } = pkgDatas.get(pkg) + if (!pkgData.dependencies || !pkgData.dependencies[pkg]) continue + pkgData.dependencies[pkg] = packedPkgPath + } - // make sure native binaries are included in local linking - if (pkg === '@next/swc') { - if (!pkgData.files) { - pkgData.files = [] - } - pkgData.files.push('native/*') - require('console').log( - 'using swc binaries: ', - await exec(`ls ${path.join(path.dirname(pkgDataPath), 'native')}`) - ) + // make sure native binaries are included in local linking + if (pkg === '@next/swc') { + if (!pkgData.files) { + pkgData.files = [] } + pkgData.files.push('native/*') + require('console').log( + 'using swc binaries: ', + await exec(`ls ${path.join(path.dirname(pkgDataPath), 'native')}`) + ) + } - if (pkg === 'next') { - if (nextSwcVersion) { - Object.assign(pkgData.dependencies, { - '@next/swc-linux-x64-gnu': nextSwcVersion, - }) + if (pkg === 'next') { + if (nextSwcVersion) { + Object.assign(pkgData.dependencies, { + '@next/swc-linux-x64-gnu': nextSwcVersion, + }) + } else { + if (pkgDatas.get('@next/swc')) { + pkgData.dependencies['@next/swc'] = + pkgDatas.get('@next/swc').packedPkgPath } else { - if (pkgDatas.get('@next/swc')) { - pkgData.dependencies['@next/swc'] = - pkgDatas.get('@next/swc').packedPkgPath - } else { - pkgData.files.push('native/*') - } + pkgData.files.push('native/*') } } + } - if (pkgData?.scripts?.prepublishOnly) { - // There's a bug in `pnpm pack` where it will run - // the prepublishOnly script and that will fail. - // See https://github.com/pnpm/pnpm/issues/2941 - delete pkgData.scripts.prepublishOnly - } - - await fs.writeFile( - pkgDataPath, - JSON.stringify(pkgData, null, 2), - 'utf8' - ) + if (pkgData?.scripts?.prepublishOnly) { + // There's a bug in `pnpm pack` where it will run + // the prepublishOnly script and that will fail. + // See https://github.com/pnpm/pnpm/issues/2941 + delete pkgData.scripts.prepublishOnly } - // wait to pack packages until after dependency paths have been updated - // to the correct versions - await Promise.all( - Array.from(pkgDatas.keys()).map(async (pkgName) => { - const { pkg, pkgPath, pkgData, packedPkgPath } = - pkgDatas.get(pkgName) - // Copied from pnpm source: https://github.com/pnpm/pnpm/blob/5a5512f14c47f4778b8d2b6d957fb12c7ef40127/releasing/plugin-commands-publishing/src/pack.ts#L96 - const tmpTarball = path.join( - pkgPath, - `${pkgData.name.replace('@', '').replace('/', '-')}-${ - pkgData.version - }.tgz` - ) - await execa('pnpm', ['pack'], { - cwd: pkgPath, - }) - await fs.copyFile(tmpTarball, packedPkgPath) - }) + await fs.writeFile( + pkgDataPath, + JSON.stringify(pkgData, null, 2), + 'utf8' ) - - return pkgPaths } + + // wait to pack packages until after dependency paths have been updated + // to the correct versions + await Promise.all( + Array.from(pkgDatas.keys()).map(async (pkgName) => { + const { pkg, pkgPath, pkgData, packedPkgPath } = pkgDatas.get(pkgName) + // Copied from pnpm source: https://github.com/pnpm/pnpm/blob/5a5512f14c47f4778b8d2b6d957fb12c7ef40127/releasing/plugin-commands-publishing/src/pack.ts#L96 + const tmpTarball = path.join( + pkgPath, + `${pkgData.name.replace('@', '').replace('/', '-')}-${ + pkgData.version + }.tgz` + ) + await execa('pnpm', ['pack'], { + cwd: pkgPath, + }) + await fs.copyFile(tmpTarball, packedPkgPath) + }) + ) + + return pkgPaths }, } } diff --git a/.github/workflows/build_test_deploy.yml b/.github/workflows/build_test_deploy.yml index c1b1e6e42496e..76b0ae89c4420 100644 --- a/.github/workflows/build_test_deploy.yml +++ b/.github/workflows/build_test_deploy.yml @@ -1,8 +1,9 @@ on: push: - branches: [canary] + branches: ['canary', 'trunk-merge/*'] pull_request: types: [opened, synchronize] + merge_group: name: Build, test, and deploy @@ -35,6 +36,7 @@ jobs: TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} outputs: docsChange: ${{ steps.docs-change.outputs.DOCS_CHANGE }} + codemodChange: ${{ steps.codemod-change.outputs.CODEMOD_CHANGE }} isRelease: ${{ steps.check-release.outputs.IS_RELEASE }} swcChange: ${{ steps.swc-change.outputs.SWC_CHANGE }} turboToken: ${{ steps.turbo-token.outputs.TURBO_TOKEN }} @@ -61,6 +63,12 @@ jobs: - run: echo "${{steps.docs-change.outputs.DOCS_CHANGE}}" + - name: Check codemod change + run: echo "CODEMOD_CHANGE<> $GITHUB_OUTPUT; echo "$(node scripts/run-for-change.js --type next-codemod --exec echo 'yup')" >> $GITHUB_OUTPUT; echo 'EOF' >> $GITHUB_OUTPUT + id: codemod-change + + - run: echo "${{steps.codemod-change.outputs.CODEMOD_CHANGE}}" + - run: echo "SWC_CHANGE<> $GITHUB_OUTPUT; echo "$(node scripts/run-for-change.js --type next-swc --exec echo 'yup')" >> $GITHUB_OUTPUT; echo 'EOF' >> $GITHUB_OUTPUT id: swc-change @@ -183,7 +191,6 @@ jobs: cargo fmt -- --check cargo clippy --all -- -D warnings -A deprecated cargo check -p next-dev --no-default-features --features cli,custom_allocator,rustls-tls,__internal_nextjs_integration_test - working-directory: packages/next-swc checkPrecompiled: name: Check Pre-compiled @@ -648,7 +655,7 @@ jobs: name: next-swc-test-binary path: packages/next-swc/native - - run: docker run --rm -v $(pwd):/work mcr.microsoft.com/playwright:v1.28.1-jammy /bin/bash -c "cd /work && curl -s https://install-node.vercel.app/v${{ env.NODE_LTS_VERSION }} | FORCE=1 bash && npm i -g pnpm@${PNPM_VERSION} > /dev/null && NEXT_TEST_JOB=1 NEXT_TEST_CNA=1 xvfb-run node run-tests.js test/integration/create-next-app/index.test.ts test/integration/create-next-app/templates.test.ts >> /proc/1/fd/1" + - run: docker run --rm -v $(pwd):/work mcr.microsoft.com/playwright:v1.28.1-jammy /bin/bash -c "cd /work && NODE_VERSION=${{ env.NODE_LTS_VERSION }} ./scripts/setup-node.sh && npm i -g pnpm@${PNPM_VERSION} > /dev/null && NEXT_TEST_JOB=1 NEXT_TEST_CNA=1 xvfb-run node run-tests.js test/integration/create-next-app/index.test.ts test/integration/create-next-app/templates.test.ts >> /proc/1/fd/1" if: ${{ needs.build.outputs.docsChange == 'nope' }} - name: Upload test trace @@ -665,13 +672,14 @@ jobs: name: Test Codemods runs-on: ubuntu-latest needs: [build] + if: ${{ needs.build.outputs.codemodChange == 'yup' }} timeout-minutes: 5 env: NEXT_TELEMETRY_DISABLED: 1 TEST_TIMINGS_TOKEN: ${{ secrets.TEST_TIMINGS_TOKEN }} steps: - - run: echo "${{needs.build.outputs.docsChange}}" + - run: echo "${{needs.build.outputs.codemodChange}}" # https://github.com/actions/virtual-environments/issues/1187 - name: tune linux network @@ -679,17 +687,13 @@ jobs: - uses: actions/cache@v3 timeout-minutes: 5 - if: ${{ needs.build.outputs.docsChange == 'nope' }} id: restore-build with: path: ./* key: ${{ github.sha }}-${{ github.run_number }} - - run: echo "CODEMOD_CHANGE<> $GITHUB_OUTPUT; echo "$(node scripts/run-for-change.js --type next-codemod --always-canary --exec echo 'yup')" >> $GITHUB_OUTPUT; echo "EOF" >> $GITHUB_OUTPUT - id: codemodChange - - - run: docker run --rm -v $(pwd):/work mcr.microsoft.com/playwright:v1.28.1-jammy /bin/bash -c "cd /work && curl -s https://install-node.vercel.app/v${{ env.NODE_LTS_VERSION }} | FORCE=1 bash && npm i -g pnpm@${PNPM_VERSION} > /dev/null && cd ./packages/next-codemod && pnpm build && pnpm test >> /proc/1/fd/1" - if: ${{ needs.build.outputs.docsChange == 'nope' && steps.codemodChange.outputs.CODEMOD_CHANGE == 'yup' }} + - name: Run tests + run: docker run --rm -v $(pwd):/work mcr.microsoft.com/playwright:v1.28.1-jammy /bin/bash -c "cd /work && NODE_VERSION=${{ env.NODE_LTS_VERSION }} ./scripts/setup-node.sh && npm i -g pnpm@${PNPM_VERSION} > /dev/null && cd ./packages/next-codemod && pnpm build && pnpm test >> /proc/1/fd/1" testIntegration: name: Test Integration @@ -754,7 +758,7 @@ jobs: name: next-swc-test-binary path: packages/next-swc/native - - run: docker run --rm -v $(pwd):/work mcr.microsoft.com/playwright:v1.28.1-jammy /bin/bash -c "cd /work && curl -s https://install-node.vercel.app/v${{ env.NODE_LTS_VERSION }} | FORCE=1 bash && npm i -g pnpm@${PNPM_VERSION} > /dev/null && NEXT_TEST_JOB=1 TEST_TIMINGS_TOKEN=${{ secrets.TEST_TIMINGS_TOKEN }} xvfb-run node run-tests.js --timings -g ${{ matrix.group }}/28 >> /proc/1/fd/1" + - run: docker run --rm -v $(pwd):/work mcr.microsoft.com/playwright:v1.28.1-jammy /bin/bash -c "cd /work && NODE_VERSION=${{ env.NODE_LTS_VERSION }} ./scripts/setup-node.sh && npm i -g pnpm@${PNPM_VERSION} > /dev/null && NEXT_TEST_JOB=1 TEST_TIMINGS_TOKEN=${{ secrets.TEST_TIMINGS_TOKEN }} xvfb-run node run-tests.js --timings -g ${{ matrix.group }}/28 >> /proc/1/fd/1" if: ${{needs.build.outputs.docsChange == 'nope'}} - name: Upload test trace @@ -806,6 +810,51 @@ jobs: - run: xvfb-run node run-tests.js test/integration/with-electron/test/index.test.js if: ${{needs.build.outputs.docsChange == 'nope'}} + # A job to run sets of tests with turbopack enabled. These tests are considered as `stable`, + # that running with turbopack should always pass. + testTurbopack: + name: Test Development (Turbopack) + runs-on: ubuntu-latest + needs: [build, build-native-test] + timeout-minutes: 35 + env: + NEXT_TELEMETRY_DISABLED: 1 + TEST_TIMINGS_TOKEN: ${{ secrets.TEST_TIMINGS_TOKEN }} + # Enabling backtrace will makes snapshot tests fail + RUST_BACKTRACE: 0 + # Path to the custom next-swc bindings. + NEXT_BINDINGS_BIN: /work/packages/next-swc/native/next-swc.linux-x64-gnu.node + # Glob pattern to run specific tests with --turbo. + NEXT_DEV_TEST_GLOB: '*' + NEXT_EXTERNAL_TESTS_FILTERS: /work/packages/next-swc/crates/next-dev-tests/tests-manifest.json + + strategy: + fail-fast: false + steps: + - run: echo "${{needs.build.outputs.docsChange}}" + + # https://github.com/actions/virtual-environments/issues/1187 + - name: tune linux network + run: sudo ethtool -K eth0 tx off rx off + + - uses: actions/cache@v3 + timeout-minutes: 5 + if: ${{needs.build.outputs.docsChange == 'nope'}} + id: restore-build + with: + path: ./* + key: ${{ github.sha }}-${{ github.run_number }} + + - uses: actions/download-artifact@v3 + if: ${{needs.build.outputs.docsChange == 'nope'}} + with: + name: next-swc-test-binary + path: packages/next-swc/native + + - run: docker run --rm -v $(pwd):/work mcr.microsoft.com/playwright:v1.28.1-jammy /bin/bash -c "cd /work && NODE_VERSION=${{ env.NODE_LTS_VERSION }} ./scripts/setup-node.sh && node -v && npm i -g pnpm@${PNPM_VERSION} > /dev/null && NEXT_EXTERNAL_TESTS_FILTERS=${NEXT_EXTERNAL_TESTS_FILTERS} __INTERNAL_NEXT_DEV_TEST_TURBO_DEV=TRUE __INTERNAL_CUSTOM_TURBOPACK_BINDINGS=${NEXT_BINDINGS_BIN} __INTERNAL_NEXT_DEV_TEST_TURBO_GLOB_MATCH=${NEXT_DEV_TEST_GLOB} NEXT_E2E_TEST_TIMEOUT=240000 NEXT_TEST_JOB=1 NEXT_TEST_MODE=dev TEST_TIMINGS_TOKEN=${{ secrets.TEST_TIMINGS_TOKEN }} xvfb-run node run-tests.js --type development --timings -c 1 >> /proc/1/fd/1" + name: Run test/development + if: ${{needs.build.outputs.docsChange == 'nope'}} + testsPass: name: thank you, next runs-on: ubuntu-latest @@ -848,7 +897,7 @@ jobs: name: next-swc-test-binary path: packages/next-swc/native - - run: docker run --rm -v $(pwd):/work mcr.microsoft.com/playwright:v1.28.1-jammy /bin/bash -c "cd /work && curl -s https://install-node.vercel.app/v${{ env.NODE_MAINTENANCE_VERSION }} | FORCE=1 bash && npm i -g pnpm@${PNPM_VERSION} > /dev/null && BROWSERNAME=firefox NEXT_TEST_JOB=1 TEST_TIMINGS_TOKEN=${{ secrets.TEST_TIMINGS_TOKEN }} xvfb-run node run-tests.js test/integration/production/test/index.test.js >> /proc/1/fd/1" + - run: docker run --rm -v $(pwd):/work mcr.microsoft.com/playwright:v1.28.1-jammy /bin/bash -c "cd /work && NODE_VERSION=${{ env.NODE_MAINTENANCE_VERSION }} ./scripts/setup-node.sh && npm i -g pnpm@${PNPM_VERSION} > /dev/null && BROWSERNAME=firefox NEXT_TEST_JOB=1 TEST_TIMINGS_TOKEN=${{ secrets.TEST_TIMINGS_TOKEN }} xvfb-run node run-tests.js test/integration/production/test/index.test.js >> /proc/1/fd/1" if: ${{needs.build.outputs.docsChange == 'nope'}} testSafari: @@ -902,7 +951,7 @@ jobs: name: next-swc-test-binary path: packages/next-swc/native - - run: docker run --rm -v $(pwd):/work mcr.microsoft.com/playwright:v1.28.1-jammy /bin/bash -c "cd /work && curl -s https://install-node.vercel.app/v${{ env.NODE_LTS_VERSION }} | FORCE=1 bash && node -v && npm i -g pnpm@${PNPM_VERSION} > /dev/null && BROWSER_NAME=firefox NEXT_TEST_JOB=1 TEST_TIMINGS_TOKEN=${{ secrets.TEST_TIMINGS_TOKEN }} xvfb-run node run-tests.js test/integration/production/test/index.test.js >> /proc/1/fd/1" + - run: docker run --rm -v $(pwd):/work mcr.microsoft.com/playwright:v1.28.1-jammy /bin/bash -c "cd /work && NODE_VERSION=${{ env.NODE_LTS_VERSION }} ./scripts/setup-node.sh && node -v && npm i -g pnpm@${PNPM_VERSION} > /dev/null && BROWSER_NAME=firefox NEXT_TEST_JOB=1 TEST_TIMINGS_TOKEN=${{ secrets.TEST_TIMINGS_TOKEN }} xvfb-run node run-tests.js test/integration/production/test/index.test.js >> /proc/1/fd/1" if: ${{needs.build.outputs.docsChange == 'nope'}} publishRelease: @@ -913,6 +962,9 @@ jobs: - build - build-wasm - build-native + permissions: + contents: write + id-token: write env: NPM_TOKEN: ${{ secrets.NPM_TOKEN_ELEVATED }} steps: @@ -944,6 +996,7 @@ jobs: name: wasm-binaries path: packages/next-swc/crates/wasm + - run: npm i -g npm@9 # need latest version for provenance - run: npm i -g pnpm@${PNPM_VERSION} - run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc - run: ./scripts/publish-native.js @@ -994,10 +1047,12 @@ jobs: name: next-swc-test-binary path: packages/next-swc/native + - run: npm i -g vercel@latest + - run: RESET_VC_PROJECT=true node scripts/reset-vercel-project.mjs name: Reset test project - - run: docker run --rm -v $(pwd):/work mcr.microsoft.com/playwright:v1.28.1-jammy /bin/bash -c "cd /work && curl -s https://install-node.vercel.app/v${{ env.NODE_LTS_VERSION }} | FORCE=1 bash && npm i -g pnpm@${PNPM_VERSION} > /dev/null && VERCEL_TEST_TOKEN=${{ secrets.VERCEL_TEST_TOKEN }} VERCEL_TEST_TEAM=vtest314-next-e2e-tests NEXT_TEST_JOB=1 NEXT_TEST_MODE=deploy TEST_TIMINGS_TOKEN=${{ secrets.TEST_TIMINGS_TOKEN }} xvfb-run node run-tests.js --type e2e >> /proc/1/fd/1" + - run: docker run --rm -v $(pwd):/work mcr.microsoft.com/playwright:v1.28.1-jammy /bin/bash -c "cd /work && NODE_VERSION=${{ env.NODE_LTS_VERSION }} ./scripts/setup-node.sh && npm i -g pnpm@${PNPM_VERSION} > /dev/null && VERCEL_TEST_TOKEN=${{ secrets.VERCEL_TEST_TOKEN }} VERCEL_TEST_TEAM=vtest314-next-e2e-tests NEXT_TEST_JOB=1 NEXT_TEST_MODE=deploy TEST_TIMINGS_TOKEN=${{ secrets.TEST_TIMINGS_TOKEN }} xvfb-run node run-tests.js --type e2e >> /proc/1/fd/1" name: Run test/e2e (deploy) - name: Upload test trace @@ -1042,7 +1097,7 @@ jobs: build-native-test: name: Build native binary for tests and metrics - runs-on: ubuntu-latest + runs-on: ubuntu-latest-16-core-oss env: TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} TURBO_TEAM: 'vercel' @@ -1096,6 +1151,10 @@ jobs: if: ${{ steps.docs-change.outputs.DOCS_CHANGE == 'nope' }} run: node scripts/normalize-version-bump.js + - name: Make more disk space + continue-on-error: true + run: sudo rm -rf /usr/local/lib/android + - name: Build in docker uses: addnab/docker-run-action@v3 if: ${{ steps.docs-change.outputs.DOCS_CHANGE == 'nope' }} @@ -1106,6 +1165,8 @@ jobs: run: | set -e && export CARGO_PROFILE_DEV_OPT_LEVEL=1 && + export CARGO_PROFILE_DEV_INCREMENTAL=false && + export CARGO_PROFILE_DEV_STRIP=true && rustup toolchain install "${RUST_TOOLCHAIN}" && rustup default "${RUST_TOOLCHAIN}" && rustup target add x86_64-unknown-linux-gnu && @@ -1129,7 +1190,7 @@ jobs: test-native: name: Unit Test Native Code - runs-on: ubuntu-latest + runs-on: ubuntu-latest-8-core-oss steps: - uses: actions/checkout@v3 @@ -1167,13 +1228,10 @@ jobs: path: ./* key: ${{ github.sha }}-${{ github.run_number }} - - run: echo "SWC_CHANGE<> $GITHUB_OUTPUT; echo "$(node scripts/run-for-change.js --type next-swc --exec echo 'yup')" >> $GITHUB_OUTPUT; echo 'EOF' >> $GITHUB_OUTPUT - id: swc-change - - - run: echo "${{ steps.swc-change.outputs.SWC_CHANGE }}" + - run: echo "${{needs.build.outputs.docsChange == 'nope'}}" - name: Install - if: ${{ steps.swc-change.outputs.SWC_CHANGE == 'yup' }} + if: ${{needs.build.outputs.docsChange == 'nope'}} uses: actions-rs/toolchain@v1 with: toolchain: ${{ env.RUST_TOOLCHAIN }} @@ -1185,12 +1243,53 @@ jobs: - name: Build tests timeout-minutes: 60 run: cd packages/next-swc && cargo nextest run -p next-dev-tests --release --no-run - if: ${{ steps.swc-change.outputs.SWC_CHANGE == 'yup' }} + if: ${{needs.build.outputs.docsChange == 'nope'}} - name: Run tests timeout-minutes: 20 run: cd packages/next-swc && cargo nextest run -p next-dev-tests --release --no-fail-fast - if: ${{ steps.swc-change.outputs.SWC_CHANGE == 'yup' }} + if: ${{needs.build.outputs.docsChange == 'nope'}} + + test-bench-native-integration: + name: Bench Integration Test Native Code + runs-on: ubuntu-latest-16-core-oss + needs: build + + env: + CARGO_PROFILE_RELEASE_LTO: false + TURBOPACK_BENCH_COUNTS: 10 + TURBOPACK_BENCH_CACHED: 1 + TURBOPACK_BENCH_PROGRESS: 1 + + steps: + - uses: actions/cache@v3 + timeout-minutes: 5 + id: restore-build + with: + path: ./* + key: ${{ github.sha }}-${{ github.run_number }} + + - run: echo "${{needs.build.outputs.docsChange == 'nope'}}" + + - name: Install Rust toolchain + if: ${{needs.build.outputs.docsChange == 'nope'}} + uses: actions-rs/toolchain@v1 + with: + toolchain: ${{ env.RUST_TOOLCHAIN }} + profile: minimal + + - name: Install nextest + uses: taiki-e/install-action@nextest + + - name: Build tests + timeout-minutes: 60 + run: cd packages/next-swc && cargo test --benches -p next-dev --release --no-run + if: ${{needs.build.outputs.docsChange == 'nope'}} + + - name: Run tests + timeout-minutes: 60 + run: cd packages/next-swc && cargo test --benches -p next-dev --release --no-fail-fast + if: ${{needs.build.outputs.docsChange == 'nope'}} test-wasm: name: Test the wasm build @@ -1222,7 +1321,7 @@ jobs: name: next-swc-test-binary path: packages/next-swc/native - - run: docker run --rm -v $(pwd):/work mcr.microsoft.com/playwright:v1.28.1-jammy /bin/bash -c "cd /work && curl -s https://install-node.vercel.app/v${{ env.NODE_LTS_VERSION }} | FORCE=1 bash && node -v && node ./scripts/setup-wasm.mjs && npm i -g pnpm@${PNPM_VERSION} > /dev/null && TEST_WASM=true xvfb-run node run-tests.js test/integration/production/test/index.test.js test/e2e/streaming-ssr/index.test.ts >> /proc/1/fd/1" + - run: docker run --rm -v $(pwd):/work mcr.microsoft.com/playwright:v1.28.1-jammy /bin/bash -c "cd /work && NODE_VERSION=${{ env.NODE_LTS_VERSION }} ./scripts/setup-node.sh && node -v && node ./scripts/setup-wasm.mjs && npm i -g pnpm@${PNPM_VERSION} > /dev/null && TEST_WASM=true xvfb-run node run-tests.js test/integration/production/test/index.test.js test/e2e/streaming-ssr/index.test.ts >> /proc/1/fd/1" if: ${{needs.build.outputs.docsChange == 'nope'}} # Build binaries for publishing diff --git a/.github/workflows/trigger_release.yml b/.github/workflows/trigger_release.yml index 923714432f359..db2d63a9ac242 100644 --- a/.github/workflows/trigger_release.yml +++ b/.github/workflows/trigger_release.yml @@ -2,20 +2,35 @@ on: workflow_dispatch: inputs: releaseType: - description: stable or canary (case sensitive)? + description: stable or canary? required: true - type: string + type: choice + options: + - canary + - stable semverType: - description: patch, minor, or major (case sensitive)? - type: string + description: semver type? + type: choice + options: + - patch + - minor + - major secrets: - START_RELEASE_TOKEN: + RELEASE_BOT_TOKEN: required: true name: Trigger Release +env: + NAPI_CLI_VERSION: 2.14.7 + TURBO_VERSION: 1.6.3 + RUST_TOOLCHAIN: nightly-2023-03-09 + PNPM_VERSION: 7.24.3 + NODE_MAINTENANCE_VERSION: 16 + NODE_LTS_VERSION: 18 + jobs: start: runs-on: ubuntu-latest @@ -36,6 +51,8 @@ jobs: - run: git clone https://ijjk:${{ secrets.START_RELEASE_TOKEN }}@github.com/vercel/next.js.git --depth=25 . + - run: git describe || 'echo failed to get tag' + # https://github.com/actions/virtual-environments/issues/1187 - name: tune linux network run: sudo ethtool -K eth0 tx off rx off @@ -61,4 +78,4 @@ jobs: - run: node ./scripts/start-release.js --release-type ${{ github.event.inputs.releaseType }} --semver-type ${{ github.event.inputs.semverType }} env: - START_RELEASE_TOKEN: ${{ secrets.START_RELEASE_TOKEN }} + RELEASE_BOT_TOKEN: ${{ secrets.RELEASE_BOT_TOKEN }} diff --git a/.gitignore b/.gitignore index 68e8a13768228..59c5d02415266 100644 --- a/.gitignore +++ b/.gitignore @@ -3,7 +3,6 @@ dist .next target packages/next/wasm/@next -packages/*/packed-*.tgz # dependencies node_modules diff --git a/.npmrc b/.npmrc index 7e6ce68381fb2..5626f81fde083 100644 --- a/.npmrc +++ b/.npmrc @@ -1,3 +1,4 @@ +provenance = true save-exact = true tag-version-prefix="" strict-peer-dependencies = false diff --git a/.prettierignore b/.prettierignore index 0c00bf252d776..edcab939ce4c2 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,30 +1,40 @@ -node_modules -**/.next/** -**/_next/** -**/dist/** +# Build artifacts +.next/ +.turbo/ +_next/ +__tmp__/ +dist/ +node_modules/ +target/ +compiled/ + +lerna.json +test-timings.json +pnpm-lock.yaml + packages/next/src/bundles/webpack/packages/*.runtime.js packages/next/src/bundles/webpack/packages/lazy-compilation-*.js -packages/next/src/compiled/** -packages/react-refresh-utils/**/*.js -packages/react-refresh-utils/**/*.d.ts -packages/react-dev-overlay/lib/** -**/__tmp__/** -lerna.json + .github/actions/next-stats-action/.work .github/actions/issue-validator/index.mjs .github/actions/issue-labeler/lib/index.js -packages/next-swc/crates/**/* -packages/next-swc/target/**/* + +packages/next-swc/crates/**/tests/**/output* +packages/next-swc/crates/core/tests/loader/issue-32553/input.js +packages/next-swc/crates/next-dev-tests/tests/integration/turbopack/basic/error/input/broken.js packages/next-swc/native/**/* -packages/next-codemod/transforms/__testfixtures__/**/* -packages/next-codemod/transforms/__tests__/**/* + +packages/next-codemod/transforms/__testfixtures__/** +packages/next-codemod/transforms/__tests__/** packages/next-codemod/**/*.js packages/next-codemod/**/*.d.ts + packages/next-env/**/*.d.ts -test-timings.json + test/**/out/** test/development/basic/hmr/components/parse-error.js + bench/nested-deps/pages/**/* bench/nested-deps/components/**/* -pnpm-lock.yaml + **/convex/_generated/** diff --git a/.rustfmt.toml b/.rustfmt.toml new file mode 100644 index 0000000000000..28ba342128afe --- /dev/null +++ b/.rustfmt.toml @@ -0,0 +1,11 @@ +max_width = 100 + +tab_spaces = 4 +hard_tabs = false + +format_strings = true +use_field_init_shorthand = true +wrap_comments = true + +imports_granularity = "Crate" +group_imports = "StdExternalCrate" diff --git a/.vscode/settings.json b/.vscode/settings.json index a4b1c35f42c47..2de2ef61939c7 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -58,8 +58,6 @@ "*.ts": "$(capture).test.ts, $(capture).test.tsx", "*.tsx": "$(capture).test.ts, $(capture).test.tsx" }, - // Allow to find the cargo project for rust-analyzer. - "rust-analyzer.linkedProjects": ["packages/next-swc/Cargo.toml"], // Compile rust-analyzer in a separate directory to avoid conflicts with the main project. "rust-analyzer.checkOnSave.extraEnv": { "CARGO_TARGET_DIR": "target/rust-analyzer" @@ -68,5 +66,21 @@ "CARGO_TARGET_DIR": "target/rust-analyzer", "RUST_BACKTRACE": "0" }, - "cSpell.words": ["opentelemetry", "zipkin"] + "rust-analyzer.cargo.extraEnv": { + "CARGO_TARGET_DIR": "target/rust_analyzer" + }, + "cSpell.words": [ + "Entrypoints", + "napi", + "nextjs", + "opentelemetry", + "Threadsafe", + "zipkin" + ], + "grammarly.selectors": [ + { + "language": "markdown", + "scheme": "file" + } + ] } diff --git a/packages/next-swc/Cargo.lock b/Cargo.lock similarity index 84% rename from packages/next-swc/Cargo.lock rename to Cargo.lock index 19bb8fe526e20..6d2c36e7f1f06 100644 --- a/packages/next-swc/Cargo.lock +++ b/Cargo.lock @@ -41,9 +41,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "0.7.20" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" +checksum = "67fc08ce920c31afb70f013dcce1bfc3a3195de6a228474e45e1f145b36f8d04" dependencies = [ "memchr", ] @@ -121,6 +121,12 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "any_ascii" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70033777eb8b5124a81a1889416543dddef2de240019b674c81285a2635a7e1e" + [[package]] name = "anyhow" version = "1.0.70" @@ -154,11 +160,10 @@ dependencies = [ [[package]] name = "ast_node" -version = "0.8.6" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf94863c5fdfee166d0907c44e5fee970123b2b7307046d35d1e671aa93afbba" +checksum = "52f7fd7740c5752c16281a1c1f9442b1e69ba41738acde85dc604aaf3ce41890" dependencies = [ - "darling 0.13.4", "pmutil", "proc-macro2", "quote", @@ -233,7 +238,7 @@ dependencies = [ "log", "parking", "polling", - "rustix 0.37.3", + "rustix 0.37.13", "slab", "socket2", "waker-fn", @@ -283,7 +288,7 @@ checksum = "0e97ce7de6cf12de5d7226c73f5ba9811622f4db3a5b91b55c53e987e5f91cba" dependencies = [ "proc-macro2", "quote", - "syn 2.0.8", + "syn 2.0.15", ] [[package]] @@ -343,13 +348,13 @@ checksum = "7a40729d2133846d9ed0ea60a8b9541bccddab49cd30f0715a1da672fe9a2524" [[package]] name = "async-trait" -version = "0.1.67" +version = "0.1.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86ea188f25f0255d8f92797797c97ebf5631fa88178beb1a46fdf5622c9a00e4" +checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" dependencies = [ "proc-macro2", "quote", - "syn 2.0.8", + "syn 2.0.15", ] [[package]] @@ -366,6 +371,15 @@ dependencies = [ "tungstenite 0.17.3", ] +[[package]] +name = "atomic-polyfill" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3ff7eb3f316534d83a8a2c3d1674ace8a5a71198eba31e2e2b597833f699b28" +dependencies = [ + "critical-section", +] + [[package]] name = "atomic-waker" version = "1.1.0" @@ -386,7 +400,7 @@ dependencies = [ [[package]] name = "auto-hash-map" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230328.1#0f3d9675322b680faee0fec8976bf11ed36de2f9" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230508.2#b9e5e6d750c048bb083bfa60941554c479f6685f" dependencies = [ "serde", ] @@ -464,8 +478,8 @@ dependencies = [ "cc", "cfg-if 1.0.0", "libc", - "miniz_oxide", - "object 0.30.3", + "miniz_oxide 0.6.2", + "object", "rustc-demangle", ] @@ -502,11 +516,20 @@ dependencies = [ "scoped-tls", ] +[[package]] +name = "bincode" +version = "1.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" +dependencies = [ + "serde", +] + [[package]] name = "binding_macros" -version = "0.44.23" +version = "0.49.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df018ae4a80a06cef289384bf89614451c4f30c6238976ce5c00c1f4379b8eca" +checksum = "b7148cb5385a7aba0e7b54d188b91d452a5a2c9f51abb982df2c7194b737005c" dependencies = [ "anyhow", "console_error_panic_hook", @@ -531,9 +554,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.0.2" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "487f1e0fcbe47deb8b0574e646def1c903389d95241dd1bbcc6ce4a715dfc0c1" +checksum = "24a6904aef64d73cf10ab17ebace7befb918b82164785cb89907993be7f83813" [[package]] name = "bitreader" @@ -643,6 +666,12 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "bytemuck" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17febce684fd15d89027105661fec94afb475cb995fbc59d2865198446ba2eea" + [[package]] name = "byteorder" version = "1.4.3" @@ -654,6 +683,9 @@ name = "bytes" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" +dependencies = [ + "serde", +] [[package]] name = "cargo-lock" @@ -748,7 +780,7 @@ checksum = "4cdf6513e24d260548345a5ef13a04110f5915b7764c274933e10f9363a43e3b" dependencies = [ "chromiumoxide_types", "either", - "heck", + "heck 0.4.1", "once_cell", "proc-macro2", "quote", @@ -777,6 +809,7 @@ dependencies = [ "js-sys", "num-integer", "num-traits", + "serde", "time 0.1.45", "wasm-bindgen", "winapi 0.3.9", @@ -827,7 +860,7 @@ version = "4.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42dfd32784433290c51d92c438bb72ea5063797fc3cc9a21a8c4346bebbb2098" dependencies = [ - "bitflags 2.0.2", + "bitflags 2.2.1", "clap_derive", "clap_lex 0.3.3", "is-terminal", @@ -842,7 +875,7 @@ version = "4.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fddf67631444a3a3e3e5ac51c36a5e01335302de677bd78759eaa90ab1f46644" dependencies = [ - "heck", + "heck 0.4.1", "proc-macro-error", "proc-macro2", "quote", @@ -886,6 +919,12 @@ dependencies = [ "unicode-width", ] +[[package]] +name = "color_quant" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" + [[package]] name = "combine" version = "4.6.6" @@ -998,6 +1037,12 @@ dependencies = [ "unicode-segmentation", ] +[[package]] +name = "cooked-waker" +version = "5.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147be55d677052dabc6b22252d5dd0fd4c29c8c27aa4f2fbef0f94aa003b406f" + [[package]] name = "core-foundation" version = "0.9.3" @@ -1010,9 +1055,9 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" +checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" [[package]] name = "corosensei" @@ -1029,65 +1074,83 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.5" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320" +checksum = "3e4c1eaa2012c47becbbad2ab175484c2a84d1185b566fb2cc5b8707343dfe58" dependencies = [ "libc", ] [[package]] name = "cranelift-bforest" -version = "0.82.3" +version = "0.91.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38faa2a16616c8e78a18d37b4726b98bfd2de192f2fdc8a39ddf568a408a0f75" +checksum = "2a2ab4512dfd3a6f4be184403a195f76e81a8a9f9e6c898e19d2dc3ce20e0115" dependencies = [ "cranelift-entity", ] [[package]] name = "cranelift-codegen" -version = "0.82.3" +version = "0.91.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26f192472a3ba23860afd07d2b0217dc628f21fcc72617aa1336d98e1671f33b" +checksum = "98b022ed2a5913a38839dfbafe6cf135342661293b08049843362df4301261dc" dependencies = [ + "arrayvec", + "bumpalo", "cranelift-bforest", "cranelift-codegen-meta", "cranelift-codegen-shared", + "cranelift-egraph", "cranelift-entity", + "cranelift-isle", "gimli 0.26.2", "log", - "regalloc", + "regalloc2", "smallvec", "target-lexicon", ] [[package]] name = "cranelift-codegen-meta" -version = "0.82.3" +version = "0.91.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f32ddb89e9b89d3d9b36a5b7d7ea3261c98235a76ac95ba46826b8ec40b1a24" +checksum = "639307b45434ad112a98f8300c0f0ab085cbefcd767efcdef9ef19d4c0756e74" dependencies = [ "cranelift-codegen-shared", ] [[package]] name = "cranelift-codegen-shared" -version = "0.82.3" +version = "0.91.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "278e52e29c53fcf32431ef08406c295699a70306d05a0715c5b1bf50e33a9ab7" + +[[package]] +name = "cranelift-egraph" +version = "0.91.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01fd0d9f288cc1b42d9333b7a776b17e278fc888c28e6a0f09b5573d45a150bc" +checksum = "624b54323b06e675293939311943ba82d323bb340468ce1889be5da7932c8d73" +dependencies = [ + "cranelift-entity", + "fxhash", + "hashbrown", + "indexmap", + "log", + "smallvec", +] [[package]] name = "cranelift-entity" -version = "0.82.3" +version = "0.91.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e3bfe172b83167604601faf9dc60453e0d0a93415b57a9c4d1a7ae6849185cf" +checksum = "9a59bcbca89c3f1b70b93ab3cbba5e5e0cbf3e63dadb23c7525cb142e21a9d4c" [[package]] name = "cranelift-frontend" -version = "0.82.3" +version = "0.91.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a006e3e32d80ce0e4ba7f1f9ddf66066d052a8c884a110b91d05404d6ce26dce" +checksum = "0d70abacb8cfef3dc8ff7e8836e9c1d70f7967dfdac824a4cd5e30223415aca6" dependencies = [ "cranelift-codegen", "log", @@ -1095,6 +1158,12 @@ dependencies = [ "target-lexicon", ] +[[package]] +name = "cranelift-isle" +version = "0.91.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "393bc73c451830ff8dbb3a07f61843d6cb41a084f9996319917c0b291ed785bb" + [[package]] name = "crc" version = "2.1.0" @@ -1157,11 +1226,17 @@ dependencies = [ "itertools", ] +[[package]] +name = "critical-section" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6548a0ad5d2549e111e1f6a11a6c2e2d00ce6a3dafe22948d67c2b443f775e52" + [[package]] name = "crossbeam-channel" -version = "0.5.7" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf2b3e8478797446514c91ef04bafcb59faba183e621ad488df88983cc14128c" +checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200" dependencies = [ "cfg-if 1.0.0", "crossbeam-utils", @@ -1246,10 +1321,14 @@ dependencies = [ ] [[package]] -name = "cty" -version = "0.2.2" +name = "ctor" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b365fabc795046672053e29c954733ec3b05e4be654ab130fe8f1f94d7051f35" +checksum = "dd4056f63fce3b82d852c3da92b08ea59959890813a7f4ce9c0ff85b10cf301b" +dependencies = [ + "quote", + "syn 2.0.15", +] [[package]] name = "curl" @@ -1284,9 +1363,9 @@ dependencies = [ [[package]] name = "cxx" -version = "1.0.93" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9c00419335c41018365ddf7e4d5f1c12ee3659ddcf3e01974650ba1de73d038" +checksum = "f61f1b6389c3fe1c316bf8a4dccc90a38208354b330925bce1f74a6c4756eb93" dependencies = [ "cc", "cxxbridge-flags", @@ -1296,9 +1375,9 @@ dependencies = [ [[package]] name = "cxx-build" -version = "1.0.93" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb8307ad413a98fff033c8545ecf133e3257747b3bae935e7602aab8aa92d4ca" +checksum = "12cee708e8962df2aeb38f594aae5d827c022b6460ac71a7a3e2c3c2aae5a07b" dependencies = [ "cc", "codespan-reporting", @@ -1306,34 +1385,24 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn 2.0.8", + "syn 2.0.15", ] [[package]] name = "cxxbridge-flags" -version = "1.0.93" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edc52e2eb08915cb12596d29d55f0b5384f00d697a646dbd269b6ecb0fbd9d31" +checksum = "7944172ae7e4068c533afbb984114a56c46e9ccddda550499caa222902c7f7bb" [[package]] name = "cxxbridge-macro" -version = "1.0.93" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "631569015d0d8d54e6c241733f944042623ab6df7bc3be7466874b05fcdb1c5f" +checksum = "2345488264226bf682893e25de0769f3360aac9957980ec49361b083ddaa5bc5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.8", -] - -[[package]] -name = "darling" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a01d95850c592940db9b8194bc39f4bc0e89dee5c4265e4b1807c34a9aba453c" -dependencies = [ - "darling_core 0.13.4", - "darling_macro 0.13.4", + "syn 2.0.15", ] [[package]] @@ -1342,22 +1411,8 @@ version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" dependencies = [ - "darling_core 0.14.4", - "darling_macro 0.14.4", -] - -[[package]] -name = "darling_core" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "859d65a907b6852c9361e3185c862aae7fafd2887876799fa55f5f99dc40d610" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim", - "syn 1.0.109", + "darling_core", + "darling_macro", ] [[package]] @@ -1370,17 +1425,7 @@ dependencies = [ "ident_case", "proc-macro2", "quote", - "syn 1.0.109", -] - -[[package]] -name = "darling_macro" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835" -dependencies = [ - "darling_core 0.13.4", - "quote", + "strsim", "syn 1.0.109", ] @@ -1390,7 +1435,7 @@ version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" dependencies = [ - "darling_core 0.14.4", + "darling_core", "quote", "syn 1.0.109", ] @@ -1402,7 +1447,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "907076dfda823b0b36d2a1bb5f90c96660a5bbcd7729e10727f07858f22c4edc" dependencies = [ "cfg-if 1.0.0", - "hashbrown 0.12.3", + "hashbrown", "lock_api", "once_cell", "parking_lot_core 0.9.7", @@ -1424,6 +1469,33 @@ dependencies = [ "uuid", ] +[[package]] +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "dhat" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f2aaf837aaf456f6706cb46386ba8dffd4013a757e36f4ea05c20dd46b209a3" +dependencies = [ + "backtrace", + "lazy_static", + "mintex", + "parking_lot", + "rustc-hash", + "serde", + "serde_json", + "thousands", +] + [[package]] name = "diff" version = "0.1.13" @@ -1546,18 +1618,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "enum_kind" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78b940da354ae81ef0926c5eaa428207b8f4f091d3956c891dfbd124162bed99" -dependencies = [ - "pmutil", - "proc-macro2", - "swc_macros_common", - "syn 1.0.109", -] - [[package]] name = "enumset" version = "1.0.12" @@ -1573,7 +1633,7 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "03e7b551eba279bf0fa88b83a46330168c1560a52a94f5126f892f0b364ab3e0" dependencies = [ - "darling 0.14.4", + "darling", "proc-macro2", "quote", "syn 1.0.109", @@ -1614,13 +1674,13 @@ dependencies = [ [[package]] name = "errno" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d6a0976c999d473fe89ad888d5a284e55366d9dc9038b1ba2aa15128c4afa0" +checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" dependencies = [ "errno-dragonfly", "libc", - "windows-sys 0.45.0", + "windows-sys 0.48.0", ] [[package]] @@ -1654,16 +1714,25 @@ dependencies = [ "instant", ] +[[package]] +name = "fdeflate" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d329bdeac514ee06249dabc27877490f17f5d371ec693360768b838e19f3ae10" +dependencies = [ + "simd-adler32", +] + [[package]] name = "filetime" -version = "0.2.20" +version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a3de6e8d11b22ff9edc6d916f890800597d60f8b2da1caf2955c274638d6412" +checksum = "5cbc844cecaee9d4443931972e1289c8ff485cb4cc2767cb03ca139ed6885153" dependencies = [ "cfg-if 1.0.0", "libc", "redox_syscall 0.2.16", - "windows-sys 0.45.0", + "windows-sys 0.48.0", ] [[package]] @@ -1679,8 +1748,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8a2db397cb1c8772f31494cb8917e48cd1e64f0fa7efac59fbd741a0a8ce841" dependencies = [ "crc32fast", - "libz-sys", - "miniz_oxide", + "miniz_oxide 0.6.2", ] [[package]] @@ -1715,9 +1783,9 @@ dependencies = [ [[package]] name = "from_variant" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0981e470d2ab9f643df3921d54f1952ea100c39fdb6a3fdc820e20d2291df6c" +checksum = "1d449976075322384507443937df2f1d5577afbf4282f12a5a66ef29fa3e6307" dependencies = [ "pmutil", "proc-macro2", @@ -1768,9 +1836,9 @@ checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" [[package]] name = "futures" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "531ac96c6ff5fd7c62263c5e3c67a603af4fcaee2e1a0ae5565ba3a11e69e549" +checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" dependencies = [ "futures-channel", "futures-core", @@ -1783,9 +1851,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "164713a5a0dcc3e7b4b1ed7d3b433cabc18025386f9339346e8daf15963cf7ac" +checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" dependencies = [ "futures-core", "futures-sink", @@ -1793,15 +1861,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86d7a0c1aa76363dac491de0ee99faf6941128376f1cf96f07db7603b7de69dd" +checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" [[package]] name = "futures-executor" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1997dd9df74cdac935c76252744c1ed5794fac083242ea4fe77ef3ed60ba0f83" +checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0" dependencies = [ "futures-core", "futures-task", @@ -1810,9 +1878,9 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89d422fa3cbe3b40dca574ab087abb5bc98258ea57eea3fd6f1fa7162c778b91" +checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" [[package]] name = "futures-lite" @@ -1831,13 +1899,13 @@ dependencies = [ [[package]] name = "futures-macro" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3eb14ed937631bd8b8b8977f2c198443447a8355b6e3ca599f38c975e5a963b6" +checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.15", ] [[package]] @@ -1853,15 +1921,15 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec93083a4aecafb2a80a885c9de1f0ccae9dbd32c2bb54b0c3a65690e0b8d2f2" +checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" [[package]] name = "futures-task" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd65540d33b37b16542a0438c12e6aeead10d4ac5d05bd3f805b8f35ab592879" +checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" [[package]] name = "futures-timer" @@ -1871,9 +1939,9 @@ checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" [[package]] name = "futures-util" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ef6b17e481503ec85211fed8f39d1970f128935ca1f814cd32ac4a6842e84ab" +checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" dependencies = [ "futures-channel", "futures-core", @@ -1896,20 +1964,11 @@ dependencies = [ "byteorder", ] -[[package]] -name = "generational-arena" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e1d3b771574f62d0548cee0ad9057857e9fc25d7a3335f140c84f6acd0bf601" -dependencies = [ - "cfg-if 0.1.10", -] - [[package]] name = "generic-array" -version = "0.14.6" +version = "0.14.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ "typenum", "version_check", @@ -1917,9 +1976,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" +checksum = "c85e1d9ab2eadba7e5040d4e09cbd6d072b76a557ad64e797c2cb9d4da21d7e4" dependencies = [ "cfg-if 1.0.0", "js-sys", @@ -2021,12 +2080,12 @@ dependencies = [ ] [[package]] -name = "hashbrown" -version = "0.11.2" +name = "hash32" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" +checksum = "b0c35f58762feb77d74ebe43bdbc3210f09be9fe6742234d573bacc26ed92b67" dependencies = [ - "ahash", + "byteorder", ] [[package]] @@ -2051,6 +2110,28 @@ dependencies = [ "num-traits", ] +[[package]] +name = "heapless" +version = "0.7.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db04bc24a18b9ea980628ecf00e6c0264f3c1426dac36c00cb49b6fbad8b0743" +dependencies = [ + "atomic-polyfill", + "hash32", + "rustc_version 0.4.0", + "spin 0.9.8", + "stable_deref_trait", +] + +[[package]] +name = "heck" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" +dependencies = [ + "unicode-segmentation", +] + [[package]] name = "heck" version = "0.4.1" @@ -2156,7 +2237,7 @@ dependencies = [ "serde", "serde_json", "serde_regex", - "serde_yaml", + "serde_yaml 0.9.19", "similar", "tokio", "url", @@ -2245,9 +2326,9 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.54" +version = "0.1.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c17cc76786e99f8d2f055c11159e7f0091c42474dcc3189fbab96072e873e6d" +checksum = "0722cd7114b7de04316e7ea5456a0bbb20e4adb46fd27a3697adb812cff0f37c" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -2267,6 +2348,12 @@ dependencies = [ "cxx-build", ] +[[package]] +name = "id-arena" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25a2bc672d1148e28034f176e01fffebb08b35768468cc954630da77a1449005" + [[package]] name = "ident_case" version = "1.0.1" @@ -2289,6 +2376,21 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb56e1aa765b4b4f3aadfab769793b7087bb03a4ea4920644a6d238e2df5b9ed" +[[package]] +name = "image" +version = "0.24.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "527909aa81e20ac3a44803521443a765550f09b5130c2c2fa1ea59c2f8f50a3a" +dependencies = [ + "bytemuck", + "byteorder", + "color_quant", + "jpeg-decoder", + "num-rational", + "num-traits", + "png", +] + [[package]] name = "include_dir" version = "0.7.3" @@ -2310,12 +2412,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.9.2" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg", - "hashbrown 0.12.3", + "hashbrown", "rayon", "serde", ] @@ -2357,13 +2459,13 @@ dependencies = [ [[package]] name = "io-lifetimes" -version = "1.0.9" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09270fd4fa1111bc614ed2246c7ef56239a3063d5be0d1ec3b589c505d400aeb" +checksum = "9c66c74d2ae7e79a5a8f7ac924adbe38ee42a859c6539ad869eb51f0b52dc220" dependencies = [ "hermit-abi 0.3.1", "libc", - "windows-sys 0.45.0", + "windows-sys 0.48.0", ] [[package]] @@ -2476,6 +2578,12 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" +[[package]] +name = "jpeg-decoder" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc0000e42512c92e31c2252315bda326620a4e034105e900c98ec492fa077b3e" + [[package]] name = "js-sys" version = "0.3.61" @@ -2586,6 +2694,15 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "lexical-sort" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c09e4591611e231daf4d4c685a66cb0410cc1e502027a20ae55f2bb9e997207a" +dependencies = [ + "any_ascii", +] + [[package]] name = "lexical-util" version = "0.8.5" @@ -2618,9 +2735,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.140" +version = "0.2.142" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99227334921fae1a979cf0bfdfcc6b3e5ce376ef57e16fb6fb3ea2ed6095f80c" +checksum = "6a987beff54b60ffa6d51982e1aa1146bc42f19bd26be28b0586f252fccf5317" [[package]] name = "libloading" @@ -2673,6 +2790,21 @@ dependencies = [ "cc", ] +[[package]] +name = "linked-hash-map" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" + +[[package]] +name = "linked_hash_set" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47186c6da4d81ca383c7c47c1bfc80f4b95f4720514d860a5407aaf4233f9588" +dependencies = [ + "linked-hash-map", +] + [[package]] name = "linux-raw-sys" version = "0.1.4" @@ -2681,9 +2813,9 @@ checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" [[package]] name = "linux-raw-sys" -version = "0.3.0" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd550e73688e6d578f0ac2119e32b797a327631a42f9433e59d02e139c8df60d" +checksum = "9b085a4f2cde5781fc4b1717f2e86c62f5cda49de7ba99a7c2eae02b61c9064c" [[package]] name = "lock_api" @@ -2705,34 +2837,13 @@ dependencies = [ "value-bag", ] -[[package]] -name = "loupe" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b6a72dfa44fe15b5e76b94307eeb2ff995a8c5b283b55008940c02e0c5b634d" -dependencies = [ - "indexmap", - "loupe-derive", - "rustversion", -] - -[[package]] -name = "loupe-derive" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0fbfc88337168279f2e9ae06e157cfed4efd3316e14dc96ed074d4f2e6c5952" -dependencies = [ - "quote", - "syn 1.0.109", -] - [[package]] name = "lru" version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e999beba7b6e8345721bd280141ed958096a2e4abdf74f67ff4ce49b4b54e47a" dependencies = [ - "hashbrown 0.12.3", + "hashbrown", ] [[package]] @@ -2794,9 +2905,9 @@ dependencies = [ [[package]] name = "mdxjs" -version = "0.1.8" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe25a3b6ba9aad427fa5ef59c99506bb6954748dd82211223dfd8a40dd75ae80" +checksum = "fe9bef082151ac4aba3884306e47fd2c1afcc2e208a9cb9a67c4ecfb96bb5d0c" dependencies = [ "markdown", "serde", @@ -2818,15 +2929,6 @@ dependencies = [ "libc", ] -[[package]] -name = "memoffset" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" -dependencies = [ - "autocfg", -] - [[package]] name = "memoffset" version = "0.7.1" @@ -2885,26 +2987,6 @@ dependencies = [ "libmimalloc-sys", ] -[[package]] -name = "mimalloc-rust" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6973866e0bc6504c03a16b6817b7e70839cc8a1dbd5d6dab00c65d8034868d8b" -dependencies = [ - "cty", - "mimalloc-rust-sys", -] - -[[package]] -name = "mimalloc-rust-sys" -version = "1.7.6-source" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a50daf45336b979a202a19f53b4b382f2c4bd50f392a8dbdb4c6c56ba5dfa64" -dependencies = [ - "cc", - "cty", -] - [[package]] name = "mime" version = "0.3.17" @@ -2936,6 +3018,26 @@ dependencies = [ "adler", ] +[[package]] +name = "miniz_oxide" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +dependencies = [ + "adler", + "simd-adler32", +] + +[[package]] +name = "mintex" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd7c5ba1c3b5a23418d7bbf98c71c3d4946a0125002129231da8d6b723d559cb" +dependencies = [ + "once_cell", + "sys-info", +] + [[package]] name = "mio" version = "0.6.23" @@ -2993,9 +3095,9 @@ dependencies = [ [[package]] name = "modularize_imports" -version = "0.26.11" +version = "0.27.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a0afe8dd51536ab2038f14324245d53effcc3934ba646479f28834744209a7c" +checksum = "f8907a5e244f284ed9435687cfdfe0446a6ddeabc3948c26323ecd3389958d26" dependencies = [ "convert_case 0.5.0", "handlebars", @@ -3019,13 +3121,13 @@ checksum = "7843ec2de400bcbc6a6328c958dc38e5359da6e93e72e37bc5246bf1ae776389" [[package]] name = "napi" -version = "2.12.1" +version = "2.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8de689526aff547ad70ad7feef42f1a5ccaa6f768910fd93984dae25a3fc9699" +checksum = "69b29acdc6cc5c918c3eabd51d241b1c6dfa8914f3552fcfd76e1d7536934581" dependencies = [ "anyhow", - "bitflags 2.0.2", - "ctor", + "bitflags 2.2.1", + "ctor 0.2.0", "napi-derive", "napi-sys", "once_cell", @@ -3042,9 +3144,9 @@ checksum = "882a73d9ef23e8dc2ebbffb6a6ae2ef467c0f18ac10711e4cc59c5485d41df0e" [[package]] name = "napi-derive" -version = "2.12.2" +version = "2.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6bd0beb0ac7e8576bc92d293361a461b42eaf41740bbdec7e0cbf64d8dc89f7" +checksum = "af2ac63101a19228b0881694cac07468d642fd10e4f943a9c9feebeebf1a4787" dependencies = [ "convert_case 0.6.0", "napi-derive-backend", @@ -3055,9 +3157,9 @@ dependencies = [ [[package]] name = "napi-derive-backend" -version = "1.0.48" +version = "1.0.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c713ff9ff5baa6d6ad9aedc46fad73c91e2f16ebe5ece0f41983d4e70e020c7c" +checksum = "0e32b5bc4d803e40b783b0aa3fe488eac8711cfaa4c5c9915293dfd3d0b99925" dependencies = [ "convert_case 0.6.0", "once_cell", @@ -3119,31 +3221,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54" [[package]] -name = "next-binding" -version = "0.1.0" -dependencies = [ - "mdxjs", - "modularize_imports", - "next-build", - "next-dev", - "node-file-trace", - "styled_components", - "styled_jsx", - "swc_core", - "swc_emotion", - "testing", -] - -[[package]] -name = "next-build" +name = "next-build" version = "0.1.0" dependencies = [ "anyhow", "next-core", - "turbo-malloc", - "turbo-tasks", - "turbo-tasks-build", - "turbo-tasks-memory", + "turbo-binding", "vergen", ] @@ -3153,10 +3236,12 @@ version = "0.1.0" dependencies = [ "allsorts", "anyhow", - "auto-hash-map", + "async-recursion", + "async-trait", "futures", "indexmap", "indoc", + "lazy_static", "mime", "next-transform-dynamic", "next-transform-font", @@ -3167,20 +3252,9 @@ dependencies = [ "serde", "serde_json", "swc_core", + "turbo-binding", "turbo-tasks", - "turbo-tasks-build", - "turbo-tasks-bytes", - "turbo-tasks-env", - "turbo-tasks-fetch", "turbo-tasks-fs", - "turbo-tasks-hash", - "turbopack", - "turbopack-core", - "turbopack-dev", - "turbopack-dev-server", - "turbopack-ecmascript", - "turbopack-env", - "turbopack-node", ] [[package]] @@ -3194,6 +3268,7 @@ dependencies = [ "criterion", "dunce", "futures", + "indexmap", "mime", "next-core", "nix", @@ -3208,19 +3283,8 @@ dependencies = [ "tempfile", "tokio", "tungstenite 0.17.3", - "turbo-malloc", + "turbo-binding", "turbo-tasks", - "turbo-tasks-build", - "turbo-tasks-fs", - "turbo-tasks-memory", - "turbo-tasks-testing", - "turbopack", - "turbopack-cli-utils", - "turbopack-core", - "turbopack-create-test-app", - "turbopack-dev", - "turbopack-dev-server", - "turbopack-node", "url", "vergen", "webbrowser", @@ -3249,17 +3313,8 @@ dependencies = [ "testing", "tokio", "tungstenite 0.17.3", - "turbo-malloc", + "turbo-binding", "turbo-tasks", - "turbo-tasks-build", - "turbo-tasks-fs", - "turbo-tasks-memory", - "turbo-tasks-testing", - "turbopack-cli-utils", - "turbopack-core", - "turbopack-dev-server", - "turbopack-node", - "turbopack-test-utils", "url", "webbrowser", ] @@ -3273,7 +3328,6 @@ dependencies = [ "either", "fxhash", "hex", - "next-binding", "next-transform-font", "once_cell", "pathdiff", @@ -3281,8 +3335,8 @@ dependencies = [ "serde", "serde_json", "sha1 0.10.5", - "swc_relay", "tracing", + "turbo-binding", "walkdir", ] @@ -3292,11 +3346,14 @@ version = "0.0.0" dependencies = [ "anyhow", "backtrace", + "dhat", "fxhash", "napi", "napi-build", "napi-derive", - "next-binding", + "next-build", + "next-core", + "next-dev", "next-swc", "once_cell", "sentry", @@ -3306,10 +3363,8 @@ dependencies = [ "tracing-chrome", "tracing-futures", "tracing-subscriber", - "turbo-malloc", + "turbo-binding", "turbo-tasks", - "turbo-tasks-memory", - "turbopack", ] [[package]] @@ -3358,14 +3413,12 @@ dependencies = [ [[package]] name = "node-file-trace" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230328.1#0f3d9675322b680faee0fec8976bf11ed36de2f9" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230508.2#b9e5e6d750c048bb083bfa60941554c479f6685f" dependencies = [ "anyhow", - "clap 4.1.11", "serde", "serde_json", "tokio", - "turbo-malloc", "turbo-tasks", "turbo-tasks-build", "turbo-tasks-fs", @@ -3450,6 +3503,17 @@ dependencies = [ "num-traits", ] +[[package]] +name = "num-rational" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + [[package]] name = "num-traits" version = "0.2.15" @@ -3470,24 +3534,33 @@ dependencies = [ ] [[package]] -name = "objc" -version = "0.2.7" +name = "num_enum" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1" +checksum = "1f646caf906c20226733ed5b1374287eb97e3c2a5c227ce668c1f2ce20ae57c9" dependencies = [ - "malloc_buf", + "num_enum_derive", ] [[package]] -name = "object" -version = "0.28.4" +name = "num_enum_derive" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e42c982f2d955fac81dd7e1d0e1426a7d702acd9c98d19ab01083a6a0328c424" +checksum = "dcbff9bc912032c62bf65ef1d5aea88983b420f4f839db1e9b0c281a25c9c799" dependencies = [ - "crc32fast", - "hashbrown 0.11.2", - "indexmap", - "memchr", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "objc" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1" +dependencies = [ + "malloc_buf", ] [[package]] @@ -3871,6 +3944,19 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "png" +version = "0.17.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aaeebc51f9e7d2c150d3f3bfeb667f2aa985db5ef1e3d212847bdedb488beeaa" +dependencies = [ + "bitflags 1.3.2", + "crc32fast", + "fdeflate", + "flate2", + "miniz_oxide 0.7.1", +] + [[package]] name = "polling" version = "2.6.0" @@ -3910,9 +3996,9 @@ checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" [[package]] name = "preset_env_base" -version = "0.4.0" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db4a43af74678e784b17db952b7fd726937b0a058c7c972624ddfd366e7603e4" +checksum = "b09a48d8ea8b031bde7755cdf6f87f7123a0cbefc36b0cd09cbb2de726594393" dependencies = [ "ahash", "anyhow", @@ -3932,7 +4018,7 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a25e9bcb20aa780fd0bb16b72403a9064d6b3f22f026946029acb941a50af755" dependencies = [ - "ctor", + "ctor 0.1.26", "diff", "output_vt100", "yansi", @@ -3948,6 +4034,16 @@ dependencies = [ "indexmap", ] +[[package]] +name = "proc-macro-crate" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" +dependencies = [ + "once_cell", + "toml_edit", +] + [[package]] name = "proc-macro-error" version = "1.0.4" @@ -3980,9 +4076,9 @@ checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" [[package]] name = "proc-macro2" -version = "1.0.53" +version = "1.0.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba466839c78239c09faf015484e5cc04860f88242cff4d03eb038f04b4699b73" +checksum = "2b63bdb0cd06f1f4dedf69b254734f9b45af66e4a031e42a7480257d9898b435" dependencies = [ "unicode-ident", ] @@ -4048,6 +4144,17 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "pulldown-cmark" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffade02495f22453cd593159ea2f59827aae7f53fa8323f756799b670881dcf8" +dependencies = [ + "bitflags 1.3.2", + "memchr", + "unicase", +] + [[package]] name = "qstring" version = "0.7.2" @@ -4145,6 +4252,15 @@ dependencies = [ "bitflags 1.3.2", ] +[[package]] +name = "redox_syscall" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +dependencies = [ + "bitflags 1.3.2", +] + [[package]] name = "redox_users" version = "0.4.3" @@ -4157,25 +4273,26 @@ dependencies = [ ] [[package]] -name = "regalloc" -version = "0.0.34" +name = "regalloc2" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62446b1d3ebf980bdc68837700af1d77b37bc430e524bf95319c6eada2a4cc02" +checksum = "300d4fbfb40c1c66a78ba3ddd41c1110247cf52f97b87d0f2fc9209bd49b030c" dependencies = [ + "fxhash", "log", - "rustc-hash", + "slice-group-by", "smallvec", ] [[package]] name = "regex" -version = "1.7.2" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cce168fea28d3e05f158bda4576cf0c844d5045bc2cc3620fa0292ed5bb5814c" +checksum = "ac6cf59af1067a3fb53fbe5c88c053764e930f932be1d71d3ffe032cbe147f59" dependencies = [ "aho-corasick", "memchr", - "regex-syntax", + "regex-syntax 0.7.0", ] [[package]] @@ -4184,7 +4301,7 @@ version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" dependencies = [ - "regex-syntax", + "regex-syntax 0.6.29", ] [[package]] @@ -4193,6 +4310,12 @@ version = "0.6.29" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" +[[package]] +name = "regex-syntax" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6868896879ba532248f33598de5181522d8b3d9d724dfd230911e1a7d4822f5" + [[package]] name = "region" version = "3.0.0" @@ -4213,9 +4336,9 @@ checksum = "4bf2521270932c3c7bed1a59151222bd7643c79310f2916f01925e1e16255698" [[package]] name = "rend" -version = "0.3.6" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79af64b4b6362ffba04eef3a4e10829718a4896dac19daa741851c86781edf95" +checksum = "581008d2099240d37fb08d77ad713bcaec2c4d89d50b5b21a8bb1996bbab68ab" dependencies = [ "bytecheck", ] @@ -4271,7 +4394,7 @@ dependencies = [ "cc", "libc", "once_cell", - "spin", + "spin 0.5.2", "untrusted", "web-sys", "winapi 0.3.9", @@ -4279,12 +4402,13 @@ dependencies = [ [[package]] name = "rkyv" -version = "0.7.37" +version = "0.7.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f08c8062c1fe1253064043b8fc07bfea1b9702b71b4a86c11ea3588183b12e1" +checksum = "21499ed91807f07ae081880aabb2ccc0235e9d88011867d984525e9a4c3cfa3e" dependencies = [ "bytecheck", - "hashbrown 0.12.3", + "hashbrown", + "indexmap", "ptr_meta", "rend", "rkyv_derive", @@ -4293,9 +4417,9 @@ dependencies = [ [[package]] name = "rkyv_derive" -version = "0.7.37" +version = "0.7.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e289706df51226e84814bf6ba1a9e1013112ae29bc7a9878f73fce360520c403" +checksum = "ac1c672430eb41556291981f45ca900a0239ad007242d1cb4b4167af842db666" dependencies = [ "proc-macro2", "quote", @@ -4304,9 +4428,9 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.21" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342" +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" [[package]] name = "rustc-hash" @@ -4357,16 +4481,16 @@ dependencies = [ [[package]] name = "rustix" -version = "0.37.3" +version = "0.37.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b24138615de35e32031d041a09032ef3487a616d901ca4db224e7d557efae2" +checksum = "f79bef90eb6d984c72722595b5b1348ab39275a5e5123faca6863bf07d75a4e0" dependencies = [ "bitflags 1.3.2", - "errno 0.3.0", + "errno 0.3.1", "io-lifetimes", "libc", - "linux-raw-sys 0.3.0", - "windows-sys 0.45.0", + "linux-raw-sys 0.3.3", + "windows-sys 0.48.0", ] [[package]] @@ -4607,9 +4731,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.158" +version = "1.0.160" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "771d4d9c4163ee138805e12c710dd365e4f44be8be0503cb1bb9eb989425d9c9" +checksum = "bb2f3770c8bce3bcda7e149193a069a0f4365bda1fa5cd88e03bca26afc1216c" dependencies = [ "serde_derive", ] @@ -4634,22 +4758,32 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_cbor" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bef2ebfde456fb76bbcf9f59315333decc4fda0b2b44b420243c11e0f5ec1f5" +dependencies = [ + "half", + "serde", +] + [[package]] name = "serde_derive" -version = "1.0.158" +version = "1.0.160" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e801c1712f48475582b7696ac71e0ca34ebb30e09338425384269d9717c62cad" +checksum = "291a097c63d8497e00160b166a967a4a79c64f3facdd01cbd7502231688d77df" dependencies = [ "proc-macro2", "quote", - "syn 2.0.8", + "syn 2.0.15", ] [[package]] name = "serde_json" -version = "1.0.94" +version = "1.0.96" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c533a59c9d8a93a09c6ab31f0fd5e5f4dd1b8fc9434804029839884765d04ea" +checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1" dependencies = [ "indexmap", "itoa", @@ -4699,6 +4833,46 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_with" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "331bb8c3bf9b92457ab7abecf07078c13f7d270ba490103e84e8b014490cd0b0" +dependencies = [ + "base64 0.13.1", + "chrono", + "hex", + "indexmap", + "serde", + "serde_json", + "serde_with_macros", + "time 0.3.20", +] + +[[package]] +name = "serde_with_macros" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "859011bddcc11f289f07f467cc1fe01c7a941daa4d8f6c40d4d1c92eb6d9319c" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "serde_yaml" +version = "0.8.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "578a7433b776b56a35785ed5ce9a7e777ac0598aac5a6dd1b4b18a307c7fc71b" +dependencies = [ + "indexmap", + "ryu", + "serde", + "yaml-rust", +] + [[package]] name = "serde_yaml" version = "0.9.19" @@ -4769,6 +4943,15 @@ dependencies = [ "lazy_static", ] +[[package]] +name = "shellexpand" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ccc8076840c4da029af4f87e4e8daeb0fca6b87bbb02e10cb60b791450e11e4" +dependencies = [ + "dirs", +] + [[package]] name = "signal-hook" version = "0.3.15" @@ -4799,6 +4982,12 @@ dependencies = [ "libc", ] +[[package]] +name = "simd-adler32" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "238abfbb77c1915110ad968465608b68e869e0772622c9656714e73e5a1a522f" + [[package]] name = "simdutf8" version = "0.1.4" @@ -4826,6 +5015,12 @@ dependencies = [ "autocfg", ] +[[package]] +name = "slice-group-by" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03b634d87b960ab1a38c4fe143b508576f075e7c978bfad18217645ebfdfa2ec" + [[package]] name = "sluice" version = "0.5.5" @@ -4891,11 +5086,20 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +dependencies = [ + "lock_api", +] + [[package]] name = "st-map" -version = "0.1.6" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc9c9f3a1df5f73b7392bd9773108fef41ad9126f0282412fd5904389f0c0c4f" +checksum = "f09d891835f076b0d4a58dd4478fb54d47aa3da1f7a4c6e89ad6c791357ab5ed" dependencies = [ "arrayvec", "static-map-macro", @@ -4931,9 +5135,9 @@ dependencies = [ [[package]] name = "static-map-macro" -version = "0.2.3" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "752564de9cd8937fdbc1c55d47ac391758c352ab3755607cc391b659fe87d56b" +checksum = "b862d598fbc9f7085b017890e2e61433f501e7467f2c585323e1aa3c07ef8599" dependencies = [ "pmutil", "proc-macro2", @@ -5024,9 +5228,9 @@ dependencies = [ [[package]] name = "string_enum" -version = "0.3.3" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41491e23e7db79343236a6ced96325ff132eb09e29ac4c5b8132b9c55aaaae89" +checksum = "0090512bdfee4b56d82480d66c0fd8a6f53f0fe0f97e075e949b252acdd482e0" dependencies = [ "pmutil", "proc-macro2", @@ -5043,9 +5247,9 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "styled_components" -version = "0.53.11" +version = "0.54.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5e4d3762e21cd415d838b60b9007e2de112203f096f1c68aef32eb3465ef5d8" +checksum = "6ac87c3150a2b7d834d1469d4b06d05fbe111b6378ccfab98f58f357be062417" dependencies = [ "Inflector", "once_cell", @@ -5057,9 +5261,9 @@ dependencies = [ [[package]] name = "styled_jsx" -version = "0.30.11" +version = "0.31.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a95db8d0df1301fa85243cbd0fbe3328a12d1e0d48eac0638d3dc295d4d7811c" +checksum = "88365f6c83fa4bfb4b29a75ca1d353d940f4ac44a535907467ad624bfd90f24d" dependencies = [ "easy-error", "swc_core", @@ -5102,9 +5306,9 @@ dependencies = [ [[package]] name = "swc" -version = "0.255.23" +version = "0.260.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23d93b381ac343f8548ef10a400aaf91604e94258e5c11753cece061275ed4c1" +checksum = "5244c29808af3900e02287da1b5a781d9feca5a332c205932abae074e7d2d40a" dependencies = [ "ahash", "anyhow", @@ -5154,9 +5358,9 @@ dependencies = [ [[package]] name = "swc_atoms" -version = "0.4.39" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ebef84c2948cd0d1ba25acbf1b4bd9d80ab6f057efdbe35d8449b8d54699401" +checksum = "593c2f3e4cea60ddc4179ed731cabebe7eacec209d9e76a3bbcff4b2b020e3f5" dependencies = [ "once_cell", "rkyv", @@ -5169,9 +5373,9 @@ dependencies = [ [[package]] name = "swc_bundler" -version = "0.208.19" +version = "0.213.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30d90393e5ac143a687f422f288bc706e3139a862d4c790cf301086aabd0cdf9" +checksum = "715835a6f035f1bccf40fb1f8afa95c6d76107f5f1d27735b50490b90685699c" dependencies = [ "ahash", "anyhow", @@ -5216,9 +5420,9 @@ dependencies = [ [[package]] name = "swc_common" -version = "0.29.37" +version = "0.31.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5005cd73617e18592faa31298225b26f1c407b84a681d67efb735c3d3458e101" +checksum = "6f876f826866e402da364d77aa97448fdf67cb4aeb6a5f1c0de39cacf35aa89a" dependencies = [ "ahash", "anyhow", @@ -5249,9 +5453,9 @@ dependencies = [ [[package]] name = "swc_config" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4de36224eb9498fccd4e68971f0b83326ccf8592c2d424f257f3a1c76b2b211" +checksum = "89c8fc2c12bb1634c7c32fc3c9b6b963ad8f034cc62c4ecddcf215dc4f6f959d" dependencies = [ "indexmap", "serde", @@ -5261,9 +5465,9 @@ dependencies = [ [[package]] name = "swc_config_macro" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb64bc03d90fd5c90d6ab917bb2b1d7fbd31957df39e31ea24a3f554b4372251" +checksum = "7dadb9998d4f5fc36ef558ed5a092579441579ee8c6fcce84a5228cca9df4004" dependencies = [ "pmutil", "proc-macro2", @@ -5274,9 +5478,9 @@ dependencies = [ [[package]] name = "swc_core" -version = "0.69.23" +version = "0.75.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d13d1df11c7a0c2876ccf36bda91da3686310fb0ab853a22aac5496e02e5e9f" +checksum = "c604661086151ef0cfe2dff7740cd5fbdd06685d2eb03367024c3990d214b168" dependencies = [ "binding_macros", "swc", @@ -5308,22 +5512,19 @@ dependencies = [ "swc_ecma_transforms_typescript", "swc_ecma_utils", "swc_ecma_visit", - "swc_node_base", "swc_nodejs_common", "swc_plugin_proxy", "swc_plugin_runner", "swc_trace_macro", "testing", "vergen", - "wasmer", - "wasmer-wasi", ] [[package]] name = "swc_css_ast" -version = "0.134.11" +version = "0.137.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b00eeb01472c11945107c881525e6ce89c2596cf7965e51f847a8029916ce7e9" +checksum = "2fadc4b9192ee616e7cba2c1612ae79a616546e23856ab23edb5db9c43e9612a" dependencies = [ "is-macro", "serde", @@ -5334,12 +5535,12 @@ dependencies = [ [[package]] name = "swc_css_codegen" -version = "0.144.14" +version = "0.147.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbfa6ae6065fa3a75c3bd9d4e8747d692a57ab5ac3259c5b3e5811965cce92d4" +checksum = "0d27c1d2b7ebf21cc5cfe5e7b3d7e08a038a5aa7fc93ea263aa4bd7dc0641bca" dependencies = [ "auto_impl", - "bitflags 1.3.2", + "bitflags 2.2.1", "rustc-hash", "serde", "swc_atoms", @@ -5351,9 +5552,9 @@ dependencies = [ [[package]] name = "swc_css_codegen_macros" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe27425548d11afee43ddbe1d0cd882cb5e042f61b1503651dae2219c92333f5" +checksum = "01c132d9ba562343f7c49d776c4a09b362a4a4104b7cb0a0f7b785986a492e1b" dependencies = [ "pmutil", "proc-macro2", @@ -5364,11 +5565,11 @@ dependencies = [ [[package]] name = "swc_css_compat" -version = "0.20.14" +version = "0.23.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608c5e294e2fcbea240831e02863c68e765d2508c42cc3bda492a18198e3081f" +checksum = "8b8dbb86390644c9c6d230f294d5cf528964d84206a65bd48b08b1875b2ef0d4" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.2.1", "once_cell", "serde", "serde_json", @@ -5381,9 +5582,9 @@ dependencies = [ [[package]] name = "swc_css_modules" -version = "0.21.16" +version = "0.25.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d3b768156027bb4f57cefa4eec66d2f2b122eb81937c62f2f820123b7617727" +checksum = "650f2adbf58150567564846accb31a22278735192e9f40a6dc9e319cfc1ede99" dependencies = [ "rustc-hash", "serde", @@ -5397,11 +5598,11 @@ dependencies = [ [[package]] name = "swc_css_parser" -version = "0.143.12" +version = "0.146.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab4dc464bb7b97db5cb057164af91d1a374bffa48170d67604c7f3158639ed27" +checksum = "1a14a42f39156a50d34f1e3d351c534b4929b27b7b47135055fa2a9a06649ea7" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.2.1", "lexical", "serde", "swc_atoms", @@ -5411,9 +5612,9 @@ dependencies = [ [[package]] name = "swc_css_prefixer" -version = "0.146.14" +version = "0.149.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97fb14aeb39b8b43c2c84b4ec8ed3d7af419204385621dcd837a9d0cf8da9cbb" +checksum = "6c12cf20c0e40ea4793ac3d23a04969e9badfc3f9cc478c562f60f1e302fd80f" dependencies = [ "once_cell", "preset_env_base", @@ -5428,9 +5629,9 @@ dependencies = [ [[package]] name = "swc_css_utils" -version = "0.131.12" +version = "0.134.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a18df9c717eec8ff9760a27c7337c507a10b23ec301dbc23249dadf7ba78524" +checksum = "6360cbced8a80618320b5d143299bb8c9684c71a46facc01fe648b198bf0200d" dependencies = [ "once_cell", "serde", @@ -5443,9 +5644,9 @@ dependencies = [ [[package]] name = "swc_css_visit" -version = "0.133.11" +version = "0.136.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc2080e5a67f015365661e5bd26cd7d8cf766395eaa9c4dc95ef58054af624e3" +checksum = "7e6749283744944ee224fd0199ae218fdc4c3b3d1b51e176ee43caf47ae0d67a" dependencies = [ "serde", "swc_atoms", @@ -5456,11 +5657,11 @@ dependencies = [ [[package]] name = "swc_ecma_ast" -version = "0.100.3" +version = "0.103.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b135a8de6b20bcc99711a95e6c7c2ffd75e2ce7ef530e67eec4093bd3d063e0" +checksum = "1087786027e9e938588c0a66d45d1044a5e2285922b0928e023303f03a60900f" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.2.1", "is-macro", "num-bigint", "rkyv", @@ -5474,9 +5675,9 @@ dependencies = [ [[package]] name = "swc_ecma_codegen" -version = "0.135.8" +version = "0.138.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5eea38f0aa2bdafb48927cb30a714ad6cc27c17cd40a867ab1f2c0782e6080e6" +checksum = "807e07eda1b7f45971ec9a65c9ac032bf53acd0b02dae4456bbcfef3d47da95c" dependencies = [ "memchr", "num-bigint", @@ -5493,9 +5694,9 @@ dependencies = [ [[package]] name = "swc_ecma_codegen_macros" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0159c99f81f52e48fe692ef7af1b0990b45d3006b14c6629be0b1ffee1b23aea" +checksum = "bf4ee0caee1018808d94ecd09490cb7affd3d504b19aa11c49238f5fc4b54901" dependencies = [ "pmutil", "proc-macro2", @@ -5506,9 +5707,9 @@ dependencies = [ [[package]] name = "swc_ecma_ext_transforms" -version = "0.99.8" +version = "0.102.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdc9c335e425617120ec2f2af01c59541571afd7d834b9d7c312faf9d8acc7c4" +checksum = "d7a2bdc37df46e96aedfbb422fc44f48ca3ee69109e8fe0f130d8454e67dce59" dependencies = [ "phf", "swc_atoms", @@ -5520,9 +5721,9 @@ dependencies = [ [[package]] name = "swc_ecma_lints" -version = "0.77.13" +version = "0.81.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "463fd2faab68aad3197670627ec7d9a9250cfe28641afa8a8c7aa8d21d6014df" +checksum = "fb9588ec5320276cda7f4770dcedf00224014702b7b314c1c27590f74247ad3d" dependencies = [ "ahash", "auto_impl", @@ -5541,9 +5742,9 @@ dependencies = [ [[package]] name = "swc_ecma_loader" -version = "0.41.39" +version = "0.43.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "681c1fbb762c82700a5bd23dc39bad892a287ea9fb2121cf56e77f1ddc89afeb" +checksum = "1b853be4b7380384dc3bac5564697c1ba30b47eff94b81449567032fa44d3d0c" dependencies = [ "ahash", "anyhow", @@ -5563,9 +5764,9 @@ dependencies = [ [[package]] name = "swc_ecma_minifier" -version = "0.175.19" +version = "0.180.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89c2cd0cb9f66b75be8ba3ae6122a7989afe0f45af5ea72a1ab6755240e6183c" +checksum = "e31075982125fca1d7e023d05aa779f4cb566494fbaba1a0cf5db4ef1a573b4a" dependencies = [ "ahash", "arrayvec", @@ -5599,12 +5800,11 @@ dependencies = [ [[package]] name = "swc_ecma_parser" -version = "0.130.7" +version = "0.133.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b79a4d3b941551a586d2dc06bd05ef654e500ce1e1da2425a3a97b98cecd282b" +checksum = "2fa9f6dab04b0e4d148fab7069ecb896ae6e9a3e3ec94a493d52d1d16a780cda" dependencies = [ "either", - "enum_kind", "lexical", "num-bigint", "serde", @@ -5620,9 +5820,9 @@ dependencies = [ [[package]] name = "swc_ecma_preset_env" -version = "0.189.17" +version = "0.194.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33f5d2be1bdf27dec511d2108c0bc25f0f955a248b2d307b352a45eac7fcf117" +checksum = "b0a377e83fbf99e2fa78126d5d5db2c93e75c0c348e5b06e55460137f32b3640" dependencies = [ "ahash", "anyhow", @@ -5645,9 +5845,9 @@ dependencies = [ [[package]] name = "swc_ecma_quote_macros" -version = "0.41.7" +version = "0.44.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bf398b83e9b77ee80fca2bb079cd3495f3d2e1b52ccb7645f1b33b395d6410e" +checksum = "09d225ec68bc21334b840d9a0c9f20d26a8fa2854708d549ef8572be54c9b033" dependencies = [ "anyhow", "pmutil", @@ -5675,9 +5875,9 @@ dependencies = [ [[package]] name = "swc_ecma_transforms" -version = "0.212.17" +version = "0.217.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad7490393ee05987fe77719bd965ce853f760e20dac1dab53129b8d636dc46c1" +checksum = "dea5aef62b3ecbc1ea2557c27c500ed9b452abaf13d6142ce8bc553493341086" dependencies = [ "swc_atoms", "swc_common", @@ -5695,12 +5895,12 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_base" -version = "0.122.13" +version = "0.126.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96253f9d410d18a9aae6c7f59ddc697dd78dcd130f5d1a8750cc5b8f5d71472e" +checksum = "96b6521512d072b082071a569d1aaad638bab56b9a18c9d88edc436055fe13ca" dependencies = [ "better_scoped_tls", - "bitflags 1.3.2", + "bitflags 2.2.1", "indexmap", "once_cell", "phf", @@ -5719,9 +5919,9 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_classes" -version = "0.111.13" +version = "0.115.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fc315b53be4d9004134001b46258b32fee64ebc5dd964f72c2b1258324246a7" +checksum = "959c65d67ba1bbb0f7b70042e0d75e92e7c68df9d98d3e3992ccbdd4e5c4fa2e" dependencies = [ "swc_atoms", "swc_common", @@ -5733,9 +5933,9 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_compat" -version = "0.148.15" +version = "0.152.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5a1a4a3c413bfd03e38e8ee9fb9bb761f478ebe4f8b1f51e154375fcc1ca17a" +checksum = "ae0a611e9693f61e7e55413665a39b93e2af784acb1a77d4badeaadca64d35ce" dependencies = [ "ahash", "arrayvec", @@ -5760,9 +5960,9 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_macros" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebf907935ec5492256b523ae7935a824d9fdc0368dcadc41375bad0dca91cd8b" +checksum = "984d5ac69b681fc5438f9abf82b0fda34fe04e119bc75f8213b7e01128c7c9a2" dependencies = [ "pmutil", "proc-macro2", @@ -5773,14 +5973,14 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_module" -version = "0.165.15" +version = "0.169.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f53c50506abc0db9a768b190d28dbc6968844d6f6f7fe98967f01bf4c0890ba" +checksum = "5c5a0fc4624b1b07ca4928e3897888367c65deb1777a163b26c7a2e169160277" dependencies = [ "Inflector", "ahash", "anyhow", - "bitflags 1.3.2", + "bitflags 2.2.1", "indexmap", "is-macro", "path-clean", @@ -5801,9 +6001,9 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_optimization" -version = "0.181.17" +version = "0.186.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08181f21f6bafb718ef3bed83817545f53af69852550177de19cc20d618a95b7" +checksum = "74fe6203e8397ab483fe8f1bd676dce5a6e493b10ad287243cf740a08e3ec315" dependencies = [ "ahash", "dashmap", @@ -5827,11 +6027,12 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_proposal" -version = "0.156.15" +version = "0.160.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "478c09b747e7829d22f6fe393fb002487133483967d4bd051d9b69a1d5d65a8a" +checksum = "7ed9af008da8b354ed0c27a910532163a3734dfbb5dab0a460ff2ebd6ebd7004" dependencies = [ "either", + "rustc-hash", "serde", "smallvec", "swc_atoms", @@ -5846,9 +6047,9 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_react" -version = "0.167.17" +version = "0.172.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a423b55598ab93ecd4e2a232b9f9a33a0e742b9ba2229a00972ead82bf0a6693" +checksum = "d393985bafe0680c03d3d016b4172fcb293499f97e82418d63673a11310029c3" dependencies = [ "ahash", "base64 0.13.1", @@ -5856,7 +6057,6 @@ dependencies = [ "indexmap", "once_cell", "rayon", - "regex", "serde", "sha-1", "string_enum", @@ -5873,9 +6073,9 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_testing" -version = "0.125.13" +version = "0.129.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f07bfbd7b8739ad54b564b2c19476978cd4d48ada980307a20469021c3343938" +checksum = "e3109919ceca5dc1a89721a2d3ed43917f7fc53eeb87433a020a810286b85ba0" dependencies = [ "ansi_term", "anyhow", @@ -5899,9 +6099,9 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_typescript" -version = "0.171.17" +version = "0.176.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39ba6c548f2b4ad7e1b71c85c4771242a800886547933129f41a7877a5c47332" +checksum = "70968fd6bafd8511037ecadb3f89bfe97c3e8c4560dd04a5a291679a77eee84a" dependencies = [ "serde", "swc_atoms", @@ -5915,9 +6115,9 @@ dependencies = [ [[package]] name = "swc_ecma_usage_analyzer" -version = "0.9.9" +version = "0.12.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ab0dcc471e8a980062c21257070ed522f48e77f83e61f2522f8a26f96f6ce89" +checksum = "e5cc3026867838b0ed45d7b341973beac5b1154c66d47963a328f7f373343d03" dependencies = [ "ahash", "indexmap", @@ -5933,9 +6133,9 @@ dependencies = [ [[package]] name = "swc_ecma_utils" -version = "0.113.8" +version = "0.116.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d422284424a29a95ce5d896ab4f8da35316cd0291e15759c0aae30abd2947be" +checksum = "547cce84256af2ce8b9ee44669872dc514c9e1fe737ab1bd517c4bd21038b7d8" dependencies = [ "indexmap", "num_cpus", @@ -5952,9 +6152,9 @@ dependencies = [ [[package]] name = "swc_ecma_visit" -version = "0.86.4" +version = "0.89.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cb3aaa504f9a520cb73e8d361d30aaceeb8643cc2f048e0dc1808d213ef76a9" +checksum = "4490a5ed042234d72986e1a0c8afb54291fcf82b42af78ea72507b52bcbe13dd" dependencies = [ "num-bigint", "swc_atoms", @@ -5966,9 +6166,9 @@ dependencies = [ [[package]] name = "swc_emotion" -version = "0.29.11" +version = "0.30.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b32d130dc10d63b2f6ccf8d59c693748f0b41ed80ae79df56476f69ac687c9b" +checksum = "06838d609bf7d97d834b06ed2f6c32a593160e9c44977ace88038e249f2e9b43" dependencies = [ "base64 0.13.1", "byteorder", @@ -5996,9 +6196,9 @@ dependencies = [ [[package]] name = "swc_error_reporters" -version = "0.13.38" +version = "0.15.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5652942f29f76b08bc2a23228e87c8dff1f037de17d18166753e90f4baacf61" +checksum = "3afbf2e52ddce38da1ee204252f7b9019a12176ca73aaa0fd0c36ded1ecbec7d" dependencies = [ "anyhow", "miette", @@ -6009,21 +6209,21 @@ dependencies = [ [[package]] name = "swc_fast_graph" -version = "0.17.38" +version = "0.19.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3a720ad8028d6c6e992039c862ed7318d143dee3994929793f59067fd69600b" +checksum = "95683baee47d2cbf10e0bf8ad14d4e8f6160674d9eb96b3ab560aa39fa37ccdc" dependencies = [ - "ahash", "indexmap", "petgraph", + "rustc-hash", "swc_common", ] [[package]] name = "swc_graph_analyzer" -version = "0.18.41" +version = "0.20.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b25ac475500b0776f1bb82da02eff867819b3c653130023ea957cbd1e91befa8" +checksum = "4812745a05bf856948b7ada6f1f1f8d2c4be0afa060844532798165b4c76416e" dependencies = [ "ahash", "auto_impl", @@ -6034,9 +6234,9 @@ dependencies = [ [[package]] name = "swc_macros_common" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4be988307882648d9bc7c71a6a73322b7520ef0211e920489a98f8391d8caa2" +checksum = "3e582c3e3c2269238524923781df5be49e011dbe29cf7683a2215d600a562ea6" dependencies = [ "pmutil", "proc-macro2", @@ -6044,21 +6244,11 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "swc_node_base" -version = "0.5.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6065892f97ac3f42280d0f3eadc351aeff552e8de4d459604bcd9c56eb799ade" -dependencies = [ - "mimalloc-rust", - "tikv-jemallocator", -] - [[package]] name = "swc_node_comments" -version = "0.16.37" +version = "0.18.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c762f79bc1f940df95655603298b3ea382765185e091360d7f895475a5437a92" +checksum = "f7d3be08cc983291059f7a16a62ff297bdb83c1282cfe876416fd52b3466e791" dependencies = [ "ahash", "dashmap", @@ -6082,9 +6272,9 @@ dependencies = [ [[package]] name = "swc_plugin_proxy" -version = "0.29.3" +version = "0.32.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb64bf10458ef02e97ca7e43b75a3519373f97bf77728c50148799d87a14658c" +checksum = "4cd5b2880508aedc964f4f52a4debc07c4b48212b45b44522d651c701b1a4d84" dependencies = [ "better_scoped_tls", "rkyv", @@ -6096,9 +6286,9 @@ dependencies = [ [[package]] name = "swc_plugin_runner" -version = "0.91.7" +version = "0.94.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c790a1870b2f5460f72622ff7a2f72c16597608683e3bfa7feb762bc6392df0" +checksum = "9290518378028a7d0cf1a8ca52f5b0934c44bc0862155b6a52ec1c97a378601b" dependencies = [ "anyhow", "enumset", @@ -6113,15 +6303,14 @@ dependencies = [ "wasmer", "wasmer-cache", "wasmer-compiler-cranelift", - "wasmer-engine-universal", - "wasmer-wasi", + "wasmer-wasix", ] [[package]] name = "swc_relay" -version = "0.1.1" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1023f06fac2cfb3531b96edfa9e17cb66b1bbd7e91b13c981e72e3486ab310d" +checksum = "aaa02b6c66a7de1fe196d1787a5378a5fb91c67ec7acccd76052d6ec389b6d16" dependencies = [ "once_cell", "regex", @@ -6134,9 +6323,9 @@ dependencies = [ [[package]] name = "swc_timer" -version = "0.17.42" +version = "0.19.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d11afada7873b24725061271e1b3e49f2f8f625535fee2b4c55603b6f1a5fa0b" +checksum = "7d525672140610b0797da5ee7a3f5bcb0dbf13940c84d63c9f966c0239f26cb7" dependencies = [ "tracing", ] @@ -6154,9 +6343,9 @@ dependencies = [ [[package]] name = "swc_visit" -version = "0.5.4" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "470a1963cf182fdcbbac46e3a7fd2caf7329da0e568d3668202da9501c880e16" +checksum = "d1d5999f23421c8e21a0f2bc53a0b9e8244f3b421de89471561af2fbe40b9cca" dependencies = [ "either", "swc_visit_macros", @@ -6164,9 +6353,9 @@ dependencies = [ [[package]] name = "swc_visit_macros" -version = "0.5.5" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6098b717cfd4c85f5cddec734af191dbce461c39975ed567c32ac6d0c6d61a6d" +checksum = "ebeed7eb0f545f48ad30f5aab314e5208b735bcea1d1464f26e20f06db904989" dependencies = [ "Inflector", "pmutil", @@ -6189,9 +6378,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.8" +version = "2.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcc02725fd69ab9f26eab07fad303e2497fad6fb9eba4f96c4d1687bdf704ad9" +checksum = "a34fcf3e8b60f57e6a14301a2e916d323af98b0ea63c599441eec8558660c822" dependencies = [ "proc-macro2", "quote", @@ -6204,6 +6393,16 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" +[[package]] +name = "sys-info" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b3a0d0aba8bf96a0e1ddfdc352fc53b3df7f39318c71854910c3c4b024ae52c" +dependencies = [ + "cc", + "libc", +] + [[package]] name = "target-lexicon" version = "0.12.6" @@ -6212,15 +6411,25 @@ checksum = "8ae9980cab1db3fceee2f6c6f643d5d8de2997c58ee8d25fb0cc8a9e9e7348e5" [[package]] name = "tempfile" -version = "3.4.0" +version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af18f7ae1acd354b992402e9ec5864359d693cd8a79dcbef59f76891701c1e95" +checksum = "b9fbec84f381d5795b08656e4912bec604d162bff9291d6189a78f4c8ab87998" dependencies = [ "cfg-if 1.0.0", "fastrand", - "redox_syscall 0.2.16", - "rustix 0.36.11", - "windows-sys 0.42.0", + "redox_syscall 0.3.5", + "rustix 0.37.13", + "windows-sys 0.45.0", +] + +[[package]] +name = "term_size" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e4129646ca0ed8f45d09b929036bafad5377103edd06e50bf574b353d2b08d9" +dependencies = [ + "libc", + "winapi 0.3.9", ] [[package]] @@ -6242,11 +6451,20 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "termios" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "411c5bf740737c7918b8b1fe232dca4dc9f8e754b8ad5e20966814001ed0ac6b" +dependencies = [ + "libc", +] + [[package]] name = "testing" -version = "0.31.40" +version = "0.33.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dda8d4f62089d08b0575a92273f2c824ca6e3958cd23ad2a0eb3f25438a0e9c9" +checksum = "77e5fcdfc6805d181431333b850f9fde170f654148e29ba97fd8033c7814e665" dependencies = [ "ansi_term", "difference", @@ -6312,9 +6530,15 @@ checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.8", + "syn 2.0.15", ] +[[package]] +name = "thousands" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3bf63baf9f5039dadc247375c29eb13706706cfde997d0330d05aa63a77d8820" + [[package]] name = "thread_local" version = "1.1.7" @@ -6325,27 +6549,6 @@ dependencies = [ "once_cell", ] -[[package]] -name = "tikv-jemalloc-sys" -version = "0.4.3+5.2.1-patched.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1792ccb507d955b46af42c123ea8863668fae24d03721e40cad6a41773dbb49" -dependencies = [ - "cc", - "fs_extra", - "libc", -] - -[[package]] -name = "tikv-jemallocator" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5b7bcecfafe4998587d636f9ae9d55eb9d0499877b88757767c346875067098" -dependencies = [ - "libc", - "tikv-jemalloc-sys", -] - [[package]] name = "time" version = "0.1.45" @@ -6449,14 +6652,13 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.26.0" +version = "1.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03201d01c3c27a29c8a5cee5b55a93ddae1ccf6f08f65365c2c918f8c1b76f64" +checksum = "d0de47a4eecbe11f498978a9b29d792f0d2692d1dd003650c24c76510e3bc001" dependencies = [ "autocfg", "bytes", "libc", - "memchr", "mio 0.8.6", "num_cpus", "parking_lot", @@ -6480,13 +6682,13 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "1.8.2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d266c00fde287f55d3f1c3e96c500c362a2b8c695076ec180f27918820bc6df8" +checksum = "61a573bdc87985e9d6ddeed1b3d864e8a302c847e40d647746df2f1de209d1ce" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.15", ] [[package]] @@ -6556,6 +6758,23 @@ dependencies = [ "serde", ] +[[package]] +name = "toml_datetime" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ab8ed2edee10b50132aed5f331333428b011c99402b5a534154ed15746f9622" + +[[package]] +name = "toml_edit" +version = "0.19.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "239410c8609e8125456927e6707163a3b1fdb40561e4b803bc041f466ccfdc13" +dependencies = [ + "indexmap", + "toml_datetime", + "winnow", +] + [[package]] name = "tonic" version = "0.8.3" @@ -6688,9 +6907,9 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.16" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6176eae26dd70d0c919749377897b54a9276bd7061339665dd68777926b5a70" +checksum = "30a651bc37f915e81f087d86e62a18eec5f79550c7faff886f7090b4ea757c77" dependencies = [ "matchers", "nu-ansi-term", @@ -6758,10 +6977,50 @@ dependencies = [ "utf-8", ] +[[package]] +name = "turbo-binding" +version = "0.1.0" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230508.2#b9e5e6d750c048bb083bfa60941554c479f6685f" +dependencies = [ + "auto-hash-map", + "mdxjs", + "modularize_imports", + "node-file-trace", + "styled_components", + "styled_jsx", + "swc_core", + "swc_emotion", + "swc_relay", + "testing", + "turbo-malloc", + "turbo-tasks", + "turbo-tasks-build", + "turbo-tasks-bytes", + "turbo-tasks-env", + "turbo-tasks-fetch", + "turbo-tasks-fs", + "turbo-tasks-hash", + "turbo-tasks-memory", + "turbo-tasks-testing", + "turbopack", + "turbopack-bench", + "turbopack-cli-utils", + "turbopack-core", + "turbopack-dev", + "turbopack-dev-server", + "turbopack-ecmascript", + "turbopack-ecmascript-plugins", + "turbopack-env", + "turbopack-image", + "turbopack-node", + "turbopack-static", + "turbopack-test-utils", +] + [[package]] name = "turbo-malloc" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230328.1#0f3d9675322b680faee0fec8976bf11ed36de2f9" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230508.2#b9e5e6d750c048bb083bfa60941554c479f6685f" dependencies = [ "mimalloc", ] @@ -6769,7 +7028,7 @@ dependencies = [ [[package]] name = "turbo-tasks" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230328.1#0f3d9675322b680faee0fec8976bf11ed36de2f9" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230508.2#b9e5e6d750c048bb083bfa60941554c479f6685f" dependencies = [ "anyhow", "auto-hash-map", @@ -6799,7 +7058,7 @@ dependencies = [ [[package]] name = "turbo-tasks-build" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230328.1#0f3d9675322b680faee0fec8976bf11ed36de2f9" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230508.2#b9e5e6d750c048bb083bfa60941554c479f6685f" dependencies = [ "anyhow", "cargo-lock", @@ -6811,7 +7070,7 @@ dependencies = [ [[package]] name = "turbo-tasks-bytes" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230328.1#0f3d9675322b680faee0fec8976bf11ed36de2f9" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230508.2#b9e5e6d750c048bb083bfa60941554c479f6685f" dependencies = [ "anyhow", "bytes", @@ -6826,7 +7085,7 @@ dependencies = [ [[package]] name = "turbo-tasks-env" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230328.1#0f3d9675322b680faee0fec8976bf11ed36de2f9" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230508.2#b9e5e6d750c048bb083bfa60941554c479f6685f" dependencies = [ "anyhow", "dotenvy", @@ -6840,7 +7099,7 @@ dependencies = [ [[package]] name = "turbo-tasks-fetch" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230328.1#0f3d9675322b680faee0fec8976bf11ed36de2f9" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230508.2#b9e5e6d750c048bb083bfa60941554c479f6685f" dependencies = [ "anyhow", "indexmap", @@ -6857,7 +7116,7 @@ dependencies = [ [[package]] name = "turbo-tasks-fs" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230328.1#0f3d9675322b680faee0fec8976bf11ed36de2f9" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230508.2#b9e5e6d750c048bb083bfa60941554c479f6685f" dependencies = [ "anyhow", "auto-hash-map", @@ -6886,7 +7145,7 @@ dependencies = [ [[package]] name = "turbo-tasks-hash" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230328.1#0f3d9675322b680faee0fec8976bf11ed36de2f9" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230508.2#b9e5e6d750c048bb083bfa60941554c479f6685f" dependencies = [ "base16", "hex", @@ -6898,7 +7157,7 @@ dependencies = [ [[package]] name = "turbo-tasks-macros" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230328.1#0f3d9675322b680faee0fec8976bf11ed36de2f9" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230508.2#b9e5e6d750c048bb083bfa60941554c479f6685f" dependencies = [ "anyhow", "convert_case 0.6.0", @@ -6912,7 +7171,7 @@ dependencies = [ [[package]] name = "turbo-tasks-macros-shared" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230328.1#0f3d9675322b680faee0fec8976bf11ed36de2f9" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230508.2#b9e5e6d750c048bb083bfa60941554c479f6685f" dependencies = [ "proc-macro2", "quote", @@ -6922,7 +7181,7 @@ dependencies = [ [[package]] name = "turbo-tasks-memory" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230328.1#0f3d9675322b680faee0fec8976bf11ed36de2f9" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230508.2#b9e5e6d750c048bb083bfa60941554c479f6685f" dependencies = [ "anyhow", "auto-hash-map", @@ -6944,7 +7203,7 @@ dependencies = [ [[package]] name = "turbo-tasks-testing" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230328.1#0f3d9675322b680faee0fec8976bf11ed36de2f9" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230508.2#b9e5e6d750c048bb083bfa60941554c479f6685f" dependencies = [ "anyhow", "auto-hash-map", @@ -6956,10 +7215,11 @@ dependencies = [ [[package]] name = "turbopack" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230328.1#0f3d9675322b680faee0fec8976bf11ed36de2f9" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230508.2#b9e5e6d750c048bb083bfa60941554c479f6685f" dependencies = [ "anyhow", "async-recursion", + "futures", "indexmap", "lazy_static", "regex", @@ -6972,17 +7232,49 @@ dependencies = [ "turbopack-core", "turbopack-css", "turbopack-ecmascript", + "turbopack-ecmascript-plugins", "turbopack-env", + "turbopack-image", "turbopack-json", "turbopack-mdx", "turbopack-node", "turbopack-static", ] +[[package]] +name = "turbopack-bench" +version = "0.1.0" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230508.2#b9e5e6d750c048bb083bfa60941554c479f6685f" +dependencies = [ + "anyhow", + "chromiumoxide", + "criterion", + "dunce", + "futures", + "mime", + "nix", + "once_cell", + "owo-colors", + "parking_lot", + "portpicker", + "rand", + "regex", + "serde", + "serde_json", + "tempfile", + "tokio", + "tungstenite 0.17.3", + "turbo-tasks", + "turbo-tasks-testing", + "turbopack-create-test-app", + "url", + "webbrowser", +] + [[package]] name = "turbopack-cli-utils" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230328.1#0f3d9675322b680faee0fec8976bf11ed36de2f9" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230508.2#b9e5e6d750c048bb083bfa60941554c479f6685f" dependencies = [ "anyhow", "clap 4.1.11", @@ -6993,12 +7285,13 @@ dependencies = [ "turbo-tasks-build", "turbo-tasks-fs", "turbopack-core", + "turbopack-ecmascript", ] [[package]] name = "turbopack-core" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230328.1#0f3d9675322b680faee0fec8976bf11ed36de2f9" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230508.2#b9e5e6d750c048bb083bfa60941554c479f6685f" dependencies = [ "anyhow", "async-trait", @@ -7025,7 +7318,7 @@ dependencies = [ [[package]] name = "turbopack-create-test-app" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230328.1#0f3d9675322b680faee0fec8976bf11ed36de2f9" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230508.2#b9e5e6d750c048bb083bfa60941554c479f6685f" dependencies = [ "anyhow", "clap 4.1.11", @@ -7038,7 +7331,7 @@ dependencies = [ [[package]] name = "turbopack-css" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230328.1#0f3d9675322b680faee0fec8976bf11ed36de2f9" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230508.2#b9e5e6d750c048bb083bfa60941554c479f6685f" dependencies = [ "anyhow", "async-trait", @@ -7060,7 +7353,7 @@ dependencies = [ [[package]] name = "turbopack-dev" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230328.1#0f3d9675322b680faee0fec8976bf11ed36de2f9" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230508.2#b9e5e6d750c048bb083bfa60941554c479f6685f" dependencies = [ "anyhow", "indexmap", @@ -7072,14 +7365,16 @@ dependencies = [ "turbo-tasks-build", "turbo-tasks-fs", "turbo-tasks-hash", + "turbopack", "turbopack-core", + "turbopack-css", "turbopack-ecmascript", ] [[package]] name = "turbopack-dev-server" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230328.1#0f3d9675322b680faee0fec8976bf11ed36de2f9" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230508.2#b9e5e6d750c048bb083bfa60941554c479f6685f" dependencies = [ "anyhow", "async-compression", @@ -7095,7 +7390,7 @@ dependencies = [ "serde", "serde_json", "serde_qs", - "thiserror", + "socket2", "tokio", "tokio-stream", "tokio-util", @@ -7113,7 +7408,7 @@ dependencies = [ [[package]] name = "turbopack-ecmascript" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230328.1#0f3d9675322b680faee0fec8976bf11ed36de2f9" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230508.2#b9e5e6d750c048bb083bfa60941554c479f6685f" dependencies = [ "anyhow", "async-trait", @@ -7146,12 +7441,30 @@ dependencies = [ "url", ] +[[package]] +name = "turbopack-ecmascript-plugins" +version = "0.1.0" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230508.2#b9e5e6d750c048bb083bfa60941554c479f6685f" +dependencies = [ + "anyhow", + "async-trait", + "serde", + "swc_core", + "swc_emotion", + "swc_relay", + "turbo-tasks", + "turbo-tasks-build", + "turbo-tasks-fs", + "turbopack-ecmascript", +] + [[package]] name = "turbopack-env" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230328.1#0f3d9675322b680faee0fec8976bf11ed36de2f9" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230508.2#b9e5e6d750c048bb083bfa60941554c479f6685f" dependencies = [ "anyhow", + "indexmap", "serde", "turbo-tasks", "turbo-tasks-build", @@ -7161,10 +7474,30 @@ dependencies = [ "turbopack-ecmascript", ] +[[package]] +name = "turbopack-image" +version = "0.1.0" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230508.2#b9e5e6d750c048bb083bfa60941554c479f6685f" +dependencies = [ + "anyhow", + "base64 0.21.0", + "image", + "indexmap", + "mime", + "once_cell", + "regex", + "serde", + "serde_with", + "turbo-tasks", + "turbo-tasks-build", + "turbo-tasks-fs", + "turbopack-core", +] + [[package]] name = "turbopack-json" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230328.1#0f3d9675322b680faee0fec8976bf11ed36de2f9" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230508.2#b9e5e6d750c048bb083bfa60941554c479f6685f" dependencies = [ "anyhow", "serde", @@ -7179,7 +7512,7 @@ dependencies = [ [[package]] name = "turbopack-mdx" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230328.1#0f3d9675322b680faee0fec8976bf11ed36de2f9" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230508.2#b9e5e6d750c048bb083bfa60941554c479f6685f" dependencies = [ "anyhow", "mdxjs", @@ -7194,7 +7527,7 @@ dependencies = [ [[package]] name = "turbopack-node" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230328.1#0f3d9675322b680faee0fec8976bf11ed36de2f9" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230508.2#b9e5e6d750c048bb083bfa60941554c479f6685f" dependencies = [ "anyhow", "async-stream", @@ -7217,7 +7550,6 @@ dependencies = [ "turbo-tasks-bytes", "turbo-tasks-env", "turbo-tasks-fs", - "turbo-tasks-hash", "turbopack-cli-utils", "turbopack-core", "turbopack-dev-server", @@ -7229,7 +7561,7 @@ dependencies = [ [[package]] name = "turbopack-static" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230328.1#0f3d9675322b680faee0fec8976bf11ed36de2f9" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230508.2#b9e5e6d750c048bb083bfa60941554c479f6685f" dependencies = [ "anyhow", "serde", @@ -7245,7 +7577,7 @@ dependencies = [ [[package]] name = "turbopack-swc-utils" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230328.1#0f3d9675322b680faee0fec8976bf11ed36de2f9" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230508.2#b9e5e6d750c048bb083bfa60941554c479f6685f" dependencies = [ "swc_core", "turbo-tasks", @@ -7256,7 +7588,7 @@ dependencies = [ [[package]] name = "turbopack-test-utils" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230328.1#0f3d9675322b680faee0fec8976bf11ed36de2f9" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230508.2#b9e5e6d750c048bb083bfa60941554c479f6685f" dependencies = [ "anyhow", "once_cell", @@ -7357,7 +7689,7 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c5faade31a542b8b35855fff6e8def199853b2da8da256da52f52f1316ee3137" dependencies = [ - "hashbrown 0.12.3", + "hashbrown", "regex", ] @@ -7446,7 +7778,7 @@ version = "1.0.0-alpha.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2209b78d1249f7e6f3293657c9779fe31ced465df091bbd433a1cf88e916ec55" dependencies = [ - "ctor", + "ctor 0.1.26", "version_check", ] @@ -7477,6 +7809,146 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +[[package]] +name = "virtual-fs" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ba2b45886b577c5a11b5d3165b0410620ff508b0acfa91e5b024935de792e8e" +dependencies = [ + "anyhow", + "async-trait", + "bytes", + "derivative", + "filetime", + "fs_extra", + "getrandom", + "indexmap", + "lazy_static", + "libc", + "pin-project-lite", + "slab", + "thiserror", + "tokio", + "tracing", + "webc", +] + +[[package]] +name = "virtual-net" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e043eb813b35633445d602acf13df921a8a1ac8833818fb8f891e2f6223fedd7" +dependencies = [ + "async-trait", + "bytes", + "thiserror", + "tracing", +] + +[[package]] +name = "wai-bindgen-gen-core" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1aa3dc41b510811122b3088197234c27e08fcad63ef936306dd8e11e2803876c" +dependencies = [ + "anyhow", + "wai-parser", +] + +[[package]] +name = "wai-bindgen-gen-rust" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19bc05e8380515c4337c40ef03b2ff233e391315b178a320de8640703d522efe" +dependencies = [ + "heck 0.3.3", + "wai-bindgen-gen-core", +] + +[[package]] +name = "wai-bindgen-gen-rust-wasm" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6f35ce5e74086fac87f3a7bd50f643f00fe3559adb75c88521ecaa01c8a6199" +dependencies = [ + "heck 0.3.3", + "wai-bindgen-gen-core", + "wai-bindgen-gen-rust", +] + +[[package]] +name = "wai-bindgen-gen-wasmer" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f61484185d8c520a86d5a7f7f8265f446617c2f9774b2e20a52de19b6e53432" +dependencies = [ + "heck 0.3.3", + "wai-bindgen-gen-core", + "wai-bindgen-gen-rust", +] + +[[package]] +name = "wai-bindgen-rust" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e5601c6f448c063e83a5e931b8fefcdf7e01ada424ad42372c948d2e3d67741" +dependencies = [ + "bitflags 1.3.2", + "wai-bindgen-rust-impl", +] + +[[package]] +name = "wai-bindgen-rust-impl" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdeeb5c1170246de8425a3e123e7ef260dc05ba2b522a1d369fe2315376efea4" +dependencies = [ + "proc-macro2", + "syn 1.0.109", + "wai-bindgen-gen-core", + "wai-bindgen-gen-rust-wasm", +] + +[[package]] +name = "wai-bindgen-wasmer" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9367b98b4849e8910720d2b4e9ce3d35bbfa3b6120154d455b57416bd0bf6f0f" +dependencies = [ + "anyhow", + "bitflags 1.3.2", + "once_cell", + "thiserror", + "tracing", + "wai-bindgen-wasmer-impl", + "wasmer", +] + +[[package]] +name = "wai-bindgen-wasmer-impl" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b3488ed88d4dd0e3bf85bad4e27dac6cb31aae5d122a5dda2424803c8dc863a" +dependencies = [ + "proc-macro2", + "syn 1.0.109", + "wai-bindgen-gen-core", + "wai-bindgen-gen-wasmer", +] + +[[package]] +name = "wai-parser" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bd0acb6d70885ea0c343749019ba74f015f64a9d30542e66db69b49b7e28186" +dependencies = [ + "anyhow", + "id-arena", + "pulldown-cmark", + "unicode-normalization", + "unicode-xid", +] + [[package]] name = "waker-fn" version = "1.1.0" @@ -7523,7 +7995,6 @@ dependencies = [ "console_error_panic_hook", "getrandom", "js-sys", - "next-binding", "next-swc", "once_cell", "parking_lot_core 0.8.0", @@ -7531,7 +8002,9 @@ dependencies = [ "serde", "serde-wasm-bindgen", "serde_json", + "swc_core", "tracing", + "turbo-binding", "wasm-bindgen", "wasm-bindgen-futures", ] @@ -7561,6 +8034,29 @@ dependencies = [ "wasm-bindgen-shared", ] +[[package]] +name = "wasm-bindgen-downcast" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dac026d43bcca6e7ce1c0956ba68f59edf6403e8e930a5d891be72c31a44340" +dependencies = [ + "js-sys", + "once_cell", + "wasm-bindgen", + "wasm-bindgen-downcast-macros", +] + +[[package]] +name = "wasm-bindgen-downcast-macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5020cfa87c7cecefef118055d44e3c1fc122c7ec25701d528ee458a0b45f38f" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "wasm-bindgen-futures" version = "0.4.34" @@ -7613,25 +8109,25 @@ dependencies = [ [[package]] name = "wasmer" -version = "2.3.0" +version = "3.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea8d8361c9d006ea3d7797de7bd6b1492ffd0f91a22430cfda6c1658ad57bedf" +checksum = "8472807bd8d5062aef0a35681e1b6fbaed8fea88d97910870741100c03b8fef3" dependencies = [ + "bytes", "cfg-if 1.0.0", + "derivative", "indexmap", "js-sys", - "loupe", "more-asserts", + "serde", + "serde-wasm-bindgen", "target-lexicon", "thiserror", "wasm-bindgen", - "wasmer-artifact", + "wasm-bindgen-downcast", "wasmer-compiler", "wasmer-compiler-cranelift", "wasmer-derive", - "wasmer-engine", - "wasmer-engine-dylib", - "wasmer-engine-universal", "wasmer-types", "wasmer-vm", "wasmparser", @@ -7639,24 +8135,11 @@ dependencies = [ "winapi 0.3.9", ] -[[package]] -name = "wasmer-artifact" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7aaf9428c29c1d8ad2ac0e45889ba8a568a835e33fd058964e5e500f2f7ce325" -dependencies = [ - "enumset", - "loupe", - "thiserror", - "wasmer-compiler", - "wasmer-types", -] - [[package]] name = "wasmer-cache" -version = "2.3.0" +version = "3.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0def391ee1631deac5ac1e6ce919c07a5ccb936ad0fd44708cdc2365c49561a4" +checksum = "2c8dcf5d253d30a2736b1bd876e09eb64bd1d7ed2b464a9288772cc797aa36c0" dependencies = [ "blake3", "hex", @@ -7666,33 +8149,38 @@ dependencies = [ [[package]] name = "wasmer-compiler" -version = "2.3.0" +version = "3.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e67a6cd866aed456656db2cfea96c18baabbd33f676578482b85c51e1ee19d2c" +checksum = "2e322cdfb8ed189d92cbb5c34acb319c0f04fb9799ed68e127717f255f8b246a" dependencies = [ + "backtrace", + "cfg-if 1.0.0", + "enum-iterator 0.7.0", "enumset", - "loupe", - "rkyv", - "serde", - "serde_bytes", + "lazy_static", + "leb128", + "memmap2", + "more-asserts", + "region", + "rustc-demangle", "smallvec", - "target-lexicon", "thiserror", "wasmer-types", + "wasmer-vm", "wasmparser", + "winapi 0.3.9", ] [[package]] name = "wasmer-compiler-cranelift" -version = "2.3.0" +version = "3.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48be2f9f6495f08649e4f8b946a2cbbe119faf5a654aa1457f9504a99d23dae0" +checksum = "c5240177aca0d8322c890d17d4b1b87f23ccb45340f616f384655aaba18f51bd" dependencies = [ "cranelift-codegen", "cranelift-entity", "cranelift-frontend", "gimli 0.26.2", - "loupe", "more-asserts", "rayon", "smallvec", @@ -7704,9 +8192,9 @@ dependencies = [ [[package]] name = "wasmer-derive" -version = "2.3.0" +version = "3.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00e50405cc2a2f74ff574584710a5f2c1d5c93744acce2ca0866084739284b51" +checksum = "fb6858f330764b1041e68d3c824970064d2fbd8e27704180289fd248ff892c48" dependencies = [ "proc-macro-error", "proc-macro2", @@ -7714,200 +8202,136 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "wasmer-engine" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f98f010978c244db431b392aeab0661df7ea0822343334f8f2a920763548e45" -dependencies = [ - "backtrace", - "enumset", - "lazy_static", - "loupe", - "memmap2", - "more-asserts", - "rustc-demangle", - "serde", - "serde_bytes", - "target-lexicon", - "thiserror", - "wasmer-artifact", - "wasmer-compiler", - "wasmer-types", - "wasmer-vm", -] - -[[package]] -name = "wasmer-engine-dylib" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0358af9c154724587731175553805648d9acb8f6657880d165e378672b7e53" -dependencies = [ - "cfg-if 1.0.0", - "enum-iterator 0.7.0", - "enumset", - "leb128", - "libloading", - "loupe", - "object 0.28.4", - "rkyv", - "serde", - "tempfile", - "tracing", - "wasmer-artifact", - "wasmer-compiler", - "wasmer-engine", - "wasmer-object", - "wasmer-types", - "wasmer-vm", - "which", -] - -[[package]] -name = "wasmer-engine-universal" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "440dc3d93c9ca47865a4f4edd037ea81bf983b5796b59b3d712d844b32dbef15" -dependencies = [ - "cfg-if 1.0.0", - "enumset", - "leb128", - "loupe", - "region", - "rkyv", - "wasmer-compiler", - "wasmer-engine", - "wasmer-engine-universal-artifact", - "wasmer-types", - "wasmer-vm", - "winapi 0.3.9", -] - -[[package]] -name = "wasmer-engine-universal-artifact" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68f1db3f54152657eb6e86c44b66525ff7801dad8328fe677da48dd06af9ad41" -dependencies = [ - "enum-iterator 0.7.0", - "enumset", - "loupe", - "rkyv", - "thiserror", - "wasmer-artifact", - "wasmer-compiler", - "wasmer-types", -] - -[[package]] -name = "wasmer-object" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d831335ff3a44ecf451303f6f891175c642488036b92ceceb24ac8623a8fa8b" -dependencies = [ - "object 0.28.4", - "thiserror", - "wasmer-compiler", - "wasmer-types", -] - [[package]] name = "wasmer-types" -version = "2.3.0" +version = "3.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39df01ea05dc0a9bab67e054c7cb01521e53b35a7bb90bd02eca564ed0b2667f" +checksum = "d83345e3335fb9b21be6c394bc3d712522447bc8750db8a40ac9170627e3de35" dependencies = [ - "backtrace", + "bytecheck", "enum-iterator 0.7.0", + "enumset", "indexmap", - "loupe", "more-asserts", "rkyv", - "serde", - "thiserror", -] - -[[package]] -name = "wasmer-vfs" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9302eae3edc53cb540c2d681e7f16d8274918c1ce207591f04fed351649e97c0" -dependencies = [ - "libc", - "slab", + "target-lexicon", "thiserror", - "tracing", ] [[package]] name = "wasmer-vm" -version = "2.3.0" +version = "3.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30d965fa61f4dc4cdb35a54daaf7ecec3563fbb94154a6c35433f879466247dd" +checksum = "2ca3cf9a2bb5919ae048231972440767efad7a693afaeb41332ab0796be1c884" dependencies = [ "backtrace", "cc", "cfg-if 1.0.0", "corosensei", + "dashmap", + "derivative", "enum-iterator 0.7.0", + "fnv", "indexmap", "lazy_static", "libc", - "loupe", "mach", - "memoffset 0.6.5", + "memoffset 0.8.0", "more-asserts", "region", - "rkyv", "scopeguard", - "serde", "thiserror", - "wasmer-artifact", "wasmer-types", "winapi 0.3.9", ] [[package]] -name = "wasmer-wasi" -version = "2.3.0" +name = "wasmer-wasix" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fadbe31e3c1b6f3e398ad172b169152ae1a743ae6efd5f9ffb34019983319d99" +checksum = "511532f5e07542a767eb56cb6812a381b86aad5f0a2848baae80a6db44e3b1e1" dependencies = [ + "anyhow", + "async-trait", + "bincode", + "bytes", "cfg-if 1.0.0", - "generational-arena", + "chrono", + "cooked-waker", + "derivative", + "futures", "getrandom", + "heapless", + "hex", + "http", + "lazy_static", "libc", + "linked_hash_set", + "once_cell", + "pin-project", + "rand", + "serde", + "serde_derive", + "serde_json", + "serde_yaml 0.8.26", + "sha2", + "shellexpand", + "term_size", + "termios", "thiserror", + "tokio", "tracing", + "urlencoding", + "virtual-fs", + "virtual-net", + "wai-bindgen-wasmer", + "waker-fn", "wasm-bindgen", "wasmer", - "wasmer-vfs", - "wasmer-wasi-types", + "wasmer-types", + "wasmer-wasix-types", + "webc", + "weezl", "winapi 0.3.9", ] [[package]] -name = "wasmer-wasi-types" -version = "2.3.0" +name = "wasmer-wasix-types" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22dc83aadbdf97388de3211cb6f105374f245a3cf2a5c65a16776e7a087a8468" +checksum = "7eec8e2f60e476535824438dd23ce1ed52e86c3a9fc5d67a60c899f24dfa6dde" dependencies = [ + "anyhow", + "bitflags 1.3.2", "byteorder", + "cfg-if 1.0.0", + "num_enum", "time 0.2.27", + "wai-bindgen-gen-core", + "wai-bindgen-gen-rust", + "wai-bindgen-gen-rust-wasm", + "wai-bindgen-rust", + "wai-parser", + "wasmer", + "wasmer-derive", "wasmer-types", ] [[package]] name = "wasmparser" -version = "0.83.0" +version = "0.95.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "718ed7c55c2add6548cca3ddd6383d738cd73b892df400e96b9aa876f0141d7a" +checksum = "f2ea896273ea99b15132414be1da01ab0d8836415083298ecaffbe308eaac87a" +dependencies = [ + "indexmap", + "url", +] [[package]] name = "wast" -version = "55.0.0" +version = "56.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4984d3e1406571f4930ba5cf79bd70f75f41d0e87e17506e0bd19b0e5d085f05" +checksum = "6b54185c051d7bbe23757d50fe575880a2426a2f06d2e9f6a10fd9a4a42920c0" dependencies = [ "leb128", "memchr", @@ -7917,9 +8341,9 @@ dependencies = [ [[package]] name = "wat" -version = "1.0.61" +version = "1.0.62" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af2b53f4da14db05d32e70e9c617abdf6620c575bd5dd972b7400037b4df2091" +checksum = "56681922808216ab86d96bb750f70d500b5a7800e41564290fd46bb773581299" dependencies = [ "wast", ] @@ -7951,6 +8375,32 @@ dependencies = [ "web-sys", ] +[[package]] +name = "webc" +version = "5.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06bee486f9207604f99bfa3c95afcd03272d95db5872c6c1b11470be4390d514" +dependencies = [ + "anyhow", + "base64 0.21.0", + "byteorder", + "bytes", + "indexmap", + "leb128", + "lexical-sort", + "memmap2", + "once_cell", + "path-clean", + "rand", + "serde", + "serde_cbor", + "serde_json", + "sha2", + "thiserror", + "url", + "walkdir", +] + [[package]] name = "webpki" version = "0.22.0" @@ -7970,6 +8420,12 @@ dependencies = [ "webpki", ] +[[package]] +name = "weezl" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9193164d4de03a926d909d3bc7c30543cecb35400c02114792c2cae20d5e2dbb" + [[package]] name = "which" version = "4.4.0" @@ -8026,11 +8482,11 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows" -version = "0.46.0" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdacb41e6a96a052c6cb63a144f24900236121c6f63f4f8219fef5977ecb0c25" +checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" dependencies = [ - "windows-targets", + "windows-targets 0.48.0", ] [[package]] @@ -8052,12 +8508,12 @@ version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" dependencies = [ - "windows_aarch64_gnullvm", + "windows_aarch64_gnullvm 0.42.2", "windows_aarch64_msvc 0.42.2", "windows_i686_gnu 0.42.2", "windows_i686_msvc 0.42.2", "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm", + "windows_x86_64_gnullvm 0.42.2", "windows_x86_64_msvc 0.42.2", ] @@ -8067,7 +8523,16 @@ version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" dependencies = [ - "windows-targets", + "windows-targets 0.42.2", +] + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.0", ] [[package]] @@ -8076,21 +8541,42 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" dependencies = [ - "windows_aarch64_gnullvm", + "windows_aarch64_gnullvm 0.42.2", "windows_aarch64_msvc 0.42.2", "windows_i686_gnu 0.42.2", "windows_i686_msvc 0.42.2", "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm", + "windows_x86_64_gnullvm 0.42.2", "windows_x86_64_msvc 0.42.2", ] +[[package]] +name = "windows-targets" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" +dependencies = [ + "windows_aarch64_gnullvm 0.48.0", + "windows_aarch64_msvc 0.48.0", + "windows_i686_gnu 0.48.0", + "windows_i686_msvc 0.48.0", + "windows_x86_64_gnu 0.48.0", + "windows_x86_64_gnullvm 0.48.0", + "windows_x86_64_msvc 0.48.0", +] + [[package]] name = "windows_aarch64_gnullvm" version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" + [[package]] name = "windows_aarch64_msvc" version = "0.33.0" @@ -8103,6 +8589,12 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" + [[package]] name = "windows_i686_gnu" version = "0.33.0" @@ -8115,6 +8607,12 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" +[[package]] +name = "windows_i686_gnu" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" + [[package]] name = "windows_i686_msvc" version = "0.33.0" @@ -8127,6 +8625,12 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" +[[package]] +name = "windows_i686_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" + [[package]] name = "windows_x86_64_gnu" version = "0.33.0" @@ -8139,12 +8643,24 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" + [[package]] name = "windows_x86_64_gnullvm" version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" + [[package]] name = "windows_x86_64_msvc" version = "0.33.0" @@ -8157,6 +8673,21 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" + +[[package]] +name = "winnow" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae8970b36c66498d8ff1d66685dc86b91b29db0c7739899012f63a63814b4b28" +dependencies = [ + "memchr", +] + [[package]] name = "winreg" version = "0.10.1" @@ -8176,6 +8707,15 @@ dependencies = [ "winapi-build", ] +[[package]] +name = "yaml-rust" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85" +dependencies = [ + "linked-hash-map", +] + [[package]] name = "yansi" version = "0.5.1" diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000000000..cefc763c5180a --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,128 @@ +[workspace] + +members = [ + "packages/next-swc/crates/core", + "packages/next-swc/crates/napi", + "packages/next-swc/crates/wasm", + "packages/next-swc/crates/next-build", + "packages/next-swc/crates/next-core", + "packages/next-swc/crates/next-dev", + "packages/next-swc/crates/next-dev-tests", + "packages/next-swc/crates/next-transform-font", + "packages/next-swc/crates/next-transform-dynamic", + "packages/next-swc/crates/next-transform-strip-page-exports", +] + +[profile.dev.package.swc_css_prefixer] +opt-level = 2 + +# This is a workaround for wasm timeout issue +[profile.dev.package."*"] +debug-assertions = false + +[profile.release] +lto = true + +[workspace.dependencies] +# Workspace crates +next-build = { path = "packages/next-swc/crates/next-build" } +next-core = { path = "packages/next-swc/crates/next-core", default-features = false } +next-dev = { path = "packages/next-swc/crates/next-dev", default-features = false, features = [ + "serializable", +] } +next-dev-tests = { path = "packages/next-swc/crates/next-dev-tests" } +next-transform-font = { path = "packages/next-swc/crates/next-transform-font" } +next-transform-dynamic = { path = "packages/next-swc/crates/next-transform-dynamic" } +next-transform-strip-page-exports = { path = "packages/next-swc/crates/next-transform-strip-page-exports" } + +# SWC crates +# Keep consistent with preset_env_base through swc_core +swc_core = { version = "0.75.41" } +testing = { version = "0.33.4" } + +# Turbo crates +turbo-binding = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230508.2" } +# [TODO]: need to refactor embed_directory! macro usages, as well as resolving turbo_tasks::function, macros.. +turbo-tasks = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230508.2" } +# [TODO]: need to refactor embed_directory! macro usage in next-core +turbo-tasks-fs = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230508.2" } + +# General Deps + +# Be careful when selecting tls backend, including change default tls backend. +# If you changed, must verify with ALL build targets with next-swc to ensure +# it works. next-swc have various platforms, some doesn't support native (using openssl-sys) +# and some aren't buildable with rustls. +reqwest = { version = "0.11.14", default-features = false } + +chromiumoxide = { version = "0.4.0", features = [ + "tokio-runtime", +], default-features = false } +# For matching on errors from chromiumoxide. Keep in +# sync with chromiumoxide's tungstenite requirement. +tungstenite = "0.17.3" + +# flate2_zlib requires zlib, use flate2_rust +allsorts = { version = "0.14.0", default_features = false, features = [ + "outline", + "flate2_rust", +] } +anyhow = "1.0.69" +assert_cmd = "2.0.8" +async-compression = { version = "0.3.13", default-features = false, features = [ + "gzip", + "tokio", +] } +async-trait = "0.1.64" +atty = "0.2.14" +chrono = "0.4.23" +clap = "4.1.6" +clap_complete = "4.1.2" +concurrent-queue = "2.1.0" +console = "0.15.5" +console-subscriber = "0.1.8" +criterion = "0.4.0" +dashmap = "5.4.0" +dialoguer = "0.10.3" +dunce = "1.0.3" +futures = "0.3.26" +futures-retry = "0.6.0" +httpmock = { version = "0.6.7", default-features = false } +indexmap = "1.9.2" +indicatif = "0.17.3" +indoc = "2.0.0" +itertools = "0.10.5" +lazy_static = "1.4.0" +log = "0.4.17" +mime = "0.3.16" +nohash-hasher = "0.2.0" +once_cell = "1.17.1" +owo-colors = "3.5.0" +parking_lot = "0.12.1" +pathdiff = "0.2.1" +pin-project-lite = "0.2.9" +predicates = "2.1.5" +pretty_assertions = "1.3.0" +proc-macro2 = "1.0.51" +qstring = "0.7.2" +quote = "1.0.23" +rand = "0.8.5" +regex = "1.7.0" +rstest = "0.16.0" +rustc-hash = "1.1.0" +semver = "1.0.16" +serde = { version = "1.0.152", features = ["derive"] } +serde_json = "1.0.93" +serde_qs = "0.11.0" +serde_yaml = "0.9.17" +syn = "1.0.107" +tempfile = "3.3.0" +thiserror = "1.0.38" +tiny-gradient = "0.1.0" +tokio = "1.25.0" +tokio-util = { version = "0.7.7", features = ["io"] } +tracing = "0.1.37" +url = "2.2.2" +urlencoding = "2.1.2" +webbrowser = "0.8.7" +dhat = { version = "0.3.2" } diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 7f9f4d0412c39..70f62eba5723e 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -35,7 +35,6 @@ variables: PNPM_CACHE_FOLDER: $(Pipeline.Workspace)/.pnpm-store PNPM_VERSION: 7.24.3 NEXT_TELEMETRY_DISABLED: '1' - node_14_version: ^14.19.0 node_16_version: ^16.8.0 stages: @@ -47,7 +46,7 @@ stages: steps: - task: NodeTool@0 inputs: - versionSpec: $(node_14_version) + versionSpec: $(node_16_version) displayName: 'Install Node.js' - bash: | @@ -85,7 +84,7 @@ stages: - task: NodeTool@0 inputs: - versionSpec: $(node_14_version) + versionSpec: $(node_16_version) displayName: 'Install Node.js' - bash: | diff --git a/bench/rendering/pages/stateless-big.js b/bench/rendering/pages/stateless-big.js index 87f340d66d7e9..fdf9f92eefb3d 100644 --- a/bench/rendering/pages/stateless-big.js +++ b/bench/rendering/pages/stateless-big.js @@ -5,7 +5,7 @@ export default () => { } const items = () => { - var out = new Array(10000) + const out = new Array(10000) for (let i = 0; i < out.length; i++) { out[i] =
  • This is row {i + 1}
  • } diff --git a/contributing/docs/adding-documentation.md b/contributing/docs/adding-documentation.md index 37ea3654600ad..3df38841d024e 100644 --- a/contributing/docs/adding-documentation.md +++ b/contributing/docs/adding-documentation.md @@ -37,4 +37,4 @@ After: ] ``` -Note: the manifest is checked automatically in the "lint" step in CI when opening a PR. +> **Note**: The manifest is checked automatically in the "lint" step in CI when opening a PR. diff --git a/contributing/examples/adding-examples.md b/contributing/examples/adding-examples.md index 978857e0ef8e8..9fbbaac8c6828 100644 --- a/contributing/examples/adding-examples.md +++ b/contributing/examples/adding-examples.md @@ -35,7 +35,7 @@ Description Deploy the example using [Vercel](https://vercel.com?utm_source=github&utm_medium=readme&utm_campaign=next-example): -[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/git/external?repository-url=https://github.com/vercel/next.js/tree/canary/examples/DIRECTORY_NAME&project-name=DIRECTORY_NAME&repository-name=DIRECTORY_NAME) +[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/vercel/next.js/tree/canary/examples/DIRECTORY_NAME&project-name=DIRECTORY_NAME&repository-name=DIRECTORY_NAME) ## How to use diff --git a/docs/advanced-features/amp-support/amp-in-static-html-export.md b/docs/advanced-features/amp-support/amp-in-static-html-export.md index 67351a27d9bf5..2e6a029a9d6ff 100644 --- a/docs/advanced-features/amp-support/amp-in-static-html-export.md +++ b/docs/advanced-features/amp-support/amp-in-static-html-export.md @@ -1,10 +1,10 @@ --- -description: Learn how AMP pages are created when used together with `next export`. +description: Learn how AMP pages are created when used together with export. --- # AMP in Static HTML export -When using `next export` to do [Static HTML export](/docs/advanced-features/static-html-export.md) statically prerender pages, Next.js will detect if the page supports AMP and change the exporting behavior based on that. +When using [Static HTML export](/docs/advanced-features/static-html-export.md) statically prerender pages, Next.js will detect if the page supports AMP and change the exporting behavior based on that. For example, the hybrid AMP page `pages/about.js` would output: diff --git a/docs/advanced-features/automatic-static-optimization.md b/docs/advanced-features/automatic-static-optimization.md index cbbfbbf756b30..9e8131946cf5b 100644 --- a/docs/advanced-features/automatic-static-optimization.md +++ b/docs/advanced-features/automatic-static-optimization.md @@ -28,7 +28,7 @@ The cases where the query will be updated after hydration triggering another ren To be able to distinguish if the query is fully updated and ready for use, you can leverage the `isReady` field on [`next/router`](/docs/api-reference/next/router.md#router-object). -> **Note:** Parameters added with [dynamic routes](/docs/routing/dynamic-routes.md) to a page that's using [`getStaticProps`](/docs/basic-features/data-fetching/get-static-props.md) will always be available inside the `query` object. +> **Note**: Parameters added with [dynamic routes](/docs/routing/dynamic-routes.md) to a page that's using [`getStaticProps`](/docs/basic-features/data-fetching/get-static-props.md) will always be available inside the `query` object. `next build` will emit `.html` files for statically optimized pages. For example, the result for the page `pages/about.js` would be: diff --git a/docs/advanced-features/custom-document.md b/docs/advanced-features/custom-document.md index 07f148a7d2972..0f4556eb05b2c 100644 --- a/docs/advanced-features/custom-document.md +++ b/docs/advanced-features/custom-document.md @@ -50,7 +50,7 @@ Or add a `className` to the `body` tag: ## Customizing `renderPage` -> **Note:** This is advanced and only needed for libraries like CSS-in-JS to support server-side rendering. This is not needed for built-in `styled-jsx` support. +> **Note**: This is advanced and only needed for libraries like CSS-in-JS to support server-side rendering. This is not needed for built-in `styled-jsx` support. For [React 18](/docs/advanced-features/react-18.md) support, we recommend avoiding customizing `getInitialProps` and `renderPage`, if possible. diff --git a/docs/advanced-features/custom-server.md b/docs/advanced-features/custom-server.md index 9a2b05d950264..ba694180861bb 100644 --- a/docs/advanced-features/custom-server.md +++ b/docs/advanced-features/custom-server.md @@ -14,7 +14,7 @@ description: Start a Next.js app programmatically using a custom server. By default, Next.js includes its own server with `next start`. If you have an existing backend, you can still use it with Next.js (this is not a custom server). A custom Next.js server allows you to start a server 100% programmatically in order to use custom server patterns. Most of the time, you will not need this – but it's available for complete customization. -> **Note:** A custom server **cannot** be deployed on [Vercel](https://vercel.com/solutions/nextjs). +> **Note**: A custom server **cannot** be deployed on [Vercel](https://vercel.com/solutions/nextjs). > Before deciding to use a custom server, please keep in mind that it should only be used when the integrated router of Next.js can't meet your app requirements. A custom server will remove important performance optimizations, like **serverless functions** and **[Automatic Static Optimization](/docs/advanced-features/automatic-static-optimization.md).** @@ -51,7 +51,7 @@ app.prepare().then(() => { } catch (err) { console.error('Error occurred handling', req.url, err) res.statusCode = 500 - res.end('internal server error') + res.end('Internal Server Error') } }) .once('error', (err) => { diff --git a/docs/advanced-features/debugging.md b/docs/advanced-features/debugging.md index 847bd7d3eaba4..ee18d14b2d3e4 100644 --- a/docs/advanced-features/debugging.md +++ b/docs/advanced-features/debugging.md @@ -97,7 +97,7 @@ Windows users may run into an issue when using `NODE_OPTIONS='--inspect'` as tha `cross-env` will set the `NODE_OPTIONS` environment variable regardless of which platform you are on (including Mac, Linux, and Windows) and allow you to debug consistently across devices and operating systems. -> **Note:** Ensure Windows Defender is disabled on your machine. This external service will check _every file read_, which has been reported to greatly increase Fast Refresh time with `next dev`. This is a known issue, not related to Next.js, but it does affect Next.js development. +> **Note**: Ensure Windows Defender is disabled on your machine. This external service will check _every file read_, which has been reported to greatly increase Fast Refresh time with `next dev`. This is a known issue, not related to Next.js, but it does affect Next.js development. ## More information diff --git a/docs/advanced-features/dynamic-import.md b/docs/advanced-features/dynamic-import.md index f9947809dded0..971622cb77f01 100644 --- a/docs/advanced-features/dynamic-import.md +++ b/docs/advanced-features/dynamic-import.md @@ -13,7 +13,7 @@ description: Dynamically import JavaScript modules and React Components and spli Next.js supports lazy loading external libraries with `import()` and React components with `next/dynamic`. Deferred loading helps improve the initial loading performance by decreasing the amount of JavaScript necessary to render the page. Components or libraries are only imported and included in the JavaScript bundle when they're used. -`next/dynamic` is a composite extension of [`React.lazy`](https://reactjs.org/docs/code-splitting.html#reactlazy) and [`Suspense`](https://reactjs.org/docs/react-api.html#reactsuspense), components can delay hydration until the Suspense boundary is resolved. +`next/dynamic` is a composite extension of [`React.lazy`](https://react.dev/reference/react/lazy) and [`Suspense`](https://react.dev/reference/react/Suspense), components can delay hydration until the Suspense boundary is resolved. ## Example diff --git a/docs/advanced-features/error-handling.md b/docs/advanced-features/error-handling.md index f4b8d258e5f07..c09324464f727 100644 --- a/docs/advanced-features/error-handling.md +++ b/docs/advanced-features/error-handling.md @@ -24,7 +24,7 @@ You can also use [404 page](/docs/advanced-features/custom-error-page#404-page) ## Handling Client Errors -React [Error Boundaries](https://reactjs.org/docs/error-boundaries.html) is a graceful way to handle a JavaScript error on the client so that the other parts of the application continue working. In addition to preventing the page from crashing, it allows you to provide a custom fallback component and even log error information. +React [Error Boundaries](https://react.dev/reference/react/Component#catching-rendering-errors-with-an-error-boundary) is a graceful way to handle a JavaScript error on the client so that the other parts of the application continue working. In addition to preventing the page from crashing, it allows you to provide a custom fallback component and even log error information. To use Error Boundaries for your Next.js application, you must create a class component `ErrorBoundary` and wrap the `Component` prop in the `pages/_app.js` file. This component will be responsible to: @@ -97,7 +97,7 @@ function MyApp({ Component, pageProps }) { export default MyApp ``` -You can learn more about [Error Boundaries](https://reactjs.org/docs/error-boundaries.html) in React's documentation. +You can learn more about [Error Boundaries](https://react.dev/reference/react/Component#catching-rendering-errors-with-an-error-boundary) in React's documentation. ### Reporting Errors diff --git a/docs/advanced-features/i18n-routing.md b/docs/advanced-features/i18n-routing.md index e79ab3054030a..2eed2aea9d026 100644 --- a/docs/advanced-features/i18n-routing.md +++ b/docs/advanced-features/i18n-routing.md @@ -13,7 +13,7 @@ description: Next.js has built-in support for internationalized routing and lang Next.js has built-in support for internationalized ([i18n](https://en.wikipedia.org/wiki/Internationalization_and_localization#Naming)) routing since `v10.0.0`. You can provide a list of locales, the default locale, and domain-specific locales and Next.js will automatically handle the routing. -The i18n routing support is currently meant to complement existing i18n library solutions like [`react-intl`](https://formatjs.io/docs/getting-started/installation), [`react-i18next`](https://react.i18next.com/), [`lingui`](https://lingui.dev/), [`rosetta`](https://github.com/lukeed/rosetta), [`next-intl`](https://github.com/amannn/next-intl), [`next-translate`](https://github.com/aralroca/next-translate), [`next-multilingual`](https://github.com/Avansai/next-multilingual), and others by streamlining the routes and locale parsing. +The i18n routing support is currently meant to complement existing i18n library solutions like [`react-intl`](https://formatjs.io/docs/react-intl/), [`react-i18next`](https://react.i18next.com/), [`lingui`](https://lingui.dev/), [`rosetta`](https://github.com/lukeed/rosetta), [`next-intl`](https://github.com/amannn/next-intl), [`next-translate`](https://github.com/aralroca/next-translate), [`next-multilingual`](https://github.com/Avansai/next-multilingual), [`typesafe-i18n`](https://github.com/ivanhofer/typesafe-i18n), and others by streamlining the routes and locale parsing. ## Getting started @@ -299,7 +299,7 @@ Next.js doesn't know about variants of a page so it's up to you to add the `href ## How does this work with Static Generation? -> Note that Internationalized Routing does not integrate with [`next export`](/docs/advanced-features/static-html-export.md) as `next export` does not leverage the Next.js routing layer. Hybrid Next.js applications that do not use `next export` are fully supported. +> Note that Internationalized Routing does not integrate with [`output: 'export'`](/docs/advanced-features/static-html-export.md) as it does not leverage the Next.js routing layer. Hybrid Next.js applications that do not use `output: 'export'` are fully supported. ### Dynamic Routes and `getStaticProps` Pages @@ -361,4 +361,4 @@ export async function getStaticProps({ locale }) { - `locales`: 100 total locales - `domains`: 100 total locale domain items -> **Note:** These limits have been added initially to prevent potential [performance issues at build time](#dynamic-routes-and-getStaticProps-pages). You can workaround these limits with custom routing using [Middleware](/docs/middleware.md) in Next.js 12. +> **Note**: These limits have been added initially to prevent potential [performance issues at build time](#dynamic-routes-and-getStaticProps-pages). You can workaround these limits with custom routing using [Middleware](/docs/middleware.md) in Next.js 12. diff --git a/docs/advanced-features/instrumentation.md b/docs/advanced-features/instrumentation.md new file mode 100644 index 0000000000000..e1f987628c5b9 --- /dev/null +++ b/docs/advanced-features/instrumentation.md @@ -0,0 +1,52 @@ +--- +description: Learn how to use instrumentation to run code at server startup in your Next.js app +--- + +> **Note**: This feature is experimental. To use it, you must explicitly opt in by defining `experimental.instrumentationHook = true;` in your `next.config.js`. + +# `instrumentation.ts` + +If you export a function named `register` from this file, we will call that function whenever a new Next.js server instance is bootstrapped. +When your `register` function is deployed, it will be called on each cold boot (but exactly once in each environment). + +Sometimes, it may be useful to import a file in your code because of the side effects it will cause. For example, you might import a file that defines a set of global variables, but never explicitly use the imported file in your code. You would still have access to the global variables the package has declared. + +You can import files with side effects in `instrumentation.ts`, which you might want to use in your `register` function as demonstrated in the following example: + +```ts +// /instrumentation.ts + +import { init } from 'package-init' + +export function register() { + init() +} +``` + +However, we recommend importing files with side effects using `import` from within your `register` function instead. The following example demonstrates a basic usage of `import` in a `register` function: + +```ts +// /instrumentation.ts + +export async function register() { + await import('package-with-side-effect') +} +``` + +By doing this, you can colocate all of your side effects in one place in your code, and avoid any unintended consequences from importing files. + +We call `register` in all environments, so it's necessary to conditionally import any code that doesn't support both `edge` and `nodejs`. You can use the environment variable `NEXT_RUNTIME` to get the current environment. Importing an environment-specific code would look like this: + +```ts +// /instrumentation.ts + +export async function register() { + if (process.env.NEXT_RUNTIME === 'nodejs') { + await import('./instrumentation-node') + } + + if (process.env.NEXT_RUNTIME === 'edge') { + await import('./instrumentation-edge') + } +} +``` diff --git a/docs/advanced-features/measuring-performance.md b/docs/advanced-features/measuring-performance.md index 3e7f6d0f56ae0..819659b9e81ac 100644 --- a/docs/advanced-features/measuring-performance.md +++ b/docs/advanced-features/measuring-performance.md @@ -1,15 +1,15 @@ --- -description: Measure and track page performance using Next.js Analytics +description: Measure and track page performance using Next.js Speed Insights --- # Measuring performance -[Next.js Analytics](https://nextjs.org/analytics) allows you to analyze and measure the performance of +[Next.js Speed Insights](https://nextjs.org/analytics) allows you to analyze and measure the performance of pages using different metrics. -You can start collecting your [Real Experience Score](https://vercel.com/docs/concepts/analytics/web-vitals?utm_source=next-site&utm_medium=docs&utm_campaign=next-website) with zero-configuration on [Vercel deployments](https://vercel.com/docs/analytics?utm_source=next-site&utm_medium=docs&utm_campaign=next-website). There's also support for Analytics if you're [self-hosting](https://vercel.com/docs/concepts/analytics#self-hosted?utm_source=next-site&utm_medium=docs&utm_campaign=next-website). +You can start collecting your [Real Experience Score](https://vercel.com/docs/concepts/speed-insights#core-web-vitals?utm_source=next-site&utm_medium=docs&utm_campaign=next-website) with zero-configuration on [Vercel deployments](https://vercel.com/docs/concepts/speed-insights?utm_source=next-site&utm_medium=docs&utm_campaign=next-website). -The rest of this documentation describes the built-in relayer Next.js Analytics uses. +The rest of this documentation describes the built-in relayer Next.js Speed Insights uses. ## Build Your Own @@ -142,9 +142,9 @@ export function reportWebVitals(metric) { These metrics work in all browsers that support the [User Timing API](https://caniuse.com/#feat=user-timing). -## Sending results to analytics +## Sending results to external systems -With the relay function, you can send any of results to an analytics endpoint to measure and track +With the relay function, you can send results to any endpoint to measure and track real user performance on your site. For example: ```js diff --git a/docs/advanced-features/middleware.md b/docs/advanced-features/middleware.md index 7ceced92003cc..54842f3e95ea7 100644 --- a/docs/advanced-features/middleware.md +++ b/docs/advanced-features/middleware.md @@ -21,7 +21,7 @@ Middleware allows you to run code before a request is completed, then based on t Middleware runs _before_ cached content, so you can personalize static files and pages. Common examples of Middleware would be authentication, A/B testing, localized pages, bot protection, and more. Regarding localized pages, you can start with [i18n routing](/docs/advanced-features/i18n-routing) and implement Middleware for more advanced use cases. -> **Note:** If you were using Middleware prior to `12.2`, please see the [upgrade guide](https://nextjs.org/docs/messages/middleware-upgrade-guide). +> **Note**: If you were using Middleware prior to `12.2`, please see the [upgrade guide](https://nextjs.org/docs/messages/middleware-upgrade-guide). ## Using Middleware @@ -105,7 +105,7 @@ export const config = { } ``` -> **Note:** The `matcher` values need to be constants so they can be statically analyzed at build-time. Dynamic values such as variables will be ignored. +> **Note**: The `matcher` values need to be constants so they can be statically analyzed at build-time. Dynamic values such as variables will be ignored. Configured matchers: @@ -116,7 +116,7 @@ Configured matchers: Read more details on [path-to-regexp](https://github.com/pillarjs/path-to-regexp#path-to-regexp-1) documentation. -> **Note:** For backward compatibility, Next.js always considers `/public` as `/public/index`. Therefore, a matcher of `/public/:path` will match. +> **Note**: For backward compatibility, Next.js always considers `/public` as `/public/index`. Therefore, a matcher of `/public/:path` will match. ### Conditional Statements @@ -221,13 +221,11 @@ export function middleware(request: NextRequest) { } ``` -> **Note:** Avoid setting large headers as it might cause [431 Request Header Fields Too Large](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/431) error depending on your backend web server configuration. +> **Note**: Avoid setting large headers as it might cause [431 Request Header Fields Too Large](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/431) error depending on your backend web server configuration. ## Producing a Response -You can respond to middleware directly by returning a `NextResponse` (responding from middleware is available since Next.js v13.1.0). - -Once enabled, you can provide a response from middleware using the `Response` or `NextResponse` API: +You can respond from Middleware directly by returning a `Response` or `NextResponse` instance. (This is available since [Next.js v13.1.0](https://nextjs.org/blog/next-13-1#nextjs-advanced-middleware)) ```ts // middleware.ts diff --git a/docs/advanced-features/module-path-aliases.md b/docs/advanced-features/module-path-aliases.md index ec19e194bbfd3..113a843b0bef0 100644 --- a/docs/advanced-features/module-path-aliases.md +++ b/docs/advanced-features/module-path-aliases.md @@ -13,9 +13,9 @@ description: Configure module path aliases that allow you to remap certain impor Next.js automatically supports the `tsconfig.json` and `jsconfig.json` `"paths"` and `"baseUrl"` options since [Next.js 9.4](https://nextjs.org/blog/next-9-4). -> Note: `jsconfig.json` can be used when you don't use TypeScript +> **Note**: `jsconfig.json` can be used when you don't use TypeScript -> Note: you need to restart dev server to reflect modifications done in `tsconfig.json` / `jsconfig.json` +> **Note**: you need to restart dev server to reflect modifications done in `tsconfig.json` / `jsconfig.json` These options allow you to configure module aliases, for example a common pattern is aliasing certain directories to use absolute paths. diff --git a/docs/advanced-features/open-telemetry.md b/docs/advanced-features/open-telemetry.md new file mode 100644 index 0000000000000..2adcb6c985994 --- /dev/null +++ b/docs/advanced-features/open-telemetry.md @@ -0,0 +1,279 @@ +--- +description: Learn how to instrument your Next.js app with OpenTelemetry. +--- + +> **Note**: This feature is experimental, you need to explicitly opt-in by providing `experimental.instrumentationHook = true;` in your `next.config.js`. + +# OpenTelemetry in Next.js + +Observability is crucial for understanding and optimizing the behavior and performance of your Next.js app. + +As applications become more complex, it becomes increasingly difficult to identify and diagnose issues that may arise. By leveraging observability tools, such as logging and metrics, developers can gain insights into their application's behavior and identify areas for optimization. With observability, developers can proactively address issues before they become major problems and provide a better user experience. Therefore, it is highly recommended to use observability in your Next.js applications to improve performance, optimize resources, and enhance user experience. + +We recommend using OpenTelemetry for instrumenting your apps. +It's a platform-agnostic way to instrument apps that allows you to change your observability provider without changing your code. +Read [Official OpenTelemetry docs](https://opentelemetry.io/docs/) for more information about OpenTelemetry and how it works. + +This documentation uses terms like _Span_, _Trace_ or _Exporter_ throughout this doc, all of which can be found in [the OpenTelemetry Observability Primer](https://opentelemetry.io/docs/concepts/observability-primer/). + +Next.js supports OpenTelemetry instrumentation out of the box, which means that we already instrumented Next.js itself. +When you enable OpenTelemetry we will automatically wrap all your code like `getStaticProps` in _spans_ with helpful attributes. + +> **Note**: We currently support OpenTelemetry bindings only in serverless functions. +> We don't provide any for `edge` or client side code. + +## Getting Started + +OpenTelemetry is extensible but setting it up properly can be quite verbose. +That's why we prepared a package `@vercel/otel` that helps you get started quickly. +It's not extensible and you should configure OpenTelemetry manually you need to customize your setup. + +### Using `@vercel/otel` + +To get started, you must install `@vercel/otel`: + +```bash +npm install @vercel/otel +``` + +Next, create a custom [`instrumentation.ts`](https://nextjs.org/docs/advanced-features/instrumentation) file in the root of the project: + +```ts +// instrumentation.ts +import { registerOTel } from '@vercel/otel' + +export function register() { + registerOTel('next-app') +} +``` + +> **Note**: We have created a basic [with-opentelemetry](https://github.com/vercel/next.js/tree/canary/examples/with-opentelemetry) example that you can use. + +### Manual OpenTelemetry configuration + +If our wrapper `@vercel/otel` doesn't suit your needs, you can configure OpenTelemetry manually. + +Firstly you need to install OpenTelemetry packages: + +```bash +npm install @opentelemetry/sdk-node @opentelemetry/resources @opentelemetry/semantic-conventions @opentelemetry/sdk-trace-base @opentelemetry/exporter-trace-otlp-grpc +``` + +Now you can initialize `NodeSDK` in your `instrumentation.ts`. +OpenTelemetry APIs are not compatible with edge runtime, so you need to make sure that you are importing them only when `process.env.NEXT_RUNTIME === 'nodejs'`. We recommend creating a new file `instrumentation.node.ts` which you conditionally import only when using node: + +```ts +// instrumentation.ts +export async function register() { + if (process.env.NEXT_RUNTIME === 'nodejs') { + await import('./instrumentation.node.ts') + } +} +``` + +```ts +// instrumentation.node.ts +import { NodeSDK } from '@opentelemetry/sdk-node' +import { OTLPTraceExporter } from '@opentelemetry/exporter-trace-otlp-grpc' +import { Resource } from '@opentelemetry/resources' +import { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions' +import { SimpleSpanProcessor } from '@opentelemetry/sdk-trace-node' + +const sdk = new NodeSDK({ + resource: new Resource({ + [SemanticResourceAttributes.SERVICE_NAME]: 'next-app', + }), + spanProcessor: new SimpleSpanProcessor(new OTLPTraceExporter()), +}) +sdk.start() +``` + +Doing this is equivalent to using `@vercel/otel`, but it's possible to modify and extend. +For example, you could use `@opentelemetry/exporter-trace-otlp-http` instead of `@opentelemetry/exporter-trace-otlp-grpc` or you can specify more resource attributes. + +## Testing your instrumentation + +You need an OpenTelemetry collector with a compatible backend to test OpenTelemetry traces locally. +We recommend using our [OpenTelemetry dev environment](https://github.com/vercel/opentelemetry-collector-dev-setup). + +If everything works well you should be able to see the root server span labeled as `GET /requested/pathname`. +All other spans from that particular trace will be nested under it. + +Next.js traces more spans than are emitted by default. +To see more spans, you must set `NEXT_OTEL_VERBOSE=1`. + +## Deployment + +### Using OpenTelemetry Collector + +When you are deploying with OpenTelemetry Collector, you can use `@vercel/otel`. +It will work both on Vercel and when self-hosted. + +#### Deploying on Vercel + +We made sure that OpenTelemetry works out of the box on Vercel. + +Follow [Vercel documentation](https://vercel.com/docs/concepts/observability/otel-overview/quickstart) to connect your project to an observability provider. + +#### Self-hosting + +Deploying to other platforms is also straightforward. You will need to spin up your own OpenTelemetry Collector to receive and process the telemetry data from your Next.js app. + +To do this, follow the [OpenTelemetry Collector Getting Started guide](https://opentelemetry.io/docs/collector/getting-started/), which will walk you through setting up the collector and configuring it to receive data from your Next.js app. + +Once you have your collector up and running, you can deploy your Next.js app to your chosen platform following their respective deployment guides. + +### Custom Exporters + +We recommend using OpenTelemetry Collector. +If that is not possible on your platform, you can use a custom OpenTelemetry exporter with [manual OpenTelemetry configuration](https://nextjs.org/docs/advanced-features/open-telemetry#manual-opentelemetry-configuration) + +## Custom Spans + +You can add a custom span with [OpenTelemetry APIs](https://opentelemetry.io/docs/instrumentation/js/instrumentation). + +```bash +npm install @opentelemetry/api +``` + +The following example demonstrates a function that fetches GitHub stars and adds a custom `fetchGithubStars` span to track the fetch request's result: + +```ts +import { trace } from '@opentelemetry/api' + +export async function fetchGithubStars() { + return await trace + .getTracer('nextjs-example') + .startActiveSpan('fetchGithubStars', async (span) => { + try { + return await getValue() + } finally { + span.end() + } + }) +} +``` + +The `register` function will execute before your code runs in a new environment. +You can start creating new spans, and they should be correctly added to the exported trace. + +## Default Spans in Next.js + +Next.js automatically instruments several spans for you to provide useful insights into your application's performance. + +Attributes on spans follow [OpenTelemetry semantic conventions](https://opentelemetry.io/docs/reference/specification/trace/semantic_conventions/). We also add some custom attributes under the `next` namespace: + +- `next.span_name` - duplicates span name +- `next.span_type` - each span type has a unique identifier +- `next.route` - The route pattern of the request (e.g., `/[param]/user`). +- `next.page` + - This is an internal value used by an app router. + - You can think about it as a route to a special file (like `page.ts`, `layout.ts`, `loading.ts` and others) + - It can be used as a unique identifier only when paired with `next.route` because `/layout` can be used to identify both `/(groupA)/layout.ts` and `/(groupB)/layout.ts` + +### `[http.method] [next.route]` + +- `next.span_type`: `BaseServer.handleRequest` + +This span represents the root span for each incoming request to your Next.js application. It tracks the HTTP method, route, target, and status code of the request. + +Attributes: + +- [Common HTTP attributes](https://opentelemetry.io/docs/reference/specification/trace/semantic_conventions/http/#common-attributes) + - `http.method` + - `http.status_code` +- [Server HTTP attributes](https://opentelemetry.io/docs/reference/specification/trace/semantic_conventions/http/#http-server-semantic-conventions) + - `http.route` + - `http.target` +- `next.span_name` +- `next.span_type` +- `next.route` + +### `render route (app) [next.route]` + +- `next.span_type`: `AppRender.getBodyResult`. + +This span represents the process of rendering a route in the app router. + +Attributes: + +- `next.span_name` +- `next.span_type` +- `next.route` + +### `fetch [http.method] [http.url]` + +- `next.span_type`: `AppRender.fetch` + +This span represents the fetch request executed in your code. + +Attributes: + +- [Common HTTP attributes](https://opentelemetry.io/docs/reference/specification/trace/semantic_conventions/http/#common-attributes) + - `http.method` +- [Client HTTP attributes](https://opentelemetry.io/docs/reference/specification/trace/semantic_conventions/http/#http-client) + - `http.url` + - `net.peer.name` + - `net.peer.port` (only if specified) +- `next.span_name` +- `next.span_type` + +### `executing api route (app) [next.route]` + +- `next.span_type`: `AppRouteRouteHandlers.runHandler`. + +This span represents the execution of an API route handler in the app router. + +Attributes: + +- `next.span_name` +- `next.span_type` +- `next.route` + +### `getServerSideProps [next.route]` + +- `next.span_type`: `Render.getServerSideProps`. + +This span represents the execution of `getServerSideProps` for a specific route. + +Attributes: + +- `next.span_name` +- `next.span_type` +- `next.route` + +### `getStaticProps [next.route]` + +- `next.span_type`: `Render.getStaticProps`. + +This span represents the execution of `getStaticProps` for a specific route. + +Attributes: + +- `next.span_name` +- `next.span_type` +- `next.route` + +### `render route (pages) [next.route]` + +- `next.span_type`: `Render.renderDocument`. + +This span represents the process of rendering the document for a specific route. + +Attributes: + +- `next.span_name` +- `next.span_type` +- `next.route` + +### `generateMetadata [next.page]` + +- `next.span_type`: `ResolveMetadata.generateMetadata`. + +This span represents the process of generating metadata for a specific page (a single route can have multiple of these spans). + +Attributes: + +- `next.span_name` +- `next.span_type` +- `next.page` diff --git a/docs/advanced-features/output-file-tracing.md b/docs/advanced-features/output-file-tracing.md index 138a74ac868b7..4f42300cc76d1 100644 --- a/docs/advanced-features/output-file-tracing.md +++ b/docs/advanced-features/output-file-tracing.md @@ -34,9 +34,9 @@ This will create a folder at `.next/standalone` which can then be deployed on it Additionally, a minimal `server.js` file is also output which can be used instead of `next start`. This minimal server does not copy the `public` or `.next/static` folders by default as these should ideally be handled by a CDN instead, although these folders can be copied to the `standalone/public` and `standalone/.next/static` folders manually, after which `server.js` file will serve these automatically. -Note: `next.config.js` is read during `next build` and serialized into the `server.js` output file. If the legacy [`serverRuntimeConfig` or `publicRuntimeConfig` options](/docs/api-reference/next.config.js/runtime-configuration.md) are being used, the values will be specific to values at build time. +> **Note**: `next.config.js` is read during `next build` and serialized into the `server.js` output file. If the legacy [`serverRuntimeConfig` or `publicRuntimeConfig` options](/docs/api-reference/next.config.js/runtime-configuration.md) are being used, the values will be specific to values at build time. -If your project uses [Image Optimization](/docs/basic-features/image-optimization.md) with the default `loader`, you must install `sharp` as a dependency: +> **Note**: If your project uses [Image Optimization](/docs/basic-features/image-optimization.md) with the default `loader`, you must install `sharp` as a dependency: ```bash npm i sharp diff --git a/docs/advanced-features/preview-mode.md b/docs/advanced-features/preview-mode.md index 0428831219803..2b77d7f2c33df 100644 --- a/docs/advanced-features/preview-mode.md +++ b/docs/advanced-features/preview-mode.md @@ -243,7 +243,7 @@ export default function myApiRoute(req, res) { Both the bypass cookie value and the private key for encrypting the `previewData` change when `next build` is completed. This ensures that the bypass cookie can’t be guessed. -> **Note:** To test Preview Mode locally over HTTP your browser will need to allow third-party cookies and local storage access. +> **Note**: To test Preview Mode locally over HTTP your browser will need to allow third-party cookies and local storage access. ## Learn more diff --git a/docs/advanced-features/turbopack.md b/docs/advanced-features/turbopack.md index faea6ce6c656a..b3bc591718506 100644 --- a/docs/advanced-features/turbopack.md +++ b/docs/advanced-features/turbopack.md @@ -2,7 +2,7 @@ description: Turbopack, an incremental bundler built with Rust, can be used with Next.js 13 using the --turbo flag for faster local development. --- -# Turbopack (alpha) +# Turbopack (beta) [Turbopack](https://turbo.build/pack) is an incremental bundler optimized for JavaScript and TypeScript, written in Rust, and built into Next.js 13. diff --git a/docs/advanced-features/using-mdx.md b/docs/advanced-features/using-mdx.md index 669f57788cb54..51bf516bd9fd7 100644 --- a/docs/advanced-features/using-mdx.md +++ b/docs/advanced-features/using-mdx.md @@ -191,7 +191,7 @@ import Image from 'next/image' import { Heading, InlineCode, Pre, Table, Text } from 'my-components' const ResponsiveImage = (props) => ( - {props.alt} + {props.alt} ) const components = { diff --git a/docs/api-reference/cli.md b/docs/api-reference/cli.md index 208d7c9383b0a..5b4b3ab7d6f6d 100644 --- a/docs/api-reference/cli.md +++ b/docs/api-reference/cli.md @@ -39,7 +39,7 @@ NODE_OPTIONS='-r esm' next NODE_OPTIONS='--inspect' next ``` -> Note: Running `next` without a command is the same as running `next dev` +> **Note**: Running `next` without a command is the same as running `next dev` ## Build @@ -82,7 +82,7 @@ Or using the `PORT` environment variable: PORT=4000 npx next dev ``` -> Note: `PORT` can not be set in `.env` as booting up the HTTP server happens before any other code is initialized. +> **Note**: `PORT` cannot be set in `.env` as booting up the HTTP server happens before any other code is initialized. You can also set the hostname to be different from the default of `0.0.0.0`, this can be useful for making the application available for other devices on the network. The default hostname can be changed with `-H`, like so: @@ -106,7 +106,9 @@ Or using the `PORT` environment variable: PORT=4000 npx next start ``` -> Note: `PORT` can not be set in `.env` as booting up the HTTP server happens before any other code is initialized. +> **Note**: `PORT` cannot be set in `.env` as booting up the HTTP server happens before any other code is initialized. + +> **Note**: `next start` cannot be used with `output: 'standalone'` or `output: 'export'`. ### Keep Alive Timeout diff --git a/docs/api-reference/create-next-app.md b/docs/api-reference/create-next-app.md index 1eb306a6a98af..3b48b62b46769 100644 --- a/docs/api-reference/create-next-app.md +++ b/docs/api-reference/create-next-app.md @@ -57,9 +57,9 @@ Options: Initialize with ESLint config. - --experimental-app + --app - Initialize as a `app/` directory project. + Initialize as an App Router project. --src-dir diff --git a/docs/api-reference/data-fetching/get-initial-props.md b/docs/api-reference/data-fetching/get-initial-props.md index 5bf23570dd175..8c12807e07db5 100644 --- a/docs/api-reference/data-fetching/get-initial-props.md +++ b/docs/api-reference/data-fetching/get-initial-props.md @@ -70,7 +70,7 @@ For the initial page load, `getInitialProps` will run on the server only. `getIn - `getInitialProps` can **not** be used in children components, only in the default export of every page - If you are using server-side only modules inside `getInitialProps`, make sure to [import them properly](https://arunoda.me/blog/ssr-and-server-only-modules), otherwise it'll slow down your app -> Note that irrespective of rendering type, any `props` will be passed to the page component and can be viewed on the client-side in the initial HTML. This is to allow the page to be [hydrated](https://reactjs.org/docs/react-dom.html#hydrate) correctly. Make sure that you don't pass any sensitive information that shouldn't be available on the client in `props`. +> Note that irrespective of rendering type, any `props` will be passed to the page component and can be viewed on the client-side in the initial HTML. This is to allow the page to be [hydrated](https://react.dev/reference/react-dom/hydrate) correctly. Make sure that you don't pass any sensitive information that shouldn't be available on the client in `props`. ## TypeScript diff --git a/docs/api-reference/data-fetching/get-static-paths.md b/docs/api-reference/data-fetching/get-static-paths.md index c72851cdb63b5..131003f793ae6 100644 --- a/docs/api-reference/data-fetching/get-static-paths.md +++ b/docs/api-reference/data-fetching/get-static-paths.md @@ -126,7 +126,7 @@ If `fallback` is `true`, then the behavior of `getStaticProps` changes in the fo - When complete, the browser receives the `JSON` for the generated path. This will be used to automatically render the page with the required props. From the user’s perspective, the page will be swapped from the fallback page to the full page. - At the same time, Next.js adds this path to the list of pre-rendered pages. Subsequent requests to the same path will serve the generated page, like other pages pre-rendered at build time. -> **Note:** `fallback: true` is not supported when using [`next export`](/docs/advanced-features/static-html-export.md). +> **Note**: `fallback: true` is not supported when using [`output: 'export'`](/docs/advanced-features/static-html-export.md). #### When is `fallback: true` useful? @@ -153,7 +153,7 @@ If `fallback` is `'blocking'`, new paths not returned by `getStaticPaths` will w `fallback: 'blocking'` will not _update_ generated pages by default. To update generated pages, use [Incremental Static Regeneration](/docs/basic-features/data-fetching/incremental-static-regeneration.md) in conjunction with `fallback: 'blocking'`. -> **Note:** `fallback: 'blocking'` is not supported when using [`next export`](/docs/advanced-features/static-html-export.md). +> **Note**: `fallback: 'blocking'` is not supported when using [`output: 'export'`](/docs/advanced-features/static-html-export.md). ### Fallback pages diff --git a/docs/api-reference/edge-runtime.md b/docs/api-reference/edge-runtime.md index ed0685f52637e..ee58486080765 100644 --- a/docs/api-reference/edge-runtime.md +++ b/docs/api-reference/edge-runtime.md @@ -126,10 +126,6 @@ The Edge Runtime supports the following web standard APIs: | [`WeakSet`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet) | Represents a collection of objects in which each object may occur only once | | [`WebAssembly`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly) | Provides access to WebAssembly | -## Next.js Specific Polyfills - -- [`AsyncLocalStorage`](https://nodejs.org/api/async_context.html#class-asynclocalstorage) - ## Environment Variables You can use `process.env` to access [Environment Variables](/docs/basic-features/environment-variables.md) for both `next dev` and `next build`. @@ -143,11 +139,25 @@ console.log(process.env.TEST_VARIABLE) // value ``` +## Compatible Node.js Modules + +The following modules can be imported with and without the `node:` prefix when using the `import` statement: + +| Module | Description | +| -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [`async_hooks`](https://nodejs.org/api/async_hooks.html) | Manage asynchronous resources lifecycles with `AsyncLocalStorage`. Supports the [WinterCG subset](https://github.com/wintercg/proposal-common-minimum-api/blob/main/asynclocalstorage.md) of APIs | +| [`events`](https://nodejs.org/api/events.html) | Facilitate event-driven programming with custom event emitters and listeners. This API is fully supported | +| [`buffer`](https://nodejs.org/api/buffer.html) | Efficiently manipulate binary data using fixed-size, raw memory allocations with `Buffer`. Every primitive compatible with `Uint8Array` accepts `Buffer` too | +| [`assert`](https://nodejs.org/api/assert.html) | Provide a set of assertion functions for verifying invariants in your code | +| [`util`](https://nodejs.org/api/util.html) | Offer various utility functions where we include `promisify`/`callbackify` and `types` | + +Also, `Buffer` and `AsyncLocalStorage` are globally exposed to maximize compatibility with existing Node.js nodules. + ## Unsupported APIs The Edge Runtime has some restrictions including: -- Native Node.js APIs **are not supported**. For example, you can't read or write to the filesystem +- Some Node.js APIs other than the ones listed above **are not supported**. For example, you can't read or write to the filesystem - `node_modules` _can_ be used, as long as they implement ES Modules and do not use native Node.js APIs - Calling `require` directly is **not allowed**. Use ES Modules instead diff --git a/docs/api-reference/next.config.js/basepath.md b/docs/api-reference/next.config.js/basepath.md index 0dcf2c669c78c..cee815847e366 100644 --- a/docs/api-reference/next.config.js/basepath.md +++ b/docs/api-reference/next.config.js/basepath.md @@ -23,7 +23,7 @@ module.exports = { } ``` -Note: this value must be set at build time and can not be changed without re-building as the value is inlined in the client-side bundles. +> **Note**: This value must be set at build time and cannot be changed without re-building as the value is inlined in the client-side bundles. ## Links diff --git a/docs/api-reference/next.config.js/build-indicator.md b/docs/api-reference/next.config.js/build-indicator.md index cccaa3d4bfad6..ebd9c0626552b 100644 --- a/docs/api-reference/next.config.js/build-indicator.md +++ b/docs/api-reference/next.config.js/build-indicator.md @@ -6,7 +6,7 @@ description: In development mode, pages include an indicator to let you know if When you edit your code, and Next.js is compiling the application, a compilation indicator appears in the bottom right corner of the page. -> **Note:** This indicator is only present in development mode and will not appear when building and running the app in production mode. +> **Note**: This indicator is only present in development mode and will not appear when building and running the app in production mode. In some cases this indicator can be misplaced on your page, for example, when conflicting with a chat launcher. To change its position, open `next.config.js` and set the `buildActivityPosition` in the `devIndicators` object to `bottom-right` (default), `bottom-left`, `top-right` or `top-left`: diff --git a/docs/api-reference/next.config.js/custom-webpack-config.md b/docs/api-reference/next.config.js/custom-webpack-config.md index b26aae2403772..246d58762b4bc 100644 --- a/docs/api-reference/next.config.js/custom-webpack-config.md +++ b/docs/api-reference/next.config.js/custom-webpack-config.md @@ -4,7 +4,7 @@ description: Extend the default webpack config added by Next.js. # Custom Webpack Config -> Note: changes to webpack config are not covered by semver so proceed at your own risk +> **Note**: changes to webpack config are not covered by semver so proceed at your own risk Before continuing to add custom webpack configuration to your application make sure Next.js doesn't already support your use-case: diff --git a/docs/api-reference/next.config.js/exportPathMap.md b/docs/api-reference/next.config.js/exportPathMap.md index 80eff054d087a..b944e0314438f 100644 --- a/docs/api-reference/next.config.js/exportPathMap.md +++ b/docs/api-reference/next.config.js/exportPathMap.md @@ -40,7 +40,7 @@ module.exports = { } ``` -> Note: the `query` field in `exportPathMap` cannot be used with [automatically statically optimized pages](/docs/advanced-features/automatic-static-optimization) or [`getStaticProps` pages](/docs/basic-features/data-fetching/get-static-props.md) as they are rendered to HTML files at build-time and additional query information cannot be provided during `next export`. +> **Note**: the `query` field in `exportPathMap` cannot be used with [automatically statically optimized pages](/docs/advanced-features/automatic-static-optimization) or [`getStaticProps` pages](/docs/basic-features/data-fetching/get-static-props.md) as they are rendered to HTML files at build-time and additional query information cannot be provided during `next export`. The pages will then be exported as HTML files, for example, `/about` will become `/about.html`. diff --git a/docs/api-reference/next.config.js/headers.md b/docs/api-reference/next.config.js/headers.md index 03b6f73e9ceb2..9f6c42329fdff 100644 --- a/docs/api-reference/next.config.js/headers.md +++ b/docs/api-reference/next.config.js/headers.md @@ -416,6 +416,6 @@ For more information, we recommend the following sections: diff --git a/docs/api-reference/next.config.js/react-strict-mode.md b/docs/api-reference/next.config.js/react-strict-mode.md index b844bf84506fd..cc4d795450f94 100644 --- a/docs/api-reference/next.config.js/react-strict-mode.md +++ b/docs/api-reference/next.config.js/react-strict-mode.md @@ -6,7 +6,7 @@ description: The complete Next.js runtime is now Strict Mode-compliant, learn ho > **Suggested**: We strongly suggest you enable Strict Mode in your Next.js application to better prepare your application for the future of React. -React's [Strict Mode](https://reactjs.org/docs/strict-mode.html) is a development mode only feature for highlighting potential problems in an application. It helps to identify unsafe lifecycles, legacy API usage, and a number of other features. +React's [Strict Mode](https://react.dev/reference/react/StrictMode) is a development mode only feature for highlighting potential problems in an application. It helps to identify unsafe lifecycles, legacy API usage, and a number of other features. The Next.js runtime is Strict Mode-compliant. To opt-in to Strict Mode, configure the following option in your `next.config.js`: diff --git a/docs/api-reference/next.config.js/redirects.md b/docs/api-reference/next.config.js/redirects.md index 68564f6de1088..f89e333e7a5b5 100644 --- a/docs/api-reference/next.config.js/redirects.md +++ b/docs/api-reference/next.config.js/redirects.md @@ -311,7 +311,7 @@ module.exports = { } ``` -In some rare cases, you might need to assign a custom status code for older HTTP Clients to properly redirect. In these cases, you can use the `statusCode` property instead of the `permanent` property, but not both. Note: to ensure IE11 compatibility a `Refresh` header is automatically added for the 308 status code. +In some rare cases, you might need to assign a custom status code for older HTTP Clients to properly redirect. In these cases, you can use the `statusCode` property instead of the `permanent` property, but not both. To to ensure IE11 compatibility, a `Refresh` header is automatically added for the 308 status code. ## Other Redirects diff --git a/docs/api-reference/next.config.js/rewrites.md b/docs/api-reference/next.config.js/rewrites.md index 9a9d50e3bec74..9885bab7e4eab 100644 --- a/docs/api-reference/next.config.js/rewrites.md +++ b/docs/api-reference/next.config.js/rewrites.md @@ -89,7 +89,7 @@ module.exports = { } ``` -Note: rewrites in `beforeFiles` do not check the filesystem/dynamic routes immediately after matching a source, they continue until all `beforeFiles` have been checked. +> **Note**: rewrites in `beforeFiles` do not check the filesystem/dynamic routes immediately after matching a source, they continue until all `beforeFiles` have been checked. The order Next.js routes are checked is: @@ -150,7 +150,7 @@ module.exports = { } ``` -Note: for static pages from the [Automatic Static Optimization](/docs/advanced-features/automatic-static-optimization.md) or [prerendering](/docs/basic-features/data-fetching/get-static-props.md) params from rewrites will be parsed on the client after hydration and provided in the query. +> **Note**: Static pages from [Automatic Static Optimization](/docs/advanced-features/automatic-static-optimization.md) or [prerendering](/docs/basic-features/data-fetching/get-static-props.md) params from rewrites will be parsed on the client after hydration and provided in the query. ## Path Matching diff --git a/docs/api-reference/next.config.js/runtime-configuration.md b/docs/api-reference/next.config.js/runtime-configuration.md index 1f246250ee291..3e4a042ccd08f 100644 --- a/docs/api-reference/next.config.js/runtime-configuration.md +++ b/docs/api-reference/next.config.js/runtime-configuration.md @@ -4,7 +4,7 @@ description: Add client and server runtime configuration to your Next.js app. # Runtime Configuration -> Note: This feature is considered legacy and does not work with [Automatic Static Optimization](/docs/advanced-features/automatic-static-optimization.md), [Output File Tracing](/docs/advanced-features/output-file-tracing.md#automatically-copying-traced-files), or [React Server Components](/docs/advanced-features/react-18/server-components.md). Please use [environment variables](/docs/basic-features/environment-variables.md) instead in order to avoid initialization overhead. +> **Note**: This feature is considered legacy and does not work with [Automatic Static Optimization](/docs/advanced-features/automatic-static-optimization.md), [Output File Tracing](/docs/advanced-features/output-file-tracing.md#automatically-copying-traced-files), or [React Server Components](/docs/advanced-features/react-18/server-components.md). Please use [environment variables](/docs/basic-features/environment-variables.md) instead in order to avoid initialization overhead. To add runtime configuration to your app, open `next.config.js` and add the `publicRuntimeConfig` and `serverRuntimeConfig` configs: diff --git a/docs/api-reference/next.config.js/static-optimization-indicator.md b/docs/api-reference/next.config.js/static-optimization-indicator.md index f8c512d388a44..3615d665065a4 100644 --- a/docs/api-reference/next.config.js/static-optimization-indicator.md +++ b/docs/api-reference/next.config.js/static-optimization-indicator.md @@ -4,7 +4,7 @@ description: Optimized pages include an indicator to let you know if it's being # Static Optimization Indicator -> **Note:** This indicator was removed in Next.js version 10.0.1. We recommend upgrading to the latest version of Next.js. +> **Note**: This indicator was removed in Next.js version 10.0.1. We recommend upgrading to the latest version of Next.js. When a page qualifies for [Automatic Static Optimization](/docs/advanced-features/automatic-static-optimization.md) we show an indicator to let you know. diff --git a/docs/api-reference/next/amp.md b/docs/api-reference/next/amp.md index 6cc212791168d..f614b5853400d 100644 --- a/docs/api-reference/next/amp.md +++ b/docs/api-reference/next/amp.md @@ -84,4 +84,4 @@ The page above is a hybrid AMP page, which means: - The page is rendered as traditional HTML (default) and AMP HTML (by adding `?amp=1` to the URL) - The AMP version of the page only has valid optimizations applied with AMP Optimizer so that it is indexable by search-engines -The page uses `useAmp` to differentiate between modes, it's a [React Hook](https://reactjs.org/docs/hooks-intro.html) that returns `true` if the page is using AMP, and `false` otherwise. +The page uses `useAmp` to differentiate between modes, it's a [React Hook](https://react.dev/reference/react) that returns `true` if the page is using AMP, and `false` otherwise. diff --git a/docs/api-reference/next/image.md b/docs/api-reference/next/image.md index d2517c8b8a4ba..15f5be4d5f3c0 100644 --- a/docs/api-reference/next/image.md +++ b/docs/api-reference/next/image.md @@ -209,7 +209,7 @@ In some cases, you may need more advanced usage. The `` component optio ### style -Allows [passing CSS styles](https://reactjs.org/docs/dom-elements.html#style) to the underlying image element. +Allows [passing CSS styles](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/style) to the underlying image element. Also keep in mind that the required `width` and `height` props can interact with your styling. If you use styling to modify an image's `width`, you must set the `height="auto"` style as well, or your image will be distorted. @@ -317,7 +317,7 @@ module.exports = { } ``` -> Note: The example above will ensure the `src` property of `next/image` must start with `https://example.com/account123/`. Any other protocol, hostname, port, or unmatched path will respond with 400 Bad Request. +> **Note**: The example above will ensure the `src` property of `next/image` must start with `https://example.com/account123/`. Any other protocol, hostname, port, or unmatched path will respond with 400 Bad Request. Below is another example of the `remotePatterns` property in the `next.config.js` file: @@ -334,7 +334,7 @@ module.exports = { } ``` -> Note: The example above will ensure the `src` property of `next/image` must start with `https://img1.example.com` or `https://me.avatar.example.com` or any number of subdomains. Any other protocol or unmatched hostname will respond with 400 Bad Request. +> **Note**: The example above will ensure the `src` property of `next/image` must start with `https://img1.example.com` or `https://me.avatar.example.com` or any number of subdomains. Any other protocol or unmatched hostname will respond with 400 Bad Request. Wildcard patterns can be used for both `pathname` and `hostname` and have the following syntax: @@ -345,7 +345,7 @@ The `**` syntax does not work in the middle of the pattern. ### Domains -> Note: We recommend using [`remotePatterns`](#remote-patterns) instead so you can restrict protocol and pathname. +> **Note**: We recommend using [`remotePatterns`](#remote-patterns) instead so you can restrict protocol and pathname. Similar to [`remotePatterns`](#remote-patterns), the `domains` configuration can be used to provide a list of allowed hostnames for external images. @@ -448,9 +448,9 @@ module.exports = { } ``` -> Note: AVIF generally takes 20% longer to encode but it compresses 20% smaller compared to WebP. This means that the first time an image is requested, it will typically be slower and then subsequent requests that are cached will be faster. +> **Note**: AVIF generally takes 20% longer to encode but it compresses 20% smaller compared to WebP. This means that the first time an image is requested, it will typically be slower and then subsequent requests that are cached will be faster. -> Note: If you self-host with a Proxy/CDN in front of Next.js, you must configure the Proxy to forward the `Accept` header. +> **Note**: If you self-host with a Proxy/CDN in front of Next.js, you must configure the Proxy to forward the `Accept` header. ## Caching Behavior diff --git a/docs/api-reference/next/legacy/image.md b/docs/api-reference/next/legacy/image.md index f5ef5d2468b13..864d7429361fe 100644 --- a/docs/api-reference/next/legacy/image.md +++ b/docs/api-reference/next/legacy/image.md @@ -203,7 +203,7 @@ In some cases, you may need more advanced usage. The `` component optio ### style -Allows [passing CSS styles](https://reactjs.org/docs/dom-elements.html#style) to the underlying image element. +Allows [passing CSS styles](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/style) to the underlying image element. Note that all `layout` modes apply their own styles to the image element, and these automatic styles take precedence over the `style` prop. @@ -274,9 +274,9 @@ If the image is nested in a scrollable parent element other than the root docume ### lazyRoot -A React [Ref](https://reactjs.org/docs/refs-and-the-dom.html) pointing to the scrollable parent element. Defaults to `null` (the document viewport). +A React [Ref](https://react.dev/learn/referencing-values-with-refs) pointing to the scrollable parent element. Defaults to `null` (the document viewport). -The Ref must point to a DOM element or a React component that [forwards the Ref](https://reactjs.org/docs/forwarding-refs.html) to the underlying DOM element. +The Ref must point to a DOM element or a React component that [forwards the Ref](https://react.dev/reference/react/forwardRef) to the underlying DOM element. **Example pointing to a DOM element** @@ -379,7 +379,7 @@ module.exports = { } ``` -> Note: The example above will ensure the `src` property of `next/legacy/image` must start with `https://example.com/account123/`. Any other protocol, hostname, port, or unmatched path will respond with 400 Bad Request. +> **Note**: The example above will ensure the `src` property of `next/legacy/image` must start with `https://example.com/account123/`. Any other protocol, hostname, port, or unmatched path will respond with 400 Bad Request. Below is another example of the `remotePatterns` property in the `next.config.js` file: @@ -396,7 +396,7 @@ module.exports = { } ``` -> Note: The example above will ensure the `src` property of `next/legacy/image` must start with `https://img1.example.com` or `https://me.avatar.example.com` or any number of subdomains. Any other protocol or unmatched hostname will respond with 400 Bad Request. +> **Note**: The example above will ensure the `src` property of `next/legacy/image` must start with `https://img1.example.com` or `https://me.avatar.example.com` or any number of subdomains. Any other protocol or unmatched hostname will respond with 400 Bad Request. Wildcard patterns can be used for both `pathname` and `hostname` and have the following syntax: @@ -407,7 +407,7 @@ The `**` syntax does not work in the middle of the pattern. ### Domains -> Note: We recommend using [`remotePatterns`](#remote-patterns) instead so you can restrict protocol and pathname. +> **Note**: We recommend using [`remotePatterns`](#remote-patterns) instead so you can restrict protocol and pathname. Similar to [`remotePatterns`](#remote-patterns), the `domains` configuration can be used to provide a list of allowed hostnames for external images. @@ -449,7 +449,7 @@ The following Image Optimization cloud providers are included: If you need a different provider, you can use the [`loader`](#loader) prop with `next/legacy/image`. -> Images can not be optimized at build time using [`next export`](/docs/advanced-features/static-html-export.md), only on-demand. To use `next/legacy/image` with `next export`, you will need to use a different loader than the default. [Read more in the discussion.](https://github.com/vercel/next.js/discussions/19065) +> Images can not be optimized at build time using [`output: 'export'`](/docs/advanced-features/static-html-export.md), only on-demand. To use `next/legacy/image` with `output: 'export'`, you will need to use a different loader than the default. [Read more in the discussion.](https://github.com/vercel/next.js/discussions/19065) > The `next/legacy/image` component's default loader uses [`squoosh`](https://www.npmjs.com/package/@squoosh/lib) because it is quick to install and suitable for a development environment. When using `next start` in your production environment, it is strongly recommended that you install [`sharp`](https://www.npmjs.com/package/sharp) by running `yarn add sharp` in your project directory. This is not necessary for Vercel deployments, as `sharp` is installed automatically. @@ -513,7 +513,7 @@ module.exports = { } ``` -> Note: AVIF generally takes 20% longer to encode but it compresses 20% smaller compared to WebP. This means that the first time an image is requested, it will typically be slower and then subsequent requests that are cached will be faster. +> **Note**: AVIF generally takes 20% longer to encode but it compresses 20% smaller compared to WebP. This means that the first time an image is requested, it will typically be slower and then subsequent requests that are cached will be faster. ## Caching Behavior diff --git a/docs/api-reference/next/link.md b/docs/api-reference/next/link.md index f2d791db173cd..62affa6d142e8 100644 --- a/docs/api-reference/next/link.md +++ b/docs/api-reference/next/link.md @@ -49,7 +49,7 @@ export default Home `Link` accepts the following props: - `href` - The path or URL to navigate to. This is the only required prop. It can also be an object, see [example here](/docs/api-reference/next/link.md#with-url-object) -- `as` - Optional decorator for the path that will be shown in the browser URL bar. Before Next.js 9.5.3 this was used for dynamic routes, check our [previous docs](https://nextjs.org/docs/tag/v9.5.2/api-reference/next/link#dynamic-routes) to see how it worked. Note: when this path differs from the one provided in `href` the previous `href`/`as` behavior is used as shown in the [previous docs](https://nextjs.org/docs/tag/v9.5.2/api-reference/next/link#dynamic-routes). +- `as` - Optional decorator for the path that will be shown in the browser URL bar. Before Next.js 9.5.3 this was used for dynamic routes, check our [previous docs](https://nextjs.org/docs/tag/v9.5.2/api-reference/next/link#dynamic-routes) to see how it worked. When this path differs from the one provided in `href` the previous `href`/`as` behavior is used as shown in the [previous docs](https://nextjs.org/docs/tag/v9.5.2/api-reference/next/link#dynamic-routes). - [`legacyBehavior`](#if-the-child-is-a-tag) - Changes behavior so that child must be ``. Defaults to `false`. - [`passHref`](#if-the-child-is-a-custom-component-that-wraps-an-a-tag) - Forces `Link` to send the `href` property to its child. Defaults to `false` - `prefetch` - Prefetch the page in the background. Defaults to `true`. Any `` that is in the viewport (initially or through scroll) will be preloaded. Prefetch can be disabled by passing `prefetch={false}`. When `prefetch` is set to `false`, prefetching will still occur on hover. Pages using [Static Generation](/docs/basic-features/data-fetching/get-static-props.md) will preload `JSON` files with the data for faster page transitions. Prefetching is only enabled in production. @@ -58,7 +58,7 @@ export default Home - [`shallow`](/docs/routing/shallow-routing.md) - Update the path of the current page without rerunning [`getStaticProps`](/docs/basic-features/data-fetching/get-static-props.md), [`getServerSideProps`](/docs/basic-features/data-fetching/get-server-side-props.md) or [`getInitialProps`](/docs/api-reference/data-fetching/get-initial-props.md). Defaults to `false` - `locale` - The active locale is automatically prepended. `locale` allows for providing a different locale. When `false` `href` has to include the locale as the default behavior is disabled. -Note, when `legacyBehavior` is not set to `true`, all [`anchor`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a) tag properties can be passed to `next/link` as well such as, `className`, `onClick`, etc. +> **Note**: when `legacyBehavior` is not set to `true`, all [`anchor`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a) tag properties can be passed to `next/link` as well such as, `className`, `onClick`, etc. ## If the route has dynamic segments @@ -131,7 +131,7 @@ export default NavLink ## If the child is a functional component -If the child of `Link` is a functional component, in addition to using `passHref` and `legacyBehavior`, you must wrap the component in [`React.forwardRef`](https://reactjs.org/docs/react-api.html#reactforwardref): +If the child of `Link` is a functional component, in addition to using `passHref` and `legacyBehavior`, you must wrap the component in [`React.forwardRef`](https://react.dev/reference/react/forwardRef): ```jsx import Link from 'next/link' @@ -259,4 +259,4 @@ export default function Page() { } ``` -> **Note:** If you're using [Dynamic Routes](/docs/routing/dynamic-routes), you'll need to adapt your `as` and `href` props. For example, if you have a Dynamic Route like `/dashboard/[user]` that you want to present differently via middleware, you would write: `Profile`. +> **Note**: If you're using [Dynamic Routes](/docs/routing/dynamic-routes), you'll need to adapt your `as` and `href` props. For example, if you have a Dynamic Route like `/dashboard/[user]` that you want to present differently via middleware, you would write: `Profile`. diff --git a/docs/api-reference/next/router.md b/docs/api-reference/next/router.md index 1a4bffa9d7042..b13316507987d 100644 --- a/docs/api-reference/next/router.md +++ b/docs/api-reference/next/router.md @@ -35,7 +35,7 @@ function ActiveLink({ children, href }) { export default ActiveLink ``` -> `useRouter` is a [React Hook](https://reactjs.org/docs/hooks-intro.html), meaning it cannot be used with classes. You can either use [withRouter](#withRouter) or wrap your class in a function component. +> `useRouter` is a [React Hook](https://react.dev/learn#using-hooks), meaning it cannot be used with classes. You can either use [withRouter](#withRouter) or wrap your class in a function component. ## `router` object @@ -73,7 +73,7 @@ router.push(url, as, options) ``` - `url`: `UrlObject | String` - The URL to navigate to (see [Node.JS URL module documentation](https://nodejs.org/api/url.html#legacy-urlobject) for `UrlObject` properties). -- `as`: `UrlObject | String` - Optional decorator for the path that will be shown in the browser URL bar. Before Next.js 9.5.3 this was used for dynamic routes, check our [previous docs](https://nextjs.org/docs/tag/v9.5.2/api-reference/next/link#dynamic-routes) to see how it worked. Note: when this path differs from the one provided in `href` the previous `href`/`as` behavior is used as shown in the [previous docs](https://nextjs.org/docs/tag/v9.5.2/api-reference/next/link#dynamic-routes) +- `as`: `UrlObject | String` - Optional decorator for the path that will be shown in the browser URL bar. Before Next.js 9.5.3 this was used for dynamic routes, check our [previous docs](https://nextjs.org/docs/tag/v9.5.2/api-reference/next/link#dynamic-routes) to see how it worked. When this path differs from the one provided in `href` the previous `href`/`as` behavior is used as shown in the [previous docs](https://nextjs.org/docs/tag/v9.5.2/api-reference/next/link#dynamic-routes) - `options` - Optional object with the following configuration options: - `scroll` - Optional boolean, controls scrolling to the top of the page after navigation. Defaults to `true` - [`shallow`](/docs/routing/shallow-routing.md): Update the path of the current page without rerunning [`getStaticProps`](/docs/basic-features/data-fetching/get-static-props.md), [`getServerSideProps`](/docs/basic-features/data-fetching/get-server-side-props.md) or [`getInitialProps`](/docs/api-reference/data-fetching/get-initial-props.md). Defaults to `false` @@ -174,7 +174,7 @@ useEffect(() => { }, [router.query.slug]) ``` -2. Use a React `key` to [tell React to remount the component](https://reactjs.org/docs/lists-and-keys.html#keys). To do this for all pages, you can use a custom app: +2. Use a React `key` to [tell React to remount the component](https://react.dev/learn/rendering-lists#keeping-list-items-in-order-with-key). To do this for all pages, you can use a custom app: ```jsx // pages/_app.js @@ -396,7 +396,7 @@ You can listen to different events happening inside the Next.js Router. Here's a - `hashChangeStart(url, { shallow })` - Fires when the hash will change but not the page - `hashChangeComplete(url, { shallow })` - Fires when the hash has changed but not the page -> **Note:** Here `url` is the URL shown in the browser, including the [`basePath`](/docs/api-reference/next.config.js/basepath.md). +> **Note**: Here `url` is the URL shown in the browser, including the [`basePath`](/docs/api-reference/next.config.js/basepath.md). #### Usage @@ -433,7 +433,7 @@ export default function MyApp({ Component, pageProps }) { > We use a [Custom App](/docs/advanced-features/custom-app.md) (`pages/_app.js`) for this example to subscribe to the event because it's not unmounted on page navigations, but you can subscribe to router events on any component in your application. -Router events should be registered when a component mounts ([useEffect](https://reactjs.org/docs/hooks-effect.html) or [componentDidMount](https://reactjs.org/docs/react-component.html#componentdidmount) / [componentWillUnmount](https://reactjs.org/docs/react-component.html#componentwillunmount)) or imperatively when an event happens. +Router events should be registered when a component mounts ([useEffect](https://react.dev/reference/react/useEffect) or [componentDidMount](https://react.dev/reference/react/Component#componentdidmount) / [componentWillUnmount](https://react.dev/reference/react/Component#componentwillunmount)) or imperatively when an event happens. If a route load is cancelled (for example, by clicking two links rapidly in succession), `routeChangeError` will fire. And the passed `err` will contain a `cancelled` property set to `true`, as in the following example: diff --git a/docs/api-reference/next/script.md b/docs/api-reference/next/script.md index 2cf7c1d3d7e8b..2b58b55175df6 100644 --- a/docs/api-reference/next/script.md +++ b/docs/api-reference/next/script.md @@ -50,7 +50,7 @@ The `'); +var completeSegmentData1 = stringToPrecomputedChunk('")),te(a,b,c),a=a.responseState.generateStaticMarkup?!0:b.push("\x3c!--/$--\x3e"),a;if(0a.progressiveChunkSize)return d.rootSegmentID=a.nextSegmentId++,a.completedBoundaries.push(d),Cb(b,a.responseState,d.id),te(a,b,c),b.push("\x3c!--/$--\x3e");(c=a.resources.boundaryResources)&&d.resources.forEach(Dc,c);a.responseState.generateStaticMarkup||b.push("\x3c!--$--\x3e");c=d.completedSegments;if(1!==c.length)throw Error(l(391));ue(a,b,c[0]); +a=a.responseState.generateStaticMarkup?!0:b.push("\x3c!--/$--\x3e");return a}function ve(a,b,c){Db(b,a.responseState,c.formatContext,c.id);ue(a,b,c);return Eb(b,c.formatContext)} +function we(a,b,c){a.resources.boundaryResources=c.resources;for(var d=c.completedSegments,e=0;e"):b.push('">');return Bb(b,a)&&d} +function xe(a,b,c,d){if(2===d.status)return!0;var e=d.id;if(-1===e){if(-1===(d.id=c.rootSegmentID))throw Error(l(392));return ve(a,b,d)}ve(a,b,d);a=a.responseState;(c=0===a.streamingFormat)?(b.push(a.startInlineScript),0===(a.instructions&1)?(a.instructions|=1,b.push('$RS=function(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};;$RS("')):b.push('$RS("')):b.push('');return b} +function se(a,b){try{var c,d=a.completedRootSegment;if(null!==d)if(0===a.pendingRootTasks)Ub(b,a.resources,a.responseState,0===a.allPendingTasks),ue(a,b,d),a.completedRootSegment=null,Bb(b,a.responseState);else return;else Wb(b,a.resources,a.responseState);var e=a.clientRenderedBoundaries;for(c=0;c"):!d.push('">')){a.destination=null;c++;e.splice(0,c);return}}e.splice(0,c);var A=a.completedBoundaries;for(c=0;c")),a.htmlChunks&&(b.push("")),b.push(null))}}function Cc(a){if(!1===a.flushScheduled&&0===a.pingedTasks.length&&null!==a.destination){var b=a.destination;a.flushScheduled=!0;se(a,b)}}function ye(a,b){try{var c=a.abortableTasks;if(0 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + + printWarning('warn', format, args); + } + } +} +function error(format) { + { + { + for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { + args[_key2 - 1] = arguments[_key2]; + } + + printWarning('error', format, args); + } + } +} + +function printWarning(level, format, args) { + // When changing this logic, you might want to also + // update consoleWithStackDev.www.js as well. + { + var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; + var stack = ReactDebugCurrentFrame.getStackAddendum(); + + if (stack !== '') { + format += '%s'; + args = args.concat([stack]); + } // eslint-disable-next-line react-internal/safe-string-coercion + + + var argsWithFormat = args.map(function (item) { + return String(item); + }); // Careful: RN currently depends on this prefix + + argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it + // breaks IE9: https://github.com/facebook/react/issues/13610 + // eslint-disable-next-line react-internal/no-production-logging + + Function.prototype.apply.call(console[level], console, argsWithFormat); + } +} + +function scheduleWork(callback) { + callback(); +} +function beginWriting(destination) {} +function writeChunk(destination, chunk) { + writeChunkAndReturn(destination, chunk); +} +function writeChunkAndReturn(destination, chunk) { + return destination.push(chunk); +} +function completeWriting(destination) {} +function close(destination) { + destination.push(null); +} +function stringToChunk(content) { + return content; +} +function stringToPrecomputedChunk(content) { + return content; +} +function clonePrecomputedChunk(chunk) { + return chunk; +} +function closeWithError(destination, error) { + // $FlowFixMe[incompatible-call]: This is an Error object or the destination accepts other types. + destination.destroy(error); +} + +function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + + return obj; +} + +function _inheritsLoose(subClass, superClass) { + subClass.prototype = Object.create(superClass.prototype); + subClass.prototype.constructor = subClass; + subClass.__proto__ = superClass; +} + +var assign = Object.assign; + +/* + * The `'' + value` pattern (used in perf-sensitive code) throws for Symbol + * and Temporal.* types. See https://github.com/facebook/react/pull/22064. + * + * The functions in this module will throw an easier-to-understand, + * easier-to-debug exception with a clear errors message message explaining the + * problem. (Instead of a confusing exception thrown inside the implementation + * of the `value` object). + */ +// $FlowFixMe[incompatible-return] only called in DEV, so void return is not possible. +function typeName(value) { + { + // toStringTag is needed for namespaced types like Temporal.Instant + var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag; + var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object'; // $FlowFixMe[incompatible-return] + + return type; + } +} // $FlowFixMe[incompatible-return] only called in DEV, so void return is not possible. + + +function willCoercionThrow(value) { + { + try { + testStringCoercion(value); + return false; + } catch (e) { + return true; + } + } +} + +function testStringCoercion(value) { + // If you ended up here by following an exception call stack, here's what's + // happened: you supplied an object or symbol value to React (as a prop, key, + // DOM attribute, CSS property, string ref, etc.) and when React tried to + // coerce it to a string using `'' + value`, an exception was thrown. + // + // The most common types that will cause this exception are `Symbol` instances + // and Temporal objects like `Temporal.Instant`. But any object that has a + // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this + // exception. (Library authors do this to prevent users from using built-in + // numeric operators like `+` or comparison operators like `>=` because custom + // methods are needed to perform accurate arithmetic or comparison.) + // + // To fix the problem, coerce this object or symbol value to a string before + // passing it to React. The most reliable way is usually `String(value)`. + // + // To find which value is throwing, check the browser or debugger console. + // Before this exception was thrown, there should be `console.error` output + // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the + // problem and how that type was used: key, atrribute, input value prop, etc. + // In most cases, this console output also shows the component and its + // ancestor components where the exception happened. + // + // eslint-disable-next-line react-internal/safe-string-coercion + return '' + value; +} + +function checkAttributeStringCoercion(value, attributeName) { + { + if (willCoercionThrow(value)) { + error('The provided `%s` attribute is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', attributeName, typeName(value)); + + return testStringCoercion(value); // throw (to help callers find troubleshooting comments) + } + } +} +function checkCSSPropertyStringCoercion(value, propName) { + { + if (willCoercionThrow(value)) { + error('The provided `%s` CSS property is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', propName, typeName(value)); + + return testStringCoercion(value); // throw (to help callers find troubleshooting comments) + } + } +} +function checkHtmlStringCoercion(value) { + { + if (willCoercionThrow(value)) { + error('The provided HTML markup uses a value of unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value)); + + return testStringCoercion(value); // throw (to help callers find troubleshooting comments) + } + } +} + +// ----------------------------------------------------------------------------- +var enableFloat = true; // Enables unstable_useMemoCache hook, intended as a compilation target for + +// $FlowFixMe[method-unbinding] +var hasOwnProperty = Object.prototype.hasOwnProperty; + +/* eslint-disable max-len */ + +var ATTRIBUTE_NAME_START_CHAR = ":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD"; +/* eslint-enable max-len */ + +var ATTRIBUTE_NAME_CHAR = ATTRIBUTE_NAME_START_CHAR + "\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040"; +var VALID_ATTRIBUTE_NAME_REGEX = new RegExp('^[' + ATTRIBUTE_NAME_START_CHAR + '][' + ATTRIBUTE_NAME_CHAR + ']*$'); +var illegalAttributeNameCache = {}; +var validatedAttributeNameCache = {}; +function isAttributeNameSafe(attributeName) { + if (hasOwnProperty.call(validatedAttributeNameCache, attributeName)) { + return true; + } + + if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) { + return false; + } + + if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) { + validatedAttributeNameCache[attributeName] = true; + return true; + } + + illegalAttributeNameCache[attributeName] = true; + + { + error('Invalid attribute name: `%s`', attributeName); + } + + return false; +} + +/** + * CSS properties which accept numbers but are not in units of "px". + */ +var unitlessNumbers = new Set(['animationIterationCount', 'aspectRatio', 'borderImageOutset', 'borderImageSlice', 'borderImageWidth', 'boxFlex', 'boxFlexGroup', 'boxOrdinalGroup', 'columnCount', 'columns', 'flex', 'flexGrow', 'flexPositive', 'flexShrink', 'flexNegative', 'flexOrder', 'gridArea', 'gridRow', 'gridRowEnd', 'gridRowSpan', 'gridRowStart', 'gridColumn', 'gridColumnEnd', 'gridColumnSpan', 'gridColumnStart', 'fontWeight', 'lineClamp', 'lineHeight', 'opacity', 'order', 'orphans', 'scale', 'tabSize', 'widows', 'zIndex', 'zoom', 'fillOpacity', // SVG-related properties +'floodOpacity', 'stopOpacity', 'strokeDasharray', 'strokeDashoffset', 'strokeMiterlimit', 'strokeOpacity', 'strokeWidth', 'MozAnimationIterationCount', // Known Prefixed Properties +'MozBoxFlex', // TODO: Remove these since they shouldn't be used in modern code +'MozBoxFlexGroup', 'MozLineClamp', 'msAnimationIterationCount', 'msFlex', 'msZoom', 'msFlexGrow', 'msFlexNegative', 'msFlexOrder', 'msFlexPositive', 'msFlexShrink', 'msGridColumn', 'msGridColumnSpan', 'msGridRow', 'msGridRowSpan', 'WebkitAnimationIterationCount', 'WebkitBoxFlex', 'WebKitBoxFlexGroup', 'WebkitBoxOrdinalGroup', 'WebkitColumnCount', 'WebkitColumns', 'WebkitFlex', 'WebkitFlexGrow', 'WebkitFlexPositive', 'WebkitFlexShrink', 'WebkitLineClamp']); +function isUnitlessNumber (name) { + return unitlessNumbers.has(name); +} + +var aliases = new Map([['acceptCharset', 'accept-charset'], ['htmlFor', 'for'], ['httpEquiv', 'http-equiv'], // HTML and SVG attributes, but the SVG attribute is case sensitive.], +['crossOrigin', 'crossorigin'], // This is a list of all SVG attributes that need special casing. +// Regular attributes that just accept strings.], +['accentHeight', 'accent-height'], ['alignmentBaseline', 'alignment-baseline'], ['arabicForm', 'arabic-form'], ['baselineShift', 'baseline-shift'], ['capHeight', 'cap-height'], ['clipPath', 'clip-path'], ['clipRule', 'clip-rule'], ['colorInterpolation', 'color-interpolation'], ['colorInterpolationFilters', 'color-interpolation-filters'], ['colorProfile', 'color-profile'], ['colorRendering', 'color-rendering'], ['dominantBaseline', 'dominant-baseline'], ['enableBackground', 'enable-background'], ['fillOpacity', 'fill-opacity'], ['fillRule', 'fill-rule'], ['floodColor', 'flood-color'], ['floodOpacity', 'flood-opacity'], ['fontFamily', 'font-family'], ['fontSize', 'font-size'], ['fontSizeAdjust', 'font-size-adjust'], ['fontStretch', 'font-stretch'], ['fontStyle', 'font-style'], ['fontVariant', 'font-variant'], ['fontWeight', 'font-weight'], ['glyphName', 'glyph-name'], ['glyphOrientationHorizontal', 'glyph-orientation-horizontal'], ['glyphOrientationVertical', 'glyph-orientation-vertical'], ['horizAdvX', 'horiz-adv-x'], ['horizOriginX', 'horiz-origin-x'], ['imageRendering', 'image-rendering'], ['letterSpacing', 'letter-spacing'], ['lightingColor', 'lighting-color'], ['markerEnd', 'marker-end'], ['markerMid', 'marker-mid'], ['markerStart', 'marker-start'], ['overlinePosition', 'overline-position'], ['overlineThickness', 'overline-thickness'], ['paintOrder', 'paint-order'], ['panose-1', 'panose-1'], ['pointerEvents', 'pointer-events'], ['renderingIntent', 'rendering-intent'], ['shapeRendering', 'shape-rendering'], ['stopColor', 'stop-color'], ['stopOpacity', 'stop-opacity'], ['strikethroughPosition', 'strikethrough-position'], ['strikethroughThickness', 'strikethrough-thickness'], ['strokeDasharray', 'stroke-dasharray'], ['strokeDashoffset', 'stroke-dashoffset'], ['strokeLinecap', 'stroke-linecap'], ['strokeLinejoin', 'stroke-linejoin'], ['strokeMiterlimit', 'stroke-miterlimit'], ['strokeOpacity', 'stroke-opacity'], ['strokeWidth', 'stroke-width'], ['textAnchor', 'text-anchor'], ['textDecoration', 'text-decoration'], ['textRendering', 'text-rendering'], ['transformOrigin', 'transform-origin'], ['underlinePosition', 'underline-position'], ['underlineThickness', 'underline-thickness'], ['unicodeBidi', 'unicode-bidi'], ['unicodeRange', 'unicode-range'], ['unitsPerEm', 'units-per-em'], ['vAlphabetic', 'v-alphabetic'], ['vHanging', 'v-hanging'], ['vIdeographic', 'v-ideographic'], ['vMathematical', 'v-mathematical'], ['vectorEffect', 'vector-effect'], ['vertAdvY', 'vert-adv-y'], ['vertOriginX', 'vert-origin-x'], ['vertOriginY', 'vert-origin-y'], ['wordSpacing', 'word-spacing'], ['writingMode', 'writing-mode'], ['xmlnsXlink', 'xmlns:xlink'], ['xHeight', 'x-height']]); +function getAttributeAlias (name) { + return aliases.get(name) || name; +} + +var hasReadOnlyValue = { + button: true, + checkbox: true, + image: true, + hidden: true, + radio: true, + reset: true, + submit: true +}; +function checkControlledValueProps(tagName, props) { + { + if (!(hasReadOnlyValue[props.type] || props.onChange || props.onInput || props.readOnly || props.disabled || props.value == null)) { + error('You provided a `value` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultValue`. Otherwise, ' + 'set either `onChange` or `readOnly`.'); + } + + if (!(props.onChange || props.readOnly || props.disabled || props.checked == null)) { + error('You provided a `checked` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultChecked`. Otherwise, ' + 'set either `onChange` or `readOnly`.'); + } + } +} + +var ariaProperties = { + 'aria-current': 0, + // state + 'aria-description': 0, + 'aria-details': 0, + 'aria-disabled': 0, + // state + 'aria-hidden': 0, + // state + 'aria-invalid': 0, + // state + 'aria-keyshortcuts': 0, + 'aria-label': 0, + 'aria-roledescription': 0, + // Widget Attributes + 'aria-autocomplete': 0, + 'aria-checked': 0, + 'aria-expanded': 0, + 'aria-haspopup': 0, + 'aria-level': 0, + 'aria-modal': 0, + 'aria-multiline': 0, + 'aria-multiselectable': 0, + 'aria-orientation': 0, + 'aria-placeholder': 0, + 'aria-pressed': 0, + 'aria-readonly': 0, + 'aria-required': 0, + 'aria-selected': 0, + 'aria-sort': 0, + 'aria-valuemax': 0, + 'aria-valuemin': 0, + 'aria-valuenow': 0, + 'aria-valuetext': 0, + // Live Region Attributes + 'aria-atomic': 0, + 'aria-busy': 0, + 'aria-live': 0, + 'aria-relevant': 0, + // Drag-and-Drop Attributes + 'aria-dropeffect': 0, + 'aria-grabbed': 0, + // Relationship Attributes + 'aria-activedescendant': 0, + 'aria-colcount': 0, + 'aria-colindex': 0, + 'aria-colspan': 0, + 'aria-controls': 0, + 'aria-describedby': 0, + 'aria-errormessage': 0, + 'aria-flowto': 0, + 'aria-labelledby': 0, + 'aria-owns': 0, + 'aria-posinset': 0, + 'aria-rowcount': 0, + 'aria-rowindex': 0, + 'aria-rowspan': 0, + 'aria-setsize': 0 +}; + +var warnedProperties$1 = {}; +var rARIA$1 = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$'); +var rARIACamel$1 = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$'); + +function validateProperty$1(tagName, name) { + { + if (hasOwnProperty.call(warnedProperties$1, name) && warnedProperties$1[name]) { + return true; + } + + if (rARIACamel$1.test(name)) { + var ariaName = 'aria-' + name.slice(4).toLowerCase(); + var correctName = ariaProperties.hasOwnProperty(ariaName) ? ariaName : null; // If this is an aria-* attribute, but is not listed in the known DOM + // DOM properties, then it is an invalid aria-* attribute. + + if (correctName == null) { + error('Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.', name); + + warnedProperties$1[name] = true; + return true; + } // aria-* attributes should be lowercase; suggest the lowercase version. + + + if (name !== correctName) { + error('Invalid ARIA attribute `%s`. Did you mean `%s`?', name, correctName); + + warnedProperties$1[name] = true; + return true; + } + } + + if (rARIA$1.test(name)) { + var lowerCasedName = name.toLowerCase(); + var standardName = ariaProperties.hasOwnProperty(lowerCasedName) ? lowerCasedName : null; // If this is an aria-* attribute, but is not listed in the known DOM + // DOM properties, then it is an invalid aria-* attribute. + + if (standardName == null) { + warnedProperties$1[name] = true; + return false; + } // aria-* attributes should be lowercase; suggest the lowercase version. + + + if (name !== standardName) { + error('Unknown ARIA attribute `%s`. Did you mean `%s`?', name, standardName); + + warnedProperties$1[name] = true; + return true; + } + } + } + + return true; +} + +function validateProperties$2(type, props) { + { + var invalidProps = []; + + for (var key in props) { + var isValid = validateProperty$1(type, key); + + if (!isValid) { + invalidProps.push(key); + } + } + + var unknownPropString = invalidProps.map(function (prop) { + return '`' + prop + '`'; + }).join(', '); + + if (invalidProps.length === 1) { + error('Invalid aria prop %s on <%s> tag. ' + 'For details, see https://reactjs.org/link/invalid-aria-props', unknownPropString, type); + } else if (invalidProps.length > 1) { + error('Invalid aria props %s on <%s> tag. ' + 'For details, see https://reactjs.org/link/invalid-aria-props', unknownPropString, type); + } + } +} + +var didWarnValueNull = false; +function validateProperties$1(type, props) { + { + if (type !== 'input' && type !== 'textarea' && type !== 'select') { + return; + } + + if (props != null && props.value === null && !didWarnValueNull) { + didWarnValueNull = true; + + if (type === 'select' && props.multiple) { + error('`value` prop on `%s` should not be null. ' + 'Consider using an empty array when `multiple` is set to `true` ' + 'to clear the component or `undefined` for uncontrolled components.', type); + } else { + error('`value` prop on `%s` should not be null. ' + 'Consider using an empty string to clear the component or `undefined` ' + 'for uncontrolled components.', type); + } + } + } +} + +function isCustomElement(tagName, props) { + if (tagName.indexOf('-') === -1) { + return false; + } + + switch (tagName) { + // These are reserved SVG and MathML elements. + // We don't mind this list too much because we expect it to never grow. + // The alternative is to track the namespace in a few places which is convoluted. + // https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts + case 'annotation-xml': + case 'color-profile': + case 'font-face': + case 'font-face-src': + case 'font-face-uri': + case 'font-face-format': + case 'font-face-name': + case 'missing-glyph': + return false; + + default: + return true; + } +} + +// When adding attributes to the HTML or SVG allowed attribute list, be sure to +// also add them to this module to ensure casing and incorrect name +// warnings. +var possibleStandardNames = { + // HTML + accept: 'accept', + acceptcharset: 'acceptCharset', + 'accept-charset': 'acceptCharset', + accesskey: 'accessKey', + action: 'action', + allowfullscreen: 'allowFullScreen', + alt: 'alt', + as: 'as', + async: 'async', + autocapitalize: 'autoCapitalize', + autocomplete: 'autoComplete', + autocorrect: 'autoCorrect', + autofocus: 'autoFocus', + autoplay: 'autoPlay', + autosave: 'autoSave', + capture: 'capture', + cellpadding: 'cellPadding', + cellspacing: 'cellSpacing', + challenge: 'challenge', + charset: 'charSet', + checked: 'checked', + children: 'children', + cite: 'cite', + class: 'className', + classid: 'classID', + classname: 'className', + cols: 'cols', + colspan: 'colSpan', + content: 'content', + contenteditable: 'contentEditable', + contextmenu: 'contextMenu', + controls: 'controls', + controlslist: 'controlsList', + coords: 'coords', + crossorigin: 'crossOrigin', + dangerouslysetinnerhtml: 'dangerouslySetInnerHTML', + data: 'data', + datetime: 'dateTime', + default: 'default', + defaultchecked: 'defaultChecked', + defaultvalue: 'defaultValue', + defer: 'defer', + dir: 'dir', + disabled: 'disabled', + disablepictureinpicture: 'disablePictureInPicture', + disableremoteplayback: 'disableRemotePlayback', + download: 'download', + draggable: 'draggable', + enctype: 'encType', + enterkeyhint: 'enterKeyHint', + fetchpriority: 'fetchPriority', + for: 'htmlFor', + form: 'form', + formmethod: 'formMethod', + formaction: 'formAction', + formenctype: 'formEncType', + formnovalidate: 'formNoValidate', + formtarget: 'formTarget', + frameborder: 'frameBorder', + headers: 'headers', + height: 'height', + hidden: 'hidden', + high: 'high', + href: 'href', + hreflang: 'hrefLang', + htmlfor: 'htmlFor', + httpequiv: 'httpEquiv', + 'http-equiv': 'httpEquiv', + icon: 'icon', + id: 'id', + imagesizes: 'imageSizes', + imagesrcset: 'imageSrcSet', + innerhtml: 'innerHTML', + inputmode: 'inputMode', + integrity: 'integrity', + is: 'is', + itemid: 'itemID', + itemprop: 'itemProp', + itemref: 'itemRef', + itemscope: 'itemScope', + itemtype: 'itemType', + keyparams: 'keyParams', + keytype: 'keyType', + kind: 'kind', + label: 'label', + lang: 'lang', + list: 'list', + loop: 'loop', + low: 'low', + manifest: 'manifest', + marginwidth: 'marginWidth', + marginheight: 'marginHeight', + max: 'max', + maxlength: 'maxLength', + media: 'media', + mediagroup: 'mediaGroup', + method: 'method', + min: 'min', + minlength: 'minLength', + multiple: 'multiple', + muted: 'muted', + name: 'name', + nomodule: 'noModule', + nonce: 'nonce', + novalidate: 'noValidate', + open: 'open', + optimum: 'optimum', + pattern: 'pattern', + placeholder: 'placeholder', + playsinline: 'playsInline', + poster: 'poster', + preload: 'preload', + profile: 'profile', + radiogroup: 'radioGroup', + readonly: 'readOnly', + referrerpolicy: 'referrerPolicy', + rel: 'rel', + required: 'required', + reversed: 'reversed', + role: 'role', + rows: 'rows', + rowspan: 'rowSpan', + sandbox: 'sandbox', + scope: 'scope', + scoped: 'scoped', + scrolling: 'scrolling', + seamless: 'seamless', + selected: 'selected', + shape: 'shape', + size: 'size', + sizes: 'sizes', + span: 'span', + spellcheck: 'spellCheck', + src: 'src', + srcdoc: 'srcDoc', + srclang: 'srcLang', + srcset: 'srcSet', + start: 'start', + step: 'step', + style: 'style', + summary: 'summary', + tabindex: 'tabIndex', + target: 'target', + title: 'title', + type: 'type', + usemap: 'useMap', + value: 'value', + width: 'width', + wmode: 'wmode', + wrap: 'wrap', + // SVG + about: 'about', + accentheight: 'accentHeight', + 'accent-height': 'accentHeight', + accumulate: 'accumulate', + additive: 'additive', + alignmentbaseline: 'alignmentBaseline', + 'alignment-baseline': 'alignmentBaseline', + allowreorder: 'allowReorder', + alphabetic: 'alphabetic', + amplitude: 'amplitude', + arabicform: 'arabicForm', + 'arabic-form': 'arabicForm', + ascent: 'ascent', + attributename: 'attributeName', + attributetype: 'attributeType', + autoreverse: 'autoReverse', + azimuth: 'azimuth', + basefrequency: 'baseFrequency', + baselineshift: 'baselineShift', + 'baseline-shift': 'baselineShift', + baseprofile: 'baseProfile', + bbox: 'bbox', + begin: 'begin', + bias: 'bias', + by: 'by', + calcmode: 'calcMode', + capheight: 'capHeight', + 'cap-height': 'capHeight', + clip: 'clip', + clippath: 'clipPath', + 'clip-path': 'clipPath', + clippathunits: 'clipPathUnits', + cliprule: 'clipRule', + 'clip-rule': 'clipRule', + color: 'color', + colorinterpolation: 'colorInterpolation', + 'color-interpolation': 'colorInterpolation', + colorinterpolationfilters: 'colorInterpolationFilters', + 'color-interpolation-filters': 'colorInterpolationFilters', + colorprofile: 'colorProfile', + 'color-profile': 'colorProfile', + colorrendering: 'colorRendering', + 'color-rendering': 'colorRendering', + contentscripttype: 'contentScriptType', + contentstyletype: 'contentStyleType', + cursor: 'cursor', + cx: 'cx', + cy: 'cy', + d: 'd', + datatype: 'datatype', + decelerate: 'decelerate', + descent: 'descent', + diffuseconstant: 'diffuseConstant', + direction: 'direction', + display: 'display', + divisor: 'divisor', + dominantbaseline: 'dominantBaseline', + 'dominant-baseline': 'dominantBaseline', + dur: 'dur', + dx: 'dx', + dy: 'dy', + edgemode: 'edgeMode', + elevation: 'elevation', + enablebackground: 'enableBackground', + 'enable-background': 'enableBackground', + end: 'end', + exponent: 'exponent', + externalresourcesrequired: 'externalResourcesRequired', + fill: 'fill', + fillopacity: 'fillOpacity', + 'fill-opacity': 'fillOpacity', + fillrule: 'fillRule', + 'fill-rule': 'fillRule', + filter: 'filter', + filterres: 'filterRes', + filterunits: 'filterUnits', + floodopacity: 'floodOpacity', + 'flood-opacity': 'floodOpacity', + floodcolor: 'floodColor', + 'flood-color': 'floodColor', + focusable: 'focusable', + fontfamily: 'fontFamily', + 'font-family': 'fontFamily', + fontsize: 'fontSize', + 'font-size': 'fontSize', + fontsizeadjust: 'fontSizeAdjust', + 'font-size-adjust': 'fontSizeAdjust', + fontstretch: 'fontStretch', + 'font-stretch': 'fontStretch', + fontstyle: 'fontStyle', + 'font-style': 'fontStyle', + fontvariant: 'fontVariant', + 'font-variant': 'fontVariant', + fontweight: 'fontWeight', + 'font-weight': 'fontWeight', + format: 'format', + from: 'from', + fx: 'fx', + fy: 'fy', + g1: 'g1', + g2: 'g2', + glyphname: 'glyphName', + 'glyph-name': 'glyphName', + glyphorientationhorizontal: 'glyphOrientationHorizontal', + 'glyph-orientation-horizontal': 'glyphOrientationHorizontal', + glyphorientationvertical: 'glyphOrientationVertical', + 'glyph-orientation-vertical': 'glyphOrientationVertical', + glyphref: 'glyphRef', + gradienttransform: 'gradientTransform', + gradientunits: 'gradientUnits', + hanging: 'hanging', + horizadvx: 'horizAdvX', + 'horiz-adv-x': 'horizAdvX', + horizoriginx: 'horizOriginX', + 'horiz-origin-x': 'horizOriginX', + ideographic: 'ideographic', + imagerendering: 'imageRendering', + 'image-rendering': 'imageRendering', + in2: 'in2', + in: 'in', + inlist: 'inlist', + intercept: 'intercept', + k1: 'k1', + k2: 'k2', + k3: 'k3', + k4: 'k4', + k: 'k', + kernelmatrix: 'kernelMatrix', + kernelunitlength: 'kernelUnitLength', + kerning: 'kerning', + keypoints: 'keyPoints', + keysplines: 'keySplines', + keytimes: 'keyTimes', + lengthadjust: 'lengthAdjust', + letterspacing: 'letterSpacing', + 'letter-spacing': 'letterSpacing', + lightingcolor: 'lightingColor', + 'lighting-color': 'lightingColor', + limitingconeangle: 'limitingConeAngle', + local: 'local', + markerend: 'markerEnd', + 'marker-end': 'markerEnd', + markerheight: 'markerHeight', + markermid: 'markerMid', + 'marker-mid': 'markerMid', + markerstart: 'markerStart', + 'marker-start': 'markerStart', + markerunits: 'markerUnits', + markerwidth: 'markerWidth', + mask: 'mask', + maskcontentunits: 'maskContentUnits', + maskunits: 'maskUnits', + mathematical: 'mathematical', + mode: 'mode', + numoctaves: 'numOctaves', + offset: 'offset', + opacity: 'opacity', + operator: 'operator', + order: 'order', + orient: 'orient', + orientation: 'orientation', + origin: 'origin', + overflow: 'overflow', + overlineposition: 'overlinePosition', + 'overline-position': 'overlinePosition', + overlinethickness: 'overlineThickness', + 'overline-thickness': 'overlineThickness', + paintorder: 'paintOrder', + 'paint-order': 'paintOrder', + panose1: 'panose1', + 'panose-1': 'panose1', + pathlength: 'pathLength', + patterncontentunits: 'patternContentUnits', + patterntransform: 'patternTransform', + patternunits: 'patternUnits', + pointerevents: 'pointerEvents', + 'pointer-events': 'pointerEvents', + points: 'points', + pointsatx: 'pointsAtX', + pointsaty: 'pointsAtY', + pointsatz: 'pointsAtZ', + prefix: 'prefix', + preservealpha: 'preserveAlpha', + preserveaspectratio: 'preserveAspectRatio', + primitiveunits: 'primitiveUnits', + property: 'property', + r: 'r', + radius: 'radius', + refx: 'refX', + refy: 'refY', + renderingintent: 'renderingIntent', + 'rendering-intent': 'renderingIntent', + repeatcount: 'repeatCount', + repeatdur: 'repeatDur', + requiredextensions: 'requiredExtensions', + requiredfeatures: 'requiredFeatures', + resource: 'resource', + restart: 'restart', + result: 'result', + results: 'results', + rotate: 'rotate', + rx: 'rx', + ry: 'ry', + scale: 'scale', + security: 'security', + seed: 'seed', + shaperendering: 'shapeRendering', + 'shape-rendering': 'shapeRendering', + slope: 'slope', + spacing: 'spacing', + specularconstant: 'specularConstant', + specularexponent: 'specularExponent', + speed: 'speed', + spreadmethod: 'spreadMethod', + startoffset: 'startOffset', + stddeviation: 'stdDeviation', + stemh: 'stemh', + stemv: 'stemv', + stitchtiles: 'stitchTiles', + stopcolor: 'stopColor', + 'stop-color': 'stopColor', + stopopacity: 'stopOpacity', + 'stop-opacity': 'stopOpacity', + strikethroughposition: 'strikethroughPosition', + 'strikethrough-position': 'strikethroughPosition', + strikethroughthickness: 'strikethroughThickness', + 'strikethrough-thickness': 'strikethroughThickness', + string: 'string', + stroke: 'stroke', + strokedasharray: 'strokeDasharray', + 'stroke-dasharray': 'strokeDasharray', + strokedashoffset: 'strokeDashoffset', + 'stroke-dashoffset': 'strokeDashoffset', + strokelinecap: 'strokeLinecap', + 'stroke-linecap': 'strokeLinecap', + strokelinejoin: 'strokeLinejoin', + 'stroke-linejoin': 'strokeLinejoin', + strokemiterlimit: 'strokeMiterlimit', + 'stroke-miterlimit': 'strokeMiterlimit', + strokewidth: 'strokeWidth', + 'stroke-width': 'strokeWidth', + strokeopacity: 'strokeOpacity', + 'stroke-opacity': 'strokeOpacity', + suppresscontenteditablewarning: 'suppressContentEditableWarning', + suppresshydrationwarning: 'suppressHydrationWarning', + surfacescale: 'surfaceScale', + systemlanguage: 'systemLanguage', + tablevalues: 'tableValues', + targetx: 'targetX', + targety: 'targetY', + textanchor: 'textAnchor', + 'text-anchor': 'textAnchor', + textdecoration: 'textDecoration', + 'text-decoration': 'textDecoration', + textlength: 'textLength', + textrendering: 'textRendering', + 'text-rendering': 'textRendering', + to: 'to', + transform: 'transform', + transformorigin: 'transformOrigin', + 'transform-origin': 'transformOrigin', + typeof: 'typeof', + u1: 'u1', + u2: 'u2', + underlineposition: 'underlinePosition', + 'underline-position': 'underlinePosition', + underlinethickness: 'underlineThickness', + 'underline-thickness': 'underlineThickness', + unicode: 'unicode', + unicodebidi: 'unicodeBidi', + 'unicode-bidi': 'unicodeBidi', + unicoderange: 'unicodeRange', + 'unicode-range': 'unicodeRange', + unitsperem: 'unitsPerEm', + 'units-per-em': 'unitsPerEm', + unselectable: 'unselectable', + valphabetic: 'vAlphabetic', + 'v-alphabetic': 'vAlphabetic', + values: 'values', + vectoreffect: 'vectorEffect', + 'vector-effect': 'vectorEffect', + version: 'version', + vertadvy: 'vertAdvY', + 'vert-adv-y': 'vertAdvY', + vertoriginx: 'vertOriginX', + 'vert-origin-x': 'vertOriginX', + vertoriginy: 'vertOriginY', + 'vert-origin-y': 'vertOriginY', + vhanging: 'vHanging', + 'v-hanging': 'vHanging', + videographic: 'vIdeographic', + 'v-ideographic': 'vIdeographic', + viewbox: 'viewBox', + viewtarget: 'viewTarget', + visibility: 'visibility', + vmathematical: 'vMathematical', + 'v-mathematical': 'vMathematical', + vocab: 'vocab', + widths: 'widths', + wordspacing: 'wordSpacing', + 'word-spacing': 'wordSpacing', + writingmode: 'writingMode', + 'writing-mode': 'writingMode', + x1: 'x1', + x2: 'x2', + x: 'x', + xchannelselector: 'xChannelSelector', + xheight: 'xHeight', + 'x-height': 'xHeight', + xlinkactuate: 'xlinkActuate', + 'xlink:actuate': 'xlinkActuate', + xlinkarcrole: 'xlinkArcrole', + 'xlink:arcrole': 'xlinkArcrole', + xlinkhref: 'xlinkHref', + 'xlink:href': 'xlinkHref', + xlinkrole: 'xlinkRole', + 'xlink:role': 'xlinkRole', + xlinkshow: 'xlinkShow', + 'xlink:show': 'xlinkShow', + xlinktitle: 'xlinkTitle', + 'xlink:title': 'xlinkTitle', + xlinktype: 'xlinkType', + 'xlink:type': 'xlinkType', + xmlbase: 'xmlBase', + 'xml:base': 'xmlBase', + xmllang: 'xmlLang', + 'xml:lang': 'xmlLang', + xmlns: 'xmlns', + 'xml:space': 'xmlSpace', + xmlnsxlink: 'xmlnsXlink', + 'xmlns:xlink': 'xmlnsXlink', + xmlspace: 'xmlSpace', + y1: 'y1', + y2: 'y2', + y: 'y', + ychannelselector: 'yChannelSelector', + z: 'z', + zoomandpan: 'zoomAndPan' +}; + +var warnedProperties = {}; +var EVENT_NAME_REGEX = /^on./; +var INVALID_EVENT_NAME_REGEX = /^on[^A-Z]/; +var rARIA = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$') ; +var rARIACamel = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$') ; + +function validateProperty(tagName, name, value, eventRegistry) { + { + if (hasOwnProperty.call(warnedProperties, name) && warnedProperties[name]) { + return true; + } + + var lowerCasedName = name.toLowerCase(); + + if (lowerCasedName === 'onfocusin' || lowerCasedName === 'onfocusout') { + error('React uses onFocus and onBlur instead of onFocusIn and onFocusOut. ' + 'All React events are normalized to bubble, so onFocusIn and onFocusOut ' + 'are not needed/supported by React.'); + + warnedProperties[name] = true; + return true; + } + + { + // Actions are special because unlike events they can have other value types. + if (typeof value === 'function') { + if (tagName === 'form' && name === 'action') { + return true; + } + + if (tagName === 'input' && name === 'formAction') { + return true; + } + + if (tagName === 'button' && name === 'formAction') { + return true; + } + } + } // We can't rely on the event system being injected on the server. + + + if (eventRegistry != null) { + var registrationNameDependencies = eventRegistry.registrationNameDependencies, + possibleRegistrationNames = eventRegistry.possibleRegistrationNames; + + if (registrationNameDependencies.hasOwnProperty(name)) { + return true; + } + + var registrationName = possibleRegistrationNames.hasOwnProperty(lowerCasedName) ? possibleRegistrationNames[lowerCasedName] : null; + + if (registrationName != null) { + error('Invalid event handler property `%s`. Did you mean `%s`?', name, registrationName); + + warnedProperties[name] = true; + return true; + } + + if (EVENT_NAME_REGEX.test(name)) { + error('Unknown event handler property `%s`. It will be ignored.', name); + + warnedProperties[name] = true; + return true; + } + } else if (EVENT_NAME_REGEX.test(name)) { + // If no event plugins have been injected, we are in a server environment. + // So we can't tell if the event name is correct for sure, but we can filter + // out known bad ones like `onclick`. We can't suggest a specific replacement though. + if (INVALID_EVENT_NAME_REGEX.test(name)) { + error('Invalid event handler property `%s`. ' + 'React events use the camelCase naming convention, for example `onClick`.', name); + } + + warnedProperties[name] = true; + return true; + } // Let the ARIA attribute hook validate ARIA attributes + + + if (rARIA.test(name) || rARIACamel.test(name)) { + return true; + } + + if (lowerCasedName === 'innerhtml') { + error('Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.'); + + warnedProperties[name] = true; + return true; + } + + if (lowerCasedName === 'aria') { + error('The `aria` attribute is reserved for future use in React. ' + 'Pass individual `aria-` attributes instead.'); + + warnedProperties[name] = true; + return true; + } + + if (lowerCasedName === 'is' && value !== null && value !== undefined && typeof value !== 'string') { + error('Received a `%s` for a string attribute `is`. If this is expected, cast ' + 'the value to a string.', typeof value); + + warnedProperties[name] = true; + return true; + } + + if (typeof value === 'number' && isNaN(value)) { + error('Received NaN for the `%s` attribute. If this is expected, cast ' + 'the value to a string.', name); + + warnedProperties[name] = true; + return true; + } // Known attributes should match the casing specified in the property config. + + + if (possibleStandardNames.hasOwnProperty(lowerCasedName)) { + var standardName = possibleStandardNames[lowerCasedName]; + + if (standardName !== name) { + error('Invalid DOM property `%s`. Did you mean `%s`?', name, standardName); + + warnedProperties[name] = true; + return true; + } + } else if (name !== lowerCasedName) { + // Unknown attributes should have lowercase casing since that's how they + // will be cased anyway with server rendering. + error('React does not recognize the `%s` prop on a DOM element. If you ' + 'intentionally want it to appear in the DOM as a custom ' + 'attribute, spell it as lowercase `%s` instead. ' + 'If you accidentally passed it from a parent component, remove ' + 'it from the DOM element.', name, lowerCasedName); + + warnedProperties[name] = true; + return true; + } // Now that we've validated casing, do not validate + // data types for reserved props + + + switch (name) { + case 'dangerouslySetInnerHTML': + case 'children': + case 'style': + case 'suppressContentEditableWarning': + case 'suppressHydrationWarning': + case 'defaultValue': // Reserved + + case 'defaultChecked': + case 'innerHTML': + { + return true; + } + + case 'innerText': // Properties + + case 'textContent': + { + return true; + } + + } + + switch (typeof value) { + case 'boolean': + { + switch (name) { + case 'autoFocus': + case 'checked': + case 'multiple': + case 'muted': + case 'selected': + case 'contentEditable': + case 'spellCheck': + case 'draggable': + case 'value': + case 'autoReverse': + case 'externalResourcesRequired': + case 'focusable': + case 'preserveAlpha': + case 'allowFullScreen': + case 'async': + case 'autoPlay': + case 'controls': + case 'default': + case 'defer': + case 'disabled': + case 'disablePictureInPicture': + case 'disableRemotePlayback': + case 'formNoValidate': + case 'hidden': + case 'loop': + case 'noModule': + case 'noValidate': + case 'open': + case 'playsInline': + case 'readOnly': + case 'required': + case 'reversed': + case 'scoped': + case 'seamless': + case 'itemScope': + case 'capture': + case 'download': + { + // Boolean properties can accept boolean values + return true; + } + + default: + { + var prefix = name.toLowerCase().slice(0, 5); + + if (prefix === 'data-' || prefix === 'aria-') { + return true; + } + + if (value) { + error('Received `%s` for a non-boolean attribute `%s`.\n\n' + 'If you want to write it to the DOM, pass a string instead: ' + '%s="%s" or %s={value.toString()}.', value, name, name, value, name); + } else { + error('Received `%s` for a non-boolean attribute `%s`.\n\n' + 'If you want to write it to the DOM, pass a string instead: ' + '%s="%s" or %s={value.toString()}.\n\n' + 'If you used to conditionally omit it with %s={condition && value}, ' + 'pass %s={condition ? value : undefined} instead.', value, name, name, value, name, name, name); + } + + warnedProperties[name] = true; + return true; + } + } + } + + case 'function': + case 'symbol': + // eslint-disable-line + // Warn when a known attribute is a bad type + warnedProperties[name] = true; + return false; + + case 'string': + { + // Warn when passing the strings 'false' or 'true' into a boolean prop + if (value === 'false' || value === 'true') { + switch (name) { + case 'checked': + case 'selected': + case 'multiple': + case 'muted': + case 'allowFullScreen': + case 'async': + case 'autoPlay': + case 'controls': + case 'default': + case 'defer': + case 'disabled': + case 'disablePictureInPicture': + case 'disableRemotePlayback': + case 'formNoValidate': + case 'hidden': + case 'loop': + case 'noModule': + case 'noValidate': + case 'open': + case 'playsInline': + case 'readOnly': + case 'required': + case 'reversed': + case 'scoped': + case 'seamless': + case 'itemScope': + { + break; + } + + default: + { + return true; + } + } + + error('Received the string `%s` for the boolean attribute `%s`. ' + '%s ' + 'Did you mean %s={%s}?', value, name, value === 'false' ? 'The browser will interpret it as a truthy value.' : 'Although this works, it will not work as expected if you pass the string "false".', name, value); + + warnedProperties[name] = true; + return true; + } + } + } + + return true; + } +} + +function warnUnknownProperties(type, props, eventRegistry) { + { + var unknownProps = []; + + for (var key in props) { + var isValid = validateProperty(type, key, props[key], eventRegistry); + + if (!isValid) { + unknownProps.push(key); + } + } + + var unknownPropString = unknownProps.map(function (prop) { + return '`' + prop + '`'; + }).join(', '); + + if (unknownProps.length === 1) { + error('Invalid value for prop %s on <%s> tag. Either remove it from the element, ' + 'or pass a string or number value to keep it in the DOM. ' + 'For details, see https://reactjs.org/link/attribute-behavior ', unknownPropString, type); + } else if (unknownProps.length > 1) { + error('Invalid values for props %s on <%s> tag. Either remove them from the element, ' + 'or pass a string or number value to keep them in the DOM. ' + 'For details, see https://reactjs.org/link/attribute-behavior ', unknownPropString, type); + } + } +} + +function validateProperties(type, props, eventRegistry) { + if (isCustomElement(type) || typeof props.is === 'string') { + return; + } + + warnUnknownProperties(type, props, eventRegistry); +} + +// 'msTransform' is correct, but the other prefixes should be capitalized +var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/; +var msPattern$1 = /^-ms-/; +var hyphenPattern = /-(.)/g; // style values shouldn't contain a semicolon + +var badStyleValueWithSemicolonPattern = /;\s*$/; +var warnedStyleNames = {}; +var warnedStyleValues = {}; +var warnedForNaNValue = false; +var warnedForInfinityValue = false; + +function camelize(string) { + return string.replace(hyphenPattern, function (_, character) { + return character.toUpperCase(); + }); +} + +function warnHyphenatedStyleName(name) { + { + if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) { + return; + } + + warnedStyleNames[name] = true; + + error('Unsupported style property %s. Did you mean %s?', name, // As Andi Smith suggests + // (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix + // is converted to lowercase `ms`. + camelize(name.replace(msPattern$1, 'ms-'))); + } +} + +function warnBadVendoredStyleName(name) { + { + if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) { + return; + } + + warnedStyleNames[name] = true; + + error('Unsupported vendor-prefixed style property %s. Did you mean %s?', name, name.charAt(0).toUpperCase() + name.slice(1)); + } +} + +function warnStyleValueWithSemicolon(name, value) { + { + if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) { + return; + } + + warnedStyleValues[value] = true; + + error("Style property values shouldn't contain a semicolon. " + 'Try "%s: %s" instead.', name, value.replace(badStyleValueWithSemicolonPattern, '')); + } +} + +function warnStyleValueIsNaN(name, value) { + { + if (warnedForNaNValue) { + return; + } + + warnedForNaNValue = true; + + error('`NaN` is an invalid value for the `%s` css style property.', name); + } +} + +function warnStyleValueIsInfinity(name, value) { + { + if (warnedForInfinityValue) { + return; + } + + warnedForInfinityValue = true; + + error('`Infinity` is an invalid value for the `%s` css style property.', name); + } +} + +function warnValidStyle(name, value) { + { + if (name.indexOf('-') > -1) { + warnHyphenatedStyleName(name); + } else if (badVendoredStyleNamePattern.test(name)) { + warnBadVendoredStyleName(name); + } else if (badStyleValueWithSemicolonPattern.test(value)) { + warnStyleValueWithSemicolon(name, value); + } + + if (typeof value === 'number') { + if (isNaN(value)) { + warnStyleValueIsNaN(name); + } else if (!isFinite(value)) { + warnStyleValueIsInfinity(name); + } + } + } +} + +// code copied and modified from escape-html +var matchHtmlRegExp = /["'&<>]/; +/** + * Escapes special characters and HTML entities in a given html string. + * + * @param {string} string HTML string to escape for later insertion + * @return {string} + * @public + */ + +function escapeHtml(string) { + { + checkHtmlStringCoercion(string); + } + + var str = '' + string; + var match = matchHtmlRegExp.exec(str); + + if (!match) { + return str; + } + + var escape; + var html = ''; + var index; + var lastIndex = 0; + + for (index = match.index; index < str.length; index++) { + switch (str.charCodeAt(index)) { + case 34: + // " + escape = '"'; + break; + + case 38: + // & + escape = '&'; + break; + + case 39: + // ' + escape = '''; // modified from escape-html; used to be ''' + + break; + + case 60: + // < + escape = '<'; + break; + + case 62: + // > + escape = '>'; + break; + + default: + continue; + } + + if (lastIndex !== index) { + html += str.slice(lastIndex, index); + } + + lastIndex = index + 1; + html += escape; + } + + return lastIndex !== index ? html + str.slice(lastIndex, index) : html; +} // end code copied and modified from escape-html + +/** + * Escapes text to prevent scripting attacks. + * + * @param {*} text Text value to escape. + * @return {string} An escaped string. + */ + + +function escapeTextForBrowser(text) { + if (typeof text === 'boolean' || typeof text === 'number') { + // this shortcircuit helps perf for types that we know will never have + // special characters, especially given that this function is used often + // for numeric dom ids. + return '' + text; + } + + return escapeHtml(text); +} + +var uppercasePattern = /([A-Z])/g; +var msPattern = /^ms-/; +/** + * Hyphenates a camelcased CSS property name, for example: + * + * > hyphenateStyleName('backgroundColor') + * < "background-color" + * > hyphenateStyleName('MozTransition') + * < "-moz-transition" + * > hyphenateStyleName('msTransition') + * < "-ms-transition" + * + * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix + * is converted to `-ms-`. + */ + +function hyphenateStyleName(name) { + return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-'); +} + +// and any newline or tab are filtered out as if they're not part of the URL. +// https://url.spec.whatwg.org/#url-parsing +// Tab or newline are defined as \r\n\t: +// https://infra.spec.whatwg.org/#ascii-tab-or-newline +// A C0 control is a code point in the range \u0000 NULL to \u001F +// INFORMATION SEPARATOR ONE, inclusive: +// https://infra.spec.whatwg.org/#c0-control-or-space + +/* eslint-disable max-len */ + +var isJavaScriptProtocol = /^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i; +var didWarn = false; + +function sanitizeURL(url) { + // We should never have symbols here because they get filtered out elsewhere. + // eslint-disable-next-line react-internal/safe-string-coercion + var stringifiedURL = '' + url; + + { + if (!didWarn && isJavaScriptProtocol.test(stringifiedURL)) { + didWarn = true; + + error('A future version of React will block javascript: URLs as a security precaution. ' + 'Use event handlers instead if you can. If you need to generate unsafe HTML try ' + 'using dangerouslySetInnerHTML instead. React was passed %s.', JSON.stringify(stringifiedURL)); + } + } + + return url; +} + +var isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare + +function isArray(a) { + return isArrayImpl(a); +} + +// The build script is at scripts/rollup/generate-inline-fizz-runtime.js. +// Run `yarn generate-inline-fizz-runtime` to generate. +var clientRenderBoundary = '$RX=function(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};'; +var completeBoundary = '$RC=function(b,c,e){c=document.getElementById(c);c.parentNode.removeChild(c);var a=document.getElementById(b);if(a){b=a.previousSibling;if(e)b.data="$!",a.setAttribute("data-dgst",e);else{e=b.parentNode;a=b.nextSibling;var f=0;do{if(a&&8===a.nodeType){var d=a.data;if("/$"===d)if(0===f)break;else f--;else"$"!==d&&"$?"!==d&&"$!"!==d||f++}d=a.nextSibling;e.removeChild(a);a=d}while(a);for(;c.firstChild;)e.insertBefore(c.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};'; +var completeBoundaryWithStyles = '$RM=new Map;\n$RR=function(r,t,w){for(var u=$RC,n=$RM,p=new Map,q=document,g,b,h=q.querySelectorAll("link[data-precedence],style[data-precedence]"),v=[],k=0;b=h[k++];)"not all"===b.getAttribute("media")?v.push(b):("LINK"===b.tagName&&n.set(b.getAttribute("href"),b),p.set(b.dataset.precedence,g=b));b=0;h=[];var l,a;for(k=!0;;){if(k){var f=w[b++];if(!f){k=!1;b=0;continue}var c=!1,m=0;var d=f[m++];if(a=n.get(d)){var e=a._p;c=!0}else{a=q.createElement("link");a.href=d;a.rel="stylesheet";for(a.dataset.precedence=\nl=f[m++];e=f[m++];)a.setAttribute(e,f[m++]);e=a._p=new Promise(function(x,y){a.onload=x;a.onerror=y});n.set(d,a)}d=a.getAttribute("media");!e||"l"===e.s||d&&!matchMedia(d).matches||h.push(e);if(c)continue}else{a=v[b++];if(!a)break;l=a.getAttribute("data-precedence");a.removeAttribute("media")}c=p.get(l)||g;c===g&&(g=a);p.set(l,a);c?c.parentNode.insertBefore(a,c.nextSibling):(c=q.head,c.insertBefore(a,c.firstChild))}Promise.all(h).then(u.bind(null,r,t,""),u.bind(null,r,t,"Resource failed to load"))};'; +var completeSegment = '$RS=function(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};'; +var formReplaying = 'addEventListener("submit",function(a){if(!a.defaultPrevented){var c=a.target,d=a.submitter,e=c.action,b=d;if(d){var f=d.getAttribute("formAction");null!=f&&(e=f,b=null)}"javascript:throw new Error(\'A React form was unexpectedly submitted.\')"===e&&(a.preventDefault(),b?(a=document.createElement("input"),a.name=b.name,a.value=b.value,b.parentNode.insertBefore(a,b),b=new FormData(c),a.parentNode.removeChild(a)):b=new FormData(c),a=c.getRootNode(),(a.$$reactFormReplay=a.$$reactFormReplay||[]).push(c,\nd,b))}});'; + +function getValueDescriptorExpectingObjectForWarning(thing) { + return thing === null ? '`null`' : thing === undefined ? '`undefined`' : thing === '' ? 'an empty string' : "something with type \"" + typeof thing + "\""; +} +function getValueDescriptorExpectingEnumForWarning(thing) { + return thing === null ? '`null`' : thing === undefined ? '`undefined`' : thing === '' ? 'an empty string' : typeof thing === 'string' ? JSON.stringify(thing) : "something with type \"" + typeof thing + "\""; +} + +function compareResourcePropsForWarning(newProps, currentProps) { + { + var propDiffs = null; + var allProps = Array.from(new Set(Object.keys(currentProps).concat(Object.keys(newProps)))); + + for (var i = 0; i < allProps.length; i++) { + var propName = allProps[i]; + var newValue = newProps[propName]; + var currentValue = currentProps[propName]; + + if (newValue !== currentValue && !(newValue == null && currentValue == null)) { + if (newValue == null) { + if (propDiffs === null) { + propDiffs = { + missing: {}, + extra: {}, + different: {} + }; + } + + propDiffs.missing[propName] = currentValue; + } else if (currentValue == null) { + if (propDiffs === null) { + propDiffs = { + missing: {}, + extra: {}, + different: {} + }; + } + + propDiffs.extra[propName] = newValue; + } else { + if (propDiffs === null) { + propDiffs = { + missing: {}, + extra: {}, + different: {} + }; + } + + propDiffs.different[propName] = { + original: currentValue, + latest: newValue + }; + } + } + } + + return propDiffs; + } +} + +function describeDifferencesForStylesheets(newProps, currentProps) { + var diff = compareResourcePropsForWarning(newProps, currentProps); + if (!diff) return ''; + var description = ''; + + for (var propName in diff.missing) { + var propValue = diff.missing[propName]; + + if (propName === 'media') { + description += "\n \"" + propName + "\" missing for props, original value: " + getValueDescriptorExpectingEnumForWarning(propValue); + } + } + + for (var _propName in diff.extra) { + var _propValue = diff.extra[_propName]; + description += "\n \"" + _propName + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(_propValue) + ", missing from original props"; + } + + for (var _propName2 in diff.different) { + var latestValue = diff.different[_propName2].latest; + var originalValue = diff.different[_propName2].original; + description += "\n \"" + _propName2 + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", original value: " + getValueDescriptorExpectingEnumForWarning(originalValue); + } + + return description; +} +function describeDifferencesForStylesheetOverPreinit(newProps, currentProps) { + var diff = compareResourcePropsForWarning(newProps, currentProps); + if (!diff) return ''; + var description = ''; + + for (var propName in diff.extra) { + var propValue = diff.extra[propName]; + + if (propName === 'precedence' || propName === 'crossOrigin' || propName === 'integrity') { + description += "\n \"" + propName + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(propValue) + ", option missing"; + } else { + description += "\n \"" + propName + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(propValue) + ", option not available with ReactDOM.preinit()"; + } + } + + for (var _propName3 in diff.different) { + var latestValue = diff.different[_propName3].latest; + var originalValue = diff.different[_propName3].original; + + if (_propName3 === 'precedence' && originalValue === 'default') { + description += "\n \"" + _propName3 + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", missing from options"; + } else { + description += "\n \"" + _propName3 + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", option value: " + getValueDescriptorExpectingEnumForWarning(originalValue); + } + } + + return description; +} +function describeDifferencesForPreinitOverStylesheet(newProps, currentProps) { + var diff = compareResourcePropsForWarning(newProps, currentProps); + if (!diff) return ''; + var description = ''; + + for (var propName in diff.missing) { + var propValue = diff.missing[propName]; + + if (propName === 'precedence' && propValue !== 'default') { + description += "\n \"" + propName + "\" missing from options, prop value: " + getValueDescriptorExpectingEnumForWarning(propValue); + } + } + + for (var _propName4 in diff.extra) { + var _propValue2 = diff.extra[_propName4]; + + if (_propName4 === 'precedence' || _propName4 === 'crossOrigin' || _propName4 === 'integrity') { + description += "\n \"" + _propName4 + "\" option value: " + getValueDescriptorExpectingEnumForWarning(_propValue2) + ", missing from props"; + } + } + + for (var _propName5 in diff.different) { + var latestValue = diff.different[_propName5].latest; + var originalValue = diff.different[_propName5].original; + description += "\n \"" + _propName5 + "\" option value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", prop value: " + getValueDescriptorExpectingEnumForWarning(originalValue); + } + + return description; +} +function describeDifferencesForPreinits(newProps, currentProps) { + var diff = compareResourcePropsForWarning(newProps, currentProps); + if (!diff) return ''; + var description = ''; + + for (var propName in diff.missing) { + var propValue = diff.missing[propName]; + + if (propName === 'precedence' && propValue !== 'default') { + description += "\n \"" + propName + "\" missing from options, original option value: " + getValueDescriptorExpectingEnumForWarning(propValue); + } + } + + for (var _propName6 in diff.extra) { + var _propValue3 = diff.extra[_propName6]; + + if (_propName6 === 'precedence' && _propValue3 !== 'default' || _propName6 === 'crossOrigin' || _propName6 === 'integrity') { + description += "\n \"" + _propName6 + "\" option value: " + getValueDescriptorExpectingEnumForWarning(_propValue3) + ", missing from original options"; + } + } + + for (var _propName7 in diff.different) { + var latestValue = diff.different[_propName7].latest; + var originalValue = diff.different[_propName7].original; + description += "\n \"" + _propName7 + "\" option value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", original option value: " + getValueDescriptorExpectingEnumForWarning(originalValue); + } + + return description; +} +var preloadOptionsForComparison = ['as', 'crossOrigin', 'integrity', 'media']; +function describeDifferencesForPreloads(newProps, currentProps) { + var diff = compareResourcePropsForWarning(newProps, currentProps); + if (!diff) return ''; + var description = ''; + + for (var propName in diff.missing) { + var propValue = diff.missing[propName]; + + if (preloadOptionsForComparison.includes(propName)) { + description += "\n \"" + propName + "\" missing from options, original option value: " + getValueDescriptorExpectingEnumForWarning(propValue); + } + } + + for (var _propName8 in diff.extra) { + var _propValue4 = diff.extra[_propName8]; + + if (preloadOptionsForComparison.includes(_propName8)) { + description += "\n \"" + _propName8 + "\" option value: " + getValueDescriptorExpectingEnumForWarning(_propValue4) + ", missing from original options"; + } + } + + for (var _propName9 in diff.different) { + var latestValue = diff.different[_propName9].latest; + var originalValue = diff.different[_propName9].original; + + if (preloadOptionsForComparison.includes(_propName9)) { + description += "\n \"" + _propName9 + "\" option value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", original option value: " + getValueDescriptorExpectingEnumForWarning(originalValue); + } + } + + return description; +} +function describeDifferencesForPreloadOverImplicitPreload(newProps, currentProps) { + var diff = compareResourcePropsForWarning(newProps, currentProps); + if (!diff) return ''; + var description = ''; + + for (var propName in diff.missing) { + var propValue = diff.missing[propName]; + + if (preloadOptionsForComparison.includes(propName)) { + description += "\n \"" + propName + "\" missing from options, underlying prop value: " + getValueDescriptorExpectingEnumForWarning(propValue); + } + } + + for (var _propName10 in diff.extra) { + var _propValue5 = diff.extra[_propName10]; + + if (preloadOptionsForComparison.includes(_propName10)) { + description += "\n \"" + _propName10 + "\" option value: " + getValueDescriptorExpectingEnumForWarning(_propValue5) + ", missing from underlying props"; + } + } + + for (var _propName11 in diff.different) { + var latestValue = diff.different[_propName11].latest; + var originalValue = diff.different[_propName11].original; + + if (preloadOptionsForComparison.includes(_propName11)) { + description += "\n \"" + _propName11 + "\" option value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", underlying prop value: " + getValueDescriptorExpectingEnumForWarning(originalValue); + } + } + + return description; +} +function describeDifferencesForScripts(newProps, currentProps) { + var diff = compareResourcePropsForWarning(newProps, currentProps); + if (!diff) return ''; + var description = ''; + + for (var propName in diff.missing) { + var propValue = diff.missing[propName]; + description += "\n \"" + propName + "\" missing for props, original value: " + getValueDescriptorExpectingEnumForWarning(propValue); + } + + for (var _propName12 in diff.extra) { + var _propValue6 = diff.extra[_propName12]; + description += "\n \"" + _propName12 + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(_propValue6) + ", missing from original props"; + } + + for (var _propName13 in diff.different) { + var latestValue = diff.different[_propName13].latest; + var originalValue = diff.different[_propName13].original; + description += "\n \"" + _propName13 + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", original value: " + getValueDescriptorExpectingEnumForWarning(originalValue); + } + + return description; +} +function describeDifferencesForScriptOverPreinit(newProps, currentProps) { + var diff = compareResourcePropsForWarning(newProps, currentProps); + if (!diff) return ''; + var description = ''; + + for (var propName in diff.extra) { + var propValue = diff.extra[propName]; + + if (propName === 'crossOrigin' || propName === 'integrity') { + description += "\n \"" + propName + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(propValue) + ", option missing"; + } else { + description += "\n \"" + propName + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(propValue) + ", option not available with ReactDOM.preinit()"; + } + } + + for (var _propName14 in diff.different) { + var latestValue = diff.different[_propName14].latest; + var originalValue = diff.different[_propName14].original; + description += "\n \"" + _propName14 + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", option value: " + getValueDescriptorExpectingEnumForWarning(originalValue); + } + + return description; +} +function describeDifferencesForPreinitOverScript(newProps, currentProps) { + var diff = compareResourcePropsForWarning(newProps, currentProps); + if (!diff) return ''; + var description = ''; + + for (var propName in diff.extra) { + var propValue = diff.extra[propName]; + + if (propName === 'crossOrigin' || propName === 'integrity') { + description += "\n \"" + propName + "\" option value: " + getValueDescriptorExpectingEnumForWarning(propValue) + ", missing from props"; + } + } + + for (var _propName15 in diff.different) { + var latestValue = diff.different[_propName15].latest; + var originalValue = diff.different[_propName15].original; + description += "\n \"" + _propName15 + "\" option value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", prop value: " + getValueDescriptorExpectingEnumForWarning(originalValue); + } + + return description; +} + +// same object across all transitions. + +var sharedNotPendingObject = { + pending: false, + data: null, + method: null, + action: null +}; +var NotPending = Object.freeze(sharedNotPendingObject) ; + +var ReactDOMSharedInternals = ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; + +var ReactDOMCurrentDispatcher = ReactDOMSharedInternals.Dispatcher; +var ReactDOMServerDispatcher = { + prefetchDNS: prefetchDNS, + preconnect: preconnect, + preload: preload, + preinit: preinit +}; +function prepareHostDispatcher() { + ReactDOMCurrentDispatcher.current = ReactDOMServerDispatcher; +} // Used to distinguish these contexts from ones used in other renderers. +var ScriptStreamingFormat = 0; +var DataStreamingFormat = 1; +var NothingSent +/* */ += 0; +var SentCompleteSegmentFunction +/* */ += 1; +var SentCompleteBoundaryFunction +/* */ += 2; +var SentClientRenderFunction +/* */ += 4; +var SentStyleInsertionFunction +/* */ += 8; +var SentFormReplayingRuntime +/* */ += 16; // Per response, global state that is not contextual to the rendering subtree. + +var dataElementQuotedEnd = stringToPrecomputedChunk('">'); +var startInlineScript = stringToPrecomputedChunk(''); +var startScriptSrc = stringToPrecomputedChunk(''); +/** + * This escaping function is designed to work with bootstrapScriptContent only. + * because we know we are escaping the entire script. We can avoid for instance + * escaping html comment string sequences that are valid javascript as well because + * if there are no sebsequent '); +var completeSegmentData1 = stringToPrecomputedChunk('")),ue(a,b,c),a=a.responseState.generateStaticMarkup?!0:b.push("\x3c!--/$--\x3e"),a;if(0a.progressiveChunkSize)return d.rootSegmentID=a.nextSegmentId++,a.completedBoundaries.push(d),Db(b,a.responseState,d.id),ue(a,b,c),b.push("\x3c!--/$--\x3e");(c=a.resources.boundaryResources)&&d.resources.forEach(Dc,c);a.responseState.generateStaticMarkup||b.push("\x3c!--$--\x3e");c=d.completedSegments;if(1!==c.length)throw Error("A previously unvisited boundary must have exactly one root segment. This is a bug in React."); +ve(a,b,c[0]);a=a.responseState.generateStaticMarkup?!0:b.push("\x3c!--/$--\x3e");return a}function we(a,b,c){Eb(b,a.responseState,c.formatContext,c.id);ve(a,b,c);return Fb(b,c.formatContext)} +function xe(a,b,c){a.resources.boundaryResources=c.resources;for(var d=c.completedSegments,e=0;e"):b.push('">');return Cb(b,a)&&d} +function ye(a,b,c,d){if(2===d.status)return!0;var e=d.id;if(-1===e){if(-1===(d.id=c.rootSegmentID))throw Error("A root segment ID must have been assigned by now. This is a bug in React.");return we(a,b,d)}we(a,b,d);a=a.responseState;(c=0===a.streamingFormat)?(b.push(a.startInlineScript),0===(a.instructions&1)?(a.instructions|=1,b.push('$RS=function(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};;$RS("')): +b.push('$RS("')):b.push('');return b} +function te(a,b){try{var c,d=a.completedRootSegment;if(null!==d)if(0===a.pendingRootTasks)Ub(b,a.resources,a.responseState,0===a.allPendingTasks),ve(a,b,d),a.completedRootSegment=null,Cb(b,a.responseState);else return;else Wb(b,a.resources,a.responseState);var e=a.clientRenderedBoundaries;for(c=0;c"):!d.push('">')){a.destination=null;c++;e.splice(0,c);return}}e.splice(0,c);var z=a.completedBoundaries;for(c=0;c")),a.htmlChunks&&(b.push("")),b.push(null))}}function Zb(a){if(!1===a.flushScheduled&&0===a.pingedTasks.length&&null!==a.destination){var b=a.destination;a.flushScheduled=!0;te(a,b)}}function ze(a,b){if(1===a.status)a.status=2,b.destroy(a.fatalError);else if(2!==a.status&&null===a.destination){a.destination=b;try{te(a,b)}catch(c){ie(a,c),je(a,c)}}} +function Ae(a,b){try{var c=a.abortableTasks;if(0 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { + args[_key2 - 1] = arguments[_key2]; + } + + printWarning('error', format, args); + } + } +} + +function printWarning(level, format, args) { + // When changing this logic, you might want to also + // update consoleWithStackDev.www.js as well. + { + var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; + var stack = ReactDebugCurrentFrame.getStackAddendum(); + + if (stack !== '') { + format += '%s'; + args = args.concat([stack]); + } // eslint-disable-next-line react-internal/safe-string-coercion + + + var argsWithFormat = args.map(function (item) { + return String(item); + }); // Careful: RN currently depends on this prefix + + argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it + // breaks IE9: https://github.com/facebook/react/issues/13610 + // eslint-disable-next-line react-internal/no-production-logging + + Function.prototype.apply.call(console[level], console, argsWithFormat); + } +} + +var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; // Since the "not pending" value is always the same, we can reuse the + +function resolveDispatcher() { + // Copied from react/src/ReactHooks.js. It's the same thing but in a + // different package. + var dispatcher = ReactCurrentDispatcher.current; + + { + if (dispatcher === null) { + error('Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for' + ' one of the following reasons:\n' + '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' + '2. You might be breaking the Rules of Hooks\n' + '3. You might have more than one copy of React in the same app\n' + 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.'); + } + } // Will result in a null access error if accessed outside render phase. We + // intentionally don't throw our own error because this is in a hot path. + // Also helps ensure this is inlined. + + + return dispatcher; +} + +function useFormStatus() { + { + var dispatcher = resolveDispatcher(); // $FlowFixMe[not-a-function] We know this exists because of the feature check above. + + return dispatcher.useHostTransitionStatus(); + } +} + +function createPortal() { + throw new Error('createPortal was called on the server. Portals are not currently' + ' supported on the server. Update your program to conditionally call' + ' createPortal on the client only.'); +} +function flushSync() { + throw new Error('flushSync was called on the server. This is likely caused by a' + ' function being called during render or in module scope that was' + ' intended to be called from an effect or event handler. Update your' + ' to not call flushSync no the server.'); +} + +exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Internals; +exports.createPortal = createPortal; +exports.experimental_useFormStatus = useFormStatus; +exports.flushSync = flushSync; +exports.preconnect = preconnect; +exports.prefetchDNS = prefetchDNS; +exports.preinit = preinit; +exports.preload = preload; +exports.version = ReactVersion; + })(); +} diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-rendering-stub.production.min.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-rendering-stub.production.min.js new file mode 100644 index 0000000000000..71e3ccf54ed97 --- /dev/null +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-rendering-stub.production.min.js @@ -0,0 +1,12 @@ +/** + * @license React + * react-dom-server-rendering-stub.production.min.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +'use strict';var d=require("next/dist/compiled/react-experimental"),e={usingClientEntryPoint:!1,Events:null,Dispatcher:{current:null}};function f(c){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+c,a=1;a 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + + printWarning('warn', format, args); + } + } +} +function error(format) { + { + { + for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { + args[_key2 - 1] = arguments[_key2]; + } + + printWarning('error', format, args); + } + } +} + +function printWarning(level, format, args) { + // When changing this logic, you might want to also + // update consoleWithStackDev.www.js as well. + { + var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; + var stack = ReactDebugCurrentFrame.getStackAddendum(); + + if (stack !== '') { + format += '%s'; + args = args.concat([stack]); + } // eslint-disable-next-line react-internal/safe-string-coercion + + + var argsWithFormat = args.map(function (item) { + return String(item); + }); // Careful: RN currently depends on this prefix + + argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it + // breaks IE9: https://github.com/facebook/react/issues/13610 + // eslint-disable-next-line react-internal/no-production-logging + + Function.prototype.apply.call(console[level], console, argsWithFormat); + } +} + +function scheduleWork(callback) { + callback(); +} +var VIEW_SIZE = 512; +var currentView = null; +var writtenBytes = 0; +function beginWriting(destination) { + currentView = new Uint8Array(VIEW_SIZE); + writtenBytes = 0; +} +function writeChunk(destination, chunk) { + if (chunk.length === 0) { + return; + } + + if (chunk.length > VIEW_SIZE) { + { + if (precomputedChunkSet.has(chunk)) { + error('A large precomputed chunk was passed to writeChunk without being copied.' + ' Large chunks get enqueued directly and are not copied. This is incompatible with precomputed chunks because you cannot enqueue the same precomputed chunk twice.' + ' Use "cloneChunk" to make a copy of this large precomputed chunk before writing it. This is a bug in React.'); + } + } // this chunk may overflow a single view which implies it was not + // one that is cached by the streaming renderer. We will enqueu + // it directly and expect it is not re-used + + + if (writtenBytes > 0) { + destination.enqueue(new Uint8Array(currentView.buffer, 0, writtenBytes)); + currentView = new Uint8Array(VIEW_SIZE); + writtenBytes = 0; + } + + destination.enqueue(chunk); + return; + } + + var bytesToWrite = chunk; + var allowableBytes = currentView.length - writtenBytes; + + if (allowableBytes < bytesToWrite.length) { + // this chunk would overflow the current view. We enqueue a full view + // and start a new view with the remaining chunk + if (allowableBytes === 0) { + // the current view is already full, send it + destination.enqueue(currentView); + } else { + // fill up the current view and apply the remaining chunk bytes + // to a new view. + currentView.set(bytesToWrite.subarray(0, allowableBytes), writtenBytes); // writtenBytes += allowableBytes; // this can be skipped because we are going to immediately reset the view + + destination.enqueue(currentView); + bytesToWrite = bytesToWrite.subarray(allowableBytes); + } + + currentView = new Uint8Array(VIEW_SIZE); + writtenBytes = 0; + } + + currentView.set(bytesToWrite, writtenBytes); + writtenBytes += bytesToWrite.length; +} +function writeChunkAndReturn(destination, chunk) { + writeChunk(destination, chunk); // in web streams there is no backpressure so we can alwas write more + + return true; +} +function completeWriting(destination) { + if (currentView && writtenBytes > 0) { + destination.enqueue(new Uint8Array(currentView.buffer, 0, writtenBytes)); + currentView = null; + writtenBytes = 0; + } +} +function close(destination) { + destination.close(); +} +var textEncoder = new TextEncoder(); +function stringToChunk(content) { + return textEncoder.encode(content); +} +var precomputedChunkSet = new Set() ; +function stringToPrecomputedChunk(content) { + var precomputedChunk = textEncoder.encode(content); + + { + precomputedChunkSet.add(precomputedChunk); + } + + return precomputedChunk; +} +function clonePrecomputedChunk(precomputedChunk) { + return precomputedChunk.length > VIEW_SIZE ? precomputedChunk.slice() : precomputedChunk; +} +function closeWithError(destination, error) { + // $FlowFixMe[method-unbinding] + if (typeof destination.error === 'function') { + // $FlowFixMe[incompatible-call]: This is an Error object or the destination accepts other types. + destination.error(error); + } else { + // Earlier implementations doesn't support this method. In that environment you're + // supposed to throw from a promise returned but we don't return a promise in our + // approach. We could fork this implementation but this is environment is an edge + // case to begin with. It's even less common to run this in an older environment. + // Even then, this is not where errors are supposed to happen and they get reported + // to a global callback in addition to this anyway. So it's fine just to close this. + destination.close(); + } +} + +function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + + return obj; +} + +var assign = Object.assign; + +/* + * The `'' + value` pattern (used in perf-sensitive code) throws for Symbol + * and Temporal.* types. See https://github.com/facebook/react/pull/22064. + * + * The functions in this module will throw an easier-to-understand, + * easier-to-debug exception with a clear errors message message explaining the + * problem. (Instead of a confusing exception thrown inside the implementation + * of the `value` object). + */ +// $FlowFixMe[incompatible-return] only called in DEV, so void return is not possible. +function typeName(value) { + { + // toStringTag is needed for namespaced types like Temporal.Instant + var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag; + var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object'; // $FlowFixMe[incompatible-return] + + return type; + } +} // $FlowFixMe[incompatible-return] only called in DEV, so void return is not possible. + + +function willCoercionThrow(value) { + { + try { + testStringCoercion(value); + return false; + } catch (e) { + return true; + } + } +} + +function testStringCoercion(value) { + // If you ended up here by following an exception call stack, here's what's + // happened: you supplied an object or symbol value to React (as a prop, key, + // DOM attribute, CSS property, string ref, etc.) and when React tried to + // coerce it to a string using `'' + value`, an exception was thrown. + // + // The most common types that will cause this exception are `Symbol` instances + // and Temporal objects like `Temporal.Instant`. But any object that has a + // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this + // exception. (Library authors do this to prevent users from using built-in + // numeric operators like `+` or comparison operators like `>=` because custom + // methods are needed to perform accurate arithmetic or comparison.) + // + // To fix the problem, coerce this object or symbol value to a string before + // passing it to React. The most reliable way is usually `String(value)`. + // + // To find which value is throwing, check the browser or debugger console. + // Before this exception was thrown, there should be `console.error` output + // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the + // problem and how that type was used: key, atrribute, input value prop, etc. + // In most cases, this console output also shows the component and its + // ancestor components where the exception happened. + // + // eslint-disable-next-line react-internal/safe-string-coercion + return '' + value; +} + +function checkAttributeStringCoercion(value, attributeName) { + { + if (willCoercionThrow(value)) { + error('The provided `%s` attribute is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', attributeName, typeName(value)); + + return testStringCoercion(value); // throw (to help callers find troubleshooting comments) + } + } +} +function checkCSSPropertyStringCoercion(value, propName) { + { + if (willCoercionThrow(value)) { + error('The provided `%s` CSS property is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', propName, typeName(value)); + + return testStringCoercion(value); // throw (to help callers find troubleshooting comments) + } + } +} +function checkHtmlStringCoercion(value) { + { + if (willCoercionThrow(value)) { + error('The provided HTML markup uses a value of unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value)); + + return testStringCoercion(value); // throw (to help callers find troubleshooting comments) + } + } +} + +// ----------------------------------------------------------------------------- +var enableFloat = true; // Enables unstable_useMemoCache hook, intended as a compilation target for + +// $FlowFixMe[method-unbinding] +var hasOwnProperty = Object.prototype.hasOwnProperty; + +/* eslint-disable max-len */ + +var ATTRIBUTE_NAME_START_CHAR = ":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD"; +/* eslint-enable max-len */ + +var ATTRIBUTE_NAME_CHAR = ATTRIBUTE_NAME_START_CHAR + "\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040"; +var VALID_ATTRIBUTE_NAME_REGEX = new RegExp('^[' + ATTRIBUTE_NAME_START_CHAR + '][' + ATTRIBUTE_NAME_CHAR + ']*$'); +var illegalAttributeNameCache = {}; +var validatedAttributeNameCache = {}; +function isAttributeNameSafe(attributeName) { + if (hasOwnProperty.call(validatedAttributeNameCache, attributeName)) { + return true; + } + + if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) { + return false; + } + + if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) { + validatedAttributeNameCache[attributeName] = true; + return true; + } + + illegalAttributeNameCache[attributeName] = true; + + { + error('Invalid attribute name: `%s`', attributeName); + } + + return false; +} + +/** + * CSS properties which accept numbers but are not in units of "px". + */ +var unitlessNumbers = new Set(['animationIterationCount', 'aspectRatio', 'borderImageOutset', 'borderImageSlice', 'borderImageWidth', 'boxFlex', 'boxFlexGroup', 'boxOrdinalGroup', 'columnCount', 'columns', 'flex', 'flexGrow', 'flexPositive', 'flexShrink', 'flexNegative', 'flexOrder', 'gridArea', 'gridRow', 'gridRowEnd', 'gridRowSpan', 'gridRowStart', 'gridColumn', 'gridColumnEnd', 'gridColumnSpan', 'gridColumnStart', 'fontWeight', 'lineClamp', 'lineHeight', 'opacity', 'order', 'orphans', 'scale', 'tabSize', 'widows', 'zIndex', 'zoom', 'fillOpacity', // SVG-related properties +'floodOpacity', 'stopOpacity', 'strokeDasharray', 'strokeDashoffset', 'strokeMiterlimit', 'strokeOpacity', 'strokeWidth', 'MozAnimationIterationCount', // Known Prefixed Properties +'MozBoxFlex', // TODO: Remove these since they shouldn't be used in modern code +'MozBoxFlexGroup', 'MozLineClamp', 'msAnimationIterationCount', 'msFlex', 'msZoom', 'msFlexGrow', 'msFlexNegative', 'msFlexOrder', 'msFlexPositive', 'msFlexShrink', 'msGridColumn', 'msGridColumnSpan', 'msGridRow', 'msGridRowSpan', 'WebkitAnimationIterationCount', 'WebkitBoxFlex', 'WebKitBoxFlexGroup', 'WebkitBoxOrdinalGroup', 'WebkitColumnCount', 'WebkitColumns', 'WebkitFlex', 'WebkitFlexGrow', 'WebkitFlexPositive', 'WebkitFlexShrink', 'WebkitLineClamp']); +function isUnitlessNumber (name) { + return unitlessNumbers.has(name); +} + +var aliases = new Map([['acceptCharset', 'accept-charset'], ['htmlFor', 'for'], ['httpEquiv', 'http-equiv'], // HTML and SVG attributes, but the SVG attribute is case sensitive.], +['crossOrigin', 'crossorigin'], // This is a list of all SVG attributes that need special casing. +// Regular attributes that just accept strings.], +['accentHeight', 'accent-height'], ['alignmentBaseline', 'alignment-baseline'], ['arabicForm', 'arabic-form'], ['baselineShift', 'baseline-shift'], ['capHeight', 'cap-height'], ['clipPath', 'clip-path'], ['clipRule', 'clip-rule'], ['colorInterpolation', 'color-interpolation'], ['colorInterpolationFilters', 'color-interpolation-filters'], ['colorProfile', 'color-profile'], ['colorRendering', 'color-rendering'], ['dominantBaseline', 'dominant-baseline'], ['enableBackground', 'enable-background'], ['fillOpacity', 'fill-opacity'], ['fillRule', 'fill-rule'], ['floodColor', 'flood-color'], ['floodOpacity', 'flood-opacity'], ['fontFamily', 'font-family'], ['fontSize', 'font-size'], ['fontSizeAdjust', 'font-size-adjust'], ['fontStretch', 'font-stretch'], ['fontStyle', 'font-style'], ['fontVariant', 'font-variant'], ['fontWeight', 'font-weight'], ['glyphName', 'glyph-name'], ['glyphOrientationHorizontal', 'glyph-orientation-horizontal'], ['glyphOrientationVertical', 'glyph-orientation-vertical'], ['horizAdvX', 'horiz-adv-x'], ['horizOriginX', 'horiz-origin-x'], ['imageRendering', 'image-rendering'], ['letterSpacing', 'letter-spacing'], ['lightingColor', 'lighting-color'], ['markerEnd', 'marker-end'], ['markerMid', 'marker-mid'], ['markerStart', 'marker-start'], ['overlinePosition', 'overline-position'], ['overlineThickness', 'overline-thickness'], ['paintOrder', 'paint-order'], ['panose-1', 'panose-1'], ['pointerEvents', 'pointer-events'], ['renderingIntent', 'rendering-intent'], ['shapeRendering', 'shape-rendering'], ['stopColor', 'stop-color'], ['stopOpacity', 'stop-opacity'], ['strikethroughPosition', 'strikethrough-position'], ['strikethroughThickness', 'strikethrough-thickness'], ['strokeDasharray', 'stroke-dasharray'], ['strokeDashoffset', 'stroke-dashoffset'], ['strokeLinecap', 'stroke-linecap'], ['strokeLinejoin', 'stroke-linejoin'], ['strokeMiterlimit', 'stroke-miterlimit'], ['strokeOpacity', 'stroke-opacity'], ['strokeWidth', 'stroke-width'], ['textAnchor', 'text-anchor'], ['textDecoration', 'text-decoration'], ['textRendering', 'text-rendering'], ['transformOrigin', 'transform-origin'], ['underlinePosition', 'underline-position'], ['underlineThickness', 'underline-thickness'], ['unicodeBidi', 'unicode-bidi'], ['unicodeRange', 'unicode-range'], ['unitsPerEm', 'units-per-em'], ['vAlphabetic', 'v-alphabetic'], ['vHanging', 'v-hanging'], ['vIdeographic', 'v-ideographic'], ['vMathematical', 'v-mathematical'], ['vectorEffect', 'vector-effect'], ['vertAdvY', 'vert-adv-y'], ['vertOriginX', 'vert-origin-x'], ['vertOriginY', 'vert-origin-y'], ['wordSpacing', 'word-spacing'], ['writingMode', 'writing-mode'], ['xmlnsXlink', 'xmlns:xlink'], ['xHeight', 'x-height']]); +function getAttributeAlias (name) { + return aliases.get(name) || name; +} + +var hasReadOnlyValue = { + button: true, + checkbox: true, + image: true, + hidden: true, + radio: true, + reset: true, + submit: true +}; +function checkControlledValueProps(tagName, props) { + { + if (!(hasReadOnlyValue[props.type] || props.onChange || props.onInput || props.readOnly || props.disabled || props.value == null)) { + error('You provided a `value` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultValue`. Otherwise, ' + 'set either `onChange` or `readOnly`.'); + } + + if (!(props.onChange || props.readOnly || props.disabled || props.checked == null)) { + error('You provided a `checked` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultChecked`. Otherwise, ' + 'set either `onChange` or `readOnly`.'); + } + } +} + +var ariaProperties = { + 'aria-current': 0, + // state + 'aria-description': 0, + 'aria-details': 0, + 'aria-disabled': 0, + // state + 'aria-hidden': 0, + // state + 'aria-invalid': 0, + // state + 'aria-keyshortcuts': 0, + 'aria-label': 0, + 'aria-roledescription': 0, + // Widget Attributes + 'aria-autocomplete': 0, + 'aria-checked': 0, + 'aria-expanded': 0, + 'aria-haspopup': 0, + 'aria-level': 0, + 'aria-modal': 0, + 'aria-multiline': 0, + 'aria-multiselectable': 0, + 'aria-orientation': 0, + 'aria-placeholder': 0, + 'aria-pressed': 0, + 'aria-readonly': 0, + 'aria-required': 0, + 'aria-selected': 0, + 'aria-sort': 0, + 'aria-valuemax': 0, + 'aria-valuemin': 0, + 'aria-valuenow': 0, + 'aria-valuetext': 0, + // Live Region Attributes + 'aria-atomic': 0, + 'aria-busy': 0, + 'aria-live': 0, + 'aria-relevant': 0, + // Drag-and-Drop Attributes + 'aria-dropeffect': 0, + 'aria-grabbed': 0, + // Relationship Attributes + 'aria-activedescendant': 0, + 'aria-colcount': 0, + 'aria-colindex': 0, + 'aria-colspan': 0, + 'aria-controls': 0, + 'aria-describedby': 0, + 'aria-errormessage': 0, + 'aria-flowto': 0, + 'aria-labelledby': 0, + 'aria-owns': 0, + 'aria-posinset': 0, + 'aria-rowcount': 0, + 'aria-rowindex': 0, + 'aria-rowspan': 0, + 'aria-setsize': 0 +}; + +var warnedProperties$1 = {}; +var rARIA$1 = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$'); +var rARIACamel$1 = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$'); + +function validateProperty$1(tagName, name) { + { + if (hasOwnProperty.call(warnedProperties$1, name) && warnedProperties$1[name]) { + return true; + } + + if (rARIACamel$1.test(name)) { + var ariaName = 'aria-' + name.slice(4).toLowerCase(); + var correctName = ariaProperties.hasOwnProperty(ariaName) ? ariaName : null; // If this is an aria-* attribute, but is not listed in the known DOM + // DOM properties, then it is an invalid aria-* attribute. + + if (correctName == null) { + error('Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.', name); + + warnedProperties$1[name] = true; + return true; + } // aria-* attributes should be lowercase; suggest the lowercase version. + + + if (name !== correctName) { + error('Invalid ARIA attribute `%s`. Did you mean `%s`?', name, correctName); + + warnedProperties$1[name] = true; + return true; + } + } + + if (rARIA$1.test(name)) { + var lowerCasedName = name.toLowerCase(); + var standardName = ariaProperties.hasOwnProperty(lowerCasedName) ? lowerCasedName : null; // If this is an aria-* attribute, but is not listed in the known DOM + // DOM properties, then it is an invalid aria-* attribute. + + if (standardName == null) { + warnedProperties$1[name] = true; + return false; + } // aria-* attributes should be lowercase; suggest the lowercase version. + + + if (name !== standardName) { + error('Unknown ARIA attribute `%s`. Did you mean `%s`?', name, standardName); + + warnedProperties$1[name] = true; + return true; + } + } + } + + return true; +} + +function validateProperties$2(type, props) { + { + var invalidProps = []; + + for (var key in props) { + var isValid = validateProperty$1(type, key); + + if (!isValid) { + invalidProps.push(key); + } + } + + var unknownPropString = invalidProps.map(function (prop) { + return '`' + prop + '`'; + }).join(', '); + + if (invalidProps.length === 1) { + error('Invalid aria prop %s on <%s> tag. ' + 'For details, see https://reactjs.org/link/invalid-aria-props', unknownPropString, type); + } else if (invalidProps.length > 1) { + error('Invalid aria props %s on <%s> tag. ' + 'For details, see https://reactjs.org/link/invalid-aria-props', unknownPropString, type); + } + } +} + +var didWarnValueNull = false; +function validateProperties$1(type, props) { + { + if (type !== 'input' && type !== 'textarea' && type !== 'select') { + return; + } + + if (props != null && props.value === null && !didWarnValueNull) { + didWarnValueNull = true; + + if (type === 'select' && props.multiple) { + error('`value` prop on `%s` should not be null. ' + 'Consider using an empty array when `multiple` is set to `true` ' + 'to clear the component or `undefined` for uncontrolled components.', type); + } else { + error('`value` prop on `%s` should not be null. ' + 'Consider using an empty string to clear the component or `undefined` ' + 'for uncontrolled components.', type); + } + } + } +} + +function isCustomElement(tagName, props) { + if (tagName.indexOf('-') === -1) { + return false; + } + + switch (tagName) { + // These are reserved SVG and MathML elements. + // We don't mind this list too much because we expect it to never grow. + // The alternative is to track the namespace in a few places which is convoluted. + // https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts + case 'annotation-xml': + case 'color-profile': + case 'font-face': + case 'font-face-src': + case 'font-face-uri': + case 'font-face-format': + case 'font-face-name': + case 'missing-glyph': + return false; + + default: + return true; + } +} + +// When adding attributes to the HTML or SVG allowed attribute list, be sure to +// also add them to this module to ensure casing and incorrect name +// warnings. +var possibleStandardNames = { + // HTML + accept: 'accept', + acceptcharset: 'acceptCharset', + 'accept-charset': 'acceptCharset', + accesskey: 'accessKey', + action: 'action', + allowfullscreen: 'allowFullScreen', + alt: 'alt', + as: 'as', + async: 'async', + autocapitalize: 'autoCapitalize', + autocomplete: 'autoComplete', + autocorrect: 'autoCorrect', + autofocus: 'autoFocus', + autoplay: 'autoPlay', + autosave: 'autoSave', + capture: 'capture', + cellpadding: 'cellPadding', + cellspacing: 'cellSpacing', + challenge: 'challenge', + charset: 'charSet', + checked: 'checked', + children: 'children', + cite: 'cite', + class: 'className', + classid: 'classID', + classname: 'className', + cols: 'cols', + colspan: 'colSpan', + content: 'content', + contenteditable: 'contentEditable', + contextmenu: 'contextMenu', + controls: 'controls', + controlslist: 'controlsList', + coords: 'coords', + crossorigin: 'crossOrigin', + dangerouslysetinnerhtml: 'dangerouslySetInnerHTML', + data: 'data', + datetime: 'dateTime', + default: 'default', + defaultchecked: 'defaultChecked', + defaultvalue: 'defaultValue', + defer: 'defer', + dir: 'dir', + disabled: 'disabled', + disablepictureinpicture: 'disablePictureInPicture', + disableremoteplayback: 'disableRemotePlayback', + download: 'download', + draggable: 'draggable', + enctype: 'encType', + enterkeyhint: 'enterKeyHint', + fetchpriority: 'fetchPriority', + for: 'htmlFor', + form: 'form', + formmethod: 'formMethod', + formaction: 'formAction', + formenctype: 'formEncType', + formnovalidate: 'formNoValidate', + formtarget: 'formTarget', + frameborder: 'frameBorder', + headers: 'headers', + height: 'height', + hidden: 'hidden', + high: 'high', + href: 'href', + hreflang: 'hrefLang', + htmlfor: 'htmlFor', + httpequiv: 'httpEquiv', + 'http-equiv': 'httpEquiv', + icon: 'icon', + id: 'id', + imagesizes: 'imageSizes', + imagesrcset: 'imageSrcSet', + innerhtml: 'innerHTML', + inputmode: 'inputMode', + integrity: 'integrity', + is: 'is', + itemid: 'itemID', + itemprop: 'itemProp', + itemref: 'itemRef', + itemscope: 'itemScope', + itemtype: 'itemType', + keyparams: 'keyParams', + keytype: 'keyType', + kind: 'kind', + label: 'label', + lang: 'lang', + list: 'list', + loop: 'loop', + low: 'low', + manifest: 'manifest', + marginwidth: 'marginWidth', + marginheight: 'marginHeight', + max: 'max', + maxlength: 'maxLength', + media: 'media', + mediagroup: 'mediaGroup', + method: 'method', + min: 'min', + minlength: 'minLength', + multiple: 'multiple', + muted: 'muted', + name: 'name', + nomodule: 'noModule', + nonce: 'nonce', + novalidate: 'noValidate', + open: 'open', + optimum: 'optimum', + pattern: 'pattern', + placeholder: 'placeholder', + playsinline: 'playsInline', + poster: 'poster', + preload: 'preload', + profile: 'profile', + radiogroup: 'radioGroup', + readonly: 'readOnly', + referrerpolicy: 'referrerPolicy', + rel: 'rel', + required: 'required', + reversed: 'reversed', + role: 'role', + rows: 'rows', + rowspan: 'rowSpan', + sandbox: 'sandbox', + scope: 'scope', + scoped: 'scoped', + scrolling: 'scrolling', + seamless: 'seamless', + selected: 'selected', + shape: 'shape', + size: 'size', + sizes: 'sizes', + span: 'span', + spellcheck: 'spellCheck', + src: 'src', + srcdoc: 'srcDoc', + srclang: 'srcLang', + srcset: 'srcSet', + start: 'start', + step: 'step', + style: 'style', + summary: 'summary', + tabindex: 'tabIndex', + target: 'target', + title: 'title', + type: 'type', + usemap: 'useMap', + value: 'value', + width: 'width', + wmode: 'wmode', + wrap: 'wrap', + // SVG + about: 'about', + accentheight: 'accentHeight', + 'accent-height': 'accentHeight', + accumulate: 'accumulate', + additive: 'additive', + alignmentbaseline: 'alignmentBaseline', + 'alignment-baseline': 'alignmentBaseline', + allowreorder: 'allowReorder', + alphabetic: 'alphabetic', + amplitude: 'amplitude', + arabicform: 'arabicForm', + 'arabic-form': 'arabicForm', + ascent: 'ascent', + attributename: 'attributeName', + attributetype: 'attributeType', + autoreverse: 'autoReverse', + azimuth: 'azimuth', + basefrequency: 'baseFrequency', + baselineshift: 'baselineShift', + 'baseline-shift': 'baselineShift', + baseprofile: 'baseProfile', + bbox: 'bbox', + begin: 'begin', + bias: 'bias', + by: 'by', + calcmode: 'calcMode', + capheight: 'capHeight', + 'cap-height': 'capHeight', + clip: 'clip', + clippath: 'clipPath', + 'clip-path': 'clipPath', + clippathunits: 'clipPathUnits', + cliprule: 'clipRule', + 'clip-rule': 'clipRule', + color: 'color', + colorinterpolation: 'colorInterpolation', + 'color-interpolation': 'colorInterpolation', + colorinterpolationfilters: 'colorInterpolationFilters', + 'color-interpolation-filters': 'colorInterpolationFilters', + colorprofile: 'colorProfile', + 'color-profile': 'colorProfile', + colorrendering: 'colorRendering', + 'color-rendering': 'colorRendering', + contentscripttype: 'contentScriptType', + contentstyletype: 'contentStyleType', + cursor: 'cursor', + cx: 'cx', + cy: 'cy', + d: 'd', + datatype: 'datatype', + decelerate: 'decelerate', + descent: 'descent', + diffuseconstant: 'diffuseConstant', + direction: 'direction', + display: 'display', + divisor: 'divisor', + dominantbaseline: 'dominantBaseline', + 'dominant-baseline': 'dominantBaseline', + dur: 'dur', + dx: 'dx', + dy: 'dy', + edgemode: 'edgeMode', + elevation: 'elevation', + enablebackground: 'enableBackground', + 'enable-background': 'enableBackground', + end: 'end', + exponent: 'exponent', + externalresourcesrequired: 'externalResourcesRequired', + fill: 'fill', + fillopacity: 'fillOpacity', + 'fill-opacity': 'fillOpacity', + fillrule: 'fillRule', + 'fill-rule': 'fillRule', + filter: 'filter', + filterres: 'filterRes', + filterunits: 'filterUnits', + floodopacity: 'floodOpacity', + 'flood-opacity': 'floodOpacity', + floodcolor: 'floodColor', + 'flood-color': 'floodColor', + focusable: 'focusable', + fontfamily: 'fontFamily', + 'font-family': 'fontFamily', + fontsize: 'fontSize', + 'font-size': 'fontSize', + fontsizeadjust: 'fontSizeAdjust', + 'font-size-adjust': 'fontSizeAdjust', + fontstretch: 'fontStretch', + 'font-stretch': 'fontStretch', + fontstyle: 'fontStyle', + 'font-style': 'fontStyle', + fontvariant: 'fontVariant', + 'font-variant': 'fontVariant', + fontweight: 'fontWeight', + 'font-weight': 'fontWeight', + format: 'format', + from: 'from', + fx: 'fx', + fy: 'fy', + g1: 'g1', + g2: 'g2', + glyphname: 'glyphName', + 'glyph-name': 'glyphName', + glyphorientationhorizontal: 'glyphOrientationHorizontal', + 'glyph-orientation-horizontal': 'glyphOrientationHorizontal', + glyphorientationvertical: 'glyphOrientationVertical', + 'glyph-orientation-vertical': 'glyphOrientationVertical', + glyphref: 'glyphRef', + gradienttransform: 'gradientTransform', + gradientunits: 'gradientUnits', + hanging: 'hanging', + horizadvx: 'horizAdvX', + 'horiz-adv-x': 'horizAdvX', + horizoriginx: 'horizOriginX', + 'horiz-origin-x': 'horizOriginX', + ideographic: 'ideographic', + imagerendering: 'imageRendering', + 'image-rendering': 'imageRendering', + in2: 'in2', + in: 'in', + inlist: 'inlist', + intercept: 'intercept', + k1: 'k1', + k2: 'k2', + k3: 'k3', + k4: 'k4', + k: 'k', + kernelmatrix: 'kernelMatrix', + kernelunitlength: 'kernelUnitLength', + kerning: 'kerning', + keypoints: 'keyPoints', + keysplines: 'keySplines', + keytimes: 'keyTimes', + lengthadjust: 'lengthAdjust', + letterspacing: 'letterSpacing', + 'letter-spacing': 'letterSpacing', + lightingcolor: 'lightingColor', + 'lighting-color': 'lightingColor', + limitingconeangle: 'limitingConeAngle', + local: 'local', + markerend: 'markerEnd', + 'marker-end': 'markerEnd', + markerheight: 'markerHeight', + markermid: 'markerMid', + 'marker-mid': 'markerMid', + markerstart: 'markerStart', + 'marker-start': 'markerStart', + markerunits: 'markerUnits', + markerwidth: 'markerWidth', + mask: 'mask', + maskcontentunits: 'maskContentUnits', + maskunits: 'maskUnits', + mathematical: 'mathematical', + mode: 'mode', + numoctaves: 'numOctaves', + offset: 'offset', + opacity: 'opacity', + operator: 'operator', + order: 'order', + orient: 'orient', + orientation: 'orientation', + origin: 'origin', + overflow: 'overflow', + overlineposition: 'overlinePosition', + 'overline-position': 'overlinePosition', + overlinethickness: 'overlineThickness', + 'overline-thickness': 'overlineThickness', + paintorder: 'paintOrder', + 'paint-order': 'paintOrder', + panose1: 'panose1', + 'panose-1': 'panose1', + pathlength: 'pathLength', + patterncontentunits: 'patternContentUnits', + patterntransform: 'patternTransform', + patternunits: 'patternUnits', + pointerevents: 'pointerEvents', + 'pointer-events': 'pointerEvents', + points: 'points', + pointsatx: 'pointsAtX', + pointsaty: 'pointsAtY', + pointsatz: 'pointsAtZ', + prefix: 'prefix', + preservealpha: 'preserveAlpha', + preserveaspectratio: 'preserveAspectRatio', + primitiveunits: 'primitiveUnits', + property: 'property', + r: 'r', + radius: 'radius', + refx: 'refX', + refy: 'refY', + renderingintent: 'renderingIntent', + 'rendering-intent': 'renderingIntent', + repeatcount: 'repeatCount', + repeatdur: 'repeatDur', + requiredextensions: 'requiredExtensions', + requiredfeatures: 'requiredFeatures', + resource: 'resource', + restart: 'restart', + result: 'result', + results: 'results', + rotate: 'rotate', + rx: 'rx', + ry: 'ry', + scale: 'scale', + security: 'security', + seed: 'seed', + shaperendering: 'shapeRendering', + 'shape-rendering': 'shapeRendering', + slope: 'slope', + spacing: 'spacing', + specularconstant: 'specularConstant', + specularexponent: 'specularExponent', + speed: 'speed', + spreadmethod: 'spreadMethod', + startoffset: 'startOffset', + stddeviation: 'stdDeviation', + stemh: 'stemh', + stemv: 'stemv', + stitchtiles: 'stitchTiles', + stopcolor: 'stopColor', + 'stop-color': 'stopColor', + stopopacity: 'stopOpacity', + 'stop-opacity': 'stopOpacity', + strikethroughposition: 'strikethroughPosition', + 'strikethrough-position': 'strikethroughPosition', + strikethroughthickness: 'strikethroughThickness', + 'strikethrough-thickness': 'strikethroughThickness', + string: 'string', + stroke: 'stroke', + strokedasharray: 'strokeDasharray', + 'stroke-dasharray': 'strokeDasharray', + strokedashoffset: 'strokeDashoffset', + 'stroke-dashoffset': 'strokeDashoffset', + strokelinecap: 'strokeLinecap', + 'stroke-linecap': 'strokeLinecap', + strokelinejoin: 'strokeLinejoin', + 'stroke-linejoin': 'strokeLinejoin', + strokemiterlimit: 'strokeMiterlimit', + 'stroke-miterlimit': 'strokeMiterlimit', + strokewidth: 'strokeWidth', + 'stroke-width': 'strokeWidth', + strokeopacity: 'strokeOpacity', + 'stroke-opacity': 'strokeOpacity', + suppresscontenteditablewarning: 'suppressContentEditableWarning', + suppresshydrationwarning: 'suppressHydrationWarning', + surfacescale: 'surfaceScale', + systemlanguage: 'systemLanguage', + tablevalues: 'tableValues', + targetx: 'targetX', + targety: 'targetY', + textanchor: 'textAnchor', + 'text-anchor': 'textAnchor', + textdecoration: 'textDecoration', + 'text-decoration': 'textDecoration', + textlength: 'textLength', + textrendering: 'textRendering', + 'text-rendering': 'textRendering', + to: 'to', + transform: 'transform', + transformorigin: 'transformOrigin', + 'transform-origin': 'transformOrigin', + typeof: 'typeof', + u1: 'u1', + u2: 'u2', + underlineposition: 'underlinePosition', + 'underline-position': 'underlinePosition', + underlinethickness: 'underlineThickness', + 'underline-thickness': 'underlineThickness', + unicode: 'unicode', + unicodebidi: 'unicodeBidi', + 'unicode-bidi': 'unicodeBidi', + unicoderange: 'unicodeRange', + 'unicode-range': 'unicodeRange', + unitsperem: 'unitsPerEm', + 'units-per-em': 'unitsPerEm', + unselectable: 'unselectable', + valphabetic: 'vAlphabetic', + 'v-alphabetic': 'vAlphabetic', + values: 'values', + vectoreffect: 'vectorEffect', + 'vector-effect': 'vectorEffect', + version: 'version', + vertadvy: 'vertAdvY', + 'vert-adv-y': 'vertAdvY', + vertoriginx: 'vertOriginX', + 'vert-origin-x': 'vertOriginX', + vertoriginy: 'vertOriginY', + 'vert-origin-y': 'vertOriginY', + vhanging: 'vHanging', + 'v-hanging': 'vHanging', + videographic: 'vIdeographic', + 'v-ideographic': 'vIdeographic', + viewbox: 'viewBox', + viewtarget: 'viewTarget', + visibility: 'visibility', + vmathematical: 'vMathematical', + 'v-mathematical': 'vMathematical', + vocab: 'vocab', + widths: 'widths', + wordspacing: 'wordSpacing', + 'word-spacing': 'wordSpacing', + writingmode: 'writingMode', + 'writing-mode': 'writingMode', + x1: 'x1', + x2: 'x2', + x: 'x', + xchannelselector: 'xChannelSelector', + xheight: 'xHeight', + 'x-height': 'xHeight', + xlinkactuate: 'xlinkActuate', + 'xlink:actuate': 'xlinkActuate', + xlinkarcrole: 'xlinkArcrole', + 'xlink:arcrole': 'xlinkArcrole', + xlinkhref: 'xlinkHref', + 'xlink:href': 'xlinkHref', + xlinkrole: 'xlinkRole', + 'xlink:role': 'xlinkRole', + xlinkshow: 'xlinkShow', + 'xlink:show': 'xlinkShow', + xlinktitle: 'xlinkTitle', + 'xlink:title': 'xlinkTitle', + xlinktype: 'xlinkType', + 'xlink:type': 'xlinkType', + xmlbase: 'xmlBase', + 'xml:base': 'xmlBase', + xmllang: 'xmlLang', + 'xml:lang': 'xmlLang', + xmlns: 'xmlns', + 'xml:space': 'xmlSpace', + xmlnsxlink: 'xmlnsXlink', + 'xmlns:xlink': 'xmlnsXlink', + xmlspace: 'xmlSpace', + y1: 'y1', + y2: 'y2', + y: 'y', + ychannelselector: 'yChannelSelector', + z: 'z', + zoomandpan: 'zoomAndPan' +}; + +var warnedProperties = {}; +var EVENT_NAME_REGEX = /^on./; +var INVALID_EVENT_NAME_REGEX = /^on[^A-Z]/; +var rARIA = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$') ; +var rARIACamel = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$') ; + +function validateProperty(tagName, name, value, eventRegistry) { + { + if (hasOwnProperty.call(warnedProperties, name) && warnedProperties[name]) { + return true; + } + + var lowerCasedName = name.toLowerCase(); + + if (lowerCasedName === 'onfocusin' || lowerCasedName === 'onfocusout') { + error('React uses onFocus and onBlur instead of onFocusIn and onFocusOut. ' + 'All React events are normalized to bubble, so onFocusIn and onFocusOut ' + 'are not needed/supported by React.'); + + warnedProperties[name] = true; + return true; + } + + { + // Actions are special because unlike events they can have other value types. + if (typeof value === 'function') { + if (tagName === 'form' && name === 'action') { + return true; + } + + if (tagName === 'input' && name === 'formAction') { + return true; + } + + if (tagName === 'button' && name === 'formAction') { + return true; + } + } + } // We can't rely on the event system being injected on the server. + + + if (eventRegistry != null) { + var registrationNameDependencies = eventRegistry.registrationNameDependencies, + possibleRegistrationNames = eventRegistry.possibleRegistrationNames; + + if (registrationNameDependencies.hasOwnProperty(name)) { + return true; + } + + var registrationName = possibleRegistrationNames.hasOwnProperty(lowerCasedName) ? possibleRegistrationNames[lowerCasedName] : null; + + if (registrationName != null) { + error('Invalid event handler property `%s`. Did you mean `%s`?', name, registrationName); + + warnedProperties[name] = true; + return true; + } + + if (EVENT_NAME_REGEX.test(name)) { + error('Unknown event handler property `%s`. It will be ignored.', name); + + warnedProperties[name] = true; + return true; + } + } else if (EVENT_NAME_REGEX.test(name)) { + // If no event plugins have been injected, we are in a server environment. + // So we can't tell if the event name is correct for sure, but we can filter + // out known bad ones like `onclick`. We can't suggest a specific replacement though. + if (INVALID_EVENT_NAME_REGEX.test(name)) { + error('Invalid event handler property `%s`. ' + 'React events use the camelCase naming convention, for example `onClick`.', name); + } + + warnedProperties[name] = true; + return true; + } // Let the ARIA attribute hook validate ARIA attributes + + + if (rARIA.test(name) || rARIACamel.test(name)) { + return true; + } + + if (lowerCasedName === 'innerhtml') { + error('Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.'); + + warnedProperties[name] = true; + return true; + } + + if (lowerCasedName === 'aria') { + error('The `aria` attribute is reserved for future use in React. ' + 'Pass individual `aria-` attributes instead.'); + + warnedProperties[name] = true; + return true; + } + + if (lowerCasedName === 'is' && value !== null && value !== undefined && typeof value !== 'string') { + error('Received a `%s` for a string attribute `is`. If this is expected, cast ' + 'the value to a string.', typeof value); + + warnedProperties[name] = true; + return true; + } + + if (typeof value === 'number' && isNaN(value)) { + error('Received NaN for the `%s` attribute. If this is expected, cast ' + 'the value to a string.', name); + + warnedProperties[name] = true; + return true; + } // Known attributes should match the casing specified in the property config. + + + if (possibleStandardNames.hasOwnProperty(lowerCasedName)) { + var standardName = possibleStandardNames[lowerCasedName]; + + if (standardName !== name) { + error('Invalid DOM property `%s`. Did you mean `%s`?', name, standardName); + + warnedProperties[name] = true; + return true; + } + } else if (name !== lowerCasedName) { + // Unknown attributes should have lowercase casing since that's how they + // will be cased anyway with server rendering. + error('React does not recognize the `%s` prop on a DOM element. If you ' + 'intentionally want it to appear in the DOM as a custom ' + 'attribute, spell it as lowercase `%s` instead. ' + 'If you accidentally passed it from a parent component, remove ' + 'it from the DOM element.', name, lowerCasedName); + + warnedProperties[name] = true; + return true; + } // Now that we've validated casing, do not validate + // data types for reserved props + + + switch (name) { + case 'dangerouslySetInnerHTML': + case 'children': + case 'style': + case 'suppressContentEditableWarning': + case 'suppressHydrationWarning': + case 'defaultValue': // Reserved + + case 'defaultChecked': + case 'innerHTML': + { + return true; + } + + case 'innerText': // Properties + + case 'textContent': + { + return true; + } + + } + + switch (typeof value) { + case 'boolean': + { + switch (name) { + case 'autoFocus': + case 'checked': + case 'multiple': + case 'muted': + case 'selected': + case 'contentEditable': + case 'spellCheck': + case 'draggable': + case 'value': + case 'autoReverse': + case 'externalResourcesRequired': + case 'focusable': + case 'preserveAlpha': + case 'allowFullScreen': + case 'async': + case 'autoPlay': + case 'controls': + case 'default': + case 'defer': + case 'disabled': + case 'disablePictureInPicture': + case 'disableRemotePlayback': + case 'formNoValidate': + case 'hidden': + case 'loop': + case 'noModule': + case 'noValidate': + case 'open': + case 'playsInline': + case 'readOnly': + case 'required': + case 'reversed': + case 'scoped': + case 'seamless': + case 'itemScope': + case 'capture': + case 'download': + { + // Boolean properties can accept boolean values + return true; + } + + default: + { + var prefix = name.toLowerCase().slice(0, 5); + + if (prefix === 'data-' || prefix === 'aria-') { + return true; + } + + if (value) { + error('Received `%s` for a non-boolean attribute `%s`.\n\n' + 'If you want to write it to the DOM, pass a string instead: ' + '%s="%s" or %s={value.toString()}.', value, name, name, value, name); + } else { + error('Received `%s` for a non-boolean attribute `%s`.\n\n' + 'If you want to write it to the DOM, pass a string instead: ' + '%s="%s" or %s={value.toString()}.\n\n' + 'If you used to conditionally omit it with %s={condition && value}, ' + 'pass %s={condition ? value : undefined} instead.', value, name, name, value, name, name, name); + } + + warnedProperties[name] = true; + return true; + } + } + } + + case 'function': + case 'symbol': + // eslint-disable-line + // Warn when a known attribute is a bad type + warnedProperties[name] = true; + return false; + + case 'string': + { + // Warn when passing the strings 'false' or 'true' into a boolean prop + if (value === 'false' || value === 'true') { + switch (name) { + case 'checked': + case 'selected': + case 'multiple': + case 'muted': + case 'allowFullScreen': + case 'async': + case 'autoPlay': + case 'controls': + case 'default': + case 'defer': + case 'disabled': + case 'disablePictureInPicture': + case 'disableRemotePlayback': + case 'formNoValidate': + case 'hidden': + case 'loop': + case 'noModule': + case 'noValidate': + case 'open': + case 'playsInline': + case 'readOnly': + case 'required': + case 'reversed': + case 'scoped': + case 'seamless': + case 'itemScope': + { + break; + } + + default: + { + return true; + } + } + + error('Received the string `%s` for the boolean attribute `%s`. ' + '%s ' + 'Did you mean %s={%s}?', value, name, value === 'false' ? 'The browser will interpret it as a truthy value.' : 'Although this works, it will not work as expected if you pass the string "false".', name, value); + + warnedProperties[name] = true; + return true; + } + } + } + + return true; + } +} + +function warnUnknownProperties(type, props, eventRegistry) { + { + var unknownProps = []; + + for (var key in props) { + var isValid = validateProperty(type, key, props[key], eventRegistry); + + if (!isValid) { + unknownProps.push(key); + } + } + + var unknownPropString = unknownProps.map(function (prop) { + return '`' + prop + '`'; + }).join(', '); + + if (unknownProps.length === 1) { + error('Invalid value for prop %s on <%s> tag. Either remove it from the element, ' + 'or pass a string or number value to keep it in the DOM. ' + 'For details, see https://reactjs.org/link/attribute-behavior ', unknownPropString, type); + } else if (unknownProps.length > 1) { + error('Invalid values for props %s on <%s> tag. Either remove them from the element, ' + 'or pass a string or number value to keep them in the DOM. ' + 'For details, see https://reactjs.org/link/attribute-behavior ', unknownPropString, type); + } + } +} + +function validateProperties(type, props, eventRegistry) { + if (isCustomElement(type) || typeof props.is === 'string') { + return; + } + + warnUnknownProperties(type, props, eventRegistry); +} + +// 'msTransform' is correct, but the other prefixes should be capitalized +var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/; +var msPattern$1 = /^-ms-/; +var hyphenPattern = /-(.)/g; // style values shouldn't contain a semicolon + +var badStyleValueWithSemicolonPattern = /;\s*$/; +var warnedStyleNames = {}; +var warnedStyleValues = {}; +var warnedForNaNValue = false; +var warnedForInfinityValue = false; + +function camelize(string) { + return string.replace(hyphenPattern, function (_, character) { + return character.toUpperCase(); + }); +} + +function warnHyphenatedStyleName(name) { + { + if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) { + return; + } + + warnedStyleNames[name] = true; + + error('Unsupported style property %s. Did you mean %s?', name, // As Andi Smith suggests + // (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix + // is converted to lowercase `ms`. + camelize(name.replace(msPattern$1, 'ms-'))); + } +} + +function warnBadVendoredStyleName(name) { + { + if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) { + return; + } + + warnedStyleNames[name] = true; + + error('Unsupported vendor-prefixed style property %s. Did you mean %s?', name, name.charAt(0).toUpperCase() + name.slice(1)); + } +} + +function warnStyleValueWithSemicolon(name, value) { + { + if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) { + return; + } + + warnedStyleValues[value] = true; + + error("Style property values shouldn't contain a semicolon. " + 'Try "%s: %s" instead.', name, value.replace(badStyleValueWithSemicolonPattern, '')); + } +} + +function warnStyleValueIsNaN(name, value) { + { + if (warnedForNaNValue) { + return; + } + + warnedForNaNValue = true; + + error('`NaN` is an invalid value for the `%s` css style property.', name); + } +} + +function warnStyleValueIsInfinity(name, value) { + { + if (warnedForInfinityValue) { + return; + } + + warnedForInfinityValue = true; + + error('`Infinity` is an invalid value for the `%s` css style property.', name); + } +} + +function warnValidStyle(name, value) { + { + if (name.indexOf('-') > -1) { + warnHyphenatedStyleName(name); + } else if (badVendoredStyleNamePattern.test(name)) { + warnBadVendoredStyleName(name); + } else if (badStyleValueWithSemicolonPattern.test(value)) { + warnStyleValueWithSemicolon(name, value); + } + + if (typeof value === 'number') { + if (isNaN(value)) { + warnStyleValueIsNaN(name); + } else if (!isFinite(value)) { + warnStyleValueIsInfinity(name); + } + } + } +} + +// code copied and modified from escape-html +var matchHtmlRegExp = /["'&<>]/; +/** + * Escapes special characters and HTML entities in a given html string. + * + * @param {string} string HTML string to escape for later insertion + * @return {string} + * @public + */ + +function escapeHtml(string) { + { + checkHtmlStringCoercion(string); + } + + var str = '' + string; + var match = matchHtmlRegExp.exec(str); + + if (!match) { + return str; + } + + var escape; + var html = ''; + var index; + var lastIndex = 0; + + for (index = match.index; index < str.length; index++) { + switch (str.charCodeAt(index)) { + case 34: + // " + escape = '"'; + break; + + case 38: + // & + escape = '&'; + break; + + case 39: + // ' + escape = '''; // modified from escape-html; used to be ''' + + break; + + case 60: + // < + escape = '<'; + break; + + case 62: + // > + escape = '>'; + break; + + default: + continue; + } + + if (lastIndex !== index) { + html += str.slice(lastIndex, index); + } + + lastIndex = index + 1; + html += escape; + } + + return lastIndex !== index ? html + str.slice(lastIndex, index) : html; +} // end code copied and modified from escape-html + +/** + * Escapes text to prevent scripting attacks. + * + * @param {*} text Text value to escape. + * @return {string} An escaped string. + */ + + +function escapeTextForBrowser(text) { + if (typeof text === 'boolean' || typeof text === 'number') { + // this shortcircuit helps perf for types that we know will never have + // special characters, especially given that this function is used often + // for numeric dom ids. + return '' + text; + } + + return escapeHtml(text); +} + +var uppercasePattern = /([A-Z])/g; +var msPattern = /^ms-/; +/** + * Hyphenates a camelcased CSS property name, for example: + * + * > hyphenateStyleName('backgroundColor') + * < "background-color" + * > hyphenateStyleName('MozTransition') + * < "-moz-transition" + * > hyphenateStyleName('msTransition') + * < "-ms-transition" + * + * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix + * is converted to `-ms-`. + */ + +function hyphenateStyleName(name) { + return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-'); +} + +// and any newline or tab are filtered out as if they're not part of the URL. +// https://url.spec.whatwg.org/#url-parsing +// Tab or newline are defined as \r\n\t: +// https://infra.spec.whatwg.org/#ascii-tab-or-newline +// A C0 control is a code point in the range \u0000 NULL to \u001F +// INFORMATION SEPARATOR ONE, inclusive: +// https://infra.spec.whatwg.org/#c0-control-or-space + +/* eslint-disable max-len */ + +var isJavaScriptProtocol = /^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i; +var didWarn = false; + +function sanitizeURL(url) { + // We should never have symbols here because they get filtered out elsewhere. + // eslint-disable-next-line react-internal/safe-string-coercion + var stringifiedURL = '' + url; + + { + if (!didWarn && isJavaScriptProtocol.test(stringifiedURL)) { + didWarn = true; + + error('A future version of React will block javascript: URLs as a security precaution. ' + 'Use event handlers instead if you can. If you need to generate unsafe HTML try ' + 'using dangerouslySetInnerHTML instead. React was passed %s.', JSON.stringify(stringifiedURL)); + } + } + + return url; +} + +var isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare + +function isArray(a) { + return isArrayImpl(a); +} + +// The build script is at scripts/rollup/generate-inline-fizz-runtime.js. +// Run `yarn generate-inline-fizz-runtime` to generate. +var clientRenderBoundary = '$RX=function(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};'; +var completeBoundary = '$RC=function(b,c,e){c=document.getElementById(c);c.parentNode.removeChild(c);var a=document.getElementById(b);if(a){b=a.previousSibling;if(e)b.data="$!",a.setAttribute("data-dgst",e);else{e=b.parentNode;a=b.nextSibling;var f=0;do{if(a&&8===a.nodeType){var d=a.data;if("/$"===d)if(0===f)break;else f--;else"$"!==d&&"$?"!==d&&"$!"!==d||f++}d=a.nextSibling;e.removeChild(a);a=d}while(a);for(;c.firstChild;)e.insertBefore(c.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};'; +var completeBoundaryWithStyles = '$RM=new Map;\n$RR=function(r,t,w){for(var u=$RC,n=$RM,p=new Map,q=document,g,b,h=q.querySelectorAll("link[data-precedence],style[data-precedence]"),v=[],k=0;b=h[k++];)"not all"===b.getAttribute("media")?v.push(b):("LINK"===b.tagName&&n.set(b.getAttribute("href"),b),p.set(b.dataset.precedence,g=b));b=0;h=[];var l,a;for(k=!0;;){if(k){var f=w[b++];if(!f){k=!1;b=0;continue}var c=!1,m=0;var d=f[m++];if(a=n.get(d)){var e=a._p;c=!0}else{a=q.createElement("link");a.href=d;a.rel="stylesheet";for(a.dataset.precedence=\nl=f[m++];e=f[m++];)a.setAttribute(e,f[m++]);e=a._p=new Promise(function(x,y){a.onload=x;a.onerror=y});n.set(d,a)}d=a.getAttribute("media");!e||"l"===e.s||d&&!matchMedia(d).matches||h.push(e);if(c)continue}else{a=v[b++];if(!a)break;l=a.getAttribute("data-precedence");a.removeAttribute("media")}c=p.get(l)||g;c===g&&(g=a);p.set(l,a);c?c.parentNode.insertBefore(a,c.nextSibling):(c=q.head,c.insertBefore(a,c.firstChild))}Promise.all(h).then(u.bind(null,r,t,""),u.bind(null,r,t,"Resource failed to load"))};'; +var completeSegment = '$RS=function(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};'; +var formReplaying = 'addEventListener("submit",function(a){if(!a.defaultPrevented){var c=a.target,d=a.submitter,e=c.action,b=d;if(d){var f=d.getAttribute("formAction");null!=f&&(e=f,b=null)}"javascript:throw new Error(\'A React form was unexpectedly submitted.\')"===e&&(a.preventDefault(),b?(a=document.createElement("input"),a.name=b.name,a.value=b.value,b.parentNode.insertBefore(a,b),b=new FormData(c),a.parentNode.removeChild(a)):b=new FormData(c),a=c.getRootNode(),(a.$$reactFormReplay=a.$$reactFormReplay||[]).push(c,\nd,b))}});'; + +function getValueDescriptorExpectingObjectForWarning(thing) { + return thing === null ? '`null`' : thing === undefined ? '`undefined`' : thing === '' ? 'an empty string' : "something with type \"" + typeof thing + "\""; +} +function getValueDescriptorExpectingEnumForWarning(thing) { + return thing === null ? '`null`' : thing === undefined ? '`undefined`' : thing === '' ? 'an empty string' : typeof thing === 'string' ? JSON.stringify(thing) : "something with type \"" + typeof thing + "\""; +} + +function compareResourcePropsForWarning(newProps, currentProps) { + { + var propDiffs = null; + var allProps = Array.from(new Set(Object.keys(currentProps).concat(Object.keys(newProps)))); + + for (var i = 0; i < allProps.length; i++) { + var propName = allProps[i]; + var newValue = newProps[propName]; + var currentValue = currentProps[propName]; + + if (newValue !== currentValue && !(newValue == null && currentValue == null)) { + if (newValue == null) { + if (propDiffs === null) { + propDiffs = { + missing: {}, + extra: {}, + different: {} + }; + } + + propDiffs.missing[propName] = currentValue; + } else if (currentValue == null) { + if (propDiffs === null) { + propDiffs = { + missing: {}, + extra: {}, + different: {} + }; + } + + propDiffs.extra[propName] = newValue; + } else { + if (propDiffs === null) { + propDiffs = { + missing: {}, + extra: {}, + different: {} + }; + } + + propDiffs.different[propName] = { + original: currentValue, + latest: newValue + }; + } + } + } + + return propDiffs; + } +} + +function describeDifferencesForStylesheets(newProps, currentProps) { + var diff = compareResourcePropsForWarning(newProps, currentProps); + if (!diff) return ''; + var description = ''; + + for (var propName in diff.missing) { + var propValue = diff.missing[propName]; + + if (propName === 'media') { + description += "\n \"" + propName + "\" missing for props, original value: " + getValueDescriptorExpectingEnumForWarning(propValue); + } + } + + for (var _propName in diff.extra) { + var _propValue = diff.extra[_propName]; + description += "\n \"" + _propName + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(_propValue) + ", missing from original props"; + } + + for (var _propName2 in diff.different) { + var latestValue = diff.different[_propName2].latest; + var originalValue = diff.different[_propName2].original; + description += "\n \"" + _propName2 + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", original value: " + getValueDescriptorExpectingEnumForWarning(originalValue); + } + + return description; +} +function describeDifferencesForStylesheetOverPreinit(newProps, currentProps) { + var diff = compareResourcePropsForWarning(newProps, currentProps); + if (!diff) return ''; + var description = ''; + + for (var propName in diff.extra) { + var propValue = diff.extra[propName]; + + if (propName === 'precedence' || propName === 'crossOrigin' || propName === 'integrity') { + description += "\n \"" + propName + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(propValue) + ", option missing"; + } else { + description += "\n \"" + propName + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(propValue) + ", option not available with ReactDOM.preinit()"; + } + } + + for (var _propName3 in diff.different) { + var latestValue = diff.different[_propName3].latest; + var originalValue = diff.different[_propName3].original; + + if (_propName3 === 'precedence' && originalValue === 'default') { + description += "\n \"" + _propName3 + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", missing from options"; + } else { + description += "\n \"" + _propName3 + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", option value: " + getValueDescriptorExpectingEnumForWarning(originalValue); + } + } + + return description; +} +function describeDifferencesForPreinitOverStylesheet(newProps, currentProps) { + var diff = compareResourcePropsForWarning(newProps, currentProps); + if (!diff) return ''; + var description = ''; + + for (var propName in diff.missing) { + var propValue = diff.missing[propName]; + + if (propName === 'precedence' && propValue !== 'default') { + description += "\n \"" + propName + "\" missing from options, prop value: " + getValueDescriptorExpectingEnumForWarning(propValue); + } + } + + for (var _propName4 in diff.extra) { + var _propValue2 = diff.extra[_propName4]; + + if (_propName4 === 'precedence' || _propName4 === 'crossOrigin' || _propName4 === 'integrity') { + description += "\n \"" + _propName4 + "\" option value: " + getValueDescriptorExpectingEnumForWarning(_propValue2) + ", missing from props"; + } + } + + for (var _propName5 in diff.different) { + var latestValue = diff.different[_propName5].latest; + var originalValue = diff.different[_propName5].original; + description += "\n \"" + _propName5 + "\" option value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", prop value: " + getValueDescriptorExpectingEnumForWarning(originalValue); + } + + return description; +} +function describeDifferencesForPreinits(newProps, currentProps) { + var diff = compareResourcePropsForWarning(newProps, currentProps); + if (!diff) return ''; + var description = ''; + + for (var propName in diff.missing) { + var propValue = diff.missing[propName]; + + if (propName === 'precedence' && propValue !== 'default') { + description += "\n \"" + propName + "\" missing from options, original option value: " + getValueDescriptorExpectingEnumForWarning(propValue); + } + } + + for (var _propName6 in diff.extra) { + var _propValue3 = diff.extra[_propName6]; + + if (_propName6 === 'precedence' && _propValue3 !== 'default' || _propName6 === 'crossOrigin' || _propName6 === 'integrity') { + description += "\n \"" + _propName6 + "\" option value: " + getValueDescriptorExpectingEnumForWarning(_propValue3) + ", missing from original options"; + } + } + + for (var _propName7 in diff.different) { + var latestValue = diff.different[_propName7].latest; + var originalValue = diff.different[_propName7].original; + description += "\n \"" + _propName7 + "\" option value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", original option value: " + getValueDescriptorExpectingEnumForWarning(originalValue); + } + + return description; +} +var preloadOptionsForComparison = ['as', 'crossOrigin', 'integrity', 'media']; +function describeDifferencesForPreloads(newProps, currentProps) { + var diff = compareResourcePropsForWarning(newProps, currentProps); + if (!diff) return ''; + var description = ''; + + for (var propName in diff.missing) { + var propValue = diff.missing[propName]; + + if (preloadOptionsForComparison.includes(propName)) { + description += "\n \"" + propName + "\" missing from options, original option value: " + getValueDescriptorExpectingEnumForWarning(propValue); + } + } + + for (var _propName8 in diff.extra) { + var _propValue4 = diff.extra[_propName8]; + + if (preloadOptionsForComparison.includes(_propName8)) { + description += "\n \"" + _propName8 + "\" option value: " + getValueDescriptorExpectingEnumForWarning(_propValue4) + ", missing from original options"; + } + } + + for (var _propName9 in diff.different) { + var latestValue = diff.different[_propName9].latest; + var originalValue = diff.different[_propName9].original; + + if (preloadOptionsForComparison.includes(_propName9)) { + description += "\n \"" + _propName9 + "\" option value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", original option value: " + getValueDescriptorExpectingEnumForWarning(originalValue); + } + } + + return description; +} +function describeDifferencesForPreloadOverImplicitPreload(newProps, currentProps) { + var diff = compareResourcePropsForWarning(newProps, currentProps); + if (!diff) return ''; + var description = ''; + + for (var propName in diff.missing) { + var propValue = diff.missing[propName]; + + if (preloadOptionsForComparison.includes(propName)) { + description += "\n \"" + propName + "\" missing from options, underlying prop value: " + getValueDescriptorExpectingEnumForWarning(propValue); + } + } + + for (var _propName10 in diff.extra) { + var _propValue5 = diff.extra[_propName10]; + + if (preloadOptionsForComparison.includes(_propName10)) { + description += "\n \"" + _propName10 + "\" option value: " + getValueDescriptorExpectingEnumForWarning(_propValue5) + ", missing from underlying props"; + } + } + + for (var _propName11 in diff.different) { + var latestValue = diff.different[_propName11].latest; + var originalValue = diff.different[_propName11].original; + + if (preloadOptionsForComparison.includes(_propName11)) { + description += "\n \"" + _propName11 + "\" option value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", underlying prop value: " + getValueDescriptorExpectingEnumForWarning(originalValue); + } + } + + return description; +} +function describeDifferencesForScripts(newProps, currentProps) { + var diff = compareResourcePropsForWarning(newProps, currentProps); + if (!diff) return ''; + var description = ''; + + for (var propName in diff.missing) { + var propValue = diff.missing[propName]; + description += "\n \"" + propName + "\" missing for props, original value: " + getValueDescriptorExpectingEnumForWarning(propValue); + } + + for (var _propName12 in diff.extra) { + var _propValue6 = diff.extra[_propName12]; + description += "\n \"" + _propName12 + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(_propValue6) + ", missing from original props"; + } + + for (var _propName13 in diff.different) { + var latestValue = diff.different[_propName13].latest; + var originalValue = diff.different[_propName13].original; + description += "\n \"" + _propName13 + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", original value: " + getValueDescriptorExpectingEnumForWarning(originalValue); + } + + return description; +} +function describeDifferencesForScriptOverPreinit(newProps, currentProps) { + var diff = compareResourcePropsForWarning(newProps, currentProps); + if (!diff) return ''; + var description = ''; + + for (var propName in diff.extra) { + var propValue = diff.extra[propName]; + + if (propName === 'crossOrigin' || propName === 'integrity') { + description += "\n \"" + propName + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(propValue) + ", option missing"; + } else { + description += "\n \"" + propName + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(propValue) + ", option not available with ReactDOM.preinit()"; + } + } + + for (var _propName14 in diff.different) { + var latestValue = diff.different[_propName14].latest; + var originalValue = diff.different[_propName14].original; + description += "\n \"" + _propName14 + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", option value: " + getValueDescriptorExpectingEnumForWarning(originalValue); + } + + return description; +} +function describeDifferencesForPreinitOverScript(newProps, currentProps) { + var diff = compareResourcePropsForWarning(newProps, currentProps); + if (!diff) return ''; + var description = ''; + + for (var propName in diff.extra) { + var propValue = diff.extra[propName]; + + if (propName === 'crossOrigin' || propName === 'integrity') { + description += "\n \"" + propName + "\" option value: " + getValueDescriptorExpectingEnumForWarning(propValue) + ", missing from props"; + } + } + + for (var _propName15 in diff.different) { + var latestValue = diff.different[_propName15].latest; + var originalValue = diff.different[_propName15].original; + description += "\n \"" + _propName15 + "\" option value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", prop value: " + getValueDescriptorExpectingEnumForWarning(originalValue); + } + + return description; +} + +// same object across all transitions. + +var sharedNotPendingObject = { + pending: false, + data: null, + method: null, + action: null +}; +var NotPending = Object.freeze(sharedNotPendingObject) ; + +var ReactDOMSharedInternals = ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; + +var ReactDOMCurrentDispatcher = ReactDOMSharedInternals.Dispatcher; +var ReactDOMServerDispatcher = { + prefetchDNS: prefetchDNS, + preconnect: preconnect, + preload: preload, + preinit: preinit +}; +function prepareHostDispatcher() { + ReactDOMCurrentDispatcher.current = ReactDOMServerDispatcher; +} // Used to distinguish these contexts from ones used in other renderers. +var ScriptStreamingFormat = 0; +var DataStreamingFormat = 1; +var NothingSent +/* */ += 0; +var SentCompleteSegmentFunction +/* */ += 1; +var SentCompleteBoundaryFunction +/* */ += 2; +var SentClientRenderFunction +/* */ += 4; +var SentStyleInsertionFunction +/* */ += 8; +var SentFormReplayingRuntime +/* */ += 16; // Per response, global state that is not contextual to the rendering subtree. + +var dataElementQuotedEnd = stringToPrecomputedChunk('">'); +var startInlineScript = stringToPrecomputedChunk(''); +var startScriptSrc = stringToPrecomputedChunk(''); +/** + * This escaping function is designed to work with bootstrapScriptContent only. + * because we know we are escaping the entire script. We can avoid for instance + * escaping html comment string sequences that are valid javascript as well because + * if there are no sebsequent '); +var completeSegmentData1 = stringToPrecomputedChunk('