This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.
# Releases
## @vercel/build-utils@8.2.2
### Patch Changes
- Change node 16.x EOL for Vercel
([#11704](https://github.com/vercel/vercel/pull/11704))
- Improve error message and refactor
([#11706](https://github.com/vercel/vercel/pull/11706))
- [built-utils] Handle case of not having lockfile when corepack is
enabled ([#11697](https://github.com/vercel/vercel/pull/11697))
## vercel@34.2.6
### Patch Changes
- [built-utils] Handle case of not having lockfile when corepack is
enabled ([#11697](https://github.com/vercel/vercel/pull/11697))
- Updated dependencies
\[[`5c12ed695`](5c12ed6950),
[`21444a38e`](21444a38e5),
[`fa9789a93`](fa9789a93e),
[`c925dc4a1`](c925dc4a1b),
[`06d2d860e`](06d2d860e4),
[`b735f37fd`](b735f37fd9)]:
- @vercel/build-utils@8.2.2
- @vercel/next@4.2.16
- @vercel/redwood@2.0.10
- @vercel/remix-builder@2.1.7
- @vercel/node@3.1.7
- @vercel/static-build@2.5.11
## @vercel/client@13.2.9
### Patch Changes
- Updated dependencies
\[[`5c12ed695`](5c12ed6950),
[`21444a38e`](21444a38e5),
[`06d2d860e`](06d2d860e4)]:
- @vercel/build-utils@8.2.2
## @vercel/gatsby-plugin-vercel-builder@2.0.33
### Patch Changes
- Updated dependencies
\[[`5c12ed695`](5c12ed6950),
[`21444a38e`](21444a38e5),
[`06d2d860e`](06d2d860e4)]:
- @vercel/build-utils@8.2.2
## @vercel/next@4.2.16
### Patch Changes
- prevent /index from being incorrectly normalized in rewrites
([#11707](https://github.com/vercel/vercel/pull/11707))
- Upgrade to @vercel/nft 0.27.2 with browser remapping support
([#11700](https://github.com/vercel/vercel/pull/11700))
- ensure unmatched rsc rewrites are routed to correct handler
([#11688](https://github.com/vercel/vercel/pull/11688))
## @vercel/node@3.1.7
### Patch Changes
- Upgrade to @vercel/nft 0.27.2 with browser remapping support
([#11700](https://github.com/vercel/vercel/pull/11700))
- Updated dependencies
\[[`5c12ed695`](5c12ed6950),
[`21444a38e`](21444a38e5),
[`06d2d860e`](06d2d860e4)]:
- @vercel/build-utils@8.2.2
## @vercel/redwood@2.0.10
### Patch Changes
- Upgrade to @vercel/nft 0.27.2 with browser remapping support
([#11700](https://github.com/vercel/vercel/pull/11700))
## @vercel/remix-builder@2.1.7
### Patch Changes
- Upgrade to @vercel/nft 0.27.2 with browser remapping support
([#11700](https://github.com/vercel/vercel/pull/11700))
## @vercel/static-build@2.5.11
### Patch Changes
- Updated dependencies \[]:
- @vercel/gatsby-plugin-vercel-builder@2.0.33
## @vercel-internals/types@1.0.38
### Patch Changes
- Updated dependencies
\[[`5c12ed695`](5c12ed6950),
[`21444a38e`](21444a38e5),
[`06d2d860e`](06d2d860e4)]:
- @vercel/build-utils@8.2.2
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
The Next.js builder currently normalizes user rewrites to ensure the internal `.rsc` / `.action` rewrites are still handled even after following the rewrite.
However we have special rewrites: `/index.rsc` and `/index.action`. When those routes pass through the normalization logic, a request routed to a catch-all route (e.g. `[[...param]]`) will go from `/` -> `/index.rsc` -> `<someRewriteString>?param=index`. This is inconsistent `next start` or other spots where the param should be an empty string.
Similarly, if a user rewrites their entire app to a subdirectory (eg `/:path*` -> `/base/:path*`, a route will go from `/` -> `/index.rsc` -> `/base/index.rsc` which won't exist, causing a 404.
The solution here is to return the `index.rsc` / `index.action` routes back to `/` so they can be handled by user rewrites, if necessary.
This also disables the `hasActionOutputSupport` flag if `routesManifest.i18n` is detected as they are not compatible.
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.
# Releases
## vercel@34.2.5
### Patch Changes
- Adds a route for the `.rsc` pathname as well when app has ppr enabled
but not all routes.
([#11681](https://github.com/vercel/vercel/pull/11681))
- Updated dependencies
\[[`7457767a7`](7457767a77),
[`4337ea065`](4337ea0654)]:
- @vercel/next@4.2.15
## @vercel/fs-detectors@5.2.4
### Patch Changes
- Add support for detecting Turborepo 2
([#11680](https://github.com/vercel/vercel/pull/11680))
## @vercel/next@4.2.15
### Patch Changes
- ensure unmatched action rewrites are routed to correct handler
([#11686](https://github.com/vercel/vercel/pull/11686))
- Adds a route for the `.rsc` pathname as well when app has ppr enabled
but not all routes.
([#11681](https://github.com/vercel/vercel/pull/11681))
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
User defined rewrites are "normalized" so that our internal rewrites are still properly handled. Before normalizing these rewrites, the Next.js builder will attempt to match server action requests to a`.action` variant. Then the user-defined rewrites flow through the afterFiles normalization ([this part](https://github.com/vercel/vercel/blob/fix/unmatched-action-rewrites/packages/next/src/server-build.ts#L254-L279)) so that when we add `.action` in the builder, we don't drop the suffix.
But this normalization can lead to a malformed `dest`. e.g., if I had rewrite like this:
```js
{
source: '/greedy-rewrite/static/:path*',
destination: '/static/:path*',
}
```
The builder would go through this flow on an action request to `/greedy-rewrite/static`:
1. It'll attempt to match it to a `.action` output, so `/greedy-rewrite/static` -> `/greedy-rewrite/static.action`
2. The afterFiles normalization will take place, so the original `dest` of `/static/$1` will become `/static/$1$rscsuff`
3. $1 will be an empty string, because it doesn't match the existing capture group. So now `/greedy-rewrite/static.action` -> `/greedy-rewrite/static/.action`
4. `static/.action` is not a valid output, so it'll 404 and the action will break.
Existing handling exists for `.rsc` outputs for a similar reason, but only on the index route. I added a similar fix for this in #11688.
With the release of Turborepo 2 we're renaming `pipeline` to `tasks`.
This PR updates the default settings logic to look in `tasks` for a
`build` task definition in addition to looking at `pipeline`. It also
updates the message to no longer mention Turbo configuration in
`package.json` as this is fully ignored in Turborepo 2.
Added a quick unit test to verify `build` task definitions are found in
the `tasks` section of `turbo.json`.
Please let me know if there are other tests/places I should update.
When deploying partial prerendering (PPR), there may some pages that are
not enabled for PPR but still appear in the `prerender-manifest.json`.
Due to the branching of the client router, these routes also have to
have a `.rsc` as well as a `.prefetch.rsc` variants in order to prevent
404's. This change adds support for adding the extra route to the
prerender for pages that have PPR disabled.
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.
# Releases
## @vercel/python@4.3.0
### Minor Changes
- support newer python versions
([#11675](https://github.com/vercel/vercel/pull/11675))
## @vercel/build-utils@8.2.1
### Patch Changes
- [node] update node@16 deprecation day
([#11671](https://github.com/vercel/vercel/pull/11671))
## vercel@34.2.4
### Patch Changes
- Updated dependencies
\[[`3eb9d8c89`](3eb9d8c892),
[`83741a0eb`](83741a0eb9)]:
- @vercel/python@4.3.0
- @vercel/build-utils@8.2.1
- @vercel/node@3.1.6
- @vercel/static-build@2.5.10
## @vercel/client@13.2.8
### Patch Changes
- Updated dependencies
\[[`83741a0eb`](83741a0eb9)]:
- @vercel/build-utils@8.2.1
## @vercel/gatsby-plugin-vercel-builder@2.0.32
### Patch Changes
- Updated dependencies
\[[`83741a0eb`](83741a0eb9)]:
- @vercel/build-utils@8.2.1
## @vercel/node@3.1.6
### Patch Changes
- Updated dependencies
\[[`83741a0eb`](83741a0eb9)]:
- @vercel/build-utils@8.2.1
## @vercel/static-build@2.5.10
### Patch Changes
- Updated dependencies \[]:
- @vercel/gatsby-plugin-vercel-builder@2.0.32
## @vercel-internals/types@1.0.37
### Patch Changes
- Updated dependencies
\[[`83741a0eb`](83741a0eb9)]:
- @vercel/build-utils@8.2.1
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
When we added the option of getting `al2023` in addition to `al2`, this required a python version bump for those apps on `al2023`. Python 3.10 had a breaking minor change. https://github.com/vercel/vercel/pull/11541 mostly fixed it, with some comments.
OP hasn't replied to feedback on that PR, so I've take it over from them.
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.
# Releases
## vercel@34.2.3
### Patch Changes
- Don't create streaming lambdas for pages router routes
([#11660](https://github.com/vercel/vercel/pull/11660))
- Updated dependencies
\[[`c9d53d4e3`](c9d53d4e3e),
[`5f561f8cf`](5f561f8cfa)]:
- @vercel/next@4.2.14
## @vercel/next@4.2.14
### Patch Changes
- Don't create streaming lambdas for pages router routes
([#11660](https://github.com/vercel/vercel/pull/11660))
- Ensure user rewrites still match to action outputs
([#11628](https://github.com/vercel/vercel/pull/11628))
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
The builder normalizes user rewrites that target pages that have special outputs (`.rsc`, `.prefetch.rsc`). When we added support for `.action` outputs, we need to perform this same normalization to ensure that user rewrites still match. If the rewrite was a greedy match (eg `/:path*`) it'd be ok, but more specific rewrites would have the issue.
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.
# Releases
## vercel@34.2.2
### Patch Changes
- Fix related to erroring when a prefetch route is not provided but the
route is PPR enabled
([#11638](https://github.com/vercel/vercel/pull/11638))
- Updated dependencies
\[[`8e44ef5b9`](8e44ef5b9d),
[`61e6af374`](61e6af3740)]:
- @vercel/next@4.2.13
## @vercel/next@4.2.13
### Patch Changes
- Fix static case for detecting when a page supports PPR
([#11635](https://github.com/vercel/vercel/pull/11635))
- Fix related to erroring when a prefetch route is not provided but the
route is PPR enabled
([#11638](https://github.com/vercel/vercel/pull/11638))
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
When PPR is enabled in incremental mode, the previous code used the page information to determine if there was a failure for generating the flight data. This has been moved to the app PPR setting instead.
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.
# Releases
## vercel@34.2.1
### Patch Changes
- Support incremental PPR for large applications
([#11625](https://github.com/vercel/vercel/pull/11625))
- Updated dependencies
\[[`73e558913`](73e558913a)]:
- @vercel/next@4.2.12
## @vercel/next@4.2.12
### Patch Changes
- Support incremental PPR for large applications
([#11625](https://github.com/vercel/vercel/pull/11625))
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Previously, PPR was either all on, or all off. As we've added support for incremental adoption of PPR, the logic for determining if there's a grouping issue had to be adjusted.
This now only considers a group as supporting PPR if a route in the group supports PPR. As we also use this as a grouping key, this still ensures we won't have conflicts.
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.
# Releases
## @vercel/build-utils@8.2.0
### Minor Changes
- fix corepack detection for package manager version determination
([#11596](https://github.com/vercel/vercel/pull/11596))
### Patch Changes
- Fix triggering of ignored project settings node version warning
([#11550](https://github.com/vercel/vercel/pull/11550))
## vercel@34.2.0
### Minor Changes
- Stop sending system environment variables in dev
([#11526](https://github.com/vercel/vercel/pull/11526))
### Patch Changes
- Updated dependencies
\[[`d3c1267e2`](d3c1267e24),
[`ccd7eb1fb`](ccd7eb1fb7)]:
- @vercel/build-utils@8.2.0
- @vercel/node@3.1.5
- @vercel/static-build@2.5.9
## @vercel/client@13.2.7
### Patch Changes
- Updated dependencies
\[[`d3c1267e2`](d3c1267e24),
[`ccd7eb1fb`](ccd7eb1fb7)]:
- @vercel/build-utils@8.2.0
## @vercel/gatsby-plugin-vercel-builder@2.0.31
### Patch Changes
- Updated dependencies
\[[`d3c1267e2`](d3c1267e24),
[`ccd7eb1fb`](ccd7eb1fb7)]:
- @vercel/build-utils@8.2.0
## @vercel/node@3.1.5
### Patch Changes
- Updated dependencies
\[[`d3c1267e2`](d3c1267e24),
[`ccd7eb1fb`](ccd7eb1fb7)]:
- @vercel/build-utils@8.2.0
## @vercel/static-build@2.5.9
### Patch Changes
- Updated dependencies \[]:
- @vercel/gatsby-plugin-vercel-builder@2.0.31
## @vercel-internals/types@1.0.36
### Patch Changes
- Updated dependencies
\[[`d3c1267e2`](d3c1267e24),
[`ccd7eb1fb`](ccd7eb1fb7)]:
- @vercel/build-utils@8.2.0
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
The previous logic was checking for the env var `ENABLE_EXPERIMENTAL_COREPACK` to determine if corepack was being used by a project. However, this value only means that the build system should consider corepack, not that it's actively being used.
We need to check that flag AND the existence of a `packageManager` property in the project's `package.json`.
System environment variables would get set with empty strings in development which breaks some builds. This fixes that by using the v2 of `/env/pull` introduced in https://github.com/vercel/api/pull/27777.
There were scenarios where the warning "Node.js Version defined in your Project Settings ("18.x") will not apply" would not be triggered. For example:
1. Project Setting is 18.x
2. package.json has "engines.node": ">=18.x"
3. semver.intersects('18.x', '>=18.x') // => true (In this [code path](8ea93839cc/packages/build-utils/src/fs/run-user-scripts.ts (L258))) -> No warning message that Node.js Version was changed
4. After the error message we evaluate the latest node Version to use (20.x) in getSupportedNodeVersion()(this [code path](8ea93839cc/packages/build-utils/src/fs/run-user-scripts.ts (L274)))
5. User doesn't get notified that we changed the node version to something different than their project setting
This fixes that scenario by getting the supported node version first.
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.
# Releases
## @vercel/build-utils@8.1.3
### Patch Changes
- [build-utils] log more around package manager detection
([#11594](https://github.com/vercel/vercel/pull/11594))
## vercel@34.1.14
### Patch Changes
- Updated dependencies
\[[`ad6945435`](ad69454352)]:
- @vercel/build-utils@8.1.3
- @vercel/node@3.1.4
- @vercel/static-build@2.5.8
## @vercel/client@13.2.6
### Patch Changes
- Updated dependencies
\[[`ad6945435`](ad69454352)]:
- @vercel/build-utils@8.1.3
## @vercel/gatsby-plugin-vercel-builder@2.0.30
### Patch Changes
- Updated dependencies
\[[`ad6945435`](ad69454352)]:
- @vercel/build-utils@8.1.3
## @vercel/node@3.1.4
### Patch Changes
- Updated dependencies
\[[`ad6945435`](ad69454352)]:
- @vercel/build-utils@8.1.3
## @vercel/static-build@2.5.8
### Patch Changes
- Updated dependencies \[]:
- @vercel/gatsby-plugin-vercel-builder@2.0.30
## @vercel-internals/types@1.0.35
### Patch Changes
- Updated dependencies
\[[`ad6945435`](ad69454352)]:
- @vercel/build-utils@8.1.3
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.
# Releases
## @vercel/build-utils@8.1.2
### Patch Changes
- add log to package manager version detection
([#11592](https://github.com/vercel/vercel/pull/11592))
## vercel@34.1.13
### Patch Changes
- Updated dependencies
\[[`1682ad43d`](1682ad43d0)]:
- @vercel/build-utils@8.1.2
- @vercel/node@3.1.3
- @vercel/static-build@2.5.7
## @vercel/client@13.2.5
### Patch Changes
- Updated dependencies
\[[`1682ad43d`](1682ad43d0)]:
- @vercel/build-utils@8.1.2
## @vercel/gatsby-plugin-vercel-builder@2.0.29
### Patch Changes
- Updated dependencies
\[[`1682ad43d`](1682ad43d0)]:
- @vercel/build-utils@8.1.2
## @vercel/node@3.1.3
### Patch Changes
- Updated dependencies
\[[`1682ad43d`](1682ad43d0)]:
- @vercel/build-utils@8.1.2
## @vercel/static-build@2.5.7
### Patch Changes
- Updated dependencies \[]:
- @vercel/gatsby-plugin-vercel-builder@2.0.29
## @vercel-internals/types@1.0.34
### Patch Changes
- Updated dependencies
\[[`1682ad43d`](1682ad43d0)]:
- @vercel/build-utils@8.1.2
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.
# Releases
## @vercel/build-utils@8.1.1
### Patch Changes
- [build-utils] pnpm lockfile testing and fixing
([#11591](https://github.com/vercel/vercel/pull/11591))
## vercel@34.1.12
### Patch Changes
- Updated dependencies
\[[`67afc2608`](67afc26085),
[`2f7a6ed5f`](2f7a6ed5f9)]:
- @vercel/next@4.2.11
- @vercel/build-utils@8.1.1
- @vercel/node@3.1.2
- @vercel/static-build@2.5.6
## @vercel/client@13.2.4
### Patch Changes
- Updated dependencies
\[[`2f7a6ed5f`](2f7a6ed5f9)]:
- @vercel/build-utils@8.1.1
## @vercel/gatsby-plugin-vercel-builder@2.0.28
### Patch Changes
- Updated dependencies
\[[`2f7a6ed5f`](2f7a6ed5f9)]:
- @vercel/build-utils@8.1.1
## @vercel/next@4.2.11
### Patch Changes
- normalize source file locations for special metadata files
([#11579](https://github.com/vercel/vercel/pull/11579))
## @vercel/node@3.1.2
### Patch Changes
- Updated dependencies
\[[`2f7a6ed5f`](2f7a6ed5f9)]:
- @vercel/build-utils@8.1.1
## @vercel/static-build@2.5.6
### Patch Changes
- Updated dependencies \[]:
- @vercel/gatsby-plugin-vercel-builder@2.0.28
## @vercel-internals/types@1.0.33
### Patch Changes
- Updated dependencies
\[[`2f7a6ed5f`](2f7a6ed5f9)]:
- @vercel/build-utils@8.1.1
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Both `pnpm@6` and `pnpm@7` can parse lockfile versions `5.3` and `5.4`, but if there's a mismatch, `pnpm` will output a warning saying so. In order to prevent confusing warnings from being displayed to the user, this PR aligns the pnpm version with the exact lockfile verison.
It also adds a debug log to show which package manager version was determined based on the lockfile version.
When specifying a functions configuration in `vercel.json`, we attempt to find source files for all entrypoints. This attempts to normalize those source paths for some special cases so that we don't show a build warning for completely normal usage.
- `/_not-found` is an entrypoint automatically inserted by Next.js -- if we don't find a source file for it, don't warn, as the user might not have added one
- special metadata files like `favicon.ico` and `opengraph-image.<ext>` will be bundled as `favicon.ico/route.js` but the source file will be the raw extension.
The code we use to detect the version of `pnpm` based on lockfiles is hard to follow. It doesn't pick and executable, it instead of *sometimes* overrides the `PATH` for these utilities with a prepended alternate path.
This means that there is no one single place where we definitively specify which version of `pnpm` that is used, so much as *hope* that the `PATH` has the correct version on it. I don't know that we *can* specify an executable outside of the build container, and it's unclear, since this is a package, whether this utility is used outside of a build container setting.
In this pull request I cleaned up the code and updated the logic to include the `pnpm 7` and `pnpm 8` changes requested, with no changes yet to implement `pnpm 9`.
It's possible that we want to rewrite this detection logic from scratch to avoid this roundabout way of "finding" the executable, but I haven't done that here.