Compare commits

..

29 Commits

Author SHA1 Message Date
Vercel Release Bot
af29e9be49 Version Packages (#11648)
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>
2024-05-24 15:19:28 -07:00
Wyatt Johnson
c9d53d4e3e [next] Ensure only pages enable streaming (#11660)
This fixes a regression introduced by #11625 that enabled streaming for
routes on the pages router (these routes do not support streaming).
2024-05-24 15:15:32 -07:00
Trek Glowacki
a26ea7bf12 [tests] bump datadog installed version (#11651)
Unsure if this is related to `vitest` migration or something else but a dependency of the `datadog-ci` version we use is gone and [now errors](https://github.com/vercel/vercel/actions/runs/9213580743/job/25348743824?pr=11650). Bumping it to latest.
2024-05-23 20:44:34 +00:00
Trek Glowacki
866d0c173d [tests] remove unused opts.skipTeam (#11650)
I can't find this being used anywhere.
2024-05-23 15:25:04 -05:00
Zack Tanner
5f561f8cfa [next]: ensure user rewrites match to action outputs (#11628)
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.
2024-05-23 19:06:25 +00:00
Nathan Rajlich
139e8cdb17 [node] Use vitest for unit tests (#11631)
Similar to #11302, but for the `@vercel/node` package.
2024-05-23 18:20:18 +00:00
Vercel Release Bot
6529a9ab9c Version Packages (#11637)
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>
2024-05-23 10:33:01 +02:00
Wyatt Johnson
61e6af3740 [ppr] Fix for error case involving prefetch data routes (#11638)
Only error when the prefetch data route is present but the route also
has PPR enabled.
2024-05-23 10:28:05 +02:00
Wyatt Johnson
8e44ef5b9d [ppr] Fix static case (#11635)
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.
2024-05-23 05:23:26 +00:00
Wyatt Johnson
fe9e27c459 chore: bump react version (#11636) 2024-05-23 05:14:10 +00:00
Vercel Release Bot
8a6dc204fd Version Packages (#11634)
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>
2024-05-22 21:14:01 -07:00
Wyatt Johnson
73e558913a [ppr] Fix PPR detection for groups (#11625)
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.
2024-05-23 04:06:12 +00:00
Wyatt Johnson
464cb26255 chore: bump react versions (#11632) 2024-05-22 19:45:03 -07:00
Zack Tanner
80e0bab0ec [next] Fix Next.js tests (#11610)
Syncs the experimental React dependency to avoid build errors. 

This was updated in:
- https://github.com/vercel/next.js/pull/65864
2024-05-17 22:24:53 +00:00
Trek Glowacki
f900ca8daf [framework-fixtures] add missing dependency to dependabot (#11606)
Hydrogen has a peer-dep on remix.
2024-05-16 20:33:36 -05:00
Nathan Rajlich
9ee7d31957 [cli] Add test for CLI extensions passing through exit code (#11600)
/cc @codybrouwers
2024-05-15 20:02:40 +00:00
Vercel Release Bot
1eb76a3ae7 Version Packages (#11598)
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>
2024-05-15 14:26:56 -05:00
Sean Massa
ccd7eb1fb7 fix corepack detection for package manager version determination (#11596)
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`.
2024-05-15 19:25:01 +00:00
Austin Merrick
41c44d6594 [build-utils] Refactor getNodeVersion (#11599)
Makes variable names more clear and consistent.
2024-05-15 17:17:41 +00:00
Austin Merrick
446ac49e2b [cli] Don't pull system environment vars in dev (#11526)
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.
2024-05-15 12:17:47 +00:00
Austin Merrick
d3c1267e24 [build-utils] Fix warn for ignored project settings node version (#11550)
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.
2024-05-14 23:23:17 +00:00
Sean Massa
b09d7b6130 [tests] allow errors to define retry delay (#11597)
Errors can now define their own retry delay. This is necessary for some
kinds of errors where all retries will run within the same second.
2024-05-14 14:15:31 -05:00
Vercel Release Bot
f78b315a50 Version Packages (#11595)
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>
2024-05-13 17:07:24 -05:00
Sean Massa
ad69454352 [build-utils] log more around package manager detection (#11594)
Add more loggign around package manager detection to see why we're not
properly detecting `pnpm` given a pnpm lockfile.
2024-05-13 17:05:25 -05:00
Vercel Release Bot
14059906d3 Version Packages (#11593)
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>
2024-05-13 14:03:47 -05:00
Sean Massa
1682ad43d0 [build-utils] add log to package manager version detection (#11592) 2024-05-13 19:01:58 +00:00
Vercel Release Bot
423630a168 Version Packages (#11589)
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>
2024-05-13 13:18:24 -05:00
Sean Massa
2f7a6ed5f9 [build-utils] log pnpm lockfile selection (#11591)
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.
2024-05-13 18:16:24 +00:00
Zack Tanner
67afc26085 [next]: normalize source path for special app-dir metadata files (#11579)
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.
2024-05-13 16:04:16 +00:00
176 changed files with 1159 additions and 419 deletions

View File

@@ -63,16 +63,21 @@ updates:
allow: allow:
- dependency-name: '@remix-run*' - dependency-name: '@remix-run*'
- dependency-name: '@shopify*' - dependency-name: '@shopify*'
- dependency-name: 'remix*'
ignore: ignore:
- dependency-name: '@remix-run*' - dependency-name: '@remix-run*'
update-types: update-types:
['version-update:semver-major', 'version-update:semver-patch'] ['version-update:semver-major', 'version-update:semver-patch']
- dependency-name: 'remix*'
update-types:
['version-update:semver-major', 'version-update:semver-patch']
- dependency-name: '@shopify*' - dependency-name: '@shopify*'
update-types: update-types:
['version-update:semver-major', 'version-update:semver-patch'] ['version-update:semver-major', 'version-update:semver-patch']
groups: groups:
core: core:
patterns: patterns:
- 'remix*'
- '@remix-run*' - '@remix-run*'
- '@shopify*' - '@shopify*'
update-types: update-types:

View File

@@ -99,7 +99,7 @@ jobs:
echo "misses=$TURBO_MISS_COUNT" >> $GITHUB_OUTPUT echo "misses=$TURBO_MISS_COUNT" >> $GITHUB_OUTPUT
- name: 'Upload Test Report to Datadog' - name: 'Upload Test Report to Datadog'
if: ${{ steps['turbo-summary'].outputs.misses != '0' && !cancelled() }} if: ${{ steps['turbo-summary'].outputs.misses != '0' && !cancelled() }}
run: 'npx @datadog/datadog-ci@2.18.1 junit upload --service vercel-cli .junit-reports' run: 'npx @datadog/datadog-ci@2.36.0 junit upload --service vercel-cli .junit-reports'
env: env:
DATADOG_API_KEY: ${{secrets.DATADOG_API_KEY_CLI}} DATADOG_API_KEY: ${{secrets.DATADOG_API_KEY_CLI}}
DD_ENV: ci DD_ENV: ci

View File

@@ -9,7 +9,7 @@
}, },
"devDependencies": { "devDependencies": {
"@types/jest": "27.4.1", "@types/jest": "27.4.1",
"@vercel/build-utils": "8.1.0", "@vercel/build-utils": "8.2.0",
"@vercel/frameworks": "3.0.2" "@vercel/frameworks": "3.0.2"
}, },
"version": null "version": null

View File

@@ -1,5 +1,33 @@
# @vercel-internals/types # @vercel-internals/types
## 1.0.36
### Patch Changes
- Updated dependencies [[`d3c1267e2`](https://github.com/vercel/vercel/commit/d3c1267e24082789ea6382cf6af81dd40df288ff), [`ccd7eb1fb`](https://github.com/vercel/vercel/commit/ccd7eb1fb78f7ac9effdbe1935de3bda82c97fe3)]:
- @vercel/build-utils@8.2.0
## 1.0.35
### Patch Changes
- Updated dependencies [[`ad6945435`](https://github.com/vercel/vercel/commit/ad69454352b519b2b0ed326f245c779530554bf2)]:
- @vercel/build-utils@8.1.3
## 1.0.34
### Patch Changes
- Updated dependencies [[`1682ad43d`](https://github.com/vercel/vercel/commit/1682ad43d0064b22b1248a7e946746b838f00076)]:
- @vercel/build-utils@8.1.2
## 1.0.33
### Patch Changes
- Updated dependencies [[`2f7a6ed5f`](https://github.com/vercel/vercel/commit/2f7a6ed5f92d454000f92247d3b6548e2064f4e6)]:
- @vercel/build-utils@8.1.1
## 1.0.32 ## 1.0.32
### Patch Changes ### Patch Changes

View File

@@ -1,7 +1,7 @@
{ {
"private": true, "private": true,
"name": "@vercel-internals/types", "name": "@vercel-internals/types",
"version": "1.0.32", "version": "1.0.36",
"types": "index.d.ts", "types": "index.d.ts",
"main": "index.d.ts", "main": "index.d.ts",
"files": [ "files": [
@@ -10,7 +10,7 @@
"dependencies": { "dependencies": {
"@types/node": "14.14.31", "@types/node": "14.14.31",
"@vercel-internals/constants": "1.0.4", "@vercel-internals/constants": "1.0.4",
"@vercel/build-utils": "8.1.0", "@vercel/build-utils": "8.2.0",
"@vercel/routing-utils": "3.1.0" "@vercel/routing-utils": "3.1.0"
}, },
"devDependencies": { "devDependencies": {

View File

@@ -1,5 +1,33 @@
# @vercel/build-utils # @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))
## 8.1.3
### Patch Changes
- [build-utils] log more around package manager detection ([#11594](https://github.com/vercel/vercel/pull/11594))
## 8.1.2
### Patch Changes
- add log to package manager version detection ([#11592](https://github.com/vercel/vercel/pull/11592))
## 8.1.1
### Patch Changes
- [build-utils] pnpm lockfile testing and fixing ([#11591](https://github.com/vercel/vercel/pull/11591))
## 8.1.0 ## 8.1.0
### Minor Changes ### Minor Changes

View File

@@ -1,6 +1,6 @@
{ {
"name": "@vercel/build-utils", "name": "@vercel/build-utils",
"version": "8.1.0", "version": "8.2.0",
"license": "Apache-2.0", "license": "Apache-2.0",
"main": "./dist/index.js", "main": "./dist/index.js",
"types": "./dist/index.d.js", "types": "./dist/index.d.js",

View File

@@ -240,38 +240,51 @@ export function getSpawnOptions(
export async function getNodeVersion( export async function getNodeVersion(
destPath: string, destPath: string,
nodeVersionFallback = process.env.VERCEL_PROJECT_SETTINGS_NODE_VERSION, fallbackVersion = process.env.VERCEL_PROJECT_SETTINGS_NODE_VERSION,
config: Config = {}, config: Config = {},
meta: Meta = {}, meta: Meta = {},
availableVersions = getAvailableNodeVersions() availableVersions = getAvailableNodeVersions()
): Promise<NodeVersion> { ): Promise<NodeVersion> {
const latest = getLatestNodeVersion(availableVersions); const latestVersion = getLatestNodeVersion(availableVersions);
if (meta.isDev) { if (meta.isDev) {
// Use the system-installed version of `node` in PATH for `vercel dev` // Use the system-installed version of `node` in PATH for `vercel dev`
return { ...latest, runtime: 'nodejs' }; return { ...latestVersion, runtime: 'nodejs' };
} }
const { packageJson } = await scanParentDirs(destPath, true); const { packageJson } = await scanParentDirs(destPath, true);
let nodeVersion = config.nodeVersion || nodeVersionFallback; const configuredVersion = config.nodeVersion || fallbackVersion;
let isAuto = true;
const packageJsonVersion = packageJson?.engines?.node;
const supportedNodeVersion = await getSupportedNodeVersion(
packageJsonVersion || configuredVersion,
!packageJsonVersion,
availableVersions
);
if (packageJson?.engines?.node) { if (packageJson?.engines?.node) {
const { node } = packageJson.engines; const { node } = packageJson.engines;
if (nodeVersion && validRange(node) && !intersects(nodeVersion, node)) { if (
configuredVersion &&
!intersects(configuredVersion, supportedNodeVersion.range)
) {
console.warn( console.warn(
`Warning: Due to "engines": { "node": "${node}" } in your \`package.json\` file, the Node.js Version defined in your Project Settings ("${nodeVersion}") will not apply. Learn More: http://vercel.link/node-version` `Warning: Due to "engines": { "node": "${node}" } in your \`package.json\` file, the Node.js Version defined in your Project Settings ("${configuredVersion}") will not apply. Learn More: http://vercel.link/node-version`
); );
} else if (coerce(node)?.raw === node) { }
if (coerce(node)?.raw === node) {
console.warn( console.warn(
`Warning: Detected "engines": { "node": "${node}" } in your \`package.json\` with major.minor.patch, but only major Node.js Version can be selected. Learn More: http://vercel.link/node-version` `Warning: Detected "engines": { "node": "${node}" } in your \`package.json\` with major.minor.patch, but only major Node.js Version can be selected. Learn More: http://vercel.link/node-version`
); );
} else if (validRange(node) && intersects(`${latest.major + 1}.x`, node)) { } else if (
validRange(node) &&
intersects(`${latestVersion.major + 1}.x`, node)
) {
console.warn( console.warn(
`Warning: Detected "engines": { "node": "${node}" } in your \`package.json\` that will automatically upgrade when a new major Node.js Version is released. Learn More: http://vercel.link/node-version` `Warning: Detected "engines": { "node": "${node}" } in your \`package.json\` that will automatically upgrade when a new major Node.js Version is released. Learn More: http://vercel.link/node-version`
); );
} }
nodeVersion = node;
isAuto = false;
} }
return getSupportedNodeVersion(nodeVersion, isAuto, availableVersions); return supportedNodeVersion;
} }
export async function scanParentDirs( export async function scanParentDirs(
@@ -413,9 +426,8 @@ export async function runNpmInstall(
try { try {
await runNpmInstallSema.acquire(); await runNpmInstallSema.acquire();
const { cliType, packageJsonPath, lockfileVersion } = await scanParentDirs( const { cliType, packageJsonPath, packageJson, lockfileVersion } =
destPath await scanParentDirs(destPath, true);
);
if (!packageJsonPath) { if (!packageJsonPath) {
debug( debug(
@@ -450,6 +462,7 @@ export async function runNpmInstall(
opts.env = getEnvForPackageManager({ opts.env = getEnvForPackageManager({
cliType, cliType,
lockfileVersion, lockfileVersion,
packageJsonPackageManager: packageJson?.packageManager,
nodeVersion, nodeVersion,
env, env,
}); });
@@ -534,14 +547,19 @@ export async function runNpmInstall(
export function getEnvForPackageManager({ export function getEnvForPackageManager({
cliType, cliType,
lockfileVersion, lockfileVersion,
packageJsonPackageManager,
nodeVersion, nodeVersion,
env, env,
}: { }: {
cliType: CliType; cliType: CliType;
lockfileVersion: number | undefined; lockfileVersion: number | undefined;
packageJsonPackageManager?: string | undefined;
nodeVersion: NodeVersion | undefined; nodeVersion: NodeVersion | undefined;
env: { [x: string]: string | undefined }; env: { [x: string]: string | undefined };
}) { }) {
const corepackFlagged = env.ENABLE_EXPERIMENTAL_COREPACK === '1';
const corepackEnabled = corepackFlagged && Boolean(packageJsonPackageManager);
const { const {
detectedLockfile, detectedLockfile,
detectedPackageManager, detectedPackageManager,
@@ -549,10 +567,20 @@ export function getEnvForPackageManager({
} = getPathOverrideForPackageManager({ } = getPathOverrideForPackageManager({
cliType, cliType,
lockfileVersion, lockfileVersion,
corepackEnabled,
nodeVersion, nodeVersion,
env,
}); });
if (corepackEnabled) {
debug(
`Detected corepack use for "${packageJsonPackageManager}". Not overriding package manager version.`
);
} else {
debug(
`Detected ${detectedPackageManager}. Added "${newPath}" to path. Based on assumed package manager "${cliType}", lockfile "${detectedLockfile}", and lockfileVersion "${lockfileVersion}"`
);
}
const newEnv: { [x: string]: string | undefined } = { const newEnv: { [x: string]: string | undefined } = {
...env, ...env,
}; };
@@ -594,6 +622,7 @@ export function getEnvForPackageManager({
type DetectedPnpmVersion = type DetectedPnpmVersion =
| 'not found' | 'not found'
| 'pnpm 6'
| 'pnpm 7' | 'pnpm 7'
| 'pnpm 8' | 'pnpm 8'
| 'pnpm 9' | 'pnpm 9'
@@ -608,7 +637,9 @@ function detectPnpmVersion(
return 'corepack_enabled'; return 'corepack_enabled';
case lockfileVersion === undefined: case lockfileVersion === undefined:
return 'not found'; return 'not found';
case lockfileVersion === 5.3 || lockfileVersion === 5.4: case lockfileVersion === 5.3:
return 'pnpm 6';
case lockfileVersion === 5.4:
return 'pnpm 7'; return 'pnpm 7';
case lockfileVersion === 6.0 || lockfileVersion === 6.1: case lockfileVersion === 6.0 || lockfileVersion === 6.1:
return 'pnpm 8'; return 'pnpm 8';
@@ -634,13 +665,13 @@ function shouldUseNpm7(
export function getPathOverrideForPackageManager({ export function getPathOverrideForPackageManager({
cliType, cliType,
lockfileVersion, lockfileVersion,
corepackEnabled,
nodeVersion, nodeVersion,
env,
}: { }: {
cliType: CliType; cliType: CliType;
lockfileVersion: number | undefined; lockfileVersion: number | undefined;
corepackEnabled: boolean;
nodeVersion: NodeVersion | undefined; nodeVersion: NodeVersion | undefined;
env: { [x: string]: string | undefined };
}): { }): {
/** /**
* Which lockfile was detected. * Which lockfile was detected.
@@ -662,8 +693,6 @@ export function getPathOverrideForPackageManager({
path: undefined, path: undefined,
}; };
const corepackEnabled = env.ENABLE_EXPERIMENTAL_COREPACK === '1';
switch (cliType) { switch (cliType) {
case 'npm': case 'npm':
switch (true) { switch (true) {
@@ -703,6 +732,7 @@ export function getPathOverrideForPackageManager({
detectedLockfile: 'pnpm-lock.yaml', detectedLockfile: 'pnpm-lock.yaml',
detectedPackageManager: 'pnpm 9', detectedPackageManager: 'pnpm 9',
}; };
case 'pnpm 6':
default: default:
return no_override; return no_override;
} }
@@ -726,6 +756,7 @@ export function getPathOverrideForPackageManager({
/** /**
* Helper to get the binary paths that link to the used package manager. * Helper to get the binary paths that link to the used package manager.
* Note: Make sure it doesn't contain any `console.log` calls. * Note: Make sure it doesn't contain any `console.log` calls.
* @deprecated use `getEnvForPackageManager` instead
*/ */
export function getPathForPackageManager({ export function getPathForPackageManager({
cliType, cliType,
@@ -757,11 +788,16 @@ export function getPathForPackageManager({
*/ */
yarnNodeLinker: string | undefined; yarnNodeLinker: string | undefined;
} { } {
// This is not the correct check for whether or not corepack is being used. For that, you'd have to check
// the package.json's `packageManager` property. However, this deprecated function is keeping it's old,
// broken behavior.
const corepackEnabled = env.ENABLE_EXPERIMENTAL_COREPACK === '1';
const overrides = getPathOverrideForPackageManager({ const overrides = getPathOverrideForPackageManager({
cliType, cliType,
lockfileVersion, lockfileVersion,
corepackEnabled,
nodeVersion, nodeVersion,
env,
}); });
const alreadyInPath = (newPath: string) => { const alreadyInPath = (newPath: string) => {
@@ -796,10 +832,14 @@ export async function runCustomInstallCommand({
spawnOpts?: SpawnOptions; spawnOpts?: SpawnOptions;
}) { }) {
console.log(`Running "install" command: \`${installCommand}\`...`); console.log(`Running "install" command: \`${installCommand}\`...`);
const { cliType, lockfileVersion } = await scanParentDirs(destPath); const { cliType, lockfileVersion, packageJson } = await scanParentDirs(
destPath,
true
);
const env = getEnvForPackageManager({ const env = getEnvForPackageManager({
cliType, cliType,
lockfileVersion, lockfileVersion,
packageJsonPackageManager: packageJson?.packageManager,
nodeVersion, nodeVersion,
env: spawnOpts?.env || {}, env: spawnOpts?.env || {},
}); });
@@ -837,6 +877,7 @@ export async function runPackageJsonScript(
env: getEnvForPackageManager({ env: getEnvForPackageManager({
cliType, cliType,
lockfileVersion, lockfileVersion,
packageJsonPackageManager: packageJson?.packageManager,
nodeVersion: undefined, nodeVersion: undefined,
env: cloneEnv(process.env, spawnOpts?.env), env: cloneEnv(process.env, spawnOpts?.env),
}), }),

View File

@@ -35,6 +35,7 @@ describe('Test `getEnvForPackageManager()`', () => {
args: { args: {
cliType: 'npm', cliType: 'npm',
nodeVersion: { major: 14, range: '14.x', runtime: 'nodejs14.x' }, nodeVersion: { major: 14, range: '14.x', runtime: 'nodejs14.x' },
packageJsonPackageManager: undefined,
lockfileVersion: 1, lockfileVersion: 1,
env: { env: {
FOO: 'bar', FOO: 'bar',
@@ -51,6 +52,7 @@ describe('Test `getEnvForPackageManager()`', () => {
args: { args: {
cliType: 'npm', cliType: 'npm',
nodeVersion: { major: 14, range: '14.x', runtime: 'nodejs14.x' }, nodeVersion: { major: 14, range: '14.x', runtime: 'nodejs14.x' },
packageJsonPackageManager: undefined,
lockfileVersion: 2, lockfileVersion: 2,
env: { env: {
FOO: 'bar', FOO: 'bar',
@@ -69,6 +71,7 @@ describe('Test `getEnvForPackageManager()`', () => {
args: { args: {
cliType: 'npm', cliType: 'npm',
nodeVersion: { major: 14, range: '14.x', runtime: 'nodejs14.x' }, nodeVersion: { major: 14, range: '14.x', runtime: 'nodejs14.x' },
packageJsonPackageManager: 'pnpm@latest',
lockfileVersion: 2, lockfileVersion: 2,
env: { env: {
FOO: 'bar', FOO: 'bar',
@@ -87,6 +90,7 @@ describe('Test `getEnvForPackageManager()`', () => {
args: { args: {
cliType: 'npm', cliType: 'npm',
nodeVersion: { major: 14, range: '14.x', runtime: 'nodejs14.x' }, nodeVersion: { major: 14, range: '14.x', runtime: 'nodejs14.x' },
packageJsonPackageManager: undefined,
lockfileVersion: 2, lockfileVersion: 2,
env: { env: {
FOO: 'bar', FOO: 'bar',
@@ -105,6 +109,7 @@ describe('Test `getEnvForPackageManager()`', () => {
args: { args: {
cliType: 'npm', cliType: 'npm',
nodeVersion: { major: 16, range: '16.x', runtime: 'nodejs16.x' }, nodeVersion: { major: 16, range: '16.x', runtime: 'nodejs16.x' },
packageJsonPackageManager: undefined,
lockfileVersion: 2, lockfileVersion: 2,
env: { env: {
FOO: 'bar', FOO: 'bar',
@@ -123,6 +128,7 @@ describe('Test `getEnvForPackageManager()`', () => {
args: { args: {
cliType: 'yarn', cliType: 'yarn',
nodeVersion: { major: 16, range: '16.x', runtime: 'nodejs16.x' }, nodeVersion: { major: 16, range: '16.x', runtime: 'nodejs16.x' },
packageJsonPackageManager: undefined,
lockfileVersion: 2, lockfileVersion: 2,
env: { env: {
FOO: 'bar', FOO: 'bar',
@@ -140,6 +146,7 @@ describe('Test `getEnvForPackageManager()`', () => {
args: { args: {
cliType: 'yarn', cliType: 'yarn',
nodeVersion: { major: 16, range: '16.x', runtime: 'nodejs16.x' }, nodeVersion: { major: 16, range: '16.x', runtime: 'nodejs16.x' },
packageJsonPackageManager: undefined,
lockfileVersion: 2, lockfileVersion: 2,
env: { env: {
FOO: 'bar', FOO: 'bar',
@@ -158,6 +165,7 @@ describe('Test `getEnvForPackageManager()`', () => {
args: { args: {
cliType: 'pnpm', cliType: 'pnpm',
nodeVersion: { major: 16, range: '16.x', runtime: 'nodejs16.x' }, nodeVersion: { major: 16, range: '16.x', runtime: 'nodejs16.x' },
packageJsonPackageManager: undefined,
lockfileVersion: 5.4, lockfileVersion: 5.4,
env: { env: {
FOO: 'bar', FOO: 'bar',
@@ -177,6 +185,7 @@ describe('Test `getEnvForPackageManager()`', () => {
args: { args: {
cliType: 'pnpm', cliType: 'pnpm',
nodeVersion: { major: 18, range: '18.x', runtime: 'nodejs18.x' }, nodeVersion: { major: 18, range: '18.x', runtime: 'nodejs18.x' },
packageJsonPackageManager: undefined,
lockfileVersion: 6.0, lockfileVersion: 6.0,
env: { env: {
FOO: 'bar', FOO: 'bar',
@@ -196,6 +205,7 @@ describe('Test `getEnvForPackageManager()`', () => {
args: { args: {
cliType: 'pnpm', cliType: 'pnpm',
nodeVersion: { major: 18, range: '18.x', runtime: 'nodejs18.x' }, nodeVersion: { major: 18, range: '18.x', runtime: 'nodejs18.x' },
packageJsonPackageManager: undefined,
lockfileVersion: 9.0, lockfileVersion: 9.0,
env: { env: {
FOO: 'bar', FOO: 'bar',
@@ -215,6 +225,7 @@ describe('Test `getEnvForPackageManager()`', () => {
args: { args: {
cliType: 'bun', cliType: 'bun',
nodeVersion: { major: 18, range: '18.x', runtime: 'nodejs18.x' }, nodeVersion: { major: 18, range: '18.x', runtime: 'nodejs18.x' },
packageJsonPackageManager: undefined,
lockfileVersion: 0, lockfileVersion: 0,
env: { env: {
FOO: 'bar', FOO: 'bar',
@@ -234,6 +245,7 @@ describe('Test `getEnvForPackageManager()`', () => {
args: { args: {
cliType: 'pnpm', cliType: 'pnpm',
nodeVersion: { major: 16, range: '16.x', runtime: 'nodejs16.x' }, nodeVersion: { major: 16, range: '16.x', runtime: 'nodejs16.x' },
packageJsonPackageManager: 'npm@latest',
lockfileVersion: 5.4, lockfileVersion: 5.4,
env: { env: {
FOO: 'bar', FOO: 'bar',
@@ -252,6 +264,7 @@ describe('Test `getEnvForPackageManager()`', () => {
args: { args: {
cliType: 'pnpm', cliType: 'pnpm',
nodeVersion: { major: 16, range: '16.x', runtime: 'nodejs16.x' }, nodeVersion: { major: 16, range: '16.x', runtime: 'nodejs16.x' },
packageJsonPackageManager: undefined,
lockfileVersion: 5.4, lockfileVersion: 5.4,
env: { env: {
FOO: 'bar', FOO: 'bar',
@@ -270,6 +283,7 @@ describe('Test `getEnvForPackageManager()`', () => {
getEnvForPackageManager({ getEnvForPackageManager({
cliType: args.cliType, cliType: args.cliType,
lockfileVersion: args.lockfileVersion, lockfileVersion: args.lockfileVersion,
packageJsonPackageManager: args.packageJsonPackageManager,
nodeVersion: args.nodeVersion, nodeVersion: args.nodeVersion,
env: args.env, env: args.env,
}) })
@@ -302,6 +316,7 @@ describe('Test `getPathOverrideForPackageManager()`', () => {
args: { args: {
cliType: 'npm', cliType: 'npm',
nodeVersion: { major: 14, range: '14.x', runtime: 'nodejs14.x' }, nodeVersion: { major: 14, range: '14.x', runtime: 'nodejs14.x' },
packageJsonPackageManager: undefined,
lockfileVersion: 1, lockfileVersion: 1,
env: { env: {
FOO: 'bar', FOO: 'bar',
@@ -318,6 +333,7 @@ describe('Test `getPathOverrideForPackageManager()`', () => {
args: { args: {
cliType: 'npm', cliType: 'npm',
nodeVersion: { major: 14, range: '14.x', runtime: 'nodejs14.x' }, nodeVersion: { major: 14, range: '14.x', runtime: 'nodejs14.x' },
packageJsonPackageManager: undefined,
lockfileVersion: 2, lockfileVersion: 2,
env: { env: {
FOO: 'bar', FOO: 'bar',
@@ -335,6 +351,7 @@ describe('Test `getPathOverrideForPackageManager()`', () => {
args: { args: {
cliType: 'npm', cliType: 'npm',
nodeVersion: { major: 14, range: '14.x', runtime: 'nodejs14.x' }, nodeVersion: { major: 14, range: '14.x', runtime: 'nodejs14.x' },
packageJsonPackageManager: 'pnpm@latest',
lockfileVersion: 2, lockfileVersion: 2,
env: { env: {
FOO: 'bar', FOO: 'bar',
@@ -353,6 +370,7 @@ describe('Test `getPathOverrideForPackageManager()`', () => {
args: { args: {
cliType: 'npm', cliType: 'npm',
nodeVersion: { major: 16, range: '16.x', runtime: 'nodejs16.x' }, nodeVersion: { major: 16, range: '16.x', runtime: 'nodejs16.x' },
packageJsonPackageManager: undefined,
lockfileVersion: 2, lockfileVersion: 2,
env: { env: {
FOO: 'bar', FOO: 'bar',
@@ -365,11 +383,30 @@ describe('Test `getPathOverrideForPackageManager()`', () => {
path: undefined, path: undefined,
}, },
}, },
{
name: 'should not set path if pnpm 6 is detected',
args: {
cliType: 'pnpm',
nodeVersion: { major: 16, range: '16.x', runtime: 'nodejs16.x' },
packageJsonPackageManager: undefined,
lockfileVersion: 5.3, // detects as pnpm@6, which is the default
env: {
FOO: 'bar',
PATH: 'foo',
},
},
want: {
detectedLockfile: undefined,
detectedPackageManager: undefined,
path: undefined,
},
},
{ {
name: 'should set path if pnpm 7+ is detected', name: 'should set path if pnpm 7+ is detected',
args: { args: {
cliType: 'pnpm', cliType: 'pnpm',
nodeVersion: { major: 16, range: '16.x', runtime: 'nodejs16.x' }, nodeVersion: { major: 16, range: '16.x', runtime: 'nodejs16.x' },
packageJsonPackageManager: undefined,
lockfileVersion: 5.4, lockfileVersion: 5.4,
env: { env: {
FOO: 'bar', FOO: 'bar',
@@ -387,6 +424,7 @@ describe('Test `getPathOverrideForPackageManager()`', () => {
args: { args: {
cliType: 'pnpm', cliType: 'pnpm',
nodeVersion: { major: 18, range: '18.x', runtime: 'nodejs18.x' }, nodeVersion: { major: 18, range: '18.x', runtime: 'nodejs18.x' },
packageJsonPackageManager: undefined,
lockfileVersion: 6.1, lockfileVersion: 6.1,
env: { env: {
FOO: 'bar', FOO: 'bar',
@@ -404,6 +442,7 @@ describe('Test `getPathOverrideForPackageManager()`', () => {
args: { args: {
cliType: 'pnpm', cliType: 'pnpm',
nodeVersion: { major: 18, range: '18.x', runtime: 'nodejs18.x' }, nodeVersion: { major: 18, range: '18.x', runtime: 'nodejs18.x' },
packageJsonPackageManager: undefined,
lockfileVersion: 7.0, lockfileVersion: 7.0,
env: { env: {
FOO: 'bar', FOO: 'bar',
@@ -421,6 +460,7 @@ describe('Test `getPathOverrideForPackageManager()`', () => {
args: { args: {
cliType: 'bun', cliType: 'bun',
nodeVersion: { major: 18, range: '18.x', runtime: 'nodejs18.x' }, nodeVersion: { major: 18, range: '18.x', runtime: 'nodejs18.x' },
packageJsonPackageManager: undefined,
lockfileVersion: 0, lockfileVersion: 0,
env: { env: {
FOO: 'bar', FOO: 'bar',
@@ -438,6 +478,7 @@ describe('Test `getPathOverrideForPackageManager()`', () => {
args: { args: {
cliType: 'pnpm', cliType: 'pnpm',
nodeVersion: { major: 16, range: '16.x', runtime: 'nodejs16.x' }, nodeVersion: { major: 16, range: '16.x', runtime: 'nodejs16.x' },
packageJsonPackageManager: 'npm@latest',
lockfileVersion: 5.4, lockfileVersion: 5.4,
env: { env: {
FOO: 'bar', FOO: 'bar',
@@ -455,16 +496,18 @@ describe('Test `getPathOverrideForPackageManager()`', () => {
getPathOverrideForPackageManager({ getPathOverrideForPackageManager({
cliType: args.cliType, cliType: args.cliType,
lockfileVersion: args.lockfileVersion, lockfileVersion: args.lockfileVersion,
// naive assumption that enabling corepack as a feature means it's used, but this is fine for tests
corepackEnabled: Boolean(args.env.ENABLE_EXPERIMENTAL_COREPACK),
nodeVersion: args.nodeVersion, nodeVersion: args.nodeVersion,
env: args.env,
}) })
).toStrictEqual(want); ).toStrictEqual(want);
}); });
}); });
describe('Test `getPathForPackageManager()`', () => { describe('Test `getPathForPackageManager()`', () => {
test.each<{ test.each<{
name: string; name: string;
args: Parameters<typeof getEnvForPackageManager>[0]; args: Parameters<typeof getPathForPackageManager>[0];
want: unknown; want: unknown;
}>([ }>([
{ {

View File

@@ -221,6 +221,21 @@ it('should warn when package.json engines is greater than', async () => {
]); ]);
}); });
it('should warn when project settings gets overrided', async () => {
expect(
await getNodeVersion(
path.join(__dirname, 'pkg-engine-node-greaterthan'),
undefined,
{ nodeVersion: '16.x' },
{}
)
).toHaveProperty('range', '20.x');
expect(warningMessages).toStrictEqual([
'Warning: Due to "engines": { "node": ">=16" } in your `package.json` file, the Node.js Version defined in your Project Settings ("16.x") will not apply. Learn More: http://vercel.link/node-version',
'Warning: Detected "engines": { "node": ">=16" } in your `package.json` that will automatically upgrade when a new major Node.js Version is released. Learn More: http://vercel.link/node-version',
]);
});
it('should not warn when package.json engines matches project setting from config', async () => { it('should not warn when package.json engines matches project setting from config', async () => {
expect( expect(
await getNodeVersion( await getNodeVersion(

View File

@@ -1,5 +1,73 @@
# vercel # 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`](https://github.com/vercel/vercel/commit/c9d53d4e3e4591b9b6bde86100564c9ee4c6d1d4), [`5f561f8cf`](https://github.com/vercel/vercel/commit/5f561f8cfa4720801a5cf4598f193ab34539abb9)]:
- @vercel/next@4.2.14
## 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`](https://github.com/vercel/vercel/commit/8e44ef5b9d2cdbe743c7f1e3534f182465fed9bf), [`61e6af374`](https://github.com/vercel/vercel/commit/61e6af3740296c11015d0c3da84ee205020b0ea6)]:
- @vercel/next@4.2.13
## 34.2.1
### Patch Changes
- Support incremental PPR for large applications ([#11625](https://github.com/vercel/vercel/pull/11625))
- Updated dependencies [[`73e558913`](https://github.com/vercel/vercel/commit/73e558913ab30ba097d7536a12fa8a7c967479f0)]:
- @vercel/next@4.2.12
## 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`](https://github.com/vercel/vercel/commit/d3c1267e24082789ea6382cf6af81dd40df288ff), [`ccd7eb1fb`](https://github.com/vercel/vercel/commit/ccd7eb1fb78f7ac9effdbe1935de3bda82c97fe3)]:
- @vercel/build-utils@8.2.0
- @vercel/node@3.1.5
- @vercel/static-build@2.5.9
## 34.1.14
### Patch Changes
- Updated dependencies [[`ad6945435`](https://github.com/vercel/vercel/commit/ad69454352b519b2b0ed326f245c779530554bf2)]:
- @vercel/build-utils@8.1.3
- @vercel/node@3.1.4
- @vercel/static-build@2.5.8
## 34.1.13
### Patch Changes
- Updated dependencies [[`1682ad43d`](https://github.com/vercel/vercel/commit/1682ad43d0064b22b1248a7e946746b838f00076)]:
- @vercel/build-utils@8.1.2
- @vercel/node@3.1.3
- @vercel/static-build@2.5.7
## 34.1.12
### Patch Changes
- Updated dependencies [[`67afc2608`](https://github.com/vercel/vercel/commit/67afc26085e2ebdaa33a8cbce112afec4cb1c4f5), [`2f7a6ed5f`](https://github.com/vercel/vercel/commit/2f7a6ed5f92d454000f92247d3b6548e2064f4e6)]:
- @vercel/next@4.2.11
- @vercel/build-utils@8.1.1
- @vercel/node@3.1.2
- @vercel/static-build@2.5.6
## 34.1.11 ## 34.1.11
### Patch Changes ### Patch Changes

View File

@@ -1,6 +1,6 @@
{ {
"name": "vercel", "name": "vercel",
"version": "34.1.11", "version": "34.2.3",
"preferGlobal": true, "preferGlobal": true,
"license": "Apache-2.0", "license": "Apache-2.0",
"description": "The command-line interface for Vercel", "description": "The command-line interface for Vercel",
@@ -32,17 +32,17 @@
"node": ">= 16" "node": ">= 16"
}, },
"dependencies": { "dependencies": {
"@vercel/build-utils": "8.1.0", "@vercel/build-utils": "8.2.0",
"@vercel/fun": "1.1.0", "@vercel/fun": "1.1.0",
"@vercel/go": "3.1.1", "@vercel/go": "3.1.1",
"@vercel/hydrogen": "1.0.2", "@vercel/hydrogen": "1.0.2",
"@vercel/next": "4.2.10", "@vercel/next": "4.2.14",
"@vercel/node": "3.1.1", "@vercel/node": "3.1.5",
"@vercel/python": "4.2.0", "@vercel/python": "4.2.0",
"@vercel/redwood": "2.0.9", "@vercel/redwood": "2.0.9",
"@vercel/remix-builder": "2.1.6", "@vercel/remix-builder": "2.1.6",
"@vercel/ruby": "2.1.0", "@vercel/ruby": "2.1.0",
"@vercel/static-build": "2.5.5", "@vercel/static-build": "2.5.9",
"chokidar": "3.3.1" "chokidar": "3.3.1"
}, },
"devDependencies": { "devDependencies": {
@@ -92,8 +92,8 @@
"@types/yauzl-promise": "2.1.0", "@types/yauzl-promise": "2.1.0",
"@vercel-internals/constants": "1.0.4", "@vercel-internals/constants": "1.0.4",
"@vercel-internals/get-package-json": "1.0.0", "@vercel-internals/get-package-json": "1.0.0",
"@vercel-internals/types": "1.0.32", "@vercel-internals/types": "1.0.36",
"@vercel/client": "13.2.3", "@vercel/client": "13.2.7",
"@vercel/error-utils": "2.0.2", "@vercel/error-utils": "2.0.2",
"@vercel/frameworks": "3.0.2", "@vercel/frameworks": "3.0.2",
"@vercel/fs-detectors": "5.2.3", "@vercel/fs-detectors": "5.2.3",

View File

@@ -70,7 +70,7 @@ export async function pullEnvRecords(
); );
const query = new URLSearchParams(); const query = new URLSearchParams();
let url = `/v1/env/pull/${projectId}`; let url = `/v2/env/pull/${projectId}`;
if (target) { if (target) {
url += `/${encodeURIComponent(target)}`; url += `/${encodeURIComponent(target)}`;

View File

@@ -0,0 +1,32 @@
{
"name": "cli-extension-exit-code",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"dependencies": {
"cli-extension-fail": "file:../cli-extension-fail"
}
},
"../cli-extension-fail": {
"bin": {
"vercel-fail": "bin.js"
}
},
"../cli-extension-whoami": {
"extraneous": true,
"bin": {
"vercel-mywhoami": "bin.js"
}
},
"node_modules/cli-extension-fail": {
"resolved": "../cli-extension-fail",
"link": true
}
},
"dependencies": {
"cli-extension-fail": {
"version": "file:../cli-extension-fail"
}
}
}

View File

@@ -0,0 +1,6 @@
{
"private": true,
"dependencies": {
"cli-extension-fail": "file:../cli-extension-fail"
}
}

View File

@@ -0,0 +1,2 @@
#!/usr/bin/env node
process.exit(6);

View File

@@ -0,0 +1,6 @@
{
"name": "cli-extension-fail",
"bin": {
"vercel-fail": "bin.js"
}
}

View File

@@ -917,9 +917,9 @@ test('Deploy `api-env` fixture and test `vercel env` command', async () => {
expect(homeJson['MY_STDIN_VAR']).toBe('{"expect":"quotes"}'); expect(homeJson['MY_STDIN_VAR']).toBe('{"expect":"quotes"}');
expect(homeJson['MY_DECRYPTABLE_SECRET_ENV']).toBe('decryptable value'); expect(homeJson['MY_DECRYPTABLE_SECRET_ENV']).toBe('decryptable value');
// system env vars are automatically exposed // system env vars are hidden in dev
expect(apiJson['VERCEL']).toBe('1'); expect(apiJson['VERCEL']).toBeUndefined();
expect(homeJson['VERCEL']).toBe('1'); expect(homeJson['VERCEL']).toBeUndefined();
// sleep before kill, otherwise the dev process doesn't clean up and exit properly // sleep before kill, otherwise the dev process doesn't clean up and exit properly
await sleep(100); await sleep(100);
@@ -949,7 +949,7 @@ test('Deploy `api-env` fixture and test `vercel env` command', async () => {
async function vcEnvPullFetchSystemVars() { async function vcEnvPullFetchSystemVars() {
const { exitCode, stdout, stderr } = await execCli( const { exitCode, stdout, stderr } = await execCli(
binaryPath, binaryPath,
['env', 'pull', '-y'], ['env', 'pull', '-y', '--environment', 'production'],
{ {
cwd: target, cwd: target,
} }
@@ -963,7 +963,7 @@ test('Deploy `api-env` fixture and test `vercel env` command', async () => {
expect(lines).toContain('VERCEL="1"'); expect(lines).toContain('VERCEL="1"');
expect(lines).toContain('VERCEL_URL=""'); expect(lines).toContain('VERCEL_URL=""');
expect(lines).toContain('VERCEL_ENV="development"'); expect(lines).toContain('VERCEL_ENV="production"');
expect(lines).toContain('VERCEL_GIT_PROVIDER=""'); expect(lines).toContain('VERCEL_GIT_PROVIDER=""');
expect(lines).toContain('VERCEL_GIT_REPO_SLUG=""'); expect(lines).toContain('VERCEL_GIT_REPO_SLUG=""');
} }
@@ -980,22 +980,24 @@ test('Deploy `api-env` fixture and test `vercel env` command', async () => {
const localhostNoProtocol = localhost[0].slice('http://'.length); const localhostNoProtocol = localhost[0].slice('http://'.length);
const apiJson = await apiRes.json(); const apiJson = await apiRes.json();
expect(apiJson['VERCEL']).toBe('1'); // environment variables are not set in dev
expect(apiJson['VERCEL']).toBeUndefined();
expect(apiJson['VERCEL_ENV']).toBeUndefined();
expect(apiJson['VERCEL_GIT_PROVIDER']).toBeUndefined();
expect(apiJson['VERCEL_GIT_REPO_SLUG']).toBeUndefined();
// except for these because vc dev
expect(apiJson['VERCEL_URL']).toBe(localhostNoProtocol); expect(apiJson['VERCEL_URL']).toBe(localhostNoProtocol);
expect(apiJson['VERCEL_ENV']).toBe('development');
expect(apiJson['VERCEL_REGION']).toBe('dev1'); expect(apiJson['VERCEL_REGION']).toBe('dev1');
expect(apiJson['VERCEL_GIT_PROVIDER']).toBe('');
expect(apiJson['VERCEL_GIT_REPO_SLUG']).toBe('');
const homeUrl = localhost[0]; const homeUrl = localhost[0];
const homeRes = await fetch(homeUrl); const homeRes = await fetch(homeUrl);
const homeJson = await homeRes.json(); const homeJson = await homeRes.json();
expect(homeJson['VERCEL']).toBe('1'); expect(homeJson['VERCEL']).toBeUndefined();
expect(homeJson['VERCEL_URL']).toBe(localhostNoProtocol); expect(homeJson['VERCEL_URL']).toBe(localhostNoProtocol);
expect(homeJson['VERCEL_ENV']).toBe('development'); expect(homeJson['VERCEL_ENV']).toBeUndefined();
expect(homeJson['VERCEL_REGION']).toBe(undefined); expect(homeJson['VERCEL_REGION']).toBeUndefined();
expect(homeJson['VERCEL_GIT_PROVIDER']).toBe(''); expect(homeJson['VERCEL_GIT_PROVIDER']).toBeUndefined();
expect(homeJson['VERCEL_GIT_REPO_SLUG']).toBe(''); expect(homeJson['VERCEL_GIT_REPO_SLUG']).toBeUndefined();
// sleep before kill, otherwise the dev process doesn't clean up and exit properly // sleep before kill, otherwise the dev process doesn't clean up and exit properly
await sleep(100); await sleep(100);

View File

@@ -1327,6 +1327,19 @@ test('should invoke CLI extension', async () => {
expect(output.stdout, formatted).toContain(`Username: ${contextName}`); expect(output.stdout, formatted).toContain(`Username: ${contextName}`);
}); });
test('should pass through exit code for CLI extension', async () => {
const fixture = path.join(__dirname, 'fixtures/e2e/cli-extension-exit-code');
// Ensure the `.bin` is populated in the fixture
await runNpmInstall(fixture);
const output = await execCli(binaryPath, ['fail'], {
cwd: fixture,
reject: false,
});
expect(output.exitCode).toEqual(6);
});
// NOTE: Order matters here. This must be the last test in the file. // NOTE: Order matters here. This must be the last test in the file.
test('default command should prompt login with empty auth.json', async () => { test('default command should prompt login with empty auth.json', async () => {
await clearAuthConfig(); await clearAuthConfig();

View File

@@ -216,7 +216,7 @@ export function useProject(
res.json(project); res.json(project);
}); });
client.scenario.get( client.scenario.get(
`/v1/env/pull/${project.id}/:target?/:gitBranch?`, `/v2/env/pull/${project.id}/:target?/:gitBranch?`,
(req, res) => { (req, res) => {
const target = const target =
typeof req.params.target === 'string' typeof req.params.target === 'string'
@@ -390,7 +390,7 @@ function exposeSystemEnvs(
) { ) {
const envs: Env = {}; const envs: Env = {};
if (autoExposeSystemEnvs) { if (autoExposeSystemEnvs && target !== 'development') {
envs['VERCEL'] = '1'; envs['VERCEL'] = '1';
envs['VERCEL_ENV'] = target || 'development'; envs['VERCEL_ENV'] = target || 'development';

View File

@@ -205,10 +205,17 @@ describe('env', () => {
}); });
const cwd = setupUnitFixture('vercel-env-pull'); const cwd = setupUnitFixture('vercel-env-pull');
client.cwd = cwd; client.cwd = cwd;
client.setArgv('env', 'pull', 'other.env', '--yes'); client.setArgv(
'env',
'pull',
'other.env',
'--yes',
'--environment',
'production'
);
const exitCodePromise = env(client); const exitCodePromise = env(client);
await expect(client.stderr).toOutput( await expect(client.stderr).toOutput(
'Downloading `development` Environment Variables for Project vercel-env-pull' 'Downloading `production` Environment Variables for Project vercel-env-pull'
); );
await expect(client.stderr).toOutput('Created other.env file'); await expect(client.stderr).toOutput('Created other.env file');
await expect(client.stderr).not.toOutput('and added it to .gitignore'); await expect(client.stderr).not.toOutput('and added it to .gitignore');
@@ -218,10 +225,44 @@ describe('env', () => {
const productionFileHasVercelEnv = rawDevEnv const productionFileHasVercelEnv = rawDevEnv
.toString() .toString()
.includes('VERCEL_ENV="development"'); .includes('VERCEL_ENV="production"');
expect(productionFileHasVercelEnv).toBeTruthy(); expect(productionFileHasVercelEnv).toBeTruthy();
}); });
it('should not expose system env variables in dev', async () => {
useUser();
useTeams('team_dummy');
useProject({
...defaultProject,
id: 'vercel-env-pull',
name: 'vercel-env-pull',
autoExposeSystemEnvs: true,
});
const cwd = setupUnitFixture('vercel-env-pull');
client.cwd = cwd;
client.setArgv('env', 'pull', 'other.env', '--yes');
const exitCodePromise = env(client);
await expect(client.stderr).toOutput(
'Downloading `development` Environment Variables for Project vercel-env-pull'
);
await expect(client.stderr).toOutput('Created other.env file');
await expect(client.stderr).not.toOutput('and added it to .gitignore');
await expect(exitCodePromise).resolves.toEqual(0);
const devEnv = (
await fs.readFile(path.join(cwd, 'other.env'))
).toString();
const devFileHasVercelEnv = [
'VERCEL',
'VERCEL_ENV',
'VERCEL_URL',
'VERCEL_REGION',
'VERCEL_DEPLOYMENT_ID',
].some(envVar => devEnv.includes(envVar));
expect(devFileHasVercelEnv).toBeFalsy();
});
it('should show a delta string', async () => { it('should show a delta string', async () => {
const cwd = setupUnitFixture('vercel-env-pull-delta'); const cwd = setupUnitFixture('vercel-env-pull-delta');
client.cwd = cwd; client.cwd = cwd;

View File

@@ -1,5 +1,33 @@
# @vercel/client # @vercel/client
## 13.2.7
### Patch Changes
- Updated dependencies [[`d3c1267e2`](https://github.com/vercel/vercel/commit/d3c1267e24082789ea6382cf6af81dd40df288ff), [`ccd7eb1fb`](https://github.com/vercel/vercel/commit/ccd7eb1fb78f7ac9effdbe1935de3bda82c97fe3)]:
- @vercel/build-utils@8.2.0
## 13.2.6
### Patch Changes
- Updated dependencies [[`ad6945435`](https://github.com/vercel/vercel/commit/ad69454352b519b2b0ed326f245c779530554bf2)]:
- @vercel/build-utils@8.1.3
## 13.2.5
### Patch Changes
- Updated dependencies [[`1682ad43d`](https://github.com/vercel/vercel/commit/1682ad43d0064b22b1248a7e946746b838f00076)]:
- @vercel/build-utils@8.1.2
## 13.2.4
### Patch Changes
- Updated dependencies [[`2f7a6ed5f`](https://github.com/vercel/vercel/commit/2f7a6ed5f92d454000f92247d3b6548e2064f4e6)]:
- @vercel/build-utils@8.1.1
## 13.2.3 ## 13.2.3
### Patch Changes ### Patch Changes

View File

@@ -1,6 +1,6 @@
{ {
"name": "@vercel/client", "name": "@vercel/client",
"version": "13.2.3", "version": "13.2.7",
"main": "dist/index.js", "main": "dist/index.js",
"typings": "dist/index.d.ts", "typings": "dist/index.d.ts",
"homepage": "https://vercel.com", "homepage": "https://vercel.com",
@@ -37,7 +37,7 @@
"typescript": "4.9.5" "typescript": "4.9.5"
}, },
"dependencies": { "dependencies": {
"@vercel/build-utils": "8.1.0", "@vercel/build-utils": "8.2.0",
"@vercel/error-utils": "2.0.2", "@vercel/error-utils": "2.0.2",
"@vercel/routing-utils": "3.1.0", "@vercel/routing-utils": "3.1.0",
"@zeit/fetch": "5.2.0", "@zeit/fetch": "5.2.0",

View File

@@ -37,7 +37,7 @@
"@types/minimatch": "3.0.5", "@types/minimatch": "3.0.5",
"@types/node": "14.18.33", "@types/node": "14.18.33",
"@types/semver": "7.3.10", "@types/semver": "7.3.10",
"@vercel/build-utils": "8.1.0", "@vercel/build-utils": "8.2.0",
"jest-junit": "16.0.0", "jest-junit": "16.0.0",
"typescript": "4.9.5" "typescript": "4.9.5"
} }

View File

@@ -1,5 +1,33 @@
# @vercel/gatsby-plugin-vercel-builder # @vercel/gatsby-plugin-vercel-builder
## 2.0.31
### Patch Changes
- Updated dependencies [[`d3c1267e2`](https://github.com/vercel/vercel/commit/d3c1267e24082789ea6382cf6af81dd40df288ff), [`ccd7eb1fb`](https://github.com/vercel/vercel/commit/ccd7eb1fb78f7ac9effdbe1935de3bda82c97fe3)]:
- @vercel/build-utils@8.2.0
## 2.0.30
### Patch Changes
- Updated dependencies [[`ad6945435`](https://github.com/vercel/vercel/commit/ad69454352b519b2b0ed326f245c779530554bf2)]:
- @vercel/build-utils@8.1.3
## 2.0.29
### Patch Changes
- Updated dependencies [[`1682ad43d`](https://github.com/vercel/vercel/commit/1682ad43d0064b22b1248a7e946746b838f00076)]:
- @vercel/build-utils@8.1.2
## 2.0.28
### Patch Changes
- Updated dependencies [[`2f7a6ed5f`](https://github.com/vercel/vercel/commit/2f7a6ed5f92d454000f92247d3b6548e2064f4e6)]:
- @vercel/build-utils@8.1.1
## 2.0.27 ## 2.0.27
### Patch Changes ### Patch Changes

View File

@@ -1,6 +1,6 @@
{ {
"name": "@vercel/gatsby-plugin-vercel-builder", "name": "@vercel/gatsby-plugin-vercel-builder",
"version": "2.0.27", "version": "2.0.31",
"main": "dist/index.js", "main": "dist/index.js",
"files": [ "files": [
"dist", "dist",
@@ -20,7 +20,7 @@
}, },
"dependencies": { "dependencies": {
"@sinclair/typebox": "0.25.24", "@sinclair/typebox": "0.25.24",
"@vercel/build-utils": "8.1.0", "@vercel/build-utils": "8.2.0",
"@vercel/routing-utils": "3.1.0", "@vercel/routing-utils": "3.1.0",
"esbuild": "0.14.47", "esbuild": "0.14.47",
"etag": "1.8.1", "etag": "1.8.1",

View File

@@ -29,7 +29,7 @@
"@types/node-fetch": "^2.3.0", "@types/node-fetch": "^2.3.0",
"@types/tar": "6.1.5", "@types/tar": "6.1.5",
"@types/yauzl-promise": "2.1.0", "@types/yauzl-promise": "2.1.0",
"@vercel/build-utils": "8.1.0", "@vercel/build-utils": "8.2.0",
"async-retry": "1.3.3", "async-retry": "1.3.3",
"execa": "^1.0.0", "execa": "^1.0.0",
"fs-extra": "^7.0.0", "fs-extra": "^7.0.0",

View File

@@ -26,7 +26,7 @@
"devDependencies": { "devDependencies": {
"@types/jest": "27.5.1", "@types/jest": "27.5.1",
"@types/node": "14.18.33", "@types/node": "14.18.33",
"@vercel/build-utils": "8.1.0", "@vercel/build-utils": "8.2.0",
"execa": "3.2.0", "execa": "3.2.0",
"fs-extra": "11.1.0", "fs-extra": "11.1.0",
"jest-junit": "16.0.0" "jest-junit": "16.0.0"

View File

@@ -51,11 +51,15 @@ export const build: BuildV2 = async ({
); );
const spawnOpts = getSpawnOptions(meta, nodeVersion); const spawnOpts = getSpawnOptions(meta, nodeVersion);
const { cliType, lockfileVersion } = await scanParentDirs(entrypointDir); const { cliType, lockfileVersion, packageJson } = await scanParentDirs(
entrypointDir,
true
);
spawnOpts.env = getEnvForPackageManager({ spawnOpts.env = getEnvForPackageManager({
cliType, cliType,
lockfileVersion, lockfileVersion,
packageJsonPackageManager: packageJson?.packageManager,
nodeVersion, nodeVersion,
env: spawnOpts.env || {}, env: spawnOpts.env || {},
}); });

View File

@@ -1,5 +1,33 @@
# @vercel/next # @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))
## 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))
## 4.2.12
### Patch Changes
- Support incremental PPR for large applications ([#11625](https://github.com/vercel/vercel/pull/11625))
## 4.2.11
### Patch Changes
- normalize source file locations for special metadata files ([#11579](https://github.com/vercel/vercel/pull/11579))
## 4.2.10 ## 4.2.10
### Patch Changes ### Patch Changes

View File

@@ -1,6 +1,6 @@
{ {
"name": "@vercel/next", "name": "@vercel/next",
"version": "4.2.10", "version": "4.2.14",
"license": "Apache-2.0", "license": "Apache-2.0",
"main": "./dist/index", "main": "./dist/index",
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/next-js", "homepage": "https://vercel.com/docs/runtimes#official-runtimes/next-js",
@@ -40,7 +40,7 @@
"@types/semver": "6.0.0", "@types/semver": "6.0.0",
"@types/text-table": "0.2.1", "@types/text-table": "0.2.1",
"@types/webpack-sources": "3.2.0", "@types/webpack-sources": "3.2.0",
"@vercel/build-utils": "8.1.0", "@vercel/build-utils": "8.2.0",
"@vercel/routing-utils": "3.1.0", "@vercel/routing-utils": "3.1.0",
"async-sema": "3.0.1", "async-sema": "3.0.1",
"buffer-crc32": "0.2.13", "buffer-crc32": "0.2.13",

View File

@@ -257,10 +257,15 @@ export const build: BuildV2 = async ({
const nextVersionRange = await getNextVersionRange(entryPath); const nextVersionRange = await getNextVersionRange(entryPath);
const nodeVersion = await getNodeVersion(entryPath, undefined, config, meta); const nodeVersion = await getNodeVersion(entryPath, undefined, config, meta);
const spawnOpts = getSpawnOptions(meta, nodeVersion); const spawnOpts = getSpawnOptions(meta, nodeVersion);
const { cliType, lockfileVersion } = await scanParentDirs(entryPath); const { cliType, lockfileVersion, packageJson } = await scanParentDirs(
entryPath,
true
);
spawnOpts.env = getEnvForPackageManager({ spawnOpts.env = getEnvForPackageManager({
cliType, cliType,
lockfileVersion, lockfileVersion,
packageJsonPackageManager: packageJson?.packageManager,
nodeVersion, nodeVersion,
env: spawnOpts.env || {}, env: spawnOpts.env || {},
}); });
@@ -1353,6 +1358,11 @@ export const build: BuildV2 = async ({
experimentalPPRRoutes.add(route); experimentalPPRRoutes.add(route);
} }
const isAppPPREnabled = requiredServerFilesManifest
? requiredServerFilesManifest.config.experimental?.ppr === true ||
requiredServerFilesManifest.config.experimental?.ppr === 'incremental'
: false;
if (requiredServerFilesManifest) { if (requiredServerFilesManifest) {
if (!routesManifest) { if (!routesManifest) {
throw new Error( throw new Error(
@@ -1408,6 +1418,7 @@ export const build: BuildV2 = async ({
hasIsr500Page, hasIsr500Page,
variantsManifest, variantsManifest,
experimentalPPRRoutes, experimentalPPRRoutes,
isAppPPREnabled,
}); });
} }
@@ -1927,7 +1938,7 @@ export const build: BuildV2 = async ({
canUsePreviewMode, canUsePreviewMode,
bypassToken: prerenderManifest.bypassToken || '', bypassToken: prerenderManifest.bypassToken || '',
isServerMode, isServerMode,
experimentalPPRRoutes, isAppPPREnabled: false,
hasActionOutputSupport: false, hasActionOutputSupport: false,
}).then(arr => }).then(arr =>
localizeDynamicRoutes( localizeDynamicRoutes(
@@ -1958,7 +1969,7 @@ export const build: BuildV2 = async ({
canUsePreviewMode, canUsePreviewMode,
bypassToken: prerenderManifest.bypassToken || '', bypassToken: prerenderManifest.bypassToken || '',
isServerMode, isServerMode,
experimentalPPRRoutes, isAppPPREnabled: false,
hasActionOutputSupport: false, hasActionOutputSupport: false,
}).then(arr => }).then(arr =>
arr.map(route => { arr.map(route => {
@@ -2157,6 +2168,7 @@ export const build: BuildV2 = async ({
appPathRoutesManifest, appPathRoutesManifest,
isSharedLambdas, isSharedLambdas,
canUsePreviewMode, canUsePreviewMode,
isAppPPREnabled: false,
}); });
await Promise.all( await Promise.all(

View File

@@ -144,6 +144,7 @@ export async function serverBuild({
requiredServerFilesManifest, requiredServerFilesManifest,
variantsManifest, variantsManifest,
experimentalPPRRoutes, experimentalPPRRoutes,
isAppPPREnabled,
}: { }: {
appPathRoutesManifest?: Record<string, string>; appPathRoutesManifest?: Record<string, string>;
dynamicPages: string[]; dynamicPages: string[];
@@ -185,7 +186,15 @@ export async function serverBuild({
requiredServerFilesManifest: NextRequiredServerFilesManifest; requiredServerFilesManifest: NextRequiredServerFilesManifest;
variantsManifest: VariantsManifest | null; variantsManifest: VariantsManifest | null;
experimentalPPRRoutes: ReadonlySet<string>; experimentalPPRRoutes: ReadonlySet<string>;
isAppPPREnabled: boolean;
}): Promise<BuildResult> { }): Promise<BuildResult> {
if (isAppPPREnabled) {
debug(
'experimentalPPRRoutes',
JSON.stringify(Array.from(experimentalPPRRoutes))
);
}
lambdaPages = Object.assign({}, lambdaPages, lambdaAppPaths); lambdaPages = Object.assign({}, lambdaPages, lambdaAppPaths);
const experimentalAllowBundling = Boolean( const experimentalAllowBundling = Boolean(
@@ -217,12 +226,6 @@ export async function serverBuild({
} }
} }
const experimental = {
ppr:
requiredServerFilesManifest.config.experimental?.ppr === true ||
requiredServerFilesManifest.config.experimental?.ppr === 'incremental',
};
let appRscPrefetches: UnwrapPromise<ReturnType<typeof glob>> = {}; let appRscPrefetches: UnwrapPromise<ReturnType<typeof glob>> = {};
let appBuildTraces: UnwrapPromise<ReturnType<typeof glob>> = {}; let appBuildTraces: UnwrapPromise<ReturnType<typeof glob>> = {};
let appDir: string | null = null; let appDir: string | null = null;
@@ -230,7 +233,7 @@ export async function serverBuild({
if (appPathRoutesManifest) { if (appPathRoutesManifest) {
appDir = path.join(pagesDir, '../app'); appDir = path.join(pagesDir, '../app');
appBuildTraces = await glob('**/*.js.nft.json', appDir); appBuildTraces = await glob('**/*.js.nft.json', appDir);
appRscPrefetches = experimental.ppr appRscPrefetches = isAppPPREnabled
? {} ? {}
: await glob(`**/*${RSC_PREFETCH_SUFFIX}`, appDir); : await glob(`**/*${RSC_PREFETCH_SUFFIX}`, appDir);
@@ -249,9 +252,19 @@ export async function serverBuild({
for (const rewrite of afterFilesRewrites) { for (const rewrite of afterFilesRewrites) {
if (rewrite.src && rewrite.dest) { if (rewrite.src && rewrite.dest) {
// ensures that userland rewrites are still correctly matched to their special outputs
// PPR should match .prefetch.rsc, .rsc, and .action
// non-PPR should match .rsc and .action
// we only add `.action` handling to the regex if flagged on in the build
const rscSuffix = isAppPPREnabled
? `(\\.prefetch)?\\.rsc${hasActionOutputSupport ? '|\\.action' : ''}`
: hasActionOutputSupport
? '(\\.action|\\.rsc)'
: '\\.rsc';
rewrite.src = rewrite.src.replace( rewrite.src = rewrite.src.replace(
/\/?\(\?:\/\)\?/, /\/?\(\?:\/\)\?/,
`(?<rscsuff>${experimental.ppr ? '(\\.prefetch)?' : ''}\\.rsc)?(?:/)?` `(?<rscsuff>${rscSuffix})?(?:/)?`
); );
let destQueryIndex = rewrite.dest.indexOf('?'); let destQueryIndex = rewrite.dest.indexOf('?');
@@ -937,6 +950,7 @@ export async function serverBuild({
if (!group.isPrerenders || group.isExperimentalPPR) { if (!group.isPrerenders || group.isExperimentalPPR) {
group.isStreaming = true; group.isStreaming = true;
} }
group.isAppRouter = true; group.isAppRouter = true;
// We create a streaming variant of the Prerender lambda group // We create a streaming variant of the Prerender lambda group
@@ -984,18 +998,24 @@ export async function serverBuild({
apiLambdaGroups: apiLambdaGroups.map(group => ({ apiLambdaGroups: apiLambdaGroups.map(group => ({
pages: group.pages, pages: group.pages,
isPrerender: group.isPrerenders, isPrerender: group.isPrerenders,
isStreaming: group.isStreaming,
isExperimentalPPR: group.isExperimentalPPR,
pseudoLayerBytes: group.pseudoLayerBytes, pseudoLayerBytes: group.pseudoLayerBytes,
uncompressedLayerBytes: group.pseudoLayerUncompressedBytes, uncompressedLayerBytes: group.pseudoLayerUncompressedBytes,
})), })),
pageLambdaGroups: pageLambdaGroups.map(group => ({ pageLambdaGroups: pageLambdaGroups.map(group => ({
pages: group.pages, pages: group.pages,
isPrerender: group.isPrerenders, isPrerender: group.isPrerenders,
isStreaming: group.isStreaming,
isExperimentalPPR: group.isExperimentalPPR,
pseudoLayerBytes: group.pseudoLayerBytes, pseudoLayerBytes: group.pseudoLayerBytes,
uncompressedLayerBytes: group.pseudoLayerUncompressedBytes, uncompressedLayerBytes: group.pseudoLayerUncompressedBytes,
})), })),
appRouterLambdaGroups: appRouterLambdaGroups.map(group => ({ appRouterLambdaGroups: appRouterLambdaGroups.map(group => ({
pages: group.pages, pages: group.pages,
isPrerender: group.isPrerenders, isPrerender: group.isPrerenders,
isStreaming: group.isStreaming,
isExperimentalPPR: group.isExperimentalPPR,
pseudoLayerBytes: group.pseudoLayerBytes, pseudoLayerBytes: group.pseudoLayerBytes,
uncompressedLayerBytes: group.pseudoLayerUncompressedBytes, uncompressedLayerBytes: group.pseudoLayerUncompressedBytes,
})), })),
@@ -1003,6 +1023,8 @@ export async function serverBuild({
appRouterStreamingActionLambdaGroups.map(group => ({ appRouterStreamingActionLambdaGroups.map(group => ({
pages: group.pages, pages: group.pages,
isPrerender: group.isPrerenders, isPrerender: group.isPrerenders,
isStreaming: group.isStreaming,
isExperimentalPPR: group.isExperimentalPPR,
pseudoLayerBytes: group.pseudoLayerBytes, pseudoLayerBytes: group.pseudoLayerBytes,
uncompressedLayerBytes: group.pseudoLayerUncompressedBytes, uncompressedLayerBytes: group.pseudoLayerUncompressedBytes,
})), })),
@@ -1010,6 +1032,8 @@ export async function serverBuild({
group => ({ group => ({
pages: group.pages, pages: group.pages,
isPrerender: group.isPrerenders, isPrerender: group.isPrerenders,
isStreaming: group.isStreaming,
isExperimentalPPR: group.isExperimentalPPR,
pseudoLayerBytes: group.pseudoLayerBytes, pseudoLayerBytes: group.pseudoLayerBytes,
uncompressedLayerBytes: group.pseudoLayerUncompressedBytes, uncompressedLayerBytes: group.pseudoLayerUncompressedBytes,
}) })
@@ -1189,15 +1213,10 @@ export async function serverBuild({
const lambda = await createLambdaFromPseudoLayers(options); const lambda = await createLambdaFromPseudoLayers(options);
// This is a PPR lambda if it's an App Page with the PPR experimental flag
// enabled.
const isPPR =
experimental.ppr && group.isAppRouter && !group.isAppRouteHandler;
// If PPR is enabled and this is an App Page, create the non-streaming // If PPR is enabled and this is an App Page, create the non-streaming
// lambda for the page for revalidation. // lambda for the page for revalidation.
let revalidate: NodejsLambda | undefined; let revalidate: NodejsLambda | undefined;
if (isPPR) { if (group.isExperimentalPPR) {
if (!options.isStreaming) { if (!options.isStreaming) {
throw new Error("Invariant: PPR lambda isn't streaming"); throw new Error("Invariant: PPR lambda isn't streaming");
} }
@@ -1214,14 +1233,11 @@ export async function serverBuild({
// This is the name of the page, where the root is `index`. // This is the name of the page, where the root is `index`.
const pageName = pageFilename.replace(/\.js$/, ''); const pageName = pageFilename.replace(/\.js$/, '');
// This is the name of the page prefixed with a `/`, where the root is
// `/index`.
const pagePath = path.posix.join('/', pageName);
// This is the routable pathname for the page, where the root is `/`. // This is the routable pathname for the page, where the root is `/`.
const pagePathname = pagePath === '/index' ? '/' : pagePath; const pagePathname = normalizePage(pageName);
let isPrerender = prerenderRoutes.has(pagePathname); let isPrerender = prerenderRoutes.has(pagePathname);
const isRoutePPREnabled = experimentalPPRRoutes.has(pagePathname);
if (!isPrerender && routesManifest?.i18n) { if (!isPrerender && routesManifest?.i18n) {
isPrerender = routesManifest.i18n.locales.some(locale => { isPrerender = routesManifest.i18n.locales.some(locale => {
@@ -1239,7 +1255,7 @@ export async function serverBuild({
} }
// If this is a PPR page, then we should prefix the output name. // If this is a PPR page, then we should prefix the output name.
if (isPPR) { if (isRoutePPREnabled) {
if (!revalidate) { if (!revalidate) {
throw new Error("Invariant: PPR lambda isn't set"); throw new Error("Invariant: PPR lambda isn't set");
} }
@@ -1320,6 +1336,13 @@ export async function serverBuild({
console.timeEnd(lambdaCreationLabel); console.timeEnd(lambdaCreationLabel);
} }
if (isAppPPREnabled) {
debug(
'experimentalStreamingLambdaPaths',
JSON.stringify(Array.from(experimentalStreamingLambdaPaths))
);
}
const prerenderRoute = onPrerenderRoute({ const prerenderRoute = onPrerenderRoute({
appDir, appDir,
pagesDir, pagesDir,
@@ -1339,6 +1362,7 @@ export async function serverBuild({
hasPages404: routesManifest.pages404, hasPages404: routesManifest.pages404,
isCorrectNotFoundRoutes, isCorrectNotFoundRoutes,
isEmptyAllowQueryForPrendered, isEmptyAllowQueryForPrendered,
isAppPPREnabled,
}); });
await Promise.all( await Promise.all(
@@ -1407,7 +1431,7 @@ export async function serverBuild({
bypassToken: prerenderManifest.bypassToken || '', bypassToken: prerenderManifest.bypassToken || '',
isServerMode: true, isServerMode: true,
dynamicMiddlewareRouteMap: middleware.dynamicRouteMap, dynamicMiddlewareRouteMap: middleware.dynamicRouteMap,
experimentalPPRRoutes, isAppPPREnabled,
hasActionOutputSupport, hasActionOutputSupport,
}).then(arr => }).then(arr =>
localizeDynamicRoutes( localizeDynamicRoutes(
@@ -1589,7 +1613,7 @@ export async function serverBuild({
if (lambdas[pathname]) { if (lambdas[pathname]) {
lambdas[`${pathname}.rsc`] = lambdas[pathname]; lambdas[`${pathname}.rsc`] = lambdas[pathname];
if (experimental.ppr) { if (isAppPPREnabled) {
lambdas[`${pathname}${RSC_PREFETCH_SUFFIX}`] = lambdas[pathname]; lambdas[`${pathname}${RSC_PREFETCH_SUFFIX}`] = lambdas[pathname];
} }
} }
@@ -1597,7 +1621,7 @@ export async function serverBuild({
if (edgeFunctions[pathname]) { if (edgeFunctions[pathname]) {
edgeFunctions[`${pathname}.rsc`] = edgeFunctions[pathname]; edgeFunctions[`${pathname}.rsc`] = edgeFunctions[pathname];
if (experimental.ppr) { if (isAppPPREnabled) {
edgeFunctions[`${pathname}${RSC_PREFETCH_SUFFIX}`] = edgeFunctions[`${pathname}${RSC_PREFETCH_SUFFIX}`] =
edgeFunctions[pathname]; edgeFunctions[pathname];
} }
@@ -1616,7 +1640,7 @@ export async function serverBuild({
'RSC, Next-Router-State-Tree, Next-Router-Prefetch'; 'RSC, Next-Router-State-Tree, Next-Router-Prefetch';
const appNotFoundPath = path.posix.join('.', entryDirectory, '_not-found'); const appNotFoundPath = path.posix.join('.', entryDirectory, '_not-found');
if (experimental.ppr && !rscPrefetchHeader) { if (isAppPPREnabled && !rscPrefetchHeader) {
throw new Error("Invariant: cannot use PPR without 'rsc.prefetchHeader'"); throw new Error("Invariant: cannot use PPR without 'rsc.prefetchHeader'");
} }
@@ -1624,7 +1648,7 @@ export async function serverBuild({
// all the routes that support it (and are listed) have configured lambdas. // all the routes that support it (and are listed) have configured lambdas.
// This only applies to routes that do not have fallbacks enabled (these are // This only applies to routes that do not have fallbacks enabled (these are
// routes that have `dynamicParams = false` defined. // routes that have `dynamicParams = false` defined.
if (experimental.ppr) { if (isAppPPREnabled) {
for (const { srcRoute, dataRoute, experimentalPPR } of Object.values( for (const { srcRoute, dataRoute, experimentalPPR } of Object.values(
prerenderManifest.staticRoutes prerenderManifest.staticRoutes
)) { )) {
@@ -1907,7 +1931,7 @@ export async function serverBuild({
...(appDir ...(appDir
? [ ? [
...(rscPrefetchHeader && experimental.ppr ...(rscPrefetchHeader && isAppPPREnabled
? [ ? [
{ {
src: `^${path.posix.join('/', entryDirectory, '/')}`, src: `^${path.posix.join('/', entryDirectory, '/')}`,

View File

@@ -192,8 +192,12 @@ function normalizePage(page: string): string {
if (!page.startsWith('/')) { if (!page.startsWith('/')) {
page = `/${page}`; page = `/${page}`;
} }
// remove '/index' from the end
page = page.replace(/\/index$/, '/'); // Replace the `/index` with `/`
if (page === '/index') {
page = '/';
}
return page; return page;
} }
@@ -320,8 +324,8 @@ export async function getDynamicRoutes({
bypassToken, bypassToken,
isServerMode, isServerMode,
dynamicMiddlewareRouteMap, dynamicMiddlewareRouteMap,
experimentalPPRRoutes,
hasActionOutputSupport, hasActionOutputSupport,
isAppPPREnabled,
}: { }: {
entryPath: string; entryPath: string;
entryDirectory: string; entryDirectory: string;
@@ -333,8 +337,8 @@ export async function getDynamicRoutes({
bypassToken?: string; bypassToken?: string;
isServerMode?: boolean; isServerMode?: boolean;
dynamicMiddlewareRouteMap?: ReadonlyMap<string, RouteWithSrc>; dynamicMiddlewareRouteMap?: ReadonlyMap<string, RouteWithSrc>;
experimentalPPRRoutes: ReadonlySet<string>;
hasActionOutputSupport: boolean; hasActionOutputSupport: boolean;
isAppPPREnabled: boolean;
}): Promise<RouteWithSrc[]> { }): Promise<RouteWithSrc[]> {
if (routesManifest) { if (routesManifest) {
switch (routesManifest.version) { switch (routesManifest.version) {
@@ -408,7 +412,7 @@ export async function getDynamicRoutes({
]; ];
} }
if (experimentalPPRRoutes.has(page)) { if (isAppPPREnabled) {
let dest = route.dest?.replace(/($|\?)/, '.prefetch.rsc$1'); let dest = route.dest?.replace(/($|\?)/, '.prefetch.rsc$1');
if (page === '/' || page === '/index') { if (page === '/' || page === '/index') {
@@ -1439,6 +1443,13 @@ async function getSourceFilePathFromPage({
} }
} }
// if we got here, and didn't find a source not-found file, then it was the one injected
// by Next.js. There's no need to warn or return a source file in this case, as it won't have
// any configuration applied to it.
if (page === '/_not-found/page') {
return '';
}
console.log( console.log(
`WARNING: Unable to find source file for page ${page} with extensions: ${extensionsToTry.join( `WARNING: Unable to find source file for page ${page} with extensions: ${extensionsToTry.join(
', ' ', '
@@ -1498,8 +1509,8 @@ export type LambdaGroup = {
isAppRouter?: boolean; isAppRouter?: boolean;
isAppRouteHandler?: boolean; isAppRouteHandler?: boolean;
isStreaming?: boolean; isStreaming?: boolean;
isPrerenders?: boolean; readonly isPrerenders: boolean;
isExperimentalPPR?: boolean; readonly isExperimentalPPR: boolean;
isActionLambda?: boolean; isActionLambda?: boolean;
isPages?: boolean; isPages?: boolean;
isApiLambda: boolean; isApiLambda: boolean;
@@ -1565,15 +1576,13 @@ export async function getPageLambdaGroups({
} }
if (config && config.functions) { if (config && config.functions) {
// `pages` are normalized without route groups (e.g., /app/(group)/page.js).
// we keep track of that mapping in `inversedAppPathManifest`
// `getSourceFilePathFromPage` needs to use the path from source to properly match the config
const pageFromManifest = inversedAppPathManifest?.[routeName];
const sourceFile = await getSourceFilePathFromPage({ const sourceFile = await getSourceFilePathFromPage({
workPath: entryPath, workPath: entryPath,
// since this function is used by both `pages` and `app`, the manifest might not be provided page: normalizeSourceFilePageFromManifest(
// so fallback to normal behavior of just checking the `page`. routeName,
page: pageFromManifest ?? page, page,
inversedAppPathManifest
),
pageExtensions, pageExtensions,
}); });
@@ -1657,6 +1666,43 @@ export async function getPageLambdaGroups({
return groups; return groups;
} }
// `pages` are normalized without route groups (e.g., /app/(group)/page.js).
// we keep track of that mapping in `inversedAppPathManifest`
// `getSourceFilePathFromPage` needs to use the path from source to properly match the config
function normalizeSourceFilePageFromManifest(
routeName: string,
page: string,
inversedAppPathManifest?: Record<string, string>
) {
const pageFromManifest = inversedAppPathManifest?.[routeName];
if (!pageFromManifest) {
// since this function is used by both `pages` and `app`, the manifest might not be provided
// so fallback to normal behavior of just checking the `page`.
return page;
}
const metadataConventions = [
'/favicon.',
'/icon.',
'/apple-icon.',
'/opengraph-image.',
'/twitter-image.',
'/sitemap.',
'/robots.',
];
// these special metadata files for will not contain `/route` or `/page` suffix, so return the routeName as-is.
const isSpecialFile = metadataConventions.some(convention =>
routeName.startsWith(convention)
);
if (isSpecialFile) {
return routeName;
}
return pageFromManifest;
}
export const outputFunctionFileSizeInfo = ( export const outputFunctionFileSizeInfo = (
pages: string[], pages: string[],
pseudoLayer: PseudoLayer, pseudoLayer: PseudoLayer,
@@ -1906,6 +1952,7 @@ type OnPrerenderRouteArgs = {
routesManifest?: RoutesManifest; routesManifest?: RoutesManifest;
isCorrectNotFoundRoutes?: boolean; isCorrectNotFoundRoutes?: boolean;
isEmptyAllowQueryForPrendered?: boolean; isEmptyAllowQueryForPrendered?: boolean;
isAppPPREnabled: boolean;
}; };
let prerenderGroup = 1; let prerenderGroup = 1;
@@ -1942,6 +1989,7 @@ export const onPrerenderRoute =
routesManifest, routesManifest,
isCorrectNotFoundRoutes, isCorrectNotFoundRoutes,
isEmptyAllowQueryForPrendered, isEmptyAllowQueryForPrendered,
isAppPPREnabled,
} = prerenderRouteArgs; } = prerenderRouteArgs;
if (isBlocking && isFallback) { if (isBlocking && isFallback) {
@@ -2177,22 +2225,6 @@ export const onPrerenderRoute =
initialStatus = 404; initialStatus = 404;
} }
/**
* If the route key had an `/index` suffix added, we need to note it so we
* can remove it from the output path later accurately.
*/
let addedIndexSuffix = false;
if (isAppPathRoute) {
// for literal index routes we need to append an additional /index
// due to the proxy's normalizing for /index routes
if (routeKey !== '/index' && routeKey.endsWith('/index')) {
routeKey = `${routeKey}/index`;
routeFileNoExt = routeKey;
addedIndexSuffix = true;
}
}
let outputPathPage = path.posix.join(entryDirectory, routeFileNoExt); let outputPathPage = path.posix.join(entryDirectory, routeFileNoExt);
if (!isAppPathRoute) { if (!isAppPathRoute) {
@@ -2229,7 +2261,7 @@ export const onPrerenderRoute =
let outputPathPrefetchData: null | string = null; let outputPathPrefetchData: null | string = null;
if (prefetchDataRoute) { if (prefetchDataRoute) {
if (!experimentalPPR) { if (!isAppPPREnabled) {
throw new Error( throw new Error(
"Invariant: prefetchDataRoute can't be set without PPR" "Invariant: prefetchDataRoute can't be set without PPR"
); );
@@ -2386,7 +2418,7 @@ export const onPrerenderRoute =
// static route first, then try the srcRoute if it doesn't exist. If we // static route first, then try the srcRoute if it doesn't exist. If we
// can't find it at all, this constitutes an error. // can't find it at all, this constitutes an error.
experimentalStreamingLambdaPath = experimentalStreamingLambdaPaths.get( experimentalStreamingLambdaPath = experimentalStreamingLambdaPaths.get(
pathnameToOutputName(entryDirectory, routeKey, addedIndexSuffix) pathnameToOutputName(entryDirectory, routeKey)
); );
if (!experimentalStreamingLambdaPath && srcRoute) { if (!experimentalStreamingLambdaPath && srcRoute) {
experimentalStreamingLambdaPath = experimentalStreamingLambdaPath =
@@ -2647,19 +2679,10 @@ export function getNextServerPath(nextVersion: string) {
: 'next/dist/next-server/server'; : 'next/dist/next-server/server';
} }
function pathnameToOutputName( function pathnameToOutputName(entryDirectory: string, pathname: string) {
entryDirectory: string,
pathname: string,
addedIndexSuffix = false
) {
if (pathname === '/') { if (pathname === '/') {
pathname = '/index'; pathname = '/index';
} }
// If the `/index` was added for a route that ended in `/index` we need to
// strip the second one off before joining it with the entryDirectory.
else if (addedIndexSuffix) {
pathname = pathname.replace(/\/index$/, '');
}
return path.posix.join(entryDirectory, pathname); return path.posix.join(entryDirectory, pathname);
} }

View File

@@ -273,6 +273,26 @@ describe(`${__dirname.split(path.sep).pop()}`, () => {
expect(body).toContain(JSON.stringify(['id', '1', 'd'])); expect(body).toContain(JSON.stringify(['id', '1', 'd']));
expect(body).not.toContain(JSON.stringify(['id', '1.action', 'd'])); expect(body).not.toContain(JSON.stringify(['id', '1.action', 'd']));
}); });
it('should work when a rewrite targets an action', async () => {
const targetPath = `${basePath}/rsc/static`;
const canonicalPath = `/rewrite/${basePath}/rsc/static`;
const actionId = findActionId(targetPath, runtime);
const res = await fetch(
`${ctx.deploymentUrl}${canonicalPath}`,
generateFormDataPayload(actionId)
);
expect(res.status).toEqual(200);
expect(res.headers.get('x-matched-path')).toBe(targetPath + '.action');
expect(res.headers.get('content-type')).toBe('text/x-component');
if (runtime === 'node') {
expect(res.headers.get('x-vercel-cache')).toBe('MISS');
} else {
expect(res.headers.get('x-edge-runtime')).toBe('1');
}
});
}); });
describe('pages', () => { describe('pages', () => {

View File

@@ -1 +1,14 @@
module.exports = {}; module.exports = {
rewrites() {
return [
{
source: '/rewrite/rsc/static',
destination: '/rsc/static',
},
{
source: '/rewrite/edge/rsc/static',
destination: '/edge/rsc/static',
},
];
},
};

View File

@@ -1,8 +1,8 @@
{ {
"dependencies": { "dependencies": {
"next": "canary", "next": "canary",
"react": "19.0.0-beta-4508873393-20240430", "react": "19.0.0-rc-f994737d14-20240522",
"react-dom": "19.0.0-beta-4508873393-20240430" "react-dom": "19.0.0-rc-f994737d14-20240522"
}, },
"ignoreNextjsUpdates": true "ignoreNextjsUpdates": true
} }

View File

@@ -1,8 +1,8 @@
{ {
"dependencies": { "dependencies": {
"next": "canary", "next": "canary",
"react": "19.0.0-beta-4508873393-20240430", "react": "19.0.0-rc-f994737d14-20240522",
"react-dom": "19.0.0-beta-4508873393-20240430" "react-dom": "19.0.0-rc-f994737d14-20240522"
}, },
"ignoreNextjsUpdates": true, "ignoreNextjsUpdates": true,
"scripts": { "scripts": {

View File

@@ -1,8 +1,8 @@
{ {
"dependencies": { "dependencies": {
"next": "canary", "next": "canary",
"react": "19.0.0-beta-4508873393-20240430", "react": "19.0.0-rc-f994737d14-20240522",
"react-dom": "19.0.0-beta-4508873393-20240430" "react-dom": "19.0.0-rc-f994737d14-20240522"
}, },
"ignoreNextjsUpdates": true "ignoreNextjsUpdates": true
} }

View File

@@ -1,8 +1,8 @@
{ {
"dependencies": { "dependencies": {
"next": "canary", "next": "canary",
"react": "19.0.0-beta-4508873393-20240430", "react": "19.0.0-rc-f994737d14-20240522",
"react-dom": "19.0.0-beta-4508873393-20240430" "react-dom": "19.0.0-rc-f994737d14-20240522"
}, },
"ignoreNextjsUpdates": true "ignoreNextjsUpdates": true
} }

View File

@@ -7,8 +7,8 @@
}, },
"dependencies": { "dependencies": {
"next": "canary", "next": "canary",
"react": "19.0.0-beta-4508873393-20240430", "react": "19.0.0-rc-f994737d14-20240522",
"react-dom": "19.0.0-beta-4508873393-20240430" "react-dom": "19.0.0-rc-f994737d14-20240522"
}, },
"ignoreNextjsUpdates": true "ignoreNextjsUpdates": true
} }

View File

@@ -0,0 +1,3 @@
export default function Page() {
return <div id="sentinel:static">Static</div>;
}

View File

@@ -1,8 +1,8 @@
{ {
"dependencies": { "dependencies": {
"next": "canary", "next": "canary",
"react": "19.0.0-beta-4508873393-20240430", "react": "19.0.0-rc-f994737d14-20240522",
"react-dom": "19.0.0-beta-4508873393-20240430" "react-dom": "19.0.0-rc-f994737d14-20240522"
}, },
"ignoreNextjsUpdates": true "ignoreNextjsUpdates": true
} }

View File

@@ -56,6 +56,11 @@
"status": 200, "status": 200,
"mustContain": "sentinel:dynamic" "mustContain": "sentinel:dynamic"
}, },
{
"path": "/static",
"status": 200,
"mustContain": "sentinel:static"
},
{ {
"path": "/disabled", "path": "/disabled",
"headers": { "headers": {

View File

@@ -1,8 +1,8 @@
{ {
"dependencies": { "dependencies": {
"next": "canary", "next": "canary",
"react": "19.0.0-beta-4508873393-20240430", "react": "19.0.0-rc-f994737d14-20240522",
"react-dom": "19.0.0-beta-4508873393-20240430" "react-dom": "19.0.0-rc-f994737d14-20240522"
}, },
"ignoreNextjsUpdates": true "ignoreNextjsUpdates": true
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

View File

@@ -0,0 +1 @@
Alt text for opengraph-image

Binary file not shown.

After

Width:  |  Height:  |  Size: 582 KiB

View File

@@ -0,0 +1,2 @@
User-Agent: *
Disallow:

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://vercel.com/</loc>
<lastmod>2023-03-06T18:04:14.008Z</lastmod>
</url>
</urlset>

View File

@@ -0,0 +1 @@
Alt text for twitter image

Binary file not shown.

After

Width:  |  Height:  |  Size: 582 KiB

View File

@@ -1,8 +1,8 @@
{ {
"dependencies": { "dependencies": {
"next": "canary", "next": "canary",
"react": "19.0.0-beta-4508873393-20240430", "react": "19.0.0-rc-f994737d14-20240522",
"react-dom": "19.0.0-beta-4508873393-20240430" "react-dom": "19.0.0-rc-f994737d14-20240522"
}, },
"ignoreNextjsUpdates": true "ignoreNextjsUpdates": true
} }

View File

@@ -7,8 +7,8 @@
}, },
"dependencies": { "dependencies": {
"next": "canary", "next": "canary",
"react": "19.0.0-beta-4508873393-20240430", "react": "19.0.0-rc-f994737d14-20240522",
"react-dom": "19.0.0-beta-4508873393-20240430" "react-dom": "19.0.0-rc-f994737d14-20240522"
}, },
"devDependencies": { "devDependencies": {
"@types/node": "20.4.5", "@types/node": "20.4.5",

View File

@@ -1,8 +1,8 @@
{ {
"dependencies": { "dependencies": {
"next": "canary", "next": "canary",
"react": "19.0.0-beta-4508873393-20240430", "react": "19.0.0-rc-f994737d14-20240522",
"react-dom": "19.0.0-beta-4508873393-20240430" "react-dom": "19.0.0-rc-f994737d14-20240522"
}, },
"ignoreNextjsUpdates": true "ignoreNextjsUpdates": true
} }

View File

@@ -1,8 +1,8 @@
{ {
"dependencies": { "dependencies": {
"next": "canary", "next": "canary",
"react": "19.0.0-beta-4508873393-20240430", "react": "19.0.0-rc-f994737d14-20240522",
"react-dom": "19.0.0-beta-4508873393-20240430" "react-dom": "19.0.0-rc-f994737d14-20240522"
}, },
"ignoreNextjsUpdates": true "ignoreNextjsUpdates": true
} }

View File

@@ -1,8 +1,8 @@
{ {
"dependencies": { "dependencies": {
"next": "canary", "next": "canary",
"react": "19.0.0-beta-4508873393-20240430", "react": "19.0.0-rc-f994737d14-20240522",
"react-dom": "19.0.0-beta-4508873393-20240430" "react-dom": "19.0.0-rc-f994737d14-20240522"
}, },
"ignoreNextjsUpdates": true "ignoreNextjsUpdates": true
} }

View File

@@ -1,8 +1,8 @@
{ {
"dependencies": { "dependencies": {
"next": "canary", "next": "canary",
"react": "19.0.0-beta-4508873393-20240430", "react": "19.0.0-rc-f994737d14-20240522",
"react-dom": "19.0.0-beta-4508873393-20240430" "react-dom": "19.0.0-rc-f994737d14-20240522"
}, },
"ignoreNextjsUpdates": true "ignoreNextjsUpdates": true
} }

View File

@@ -1,8 +1,8 @@
{ {
"dependencies": { "dependencies": {
"next": "canary", "next": "canary",
"react": "19.0.0-beta-4508873393-20240430", "react": "19.0.0-rc-f994737d14-20240522",
"react-dom": "19.0.0-beta-4508873393-20240430" "react-dom": "19.0.0-rc-f994737d14-20240522"
}, },
"ignoreNextjsUpdates": true "ignoreNextjsUpdates": true
} }

View File

@@ -1,8 +1,8 @@
{ {
"dependencies": { "dependencies": {
"next": "canary", "next": "canary",
"react": "19.0.0-beta-4508873393-20240430", "react": "19.0.0-rc-f994737d14-20240522",
"react-dom": "19.0.0-beta-4508873393-20240430" "react-dom": "19.0.0-rc-f994737d14-20240522"
}, },
"ignoreNextjsUpdates": true "ignoreNextjsUpdates": true
} }

View File

@@ -1,8 +1,8 @@
{ {
"dependencies": { "dependencies": {
"next": "canary", "next": "canary",
"react": "19.0.0-beta-4508873393-20240430", "react": "19.0.0-rc-f994737d14-20240522",
"react-dom": "19.0.0-beta-4508873393-20240430" "react-dom": "19.0.0-rc-f994737d14-20240522"
}, },
"ignoreNextjsUpdates": true "ignoreNextjsUpdates": true
} }

View File

@@ -10,8 +10,8 @@
}, },
"dependencies": { "dependencies": {
"next": "canary", "next": "canary",
"react": "19.0.0-beta-4508873393-20240430", "react": "19.0.0-rc-f994737d14-20240522",
"react-dom": "19.0.0-beta-4508873393-20240430" "react-dom": "19.0.0-rc-f994737d14-20240522"
}, },
"ignoreNextjsUpdates": true "ignoreNextjsUpdates": true
} }

View File

@@ -5,8 +5,8 @@
}, },
"dependencies": { "dependencies": {
"next": "canary", "next": "canary",
"react": "19.0.0-beta-4508873393-20240430", "react": "19.0.0-rc-f994737d14-20240522",
"react-dom": "19.0.0-beta-4508873393-20240430" "react-dom": "19.0.0-rc-f994737d14-20240522"
}, },
"ignoreNextjsUpdates": true "ignoreNextjsUpdates": true
} }

View File

@@ -6,8 +6,8 @@
}, },
"dependencies": { "dependencies": {
"next": "canary", "next": "canary",
"react": "19.0.0-beta-4508873393-20240430", "react": "19.0.0-rc-f994737d14-20240522",
"react-dom": "19.0.0-beta-4508873393-20240430" "react-dom": "19.0.0-rc-f994737d14-20240522"
}, },
"ignoreNextjsUpdates": true "ignoreNextjsUpdates": true
} }

View File

@@ -9,8 +9,8 @@
}, },
"dependencies": { "dependencies": {
"next": "canary", "next": "canary",
"react": "19.0.0-beta-4508873393-20240430", "react": "19.0.0-rc-f994737d14-20240522",
"react-dom": "19.0.0-beta-4508873393-20240430" "react-dom": "19.0.0-rc-f994737d14-20240522"
}, },
"ignoreNextjsUpdates": true "ignoreNextjsUpdates": true
} }

View File

@@ -1,8 +1,8 @@
{ {
"dependencies": { "dependencies": {
"next": "canary", "next": "canary",
"react": "19.0.0-beta-4508873393-20240430", "react": "19.0.0-rc-f994737d14-20240522",
"react-dom": "19.0.0-beta-4508873393-20240430" "react-dom": "19.0.0-rc-f994737d14-20240522"
}, },
"ignoreNextjsUpdates": true "ignoreNextjsUpdates": true
} }

View File

@@ -1,8 +1,8 @@
{ {
"dependencies": { "dependencies": {
"next": "canary", "next": "canary",
"react": "19.0.0-beta-4508873393-20240430", "react": "19.0.0-rc-f994737d14-20240522",
"react-dom": "19.0.0-beta-4508873393-20240430" "react-dom": "19.0.0-rc-f994737d14-20240522"
}, },
"ignoreNextjsUpdates": true "ignoreNextjsUpdates": true
} }

View File

@@ -1,8 +1,8 @@
{ {
"dependencies": { "dependencies": {
"next": "canary", "next": "canary",
"react": "19.0.0-beta-4508873393-20240430", "react": "19.0.0-rc-f994737d14-20240522",
"react-dom": "19.0.0-beta-4508873393-20240430" "react-dom": "19.0.0-rc-f994737d14-20240522"
}, },
"ignoreNextjsUpdates": true "ignoreNextjsUpdates": true
} }

View File

@@ -1,8 +1,8 @@
{ {
"dependencies": { "dependencies": {
"next": "canary", "next": "canary",
"react": "19.0.0-beta-4508873393-20240430", "react": "19.0.0-rc-f994737d14-20240522",
"react-dom": "19.0.0-beta-4508873393-20240430" "react-dom": "19.0.0-rc-f994737d14-20240522"
}, },
"ignoreNextjsUpdates": true "ignoreNextjsUpdates": true
} }

View File

@@ -1,8 +1,8 @@
{ {
"dependencies": { "dependencies": {
"next": "canary", "next": "canary",
"react": "19.0.0-beta-4508873393-20240430", "react": "19.0.0-rc-f994737d14-20240522",
"react-dom": "19.0.0-beta-4508873393-20240430" "react-dom": "19.0.0-rc-f994737d14-20240522"
}, },
"ignoreNextjsUpdates": true "ignoreNextjsUpdates": true
} }

View File

@@ -1,8 +1,8 @@
{ {
"dependencies": { "dependencies": {
"next": "canary", "next": "canary",
"react": "19.0.0-beta-4508873393-20240430", "react": "19.0.0-rc-f994737d14-20240522",
"react-dom": "19.0.0-beta-4508873393-20240430" "react-dom": "19.0.0-rc-f994737d14-20240522"
}, },
"ignoreNextjsUpdates": true "ignoreNextjsUpdates": true
} }

View File

@@ -1,8 +1,8 @@
{ {
"dependencies": { "dependencies": {
"next": "canary", "next": "canary",
"react": "19.0.0-beta-4508873393-20240430", "react": "19.0.0-rc-f994737d14-20240522",
"react-dom": "19.0.0-beta-4508873393-20240430" "react-dom": "19.0.0-rc-f994737d14-20240522"
}, },
"ignoreNextjsUpdates": true "ignoreNextjsUpdates": true
} }

View File

@@ -1,8 +1,8 @@
{ {
"dependencies": { "dependencies": {
"next": "canary", "next": "canary",
"react": "19.0.0-beta-4508873393-20240430", "react": "19.0.0-rc-f994737d14-20240522",
"react-dom": "19.0.0-beta-4508873393-20240430" "react-dom": "19.0.0-rc-f994737d14-20240522"
}, },
"ignoreNextjsUpdates": true "ignoreNextjsUpdates": true
} }

View File

@@ -1,8 +1,8 @@
{ {
"dependencies": { "dependencies": {
"next": "canary", "next": "canary",
"react": "19.0.0-beta-4508873393-20240430", "react": "19.0.0-rc-f994737d14-20240522",
"react-dom": "19.0.0-beta-4508873393-20240430" "react-dom": "19.0.0-rc-f994737d14-20240522"
}, },
"ignoreNextjsUpdates": true "ignoreNextjsUpdates": true
} }

View File

@@ -1,8 +1,8 @@
{ {
"dependencies": { "dependencies": {
"next": "canary", "next": "canary",
"react": "19.0.0-beta-4508873393-20240430", "react": "19.0.0-rc-f994737d14-20240522",
"react-dom": "19.0.0-beta-4508873393-20240430" "react-dom": "19.0.0-rc-f994737d14-20240522"
}, },
"ignoreNextjsUpdates": true "ignoreNextjsUpdates": true
} }

View File

@@ -8,8 +8,8 @@
}, },
"dependencies": { "dependencies": {
"next": "canary", "next": "canary",
"react": "19.0.0-beta-4508873393-20240430", "react": "19.0.0-rc-f994737d14-20240522",
"react-dom": "19.0.0-beta-4508873393-20240430" "react-dom": "19.0.0-rc-f994737d14-20240522"
}, },
"ignoreNextjsUpdates": true "ignoreNextjsUpdates": true
} }

View File

@@ -8,8 +8,8 @@
}, },
"dependencies": { "dependencies": {
"next": "canary", "next": "canary",
"react": "19.0.0-beta-4508873393-20240430", "react": "19.0.0-rc-f994737d14-20240522",
"react-dom": "19.0.0-beta-4508873393-20240430" "react-dom": "19.0.0-rc-f994737d14-20240522"
}, },
"ignoreNextjsUpdates": true "ignoreNextjsUpdates": true
} }

View File

@@ -1,8 +1,8 @@
{ {
"dependencies": { "dependencies": {
"next": "canary", "next": "canary",
"react": "19.0.0-beta-4508873393-20240430", "react": "19.0.0-rc-f994737d14-20240522",
"react-dom": "19.0.0-beta-4508873393-20240430" "react-dom": "19.0.0-rc-f994737d14-20240522"
}, },
"ignoreNextjsUpdates": true "ignoreNextjsUpdates": true
} }

View File

@@ -8,8 +8,8 @@
}, },
"dependencies": { "dependencies": {
"next": "canary", "next": "canary",
"react": "19.0.0-beta-4508873393-20240430", "react": "19.0.0-rc-f994737d14-20240522",
"react-dom": "19.0.0-beta-4508873393-20240430", "react-dom": "19.0.0-rc-f994737d14-20240522",
"typescript": "4.9.5" "typescript": "4.9.5"
}, },
"devDependencies": { "devDependencies": {

View File

@@ -5,8 +5,8 @@
}, },
"dependencies": { "dependencies": {
"next": "canary", "next": "canary",
"react": "19.0.0-beta-4508873393-20240430", "react": "19.0.0-rc-f994737d14-20240522",
"react-dom": "19.0.0-beta-4508873393-20240430" "react-dom": "19.0.0-rc-f994737d14-20240522"
}, },
"ignoreNextjsUpdates": true "ignoreNextjsUpdates": true
} }

View File

@@ -5,8 +5,8 @@
}, },
"dependencies": { "dependencies": {
"next": "canary", "next": "canary",
"react": "19.0.0-beta-4508873393-20240430", "react": "19.0.0-rc-f994737d14-20240522",
"react-dom": "19.0.0-beta-4508873393-20240430" "react-dom": "19.0.0-rc-f994737d14-20240522"
}, },
"ignoreNextjsUpdates": true "ignoreNextjsUpdates": true
} }

View File

@@ -5,8 +5,8 @@
}, },
"dependencies": { "dependencies": {
"next": "canary", "next": "canary",
"react": "19.0.0-beta-4508873393-20240430", "react": "19.0.0-rc-f994737d14-20240522",
"react-dom": "19.0.0-beta-4508873393-20240430" "react-dom": "19.0.0-rc-f994737d14-20240522"
}, },
"ignoreNextjsUpdates": true "ignoreNextjsUpdates": true
} }

View File

@@ -1,8 +1,8 @@
{ {
"dependencies": { "dependencies": {
"next": "canary", "next": "canary",
"react": "19.0.0-beta-4508873393-20240430", "react": "19.0.0-rc-f994737d14-20240522",
"react-dom": "19.0.0-beta-4508873393-20240430" "react-dom": "19.0.0-rc-f994737d14-20240522"
}, },
"scripts": { "scripts": {
"dev": "next dev", "dev": "next dev",

View File

@@ -4,8 +4,8 @@
}, },
"dependencies": { "dependencies": {
"next": "canary", "next": "canary",
"react": "19.0.0-beta-4508873393-20240430", "react": "19.0.0-rc-f994737d14-20240522",
"react-dom": "19.0.0-beta-4508873393-20240430" "react-dom": "19.0.0-rc-f994737d14-20240522"
}, },
"ignoreNextjsUpdates": true "ignoreNextjsUpdates": true
} }

View File

@@ -3,8 +3,8 @@
"private": true, "private": true,
"dependencies": { "dependencies": {
"next": "canary", "next": "canary",
"react": "19.0.0-beta-4508873393-20240430", "react": "19.0.0-rc-f994737d14-20240522",
"react-dom": "19.0.0-beta-4508873393-20240430" "react-dom": "19.0.0-rc-f994737d14-20240522"
}, },
"scripts": { "scripts": {
"build": "next build website-preview" "build": "next build website-preview"

View File

@@ -3,7 +3,7 @@
"private": true, "private": true,
"dependencies": { "dependencies": {
"next": "canary", "next": "canary",
"react": "19.0.0-beta-4508873393-20240430", "react": "19.0.0-rc-f994737d14-20240522",
"react-dom": "19.0.0-beta-4508873393-20240430" "react-dom": "19.0.0-rc-f994737d14-20240522"
} }
} }

View File

@@ -1,8 +1,8 @@
{ {
"dependencies": { "dependencies": {
"next": "canary", "next": "canary",
"react": "19.0.0-beta-4508873393-20240430", "react": "19.0.0-rc-f994737d14-20240522",
"react-dom": "19.0.0-beta-4508873393-20240430" "react-dom": "19.0.0-rc-f994737d14-20240522"
}, },
"ignoreNextjsUpdates": true "ignoreNextjsUpdates": true
} }

View File

@@ -1,8 +1,8 @@
{ {
"dependencies": { "dependencies": {
"next": "canary", "next": "canary",
"react": "19.0.0-beta-4508873393-20240430", "react": "19.0.0-rc-f994737d14-20240522",
"react-dom": "19.0.0-beta-4508873393-20240430" "react-dom": "19.0.0-rc-f994737d14-20240522"
}, },
"ignoreNextjsUpdates": true "ignoreNextjsUpdates": true
} }

View File

@@ -4,8 +4,8 @@
}, },
"dependencies": { "dependencies": {
"next": "canary", "next": "canary",
"react": "19.0.0-beta-4508873393-20240430", "react": "19.0.0-rc-f994737d14-20240522",
"react-dom": "19.0.0-beta-4508873393-20240430" "react-dom": "19.0.0-rc-f994737d14-20240522"
}, },
"ignoreNextjsUpdates": true "ignoreNextjsUpdates": true
} }

View File

@@ -1,8 +1,8 @@
{ {
"dependencies": { "dependencies": {
"next": "canary", "next": "canary",
"react": "19.0.0-beta-4508873393-20240430", "react": "19.0.0-rc-f994737d14-20240522",
"react-dom": "19.0.0-beta-4508873393-20240430" "react-dom": "19.0.0-rc-f994737d14-20240522"
}, },
"ignoreNextjsUpdates": true "ignoreNextjsUpdates": true
} }

View File

@@ -1,8 +1,8 @@
{ {
"dependencies": { "dependencies": {
"next": "canary", "next": "canary",
"react": "19.0.0-beta-4508873393-20240430", "react": "19.0.0-rc-f994737d14-20240522",
"react-dom": "19.0.0-beta-4508873393-20240430" "react-dom": "19.0.0-rc-f994737d14-20240522"
}, },
"ignoreNextjsUpdates": true "ignoreNextjsUpdates": true
} }

View File

@@ -1,8 +1,8 @@
{ {
"dependencies": { "dependencies": {
"next": "canary", "next": "canary",
"react": "19.0.0-beta-4508873393-20240430", "react": "19.0.0-rc-f994737d14-20240522",
"react-dom": "19.0.0-beta-4508873393-20240430" "react-dom": "19.0.0-rc-f994737d14-20240522"
}, },
"ignoreNextjsUpdates": true "ignoreNextjsUpdates": true
} }

View File

@@ -1,8 +1,8 @@
{ {
"dependencies": { "dependencies": {
"next": "canary", "next": "canary",
"react": "19.0.0-beta-4508873393-20240430", "react": "19.0.0-rc-f994737d14-20240522",
"react-dom": "19.0.0-beta-4508873393-20240430" "react-dom": "19.0.0-rc-f994737d14-20240522"
}, },
"ignoreNextjsUpdates": true "ignoreNextjsUpdates": true
} }

View File

@@ -6,7 +6,7 @@
] ]
}, },
"overrides": { "overrides": {
"react": "19.0.0-beta-4508873393-20240430", "react": "19.0.0-rc-f994737d14-20240522",
"react-dom": "19.0.0-beta-4508873393-20240430" "react-dom": "19.0.0-rc-f994737d14-20240522"
} }
} }

View File

@@ -8,7 +8,7 @@
}, },
"dependencies": { "dependencies": {
"next": "canary", "next": "canary",
"react": "19.0.0-beta-4508873393-20240430", "react": "19.0.0-rc-f994737d14-20240522",
"react-dom": "19.0.0-beta-4508873393-20240430" "react-dom": "19.0.0-rc-f994737d14-20240522"
} }
} }

View File

@@ -8,7 +8,7 @@
}, },
"dependencies": { "dependencies": {
"next": "canary", "next": "canary",
"react": "19.0.0-beta-4508873393-20240430", "react": "19.0.0-rc-f994737d14-20240522",
"react-dom": "19.0.0-beta-4508873393-20240430" "react-dom": "19.0.0-rc-f994737d14-20240522"
} }
} }

View File

@@ -6,7 +6,7 @@
] ]
}, },
"overrides": { "overrides": {
"react": "19.0.0-beta-4508873393-20240430", "react": "19.0.0-rc-f994737d14-20240522",
"react-dom": "19.0.0-beta-4508873393-20240430" "react-dom": "19.0.0-rc-f994737d14-20240522"
} }
} }

View File

@@ -8,7 +8,7 @@
}, },
"dependencies": { "dependencies": {
"next": "canary", "next": "canary",
"react": "19.0.0-beta-4508873393-20240430", "react": "19.0.0-rc-f994737d14-20240522",
"react-dom": "19.0.0-beta-4508873393-20240430" "react-dom": "19.0.0-rc-f994737d14-20240522"
} }
} }

Some files were not shown because too many files have changed in this diff Show More