Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: vercel/next.js
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v13.4.0
Choose a base ref
...
head repository: vercel/next.js
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v13.4.1
Choose a head ref
  • 15 commits
  • 158 files changed
  • 8 contributors

Commits on May 4, 2023

  1. Copy the full SHA
    12a6827 View commit details
  2. Fix serving images referenced from app directory (#49236)

    ### What?
    
    Fixes serving images that are referenced by JS files inside the `/app`
    directory.
    
    ### Why?
    
    ### How?
    
    The `NextImageContentSource` attempts to fetch the image out of it's
    inner content source, and before we were only providing it with the
    `/public` and `/pages` directory's respective sources.
    
    Re: https://vercel.slack.com/archives/C046HAU4H7F/p1683220799917649
    jridgewell authored May 4, 2023
    Copy the full SHA
    d24f506 View commit details
  3. Update dev logs to include request timings (#49191)

    This updates our dev logs to include request timings and also includes
    fetch timings in app directory to including info on whether the cache
    was leveraged or not allowing easier debugging of contributing factors
    to render times. In the future we can expand to include middleware
    timings separate as well to single that out along with timings for
    `getStaticProps` potentially as well.
    
    
    <details>
    
    <summary>Screenshot</summary>
    
    ![CleanShot 2023-05-04 at 00 13
    19@2x](https://user-images.githubusercontent.com/22380829/236135624-da1d873b-5abf-42d0-9708-8e20d1c56cef.png)
    
    </details>
    
    <details>
    
    <summary>Screenshot</summary>
    
    ![CleanShot 2023-05-04 at 00 13
    32@2x](https://user-images.githubusercontent.com/22380829/236135642-bc974b82-13e0-47f0-8be5-581d92077fc1.png)
    
    </details>
    
    <details>
    
    <summary>Screenshot</summary>
    
    ![CleanShot 2023-05-04 at 00 13
    47@2x](https://user-images.githubusercontent.com/22380829/236135664-5b2975ce-fa78-40d5-b320-d42d35b17541.png)
    
    </details>
    
    x-ref: [slack
    thread](https://vercel.slack.com/archives/C042LHPJ1NX/p1681418590738249)
    ijjk authored May 4, 2023
    Copy the full SHA
    30f84e3 View commit details
  4. v13.4.1-canary.0

    vercel-release-bot committed May 4, 2023
    Copy the full SHA
    acd2280 View commit details
  5. Support incrementalCacheHandlerPath for standalone output (#48694)

    <!-- 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 or adding/fixing 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?
    This is a follow-up to #46290 by
    @ijjk
    
    Currently, nextjs build resolves provided incrementalCacheHandlerPath
    over destDir (.next by default). And for standalone builds the custom
    cache can't be resolved and leads to runtime error.
    
    ### Why?
    This fix basically introduces support of incrementalCacheHandlerPath for
    the standalone build.
    
    ### How?
    incrementalCacheHandlerPath is now always resolved relatively to
    distDir, which should work for both default and standalone builds.
    
    Also, for convenience (and better testability)
    incrementalCacheHandlerPath can now be provided as a relative path to
    the project directory.
    ikryvorotenko authored May 4, 2023
    Copy the full SHA
    7f6e8db View commit details
  6. Apply basePath for metadata image (#49226)

    Fixes #49162
    
    When user configures the `basePath` in `next.config.js`, we need to
    apply it to metadata image path resolving
    fix NEXT-1087
    huozhi authored May 4, 2023
    1
    Copy the full SHA
    7fa4946 View commit details
  7. Fix Server Actions defined in both layers in one entry (#49248)

    This fixes an existing bug where there're Server Actions defined in both the "server" and "client" layers (client imported Actions). They have the same worker name as they exist in one route entry, but they're built into different modules and compiled differently (server and client layers). Because of that, each route entry can have 2 "action module entries".
    
    This PR adds the logic to differentiate that via a "layer" field so they don't conflict.
    shuding authored May 4, 2023
    Copy the full SHA
    bf49f62 View commit details
  8. Update tags handling during server action redirect (#49227)

    Updates the tag handling during a server action direct to pass through
    the revalidated tags for immediate revalidation as discussed.
    
    x-ref: [slack
    thread](https://vercel.slack.com/archives/C042LHPJ1NX/p1683218335368759)
    ijjk authored May 4, 2023
    Copy the full SHA
    0bf6c27 View commit details
  9. Copy the full SHA
    d37043f View commit details
  10. v13.4.1-canary.1

    vercel-release-bot committed May 4, 2023
    1
    Copy the full SHA
    fd319d3 View commit details

Commits on May 5, 2023

  1. Add experimental verbose logging flag (#49250)

    Only shows fetch request logs by default and allows opting into verbose
    request timings via experimental config.
    
    x-ref: [slack
    thread](https://vercel.slack.com/archives/C03KAR5DCKC/p1683236293282549)
    ijjk authored May 5, 2023
    Copy the full SHA
    c881224 View commit details
  2. Remove experimental config from create-next-app (#49241)

    ## What?
    
    Removes `experimental.appDir` this was leftover from when I flipped the
    switch.
    
    Kept the config file as in the future we might add future flags and
    such. It also helps that it has the types comment included so you always
    get types.
    
    <!-- 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 or adding/fixing 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 #
    
    -->
    
    ---------
    
    Co-authored-by: JJ Kasper <jj@jjsweb.site>
    timneutkens and ijjk authored May 5, 2023
    Copy the full SHA
    25a9547 View commit details
  3. Copy the full SHA
    618dc2e View commit details
  4. v13.4.1-canary.2

    vercel-release-bot committed May 5, 2023
    1
    Copy the full SHA
    2c37ec0 View commit details
  5. v13.4.1

    vercel-release-bot committed May 5, 2023
    1
    Copy the full SHA
    92ff2dd View commit details
Showing with 678 additions and 545 deletions.
  1. +1 −1 lerna.json
  2. +2 −2 package.json
  3. +1 −1 packages/create-next-app/package.json
  4. +1 −5 packages/create-next-app/templates/app-tw/js/next.config.js
  5. +1 −5 packages/create-next-app/templates/app-tw/ts/next.config.js
  6. +1 −5 packages/create-next-app/templates/app/js/next.config.js
  7. +1 −5 packages/create-next-app/templates/app/ts/next.config.js
  8. +2 −2 packages/eslint-config-next/package.json
  9. +1 −1 packages/eslint-plugin-next/package.json
  10. +1 −1 packages/font/package.json
  11. +1 −1 packages/next-bundle-analyzer/package.json
  12. +1 −1 packages/next-codemod/package.json
  13. +1 −1 packages/next-env/package.json
  14. +1 −1 packages/next-mdx/package.json
  15. +1 −1 packages/next-plugin-storybook/package.json
  16. +1 −1 packages/next-polyfill-module/package.json
  17. +1 −1 packages/next-polyfill-nomodule/package.json
  18. +1 −4 packages/next-swc/crates/next-dev/src/lib.rs
  19. +1 −1 packages/next-swc/package.json
  20. +7 −7 packages/next/package.json
  21. +2 −0 packages/next/src/build/entries.ts
  22. +15 −14 packages/next/src/build/index.ts
  23. +7 −7 packages/next/src/build/output/log.ts
  24. +3 −0 packages/next/src/build/webpack/loaders/metadata/discover.ts
  25. +7 −1 packages/next/src/build/webpack/loaders/next-app-loader.ts
  26. +5 −3 packages/next/src/build/webpack/loaders/next-metadata-image-loader.ts
  27. +89 −27 packages/next/src/build/webpack/plugins/flight-client-entry-plugin.ts
  28. +8 −2 packages/next/src/cli/next-dev.ts
  29. +1 −1 packages/next/src/client/components/router-reducer/reducers/server-action-reducer.ts
  30. +11 −0 packages/next/src/client/components/static-generation-async-storage.ts
  31. +11 −11 packages/next/src/compiled/babel-packages/packages-bundle.js
  32. +2 −2 packages/next/src/compiled/babel/bundle.js
  33. +3 −3 packages/next/src/lib/turbopack-warning.ts
  34. +14 −1 packages/next/src/server/app-render/action-handler.ts
  35. +2 −0 packages/next/src/server/app-render/app-render.tsx
  36. +5 −0 packages/next/src/server/base-server.ts
  37. +3 −0 packages/next/src/server/config-schema.ts
  38. +1 −0 packages/next/src/server/config-shared.ts
  39. +7 −11 packages/next/src/server/config.ts
  40. +2 −0 packages/next/src/server/dev/hot-reloader.ts
  41. +2 −0 packages/next/src/server/future/route-modules/app-route/module.ts
  42. +18 −0 packages/next/src/server/lib/incremental-cache/fetch-cache.ts
  43. +7 −27 packages/next/src/server/lib/incremental-cache/file-system-cache.ts
  44. +13 −0 packages/next/src/server/lib/incremental-cache/index.ts
  45. +26 −0 packages/next/src/server/lib/incremental-cache/utils.ts
  46. +57 −3 packages/next/src/server/lib/patch-fetch.ts
  47. +139 −7 packages/next/src/server/next-server.ts
  48. +6 −0 packages/next/src/server/web/spec-extension/revalidate-tag.ts
  49. +13 −6 packages/next/src/server/web/spec-extension/unstable-cache.ts
  50. +1 −1 packages/react-dev-overlay/package.json
  51. +1 −1 packages/react-refresh-utils/package.json
  52. +41 −41 pnpm-lock.yaml
  53. +1 −5 test/.stats-app/next.config.js
  54. +0 −1 test/development/acceptance-app/fixtures/app-hmr-changes/next.config.js
  55. +1 −5 test/development/acceptance-app/fixtures/default-template/next.config.js
  56. +1 −3 test/development/acceptance-app/fixtures/rsc-build-errors/next.config.js
  57. +3 −3 test/development/api-route-errors/index.test.ts
  58. +1 −3 test/development/app-dir/multiple-compiles-single-route/next.config.js
  59. +1 −5 test/development/app-hmr/next.config.js
  60. +1 −3 test/development/app-render-error-log/next.config.js
  61. +1 −5 test/development/basic/node-builtins/next.config.js
  62. +1 −3 test/development/next-font/build-errors/next.config.js
  63. +1 −5 test/e2e/app-dir-legacy-edge-runtime-config/next.config.js
  64. +1 −3 test/e2e/app-dir/_allow-underscored-root-directory/next.config.js
  65. +9 −0 test/e2e/app-dir/actions/app/client/layout.js
  66. +0 −1 test/e2e/app-dir/actions/next.config.js
  67. +1 −5 test/e2e/app-dir/app-a11y/next.config.js
  68. +1 −5 test/e2e/app-dir/app-alias/next.config.js
  69. BIN test/e2e/app-dir/app-basepath/app/another/opengraph-image.png
  70. +7 −0 test/e2e/app-dir/app-basepath/index.test.ts
  71. +0 −3 test/e2e/app-dir/app-basepath/next.config.js
  72. +1 −5 test/e2e/app-dir/app-client-cache/next.config.js
  73. +0 −3 test/e2e/app-dir/app-css-pageextensions/next.config.js
  74. +0 −1 test/e2e/app-dir/app-css/next.config.js
  75. +1 −5 test/e2e/app-dir/app-edge/next.config.js
  76. +0 −1 test/e2e/app-dir/app-external/next.config.js
  77. +0 −1 test/e2e/app-dir/app-middleware/next.config.js
  78. +1 −5 test/e2e/app-dir/app-prefetch/next.config.js
  79. +1 −5 test/e2e/app-dir/app-rendering/next.config.js
  80. +0 −1 test/e2e/app-dir/app-routes-trailing-slash/next.config.js
  81. +0 −3 test/e2e/app-dir/app-routes/next.config.js
  82. +0 −1 test/e2e/app-dir/app-static/next.config.js
  83. +1 −5 test/e2e/app-dir/app-validation/next.config.js
  84. +0 −1 test/e2e/app-dir/app/next.config.js
  85. +0 −3 test/e2e/app-dir/asset-prefix/next.config.js
  86. +1 −5 test/e2e/app-dir/async-component-preload/next.config.js
  87. +0 −1 test/e2e/app-dir/autoscroll-with-css-modules/next.config.js
  88. +0 −3 test/e2e/app-dir/back-button-download-bug/next.config.js
  89. +1 −5 test/e2e/app-dir/create-next-app-template/next.config.js
  90. +1 −5 test/e2e/app-dir/create-root-layout/next.config.js
  91. +1 −3 test/e2e/app-dir/crypto-globally-available/next.config.js
  92. +1 −5 test/e2e/app-dir/draft-mode/next.config.js
  93. +1 −5 test/e2e/app-dir/dynamic-href/next.config.js
  94. +0 −3 test/e2e/app-dir/dynamic/next.config.js
  95. +1 −3 test/e2e/app-dir/edge-runtime-node-compatibility/next.config.js
  96. +0 −3 test/e2e/app-dir/front-redirect-issue/next.config.js
  97. +1 −3 test/e2e/app-dir/global-error/next.config.js
  98. +0 −3 test/e2e/app-dir/hooks/next.config.js
  99. +0 −3 test/e2e/app-dir/i18n-hybrid/next.config.js
  100. +0 −3 test/e2e/app-dir/import/next.config.js
  101. +1 −3 test/e2e/app-dir/interception-middleware-rewrite/next.config.js
  102. +1 −5 test/e2e/app-dir/interpolability-with-pages/next.config.js
  103. +1 −5 test/e2e/app-dir/layout-params/next.config.js
  104. +0 −1 test/e2e/app-dir/mdx/next.config.js
  105. +1 −3 test/e2e/app-dir/metadata-dynamic-routes/next.config.js
  106. +1 −3 test/e2e/app-dir/metadata-missing-metadata-base/next.config.js
  107. +1 −5 test/e2e/app-dir/metadata-suspense/next.config.js
  108. +1 −3 test/e2e/app-dir/metadata/next.config.js
  109. +0 −3 test/e2e/app-dir/navigation/next.config.js
  110. +1 −5 test/e2e/app-dir/next-font/next.config.js
  111. +1 −5 test/e2e/app-dir/next-image/next.config.js
  112. +1 −5 test/e2e/app-dir/not-found/next.config.js
  113. +1 −3 test/e2e/app-dir/pages-to-app-routing/next.config.js
  114. +1 −3 test/e2e/app-dir/parallel-routes-and-interception/next.config.js
  115. +0 −1 test/e2e/app-dir/parallel-routes-not-found/next.config.js
  116. +0 −3 test/e2e/app-dir/rewrites-redirects/next.config.js
  117. +1 −3 test/e2e/app-dir/root-layout-redirect/next.config.js
  118. +1 −5 test/e2e/app-dir/root-layout/next.config.js
  119. +1 −3 test/e2e/app-dir/route-page-manifest-bug/next.config.js
  120. +0 −3 test/e2e/app-dir/router-autoscroll/next.config.js
  121. +0 −1 test/e2e/app-dir/router-stuck-dynamic-static-segment/next.config.js
  122. +0 −1 test/e2e/app-dir/rsc-basic/next.config.js
  123. +1 −5 test/e2e/app-dir/search-params-react-key/next.config.js
  124. +1 −3 test/e2e/app-dir/searchparams-static-bailout/next.config.js
  125. +0 −1 test/e2e/app-dir/set-cookies/next.config.mjs
  126. +1 −5 test/e2e/app-dir/similar-pages-paths/next.config.js
  127. +1 −3 test/e2e/app-dir/test-template/{{ toFileName name }}/next.config.js
  128. +0 −3 test/e2e/app-dir/trailingslash/next.config.js
  129. +0 −1 test/e2e/app-dir/underscore-ignore-app-paths/next.config.js
  130. +1 −3 test/e2e/app-dir/use-params/next.config.js
  131. +1 −5 test/e2e/app-dir/use-selected-layout-segment-s/next.config.js
  132. +1 −5 test/e2e/app-dir/with-babel/next.config.js
  133. +3 −3 test/e2e/edge-configurable-runtime/index.test.ts
  134. +1 −5 test/e2e/edge-runtime-uses-edge-light-import-specifier-for-packages/next.config.js
  135. +0 −3 test/e2e/og-api/app/next.config.js
  136. +0 −1 test/e2e/opentelemetry/next.config.js
  137. +3 −3 test/e2e/switchable-runtime/index.test.ts
  138. +0 −3 test/e2e/switchable-runtime/next.config.js
  139. +0 −3 test/integration/app-dir-export/next.config.js
  140. +2 −2 test/integration/app-dir-export/test/config.test.ts
  141. +1 −5 test/integration/app-dynamic-error/next.config.js
  142. +0 −1 test/integration/app-types/next.config.js
  143. +2 −2 test/integration/config-syntax-error/test/index.test.js
  144. +1 −5 test/integration/conflicting-app-page-error/next.config.js
  145. +1 −1 test/integration/custom-server/test/index.test.js
  146. +0 −3 test/integration/eslint/with-typescript/next.config.js
  147. +5 −5 test/integration/middleware-dev-errors/test/index.test.js
  148. +1 −5 test/integration/next-image-new/app-dir/next.config.js
  149. +2 −2 test/integration/next-image-new/svgo-webpack/test/index.test.ts
  150. +1 −3 test/integration/react-streaming/unsupported-native-module/next.config.js
  151. +1 −3 test/production/app-dir-hide-suppressed-error-during-next-export/next.config.js
  152. +1 −3 test/production/app-dir-prefetch-non-iso-url/next.config.js
  153. +1 −3 test/production/app-dir/app-only-flag/next.config.js
  154. +1 −5 test/production/app-dir/revalidate/next.config.js
  155. +0 −3 test/production/standalone-mode/metadata/next.config.js
  156. +20 −0 test/production/standalone-mode/required-server-files/cache-handler.js
  157. +14 −0 test/production/standalone-mode/required-server-files/required-server-files.test.ts
  158. +1 −0 test/unit/incremental-cache/file-system-cache.test.ts
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -16,5 +16,5 @@
"registry": "https://registry.npmjs.org/"
}
},
"version": "13.4.0"
"version": "13.4.1"
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -247,8 +247,8 @@
"@babel/parser": "7.18.0",
"@babel/types": "7.18.0",
"@babel/traverse": "7.18.0",
"@types/react": "18.0.37",
"@types/react-dom": "18.0.11"
"@types/react": "18.2.5",
"@types/react-dom": "18.2.3"
},
"engines": {
"node": ">=16.8.0"
2 changes: 1 addition & 1 deletion packages/create-next-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-next-app",
"version": "13.4.0",
"version": "13.4.1",
"keywords": [
"react",
"next",
6 changes: 1 addition & 5 deletions packages/create-next-app/templates/app-tw/js/next.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
experimental: {
appDir: true,
},
}
const nextConfig = {}

module.exports = nextConfig
6 changes: 1 addition & 5 deletions packages/create-next-app/templates/app-tw/ts/next.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
experimental: {
appDir: true,
},
}
const nextConfig = {}

module.exports = nextConfig
6 changes: 1 addition & 5 deletions packages/create-next-app/templates/app/js/next.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
experimental: {
appDir: true,
},
}
const nextConfig = {}

module.exports = nextConfig
6 changes: 1 addition & 5 deletions packages/create-next-app/templates/app/ts/next.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
experimental: {
appDir: true,
},
}
const nextConfig = {}

module.exports = nextConfig
4 changes: 2 additions & 2 deletions packages/eslint-config-next/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-config-next",
"version": "13.4.0",
"version": "13.4.1",
"description": "ESLint configuration used by NextJS.",
"main": "index.js",
"license": "MIT",
@@ -9,7 +9,7 @@
"directory": "packages/eslint-config-next"
},
"dependencies": {
"@next/eslint-plugin-next": "13.4.0",
"@next/eslint-plugin-next": "13.4.1",
"@rushstack/eslint-patch": "^1.1.3",
"@typescript-eslint/parser": "^5.42.0",
"eslint-import-resolver-node": "^0.3.6",
2 changes: 1 addition & 1 deletion packages/eslint-plugin-next/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/eslint-plugin-next",
"version": "13.4.0",
"version": "13.4.1",
"description": "ESLint plugin for NextJS.",
"main": "dist/index.js",
"license": "MIT",
2 changes: 1 addition & 1 deletion packages/font/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/font",
"version": "13.4.0",
"version": "13.4.1",
"repository": {
"url": "vercel/next.js",
"directory": "packages/font"
2 changes: 1 addition & 1 deletion packages/next-bundle-analyzer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/bundle-analyzer",
"version": "13.4.0",
"version": "13.4.1",
"main": "index.js",
"types": "index.d.ts",
"license": "MIT",
2 changes: 1 addition & 1 deletion packages/next-codemod/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/codemod",
"version": "13.4.0",
"version": "13.4.1",
"license": "MIT",
"repository": {
"type": "git",
2 changes: 1 addition & 1 deletion packages/next-env/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/env",
"version": "13.4.0",
"version": "13.4.1",
"keywords": [
"react",
"next",
2 changes: 1 addition & 1 deletion packages/next-mdx/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/mdx",
"version": "13.4.0",
"version": "13.4.1",
"main": "index.js",
"license": "MIT",
"repository": {
2 changes: 1 addition & 1 deletion packages/next-plugin-storybook/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/plugin-storybook",
"version": "13.4.0",
"version": "13.4.1",
"repository": {
"url": "vercel/next.js",
"directory": "packages/next-plugin-storybook"
2 changes: 1 addition & 1 deletion packages/next-polyfill-module/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/polyfill-module",
"version": "13.4.0",
"version": "13.4.1",
"description": "A standard library polyfill for ES Modules supporting browsers (Edge 16+, Firefox 60+, Chrome 61+, Safari 10.1+)",
"main": "dist/polyfill-module.js",
"license": "MIT",
2 changes: 1 addition & 1 deletion packages/next-polyfill-nomodule/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/polyfill-nomodule",
"version": "13.4.0",
"version": "13.4.1",
"description": "A polyfill for non-dead, nomodule browsers.",
"main": "dist/polyfill-nomodule.js",
"license": "MIT",
5 changes: 1 addition & 4 deletions packages/next-swc/crates/next-dev/src/lib.rs
Original file line number Diff line number Diff line change
@@ -389,10 +389,7 @@ async fn source(
let main_source = main_source.into();
let source_maps = SourceMapContentSourceVc::new(main_source).into();
let source_map_trace = NextSourceMapTraceContentSourceVc::new(main_source).into();
let img_source = NextImageContentSourceVc::new(
CombinedContentSourceVc::new(vec![static_source, page_source]).into(),
)
.into();
let img_source = NextImageContentSourceVc::new(main_source).into();
let router_source = NextRouterContentSourceVc::new(
main_source,
execution_context,
2 changes: 1 addition & 1 deletion packages/next-swc/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/swc",
"version": "13.4.0",
"version": "13.4.1",
"private": true,
"scripts": {
"clean": "rm -rf ./native/*",
14 changes: 7 additions & 7 deletions packages/next/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "next",
"version": "13.4.0",
"version": "13.4.1",
"description": "The React Framework",
"main": "./dist/server/next.js",
"license": "MIT",
@@ -83,7 +83,7 @@
]
},
"dependencies": {
"@next/env": "13.4.0",
"@next/env": "13.4.1",
"@swc/helpers": "0.5.1",
"busboy": "1.6.0",
"caniuse-lite": "^1.0.30001406",
@@ -143,11 +143,11 @@
"@jest/types": "29.5.0",
"@napi-rs/cli": "2.14.7",
"@napi-rs/triples": "1.1.0",
"@next/polyfill-module": "13.4.0",
"@next/polyfill-nomodule": "13.4.0",
"@next/react-dev-overlay": "13.4.0",
"@next/react-refresh-utils": "13.4.0",
"@next/swc": "13.4.0",
"@next/polyfill-module": "13.4.1",
"@next/polyfill-nomodule": "13.4.1",
"@next/react-dev-overlay": "13.4.1",
"@next/react-refresh-utils": "13.4.1",
"@next/swc": "13.4.1",
"@opentelemetry/api": "1.4.1",
"@segment/ajv-human-errors": "2.1.2",
"@taskr/clear": "1.1.0",
2 changes: 2 additions & 0 deletions packages/next/src/build/entries.ts
Original file line number Diff line number Diff line change
@@ -553,6 +553,7 @@ export async function createEntrypoints(
appDir,
appPaths: matchedAppPaths,
pageExtensions,
basePath: config.basePath,
assetPrefix: config.assetPrefix,
nextConfigOutput: config.output,
preferredRegion: staticInfo.preferredRegion,
@@ -580,6 +581,7 @@ export async function createEntrypoints(
appDir: appDir!,
appPaths: matchedAppPaths,
pageExtensions,
basePath: config.basePath,
assetPrefix: config.assetPrefix,
nextConfigOutput: config.output,
// This isn't used with edge as it needs to be set on the entry module, which will be the `edgeServerEntry` instead.
29 changes: 15 additions & 14 deletions packages/next/src/build/index.ts
Original file line number Diff line number Diff line change
@@ -283,8 +283,12 @@ export default async function build(

const publicDir = path.join(dir, 'public')
const isAppDirEnabled = !!config.experimental.appDir
const { pagesDir, appDir } = findPagesDir(dir, isAppDirEnabled)
NextBuildContext.pagesDir = pagesDir
NextBuildContext.appDir = appDir
hasAppDir = Boolean(appDir)

if (isAppDirEnabled) {
if (isAppDirEnabled && hasAppDir) {
if (!process.env.__NEXT_TEST_MODE && ciEnvironment.hasNextSupport) {
const requireHook = require.resolve('../server/require-hook')
const contents = await promises.readFile(requireHook, 'utf8')
@@ -297,11 +301,6 @@ export default async function build(
}
}

const { pagesDir, appDir } = findPagesDir(dir, isAppDirEnabled)
NextBuildContext.pagesDir = pagesDir
NextBuildContext.appDir = appDir
hasAppDir = Boolean(appDir)

const isSrcDir = path
.relative(dir, pagesDir || appDir || '')
.startsWith('src')
@@ -826,6 +825,8 @@ export default async function build(

const manifestPath = path.join(distDir, SERVER_DIRECTORY, PAGES_MANIFEST)

const { incrementalCacheHandlerPath } = config.experimental

const requiredServerFiles = nextBuildSpan
.traceChild('generate-required-server-files')
.traceFn(() => ({
@@ -841,12 +842,8 @@ export default async function build(
experimental: {
...config.experimental,
trustHostHeader: ciEnvironment.hasNextSupport,
incrementalCacheHandlerPath: config.experimental
.incrementalCacheHandlerPath
? path.relative(
distDir,
config.experimental.incrementalCacheHandlerPath
)
incrementalCacheHandlerPath: incrementalCacheHandlerPath
? path.relative(distDir, incrementalCacheHandlerPath)
: undefined,
},
},
@@ -1918,9 +1915,13 @@ export default async function build(

// ensure we trace any dependencies needed for custom
// incremental cache handler
if (config.experimental.incrementalCacheHandlerPath) {
if (incrementalCacheHandlerPath) {
toTrace.push(
require.resolve(config.experimental.incrementalCacheHandlerPath)
require.resolve(
path.isAbsolute(incrementalCacheHandlerPath)
? incrementalCacheHandlerPath
: path.join(dir, incrementalCacheHandlerPath)
)
)
}

14 changes: 7 additions & 7 deletions packages/next/src/build/output/log.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import chalk from '../../lib/chalk'

export const prefixes = {
wait: chalk.cyan('wait') + ' -',
error: chalk.red('error') + ' -',
warn: chalk.yellow('warn') + ' -',
ready: chalk.green('ready') + ' -',
info: chalk.cyan('info') + ' -',
event: chalk.magenta('event') + ' -',
trace: chalk.magenta('trace') + ' -',
wait: '- ' + chalk.cyan('wait'),
error: '- ' + chalk.red('error'),
warn: '- ' + chalk.yellow('warn'),
ready: '- ' + chalk.green('ready'),
info: '- ' + chalk.cyan('info'),
event: '- ' + chalk.magenta('event'),
trace: '- ' + chalk.magenta('trace'),
}

export function wait(...message: any[]) {
3 changes: 3 additions & 0 deletions packages/next/src/build/webpack/loaders/metadata/discover.ts
Original file line number Diff line number Diff line change
@@ -64,12 +64,14 @@ export async function createStaticMetadataFromRoute(
isRootLayoutOrRootPage,
loaderContext,
pageExtensions,
basePath,
}: {
segment: string
resolvePath: (pathname: string) => Promise<string>
isRootLayoutOrRootPage: boolean
loaderContext: webpack.LoaderContext<any>
pageExtensions: string[]
basePath: string
}
) {
let hasStaticMetadataFiles = false
@@ -124,6 +126,7 @@ export async function createStaticMetadataFromRoute(
{
type,
segment,
basePath,
pageExtensions,
}
)}!${filepath}${METADATA_RESOURCE_QUERY}`
8 changes: 7 additions & 1 deletion packages/next/src/build/webpack/loaders/next-app-loader.ts
Original file line number Diff line number Diff line change
@@ -33,6 +33,7 @@ export type AppLoaderOptions = {
rootDir?: string
tsconfigPath?: string
isDev?: boolean
basePath: string
nextConfigOutput?: NextConfig['output']
}
type AppLoader = webpack.LoaderDefinitionFunction<AppLoaderOptions>
@@ -176,6 +177,7 @@ async function createTreeCodeFromPath(
resolveParallelSegments,
loaderContext,
pageExtensions,
basePath,
}: {
resolver: PathResolver
resolvePath: (pathname: string) => Promise<string>
@@ -184,6 +186,7 @@ async function createTreeCodeFromPath(
) => [key: string, segment: string | string[]][]
loaderContext: webpack.LoaderContext<AppLoaderOptions>
pageExtensions: string[]
basePath: string
}
) {
const splittedPath = pagePath.split(/[\\/]/)
@@ -258,6 +261,7 @@ async function createTreeCodeFromPath(

if (resolvedRouteDir) {
metadata = await createStaticMetadataFromRoute(resolvedRouteDir, {
basePath,
segment: segmentPath,
resolvePath,
isRootLayoutOrRootPage,
@@ -427,6 +431,7 @@ const nextAppLoader: AppLoader = async function nextAppLoader() {
isDev,
nextConfigOutput,
preferredRegion,
basePath,
} = loaderOptions

const buildInfo = getModuleBuildInfo((this as any)._module)
@@ -535,6 +540,7 @@ const nextAppLoader: AppLoader = async function nextAppLoader() {
resolveParallelSegments,
loaderContext: this,
pageExtensions,
basePath,
})

if (!rootLayout) {
@@ -599,7 +605,7 @@ const nextAppLoader: AppLoader = async function nextAppLoader() {
export { renderToReadableStream, decodeReply, decodeAction } from 'react-server-dom-webpack/server.edge'
export const __next_app_webpack_require__ = __webpack_require__
export { preloadStyle, preloadFont, preconnect } from 'next/dist/server/app-render/rsc/preloads'
export const originalPathname = "${page}"
`

Loading