1. 26 Mar, 2024 21 commits
  2. 25 Mar, 2024 19 commits
    • Vercel Release Bot's avatar
      Update Turbopack production test manifest (#63688) · 08a92e0a
      Vercel Release Bot authored
      This auto-generated PR updates the production integration test manifest
      used when testing Turbopack.
      08a92e0a
    • vercel-release-bot's avatar
      v14.2.0-canary.43 · c7dbbd9a
      vercel-release-bot authored
      c7dbbd9a
    • Arian's avatar
      chore(examples): migrate mdx from pages router (JS) to app router (TS) (#63646) · b749570d
      Arian authored
      Please if it needs further updates, Let me know!
       Happy to contribute
      
      ---------
      Co-authored-by: 's avatarSteven <steven@ceriously.com>
      b749570d
    • michaltarasiuk's avatar
      refactor: unnecessary ternary operator (#63374) · 89a5251d
      michaltarasiuk authored
      Remove unnecessary ternary operator.
      Co-authored-by: 's avatarJJ Kasper <jj@jjsweb.site>
      89a5251d
    • JJ Kasper's avatar
      Add Next.js version to process title (#63686) · 866b4181
      JJ Kasper authored
      Makes debugging a little easier by showing the Next.js version in the
      process title as well.
      
      x-ref: [slack
      thread](https://vercel.slack.com/archives/C03KAR5DCKC/p1711401562557429?thread_ts=1711400819.248569&cid=C03KAR5DCKC)
      
      Closes NEXT-2924
      866b4181
    • Tim Neutkens's avatar
      cd46c221
    • Tim Neutkens's avatar
      Enable test/integration for TURBOPACK_BUILD (#63679) · 3a50598b
      Tim Neutkens authored
      ## What?
      
      Enables Turbopack build tests for `test/integration`. Follow-up to
      #63671
      
      <!-- Thanks for opening a PR! Your contribution is much appreciated.
      To make sure your PR is handled as smoothly as possible we request that
      you follow the checklist sections below.
      Choose the right checklist for the change(s) that you're making:
      
      ## For Contributors
      
      ### Improving Documentation
      
      - Run `pnpm prettier-fix` to fix formatting issues before opening the
      PR.
      - Read the Docs Contribution Guide to ensure your contribution follows
      the docs guidelines:
      https://nextjs.org/docs/community/contribution-guide
      
      ### Adding or Updating Examples
      
      - The "examples guidelines" are followed from our contributing doc
      https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md
      - Make sure the linting passes by running `pnpm build && pnpm lint`. See
      https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md
      
      ### Fixing a bug
      
      - Related issues linked using `fixes #number`
      - Tests added. See:
      https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs
      - Errors have a helpful link attached, see
      https://github.com/vercel/next.js/blob/canary/contributing.md
      
      ### Adding a feature
      
      - Implements an existing feature request or RFC. Make sure the feature
      request has been accepted for implementation before opening a PR. (A
      discussion must be opened, see
      https://github.com/vercel/next.js/discussions/new?category=ideas)
      - Related issues/discussions are linked using `fixes #number`
      - e2e tests added
      (https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
      - Documentation added
      - Telemetry added. In case of a feature if it's used or not.
      - Errors have a helpful link attached, see
      https://github.com/vercel/next.js/blob/canary/contributing.md
      
      
      ## For Maintainers
      
      - Minimal description (aim for explaining to someone not on the team to
      understand the PR)
      - When linking to a Slack thread, you might want to share details of the
      conclusion
      - Link both the Linear (Fixes NEXT-xxx) and the GitHub issues
      - Add review comments if necessary to explain to the reviewer the logic
      behind a change
      
      ### What?
      
      ### Why?
      
      ### How?
      
      Closes NEXT-
      Fixes #
      
      -->
      
      
      Closes NEXT-2918
      3a50598b
    • Stephanie Dietz's avatar
    • JJ Kasper's avatar
      Auto map optimizePackageImports to transpilePackages for pages (#63537) · cf9e647f
      JJ Kasper authored
      This ensures `optimizePackageImports` doesn't unexpectedly fail to apply
      for `pages` as they aren't transpiled/bundled by default without either
      `transpilePackages` being used or `experimental.bundlePagesExternals`.
      This also ensures our docs correctly show this config in the pages docs
      as currently in only shows in `app`.
      
      x-ref: [slack
      thread](https://vercel.slack.com/archives/C0676QZBWKS/p1710967294942029)
      
      Closes NEXT-2884
      cf9e647f
    • Balázs Orbán's avatar
      752d6e49
    • grajen3's avatar
      perf: conditionally import Telemetry (#63574) · 043bbaa7
      grajen3 authored
      <!-- Thanks for opening a PR! Your contribution is much appreciated.
      To make sure your PR is handled as smoothly as possible we request that
      you follow the checklist sections below.
      Choose the right checklist for the change(s) that you're making:
      
      ## For Contributors
      
      ### Improving Documentation
      
      - Run `pnpm prettier-fix` to fix formatting issues before opening the
      PR.
      - Read the Docs Contribution Guide to ensure your contribution follows
      the docs guidelines:
      https://nextjs.org/docs/community/contribution-guide
      
      ### Adding or Updating Examples
      
      - The "examples guidelines" are followed from our contributing doc
      https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md
      - Make sure the linting passes by running `pnpm build && pnpm lint`. See
      https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md
      
      ### Fixing a bug
      
      - Related issues linked using `fixes #number`
      - Tests added. See:
      https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs
      - Errors have a helpful link attached, see
      https://github.com/vercel/next.js/blob/canary/contributing.md
      
      ### Adding a feature
      
      - Implements an existing feature request or RFC. Make sure the feature
      request has been accepted for implementation before opening a PR. (A
      discussion must be opened, see
      https://github.com/vercel/next.js/discussions/new?category=ideas)
      - Related issues/discussions are linked using `fixes #number`
      - e2e tests added
      (https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
      - Documentation added
      - Telemetry added. In case of a feature if it's used or not.
      - Errors have a helpful link attached, see
      https://github.com/vercel/next.js/blob/canary/contributing.md
      
      
      ## For Maintainers
      
      - Minimal description (aim for explaining to someone not on the team to
      understand the PR)
      - When linking to a Slack thread, you might want to share details of the
      conclusion
      - Link both the Linear (Fixes NEXT-xxx) and the GitHub issues
      - Add review comments if necessary to explain to the reviewer the logic
      behind a change
      -->
      
      ### What?
      
      Make Telemetry import in `packages/next/src/server/lib/router-server.ts`
      lazy and conditional
      
      ### Why?
      
      `Telemetry` in that module is only used when `opts.dev` is truthy, so in
      production mode the module is imported and used.
      
      Cost of importing that module is quite significant chunk of starting
      `standalone` server. Those are example logs I got from
      https://www.npmjs.com/package/require-times (with updates to make it
      work as that is pretty old package that wasn't updated and doesn't work
      as is) on the server:
      
      Before the change:
      ```
      total: 658ms
      646ms node_modules/next/dist/server/lib/start-server.js
        479ms node_modules/next/dist/server/lib/router-server.js
          149ms node_modules/next/dist/telemetry/storage.js
            87ms node_modules/next/dist/compiled/@edge-runtime/ponyfill/index.js
              86ms node_modules/next/dist/compiled/@edge-runtime/primitives/index.js
                1ms node_modules/next/dist/compiled/@edge-runtime/primitives/load.js
                  23ms node_modules/next/dist/compiled/@edge-runtime/primitives/fetch.js.text.js
                  12ms node_modules/next/dist/compiled/@edge-runtime/primitives/url.js.text.js
                  1ms node_modules/next/dist/compiled/@edge-runtime/primitives/events.js.text.js
                  1ms node_modules/next/dist/compiled/@edge-runtime/primitives/structured-clone.js.text.js
            41ms node_modules/next/dist/compiled/conf/index.js
              12ms node_modules/next/dist/compiled/semver/index.js
            12ms node_modules/next/dist/telemetry/project-id.js
            3ms node_modules/next/dist/telemetry/post-payload.js
            1ms node_modules/next/dist/compiled/is-docker/index.js
            1ms node_modules/next/dist/telemetry/anonymous-meta.js
              1ms node_modules/next/dist/compiled/is-wsl/index.js
          100ms node_modules/next/dist/server/base-server.js
            17ms node_modules/next/dist/server/future/route-matcher-providers/app-page-route-matcher-provider.js
              7ms node_modules/next/dist/lib/is-app-page-route.js
              7ms node_modules/next/dist/server/future/normalizers/built/app/index.js
                3ms node_modules/next/dist/server/future/normalizers/built/app/app-page-normalizer.js
                  2ms node_modules/next/dist/server/future/normalizers/absolute-filename-normalizer.js
                    1ms node_modules/next/dist/shared/lib/page-path/absolute-path-to-page.js
                  1ms node_modules/next/dist/lib/page-types.js
                2ms node_modules/next/dist/server/future/normalizers/built/app/app-bundle-path-normalizer.js
                  1ms node_modules/next/dist/shared/lib/page-path/normalize-page-path.js
                1ms node_modules/next/dist/server/future/normalizers/built/app/app-filename-normalizer.js
                1ms node_modules/next/dist/server/future/normalizers/built/app/app-pathname-normalizer.js
              1ms node_modules/next/dist/server/future/route-matcher-providers/manifest-route-matcher-provider.js
            15ms node_modules/next/dist/server/app-render/strip-flight-headers.js
            13ms node_modules/next/dist/server/future/route-modules/helpers/response-handlers.js
              13ms node_modules/next/dist/server/web/spec-extension/adapters/request-cookies.js
            8ms node_modules/next/dist/server/future/normalizers/locale-route-normalizer.js
            4ms node_modules/next/dist/server/api-utils/index.js
              2ms node_modules/next/dist/server/web/spec-extension/adapters/headers.js
                1ms node_modules/next/dist/server/web/spec-extension/adapters/reflect.js
            4ms node_modules/next/dist/server/render-result.js
              3ms node_modules/next/dist/server/stream-utils/node-web-streams-helper.js
                1ms node_modules/next/dist/lib/scheduler.js
            4ms node_modules/next/dist/server/future/route-matcher-providers/pages-api-route-matcher-provider.js
              3ms node_modules/next/dist/server/future/normalizers/built/pages/index.js
                1ms node_modules/next/dist/server/future/normalizers/built/pages/pages-filename-normalizer.js
                1ms node_modules/next/dist/server/future/normalizers/built/pages/pages-pathname-normalizer.js
              1ms node_modules/next/dist/lib/is-api-route.js
            2ms node_modules/next/dist/server/future/route-matcher-managers/default-route-matcher-manager.js
              1ms node_modules/next/dist/server/future/route-matchers/locale-route-matcher.js
            2ms node_modules/next/dist/server/future/route-matcher-providers/app-route-route-matcher-provider.js
            2ms node_modules/next/dist/server/lib/match-next-data-pathname.js
            2ms node_modules/next/dist/server/future/route-modules/checks.js
            1ms node_modules/next/dist/lib/is-edge-runtime.js
            1ms node_modules/next/dist/shared/lib/runtime-config.external.js
            1ms node_modules/next/dist/server/lib/revalidate.js
            1ms node_modules/next/dist/shared/lib/router/utils/escape-path-delimiters.js
            1ms node_modules/next/dist/server/future/route-matcher-providers/pages-route-matcher-provider.js
              1ms node_modules/next/dist/server/future/route-matchers/pages-route-matcher.js
            1ms node_modules/next/dist/server/send-response.js
            1ms node_modules/next/dist/shared/lib/router/utils/get-route-from-asset-path.js
            1ms node_modules/next/dist/server/lib/server-action-request-meta.js
          83ms node_modules/next/dist/server/lib/router-utils/filesystem.js
            22ms node_modules/next/dist/lib/load-custom-routes.js
              4ms node_modules/next/dist/lib/try-to-parse-path.js
                2ms node_modules/next/dist/lib/is-error.js
                  1ms node_modules/next/dist/shared/lib/is-plain-object.js
                1ms node_modules/next/dist/compiled/path-to-regexp/index.js
              2ms node_modules/next/dist/lib/redirect-status.js
                1ms node_modules/next/dist/client/components/redirect-status-code.js
              1ms node_modules/next/dist/shared/lib/escape-regexp.js
            16ms node_modules/next/dist/server/future/normalizers/request/rsc.js
            13ms node_modules/next/dist/shared/lib/router/utils/index.js
              10ms node_modules/next/dist/shared/lib/router/utils/is-dynamic.js
                3ms node_modules/next/dist/server/future/helpers/interception-routes.js
                  1ms node_modules/next/dist/shared/lib/router/utils/app-paths.js
                    1ms node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.js
              1ms node_modules/next/dist/shared/lib/router/utils/sorted-routes.js
            9ms node_modules/next/dist/shared/lib/page-path/normalize-path-sep.js
            4ms node_modules/next/dist/shared/lib/router/utils/middleware-route-matcher.js
              4ms node_modules/next/dist/shared/lib/router/utils/prepare-destination.js
                1ms node_modules/next/dist/client/components/app-router-headers.js
                1ms node_modules/next/dist/server/api-utils/get-cookie-parser.js
            4ms node_modules/next/dist/lib/metadata/get-metadata-route.js
              2ms node_modules/next/dist/server/server-utils.js
              1ms node_modules/next/dist/lib/metadata/is-metadata-route.js
            1ms node_modules/next/dist/compiled/lru-cache/index.js
            1ms node_modules/next/dist/lib/file-exists.js
            1ms node_modules/next/dist/lib/recursive-readdir.js
            1ms node_modules/next/dist/shared/lib/router/utils/path-match.js
            1ms node_modules/next/dist/shared/lib/router/utils/route-regex.js
            1ms node_modules/next/dist/shared/lib/router/utils/route-matcher.js
            1ms node_modules/next/dist/server/future/normalizers/request/postponed.js
              1ms node_modules/next/dist/shared/lib/page-path/denormalize-page-path.js
            1ms node_modules/next/dist/server/future/normalizers/request/prefetch-rsc.js
          35ms node_modules/next/dist/server/lib/router-utils/resolve-routes.js
            11ms node_modules/next/dist/server/body-streams.js
            1ms node_modules/next/dist/server/lib/server-ipc/utils.js
            1ms node_modules/next/dist/shared/lib/router/utils/relativize-url.js
            1ms node_modules/next/dist/server/future/normalizers/request/next-data.js
            1ms node_modules/next/dist/server/lib/mock-request.js
          22ms node_modules/next/dist/server/serve-static.js
            20ms node_modules/next/dist/compiled/send/index.js
              1ms node_modules/next/dist/compiled/fresh/index.js
          22ms node_modules/next/dist/server/pipe-readable.js
            20ms node_modules/next/dist/server/web/spec-extension/adapters/next-request.js
              18ms node_modules/next/dist/server/web/spec-extension/request.js
                15ms node_modules/next/dist/server/web/next-url.js
                  12ms node_modules/next/dist/shared/lib/router/utils/format-next-pathname-info.js
                    1ms node_modules/next/dist/shared/lib/router/utils/add-path-prefix.js
                  1ms node_modules/next/dist/shared/lib/i18n/detect-domain-locale.js
                2ms node_modules/next/dist/server/web/spec-extension/cookies.js
                  1ms node_modules/next/dist/compiled/@edge-runtime/cookies/index.js
            1ms node_modules/next/dist/lib/detached-promise.js
          19ms node_modules/next/dist/compiled/compression/index.js
          16ms node_modules/next/dist/server/lib/dev-bundler-service.js
          4ms node_modules/next/dist/trace/index.js
            3ms node_modules/next/dist/trace/trace.js
              2ms node_modules/next/dist/trace/report/index.js
                1ms node_modules/next/dist/trace/report/to-telemetry.js
                1ms node_modules/next/dist/trace/report/to-json.js
          2ms node_modules/next/dist/server/lib/router-utils/proxy-request.js
            1ms node_modules/next/dist/server/server-route-utils.js
          1ms node_modules/next/dist/server/node-environment.js
          1ms node_modules/next/dist/shared/lib/utils.js
          1ms node_modules/next/dist/lib/find-pages-dir.js
          1ms node_modules/next/dist/server/lib/router-utils/is-postpone.js
        140ms node_modules/next/dist/server/next.js
          84ms node_modules/next/dist/server/config.js
            20ms node_modules/next/dist/shared/lib/match-remote-pattern.js
              18ms node_modules/next/dist/compiled/micromatch/index.js
            17ms node_modules/next/dist/compiled/zod/index.js
            14ms node_modules/next/dist/shared/lib/constants.js
              8ms node_modules/@swc/helpers/cjs/_interop_require_default.cjs
            3ms node_modules/next/dist/compiled/find-up/index.js
              1ms node_modules/next/dist/compiled/p-limit/index.js
            3ms node_modules/next/dist/telemetry/ci-info.js
              1ms node_modules/next/dist/compiled/ci-info/index.js
            2ms node_modules/next/dist/server/config-shared.js
              1ms node_modules/next/dist/shared/lib/image-config.js
            2ms node_modules/@next/env/dist/index.js
            2ms node_modules/next/dist/telemetry/flush-and-exit.js
            2ms node_modules/next/dist/lib/find-root.js
            1ms node_modules/next/dist/server/setup-http-agent-env.js
            1ms node_modules/next/dist/shared/lib/router/utils/path-has-prefix.js
          21ms node_modules/next/dist/server/lib/trace/tracer.js
            5ms node_modules/next/dist/compiled/@opentelemetry/api/index.js
            1ms node_modules/next/dist/server/lib/trace/constants.js
          13ms node_modules/next/dist/shared/lib/router/utils/format-url.js
          12ms node_modules/next/dist/build/output/log.js
            9ms node_modules/next/dist/lib/picocolors.js
          3ms node_modules/next/dist/server/require-hook.js
          1ms node_modules/next/dist/server/node-polyfill-crypto.js
          1ms node_modules/next/dist/lib/constants.js
          1ms node_modules/next/dist/server/lib/utils.js
        14ms node_modules/next/dist/compiled/watchpack/watchpack.js
        3ms node_modules/next/dist/compiled/debug/index.js
        1ms node_modules/next/dist/server/lib/format-hostname.js
        1ms node_modules/next/dist/server/lib/app-info-log.js
        1ms node_modules/next/dist/lib/turbopack-warning.js
      ```
      
      And after the change:
      ```
      total: 516ms
      499ms node_modules/next/dist/server/lib/start-server.js
        303ms node_modules/next/dist/server/lib/router-server.js
          103ms node_modules/next/dist/server/base-server.js
            42ms node_modules/next/dist/server/future/route-matcher-providers/app-page-route-matcher-provider.js
              38ms node_modules/next/dist/server/future/normalizers/built/app/index.js
                20ms node_modules/next/dist/server/future/normalizers/built/app/app-page-normalizer.js
                  18ms node_modules/next/dist/server/future/normalizers/absolute-filename-normalizer.js
                    17ms node_modules/next/dist/shared/lib/page-path/absolute-path-to-page.js
                  1ms node_modules/next/dist/lib/page-types.js
                17ms node_modules/next/dist/server/future/normalizers/built/app/app-bundle-path-normalizer.js
                  16ms node_modules/next/dist/shared/lib/page-path/normalize-page-path.js
                1ms node_modules/next/dist/server/future/normalizers/built/app/app-pathname-normalizer.js
              1ms node_modules/next/dist/lib/is-app-page-route.js
              1ms node_modules/next/dist/server/future/route-kind.js
              1ms node_modules/next/dist/server/future/route-matcher-providers/manifest-route-matcher-provider.js
            10ms node_modules/next/dist/server/send-response.js
            8ms node_modules/next/dist/server/future/normalizers/locale-route-normalizer.js
            4ms node_modules/next/dist/server/api-utils/index.js
              2ms node_modules/next/dist/server/web/spec-extension/adapters/headers.js
                1ms node_modules/next/dist/server/web/spec-extension/adapters/reflect.js
            3ms node_modules/next/dist/server/render-result.js
              2ms node_modules/next/dist/server/stream-utils/node-web-streams-helper.js
            3ms node_modules/next/dist/server/future/route-matcher-providers/pages-api-route-matcher-provider.js
              2ms node_modules/next/dist/server/future/normalizers/built/pages/index.js
                1ms node_modules/next/dist/server/future/normalizers/built/pages/pages-bundle-path-normalizer.js
              1ms node_modules/next/dist/server/future/route-matchers/pages-api-route-matcher.js
            2ms node_modules/next/dist/server/future/route-matcher-providers/app-route-route-matcher-provider.js
              1ms node_modules/next/dist/lib/is-app-route-route.js
              1ms node_modules/next/dist/server/future/route-matchers/app-route-route-matcher.js
            2ms node_modules/next/dist/server/future/route-modules/helpers/response-handlers.js
              1ms node_modules/next/dist/server/web/spec-extension/adapters/request-cookies.js
            2ms node_modules/next/dist/server/lib/match-next-data-pathname.js
            1ms node_modules/next/dist/lib/is-edge-runtime.js
            1ms node_modules/next/dist/shared/lib/runtime-config.external.js
            1ms node_modules/next/dist/server/lib/revalidate.js
            1ms node_modules/next/dist/shared/lib/router/utils/escape-path-delimiters.js
            1ms node_modules/next/dist/server/future/route-matcher-managers/default-route-matcher-manager.js
            1ms node_modules/next/dist/server/future/route-matcher-providers/pages-route-matcher-provider.js
            1ms node_modules/next/dist/shared/lib/router/utils/get-route-from-asset-path.js
            1ms node_modules/next/dist/server/app-render/strip-flight-headers.js
            1ms node_modules/next/dist/server/future/route-modules/checks.js
            1ms node_modules/next/dist/server/lib/server-action-request-meta.js
          91ms node_modules/next/dist/server/lib/router-utils/filesystem.js
            21ms node_modules/next/dist/lib/load-custom-routes.js
              16ms node_modules/next/dist/lib/try-to-parse-path.js
                13ms node_modules/next/dist/lib/is-error.js
                  1ms node_modules/next/dist/shared/lib/is-plain-object.js
                2ms node_modules/next/dist/compiled/path-to-regexp/index.js
              3ms node_modules/next/dist/lib/redirect-status.js
                1ms node_modules/next/dist/client/components/redirect-status-code.js
            16ms node_modules/next/dist/server/future/normalizers/request/prefetch-rsc.js
            12ms node_modules/next/dist/lib/metadata/get-metadata-route.js
              10ms node_modules/next/dist/server/server-utils.js
              1ms node_modules/next/dist/shared/lib/isomorphic/path.js
            9ms node_modules/next/dist/shared/lib/router/utils/route-regex.js
              1ms node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.js
            6ms node_modules/next/dist/shared/lib/router/utils/index.js
              3ms node_modules/next/dist/shared/lib/router/utils/is-dynamic.js
                2ms node_modules/next/dist/server/future/helpers/interception-routes.js
                  1ms node_modules/next/dist/shared/lib/router/utils/app-paths.js
                    1ms node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.js
              1ms node_modules/next/dist/shared/lib/router/utils/sorted-routes.js
            5ms node_modules/next/dist/shared/lib/router/utils/middleware-route-matcher.js
              5ms node_modules/next/dist/shared/lib/router/utils/prepare-destination.js
                1ms node_modules/next/dist/shared/lib/router/utils/parse-url.js
                1ms node_modules/next/dist/client/components/app-router-headers.js
                1ms node_modules/next/dist/server/api-utils/get-cookie-parser.js
            2ms node_modules/next/dist/compiled/lru-cache/index.js
            2ms node_modules/next/dist/server/future/normalizers/request/postponed.js
              1ms node_modules/next/dist/shared/lib/page-path/denormalize-page-path.js
            1ms node_modules/next/dist/lib/file-exists.js
            1ms node_modules/next/dist/lib/recursive-readdir.js
            1ms node_modules/next/dist/shared/lib/router/utils/path-match.js
            1ms node_modules/next/dist/server/future/normalizers/request/rsc.js
          24ms node_modules/next/dist/server/pipe-readable.js
            22ms node_modules/next/dist/server/web/spec-extension/adapters/next-request.js
              20ms node_modules/next/dist/server/web/spec-extension/request.js
                17ms node_modules/next/dist/server/web/next-url.js
                  13ms node_modules/next/dist/shared/lib/i18n/detect-domain-locale.js
                  2ms node_modules/next/dist/shared/lib/router/utils/format-next-pathname-info.js
                    1ms node_modules/next/dist/shared/lib/router/utils/add-path-suffix.js
                  1ms node_modules/next/dist/shared/lib/router/utils/get-next-pathname-info.js
                3ms node_modules/next/dist/server/web/spec-extension/cookies.js
                  1ms node_modules/next/dist/compiled/@edge-runtime/cookies/index.js
              1ms node_modules/next/dist/server/web/utils.js
            1ms node_modules/next/dist/lib/detached-promise.js
          22ms node_modules/next/dist/server/serve-static.js
            21ms node_modules/next/dist/compiled/send/index.js
          18ms node_modules/next/dist/server/lib/router-utils/resolve-routes.js
            11ms node_modules/next/dist/server/body-streams.js
            1ms node_modules/next/dist/server/lib/server-ipc/utils.js
            1ms node_modules/next/dist/shared/lib/router/utils/relativize-url.js
            1ms node_modules/next/dist/server/future/normalizers/request/next-data.js
            1ms node_modules/next/dist/server/lib/mock-request.js
          18ms node_modules/next/dist/compiled/compression/index.js
            1ms node_modules/next/dist/compiled/bytes/index.js
          10ms node_modules/next/dist/server/lib/dev-bundler-service.js
          4ms node_modules/next/dist/trace/index.js
            2ms node_modules/next/dist/trace/trace.js
              2ms node_modules/next/dist/trace/report/index.js
                1ms node_modules/next/dist/trace/report/to-json.js
          3ms node_modules/next/dist/server/lib/router-utils/proxy-request.js
            2ms node_modules/next/dist/server/server-route-utils.js
              1ms node_modules/next/dist/server/request-meta.js
          2ms node_modules/next/dist/shared/lib/utils.js
          1ms node_modules/next/dist/server/node-environment.js
          1ms node_modules/next/dist/lib/find-pages-dir.js
          1ms node_modules/next/dist/server/lib/router-utils/is-postpone.js
        157ms node_modules/next/dist/server/next.js
          99ms node_modules/next/dist/server/config.js
            24ms node_modules/next/dist/shared/lib/match-remote-pattern.js
              5ms node_modules/next/dist/compiled/micromatch/index.js
            17ms node_modules/next/dist/compiled/zod/index.js
            15ms node_modules/next/dist/shared/lib/constants.js
              1ms node_modules/@swc/helpers/cjs/_interop_require_default.cjs
              1ms node_modules/next/dist/shared/lib/modern-browserslist-target.js
            4ms node_modules/next/dist/compiled/find-up/index.js
              1ms node_modules/next/dist/compiled/p-limit/index.js
            4ms node_modules/next/dist/telemetry/ci-info.js
              2ms node_modules/next/dist/compiled/ci-info/index.js
            3ms node_modules/next/dist/server/config-shared.js
              1ms node_modules/next/dist/shared/lib/image-config.js
            2ms node_modules/next/dist/telemetry/flush-and-exit.js
            2ms node_modules/next/dist/lib/find-root.js
            2ms node_modules/next/dist/server/setup-http-agent-env.js
            2ms node_modules/next/dist/shared/lib/router/utils/path-has-prefix.js
              1ms node_modules/next/dist/shared/lib/router/utils/parse-path.js
            1ms node_modules/@next/env/dist/index.js
          17ms node_modules/next/dist/server/lib/trace/tracer.js
            14ms node_modules/next/dist/compiled/@opentelemetry/api/index.js
            1ms node_modules/next/dist/server/lib/trace/constants.js
          13ms node_modules/next/dist/lib/constants.js
          5ms node_modules/next/dist/shared/lib/router/utils/format-url.js
            1ms node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs
            1ms node_modules/next/dist/shared/lib/router/utils/querystring.js
          4ms node_modules/next/dist/build/output/log.js
            1ms node_modules/next/dist/lib/picocolors.js
          3ms node_modules/next/dist/server/require-hook.js
          1ms node_modules/next/dist/server/lib/utils.js
        7ms node_modules/next/dist/compiled/watchpack/watchpack.js
        3ms node_modules/next/dist/compiled/debug/index.js
        2ms node_modules/next/dist/server/lib/format-hostname.js
          1ms node_modules/next/dist/server/lib/is-ipv6.js
        1ms node_modules/next/dist/server/lib/app-info-log.js
        1ms node_modules/next/dist/lib/turbopack-warning.js
      ```
      
      I would not pay much attention to absolute numbers as there will be
      variance and those are single runs - but from first "require time dump"
      you can estimate importing Telemetry (that might be unused) is costing
      149ms / 658ms ~= 22.5% of entire time spent on importing modules -
      that's pretty significant
      
      ### How?
      
      By moving static import/require from top level to conditional code path
      that actually uses it. This code path already have some modules
      lazy/conditionally loaded. `packages/next/src/telemetry/storage.ts`
      doesn't seem to have import side effects so at least on my first glance
      it doesn't seem like moving import should cause problems?
      Co-authored-by: 's avatarJJ Kasper <jj@jjsweb.site>
      043bbaa7
    • Tim Neutkens's avatar
      Skip test/integration development tests during Turbopack build test run (#63671) · 69f5fb26
      Tim Neutkens authored
      ## What?
      
      Follow-up to #63665.
      
      Ensures development tests are skipped during the production build run
      for Turbopack (i.e. used to create the turbopack-build-tests-manifest).
      
      Adds `pnpm test-dev-turbo` and `pnpm test-start-turbo` (and their
      `testonly` equivalent) for running tests.
      
      <!-- Thanks for opening a PR! Your contribution is much appreciated.
      To make sure your PR is handled as smoothly as possible we request that
      you follow the checklist sections below.
      Choose the right checklist for the change(s) that you're making:
      
      ## For Contributors
      
      ### Improving Documentation
      
      - Run `pnpm prettier-fix` to fix formatting issues before opening the
      PR.
      - Read the Docs Contribution Guide to ensure your contribution follows
      the docs guidelines:
      https://nextjs.org/docs/community/contribution-guide
      
      ### Adding or Updating Examples
      
      - The "examples guidelines" are followed from our contributing doc
      https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md
      - Make sure the linting passes by running `pnpm build && pnpm lint`. See
      https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md
      
      ### Fixing a bug
      
      - Related issues linked using `fixes #number`
      - Tests added. See:
      https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs
      - Errors have a helpful link attached, see
      https://github.com/vercel/next.js/blob/canary/contributing.md
      
      ### Adding a feature
      
      - Implements an existing feature request or RFC. Make sure the feature
      request has been accepted for implementation before opening a PR. (A
      discussion must be opened, see
      https://github.com/vercel/next.js/discussions/new?category=ideas)
      - Related issues/discussions are linked using `fixes #number`
      - e2e tests added
      (https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
      - Documentation added
      - Telemetry added. In case of a feature if it's used or not.
      - Errors have a helpful link attached, see
      https://github.com/vercel/next.js/blob/canary/contributing.md
      
      
      ## For Maintainers
      
      - Minimal description (aim for explaining to someone not on the team to
      understand the PR)
      - When linking to a Slack thread, you might want to share details of the
      conclusion
      - Link both the Linear (Fixes NEXT-xxx) and the GitHub issues
      - Add review comments if necessary to explain to the reviewer the logic
      behind a change
      
      ### What?
      
      ### Why?
      
      ### How?
      
      Closes NEXT-
      Fixes #
      
      -->
      
      
      Closes NEXT-2915
      69f5fb26
    • Shu Ding's avatar
      Improve TypeScript plugin for server boundary (#63667) · 9677c87e
      Shu Ding authored
      For problems like #62821, #62860 and other, the only way to improve the
      DX would be relying on the type checker to ensure that Server Actions
      are async functions. Inlined definitions will always be checked by SWC
      (as they're always syntactically defined as functions already), but
      export values are sometimes determined at the runtime.
      
      Also added `react-dom` related methods to the disallow list for the
      server layer.
      
      Examples:
      
      
      https://github.com/vercel/next.js/assets/3676859/ac0b12fa-829b-42a4-a4c6-e1c321b68a8e
      
      
      https://github.com/vercel/next.js/assets/3676859/2e2e3ab8-6743-4281-9783-30bd2a82fb5c
      
      
      https://github.com/vercel/next.js/assets/3676859/b61a4c0a-1ad4-4ad6-9d50-311ef3450e13
      
      
      
      Closes NEXT-2913
      9677c87e
    • Eng Zer Jun's avatar
      Remove obsolete `block-all-mixed-content` CSP directive (#63595) · 3ba3eeb2
      Eng Zer Jun authored
      The `block-all-mixed-content` CSP directive has been deprecated and it
      is not recommended to use it anymore.
      
      Furthermore, the `upgrade-insecure-requests` directive is evaluated
      before `block-all-mixed-content`, if the former is set, the latter does
      nothing.
      
      Reference:
      https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/block-all-mixed-content
      Reference: https://www.w3.org/TR/mixed-content/#strict-checkingCo-authored-by: 's avatarJJ Kasper <jj@jjsweb.site>
      3ba3eeb2
    • OJ Kwon's avatar
      fix(dev-overlay): align codeframe to formatIssue (#63624) · 35f93e3b
      OJ Kwon authored
      Closes PACK-2825
      35f93e3b
    • vercel-release-bot's avatar
      v14.2.0-canary.42 · c2e3d9ac
      vercel-release-bot authored
      c2e3d9ac
    • Janka Uryga's avatar
      76b0a119
    • Yamagishi Kazutoshi's avatar
      Fix documentation of supported JS Features (#63640) · 9244100e
      Yamagishi Kazutoshi authored
      ### What?
      
      Class Fields and Static Properties are already included in ES2022, not
      in the proposal.
      Co-authored-by: 's avatarSteven <steven@ceriously.com>
      9244100e
    • Tim Neutkens's avatar
      Rename process.env.TURBOPACK -> process.env.TURBOPACK_DEV in test skips (#63665) · 1e710ab7
      Tim Neutkens authored
      ## What?
      
      Follow-up to #63653.
      
      <!-- Thanks for opening a PR! Your contribution is much appreciated.
      To make sure your PR is handled as smoothly as possible we request that
      you follow the checklist sections below.
      Choose the right checklist for the change(s) that you're making:
      
      ## For Contributors
      
      ### Improving Documentation
      
      - Run `pnpm prettier-fix` to fix formatting issues before opening the
      PR.
      - Read the Docs Contribution Guide to ensure your contribution follows
      the docs guidelines:
      https://nextjs.org/docs/community/contribution-guide
      
      ### Adding or Updating Examples
      
      - The "examples guidelines" are followed from our contributing doc
      https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md
      - Make sure the linting passes by running `pnpm build && pnpm lint`. See
      https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md
      
      ### Fixing a bug
      
      - Related issues linked using `fixes #number`
      - Tests added. See:
      https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs
      - Errors have a helpful link attached, see
      https://github.com/vercel/next.js/blob/canary/contributing.md
      
      ### Adding a feature
      
      - Implements an existing feature request or RFC. Make sure the feature
      request has been accepted for implementation before opening a PR. (A
      discussion must be opened, see
      https://github.com/vercel/next.js/discussions/new?category=ideas)
      - Related issues/discussions are linked using `fixes #number`
      - e2e tests added
      (https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
      - Documentation added
      - Telemetry added. In case of a feature if it's used or not.
      - Errors have a helpful link attached, see
      https://github.com/vercel/next.js/blob/canary/contributing.md
      
      
      ## For Maintainers
      
      - Minimal description (aim for explaining to someone not on the team to
      understand the PR)
      - When linking to a Slack thread, you might want to share details of the
      conclusion
      - Link both the Linear (Fixes NEXT-xxx) and the GitHub issues
      - Add review comments if necessary to explain to the reviewer the logic
      behind a change
      
      ### What?
      
      ### Why?
      
      ### How?
      
      Closes NEXT-
      Fixes #
      
      -->
      
      
      Closes NEXT-2911
      1e710ab7