mirror of
https://github.com/LukeHagar/vercel.git
synced 2025-12-11 12:57:46 +00:00
Compare commits
106 Commits
@vercel/fr
...
@vercel-in
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a26cbd8199 | ||
|
|
3eb9d8c892 | ||
|
|
83741a0eb9 | ||
|
|
9db0298981 | ||
|
|
af29e9be49 | ||
|
|
c9d53d4e3e | ||
|
|
a26ea7bf12 | ||
|
|
866d0c173d | ||
|
|
5f561f8cfa | ||
|
|
139e8cdb17 | ||
|
|
6529a9ab9c | ||
|
|
61e6af3740 | ||
|
|
8e44ef5b9d | ||
|
|
fe9e27c459 | ||
|
|
8a6dc204fd | ||
|
|
73e558913a | ||
|
|
464cb26255 | ||
|
|
80e0bab0ec | ||
|
|
f900ca8daf | ||
|
|
9ee7d31957 | ||
|
|
1eb76a3ae7 | ||
|
|
ccd7eb1fb7 | ||
|
|
41c44d6594 | ||
|
|
446ac49e2b | ||
|
|
d3c1267e24 | ||
|
|
b09d7b6130 | ||
|
|
f78b315a50 | ||
|
|
ad69454352 | ||
|
|
14059906d3 | ||
|
|
1682ad43d0 | ||
|
|
423630a168 | ||
|
|
2f7a6ed5f9 | ||
|
|
67afc26085 | ||
|
|
c224fb1d2e | ||
|
|
5014b1e82a | ||
|
|
6a8a84907b | ||
|
|
722adf0e10 | ||
|
|
bc5fd41158 | ||
|
|
e87d4c14d0 | ||
|
|
bc95d764b4 | ||
|
|
1b5ce5644f | ||
|
|
18d1703d5b | ||
|
|
5c6f9c0b66 | ||
|
|
809740b385 | ||
|
|
bf9acd023d | ||
|
|
f4ba9cdcf8 | ||
|
|
11584b0e9b | ||
|
|
3023122d4e | ||
|
|
0e774b6be0 | ||
|
|
119f80e961 | ||
|
|
9fe92d7de0 | ||
|
|
0817527f9e | ||
|
|
6476f4f786 | ||
|
|
a5ea04154b | ||
|
|
5a532a5b94 | ||
|
|
c1d8522950 | ||
|
|
50fc27ba57 | ||
|
|
3101d2497f | ||
|
|
4b0716b556 | ||
|
|
124846a3e6 | ||
|
|
30cd0ec898 | ||
|
|
dc974b6797 | ||
|
|
58c6755e0c | ||
|
|
f18575fcd0 | ||
|
|
d6412be6bc | ||
|
|
52e435aa5d | ||
|
|
303256343a | ||
|
|
88f3a816d9 | ||
|
|
3420ba0153 | ||
|
|
3fb97d1d27 | ||
|
|
f11c7024c4 | ||
|
|
5eb4cc6f5d | ||
|
|
b1adaf76ec | ||
|
|
1bf04ba421 | ||
|
|
15475c8a2c | ||
|
|
1c8f0a4c33 | ||
|
|
ba65da97e1 | ||
|
|
28b6b810be | ||
|
|
9fc9a10c82 | ||
|
|
aef56edc35 | ||
|
|
e6a3497fb1 | ||
|
|
763a6d1070 | ||
|
|
21f5e7375e | ||
|
|
256d0fd463 | ||
|
|
5b79603378 | ||
|
|
863199aa0a | ||
|
|
97e02ae506 | ||
|
|
bd9236f228 | ||
|
|
26bc51e0d6 | ||
|
|
21b87d2ee6 | ||
|
|
f765c24689 | ||
|
|
0f12005a68 | ||
|
|
5758838d09 | ||
|
|
9dab15dc88 | ||
|
|
3980c60a3e | ||
|
|
ea774628d5 | ||
|
|
adcfc365a7 | ||
|
|
4c018d4b78 | ||
|
|
7dc4a4223c | ||
|
|
7df8ae9c45 | ||
|
|
532885148b | ||
|
|
f057c94c59 | ||
|
|
64bd6dd057 | ||
|
|
02454d4c02 | ||
|
|
2826563ffa | ||
|
|
f4c181a2c2 |
4
.github/CODEOWNERS
vendored
4
.github/CODEOWNERS
vendored
@@ -5,13 +5,13 @@
|
||||
* @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @erikareads
|
||||
/.github/workflows @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @erikareads @ijjk
|
||||
/packages/fs-detectors @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @erikareads @agadzik @chloetedder
|
||||
/packages/next @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @erikareads @timneutkens @ijjk @ztanner @huozhi @Ethan-Arrowood @styfle
|
||||
/packages/next @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @erikareads @timneutkens @ijjk @ztanner @huozhi @Ethan-Arrowood
|
||||
/packages/routing-utils @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @erikareads @ijjk
|
||||
/packages/static-build @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @erikareads
|
||||
/packages/edge @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @erikareads @vercel/compute
|
||||
/examples @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @erikareads @leerob
|
||||
/examples/create-react-app @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @erikareads @Timer
|
||||
/examples/nextjs @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @erikareads @timneutkens @ijjk @ztanner @huozhi @Ethan-Arrowood @styfle
|
||||
/examples/nextjs @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @erikareads @timneutkens @ijjk @ztanner @huozhi @Ethan-Arrowood
|
||||
/packages/node @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @erikareads @Kikobeats
|
||||
|
||||
# Unrestricted Paths
|
||||
|
||||
85
.github/dependabot.yml
vendored
85
.github/dependabot.yml
vendored
@@ -63,22 +63,27 @@ updates:
|
||||
allow:
|
||||
- dependency-name: '@remix-run*'
|
||||
- dependency-name: '@shopify*'
|
||||
- dependency-name: 'remix*'
|
||||
ignore:
|
||||
- dependency-name: '@remix-run*'
|
||||
update-types:
|
||||
['version-update:semver-major', 'version-update:semver-patch']
|
||||
- dependency-name: 'remix*'
|
||||
update-types:
|
||||
['version-update:semver-major', 'version-update:semver-patch']
|
||||
- dependency-name: '@shopify*'
|
||||
update-types:
|
||||
['version-update:semver-major', 'version-update:semver-patch']
|
||||
groups:
|
||||
core:
|
||||
patterns:
|
||||
- 'remix*'
|
||||
- '@remix-run*'
|
||||
- '@shopify*'
|
||||
update-types:
|
||||
- 'minor'
|
||||
|
||||
- directory: /packages/static-build/test/fixtures/ionic-angular-v7
|
||||
- directory: /packages/static-build/test/fixtures/ionic-angular-v8
|
||||
schedule:
|
||||
interval: 'daily'
|
||||
open-pull-requests-limit: 1
|
||||
@@ -175,6 +180,33 @@ updates:
|
||||
update-types:
|
||||
- 'minor'
|
||||
|
||||
- directory: /packages/static-build/test/fixtures/parcel-v2
|
||||
schedule:
|
||||
interval: 'daily'
|
||||
open-pull-requests-limit: 1
|
||||
reviewers:
|
||||
- 'trek'
|
||||
- 'TooTallNate'
|
||||
- 'EndangeredMassa'
|
||||
- 'erikareads'
|
||||
- 'jeffsee55'
|
||||
- 'onsclom'
|
||||
commit-message:
|
||||
prefix: '[framework-fixtures]'
|
||||
package-ecosystem: 'npm'
|
||||
allow:
|
||||
- dependency-name: 'parcel'
|
||||
ignore:
|
||||
- dependency-name: 'parcel'
|
||||
update-types:
|
||||
['version-update:semver-major', 'version-update:semver-patch']
|
||||
groups:
|
||||
core:
|
||||
patterns:
|
||||
- 'parcel'
|
||||
update-types:
|
||||
- 'minor'
|
||||
|
||||
- directory: /packages/static-build/test/fixtures/preact-v10
|
||||
schedule:
|
||||
interval: 'daily'
|
||||
@@ -222,3 +254,54 @@ updates:
|
||||
- '@stencil/core'
|
||||
update-types:
|
||||
- 'minor'
|
||||
|
||||
- directory: /packages/static-build/test/fixtures/vite-v5
|
||||
schedule:
|
||||
interval: 'daily'
|
||||
open-pull-requests-limit: 1
|
||||
reviewers:
|
||||
- 'trek'
|
||||
- 'TooTallNate'
|
||||
- 'EndangeredMassa'
|
||||
commit-message:
|
||||
prefix: '[framework-fixtures]'
|
||||
package-ecosystem: 'npm'
|
||||
allow:
|
||||
- dependency-name: 'vite'
|
||||
ignore:
|
||||
- dependency-name: 'vite'
|
||||
update-types:
|
||||
['version-update:semver-major', 'version-update:semver-patch']
|
||||
groups:
|
||||
core:
|
||||
patterns:
|
||||
- 'vite'
|
||||
update-types:
|
||||
- 'minor'
|
||||
|
||||
- directory: /packages/static-build/test/fixtures/vitepress
|
||||
schedule:
|
||||
interval: 'daily'
|
||||
open-pull-requests-limit: 1
|
||||
reviewers:
|
||||
- 'trek'
|
||||
- 'TooTallNate'
|
||||
- 'EndangeredMassa'
|
||||
- 'jefsee55'
|
||||
- 'onsclom'
|
||||
- 'erikareads'
|
||||
commit-message:
|
||||
prefix: '[framework-fixtures]'
|
||||
package-ecosystem: 'npm'
|
||||
allow:
|
||||
- dependency-name: 'vitepress'
|
||||
ignore:
|
||||
- dependency-name: 'vitepress'
|
||||
update-types:
|
||||
['version-update:semver-major', 'version-update:semver-patch']
|
||||
groups:
|
||||
core:
|
||||
patterns:
|
||||
- 'vitepress'
|
||||
update-types:
|
||||
- 'minor'
|
||||
|
||||
124
.github/workflows/test-18.yml
vendored
Normal file
124
.github/workflows/test-18.yml
vendored
Normal file
@@ -0,0 +1,124 @@
|
||||
name: Tests Node.js v18
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
tags:
|
||||
- '!*'
|
||||
pull_request:
|
||||
|
||||
env:
|
||||
NODE_VERSION: '18'
|
||||
TURBO_REMOTE_ONLY: 'true'
|
||||
TURBO_TEAM: 'vercel'
|
||||
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
|
||||
|
||||
jobs:
|
||||
setup:
|
||||
name: Find Changes
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
tests: ${{ steps['set-tests'].outputs['tests'] }}
|
||||
dplUrl: ${{ steps.waitForTarball.outputs.url }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 2
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
- name: install pnpm@8.3.1
|
||||
run: npm i -g pnpm@8.3.1
|
||||
- run: pnpm install
|
||||
- id: set-tests
|
||||
run: |
|
||||
TESTS_ARRAY=$(node utils/chunk-tests-18.js $SCRIPT_NAME)
|
||||
echo "Files to test:"
|
||||
echo "$TESTS_ARRAY"
|
||||
echo "tests=$TESTS_ARRAY" >> $GITHUB_OUTPUT
|
||||
- uses: patrickedqvist/wait-for-vercel-preview@bfdff514ff78a669f2536e9f4dd4ef5813a704a2
|
||||
id: waitForTarball
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
max_timeout: 360
|
||||
check_interval: 5
|
||||
test:
|
||||
timeout-minutes: 120
|
||||
runs-on: ${{ matrix.runner }}
|
||||
name: ${{matrix.scriptName}} (${{matrix.packageName}}, ${{matrix.chunkNumber}}, ${{ matrix.runner }})
|
||||
if: ${{ needs.setup.outputs['tests'] != '[]' }}
|
||||
needs:
|
||||
- setup
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include: ${{ fromJson(needs.setup.outputs['tests']) }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 2
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ matrix.nodeVersion || env.NODE_VERSION }}
|
||||
|
||||
# yarn 1.22.21 introduced a Corepack bug when running tests.
|
||||
# this can be removed once https://github.com/yarnpkg/yarn/issues/9015 is resolved
|
||||
- name: install yarn@1.22.19
|
||||
run: npm i -g yarn@1.22.19
|
||||
|
||||
- name: install pnpm@8.3.1
|
||||
run: npm i -g pnpm@8.3.1
|
||||
|
||||
- run: pnpm install
|
||||
|
||||
- name: Build ${{matrix.packageName}} and all its dependencies
|
||||
run: node utils/gen.js && node_modules/.bin/turbo run build --cache-dir=".turbo" --log-order=stream --scope=${{matrix.packageName}} --include-dependencies --no-deps
|
||||
env:
|
||||
FORCE_COLOR: '1'
|
||||
- name: Test ${{matrix.packageName}}
|
||||
run: node utils/gen.js && node_modules/.bin/turbo run ${{matrix.testScript}} --summarize --cache-dir=".turbo" --log-order=stream --scope=${{matrix.packageName}} --no-deps -- ${{ join(matrix.testPaths, ' ') }}
|
||||
shell: bash
|
||||
env:
|
||||
JEST_JUNIT_OUTPUT_FILE: ${{github.workspace}}/.junit-reports/${{matrix.scriptName}}-${{matrix.packageName}}-${{matrix.chunkNumber}}-${{ matrix.runner }}.xml
|
||||
VERCEL_CLI_VERSION: ${{ needs.setup.outputs.dplUrl }}/tarballs/vercel.tgz
|
||||
VERCEL_TEST_TOKEN: ${{ secrets.VERCEL_TEST_TOKEN }}
|
||||
VERCEL_TEST_REGISTRATION_URL: ${{ secrets.VERCEL_TEST_REGISTRATION_URL }}
|
||||
FORCE_COLOR: '1'
|
||||
- name: 'Determine Turbo HIT or MISS'
|
||||
if: ${{ !cancelled() }}
|
||||
id: turbo-summary
|
||||
shell: bash
|
||||
run: |
|
||||
TURBO_MISS_COUNT=`node utils/determine-turbo-hit-or-miss.js`
|
||||
echo "MISS COUNT: $TURBO_MISS_COUNT"
|
||||
echo "misses=$TURBO_MISS_COUNT" >> $GITHUB_OUTPUT
|
||||
- name: 'Upload Test Report to Datadog'
|
||||
if: ${{ steps['turbo-summary'].outputs.misses != '0' && !cancelled() }}
|
||||
run: 'npx @datadog/datadog-ci@2.18.1 junit upload --service vercel-cli .junit-reports'
|
||||
env:
|
||||
DATADOG_API_KEY: ${{secrets.DATADOG_API_KEY_CLI}}
|
||||
DD_ENV: ci
|
||||
|
||||
summary:
|
||||
name: Summary
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
if: always()
|
||||
needs:
|
||||
- test
|
||||
steps:
|
||||
- name: Check All
|
||||
run: |-
|
||||
for status in ${{ join(needs.*.result, ' ') }}
|
||||
do
|
||||
if [ "$status" != "success" ] && [ "$status" != "skipped" ]
|
||||
then
|
||||
echo "Some checks failed"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
8
.github/workflows/test.yml
vendored
8
.github/workflows/test.yml
vendored
@@ -1,4 +1,4 @@
|
||||
name: Tests
|
||||
name: Tests Node.js v16
|
||||
|
||||
on:
|
||||
push:
|
||||
@@ -66,10 +66,6 @@ jobs:
|
||||
with:
|
||||
node-version: ${{ matrix.nodeVersion || env.NODE_VERSION }}
|
||||
|
||||
- name: Install Hugo
|
||||
if: matrix.runner == 'macos-14'
|
||||
run: curl -L -O https://github.com/gohugoio/hugo/releases/download/v0.56.0/hugo_0.56.0_macOS-64bit.tar.gz && tar -xzf hugo_0.56.0_macOS-64bit.tar.gz && mv ./hugo packages/cli/test/dev/fixtures/08-hugo/
|
||||
|
||||
# yarn 1.22.21 introduced a Corepack bug when running tests.
|
||||
# this can be removed once https://github.com/yarnpkg/yarn/issues/9015 is resolved
|
||||
- name: install yarn@1.22.19
|
||||
@@ -103,7 +99,7 @@ jobs:
|
||||
echo "misses=$TURBO_MISS_COUNT" >> $GITHUB_OUTPUT
|
||||
- name: 'Upload Test Report to Datadog'
|
||||
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:
|
||||
DATADOG_API_KEY: ${{secrets.DATADOG_API_KEY_CLI}}
|
||||
DD_ENV: ci
|
||||
|
||||
@@ -37,7 +37,7 @@ You can use the `dev` script to run local changes as if you were invoking Vercel
|
||||
|
||||
When contributing to this repository, please first discuss the change you wish to make via [GitHub Discussions](https://github.com/vercel/vercel/discussions/new) with the owners of this repository before submitting a Pull Request.
|
||||
|
||||
Please read our [Code of Conduct](CODE_OF_CONDUCT.md) and follow it in all your interactions with the project.
|
||||
Please read our [Code of Conduct](./.github/CODE_OF_CONDUCT.md) and follow it in all your interactions with the project.
|
||||
|
||||
### Local development
|
||||
|
||||
|
||||
110
examples/nextjs/package-lock.json
generated
110
examples/nextjs/package-lock.json
generated
@@ -8,7 +8,7 @@
|
||||
"name": "nextjs",
|
||||
"version": "0.1.0",
|
||||
"dependencies": {
|
||||
"next": "14.2.2",
|
||||
"next": "14.2.3",
|
||||
"react": "^18",
|
||||
"react-dom": "^18"
|
||||
},
|
||||
@@ -17,7 +17,7 @@
|
||||
"@types/react": "^18",
|
||||
"@types/react-dom": "^18",
|
||||
"eslint": "^8",
|
||||
"eslint-config-next": "14.2.2",
|
||||
"eslint-config-next": "14.2.3",
|
||||
"postcss": "^8",
|
||||
"tailwindcss": "^3.4.1",
|
||||
"typescript": "^5"
|
||||
@@ -238,23 +238,23 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@next/env": {
|
||||
"version": "14.2.2",
|
||||
"resolved": "https://registry.npmjs.org/@next/env/-/env-14.2.2.tgz",
|
||||
"integrity": "sha512-sk72qRfM1Q90XZWYRoJKu/UWlTgihrASiYw/scb15u+tyzcze3bOuJ/UV6TBOQEeUaxOkRqGeuGUdiiuxc5oqw=="
|
||||
"version": "14.2.3",
|
||||
"resolved": "https://registry.npmjs.org/@next/env/-/env-14.2.3.tgz",
|
||||
"integrity": "sha512-W7fd7IbkfmeeY2gXrzJYDx8D2lWKbVoTIj1o1ScPHNzvp30s1AuoEFSdr39bC5sjxJaxTtq3OTCZboNp0lNWHA=="
|
||||
},
|
||||
"node_modules/@next/eslint-plugin-next": {
|
||||
"version": "14.2.2",
|
||||
"resolved": "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-14.2.2.tgz",
|
||||
"integrity": "sha512-q+Ec2648JtBpKiu/FSJm8HAsFXlNvioHeBCbTP12T1SGcHYwhqHULSfQgFkPgHDu3kzNp2Kem4J54bK4rPQ5SQ==",
|
||||
"version": "14.2.3",
|
||||
"resolved": "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-14.2.3.tgz",
|
||||
"integrity": "sha512-L3oDricIIjgj1AVnRdRor21gI7mShlSwU/1ZGHmqM3LzHhXXhdkrfeNY5zif25Bi5Dd7fiJHsbhoZCHfXYvlAw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"glob": "10.3.10"
|
||||
}
|
||||
},
|
||||
"node_modules/@next/swc-darwin-arm64": {
|
||||
"version": "14.2.2",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.2.2.tgz",
|
||||
"integrity": "sha512-3iPgMhzbalizGwHNFUcGnDhFPSgVBHQ8aqSTAMxB5BvJG0oYrDf1WOJZlbXBgunOEj/8KMVbejEur/FpvFsgFQ==",
|
||||
"version": "14.2.3",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.2.3.tgz",
|
||||
"integrity": "sha512-3pEYo/RaGqPP0YzwnlmPN2puaF2WMLM3apt5jLW2fFdXD9+pqcoTzRk+iZsf8ta7+quAe4Q6Ms0nR0SFGFdS1A==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -267,9 +267,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@next/swc-darwin-x64": {
|
||||
"version": "14.2.2",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-14.2.2.tgz",
|
||||
"integrity": "sha512-x7Afi/jt0ZBRUZHTi49yyej4o8znfIMHO4RvThuoc0P+uli8Jd99y5GKjxoYunPKsXL09xBXEM1+OQy2xEL0Ag==",
|
||||
"version": "14.2.3",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-14.2.3.tgz",
|
||||
"integrity": "sha512-6adp7waE6P1TYFSXpY366xwsOnEXM+y1kgRpjSRVI2CBDOcbRjsJ67Z6EgKIqWIue52d2q/Mx8g9MszARj8IEA==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -282,9 +282,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@next/swc-linux-arm64-gnu": {
|
||||
"version": "14.2.2",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.2.2.tgz",
|
||||
"integrity": "sha512-zbfPtkk7L41ODMJwSp5VbmPozPmMMQrzAc0HAUomVeVIIwlDGs/UCqLJvLNDt4jpWgc21SjjyIn762lNGrMaUA==",
|
||||
"version": "14.2.3",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.2.3.tgz",
|
||||
"integrity": "sha512-cuzCE/1G0ZSnTAHJPUT1rPgQx1w5tzSX7POXSLaS7w2nIUJUD+e25QoXD/hMfxbsT9rslEXugWypJMILBj/QsA==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -297,9 +297,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@next/swc-linux-arm64-musl": {
|
||||
"version": "14.2.2",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.2.2.tgz",
|
||||
"integrity": "sha512-wPbS3pI/JU16rm3XdLvvTmlsmm1nd+sBa2ohXgBZcShX4TgOjD4R+RqHKlI1cjo/jDZKXt6OxmcU0Iys0OC/yg==",
|
||||
"version": "14.2.3",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.2.3.tgz",
|
||||
"integrity": "sha512-0D4/oMM2Y9Ta3nGuCcQN8jjJjmDPYpHX9OJzqk42NZGJocU2MqhBq5tWkJrUQOQY9N+In9xOdymzapM09GeiZw==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -312,9 +312,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@next/swc-linux-x64-gnu": {
|
||||
"version": "14.2.2",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.2.2.tgz",
|
||||
"integrity": "sha512-NqWOHqqq8iC9tuHvZxjQ2tX+jWy2X9y8NX2mcB4sj2bIccuCxbIZrU/ThFPZZPauygajZuVQ6zediejQHwZHwQ==",
|
||||
"version": "14.2.3",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.2.3.tgz",
|
||||
"integrity": "sha512-ENPiNnBNDInBLyUU5ii8PMQh+4XLr4pG51tOp6aJ9xqFQ2iRI6IH0Ds2yJkAzNV1CfyagcyzPfROMViS2wOZ9w==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -327,9 +327,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@next/swc-linux-x64-musl": {
|
||||
"version": "14.2.2",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.2.2.tgz",
|
||||
"integrity": "sha512-lGepHhwb9sGhCcU7999+iK1ZZT+6rrIoVg40MP7DZski9GIZP80wORSbt5kJzh9v2x2ev2lxC6VgwMQT0PcgTA==",
|
||||
"version": "14.2.3",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.2.3.tgz",
|
||||
"integrity": "sha512-BTAbq0LnCbF5MtoM7I/9UeUu/8ZBY0i8SFjUMCbPDOLv+un67e2JgyN4pmgfXBwy/I+RHu8q+k+MCkDN6P9ViQ==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -342,9 +342,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@next/swc-win32-arm64-msvc": {
|
||||
"version": "14.2.2",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.2.2.tgz",
|
||||
"integrity": "sha512-TZSh/48SfcLEQ4rD25VVn2kdIgUWmMflRX3OiyPwGNXn3NiyPqhqei/BaqCYXViIQ+6QsG9R0C8LftMqy8JPMA==",
|
||||
"version": "14.2.3",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.2.3.tgz",
|
||||
"integrity": "sha512-AEHIw/dhAMLNFJFJIJIyOFDzrzI5bAjI9J26gbO5xhAKHYTZ9Or04BesFPXiAYXDNdrwTP2dQceYA4dL1geu8A==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -357,9 +357,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@next/swc-win32-ia32-msvc": {
|
||||
"version": "14.2.2",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.2.2.tgz",
|
||||
"integrity": "sha512-M0tBVNMEBJN2ZNQWlcekMn6pvLria7Sa2Fai5znm7CCJz4pP3lrvlSxhKdkCerk0D9E0bqx5yAo3o2Q7RrD4gA==",
|
||||
"version": "14.2.3",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.2.3.tgz",
|
||||
"integrity": "sha512-vga40n1q6aYb0CLrM+eEmisfKCR45ixQYXuBXxOOmmoV8sYST9k7E3US32FsY+CkkF7NtzdcebiFT4CHuMSyZw==",
|
||||
"cpu": [
|
||||
"ia32"
|
||||
],
|
||||
@@ -372,9 +372,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@next/swc-win32-x64-msvc": {
|
||||
"version": "14.2.2",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.2.2.tgz",
|
||||
"integrity": "sha512-a/20E/wtTJZ3Ykv3f/8F0l7TtgQa2LWHU2oNB9bsu0VjqGuGGHmm/q6waoUNQYTVPYrrlxxaHjJcDV6aiSTt/w==",
|
||||
"version": "14.2.3",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.2.3.tgz",
|
||||
"integrity": "sha512-Q1/zm43RWynxrO7lW4ehciQVj+5ePBhOK+/K2P7pLFX3JaJ/IZVC69SHidrmZSOkqz7ECIOhhy7XhAFG4JYyHA==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -1021,9 +1021,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/caniuse-lite": {
|
||||
"version": "1.0.30001610",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001610.tgz",
|
||||
"integrity": "sha512-QFutAY4NgaelojVMjY63o6XlZyORPaLfyMnsl3HgnWdJUcX6K0oaJymHjH8PT5Gk7sTm8rvC/c5COUQKXqmOMA==",
|
||||
"version": "1.0.30001612",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001612.tgz",
|
||||
"integrity": "sha512-lFgnZ07UhaCcsSZgWW0K5j4e69dK1u/ltrL9lTUiFOwNHs12S3UMIEYgBV0Z6C6hRDev7iRnMzzYmKabYdXF9g==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "opencollective",
|
||||
@@ -1571,12 +1571,12 @@
|
||||
}
|
||||
},
|
||||
"node_modules/eslint-config-next": {
|
||||
"version": "14.2.2",
|
||||
"resolved": "https://registry.npmjs.org/eslint-config-next/-/eslint-config-next-14.2.2.tgz",
|
||||
"integrity": "sha512-12/uFc0KX+wUs7EDpOUGKMXBXZJiBVGdK5/m/QgXOCg2mQ0bQWoKSWNrCeOg7Vum6Kw1d1TW453W6xh+GbHquw==",
|
||||
"version": "14.2.3",
|
||||
"resolved": "https://registry.npmjs.org/eslint-config-next/-/eslint-config-next-14.2.3.tgz",
|
||||
"integrity": "sha512-ZkNztm3Q7hjqvB1rRlOX8P9E/cXRL9ajRcs8jufEtwMfTVYRqnmtnaSu57QqHyBlovMuiB8LEzfLBkh5RYV6Fg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@next/eslint-plugin-next": "14.2.2",
|
||||
"@next/eslint-plugin-next": "14.2.3",
|
||||
"@rushstack/eslint-patch": "^1.3.3",
|
||||
"@typescript-eslint/parser": "^5.4.2 || ^6.0.0 || 7.0.0 - 7.2.0",
|
||||
"eslint-import-resolver-node": "^0.3.6",
|
||||
@@ -3117,11 +3117,11 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/next": {
|
||||
"version": "14.2.2",
|
||||
"resolved": "https://registry.npmjs.org/next/-/next-14.2.2.tgz",
|
||||
"integrity": "sha512-oGwUaa2bCs47FbuxWMpOoXtBMPYpvTPgdZr3UAo+pu7Ns00z9otmYpoeV1HEiYL06AlRQQIA/ypK526KjJfaxg==",
|
||||
"version": "14.2.3",
|
||||
"resolved": "https://registry.npmjs.org/next/-/next-14.2.3.tgz",
|
||||
"integrity": "sha512-dowFkFTR8v79NPJO4QsBUtxv0g9BrS/phluVpMAt2ku7H+cbcBJlopXjkWlwxrk/xGqMemr7JkGPGemPrLLX7A==",
|
||||
"dependencies": {
|
||||
"@next/env": "14.2.2",
|
||||
"@next/env": "14.2.3",
|
||||
"@swc/helpers": "0.5.5",
|
||||
"busboy": "1.6.0",
|
||||
"caniuse-lite": "^1.0.30001579",
|
||||
@@ -3136,15 +3136,15 @@
|
||||
"node": ">=18.17.0"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@next/swc-darwin-arm64": "14.2.2",
|
||||
"@next/swc-darwin-x64": "14.2.2",
|
||||
"@next/swc-linux-arm64-gnu": "14.2.2",
|
||||
"@next/swc-linux-arm64-musl": "14.2.2",
|
||||
"@next/swc-linux-x64-gnu": "14.2.2",
|
||||
"@next/swc-linux-x64-musl": "14.2.2",
|
||||
"@next/swc-win32-arm64-msvc": "14.2.2",
|
||||
"@next/swc-win32-ia32-msvc": "14.2.2",
|
||||
"@next/swc-win32-x64-msvc": "14.2.2"
|
||||
"@next/swc-darwin-arm64": "14.2.3",
|
||||
"@next/swc-darwin-x64": "14.2.3",
|
||||
"@next/swc-linux-arm64-gnu": "14.2.3",
|
||||
"@next/swc-linux-arm64-musl": "14.2.3",
|
||||
"@next/swc-linux-x64-gnu": "14.2.3",
|
||||
"@next/swc-linux-x64-musl": "14.2.3",
|
||||
"@next/swc-win32-arm64-msvc": "14.2.3",
|
||||
"@next/swc-win32-ia32-msvc": "14.2.3",
|
||||
"@next/swc-win32-x64-msvc": "14.2.3"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@opentelemetry/api": "^1.1.0",
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
"dependencies": {
|
||||
"react": "^18",
|
||||
"react-dom": "^18",
|
||||
"next": "14.2.2"
|
||||
"next": "14.2.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"typescript": "^5",
|
||||
@@ -21,6 +21,6 @@
|
||||
"postcss": "^8",
|
||||
"tailwindcss": "^3.4.1",
|
||||
"eslint": "^8",
|
||||
"eslint-config-next": "14.2.2"
|
||||
"eslint-config-next": "14.2.3"
|
||||
}
|
||||
}
|
||||
|
||||
2
examples/package.json
vendored
2
examples/package.json
vendored
@@ -9,7 +9,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/jest": "27.4.1",
|
||||
"@vercel/build-utils": "7.11.0",
|
||||
"@vercel/build-utils": "8.2.1",
|
||||
"@vercel/frameworks": "3.0.2"
|
||||
},
|
||||
"version": null
|
||||
|
||||
@@ -9,18 +9,18 @@
|
||||
"typecheck": "tsc"
|
||||
},
|
||||
"dependencies": {
|
||||
"@remix-run/node": "^2.8.0",
|
||||
"@remix-run/react": "^2.8.0",
|
||||
"@remix-run/server-runtime": "^2.8.0",
|
||||
"@remix-run/node": "^2.9.2",
|
||||
"@remix-run/react": "^2.9.2",
|
||||
"@remix-run/server-runtime": "^2.9.2",
|
||||
"@vercel/analytics": "^1.2.2",
|
||||
"@vercel/remix": "^2.8.0",
|
||||
"@vercel/remix": "2.9.2-patch.2",
|
||||
"isbot": "^4",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@remix-run/dev": "^2.8.0",
|
||||
"@remix-run/eslint-config": "^2.8.0",
|
||||
"@remix-run/dev": "^2.9.2",
|
||||
"@remix-run/eslint-config": "^2.9.2",
|
||||
"@types/react": "^18.2.20",
|
||||
"@types/react-dom": "^18.2.7",
|
||||
"eslint": "^8.38.0",
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
"main": "index.js",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"vitepress": "1.0.0-alpha.29",
|
||||
"vue": "3.2.45"
|
||||
"vitepress": "1.1.3"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "vitepress dev docs",
|
||||
|
||||
@@ -1,626 +0,0 @@
|
||||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
||||
# yarn lockfile v1
|
||||
|
||||
|
||||
"@algolia/autocomplete-core@1.7.2":
|
||||
version "1.7.2"
|
||||
resolved "https://registry.yarnpkg.com/@algolia/autocomplete-core/-/autocomplete-core-1.7.2.tgz#8abbed88082f611997538760dffcb43b33b1fd1d"
|
||||
integrity sha512-eclwUDC6qfApNnEfu1uWcL/rudQsn59tjEoUYZYE2JSXZrHLRjBUGMxiCoknobU2Pva8ejb0eRxpIYDtVVqdsw==
|
||||
dependencies:
|
||||
"@algolia/autocomplete-shared" "1.7.2"
|
||||
|
||||
"@algolia/autocomplete-preset-algolia@1.7.2":
|
||||
version "1.7.2"
|
||||
resolved "https://registry.yarnpkg.com/@algolia/autocomplete-preset-algolia/-/autocomplete-preset-algolia-1.7.2.tgz#9cd4f64b3d64399657ee2dc2b7e0a939e0713a26"
|
||||
integrity sha512-+RYEG6B0QiGGfRb2G3MtPfyrl0dALF3cQNTWBzBX6p5o01vCCGTTinAm2UKG3tfc2CnOMAtnPLkzNZyJUpnVJw==
|
||||
dependencies:
|
||||
"@algolia/autocomplete-shared" "1.7.2"
|
||||
|
||||
"@algolia/autocomplete-shared@1.7.2":
|
||||
version "1.7.2"
|
||||
resolved "https://registry.yarnpkg.com/@algolia/autocomplete-shared/-/autocomplete-shared-1.7.2.tgz#daa23280e78d3b42ae9564d12470ae034db51a89"
|
||||
integrity sha512-QCckjiC7xXHIUaIL3ektBtjJ0w7tTA3iqKcAE/Hjn1lZ5omp7i3Y4e09rAr9ZybqirL7AbxCLLq0Ra5DDPKeug==
|
||||
|
||||
"@algolia/cache-browser-local-storage@4.13.1":
|
||||
version "4.13.1"
|
||||
resolved "https://registry.yarnpkg.com/@algolia/cache-browser-local-storage/-/cache-browser-local-storage-4.13.1.tgz#ffacb9230119f77de1a6f163b83680be999110e4"
|
||||
integrity sha512-UAUVG2PEfwd/FfudsZtYnidJ9eSCpS+LW9cQiesePQLz41NAcddKxBak6eP2GErqyFagSlnVXe/w2E9h2m2ttg==
|
||||
dependencies:
|
||||
"@algolia/cache-common" "4.13.1"
|
||||
|
||||
"@algolia/cache-common@4.13.1":
|
||||
version "4.13.1"
|
||||
resolved "https://registry.yarnpkg.com/@algolia/cache-common/-/cache-common-4.13.1.tgz#c933fdec9f73b4f7c69d5751edc92eee4a63d76b"
|
||||
integrity sha512-7Vaf6IM4L0Jkl3sYXbwK+2beQOgVJ0mKFbz/4qSxKd1iy2Sp77uTAazcX+Dlexekg1fqGUOSO7HS4Sx47ZJmjA==
|
||||
|
||||
"@algolia/cache-in-memory@4.13.1":
|
||||
version "4.13.1"
|
||||
resolved "https://registry.yarnpkg.com/@algolia/cache-in-memory/-/cache-in-memory-4.13.1.tgz#c19baa67b4597e1a93e987350613ab3b88768832"
|
||||
integrity sha512-pZzybCDGApfA/nutsFK1P0Sbsq6fYJU3DwIvyKg4pURerlJM4qZbB9bfLRef0FkzfQu7W11E4cVLCIOWmyZeuQ==
|
||||
dependencies:
|
||||
"@algolia/cache-common" "4.13.1"
|
||||
|
||||
"@algolia/client-account@4.13.1":
|
||||
version "4.13.1"
|
||||
resolved "https://registry.yarnpkg.com/@algolia/client-account/-/client-account-4.13.1.tgz#fea591943665477a23922ab31863ad0732e26c66"
|
||||
integrity sha512-TFLiZ1KqMiir3FNHU+h3b0MArmyaHG+eT8Iojio6TdpeFcAQ1Aiy+2gb3SZk3+pgRJa/BxGmDkRUwE5E/lv3QQ==
|
||||
dependencies:
|
||||
"@algolia/client-common" "4.13.1"
|
||||
"@algolia/client-search" "4.13.1"
|
||||
"@algolia/transporter" "4.13.1"
|
||||
|
||||
"@algolia/client-analytics@4.13.1":
|
||||
version "4.13.1"
|
||||
resolved "https://registry.yarnpkg.com/@algolia/client-analytics/-/client-analytics-4.13.1.tgz#5275956b2d0d16997148f2085f1701b6c39ecc32"
|
||||
integrity sha512-iOS1JBqh7xaL5x00M5zyluZ9+9Uy9GqtYHv/2SMuzNW1qP7/0doz1lbcsP3S7KBbZANJTFHUOfuqyRLPk91iFA==
|
||||
dependencies:
|
||||
"@algolia/client-common" "4.13.1"
|
||||
"@algolia/client-search" "4.13.1"
|
||||
"@algolia/requester-common" "4.13.1"
|
||||
"@algolia/transporter" "4.13.1"
|
||||
|
||||
"@algolia/client-common@4.13.1":
|
||||
version "4.13.1"
|
||||
resolved "https://registry.yarnpkg.com/@algolia/client-common/-/client-common-4.13.1.tgz#3bf9e3586f20ef85bbb56ccca390f7dbe57c8f4f"
|
||||
integrity sha512-LcDoUE0Zz3YwfXJL6lJ2OMY2soClbjrrAKB6auYVMNJcoKZZ2cbhQoFR24AYoxnGUYBER/8B+9sTBj5bj/Gqbg==
|
||||
dependencies:
|
||||
"@algolia/requester-common" "4.13.1"
|
||||
"@algolia/transporter" "4.13.1"
|
||||
|
||||
"@algolia/client-personalization@4.13.1":
|
||||
version "4.13.1"
|
||||
resolved "https://registry.yarnpkg.com/@algolia/client-personalization/-/client-personalization-4.13.1.tgz#438a1f58576ef19c4ad4addb8417bdacfe2fce2e"
|
||||
integrity sha512-1CqrOW1ypVrB4Lssh02hP//YxluoIYXAQCpg03L+/RiXJlCs+uIqlzC0ctpQPmxSlTK6h07kr50JQoYH/TIM9w==
|
||||
dependencies:
|
||||
"@algolia/client-common" "4.13.1"
|
||||
"@algolia/requester-common" "4.13.1"
|
||||
"@algolia/transporter" "4.13.1"
|
||||
|
||||
"@algolia/client-search@4.13.1":
|
||||
version "4.13.1"
|
||||
resolved "https://registry.yarnpkg.com/@algolia/client-search/-/client-search-4.13.1.tgz#5501deed01e23c33d4aaa9f9eb96a849f0fce313"
|
||||
integrity sha512-YQKYA83MNRz3FgTNM+4eRYbSmHi0WWpo019s5SeYcL3HUan/i5R09VO9dk3evELDFJYciiydSjbsmhBzbpPP2A==
|
||||
dependencies:
|
||||
"@algolia/client-common" "4.13.1"
|
||||
"@algolia/requester-common" "4.13.1"
|
||||
"@algolia/transporter" "4.13.1"
|
||||
|
||||
"@algolia/logger-common@4.13.1":
|
||||
version "4.13.1"
|
||||
resolved "https://registry.yarnpkg.com/@algolia/logger-common/-/logger-common-4.13.1.tgz#4221378e701e3f1eacaa051bcd4ba1f25ddfaf4d"
|
||||
integrity sha512-L6slbL/OyZaAXNtS/1A8SAbOJeEXD5JcZeDCPYDqSTYScfHu+2ePRTDMgUTY4gQ7HsYZ39N1LujOd8WBTmM2Aw==
|
||||
|
||||
"@algolia/logger-console@4.13.1":
|
||||
version "4.13.1"
|
||||
resolved "https://registry.yarnpkg.com/@algolia/logger-console/-/logger-console-4.13.1.tgz#423d358e4992dd4bceab0d9a4e99d1fd68107043"
|
||||
integrity sha512-7jQOTftfeeLlnb3YqF8bNgA2GZht7rdKkJ31OCeSH2/61haO0tWPoNRjZq9XLlgMQZH276pPo0NdiArcYPHjCA==
|
||||
dependencies:
|
||||
"@algolia/logger-common" "4.13.1"
|
||||
|
||||
"@algolia/requester-browser-xhr@4.13.1":
|
||||
version "4.13.1"
|
||||
resolved "https://registry.yarnpkg.com/@algolia/requester-browser-xhr/-/requester-browser-xhr-4.13.1.tgz#f8ea79233cf6f0392feaf31e35a6b40d68c5bc9e"
|
||||
integrity sha512-oa0CKr1iH6Nc7CmU6RE7TnXMjHnlyp7S80pP/LvZVABeJHX3p/BcSCKovNYWWltgTxUg0U1o+2uuy8BpMKljwA==
|
||||
dependencies:
|
||||
"@algolia/requester-common" "4.13.1"
|
||||
|
||||
"@algolia/requester-common@4.13.1":
|
||||
version "4.13.1"
|
||||
resolved "https://registry.yarnpkg.com/@algolia/requester-common/-/requester-common-4.13.1.tgz#daea143d15ab6ed3909c4c45877f1b6c36a16179"
|
||||
integrity sha512-eGVf0ID84apfFEuXsaoSgIxbU3oFsIbz4XiotU3VS8qGCJAaLVUC5BUJEkiFENZIhon7hIB4d0RI13HY4RSA+w==
|
||||
|
||||
"@algolia/requester-node-http@4.13.1":
|
||||
version "4.13.1"
|
||||
resolved "https://registry.yarnpkg.com/@algolia/requester-node-http/-/requester-node-http-4.13.1.tgz#32c63d4c009f22d97e396406de7af9b66fb8e89d"
|
||||
integrity sha512-7C0skwtLdCz5heKTVe/vjvrqgL/eJxmiEjHqXdtypcE5GCQCYI15cb+wC4ytYioZDMiuDGeVYmCYImPoEgUGPw==
|
||||
dependencies:
|
||||
"@algolia/requester-common" "4.13.1"
|
||||
|
||||
"@algolia/transporter@4.13.1":
|
||||
version "4.13.1"
|
||||
resolved "https://registry.yarnpkg.com/@algolia/transporter/-/transporter-4.13.1.tgz#509e03e9145102843d5be4a031c521f692d4e8d6"
|
||||
integrity sha512-pICnNQN7TtrcYJqqPEXByV8rJ8ZRU2hCiIKLTLRyNpghtQG3VAFk6fVtdzlNfdUGZcehSKGarPIZEHlQXnKjgw==
|
||||
dependencies:
|
||||
"@algolia/cache-common" "4.13.1"
|
||||
"@algolia/logger-common" "4.13.1"
|
||||
"@algolia/requester-common" "4.13.1"
|
||||
|
||||
"@babel/parser@^7.16.4":
|
||||
version "7.18.8"
|
||||
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.18.8.tgz#822146080ac9c62dac0823bb3489622e0bc1cbdf"
|
||||
integrity sha512-RSKRfYX20dyH+elbJK2uqAkVyucL+xXzhqlMD5/ZXx+dAAwpyB7HsvnHe/ZUGOF+xLr5Wx9/JoXVTj6BQE2/oA==
|
||||
|
||||
"@docsearch/css@3.3.0", "@docsearch/css@^3.3.0":
|
||||
version "3.3.0"
|
||||
resolved "https://registry.yarnpkg.com/@docsearch/css/-/css-3.3.0.tgz#d698e48302d12240d7c2f7452ccb2d2239a8cd80"
|
||||
integrity sha512-rODCdDtGyudLj+Va8b6w6Y85KE85bXRsps/R4Yjwt5vueXKXZQKYw0aA9knxLBT6a/bI/GMrAcmCR75KYOM6hg==
|
||||
|
||||
"@docsearch/js@^3.3.0":
|
||||
version "3.3.0"
|
||||
resolved "https://registry.yarnpkg.com/@docsearch/js/-/js-3.3.0.tgz#c8f614b722cc8a6375e83f9c27557e9398d6a4d4"
|
||||
integrity sha512-oFXWRPNvPxAzBhnFJ9UCFIYZiQNc3Yrv6912nZHw/UIGxsyzKpNRZgHq8HDk1niYmOSoLKtVFcxkccpQmYGFyg==
|
||||
dependencies:
|
||||
"@docsearch/react" "3.3.0"
|
||||
preact "^10.0.0"
|
||||
|
||||
"@docsearch/react@3.3.0":
|
||||
version "3.3.0"
|
||||
resolved "https://registry.yarnpkg.com/@docsearch/react/-/react-3.3.0.tgz#b8ac8e7f49b9bf2f96d34c24bc1cfd097ec0eead"
|
||||
integrity sha512-fhS5adZkae2SSdMYEMVg6pxI5a/cE+tW16ki1V0/ur4Fdok3hBRkmN/H8VvlXnxzggkQIIRIVvYPn00JPjen3A==
|
||||
dependencies:
|
||||
"@algolia/autocomplete-core" "1.7.2"
|
||||
"@algolia/autocomplete-preset-algolia" "1.7.2"
|
||||
"@docsearch/css" "3.3.0"
|
||||
algoliasearch "^4.0.0"
|
||||
|
||||
"@esbuild/android-arm@0.15.15":
|
||||
version "0.15.15"
|
||||
resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.15.15.tgz#35b3cc0f9e69cb53932d44f60b99dd440335d2f0"
|
||||
integrity sha512-JJjZjJi2eBL01QJuWjfCdZxcIgot+VoK6Fq7eKF9w4YHm9hwl7nhBR1o2Wnt/WcANk5l9SkpvrldW1PLuXxcbw==
|
||||
|
||||
"@esbuild/linux-loong64@0.15.15":
|
||||
version "0.15.15"
|
||||
resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.15.15.tgz#32c65517a09320b62530867345222fde7794fbe1"
|
||||
integrity sha512-lhz6UNPMDXUhtXSulw8XlFAtSYO26WmHQnCi2Lg2p+/TMiJKNLtZCYUxV4wG6rZMzXmr8InGpNwk+DLT2Hm0PA==
|
||||
|
||||
"@types/web-bluetooth@^0.0.16":
|
||||
version "0.0.16"
|
||||
resolved "https://registry.yarnpkg.com/@types/web-bluetooth/-/web-bluetooth-0.0.16.tgz#1d12873a8e49567371f2a75fe3e7f7edca6662d8"
|
||||
integrity sha512-oh8q2Zc32S6gd/j50GowEjKLoOVOwHP/bWVjKJInBwQqdOYMdPrf1oVlelTlyfFK3CKxL1uahMDAr+vy8T7yMQ==
|
||||
|
||||
"@vitejs/plugin-vue@^3.2.0":
|
||||
version "3.2.0"
|
||||
resolved "https://registry.yarnpkg.com/@vitejs/plugin-vue/-/plugin-vue-3.2.0.tgz#a1484089dd85d6528f435743f84cdd0d215bbb54"
|
||||
integrity sha512-E0tnaL4fr+qkdCNxJ+Xd0yM31UwMkQje76fsDVBBUCoGOUPexu2VDUYHL8P4CwV+zMvWw6nlRw19OnRKmYAJpw==
|
||||
|
||||
"@vue/compiler-core@3.2.45":
|
||||
version "3.2.45"
|
||||
resolved "https://registry.yarnpkg.com/@vue/compiler-core/-/compiler-core-3.2.45.tgz#d9311207d96f6ebd5f4660be129fb99f01ddb41b"
|
||||
integrity sha512-rcMj7H+PYe5wBV3iYeUgbCglC+pbpN8hBLTJvRiK2eKQiWqu+fG9F+8sW99JdL4LQi7Re178UOxn09puSXvn4A==
|
||||
dependencies:
|
||||
"@babel/parser" "^7.16.4"
|
||||
"@vue/shared" "3.2.45"
|
||||
estree-walker "^2.0.2"
|
||||
source-map "^0.6.1"
|
||||
|
||||
"@vue/compiler-dom@3.2.45":
|
||||
version "3.2.45"
|
||||
resolved "https://registry.yarnpkg.com/@vue/compiler-dom/-/compiler-dom-3.2.45.tgz#c43cc15e50da62ecc16a42f2622d25dc5fd97dce"
|
||||
integrity sha512-tyYeUEuKqqZO137WrZkpwfPCdiiIeXYCcJ8L4gWz9vqaxzIQRccTSwSWZ/Axx5YR2z+LvpUbmPNXxuBU45lyRw==
|
||||
dependencies:
|
||||
"@vue/compiler-core" "3.2.45"
|
||||
"@vue/shared" "3.2.45"
|
||||
|
||||
"@vue/compiler-sfc@3.2.45":
|
||||
version "3.2.45"
|
||||
resolved "https://registry.yarnpkg.com/@vue/compiler-sfc/-/compiler-sfc-3.2.45.tgz#7f7989cc04ec9e7c55acd406827a2c4e96872c70"
|
||||
integrity sha512-1jXDuWah1ggsnSAOGsec8cFjT/K6TMZ0sPL3o3d84Ft2AYZi2jWJgRMjw4iaK0rBfA89L5gw427H4n1RZQBu6Q==
|
||||
dependencies:
|
||||
"@babel/parser" "^7.16.4"
|
||||
"@vue/compiler-core" "3.2.45"
|
||||
"@vue/compiler-dom" "3.2.45"
|
||||
"@vue/compiler-ssr" "3.2.45"
|
||||
"@vue/reactivity-transform" "3.2.45"
|
||||
"@vue/shared" "3.2.45"
|
||||
estree-walker "^2.0.2"
|
||||
magic-string "^0.25.7"
|
||||
postcss "^8.1.10"
|
||||
source-map "^0.6.1"
|
||||
|
||||
"@vue/compiler-ssr@3.2.45":
|
||||
version "3.2.45"
|
||||
resolved "https://registry.yarnpkg.com/@vue/compiler-ssr/-/compiler-ssr-3.2.45.tgz#bd20604b6e64ea15344d5b6278c4141191c983b2"
|
||||
integrity sha512-6BRaggEGqhWht3lt24CrIbQSRD5O07MTmd+LjAn5fJj568+R9eUD2F7wMQJjX859seSlrYog7sUtrZSd7feqrQ==
|
||||
dependencies:
|
||||
"@vue/compiler-dom" "3.2.45"
|
||||
"@vue/shared" "3.2.45"
|
||||
|
||||
"@vue/devtools-api@^6.4.5":
|
||||
version "6.4.5"
|
||||
resolved "https://registry.yarnpkg.com/@vue/devtools-api/-/devtools-api-6.4.5.tgz#d54e844c1adbb1e677c81c665ecef1a2b4bb8380"
|
||||
integrity sha512-JD5fcdIuFxU4fQyXUu3w2KpAJHzTVdN+p4iOX2lMWSHMOoQdMAcpFLZzm9Z/2nmsoZ1a96QEhZ26e50xLBsgOQ==
|
||||
|
||||
"@vue/reactivity-transform@3.2.45":
|
||||
version "3.2.45"
|
||||
resolved "https://registry.yarnpkg.com/@vue/reactivity-transform/-/reactivity-transform-3.2.45.tgz#07ac83b8138550c83dfb50db43cde1e0e5e8124d"
|
||||
integrity sha512-BHVmzYAvM7vcU5WmuYqXpwaBHjsS8T63jlKGWVtHxAHIoMIlmaMyurUSEs1Zcg46M4AYT5MtB1U274/2aNzjJQ==
|
||||
dependencies:
|
||||
"@babel/parser" "^7.16.4"
|
||||
"@vue/compiler-core" "3.2.45"
|
||||
"@vue/shared" "3.2.45"
|
||||
estree-walker "^2.0.2"
|
||||
magic-string "^0.25.7"
|
||||
|
||||
"@vue/reactivity@3.2.45":
|
||||
version "3.2.45"
|
||||
resolved "https://registry.yarnpkg.com/@vue/reactivity/-/reactivity-3.2.45.tgz#412a45b574de601be5a4a5d9a8cbd4dee4662ff0"
|
||||
integrity sha512-PRvhCcQcyEVohW0P8iQ7HDcIOXRjZfAsOds3N99X/Dzewy8TVhTCT4uXpAHfoKjVTJRA0O0K+6QNkDIZAxNi3A==
|
||||
dependencies:
|
||||
"@vue/shared" "3.2.45"
|
||||
|
||||
"@vue/runtime-core@3.2.45":
|
||||
version "3.2.45"
|
||||
resolved "https://registry.yarnpkg.com/@vue/runtime-core/-/runtime-core-3.2.45.tgz#7ad7ef9b2519d41062a30c6fa001ec43ac549c7f"
|
||||
integrity sha512-gzJiTA3f74cgARptqzYswmoQx0fIA+gGYBfokYVhF8YSXjWTUA2SngRzZRku2HbGbjzB6LBYSbKGIaK8IW+s0A==
|
||||
dependencies:
|
||||
"@vue/reactivity" "3.2.45"
|
||||
"@vue/shared" "3.2.45"
|
||||
|
||||
"@vue/runtime-dom@3.2.45":
|
||||
version "3.2.45"
|
||||
resolved "https://registry.yarnpkg.com/@vue/runtime-dom/-/runtime-dom-3.2.45.tgz#1a2ef6ee2ad876206fbbe2a884554bba2d0faf59"
|
||||
integrity sha512-cy88YpfP5Ue2bDBbj75Cb4bIEZUMM/mAkDMfqDTpUYVgTf/kuQ2VQ8LebuZ8k6EudgH8pYhsGWHlY0lcxlvTwA==
|
||||
dependencies:
|
||||
"@vue/runtime-core" "3.2.45"
|
||||
"@vue/shared" "3.2.45"
|
||||
csstype "^2.6.8"
|
||||
|
||||
"@vue/server-renderer@3.2.45":
|
||||
version "3.2.45"
|
||||
resolved "https://registry.yarnpkg.com/@vue/server-renderer/-/server-renderer-3.2.45.tgz#ca9306a0c12b0530a1a250e44f4a0abac6b81f3f"
|
||||
integrity sha512-ebiMq7q24WBU1D6uhPK//2OTR1iRIyxjF5iVq/1a5I1SDMDyDu4Ts6fJaMnjrvD3MqnaiFkKQj+LKAgz5WIK3g==
|
||||
dependencies:
|
||||
"@vue/compiler-ssr" "3.2.45"
|
||||
"@vue/shared" "3.2.45"
|
||||
|
||||
"@vue/shared@3.2.45":
|
||||
version "3.2.45"
|
||||
resolved "https://registry.yarnpkg.com/@vue/shared/-/shared-3.2.45.tgz#a3fffa7489eafff38d984e23d0236e230c818bc2"
|
||||
integrity sha512-Ewzq5Yhimg7pSztDV+RH1UDKBzmtqieXQlpTVm2AwraoRL/Rks96mvd8Vgi7Lj+h+TH8dv7mXD3FRZR3TUvbSg==
|
||||
|
||||
"@vueuse/core@^9.4.0":
|
||||
version "9.5.0"
|
||||
resolved "https://registry.yarnpkg.com/@vueuse/core/-/core-9.5.0.tgz#6726e952e8f92b465457d3bc95deb385aacd9a41"
|
||||
integrity sha512-6GsWBsJHEb3sYw15mbLrcbslAVY45pkzjJYTKYKCXv88z7srAF0VEW0q+oXKsl58tCbqooplInahXFg8Yo1m4w==
|
||||
dependencies:
|
||||
"@types/web-bluetooth" "^0.0.16"
|
||||
"@vueuse/metadata" "9.5.0"
|
||||
"@vueuse/shared" "9.5.0"
|
||||
vue-demi "*"
|
||||
|
||||
"@vueuse/metadata@9.5.0":
|
||||
version "9.5.0"
|
||||
resolved "https://registry.yarnpkg.com/@vueuse/metadata/-/metadata-9.5.0.tgz#b01c84230261ddee4d439ae5d9c21343dc5ae565"
|
||||
integrity sha512-4M1AyPZmIv41pym+K5+4wup3bKuYebbH8w8BROY1hmT7rIwcyS4tEL+UsGz0Hiu1FCOxcoBrwtAizc0YmBJjyQ==
|
||||
|
||||
"@vueuse/shared@9.5.0":
|
||||
version "9.5.0"
|
||||
resolved "https://registry.yarnpkg.com/@vueuse/shared/-/shared-9.5.0.tgz#f5306548af0dc9f2b3a0d4da74e62bfdd6211241"
|
||||
integrity sha512-HnnCWU1Vg9CVWRCcI8ohDKDRB2Sc4bTgT1XAIaoLSfVHHn+TKbrox6pd3klCSw4UDxkhDfOk8cAdcK+Z5KleCA==
|
||||
dependencies:
|
||||
vue-demi "*"
|
||||
|
||||
algoliasearch@^4.0.0:
|
||||
version "4.13.1"
|
||||
resolved "https://registry.yarnpkg.com/algoliasearch/-/algoliasearch-4.13.1.tgz#54195c41c9e4bd13ed64982248cf49d4576974fe"
|
||||
integrity sha512-dtHUSE0caWTCE7liE1xaL+19AFf6kWEcyn76uhcitWpntqvicFHXKFoZe5JJcv9whQOTRM6+B8qJz6sFj+rDJA==
|
||||
dependencies:
|
||||
"@algolia/cache-browser-local-storage" "4.13.1"
|
||||
"@algolia/cache-common" "4.13.1"
|
||||
"@algolia/cache-in-memory" "4.13.1"
|
||||
"@algolia/client-account" "4.13.1"
|
||||
"@algolia/client-analytics" "4.13.1"
|
||||
"@algolia/client-common" "4.13.1"
|
||||
"@algolia/client-personalization" "4.13.1"
|
||||
"@algolia/client-search" "4.13.1"
|
||||
"@algolia/logger-common" "4.13.1"
|
||||
"@algolia/logger-console" "4.13.1"
|
||||
"@algolia/requester-browser-xhr" "4.13.1"
|
||||
"@algolia/requester-common" "4.13.1"
|
||||
"@algolia/requester-node-http" "4.13.1"
|
||||
"@algolia/transporter" "4.13.1"
|
||||
|
||||
body-scroll-lock@4.0.0-beta.0:
|
||||
version "4.0.0-beta.0"
|
||||
resolved "https://registry.yarnpkg.com/body-scroll-lock/-/body-scroll-lock-4.0.0-beta.0.tgz#4f78789d10e6388115c0460cd6d7d4dd2bbc4f7e"
|
||||
integrity sha512-a7tP5+0Mw3YlUJcGAKUqIBkYYGlYxk2fnCasq/FUph1hadxlTRjF+gAcZksxANnaMnALjxEddmSi/H3OR8ugcQ==
|
||||
|
||||
csstype@^2.6.8:
|
||||
version "2.6.20"
|
||||
resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.6.20.tgz#9229c65ea0b260cf4d3d997cb06288e36a8d6dda"
|
||||
integrity sha512-/WwNkdXfckNgw6S5R125rrW8ez139lBHWouiBvX8dfMFtcn6V81REDqnH7+CRpRipfYlyU1CmOnOxrmGcFOjeA==
|
||||
|
||||
esbuild-android-64@0.15.15:
|
||||
version "0.15.15"
|
||||
resolved "https://registry.yarnpkg.com/esbuild-android-64/-/esbuild-android-64-0.15.15.tgz#fd959b034dd761d14e13dda6214b6948841ff4ff"
|
||||
integrity sha512-F+WjjQxO+JQOva3tJWNdVjouFMLK6R6i5gjDvgUthLYJnIZJsp1HlF523k73hELY20WPyEO8xcz7aaYBVkeg5Q==
|
||||
|
||||
esbuild-android-arm64@0.15.15:
|
||||
version "0.15.15"
|
||||
resolved "https://registry.yarnpkg.com/esbuild-android-arm64/-/esbuild-android-arm64-0.15.15.tgz#9733b71cf0229b4356f106a455b2cfdf7884aa59"
|
||||
integrity sha512-attlyhD6Y22jNyQ0fIIQ7mnPvDWKw7k6FKnsXlBvQE6s3z6s6cuEHcSgoirquQc7TmZgVCK5fD/2uxmRN+ZpcQ==
|
||||
|
||||
esbuild-darwin-64@0.15.15:
|
||||
version "0.15.15"
|
||||
resolved "https://registry.yarnpkg.com/esbuild-darwin-64/-/esbuild-darwin-64-0.15.15.tgz#fc3482fdf5e798dbc0b8b2fe13287d257a45efc6"
|
||||
integrity sha512-ohZtF8W1SHJ4JWldsPVdk8st0r9ExbAOSrBOh5L+Mq47i696GVwv1ab/KlmbUoikSTNoXEhDzVpxUR/WIO19FQ==
|
||||
|
||||
esbuild-darwin-arm64@0.15.15:
|
||||
version "0.15.15"
|
||||
resolved "https://registry.yarnpkg.com/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.15.15.tgz#e922ec387c00fa84d664e14b5722fe13613f4adc"
|
||||
integrity sha512-P8jOZ5zshCNIuGn+9KehKs/cq5uIniC+BeCykvdVhx/rBXSxmtj3CUIKZz4sDCuESMbitK54drf/2QX9QHG5Ag==
|
||||
|
||||
esbuild-freebsd-64@0.15.15:
|
||||
version "0.15.15"
|
||||
resolved "https://registry.yarnpkg.com/esbuild-freebsd-64/-/esbuild-freebsd-64-0.15.15.tgz#69a42d79137d7d3ea718414c432bc10e8bb97c68"
|
||||
integrity sha512-KkTg+AmDXz1IvA9S1gt8dE24C8Thx0X5oM0KGF322DuP+P3evwTL9YyusHAWNsh4qLsR80nvBr/EIYs29VSwuA==
|
||||
|
||||
esbuild-freebsd-arm64@0.15.15:
|
||||
version "0.15.15"
|
||||
resolved "https://registry.yarnpkg.com/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.15.15.tgz#63b6d0dd492f7394f8d07a0e2b931151eb9d60c4"
|
||||
integrity sha512-FUcML0DRsuyqCMfAC+HoeAqvWxMeq0qXvclZZ/lt2kLU6XBnDA5uKTLUd379WYEyVD4KKFctqWd9tTuk8C/96g==
|
||||
|
||||
esbuild-linux-32@0.15.15:
|
||||
version "0.15.15"
|
||||
resolved "https://registry.yarnpkg.com/esbuild-linux-32/-/esbuild-linux-32-0.15.15.tgz#7f295795fd7e61ea57d1135f717424a6771a7472"
|
||||
integrity sha512-q28Qn5pZgHNqug02aTkzw5sW9OklSo96b5nm17Mq0pDXrdTBcQ+M6Q9A1B+dalFeynunwh/pvfrNucjzwDXj+Q==
|
||||
|
||||
esbuild-linux-64@0.15.15:
|
||||
version "0.15.15"
|
||||
resolved "https://registry.yarnpkg.com/esbuild-linux-64/-/esbuild-linux-64-0.15.15.tgz#11a430a86403b0411ca0a355b891f1cb8c4c4ec6"
|
||||
integrity sha512-217KPmWMirkf8liO+fj2qrPwbIbhNTGNVtvqI1TnOWJgcMjUWvd677Gq3fTzXEjilkx2yWypVnTswM2KbXgoAg==
|
||||
|
||||
esbuild-linux-arm64@0.15.15:
|
||||
version "0.15.15"
|
||||
resolved "https://registry.yarnpkg.com/esbuild-linux-arm64/-/esbuild-linux-arm64-0.15.15.tgz#b65f9a2c60e8e5b62f6cfd392cd0410f22e8c390"
|
||||
integrity sha512-/ltmNFs0FivZkYsTzAsXIfLQX38lFnwJTWCJts0IbCqWZQe+jjj0vYBNbI0kmXLb3y5NljiM5USVAO1NVkdh2g==
|
||||
|
||||
esbuild-linux-arm@0.15.15:
|
||||
version "0.15.15"
|
||||
resolved "https://registry.yarnpkg.com/esbuild-linux-arm/-/esbuild-linux-arm-0.15.15.tgz#c8e13e45a0a6f0cb145ce13ae26ce1d2551d9bcc"
|
||||
integrity sha512-RYVW9o2yN8yM7SB1yaWr378CwrjvGCyGybX3SdzPHpikUHkME2AP55Ma20uNwkNyY2eSYFX9D55kDrfQmQBR4w==
|
||||
|
||||
esbuild-linux-mips64le@0.15.15:
|
||||
version "0.15.15"
|
||||
resolved "https://registry.yarnpkg.com/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.15.15.tgz#d4c24d47e43966fcac748c90621be7edd53456c0"
|
||||
integrity sha512-PksEPb321/28GFFxtvL33yVPfnMZihxkEv5zME2zapXGp7fA1X2jYeiTUK+9tJ/EGgcNWuwvtawPxJG7Mmn86A==
|
||||
|
||||
esbuild-linux-ppc64le@0.15.15:
|
||||
version "0.15.15"
|
||||
resolved "https://registry.yarnpkg.com/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.15.15.tgz#2eba53fe2282438ceca5471bdb57ba2e00216ed6"
|
||||
integrity sha512-ek8gJBEIhcpGI327eAZigBOHl58QqrJrYYIZBWQCnH3UnXoeWMrMZLeeZL8BI2XMBhP+sQ6ERctD5X+ajL/AIA==
|
||||
|
||||
esbuild-linux-riscv64@0.15.15:
|
||||
version "0.15.15"
|
||||
resolved "https://registry.yarnpkg.com/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.15.15.tgz#1afa8dfe55a6c312f1904ee608b81417205f5027"
|
||||
integrity sha512-H5ilTZb33/GnUBrZMNJtBk7/OXzDHDXjIzoLXHSutwwsLxSNaLxzAaMoDGDd/keZoS+GDBqNVxdCkpuiRW4OSw==
|
||||
|
||||
esbuild-linux-s390x@0.15.15:
|
||||
version "0.15.15"
|
||||
resolved "https://registry.yarnpkg.com/esbuild-linux-s390x/-/esbuild-linux-s390x-0.15.15.tgz#1f7b3c4429c8ca99920ba6bf356ccc5b38fabd34"
|
||||
integrity sha512-jKaLUg78mua3rrtrkpv4Or2dNTJU7bgHN4bEjT4OX4GR7nLBSA9dfJezQouTxMmIW7opwEC5/iR9mpC18utnxQ==
|
||||
|
||||
esbuild-netbsd-64@0.15.15:
|
||||
version "0.15.15"
|
||||
resolved "https://registry.yarnpkg.com/esbuild-netbsd-64/-/esbuild-netbsd-64-0.15.15.tgz#d72c7155686c938c1aff126209b689c22823347c"
|
||||
integrity sha512-aOvmF/UkjFuW6F36HbIlImJTTx45KUCHJndtKo+KdP8Dhq3mgLRKW9+6Ircpm8bX/RcS3zZMMmaBLkvGY06Gvw==
|
||||
|
||||
esbuild-openbsd-64@0.15.15:
|
||||
version "0.15.15"
|
||||
resolved "https://registry.yarnpkg.com/esbuild-openbsd-64/-/esbuild-openbsd-64-0.15.15.tgz#761bd87ecab97386948eaf667a065cb0ecaa0f76"
|
||||
integrity sha512-HFFX+WYedx1w2yJ1VyR1Dfo8zyYGQZf1cA69bLdrHzu9svj6KH6ZLK0k3A1/LFPhcEY9idSOhsB2UyU0tHPxgQ==
|
||||
|
||||
esbuild-sunos-64@0.15.15:
|
||||
version "0.15.15"
|
||||
resolved "https://registry.yarnpkg.com/esbuild-sunos-64/-/esbuild-sunos-64-0.15.15.tgz#07e04cbf9747f281a967d09230a158a1be5b530c"
|
||||
integrity sha512-jOPBudffG4HN8yJXcK9rib/ZTFoTA5pvIKbRrt3IKAGMq1EpBi4xoVoSRrq/0d4OgZLaQbmkHp8RO9eZIn5atA==
|
||||
|
||||
esbuild-windows-32@0.15.15:
|
||||
version "0.15.15"
|
||||
resolved "https://registry.yarnpkg.com/esbuild-windows-32/-/esbuild-windows-32-0.15.15.tgz#130d1982cc41fb67461e9f8a65c6ebd13a1f35bb"
|
||||
integrity sha512-MDkJ3QkjnCetKF0fKxCyYNBnOq6dmidcwstBVeMtXSgGYTy8XSwBeIE4+HuKiSsG6I/mXEb++px3IGSmTN0XiA==
|
||||
|
||||
esbuild-windows-64@0.15.15:
|
||||
version "0.15.15"
|
||||
resolved "https://registry.yarnpkg.com/esbuild-windows-64/-/esbuild-windows-64-0.15.15.tgz#638bdf495c109c1882e8b0529cb8e2fea11383fb"
|
||||
integrity sha512-xaAUIB2qllE888SsMU3j9nrqyLbkqqkpQyWVkfwSil6BBPgcPk3zOFitTTncEKCLTQy3XV9RuH7PDj3aJDljWA==
|
||||
|
||||
esbuild-windows-arm64@0.15.15:
|
||||
version "0.15.15"
|
||||
resolved "https://registry.yarnpkg.com/esbuild-windows-arm64/-/esbuild-windows-arm64-0.15.15.tgz#5a277ce10de999d2a6465fc92a8c2a2d207ebd31"
|
||||
integrity sha512-ttuoCYCIJAFx4UUKKWYnFdrVpoXa3+3WWkXVI6s09U+YjhnyM5h96ewTq/WgQj9LFSIlABQvadHSOQyAVjW5xQ==
|
||||
|
||||
esbuild@^0.15.9:
|
||||
version "0.15.15"
|
||||
resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.15.15.tgz#503b70bdc18d72d8fc2962ed3ab9219249e58bbe"
|
||||
integrity sha512-TEw/lwK4Zzld9x3FedV6jy8onOUHqcEX3ADFk4k+gzPUwrxn8nWV62tH0udo8jOtjFodlEfc4ypsqX3e+WWO6w==
|
||||
optionalDependencies:
|
||||
"@esbuild/android-arm" "0.15.15"
|
||||
"@esbuild/linux-loong64" "0.15.15"
|
||||
esbuild-android-64 "0.15.15"
|
||||
esbuild-android-arm64 "0.15.15"
|
||||
esbuild-darwin-64 "0.15.15"
|
||||
esbuild-darwin-arm64 "0.15.15"
|
||||
esbuild-freebsd-64 "0.15.15"
|
||||
esbuild-freebsd-arm64 "0.15.15"
|
||||
esbuild-linux-32 "0.15.15"
|
||||
esbuild-linux-64 "0.15.15"
|
||||
esbuild-linux-arm "0.15.15"
|
||||
esbuild-linux-arm64 "0.15.15"
|
||||
esbuild-linux-mips64le "0.15.15"
|
||||
esbuild-linux-ppc64le "0.15.15"
|
||||
esbuild-linux-riscv64 "0.15.15"
|
||||
esbuild-linux-s390x "0.15.15"
|
||||
esbuild-netbsd-64 "0.15.15"
|
||||
esbuild-openbsd-64 "0.15.15"
|
||||
esbuild-sunos-64 "0.15.15"
|
||||
esbuild-windows-32 "0.15.15"
|
||||
esbuild-windows-64 "0.15.15"
|
||||
esbuild-windows-arm64 "0.15.15"
|
||||
|
||||
estree-walker@^2.0.2:
|
||||
version "2.0.2"
|
||||
resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-2.0.2.tgz#52f010178c2a4c117a7757cfe942adb7d2da4cac"
|
||||
integrity sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==
|
||||
|
||||
fsevents@~2.3.2:
|
||||
version "2.3.2"
|
||||
resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a"
|
||||
integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==
|
||||
|
||||
function-bind@^1.1.1:
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d"
|
||||
integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==
|
||||
|
||||
has@^1.0.3:
|
||||
version "1.0.3"
|
||||
resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796"
|
||||
integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==
|
||||
dependencies:
|
||||
function-bind "^1.1.1"
|
||||
|
||||
is-core-module@^2.9.0:
|
||||
version "2.9.0"
|
||||
resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.9.0.tgz#e1c34429cd51c6dd9e09e0799e396e27b19a9c69"
|
||||
integrity sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A==
|
||||
dependencies:
|
||||
has "^1.0.3"
|
||||
|
||||
jsonc-parser@^3.0.0:
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.1.0.tgz#73b8f0e5c940b83d03476bc2e51a20ef0932615d"
|
||||
integrity sha512-DRf0QjnNeCUds3xTjKlQQ3DpJD51GvDjJfnxUVWg6PZTo2otSm+slzNAxU/35hF8/oJIKoG9slq30JYOsF2azg==
|
||||
|
||||
magic-string@^0.25.7:
|
||||
version "0.25.9"
|
||||
resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.9.tgz#de7f9faf91ef8a1c91d02c2e5314c8277dbcdd1c"
|
||||
integrity sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==
|
||||
dependencies:
|
||||
sourcemap-codec "^1.4.8"
|
||||
|
||||
nanoid@^3.3.4:
|
||||
version "3.3.4"
|
||||
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.4.tgz#730b67e3cd09e2deacf03c027c81c9d9dbc5e8ab"
|
||||
integrity sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==
|
||||
|
||||
path-parse@^1.0.7:
|
||||
version "1.0.7"
|
||||
resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735"
|
||||
integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==
|
||||
|
||||
picocolors@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c"
|
||||
integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==
|
||||
|
||||
postcss@^8.1.10:
|
||||
version "8.4.14"
|
||||
resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.14.tgz#ee9274d5622b4858c1007a74d76e42e56fd21caf"
|
||||
integrity sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig==
|
||||
dependencies:
|
||||
nanoid "^3.3.4"
|
||||
picocolors "^1.0.0"
|
||||
source-map-js "^1.0.2"
|
||||
|
||||
postcss@^8.4.18:
|
||||
version "8.4.19"
|
||||
resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.19.tgz#61178e2add236b17351897c8bcc0b4c8ecab56fc"
|
||||
integrity sha512-h+pbPsyhlYj6N2ozBmHhHrs9DzGmbaarbLvWipMRO7RLS+v4onj26MPFXA5OBYFxyqYhUJK456SwDcY9H2/zsA==
|
||||
dependencies:
|
||||
nanoid "^3.3.4"
|
||||
picocolors "^1.0.0"
|
||||
source-map-js "^1.0.2"
|
||||
|
||||
preact@^10.0.0:
|
||||
version "10.10.0"
|
||||
resolved "https://registry.yarnpkg.com/preact/-/preact-10.10.0.tgz#7434750a24b59dae1957d95dc0aa47a4a8e9a180"
|
||||
integrity sha512-fszkg1iJJjq68I4lI8ZsmBiaoQiQHbxf1lNq+72EmC/mZOsFF5zn3k1yv9QGoFgIXzgsdSKtYymLJsrJPoamjQ==
|
||||
|
||||
resolve@^1.22.1:
|
||||
version "1.22.1"
|
||||
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.1.tgz#27cb2ebb53f91abb49470a928bba7558066ac177"
|
||||
integrity sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==
|
||||
dependencies:
|
||||
is-core-module "^2.9.0"
|
||||
path-parse "^1.0.7"
|
||||
supports-preserve-symlinks-flag "^1.0.0"
|
||||
|
||||
rollup@^2.79.1:
|
||||
version "2.79.1"
|
||||
resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.79.1.tgz#bedee8faef7c9f93a2647ac0108748f497f081c7"
|
||||
integrity sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==
|
||||
optionalDependencies:
|
||||
fsevents "~2.3.2"
|
||||
|
||||
shiki@^0.11.1:
|
||||
version "0.11.1"
|
||||
resolved "https://registry.yarnpkg.com/shiki/-/shiki-0.11.1.tgz#df0f719e7ab592c484d8b73ec10e215a503ab8cc"
|
||||
integrity sha512-EugY9VASFuDqOexOgXR18ZV+TbFrQHeCpEYaXamO+SZlsnT/2LxuLBX25GGtIrwaEVFXUAbUQ601SWE2rMwWHA==
|
||||
dependencies:
|
||||
jsonc-parser "^3.0.0"
|
||||
vscode-oniguruma "^1.6.1"
|
||||
vscode-textmate "^6.0.0"
|
||||
|
||||
source-map-js@^1.0.2:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c"
|
||||
integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==
|
||||
|
||||
source-map@^0.6.1:
|
||||
version "0.6.1"
|
||||
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
|
||||
integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==
|
||||
|
||||
sourcemap-codec@^1.4.8:
|
||||
version "1.4.8"
|
||||
resolved "https://registry.yarnpkg.com/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz#ea804bd94857402e6992d05a38ef1ae35a9ab4c4"
|
||||
integrity sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==
|
||||
|
||||
supports-preserve-symlinks-flag@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09"
|
||||
integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==
|
||||
|
||||
vite@^3.2.3:
|
||||
version "3.2.4"
|
||||
resolved "https://registry.yarnpkg.com/vite/-/vite-3.2.4.tgz#d8c7892dd4268064e04fffbe7d866207dd24166e"
|
||||
integrity sha512-Z2X6SRAffOUYTa+sLy3NQ7nlHFU100xwanq1WDwqaiFiCe+25zdxP1TfCS5ojPV2oDDcXudHIoPnI1Z/66B7Yw==
|
||||
dependencies:
|
||||
esbuild "^0.15.9"
|
||||
postcss "^8.4.18"
|
||||
resolve "^1.22.1"
|
||||
rollup "^2.79.1"
|
||||
optionalDependencies:
|
||||
fsevents "~2.3.2"
|
||||
|
||||
vitepress@1.0.0-alpha.29:
|
||||
version "1.0.0-alpha.29"
|
||||
resolved "https://registry.yarnpkg.com/vitepress/-/vitepress-1.0.0-alpha.29.tgz#9c4a4012efe2b37e223dfaa4dab03ee9fa777d1e"
|
||||
integrity sha512-oaRaeMLcN9M3Bxz97fFVF6Gzm3Aqtb0CijTt5TOW0XPzNPuKA0YpFnsmS97gdKmA+VztM6itRJ8K7JJuU0VS3g==
|
||||
dependencies:
|
||||
"@docsearch/css" "^3.3.0"
|
||||
"@docsearch/js" "^3.3.0"
|
||||
"@vitejs/plugin-vue" "^3.2.0"
|
||||
"@vue/devtools-api" "^6.4.5"
|
||||
"@vueuse/core" "^9.4.0"
|
||||
body-scroll-lock "4.0.0-beta.0"
|
||||
shiki "^0.11.1"
|
||||
vite "^3.2.3"
|
||||
vue "^3.2.41"
|
||||
|
||||
vscode-oniguruma@^1.6.1:
|
||||
version "1.6.2"
|
||||
resolved "https://registry.yarnpkg.com/vscode-oniguruma/-/vscode-oniguruma-1.6.2.tgz#aeb9771a2f1dbfc9083c8a7fdd9cccaa3f386607"
|
||||
integrity sha512-KH8+KKov5eS/9WhofZR8M8dMHWN2gTxjMsG4jd04YhpbPR91fUj7rYQ2/XjeHCJWbg7X++ApRIU9NUwM2vTvLA==
|
||||
|
||||
vscode-textmate@^6.0.0:
|
||||
version "6.0.0"
|
||||
resolved "https://registry.yarnpkg.com/vscode-textmate/-/vscode-textmate-6.0.0.tgz#a3777197235036814ac9a92451492f2748589210"
|
||||
integrity sha512-gu73tuZfJgu+mvCSy4UZwd2JXykjK9zAZsfmDeut5dx/1a7FeTk0XwJsSuqQn+cuMCGVbIBfl+s53X4T19DnzQ==
|
||||
|
||||
vue-demi@*:
|
||||
version "0.13.4"
|
||||
resolved "https://registry.yarnpkg.com/vue-demi/-/vue-demi-0.13.4.tgz#fcb320892d78d3a7ec227024776f77d9a5c4831d"
|
||||
integrity sha512-KP4lq9uSz0KZbaqCllRhnxMV3mYRsRWJfdsAhZyt5bV5O1RTpoeDptBRV9NOa/JgOpfaA9ane88VF7OjWNK/DA==
|
||||
|
||||
vue@3.2.45, vue@^3.2.41:
|
||||
version "3.2.45"
|
||||
resolved "https://registry.yarnpkg.com/vue/-/vue-3.2.45.tgz#94a116784447eb7dbd892167784619fef379b3c8"
|
||||
integrity sha512-9Nx/Mg2b2xWlXykmCwiTUCWHbWIj53bnkizBxKai1g61f2Xit700A1ljowpTIM11e3uipOeiPcSqnmBg6gyiaA==
|
||||
dependencies:
|
||||
"@vue/compiler-dom" "3.2.45"
|
||||
"@vue/compiler-sfc" "3.2.45"
|
||||
"@vue/runtime-dom" "3.2.45"
|
||||
"@vue/server-renderer" "3.2.45"
|
||||
"@vue/shared" "3.2.45"
|
||||
@@ -1,5 +1,61 @@
|
||||
# @vercel-internals/types
|
||||
|
||||
## 1.0.37
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`83741a0eb`](https://github.com/vercel/vercel/commit/83741a0eb9e44457b083e8790a11eb89984e6357)]:
|
||||
- @vercel/build-utils@8.2.1
|
||||
|
||||
## 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
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`5014b1e82`](https://github.com/vercel/vercel/commit/5014b1e82a46181baeb727ffe6d14000b6a4b1d7)]:
|
||||
- @vercel/build-utils@8.1.0
|
||||
|
||||
## 1.0.31
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`15475c8a2`](https://github.com/vercel/vercel/commit/15475c8a2c303a1dd189ba24044fac750280dd2e), [`21f5e7375`](https://github.com/vercel/vercel/commit/21f5e7375e4cb4ceed98ab56486d09a85fa3894d)]:
|
||||
- @vercel/build-utils@8.0.0
|
||||
|
||||
## 1.0.30
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`2826563ff`](https://github.com/vercel/vercel/commit/2826563ffab7ab01d3c85def2cad8c4041cd88b1)]:
|
||||
- @vercel/build-utils@7.12.0
|
||||
|
||||
## 1.0.29
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"private": true,
|
||||
"name": "@vercel-internals/types",
|
||||
"version": "1.0.29",
|
||||
"version": "1.0.37",
|
||||
"types": "index.d.ts",
|
||||
"main": "index.d.ts",
|
||||
"files": [
|
||||
@@ -10,7 +10,7 @@
|
||||
"dependencies": {
|
||||
"@types/node": "14.14.31",
|
||||
"@vercel-internals/constants": "1.0.4",
|
||||
"@vercel/build-utils": "7.11.0",
|
||||
"@vercel/build-utils": "8.2.1",
|
||||
"@vercel/routing-utils": "3.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
"source-map-support": "0.5.12",
|
||||
"ts-eager": "2.0.2",
|
||||
"ts-jest": "29.1.0",
|
||||
"turbo": "1.13.2",
|
||||
"turbo": "1.13.3",
|
||||
"typescript": "4.9.5"
|
||||
},
|
||||
"scripts": {
|
||||
|
||||
@@ -1,5 +1,62 @@
|
||||
# @vercel/build-utils
|
||||
|
||||
## 8.2.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [node] update node@16 deprecation day ([#11671](https://github.com/vercel/vercel/pull/11671))
|
||||
|
||||
## 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
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- Update pnpm version detection logic ([#11445](https://github.com/vercel/vercel/pull/11445))
|
||||
Add support for pnpm 9
|
||||
|
||||
## 8.0.0
|
||||
|
||||
### Major Changes
|
||||
|
||||
- Remove legacy `avoidTopLevelInstall` logic ([#11513](https://github.com/vercel/vercel/pull/11513))
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [build-utils] Add `VERCEL_PROJECT_PRODUCTION_URL` framework env var prefix ([#11506](https://github.com/vercel/vercel/pull/11506))
|
||||
|
||||
## 7.12.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- Trigger release ([#11465](https://github.com/vercel/vercel/pull/11465))
|
||||
|
||||
## 7.11.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@vercel/build-utils",
|
||||
"version": "7.11.0",
|
||||
"version": "8.2.1",
|
||||
"license": "Apache-2.0",
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.js",
|
||||
|
||||
@@ -13,7 +13,7 @@ export const NODE_VERSIONS: NodeVersion[] = [
|
||||
major: 16,
|
||||
range: '16.x',
|
||||
runtime: 'nodejs16.x',
|
||||
discontinueDate: new Date('2024-06-15'),
|
||||
discontinueDate: new Date('2025-02-28'),
|
||||
},
|
||||
{
|
||||
major: 14,
|
||||
|
||||
@@ -240,38 +240,51 @@ export function getSpawnOptions(
|
||||
|
||||
export async function getNodeVersion(
|
||||
destPath: string,
|
||||
nodeVersionFallback = process.env.VERCEL_PROJECT_SETTINGS_NODE_VERSION,
|
||||
fallbackVersion = process.env.VERCEL_PROJECT_SETTINGS_NODE_VERSION,
|
||||
config: Config = {},
|
||||
meta: Meta = {},
|
||||
availableVersions = getAvailableNodeVersions()
|
||||
): Promise<NodeVersion> {
|
||||
const latest = getLatestNodeVersion(availableVersions);
|
||||
const latestVersion = getLatestNodeVersion(availableVersions);
|
||||
if (meta.isDev) {
|
||||
// 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);
|
||||
let nodeVersion = config.nodeVersion || nodeVersionFallback;
|
||||
let isAuto = true;
|
||||
const configuredVersion = config.nodeVersion || fallbackVersion;
|
||||
|
||||
const packageJsonVersion = packageJson?.engines?.node;
|
||||
const supportedNodeVersion = await getSupportedNodeVersion(
|
||||
packageJsonVersion || configuredVersion,
|
||||
!packageJsonVersion,
|
||||
availableVersions
|
||||
);
|
||||
|
||||
if (packageJson?.engines?.node) {
|
||||
const { node } = packageJson.engines;
|
||||
if (nodeVersion && validRange(node) && !intersects(nodeVersion, node)) {
|
||||
if (
|
||||
configuredVersion &&
|
||||
!intersects(configuredVersion, supportedNodeVersion.range)
|
||||
) {
|
||||
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(
|
||||
`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(
|
||||
`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(
|
||||
@@ -413,9 +426,8 @@ export async function runNpmInstall(
|
||||
|
||||
try {
|
||||
await runNpmInstallSema.acquire();
|
||||
const { cliType, packageJsonPath, lockfileVersion } = await scanParentDirs(
|
||||
destPath
|
||||
);
|
||||
const { cliType, packageJsonPath, packageJson, lockfileVersion } =
|
||||
await scanParentDirs(destPath, true);
|
||||
|
||||
if (!packageJsonPath) {
|
||||
debug(
|
||||
@@ -450,6 +462,7 @@ export async function runNpmInstall(
|
||||
opts.env = getEnvForPackageManager({
|
||||
cliType,
|
||||
lockfileVersion,
|
||||
packageJsonPackageManager: packageJson?.packageManager,
|
||||
nodeVersion,
|
||||
env,
|
||||
});
|
||||
@@ -534,64 +547,217 @@ export async function runNpmInstall(
|
||||
export function getEnvForPackageManager({
|
||||
cliType,
|
||||
lockfileVersion,
|
||||
packageJsonPackageManager,
|
||||
nodeVersion,
|
||||
env,
|
||||
}: {
|
||||
cliType: CliType;
|
||||
lockfileVersion: number | undefined;
|
||||
packageJsonPackageManager?: string | undefined;
|
||||
nodeVersion: NodeVersion | undefined;
|
||||
env: { [x: string]: string | undefined };
|
||||
}) {
|
||||
const corepackFlagged = env.ENABLE_EXPERIMENTAL_COREPACK === '1';
|
||||
const corepackEnabled = corepackFlagged && Boolean(packageJsonPackageManager);
|
||||
|
||||
const {
|
||||
detectedLockfile,
|
||||
detectedPackageManager,
|
||||
path: newPath,
|
||||
yarnNodeLinker,
|
||||
} = getPathForPackageManager({
|
||||
} = getPathOverrideForPackageManager({
|
||||
cliType,
|
||||
lockfileVersion,
|
||||
corepackEnabled,
|
||||
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 } = {
|
||||
...env,
|
||||
};
|
||||
|
||||
if (newPath) {
|
||||
const alreadyInPath = (newPath: string) => {
|
||||
const oldPath = env.PATH ?? '';
|
||||
return oldPath.split(path.delimiter).includes(newPath);
|
||||
};
|
||||
|
||||
if (newPath && !alreadyInPath(newPath)) {
|
||||
// Ensure that the binaries of the detected package manager are at the
|
||||
// beginning of the `$PATH`.
|
||||
const oldPath = env.PATH + '';
|
||||
newEnv.PATH = `${newPath}${path.delimiter}${oldPath}`;
|
||||
}
|
||||
|
||||
if (yarnNodeLinker) {
|
||||
newEnv.YARN_NODE_LINKER = yarnNodeLinker;
|
||||
}
|
||||
if (detectedLockfile && detectedPackageManager) {
|
||||
// For pnpm we also show the version of the lockfile we found
|
||||
const versionString =
|
||||
cliType === 'pnpm' ? `version ${lockfileVersion} ` : '';
|
||||
|
||||
if (detectedLockfile && detectedPackageManager) {
|
||||
// For pnpm we also show the version of the lockfile we found
|
||||
const versionString =
|
||||
cliType === 'pnpm' ? `version ${lockfileVersion} ` : '';
|
||||
|
||||
console.log(
|
||||
`Detected \`${detectedLockfile}\` ${versionString}generated by ${detectedPackageManager}`
|
||||
);
|
||||
|
||||
if (cliType === 'bun') {
|
||||
console.warn(
|
||||
'Warning: Bun is used as a package manager at build time only, not at runtime with Functions'
|
||||
console.log(
|
||||
`Detected \`${detectedLockfile}\` ${versionString}generated by ${detectedPackageManager}`
|
||||
);
|
||||
|
||||
if (cliType === 'bun') {
|
||||
console.warn(
|
||||
'Warning: Bun is used as a package manager at build time only, not at runtime with Functions'
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (cliType === 'yarn' && !env.YARN_NODE_LINKER) {
|
||||
newEnv.YARN_NODE_LINKER = 'node-modules';
|
||||
}
|
||||
|
||||
return newEnv;
|
||||
}
|
||||
|
||||
type DetectedPnpmVersion =
|
||||
| 'not found'
|
||||
| 'pnpm 6'
|
||||
| 'pnpm 7'
|
||||
| 'pnpm 8'
|
||||
| 'pnpm 9'
|
||||
| 'corepack_enabled';
|
||||
|
||||
function detectPnpmVersion(
|
||||
lockfileVersion: number | undefined,
|
||||
corepackEnabled: boolean
|
||||
): DetectedPnpmVersion {
|
||||
switch (true) {
|
||||
case corepackEnabled:
|
||||
return 'corepack_enabled';
|
||||
case lockfileVersion === undefined:
|
||||
return 'not found';
|
||||
case lockfileVersion === 5.3:
|
||||
return 'pnpm 6';
|
||||
case lockfileVersion === 5.4:
|
||||
return 'pnpm 7';
|
||||
case lockfileVersion === 6.0 || lockfileVersion === 6.1:
|
||||
return 'pnpm 8';
|
||||
case lockfileVersion === 7.0 || lockfileVersion === 9.0:
|
||||
return 'pnpm 9';
|
||||
default:
|
||||
return 'not found';
|
||||
}
|
||||
}
|
||||
|
||||
function shouldUseNpm7(
|
||||
lockfileVersion: number | undefined,
|
||||
nodeVersion: NodeVersion | undefined
|
||||
): boolean {
|
||||
if (lockfileVersion === undefined) return false;
|
||||
return lockfileVersion >= 2 && (nodeVersion?.major || 0) < 16;
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper to get the binary paths that link to the used package manager.
|
||||
* Note: Make sure it doesn't contain any `console.log` calls.
|
||||
*/
|
||||
export function getPathOverrideForPackageManager({
|
||||
cliType,
|
||||
lockfileVersion,
|
||||
corepackEnabled,
|
||||
nodeVersion,
|
||||
}: {
|
||||
cliType: CliType;
|
||||
lockfileVersion: number | undefined;
|
||||
corepackEnabled: boolean;
|
||||
nodeVersion: NodeVersion | undefined;
|
||||
}): {
|
||||
/**
|
||||
* Which lockfile was detected.
|
||||
*/
|
||||
detectedLockfile: string | undefined;
|
||||
/**
|
||||
* Detected package manager that generated the found lockfile.
|
||||
*/
|
||||
detectedPackageManager: string | undefined;
|
||||
/**
|
||||
* Value of $PATH that includes the binaries for the detected package manager.
|
||||
* Undefined if no $PATH are necessary.
|
||||
*/
|
||||
path: string | undefined;
|
||||
} {
|
||||
const no_override = {
|
||||
detectedLockfile: undefined,
|
||||
detectedPackageManager: undefined,
|
||||
path: undefined,
|
||||
};
|
||||
|
||||
switch (cliType) {
|
||||
case 'npm':
|
||||
switch (true) {
|
||||
case corepackEnabled:
|
||||
return no_override;
|
||||
case shouldUseNpm7(lockfileVersion, nodeVersion):
|
||||
return {
|
||||
path: '/node16/bin-npm7',
|
||||
detectedLockfile: 'package-lock.json',
|
||||
detectedPackageManager: 'npm 7+',
|
||||
};
|
||||
default:
|
||||
return no_override;
|
||||
}
|
||||
case 'pnpm':
|
||||
switch (detectPnpmVersion(lockfileVersion, corepackEnabled)) {
|
||||
case 'corepack_enabled':
|
||||
return no_override;
|
||||
case 'pnpm 7':
|
||||
// pnpm 7
|
||||
return {
|
||||
path: '/pnpm7/node_modules/.bin',
|
||||
detectedLockfile: 'pnpm-lock.yaml',
|
||||
detectedPackageManager: 'pnpm 7',
|
||||
};
|
||||
case 'pnpm 8':
|
||||
// pnpm 8
|
||||
return {
|
||||
path: '/pnpm8/node_modules/.bin',
|
||||
detectedLockfile: 'pnpm-lock.yaml',
|
||||
detectedPackageManager: 'pnpm 8',
|
||||
};
|
||||
case 'pnpm 9':
|
||||
// pnpm 9
|
||||
return {
|
||||
path: '/pnpm9/node_modules/.bin',
|
||||
detectedLockfile: 'pnpm-lock.yaml',
|
||||
detectedPackageManager: 'pnpm 9',
|
||||
};
|
||||
case 'pnpm 6':
|
||||
default:
|
||||
return no_override;
|
||||
}
|
||||
case 'bun':
|
||||
switch (true) {
|
||||
case corepackEnabled:
|
||||
return no_override;
|
||||
default:
|
||||
// Bun 1
|
||||
return {
|
||||
path: '/bun1',
|
||||
detectedLockfile: 'bun.lockb',
|
||||
detectedPackageManager: 'Bun',
|
||||
};
|
||||
}
|
||||
case 'yarn':
|
||||
return no_override;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper to get the binary paths that link to the used package manager.
|
||||
* Note: Make sure it doesn't contain any `console.log` calls.
|
||||
* @deprecated use `getEnvForPackageManager` instead
|
||||
*/
|
||||
export function getPathForPackageManager({
|
||||
cliType,
|
||||
lockfileVersion,
|
||||
@@ -622,70 +788,36 @@ export function getPathForPackageManager({
|
||||
*/
|
||||
yarnNodeLinker: string | undefined;
|
||||
} {
|
||||
let detectedLockfile: string | undefined;
|
||||
let detectedPackageManager: string | undefined;
|
||||
let pathValue: string | undefined;
|
||||
let yarnNodeLinker: string | undefined;
|
||||
const oldPath = env.PATH + '';
|
||||
const npm7 = '/node16/bin-npm7';
|
||||
const pnpm7 = '/pnpm7/node_modules/.bin';
|
||||
const pnpm8 = '/pnpm8/node_modules/.bin';
|
||||
const bun1 = '/bun1';
|
||||
// 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';
|
||||
if (cliType === 'npm') {
|
||||
if (
|
||||
typeof lockfileVersion === 'number' &&
|
||||
lockfileVersion >= 2 &&
|
||||
(nodeVersion?.major || 0) < 16 &&
|
||||
!oldPath.includes(npm7) &&
|
||||
!corepackEnabled
|
||||
) {
|
||||
// npm 7
|
||||
pathValue = npm7;
|
||||
detectedLockfile = 'package-lock.json';
|
||||
detectedPackageManager = 'npm 7+';
|
||||
}
|
||||
} else if (cliType === 'pnpm') {
|
||||
if (
|
||||
typeof lockfileVersion === 'number' &&
|
||||
lockfileVersion === 5.4 &&
|
||||
!oldPath.includes(pnpm7) &&
|
||||
!corepackEnabled
|
||||
) {
|
||||
// pnpm 7
|
||||
pathValue = pnpm7;
|
||||
detectedLockfile = 'pnpm-lock.yaml';
|
||||
detectedPackageManager = 'pnpm 7';
|
||||
} else if (
|
||||
typeof lockfileVersion === 'number' &&
|
||||
lockfileVersion >= 6 &&
|
||||
!oldPath.includes(pnpm8) &&
|
||||
!corepackEnabled
|
||||
) {
|
||||
// pnpm 8
|
||||
pathValue = pnpm8;
|
||||
detectedLockfile = 'pnpm-lock.yaml';
|
||||
detectedPackageManager = 'pnpm 8';
|
||||
}
|
||||
} else if (cliType === 'bun') {
|
||||
if (!oldPath.includes(bun1) && !corepackEnabled) {
|
||||
// Bun 1
|
||||
pathValue = bun1;
|
||||
detectedLockfile = 'bun.lockb';
|
||||
detectedPackageManager = 'Bun';
|
||||
}
|
||||
} else {
|
||||
// Yarn v2 PnP mode may be activated, so force "node-modules" linker style
|
||||
if (!env.YARN_NODE_LINKER) {
|
||||
yarnNodeLinker = 'node-modules';
|
||||
}
|
||||
}
|
||||
return {
|
||||
detectedLockfile,
|
||||
detectedPackageManager,
|
||||
path: pathValue,
|
||||
yarnNodeLinker,
|
||||
|
||||
const overrides = getPathOverrideForPackageManager({
|
||||
cliType,
|
||||
lockfileVersion,
|
||||
corepackEnabled,
|
||||
nodeVersion,
|
||||
});
|
||||
|
||||
const alreadyInPath = (newPath: string) => {
|
||||
const oldPath = env.PATH ?? '';
|
||||
return oldPath.split(path.delimiter).includes(newPath);
|
||||
};
|
||||
|
||||
switch (true) {
|
||||
case cliType === 'yarn' && !env.YARN_NODE_LINKER:
|
||||
return { ...overrides, yarnNodeLinker: 'node-modules' };
|
||||
case alreadyInPath(overrides.path ?? ''):
|
||||
return {
|
||||
detectedLockfile: undefined,
|
||||
detectedPackageManager: undefined,
|
||||
path: undefined,
|
||||
yarnNodeLinker: undefined,
|
||||
};
|
||||
default:
|
||||
return { ...overrides, yarnNodeLinker: undefined };
|
||||
}
|
||||
}
|
||||
|
||||
export async function runCustomInstallCommand({
|
||||
@@ -700,10 +832,14 @@ export async function runCustomInstallCommand({
|
||||
spawnOpts?: SpawnOptions;
|
||||
}) {
|
||||
console.log(`Running "install" command: \`${installCommand}\`...`);
|
||||
const { cliType, lockfileVersion } = await scanParentDirs(destPath);
|
||||
const { cliType, lockfileVersion, packageJson } = await scanParentDirs(
|
||||
destPath,
|
||||
true
|
||||
);
|
||||
const env = getEnvForPackageManager({
|
||||
cliType,
|
||||
lockfileVersion,
|
||||
packageJsonPackageManager: packageJson?.packageManager,
|
||||
nodeVersion,
|
||||
env: spawnOpts?.env || {},
|
||||
});
|
||||
@@ -741,6 +877,7 @@ export async function runPackageJsonScript(
|
||||
env: getEnvForPackageManager({
|
||||
cliType,
|
||||
lockfileVersion,
|
||||
packageJsonPackageManager: packageJson?.packageManager,
|
||||
nodeVersion: undefined,
|
||||
env: cloneEnv(process.env, spawnOpts?.env),
|
||||
}),
|
||||
|
||||
@@ -19,6 +19,7 @@ export function getPrefixedEnvVars({
|
||||
'VERCEL_ENV',
|
||||
'VERCEL_REGION',
|
||||
'VERCEL_BRANCH_URL',
|
||||
'VERCEL_PROJECT_PRODUCTION_URL',
|
||||
];
|
||||
const newEnvs: Envs = {};
|
||||
if (envPrefix && envs.VERCEL_URL) {
|
||||
|
||||
@@ -66,7 +66,6 @@ export interface Meta {
|
||||
filesRemoved?: string[];
|
||||
env?: Env;
|
||||
buildEnv?: Env;
|
||||
avoidTopLevelInstall?: boolean;
|
||||
[key: string]: unknown;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"probes": [
|
||||
{
|
||||
"path": "/",
|
||||
"mustContain": "pnpm version: 6",
|
||||
"mustContain": "pnpm version: 7",
|
||||
"logMustContain": "pnpm run build"
|
||||
}
|
||||
]
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { delimiter } from 'path';
|
||||
import { getEnvForPackageManager, getPathForPackageManager } from '../src';
|
||||
import { getPathOverrideForPackageManager } from '../src/fs/run-user-scripts';
|
||||
|
||||
describe('Test `getEnvForPackageManager()`', () => {
|
||||
let consoleLogSpy: jest.SpyInstance;
|
||||
@@ -34,6 +35,7 @@ describe('Test `getEnvForPackageManager()`', () => {
|
||||
args: {
|
||||
cliType: 'npm',
|
||||
nodeVersion: { major: 14, range: '14.x', runtime: 'nodejs14.x' },
|
||||
packageJsonPackageManager: undefined,
|
||||
lockfileVersion: 1,
|
||||
env: {
|
||||
FOO: 'bar',
|
||||
@@ -50,6 +52,7 @@ describe('Test `getEnvForPackageManager()`', () => {
|
||||
args: {
|
||||
cliType: 'npm',
|
||||
nodeVersion: { major: 14, range: '14.x', runtime: 'nodejs14.x' },
|
||||
packageJsonPackageManager: undefined,
|
||||
lockfileVersion: 2,
|
||||
env: {
|
||||
FOO: 'bar',
|
||||
@@ -68,6 +71,7 @@ describe('Test `getEnvForPackageManager()`', () => {
|
||||
args: {
|
||||
cliType: 'npm',
|
||||
nodeVersion: { major: 14, range: '14.x', runtime: 'nodejs14.x' },
|
||||
packageJsonPackageManager: 'pnpm@latest',
|
||||
lockfileVersion: 2,
|
||||
env: {
|
||||
FOO: 'bar',
|
||||
@@ -86,6 +90,7 @@ describe('Test `getEnvForPackageManager()`', () => {
|
||||
args: {
|
||||
cliType: 'npm',
|
||||
nodeVersion: { major: 14, range: '14.x', runtime: 'nodejs14.x' },
|
||||
packageJsonPackageManager: undefined,
|
||||
lockfileVersion: 2,
|
||||
env: {
|
||||
FOO: 'bar',
|
||||
@@ -104,6 +109,7 @@ describe('Test `getEnvForPackageManager()`', () => {
|
||||
args: {
|
||||
cliType: 'npm',
|
||||
nodeVersion: { major: 16, range: '16.x', runtime: 'nodejs16.x' },
|
||||
packageJsonPackageManager: undefined,
|
||||
lockfileVersion: 2,
|
||||
env: {
|
||||
FOO: 'bar',
|
||||
@@ -122,6 +128,7 @@ describe('Test `getEnvForPackageManager()`', () => {
|
||||
args: {
|
||||
cliType: 'yarn',
|
||||
nodeVersion: { major: 16, range: '16.x', runtime: 'nodejs16.x' },
|
||||
packageJsonPackageManager: undefined,
|
||||
lockfileVersion: 2,
|
||||
env: {
|
||||
FOO: 'bar',
|
||||
@@ -139,6 +146,7 @@ describe('Test `getEnvForPackageManager()`', () => {
|
||||
args: {
|
||||
cliType: 'yarn',
|
||||
nodeVersion: { major: 16, range: '16.x', runtime: 'nodejs16.x' },
|
||||
packageJsonPackageManager: undefined,
|
||||
lockfileVersion: 2,
|
||||
env: {
|
||||
FOO: 'bar',
|
||||
@@ -157,6 +165,7 @@ describe('Test `getEnvForPackageManager()`', () => {
|
||||
args: {
|
||||
cliType: 'pnpm',
|
||||
nodeVersion: { major: 16, range: '16.x', runtime: 'nodejs16.x' },
|
||||
packageJsonPackageManager: undefined,
|
||||
lockfileVersion: 5.4,
|
||||
env: {
|
||||
FOO: 'bar',
|
||||
@@ -171,11 +180,52 @@ describe('Test `getEnvForPackageManager()`', () => {
|
||||
'Detected `pnpm-lock.yaml` version 5.4 generated by pnpm 7',
|
||||
consoleWarnOutput: null,
|
||||
},
|
||||
{
|
||||
name: 'should set path if pnpm 8 is detected',
|
||||
args: {
|
||||
cliType: 'pnpm',
|
||||
nodeVersion: { major: 18, range: '18.x', runtime: 'nodejs18.x' },
|
||||
packageJsonPackageManager: undefined,
|
||||
lockfileVersion: 6.0,
|
||||
env: {
|
||||
FOO: 'bar',
|
||||
PATH: 'foo',
|
||||
},
|
||||
},
|
||||
want: {
|
||||
FOO: 'bar',
|
||||
PATH: `/pnpm8/node_modules/.bin${delimiter}foo`,
|
||||
},
|
||||
consoleLogOutput:
|
||||
'Detected `pnpm-lock.yaml` version 6 generated by pnpm 8',
|
||||
consoleWarnOutput: null,
|
||||
},
|
||||
{
|
||||
name: 'should set path if pnpm 8 is detected',
|
||||
args: {
|
||||
cliType: 'pnpm',
|
||||
nodeVersion: { major: 18, range: '18.x', runtime: 'nodejs18.x' },
|
||||
packageJsonPackageManager: undefined,
|
||||
lockfileVersion: 9.0,
|
||||
env: {
|
||||
FOO: 'bar',
|
||||
PATH: 'foo',
|
||||
},
|
||||
},
|
||||
want: {
|
||||
FOO: 'bar',
|
||||
PATH: `/pnpm9/node_modules/.bin${delimiter}foo`,
|
||||
},
|
||||
consoleLogOutput:
|
||||
'Detected `pnpm-lock.yaml` version 9 generated by pnpm 9',
|
||||
consoleWarnOutput: null,
|
||||
},
|
||||
{
|
||||
name: 'should set path if bun v1 is detected',
|
||||
args: {
|
||||
cliType: 'bun',
|
||||
nodeVersion: { major: 18, range: '18.x', runtime: 'nodejs18.x' },
|
||||
packageJsonPackageManager: undefined,
|
||||
lockfileVersion: 0,
|
||||
env: {
|
||||
FOO: 'bar',
|
||||
@@ -195,6 +245,7 @@ describe('Test `getEnvForPackageManager()`', () => {
|
||||
args: {
|
||||
cliType: 'pnpm',
|
||||
nodeVersion: { major: 16, range: '16.x', runtime: 'nodejs16.x' },
|
||||
packageJsonPackageManager: 'npm@latest',
|
||||
lockfileVersion: 5.4,
|
||||
env: {
|
||||
FOO: 'bar',
|
||||
@@ -213,6 +264,7 @@ describe('Test `getEnvForPackageManager()`', () => {
|
||||
args: {
|
||||
cliType: 'pnpm',
|
||||
nodeVersion: { major: 16, range: '16.x', runtime: 'nodejs16.x' },
|
||||
packageJsonPackageManager: undefined,
|
||||
lockfileVersion: 5.4,
|
||||
env: {
|
||||
FOO: 'bar',
|
||||
@@ -226,27 +278,12 @@ describe('Test `getEnvForPackageManager()`', () => {
|
||||
consoleLogOutput: null,
|
||||
consoleWarnOutput: null,
|
||||
},
|
||||
{
|
||||
name: 'should not set path if pnpm 6 is detected',
|
||||
args: {
|
||||
cliType: 'pnpm',
|
||||
nodeVersion: { major: 14, range: '14.x', runtime: 'nodejs14.x' },
|
||||
lockfileVersion: 5.3,
|
||||
env: {
|
||||
FOO: 'bar',
|
||||
},
|
||||
},
|
||||
want: {
|
||||
FOO: 'bar',
|
||||
},
|
||||
consoleLogOutput: null,
|
||||
consoleWarnOutput: null,
|
||||
},
|
||||
])('$name', ({ args, want, consoleLogOutput, consoleWarnOutput }) => {
|
||||
expect(
|
||||
getEnvForPackageManager({
|
||||
cliType: args.cliType,
|
||||
lockfileVersion: args.lockfileVersion,
|
||||
packageJsonPackageManager: args.packageJsonPackageManager,
|
||||
nodeVersion: args.nodeVersion,
|
||||
env: args.env,
|
||||
})
|
||||
@@ -268,11 +305,210 @@ describe('Test `getEnvForPackageManager()`', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('Test `getPathForPackageManager()`', () => {
|
||||
describe('Test `getPathOverrideForPackageManager()`', () => {
|
||||
test.each<{
|
||||
name: string;
|
||||
args: Parameters<typeof getEnvForPackageManager>[0];
|
||||
want: unknown;
|
||||
}>([
|
||||
{
|
||||
name: 'should do nothing to env for npm < 6 and node < 16',
|
||||
args: {
|
||||
cliType: 'npm',
|
||||
nodeVersion: { major: 14, range: '14.x', runtime: 'nodejs14.x' },
|
||||
packageJsonPackageManager: undefined,
|
||||
lockfileVersion: 1,
|
||||
env: {
|
||||
FOO: 'bar',
|
||||
},
|
||||
},
|
||||
want: {
|
||||
detectedLockfile: undefined,
|
||||
detectedPackageManager: undefined,
|
||||
path: undefined,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'should set path if npm 7+ is detected and node < 16',
|
||||
args: {
|
||||
cliType: 'npm',
|
||||
nodeVersion: { major: 14, range: '14.x', runtime: 'nodejs14.x' },
|
||||
packageJsonPackageManager: undefined,
|
||||
lockfileVersion: 2,
|
||||
env: {
|
||||
FOO: 'bar',
|
||||
PATH: 'foo',
|
||||
},
|
||||
},
|
||||
want: {
|
||||
detectedLockfile: 'package-lock.json',
|
||||
detectedPackageManager: 'npm 7+',
|
||||
path: '/node16/bin-npm7',
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'should not set npm path if corepack enabled',
|
||||
args: {
|
||||
cliType: 'npm',
|
||||
nodeVersion: { major: 14, range: '14.x', runtime: 'nodejs14.x' },
|
||||
packageJsonPackageManager: 'pnpm@latest',
|
||||
lockfileVersion: 2,
|
||||
env: {
|
||||
FOO: 'bar',
|
||||
ENABLE_EXPERIMENTAL_COREPACK: '1',
|
||||
},
|
||||
},
|
||||
want: {
|
||||
detectedLockfile: undefined,
|
||||
detectedPackageManager: undefined,
|
||||
path: undefined,
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
name: 'should not set path if node is 16 and npm 7+ is detected',
|
||||
args: {
|
||||
cliType: 'npm',
|
||||
nodeVersion: { major: 16, range: '16.x', runtime: 'nodejs16.x' },
|
||||
packageJsonPackageManager: undefined,
|
||||
lockfileVersion: 2,
|
||||
env: {
|
||||
FOO: 'bar',
|
||||
PATH: 'foo',
|
||||
},
|
||||
},
|
||||
want: {
|
||||
detectedLockfile: undefined,
|
||||
detectedPackageManager: 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',
|
||||
args: {
|
||||
cliType: 'pnpm',
|
||||
nodeVersion: { major: 16, range: '16.x', runtime: 'nodejs16.x' },
|
||||
packageJsonPackageManager: undefined,
|
||||
lockfileVersion: 5.4,
|
||||
env: {
|
||||
FOO: 'bar',
|
||||
PATH: 'foo',
|
||||
},
|
||||
},
|
||||
want: {
|
||||
detectedLockfile: 'pnpm-lock.yaml',
|
||||
detectedPackageManager: 'pnpm 7',
|
||||
path: '/pnpm7/node_modules/.bin',
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'should set path if pnpm 8 is detected',
|
||||
args: {
|
||||
cliType: 'pnpm',
|
||||
nodeVersion: { major: 18, range: '18.x', runtime: 'nodejs18.x' },
|
||||
packageJsonPackageManager: undefined,
|
||||
lockfileVersion: 6.1,
|
||||
env: {
|
||||
FOO: 'bar',
|
||||
PATH: 'foo',
|
||||
},
|
||||
},
|
||||
want: {
|
||||
detectedLockfile: 'pnpm-lock.yaml',
|
||||
detectedPackageManager: 'pnpm 8',
|
||||
path: '/pnpm8/node_modules/.bin',
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'should set path if pnpm 9 is detected',
|
||||
args: {
|
||||
cliType: 'pnpm',
|
||||
nodeVersion: { major: 18, range: '18.x', runtime: 'nodejs18.x' },
|
||||
packageJsonPackageManager: undefined,
|
||||
lockfileVersion: 7.0,
|
||||
env: {
|
||||
FOO: 'bar',
|
||||
PATH: 'foo',
|
||||
},
|
||||
},
|
||||
want: {
|
||||
detectedLockfile: 'pnpm-lock.yaml',
|
||||
detectedPackageManager: 'pnpm 9',
|
||||
path: '/pnpm9/node_modules/.bin',
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'should set path if bun v1 is detected',
|
||||
args: {
|
||||
cliType: 'bun',
|
||||
nodeVersion: { major: 18, range: '18.x', runtime: 'nodejs18.x' },
|
||||
packageJsonPackageManager: undefined,
|
||||
lockfileVersion: 0,
|
||||
env: {
|
||||
FOO: 'bar',
|
||||
PATH: '/usr/local/bin',
|
||||
},
|
||||
},
|
||||
want: {
|
||||
detectedLockfile: 'bun.lockb',
|
||||
detectedPackageManager: 'Bun',
|
||||
path: '/bun1',
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'should not set pnpm path if corepack is enabled',
|
||||
args: {
|
||||
cliType: 'pnpm',
|
||||
nodeVersion: { major: 16, range: '16.x', runtime: 'nodejs16.x' },
|
||||
packageJsonPackageManager: 'npm@latest',
|
||||
lockfileVersion: 5.4,
|
||||
env: {
|
||||
FOO: 'bar',
|
||||
ENABLE_EXPERIMENTAL_COREPACK: '1',
|
||||
},
|
||||
},
|
||||
want: {
|
||||
detectedLockfile: undefined,
|
||||
detectedPackageManager: undefined,
|
||||
path: undefined,
|
||||
},
|
||||
},
|
||||
])('$name', ({ args, want }) => {
|
||||
expect(
|
||||
getPathOverrideForPackageManager({
|
||||
cliType: args.cliType,
|
||||
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,
|
||||
})
|
||||
).toStrictEqual(want);
|
||||
});
|
||||
});
|
||||
|
||||
describe('Test `getPathForPackageManager()`', () => {
|
||||
test.each<{
|
||||
name: string;
|
||||
args: Parameters<typeof getPathForPackageManager>[0];
|
||||
want: unknown;
|
||||
}>([
|
||||
{
|
||||
name: 'should do nothing to env for npm < 6 and node < 16',
|
||||
@@ -470,23 +706,6 @@ describe('Test `getPathForPackageManager()`', () => {
|
||||
yarnNodeLinker: undefined,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'should not set path if pnpm 6 is detected',
|
||||
args: {
|
||||
cliType: 'pnpm',
|
||||
nodeVersion: { major: 14, range: '14.x', runtime: 'nodejs14.x' },
|
||||
lockfileVersion: 5.3,
|
||||
env: {
|
||||
FOO: 'bar',
|
||||
},
|
||||
},
|
||||
want: {
|
||||
detectedLockfile: undefined,
|
||||
detectedPackageManager: undefined,
|
||||
path: undefined,
|
||||
yarnNodeLinker: undefined,
|
||||
},
|
||||
},
|
||||
])('$name', ({ args, want }) => {
|
||||
expect(
|
||||
getPathForPackageManager({
|
||||
|
||||
@@ -15,6 +15,7 @@ describe('Test `getPrefixedEnvVars()`', () => {
|
||||
VERCEL_URL: 'example.vercel.sh',
|
||||
VERCEL_ENV: 'production',
|
||||
VERCEL_BRANCH_URL: 'example-git-main-acme.vercel.app',
|
||||
VERCEL_PROJECT_PRODUCTION_URL: 'example.com',
|
||||
USER_ENV_VAR_NOT_VERCEL: 'example.com',
|
||||
VERCEL_ARTIFACTS_TOKEN: 'abc123',
|
||||
FOO: 'bar',
|
||||
@@ -24,6 +25,7 @@ describe('Test `getPrefixedEnvVars()`', () => {
|
||||
NEXT_PUBLIC_VERCEL_URL: 'example.vercel.sh',
|
||||
NEXT_PUBLIC_VERCEL_ENV: 'production',
|
||||
NEXT_PUBLIC_VERCEL_BRANCH_URL: 'example-git-main-acme.vercel.app',
|
||||
NEXT_PUBLIC_VERCEL_PROJECT_PRODUCTION_URL: 'example.com',
|
||||
TURBO_CI_VENDOR_ENV_KEY: 'NEXT_PUBLIC_VERCEL_',
|
||||
},
|
||||
},
|
||||
|
||||
21
packages/build-utils/test/unit.test.ts
vendored
21
packages/build-utils/test/unit.test.ts
vendored
@@ -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 () => {
|
||||
expect(
|
||||
await getNodeVersion(
|
||||
@@ -271,7 +286,7 @@ it('should throw for discontinued versions', async () => {
|
||||
// Mock a future date so that Node 16 becomes discontinued
|
||||
const realDateNow = Date.now;
|
||||
try {
|
||||
global.Date.now = () => new Date('2024-07-16').getTime();
|
||||
global.Date.now = () => new Date('2025-03-01').getTime();
|
||||
|
||||
expect(getSupportedNodeVersion('8.10.x', false)).rejects.toThrow();
|
||||
expect(getSupportedNodeVersion('8.10.x', true)).rejects.toThrow();
|
||||
@@ -341,8 +356,8 @@ it('should warn for deprecated versions, soon to be discontinued', async () => {
|
||||
'Error: Node.js version 12.x has reached End-of-Life. Deployments created on or after 2022-10-03 will fail to build. Please set Node.js Version to 20.x in your Project Settings to use Node.js 20.',
|
||||
'Error: Node.js version 14.x has reached End-of-Life. Deployments created on or after 2023-08-15 will fail to build. Please set "engines": { "node": "20.x" } in your `package.json` file to use Node.js 20.',
|
||||
'Error: Node.js version 14.x has reached End-of-Life. Deployments created on or after 2023-08-15 will fail to build. Please set Node.js Version to 20.x in your Project Settings to use Node.js 20.',
|
||||
'Error: Node.js version 16.x has reached End-of-Life. Deployments created on or after 2024-06-15 will fail to build. Please set "engines": { "node": "20.x" } in your `package.json` file to use Node.js 20.',
|
||||
'Error: Node.js version 16.x has reached End-of-Life. Deployments created on or after 2024-06-15 will fail to build. Please set Node.js Version to 20.x in your Project Settings to use Node.js 20.',
|
||||
'Error: Node.js version 16.x has reached End-of-Life. Deployments created on or after 2025-02-28 will fail to build. Please set "engines": { "node": "20.x" } in your `package.json` file to use Node.js 20.',
|
||||
'Error: Node.js version 16.x has reached End-of-Life. Deployments created on or after 2025-02-28 will fail to build. Please set Node.js Version to 20.x in your Project Settings to use Node.js 20.',
|
||||
]);
|
||||
} finally {
|
||||
global.Date.now = realDateNow;
|
||||
|
||||
@@ -1,5 +1,175 @@
|
||||
# vercel
|
||||
|
||||
## 34.2.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`3eb9d8c89`](https://github.com/vercel/vercel/commit/3eb9d8c8929592960d88e0395e2a2443f7304d6b), [`83741a0eb`](https://github.com/vercel/vercel/commit/83741a0eb9e44457b083e8790a11eb89984e6357)]:
|
||||
- @vercel/python@4.3.0
|
||||
- @vercel/build-utils@8.2.1
|
||||
- @vercel/node@3.1.6
|
||||
- @vercel/static-build@2.5.10
|
||||
|
||||
## 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
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`5014b1e82`](https://github.com/vercel/vercel/commit/5014b1e82a46181baeb727ffe6d14000b6a4b1d7), [`18d1703d5`](https://github.com/vercel/vercel/commit/18d1703d5b4f2adc61fd56011f874c393fa57d0d), [`e87d4c14d`](https://github.com/vercel/vercel/commit/e87d4c14d0e718281f9ba91c9ec1cc6e142d383d), [`bc5fd4115`](https://github.com/vercel/vercel/commit/bc5fd41158ec9f36e5db1fe749589adcbaec6950)]:
|
||||
- @vercel/build-utils@8.1.0
|
||||
- @vercel/next@4.2.10
|
||||
- @vercel/redwood@2.0.9
|
||||
- @vercel/remix-builder@2.1.6
|
||||
- @vercel/node@3.1.1
|
||||
- @vercel/static-build@2.5.5
|
||||
|
||||
## 34.1.10
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`119f80e96`](https://github.com/vercel/vercel/commit/119f80e9611a7a5a755aa689502dcdab323194aa), [`11584b0e9`](https://github.com/vercel/vercel/commit/11584b0e9b55f312f34d0d6467ab498e472ac9df), [`3023122d4`](https://github.com/vercel/vercel/commit/3023122d4e0dd292340d9e9e61ef232baf6e610d), [`0e774b6be`](https://github.com/vercel/vercel/commit/0e774b6be0c832213a64124e1f4fc6d150e87d9f)]:
|
||||
- @vercel/next@4.2.9
|
||||
- @vercel/static-build@2.5.4
|
||||
|
||||
## 34.1.9
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`5a532a5b9`](https://github.com/vercel/vercel/commit/5a532a5b948994ba04783ac560357eed9f94a3f3), [`50fc27ba5`](https://github.com/vercel/vercel/commit/50fc27ba5773870956300bbbaffbe387d549bc12), [`c1d852295`](https://github.com/vercel/vercel/commit/c1d85229509dd319a1f11beb940a759113564d33), [`a5ea04154`](https://github.com/vercel/vercel/commit/a5ea04154ba26ee4e635d8953aa4f0d9d82d3a96)]:
|
||||
- @vercel/next@4.2.8
|
||||
- @vercel/node@3.1.0
|
||||
|
||||
## 34.1.8
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`52e435aa5`](https://github.com/vercel/vercel/commit/52e435aa5d7b4014d19477969ad5cbfbe94aa76f), [`124846a3e`](https://github.com/vercel/vercel/commit/124846a3e65a3bf1ae82327fd4ba2b132674fb39), [`dc974b679`](https://github.com/vercel/vercel/commit/dc974b6797de0b6e90373c92e1f2bbdafcfc6687), [`58c6755e0`](https://github.com/vercel/vercel/commit/58c6755e0c12cae2ce55978b7bf8722133151196)]:
|
||||
- @vercel/next@4.2.7
|
||||
- @vercel/static-build@2.5.3
|
||||
|
||||
## 34.1.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`3420ba015`](https://github.com/vercel/vercel/commit/3420ba0153dcabffef7114ba2361fb0f3c43a7b3)]:
|
||||
- @vercel/next@4.2.6
|
||||
|
||||
## 34.1.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`b1adaf76e`](https://github.com/vercel/vercel/commit/b1adaf76ec17d1bbfe30a2bf65405bd886fa9bcf), [`3fb97d1d2`](https://github.com/vercel/vercel/commit/3fb97d1d270e835ce34a687bd234ea53dfe446a2)]:
|
||||
- @vercel/next@4.2.5
|
||||
- @vercel/static-build@2.5.2
|
||||
|
||||
## 34.1.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`763a6d107`](https://github.com/vercel/vercel/commit/763a6d10709ca40405634d41863c2e524917ebe1), [`15475c8a2`](https://github.com/vercel/vercel/commit/15475c8a2c303a1dd189ba24044fac750280dd2e), [`21f5e7375`](https://github.com/vercel/vercel/commit/21f5e7375e4cb4ceed98ab56486d09a85fa3894d)]:
|
||||
- @vercel/ruby@2.1.0
|
||||
- @vercel/build-utils@8.0.0
|
||||
- @vercel/node@3.0.28
|
||||
- @vercel/static-build@2.5.1
|
||||
|
||||
## 34.1.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`5b7960337`](https://github.com/vercel/vercel/commit/5b79603378a50fd04d5be1c3a3e5cd605b61478f)]:
|
||||
- @vercel/next@4.2.4
|
||||
|
||||
## 34.1.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`5758838d0`](https://github.com/vercel/vercel/commit/5758838d090b9789ca6821e1122781352021109f)]:
|
||||
- @vercel/next@4.2.3
|
||||
|
||||
## 34.1.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`64bd6dd05`](https://github.com/vercel/vercel/commit/64bd6dd0578d82f210b942b88baaa0673218d8b0), [`532885148`](https://github.com/vercel/vercel/commit/532885148b583700df5a120350c620af6ad34cd7), [`adcfc365a`](https://github.com/vercel/vercel/commit/adcfc365a7d375d7a70d434669e4472031693489)]:
|
||||
- @vercel/next@4.2.2
|
||||
- @vercel/python@4.2.0
|
||||
|
||||
## 34.1.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`f4c181a2c`](https://github.com/vercel/vercel/commit/f4c181a2c26b11afadf78e68baf1246a27240755), [`2826563ff`](https://github.com/vercel/vercel/commit/2826563ffab7ab01d3c85def2cad8c4041cd88b1)]:
|
||||
- @vercel/static-build@2.5.0
|
||||
- @vercel/build-utils@7.12.0
|
||||
- @vercel/node@3.0.27
|
||||
|
||||
## 34.1.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "vercel",
|
||||
"version": "34.1.0",
|
||||
"version": "34.2.4",
|
||||
"preferGlobal": true,
|
||||
"license": "Apache-2.0",
|
||||
"description": "The command-line interface for Vercel",
|
||||
@@ -12,8 +12,8 @@
|
||||
},
|
||||
"scripts": {
|
||||
"test": "jest --reporters=default --reporters=jest-junit --env node --verbose --bail",
|
||||
"vitest-unit-run": "pnpm vitest",
|
||||
"vitest-unit": "pnpm jest test/unit/ --listTests",
|
||||
"vitest-run": "vitest",
|
||||
"vitest-unit": "jest test/unit/ --listTests",
|
||||
"test-e2e": "rimraf test/fixtures/integration && pnpm test test/integration-1.test.ts test/integration-2.test.ts test/integration-3.test.ts",
|
||||
"test-dev": "pnpm test test/dev/",
|
||||
"coverage": "codecov",
|
||||
@@ -32,17 +32,17 @@
|
||||
"node": ">= 16"
|
||||
},
|
||||
"dependencies": {
|
||||
"@vercel/build-utils": "7.11.0",
|
||||
"@vercel/build-utils": "8.2.1",
|
||||
"@vercel/fun": "1.1.0",
|
||||
"@vercel/go": "3.1.1",
|
||||
"@vercel/hydrogen": "1.0.2",
|
||||
"@vercel/next": "4.2.1",
|
||||
"@vercel/node": "3.0.26",
|
||||
"@vercel/python": "4.1.1",
|
||||
"@vercel/redwood": "2.0.8",
|
||||
"@vercel/remix-builder": "2.1.5",
|
||||
"@vercel/ruby": "2.0.5",
|
||||
"@vercel/static-build": "2.4.6",
|
||||
"@vercel/next": "4.2.14",
|
||||
"@vercel/node": "3.1.6",
|
||||
"@vercel/python": "4.3.0",
|
||||
"@vercel/redwood": "2.0.9",
|
||||
"@vercel/remix-builder": "2.1.6",
|
||||
"@vercel/ruby": "2.1.0",
|
||||
"@vercel/static-build": "2.5.10",
|
||||
"chokidar": "3.3.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
@@ -92,8 +92,8 @@
|
||||
"@types/yauzl-promise": "2.1.0",
|
||||
"@vercel-internals/constants": "1.0.4",
|
||||
"@vercel-internals/get-package-json": "1.0.0",
|
||||
"@vercel-internals/types": "1.0.29",
|
||||
"@vercel/client": "13.2.0",
|
||||
"@vercel-internals/types": "1.0.37",
|
||||
"@vercel/client": "13.2.8",
|
||||
"@vercel/error-utils": "2.0.2",
|
||||
"@vercel/frameworks": "3.0.2",
|
||||
"@vercel/fs-detectors": "5.2.3",
|
||||
|
||||
@@ -52,7 +52,7 @@ export const aliasCommand: Command = {
|
||||
name: 'next',
|
||||
description: 'Show next page of results',
|
||||
argument: 'MS',
|
||||
shorthand: 'n',
|
||||
shorthand: 'N',
|
||||
type: String,
|
||||
deprecated: false,
|
||||
},
|
||||
@@ -65,13 +65,14 @@ export const aliasCommand: Command = {
|
||||
},
|
||||
{
|
||||
name: 'limit',
|
||||
shorthand: 'n',
|
||||
shorthand: null,
|
||||
description:
|
||||
'Number of results to return per page (default: 20, max: 100)',
|
||||
argument: 'NUMBER',
|
||||
type: String,
|
||||
deprecated: false,
|
||||
},
|
||||
{ name: 'json', shorthand: null, type: Boolean, deprecated: false },
|
||||
],
|
||||
examples: [
|
||||
{
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
import { handleError } from '../../util/error';
|
||||
import Client from '../../util/client';
|
||||
import getArgs from '../../util/get-args';
|
||||
import { parseArguments } from '../../util/get-args';
|
||||
import getSubcommand from '../../util/get-subcommand';
|
||||
import { help } from '../help';
|
||||
import ls from './ls';
|
||||
import rm from './rm';
|
||||
import set from './set';
|
||||
import { aliasCommand } from './command';
|
||||
import { getFlagsSpecification } from '../../util/get-flags-specification';
|
||||
|
||||
const COMMAND_CONFIG = {
|
||||
default: ['set'],
|
||||
@@ -16,35 +17,33 @@ const COMMAND_CONFIG = {
|
||||
};
|
||||
|
||||
export default async function alias(client: Client) {
|
||||
let argv;
|
||||
let parsedArguments;
|
||||
|
||||
const flagsSpecification = getFlagsSpecification(aliasCommand.options);
|
||||
|
||||
try {
|
||||
argv = getArgs(client.argv.slice(2), {
|
||||
'--json': Boolean,
|
||||
'--yes': Boolean,
|
||||
'--next': Number,
|
||||
'--limit': Number,
|
||||
'-y': '--yes',
|
||||
'-N': '--next',
|
||||
});
|
||||
parsedArguments = parseArguments(client.argv.slice(2), flagsSpecification);
|
||||
} catch (err) {
|
||||
handleError(err);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (argv['--help']) {
|
||||
if (parsedArguments.flags['--help']) {
|
||||
client.output.print(help(aliasCommand, { columns: client.stderr.columns }));
|
||||
return 2;
|
||||
}
|
||||
|
||||
const { subcommand, args } = getSubcommand(argv._.slice(1), COMMAND_CONFIG);
|
||||
const { subcommand, args } = getSubcommand(
|
||||
parsedArguments.args.slice(1),
|
||||
COMMAND_CONFIG
|
||||
);
|
||||
|
||||
switch (subcommand) {
|
||||
case 'ls':
|
||||
return ls(client, argv, args);
|
||||
return ls(client, parsedArguments.flags, args);
|
||||
case 'rm':
|
||||
return rm(client, argv, args);
|
||||
return rm(client, parsedArguments.flags, args);
|
||||
default:
|
||||
return set(client, argv, args);
|
||||
return set(client, parsedArguments.flags, args);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ export const bisectCommand: Command = {
|
||||
description: 'Automatically open each URL in the browser',
|
||||
argument: 'URL',
|
||||
shorthand: 'o',
|
||||
type: String,
|
||||
type: Boolean,
|
||||
deprecated: false,
|
||||
},
|
||||
{
|
||||
|
||||
@@ -8,7 +8,7 @@ import { URLSearchParams, parse } from 'url';
|
||||
import box from '../../util/output/box';
|
||||
import formatDate from '../../util/format-date';
|
||||
import link from '../../util/output/link';
|
||||
import getArgs from '../../util/get-args';
|
||||
import { parseArguments } from '../../util/get-args';
|
||||
import Client from '../../util/client';
|
||||
import { Deployment } from '@vercel-internals/types';
|
||||
import { normalizeURL } from '../../util/bisect/normalize-url';
|
||||
@@ -16,6 +16,8 @@ import getScope from '../../util/get-scope';
|
||||
import getDeployment from '../../util/get-deployment';
|
||||
import { help } from '../help';
|
||||
import { bisectCommand } from './command';
|
||||
import { getFlagsSpecification } from '../../util/get-flags-specification';
|
||||
import handleError from '../../util/handle-error';
|
||||
|
||||
interface Deployments {
|
||||
deployments: Deployment[];
|
||||
@@ -25,39 +27,37 @@ export default async function bisect(client: Client): Promise<number> {
|
||||
const scope = await getScope(client);
|
||||
const { contextName } = scope;
|
||||
|
||||
const argv = getArgs(client.argv.slice(2), {
|
||||
'--bad': String,
|
||||
'-b': '--bad',
|
||||
'--good': String,
|
||||
'-g': '--good',
|
||||
'--open': Boolean,
|
||||
'-o': '--open',
|
||||
'--path': String,
|
||||
'-p': '--path',
|
||||
'--run': String,
|
||||
'-r': '--run',
|
||||
});
|
||||
let parsedArgs = null;
|
||||
|
||||
if (argv['--help']) {
|
||||
const flagsSpecification = getFlagsSpecification(bisectCommand.options);
|
||||
|
||||
try {
|
||||
parsedArgs = parseArguments(client.argv.slice(2), flagsSpecification);
|
||||
} catch (error) {
|
||||
handleError(error);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (parsedArgs.flags['--help']) {
|
||||
output.print(help(bisectCommand, { columns: client.stderr.columns }));
|
||||
return 2;
|
||||
}
|
||||
|
||||
let bad =
|
||||
argv['--bad'] ||
|
||||
parsedArgs.flags['--bad'] ||
|
||||
(await client.input.text({
|
||||
message: `Specify a URL where the bug occurs:`,
|
||||
validate: val => (val ? true : 'A URL must be provided'),
|
||||
}));
|
||||
let good =
|
||||
argv['--good'] ||
|
||||
parsedArgs.flags['--good'] ||
|
||||
(await client.input.text({
|
||||
message: `Specify a URL where the bug does not occur:`,
|
||||
validate: val => (val ? true : 'A URL must be provided'),
|
||||
}));
|
||||
let subpath = argv['--path'] || '';
|
||||
let run = argv['--run'] || '';
|
||||
const openEnabled = argv['--open'] || false;
|
||||
let subpath = parsedArgs.flags['--path'] || '';
|
||||
let run = parsedArgs.flags['--run'] || '';
|
||||
const openEnabled = parsedArgs.flags['--open'] || false;
|
||||
|
||||
if (run) {
|
||||
run = resolve(run);
|
||||
|
||||
@@ -10,7 +10,7 @@ export const buildCommand: Command = {
|
||||
name: 'prod',
|
||||
description: 'Build a production deployment',
|
||||
shorthand: null,
|
||||
type: String,
|
||||
type: Boolean,
|
||||
deprecated: false,
|
||||
},
|
||||
{
|
||||
|
||||
@@ -43,7 +43,7 @@ import type { VercelConfig } from '@vercel/client';
|
||||
import pull from '../pull';
|
||||
import { staticFiles as getFiles } from '../../util/get-files';
|
||||
import Client from '../../util/client';
|
||||
import getArgs from '../../util/get-args';
|
||||
import { parseArguments } from '../../util/get-args';
|
||||
import cmd from '../../util/output/cmd';
|
||||
import * as cli from '../../util/pkg-name';
|
||||
import cliPkg from '../../util/pkg';
|
||||
@@ -66,12 +66,13 @@ import {
|
||||
import { importBuilders } from '../../util/build/import-builders';
|
||||
import { initCorepack, cleanupCorepack } from '../../util/build/corepack';
|
||||
import { sortBuilders } from '../../util/build/sort-builders';
|
||||
import { toEnumerableError } from '../../util/error';
|
||||
import { handleError, toEnumerableError } from '../../util/error';
|
||||
import { validateConfig } from '../../util/validate-config';
|
||||
import { setMonorepoDefaultSettings } from '../../util/build/monorepo';
|
||||
import { help } from '../help';
|
||||
import { buildCommand } from './command';
|
||||
import { scrubArgv } from '../../util/build/scrub-argv';
|
||||
import { getFlagsSpecification } from '../../util/get-flags-specification';
|
||||
|
||||
type BuildResult = BuildResultV2 | BuildResultV3;
|
||||
|
||||
@@ -133,22 +134,26 @@ export default async function main(client: Client): Promise<number> {
|
||||
process.env.__VERCEL_BUILD_RUNNING = '1';
|
||||
}
|
||||
|
||||
// Parse CLI args
|
||||
const argv = getArgs(client.argv.slice(2), {
|
||||
'--output': String,
|
||||
'--prod': Boolean,
|
||||
'--yes': Boolean,
|
||||
'-y': '--yes',
|
||||
});
|
||||
let parsedArgs = null;
|
||||
|
||||
if (argv['--help']) {
|
||||
const flagsSpecification = getFlagsSpecification(buildCommand.options);
|
||||
|
||||
// Parse CLI args
|
||||
try {
|
||||
parsedArgs = parseArguments(client.argv.slice(2), flagsSpecification);
|
||||
} catch (error) {
|
||||
handleError(error);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (parsedArgs.flags['--help']) {
|
||||
output.print(help(buildCommand, { columns: client.stderr.columns }));
|
||||
return 2;
|
||||
}
|
||||
|
||||
// Build `target` influences which environment variables will be used
|
||||
const target = argv['--prod'] ? 'production' : 'preview';
|
||||
const yes = Boolean(argv['--yes']);
|
||||
const target = parsedArgs.flags['--prod'] ? 'production' : 'preview';
|
||||
const yes = Boolean(parsedArgs.flags['--yes']);
|
||||
|
||||
try {
|
||||
await validateNpmrc(cwd);
|
||||
@@ -213,8 +218,8 @@ export default async function main(client: Client): Promise<number> {
|
||||
|
||||
// Delete output directory from potential previous build
|
||||
const defaultOutputDir = join(cwd, projectRootDirectory, OUTPUT_DIR);
|
||||
const outputDir = argv['--output']
|
||||
? resolve(argv['--output'])
|
||||
const outputDir = parsedArgs.flags['--output']
|
||||
? resolve(parsedArgs.flags['--output'])
|
||||
: defaultOutputDir;
|
||||
await Promise.all([
|
||||
fs.remove(outputDir),
|
||||
|
||||
2
packages/cli/src/util/env/get-env-records.ts
vendored
2
packages/cli/src/util/env/get-env-records.ts
vendored
@@ -70,7 +70,7 @@ export async function pullEnvRecords(
|
||||
);
|
||||
const query = new URLSearchParams();
|
||||
|
||||
let url = `/v1/env/pull/${projectId}`;
|
||||
let url = `/v2/env/pull/${projectId}`;
|
||||
|
||||
if (target) {
|
||||
url += `/${encodeURIComponent(target)}`;
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { spawnAsync } from '@vercel/build-utils';
|
||||
import { resolve, delimiter } from 'path';
|
||||
|
||||
const {
|
||||
@@ -97,10 +98,16 @@ test('[vercel dev] 08-hugo', async () => {
|
||||
new Error('Dev server timed out while waiting to be ready')
|
||||
);
|
||||
|
||||
// 2. Update PATH to find the Hugo executable installed via GH Actions
|
||||
process.env.PATH = `${resolve(fixture('08-hugo'))}${delimiter}${
|
||||
process.env.PATH
|
||||
}`;
|
||||
// 2. Download `hugo` and update PATH
|
||||
const hugoFixture = resolve(fixture('08-hugo'));
|
||||
await spawnAsync(
|
||||
`curl -sSL https://github.com/gohugoio/hugo/releases/download/v0.56.0/hugo_0.56.0_macOS-64bit.tar.gz | tar -xz -C "${hugoFixture}"`,
|
||||
[],
|
||||
{
|
||||
shell: true,
|
||||
}
|
||||
);
|
||||
process.env.PATH = `${hugoFixture}${delimiter}${process.env.PATH}`;
|
||||
|
||||
// 3. Rerun the test now that Hugo is in the PATH
|
||||
tester = testFixtureStdio(
|
||||
|
||||
32
packages/cli/test/fixtures/e2e/cli-extension-exit-code/package-lock.json
generated
vendored
Normal file
32
packages/cli/test/fixtures/e2e/cli-extension-exit-code/package-lock.json
generated
vendored
Normal 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"
|
||||
}
|
||||
}
|
||||
}
|
||||
6
packages/cli/test/fixtures/e2e/cli-extension-exit-code/package.json
vendored
Normal file
6
packages/cli/test/fixtures/e2e/cli-extension-exit-code/package.json
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"cli-extension-fail": "file:../cli-extension-fail"
|
||||
}
|
||||
}
|
||||
2
packages/cli/test/fixtures/e2e/cli-extension-fail/bin.js
vendored
Executable file
2
packages/cli/test/fixtures/e2e/cli-extension-fail/bin.js
vendored
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/usr/bin/env node
|
||||
process.exit(6);
|
||||
6
packages/cli/test/fixtures/e2e/cli-extension-fail/package.json
vendored
Normal file
6
packages/cli/test/fixtures/e2e/cli-extension-fail/package.json
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"name": "cli-extension-fail",
|
||||
"bin": {
|
||||
"vercel-fail": "bin.js"
|
||||
}
|
||||
}
|
||||
30
packages/cli/test/integration-1.test.ts
vendored
30
packages/cli/test/integration-1.test.ts
vendored
@@ -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_DECRYPTABLE_SECRET_ENV']).toBe('decryptable value');
|
||||
|
||||
// system env vars are automatically exposed
|
||||
expect(apiJson['VERCEL']).toBe('1');
|
||||
expect(homeJson['VERCEL']).toBe('1');
|
||||
// system env vars are hidden in dev
|
||||
expect(apiJson['VERCEL']).toBeUndefined();
|
||||
expect(homeJson['VERCEL']).toBeUndefined();
|
||||
|
||||
// sleep before kill, otherwise the dev process doesn't clean up and exit properly
|
||||
await sleep(100);
|
||||
@@ -949,7 +949,7 @@ test('Deploy `api-env` fixture and test `vercel env` command', async () => {
|
||||
async function vcEnvPullFetchSystemVars() {
|
||||
const { exitCode, stdout, stderr } = await execCli(
|
||||
binaryPath,
|
||||
['env', 'pull', '-y'],
|
||||
['env', 'pull', '-y', '--environment', 'production'],
|
||||
{
|
||||
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_URL=""');
|
||||
expect(lines).toContain('VERCEL_ENV="development"');
|
||||
expect(lines).toContain('VERCEL_ENV="production"');
|
||||
expect(lines).toContain('VERCEL_GIT_PROVIDER=""');
|
||||
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 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_ENV']).toBe('development');
|
||||
expect(apiJson['VERCEL_REGION']).toBe('dev1');
|
||||
expect(apiJson['VERCEL_GIT_PROVIDER']).toBe('');
|
||||
expect(apiJson['VERCEL_GIT_REPO_SLUG']).toBe('');
|
||||
|
||||
const homeUrl = localhost[0];
|
||||
const homeRes = await fetch(homeUrl);
|
||||
const homeJson = await homeRes.json();
|
||||
expect(homeJson['VERCEL']).toBe('1');
|
||||
expect(homeJson['VERCEL']).toBeUndefined();
|
||||
expect(homeJson['VERCEL_URL']).toBe(localhostNoProtocol);
|
||||
expect(homeJson['VERCEL_ENV']).toBe('development');
|
||||
expect(homeJson['VERCEL_REGION']).toBe(undefined);
|
||||
expect(homeJson['VERCEL_GIT_PROVIDER']).toBe('');
|
||||
expect(homeJson['VERCEL_GIT_REPO_SLUG']).toBe('');
|
||||
expect(homeJson['VERCEL_ENV']).toBeUndefined();
|
||||
expect(homeJson['VERCEL_REGION']).toBeUndefined();
|
||||
expect(homeJson['VERCEL_GIT_PROVIDER']).toBeUndefined();
|
||||
expect(homeJson['VERCEL_GIT_REPO_SLUG']).toBeUndefined();
|
||||
|
||||
// sleep before kill, otherwise the dev process doesn't clean up and exit properly
|
||||
await sleep(100);
|
||||
|
||||
15
packages/cli/test/integration-3.test.ts
vendored
15
packages/cli/test/integration-3.test.ts
vendored
@@ -1255,7 +1255,7 @@ test('fail to deploy a Lambda with an incorrect value for maxDuration', async ()
|
||||
|
||||
expect(output.exitCode, formatOutput(output)).toBe(1);
|
||||
expect(output.stderr).toMatch(
|
||||
/maxDuration must be between 1 second and 10 seconds/gm
|
||||
/maxDuration must be between \d+ second and \d+ seconds/gm
|
||||
);
|
||||
});
|
||||
|
||||
@@ -1327,6 +1327,19 @@ test('should invoke CLI extension', async () => {
|
||||
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.
|
||||
test('default command should prompt login with empty auth.json', async () => {
|
||||
await clearAuthConfig();
|
||||
|
||||
@@ -216,7 +216,7 @@ export function useProject(
|
||||
res.json(project);
|
||||
});
|
||||
client.scenario.get(
|
||||
`/v1/env/pull/${project.id}/:target?/:gitBranch?`,
|
||||
`/v2/env/pull/${project.id}/:target?/:gitBranch?`,
|
||||
(req, res) => {
|
||||
const target =
|
||||
typeof req.params.target === 'string'
|
||||
@@ -390,7 +390,7 @@ function exposeSystemEnvs(
|
||||
) {
|
||||
const envs: Env = {};
|
||||
|
||||
if (autoExposeSystemEnvs) {
|
||||
if (autoExposeSystemEnvs && target !== 'development') {
|
||||
envs['VERCEL'] = '1';
|
||||
envs['VERCEL_ENV'] = target || 'development';
|
||||
|
||||
|
||||
@@ -24,18 +24,16 @@ exports[`help command > alias help output snapshots > alias help column width 40
|
||||
|
||||
[2mOptions[22m:
|
||||
|
||||
-n, --limit <NUMBER> Number of
|
||||
results to
|
||||
return per page
|
||||
(default: 20,
|
||||
max: 100)
|
||||
-n, --next <MS> Show next page
|
||||
of results
|
||||
-y, --yes Skip the
|
||||
confirmation
|
||||
prompt when
|
||||
removing an
|
||||
alias
|
||||
--limit <NUMBER> Number of results to
|
||||
return per page
|
||||
(default: 20, max:
|
||||
100)
|
||||
-N, --next <MS> Show next page of
|
||||
results
|
||||
-y, --yes Skip the
|
||||
confirmation prompt
|
||||
when removing an
|
||||
alias
|
||||
|
||||
|
||||
[2mGlobal Options[22m:
|
||||
@@ -108,10 +106,9 @@ exports[`help command > alias help output snapshots > alias help column width 80
|
||||
|
||||
[2mOptions[22m:
|
||||
|
||||
-n, --limit <NUMBER> Number of results to return per page (default: 20, max:
|
||||
100)
|
||||
-n, --next <MS> Show next page of results
|
||||
-y, --yes Skip the confirmation prompt when removing an alias
|
||||
--limit <NUMBER> Number of results to return per page (default: 20, max: 100)
|
||||
-N, --next <MS> Show next page of results
|
||||
-y, --yes Skip the confirmation prompt when removing an alias
|
||||
|
||||
|
||||
[2mGlobal Options[22m:
|
||||
@@ -160,9 +157,9 @@ exports[`help command > alias help output snapshots > alias help column width 12
|
||||
|
||||
[2mOptions[22m:
|
||||
|
||||
-n, --limit <NUMBER> Number of results to return per page (default: 20, max: 100)
|
||||
-n, --next <MS> Show next page of results
|
||||
-y, --yes Skip the confirmation prompt when removing an alias
|
||||
--limit <NUMBER> Number of results to return per page (default: 20, max: 100)
|
||||
-N, --next <MS> Show next page of results
|
||||
-y, --yes Skip the confirmation prompt when removing an alias
|
||||
|
||||
|
||||
[2mGlobal Options[22m:
|
||||
|
||||
@@ -205,10 +205,17 @@ describe('env', () => {
|
||||
});
|
||||
const cwd = setupUnitFixture('vercel-env-pull');
|
||||
client.cwd = cwd;
|
||||
client.setArgv('env', 'pull', 'other.env', '--yes');
|
||||
client.setArgv(
|
||||
'env',
|
||||
'pull',
|
||||
'other.env',
|
||||
'--yes',
|
||||
'--environment',
|
||||
'production'
|
||||
);
|
||||
const exitCodePromise = env(client);
|
||||
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).not.toOutput('and added it to .gitignore');
|
||||
@@ -218,10 +225,44 @@ describe('env', () => {
|
||||
|
||||
const productionFileHasVercelEnv = rawDevEnv
|
||||
.toString()
|
||||
.includes('VERCEL_ENV="development"');
|
||||
.includes('VERCEL_ENV="production"');
|
||||
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 () => {
|
||||
const cwd = setupUnitFixture('vercel-env-pull-delta');
|
||||
client.cwd = cwd;
|
||||
|
||||
@@ -1,5 +1,61 @@
|
||||
# @vercel/client
|
||||
|
||||
## 13.2.8
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`83741a0eb`](https://github.com/vercel/vercel/commit/83741a0eb9e44457b083e8790a11eb89984e6357)]:
|
||||
- @vercel/build-utils@8.2.1
|
||||
|
||||
## 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
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`5014b1e82`](https://github.com/vercel/vercel/commit/5014b1e82a46181baeb727ffe6d14000b6a4b1d7)]:
|
||||
- @vercel/build-utils@8.1.0
|
||||
|
||||
## 13.2.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`15475c8a2`](https://github.com/vercel/vercel/commit/15475c8a2c303a1dd189ba24044fac750280dd2e), [`21f5e7375`](https://github.com/vercel/vercel/commit/21f5e7375e4cb4ceed98ab56486d09a85fa3894d)]:
|
||||
- @vercel/build-utils@8.0.0
|
||||
|
||||
## 13.2.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`2826563ff`](https://github.com/vercel/vercel/commit/2826563ffab7ab01d3c85def2cad8c4041cd88b1)]:
|
||||
- @vercel/build-utils@7.12.0
|
||||
|
||||
## 13.2.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@vercel/client",
|
||||
"version": "13.2.0",
|
||||
"version": "13.2.8",
|
||||
"main": "dist/index.js",
|
||||
"typings": "dist/index.d.ts",
|
||||
"homepage": "https://vercel.com",
|
||||
@@ -37,7 +37,7 @@
|
||||
"typescript": "4.9.5"
|
||||
},
|
||||
"dependencies": {
|
||||
"@vercel/build-utils": "7.11.0",
|
||||
"@vercel/build-utils": "8.2.1",
|
||||
"@vercel/error-utils": "2.0.2",
|
||||
"@vercel/routing-utils": "3.1.0",
|
||||
"@zeit/fetch": "5.2.0",
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
"@types/minimatch": "3.0.5",
|
||||
"@types/node": "14.18.33",
|
||||
"@types/semver": "7.3.10",
|
||||
"@vercel/build-utils": "7.11.0",
|
||||
"@vercel/build-utils": "8.2.1",
|
||||
"jest-junit": "16.0.0",
|
||||
"typescript": "4.9.5"
|
||||
}
|
||||
|
||||
19
packages/functions/CHANGELOG.md
Normal file
19
packages/functions/CHANGELOG.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# @vercel/functions
|
||||
|
||||
## 1.0.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Convert package to CommonJS ([#11569](https://github.com/vercel/vercel/pull/11569))
|
||||
|
||||
## 1.0.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Don't throw error if context is missing ([`0817527f9`](https://github.com/vercel/vercel/commit/0817527f9e9d0d5fceb73f21e695089349a96d3e))
|
||||
|
||||
## 1.0.0
|
||||
|
||||
### Major Changes
|
||||
|
||||
- Initial release ([#11553](https://github.com/vercel/vercel/pull/11553))
|
||||
17
packages/functions/index.d.ts
vendored
Normal file
17
packages/functions/index.d.ts
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* Extends the lifetime of the request handler for the lifetime of the given {@link Promise}
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/API/ExtendableEvent/waitUntil
|
||||
*
|
||||
* @param promise The promise to wait for.
|
||||
* @example
|
||||
*
|
||||
* ```
|
||||
* import { waitUntil } from '@vercel/functions';
|
||||
*
|
||||
* export function GET(request) {
|
||||
* waitUntil(fetch('https://vercel.com'));
|
||||
* return new Response('OK');
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
export function waitUntil(promise: Promise<unknown>): void;
|
||||
16
packages/functions/index.js
Normal file
16
packages/functions/index.js
Normal file
@@ -0,0 +1,16 @@
|
||||
/* global globalThis */
|
||||
|
||||
exports.waitUntil = promise => {
|
||||
if (
|
||||
promise === null ||
|
||||
typeof promise !== 'object' ||
|
||||
typeof promise.then !== 'function'
|
||||
) {
|
||||
throw new TypeError(
|
||||
`waitUntil can only be called with a Promise, got ${typeof promise}`
|
||||
);
|
||||
}
|
||||
|
||||
const ctx = globalThis[Symbol.for('@vercel/request-context')]?.get?.() ?? {};
|
||||
ctx.waitUntil?.(promise);
|
||||
};
|
||||
42
packages/functions/index.test.js
Normal file
42
packages/functions/index.test.js
Normal file
@@ -0,0 +1,42 @@
|
||||
/* global globalThis */
|
||||
|
||||
import { vi, expect, test } from 'vitest';
|
||||
|
||||
import { waitUntil } from '.';
|
||||
|
||||
test.each([
|
||||
{},
|
||||
() => {},
|
||||
function () {},
|
||||
NaN,
|
||||
1,
|
||||
false,
|
||||
undefined,
|
||||
null,
|
||||
[],
|
||||
'▲',
|
||||
])('waitUntil throws when called with %s', input => {
|
||||
expect(() => waitUntil(input)).toThrow(TypeError);
|
||||
expect(() => waitUntil(input)).toThrow(
|
||||
`waitUntil can only be called with a Promise, got ${typeof input}`
|
||||
);
|
||||
});
|
||||
|
||||
test.each([null, undefined, {}])(
|
||||
'waitUntil does not throw an error when context is %s',
|
||||
input => {
|
||||
const promise = Promise.resolve();
|
||||
globalThis[Symbol.for('@vercel/request-context')] = input;
|
||||
expect(() => waitUntil(promise)).not.toThrow();
|
||||
}
|
||||
);
|
||||
|
||||
test('waitUntil calls ctx.waitUntil when available', async () => {
|
||||
const promise = Promise.resolve();
|
||||
const waitUntilMock = vi.fn().mockReturnValue(promise);
|
||||
globalThis[Symbol.for('@vercel/request-context')] = {
|
||||
get: () => ({ waitUntil: waitUntilMock }),
|
||||
};
|
||||
waitUntil(promise);
|
||||
expect(waitUntilMock).toHaveBeenCalledWith(promise);
|
||||
});
|
||||
33
packages/functions/package.json
Normal file
33
packages/functions/package.json
Normal file
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"name": "@vercel/functions",
|
||||
"description": "Runtime functions to be used with your Vercel Functions",
|
||||
"homepage": "https://vercel.com",
|
||||
"version": "1.0.2",
|
||||
"types": "index.d.ts",
|
||||
"main": "index.js",
|
||||
"repository": {
|
||||
"directory": "packages/functions",
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/vercel/vercel.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/vercel/vercel/issues"
|
||||
},
|
||||
"devDependencies": {
|
||||
"vitest": "1.3.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 16"
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"index.js"
|
||||
],
|
||||
"scripts": {
|
||||
"test": "vitest"
|
||||
},
|
||||
"license": "Apache-2.0",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,61 @@
|
||||
# @vercel/gatsby-plugin-vercel-builder
|
||||
|
||||
## 2.0.32
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`83741a0eb`](https://github.com/vercel/vercel/commit/83741a0eb9e44457b083e8790a11eb89984e6357)]:
|
||||
- @vercel/build-utils@8.2.1
|
||||
|
||||
## 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
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`5014b1e82`](https://github.com/vercel/vercel/commit/5014b1e82a46181baeb727ffe6d14000b6a4b1d7)]:
|
||||
- @vercel/build-utils@8.1.0
|
||||
|
||||
## 2.0.26
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`15475c8a2`](https://github.com/vercel/vercel/commit/15475c8a2c303a1dd189ba24044fac750280dd2e), [`21f5e7375`](https://github.com/vercel/vercel/commit/21f5e7375e4cb4ceed98ab56486d09a85fa3894d)]:
|
||||
- @vercel/build-utils@8.0.0
|
||||
|
||||
## 2.0.25
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`2826563ff`](https://github.com/vercel/vercel/commit/2826563ffab7ab01d3c85def2cad8c4041cd88b1)]:
|
||||
- @vercel/build-utils@7.12.0
|
||||
|
||||
## 2.0.24
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@vercel/gatsby-plugin-vercel-builder",
|
||||
"version": "2.0.24",
|
||||
"version": "2.0.32",
|
||||
"main": "dist/index.js",
|
||||
"files": [
|
||||
"dist",
|
||||
@@ -20,7 +20,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@sinclair/typebox": "0.25.24",
|
||||
"@vercel/build-utils": "7.11.0",
|
||||
"@vercel/build-utils": "8.2.1",
|
||||
"@vercel/routing-utils": "3.1.0",
|
||||
"esbuild": "0.14.47",
|
||||
"etag": "1.8.1",
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
"@types/node-fetch": "^2.3.0",
|
||||
"@types/tar": "6.1.5",
|
||||
"@types/yauzl-promise": "2.1.0",
|
||||
"@vercel/build-utils": "7.11.0",
|
||||
"@vercel/build-utils": "8.2.1",
|
||||
"async-retry": "1.3.3",
|
||||
"execa": "^1.0.0",
|
||||
"fs-extra": "^7.0.0",
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
"devDependencies": {
|
||||
"@types/jest": "27.5.1",
|
||||
"@types/node": "14.18.33",
|
||||
"@vercel/build-utils": "7.11.0",
|
||||
"@vercel/build-utils": "8.2.1",
|
||||
"execa": "3.2.0",
|
||||
"fs-extra": "11.1.0",
|
||||
"jest-junit": "16.0.0"
|
||||
|
||||
@@ -51,11 +51,15 @@ export const build: BuildV2 = async ({
|
||||
);
|
||||
|
||||
const spawnOpts = getSpawnOptions(meta, nodeVersion);
|
||||
const { cliType, lockfileVersion } = await scanParentDirs(entrypointDir);
|
||||
const { cliType, lockfileVersion, packageJson } = await scanParentDirs(
|
||||
entrypointDir,
|
||||
true
|
||||
);
|
||||
|
||||
spawnOpts.env = getEnvForPackageManager({
|
||||
cliType,
|
||||
lockfileVersion,
|
||||
packageJsonPackageManager: packageJson?.packageManager,
|
||||
nodeVersion,
|
||||
env: spawnOpts.env || {},
|
||||
});
|
||||
|
||||
@@ -1,5 +1,103 @@
|
||||
# @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
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- skip action rewrites for RSC requests ([#11576](https://github.com/vercel/vercel/pull/11576))
|
||||
|
||||
- Bump `@vercel/nft@0.27.0` ([#11580](https://github.com/vercel/vercel/pull/11580))
|
||||
|
||||
## 4.2.9
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Support incremental partial prerendering ([#11560](https://github.com/vercel/vercel/pull/11560))
|
||||
|
||||
- ensure `.action` outputs are created for edge functions ([#11568](https://github.com/vercel/vercel/pull/11568))
|
||||
|
||||
- ([#11566](https://github.com/vercel/vercel/pull/11566))
|
||||
|
||||
## 4.2.8
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Fix missing initial RSC headers ([#11552](https://github.com/vercel/vercel/pull/11552))
|
||||
|
||||
- Remove .prefetch.rsc rewrites for non-PPR ([#11540](https://github.com/vercel/vercel/pull/11540))
|
||||
|
||||
- [next] rename middleware manifest env ([#11549](https://github.com/vercel/vercel/pull/11549))
|
||||
|
||||
## 4.2.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Fix missing .rsc outputs for pages prerenders ([#11503](https://github.com/vercel/vercel/pull/11503))
|
||||
|
||||
- Fix base path app index RSC handling ([#11528](https://github.com/vercel/vercel/pull/11528))
|
||||
|
||||
- Fix interception routes PPR route handling ([#11527](https://github.com/vercel/vercel/pull/11527))
|
||||
|
||||
## 4.2.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [next] Update test fixture version ([#11514](https://github.com/vercel/vercel/pull/11514))
|
||||
|
||||
## 4.2.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Only rewrite next-action requests to `.action` handlers ([#11504](https://github.com/vercel/vercel/pull/11504))
|
||||
|
||||
## 4.2.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [next]: Revert .action handling for dynamic routes ([#11509](https://github.com/vercel/vercel/pull/11509))
|
||||
|
||||
## 4.2.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [next] Reland add .action handling for dynamic routes ([#11487](https://github.com/vercel/vercel/pull/11487))
|
||||
|
||||
## 4.2.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [next] revert .action rewrites ([#11470](https://github.com/vercel/vercel/pull/11470))
|
||||
|
||||
- Next.js builds: support sectioned source maps ([#11453](https://github.com/vercel/vercel/pull/11453))
|
||||
|
||||
## 4.2.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,8 +1,14 @@
|
||||
import { readFileSync, promises as fsPromises } from 'node:fs';
|
||||
import { createRequire } from 'node:module';
|
||||
import { join } from 'node:path';
|
||||
import { readFileSync } from 'node:fs';
|
||||
|
||||
import { esbuild } from '../../utils/build.mjs';
|
||||
import buildEdgeFunctionTemplate from './scripts/build-edge-function-template.js';
|
||||
|
||||
const require = createRequire(import.meta.url);
|
||||
|
||||
const { copyFile } = fsPromises;
|
||||
|
||||
const pkgPath = join(process.cwd(), 'package.json');
|
||||
const pkg = JSON.parse(readFileSync(pkgPath, 'utf8'));
|
||||
const externals = Object.keys(pkg.dependencies || {});
|
||||
@@ -20,6 +26,12 @@ await Promise.all([
|
||||
buildEdgeFunctionTemplate(),
|
||||
]);
|
||||
|
||||
// The bundled version of source-map looks for the wasm mappings file as a sibling.
|
||||
await copyFile(
|
||||
require.resolve('source-map/lib/mappings.wasm'),
|
||||
join(process.cwd(), 'dist/mappings.wasm')
|
||||
);
|
||||
|
||||
await esbuild({
|
||||
bundle: true,
|
||||
external: ['@vercel/build-utils', ...externals],
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@vercel/next",
|
||||
"version": "4.2.1",
|
||||
"version": "4.2.14",
|
||||
"license": "Apache-2.0",
|
||||
"main": "./dist/index",
|
||||
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/next-js",
|
||||
@@ -23,7 +23,7 @@
|
||||
"dist"
|
||||
],
|
||||
"dependencies": {
|
||||
"@vercel/nft": "0.26.4"
|
||||
"@vercel/nft": "0.27.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/aws-lambda": "8.10.19",
|
||||
@@ -40,7 +40,7 @@
|
||||
"@types/semver": "6.0.0",
|
||||
"@types/text-table": "0.2.1",
|
||||
"@types/webpack-sources": "3.2.0",
|
||||
"@vercel/build-utils": "7.11.0",
|
||||
"@vercel/build-utils": "8.2.1",
|
||||
"@vercel/routing-utils": "3.1.0",
|
||||
"async-sema": "3.0.1",
|
||||
"buffer-crc32": "0.2.13",
|
||||
@@ -60,7 +60,7 @@
|
||||
"resolve-from": "5.0.0",
|
||||
"semver": "6.3.1",
|
||||
"set-cookie-parser": "2.4.6",
|
||||
"source-map": "0.7.3",
|
||||
"source-map": "0.7.4",
|
||||
"test-listen": "1.1.0",
|
||||
"text-table": "0.2.0",
|
||||
"webpack-sources": "3.2.3"
|
||||
|
||||
@@ -257,10 +257,15 @@ export const build: BuildV2 = async ({
|
||||
const nextVersionRange = await getNextVersionRange(entryPath);
|
||||
const nodeVersion = await getNodeVersion(entryPath, undefined, config, meta);
|
||||
const spawnOpts = getSpawnOptions(meta, nodeVersion);
|
||||
const { cliType, lockfileVersion } = await scanParentDirs(entryPath);
|
||||
const { cliType, lockfileVersion, packageJson } = await scanParentDirs(
|
||||
entryPath,
|
||||
true
|
||||
);
|
||||
|
||||
spawnOpts.env = getEnvForPackageManager({
|
||||
cliType,
|
||||
lockfileVersion,
|
||||
packageJsonPackageManager: packageJson?.packageManager,
|
||||
nodeVersion,
|
||||
env: spawnOpts.env || {},
|
||||
});
|
||||
@@ -1353,6 +1358,11 @@ export const build: BuildV2 = async ({
|
||||
experimentalPPRRoutes.add(route);
|
||||
}
|
||||
|
||||
const isAppPPREnabled = requiredServerFilesManifest
|
||||
? requiredServerFilesManifest.config.experimental?.ppr === true ||
|
||||
requiredServerFilesManifest.config.experimental?.ppr === 'incremental'
|
||||
: false;
|
||||
|
||||
if (requiredServerFilesManifest) {
|
||||
if (!routesManifest) {
|
||||
throw new Error(
|
||||
@@ -1408,6 +1418,7 @@ export const build: BuildV2 = async ({
|
||||
hasIsr500Page,
|
||||
variantsManifest,
|
||||
experimentalPPRRoutes,
|
||||
isAppPPREnabled,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1927,7 +1938,8 @@ export const build: BuildV2 = async ({
|
||||
canUsePreviewMode,
|
||||
bypassToken: prerenderManifest.bypassToken || '',
|
||||
isServerMode,
|
||||
experimentalPPRRoutes,
|
||||
isAppPPREnabled: false,
|
||||
hasActionOutputSupport: false,
|
||||
}).then(arr =>
|
||||
localizeDynamicRoutes(
|
||||
arr,
|
||||
@@ -1957,7 +1969,8 @@ export const build: BuildV2 = async ({
|
||||
canUsePreviewMode,
|
||||
bypassToken: prerenderManifest.bypassToken || '',
|
||||
isServerMode,
|
||||
experimentalPPRRoutes,
|
||||
isAppPPREnabled: false,
|
||||
hasActionOutputSupport: false,
|
||||
}).then(arr =>
|
||||
arr.map(route => {
|
||||
route.src = route.src.replace('^', `^${dynamicPrefix}`);
|
||||
@@ -2155,6 +2168,7 @@ export const build: BuildV2 = async ({
|
||||
appPathRoutesManifest,
|
||||
isSharedLambdas,
|
||||
canUsePreviewMode,
|
||||
isAppPPREnabled: false,
|
||||
});
|
||||
|
||||
await Promise.all(
|
||||
|
||||
@@ -144,6 +144,7 @@ export async function serverBuild({
|
||||
requiredServerFilesManifest,
|
||||
variantsManifest,
|
||||
experimentalPPRRoutes,
|
||||
isAppPPREnabled,
|
||||
}: {
|
||||
appPathRoutesManifest?: Record<string, string>;
|
||||
dynamicPages: string[];
|
||||
@@ -185,7 +186,15 @@ export async function serverBuild({
|
||||
requiredServerFilesManifest: NextRequiredServerFilesManifest;
|
||||
variantsManifest: VariantsManifest | null;
|
||||
experimentalPPRRoutes: ReadonlySet<string>;
|
||||
isAppPPREnabled: boolean;
|
||||
}): Promise<BuildResult> {
|
||||
if (isAppPPREnabled) {
|
||||
debug(
|
||||
'experimentalPPRRoutes',
|
||||
JSON.stringify(Array.from(experimentalPPRRoutes))
|
||||
);
|
||||
}
|
||||
|
||||
lambdaPages = Object.assign({}, lambdaPages, lambdaAppPaths);
|
||||
|
||||
const experimentalAllowBundling = Boolean(
|
||||
@@ -201,10 +210,9 @@ export async function serverBuild({
|
||||
nextVersion,
|
||||
EMPTY_ALLOW_QUERY_FOR_PRERENDERED_VERSION
|
||||
);
|
||||
const hasActionOutputSupport = semver.gte(
|
||||
nextVersion,
|
||||
ACTION_OUTPUT_SUPPORT_VERSION
|
||||
);
|
||||
const hasActionOutputSupport =
|
||||
semver.gte(nextVersion, ACTION_OUTPUT_SUPPORT_VERSION) &&
|
||||
Boolean(process.env.NEXT_EXPERIMENTAL_STREAMING_ACTIONS);
|
||||
const projectDir = requiredServerFilesManifest.relativeAppDir
|
||||
? path.join(baseDir, requiredServerFilesManifest.relativeAppDir)
|
||||
: requiredServerFilesManifest.appDir || entryPath;
|
||||
@@ -218,10 +226,6 @@ export async function serverBuild({
|
||||
}
|
||||
}
|
||||
|
||||
const experimental = {
|
||||
ppr: requiredServerFilesManifest.config.experimental?.ppr === true,
|
||||
};
|
||||
|
||||
let appRscPrefetches: UnwrapPromise<ReturnType<typeof glob>> = {};
|
||||
let appBuildTraces: UnwrapPromise<ReturnType<typeof glob>> = {};
|
||||
let appDir: string | null = null;
|
||||
@@ -229,9 +233,7 @@ export async function serverBuild({
|
||||
if (appPathRoutesManifest) {
|
||||
appDir = path.join(pagesDir, '../app');
|
||||
appBuildTraces = await glob('**/*.js.nft.json', appDir);
|
||||
|
||||
// TODO: maybe?
|
||||
appRscPrefetches = experimental.ppr
|
||||
appRscPrefetches = isAppPPREnabled
|
||||
? {}
|
||||
: await glob(`**/*${RSC_PREFETCH_SUFFIX}`, appDir);
|
||||
|
||||
@@ -250,9 +252,19 @@ export async function serverBuild({
|
||||
|
||||
for (const rewrite of afterFilesRewrites) {
|
||||
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(
|
||||
/\/?\(\?:\/\)\?/,
|
||||
'(?<rscsuff>(\\.prefetch)?\\.rsc)?(?:/)?'
|
||||
`(?<rscsuff>${rscSuffix})?(?:/)?`
|
||||
);
|
||||
let destQueryIndex = rewrite.dest.indexOf('?');
|
||||
|
||||
@@ -932,25 +944,21 @@ export async function serverBuild({
|
||||
inversedAppPathManifest,
|
||||
});
|
||||
|
||||
const appRouterStreamingPrerenderLambdaGroups: LambdaGroup[] = [];
|
||||
const appRouterStreamingActionLambdaGroups: LambdaGroup[] = [];
|
||||
|
||||
for (const group of appRouterLambdaGroups) {
|
||||
if (!group.isPrerenders || group.isExperimentalPPR) {
|
||||
group.isStreaming = true;
|
||||
}
|
||||
|
||||
group.isAppRouter = true;
|
||||
|
||||
// We create a streaming variant of the Prerender lambda group
|
||||
// to support actions that are part of a Prerender
|
||||
if (
|
||||
hasActionOutputSupport &&
|
||||
group.isPrerenders &&
|
||||
!group.isStreaming &&
|
||||
!group.isExperimentalPPR
|
||||
) {
|
||||
appRouterStreamingPrerenderLambdaGroups.push({
|
||||
if (hasActionOutputSupport) {
|
||||
appRouterStreamingActionLambdaGroups.push({
|
||||
...group,
|
||||
isActionPrerender: true,
|
||||
isActionLambda: true,
|
||||
isStreaming: true,
|
||||
});
|
||||
}
|
||||
@@ -990,25 +998,33 @@ export async function serverBuild({
|
||||
apiLambdaGroups: apiLambdaGroups.map(group => ({
|
||||
pages: group.pages,
|
||||
isPrerender: group.isPrerenders,
|
||||
isStreaming: group.isStreaming,
|
||||
isExperimentalPPR: group.isExperimentalPPR,
|
||||
pseudoLayerBytes: group.pseudoLayerBytes,
|
||||
uncompressedLayerBytes: group.pseudoLayerUncompressedBytes,
|
||||
})),
|
||||
pageLambdaGroups: pageLambdaGroups.map(group => ({
|
||||
pages: group.pages,
|
||||
isPrerender: group.isPrerenders,
|
||||
isStreaming: group.isStreaming,
|
||||
isExperimentalPPR: group.isExperimentalPPR,
|
||||
pseudoLayerBytes: group.pseudoLayerBytes,
|
||||
uncompressedLayerBytes: group.pseudoLayerUncompressedBytes,
|
||||
})),
|
||||
appRouterLambdaGroups: appRouterLambdaGroups.map(group => ({
|
||||
pages: group.pages,
|
||||
isPrerender: group.isPrerenders,
|
||||
isStreaming: group.isStreaming,
|
||||
isExperimentalPPR: group.isExperimentalPPR,
|
||||
pseudoLayerBytes: group.pseudoLayerBytes,
|
||||
uncompressedLayerBytes: group.pseudoLayerUncompressedBytes,
|
||||
})),
|
||||
appRouterStreamingPrerenderLambdaGroups:
|
||||
appRouterStreamingPrerenderLambdaGroups.map(group => ({
|
||||
appRouterStreamingActionLambdaGroups.map(group => ({
|
||||
pages: group.pages,
|
||||
isPrerender: group.isPrerenders,
|
||||
isStreaming: group.isStreaming,
|
||||
isExperimentalPPR: group.isExperimentalPPR,
|
||||
pseudoLayerBytes: group.pseudoLayerBytes,
|
||||
uncompressedLayerBytes: group.pseudoLayerUncompressedBytes,
|
||||
})),
|
||||
@@ -1016,6 +1032,8 @@ export async function serverBuild({
|
||||
group => ({
|
||||
pages: group.pages,
|
||||
isPrerender: group.isPrerenders,
|
||||
isStreaming: group.isStreaming,
|
||||
isExperimentalPPR: group.isExperimentalPPR,
|
||||
pseudoLayerBytes: group.pseudoLayerBytes,
|
||||
uncompressedLayerBytes: group.pseudoLayerUncompressedBytes,
|
||||
})
|
||||
@@ -1029,7 +1047,7 @@ export async function serverBuild({
|
||||
const combinedGroups = [
|
||||
...pageLambdaGroups,
|
||||
...appRouterLambdaGroups,
|
||||
...appRouterStreamingPrerenderLambdaGroups,
|
||||
...appRouterStreamingActionLambdaGroups,
|
||||
...apiLambdaGroups,
|
||||
...appRouteHandlersLambdaGroups,
|
||||
];
|
||||
@@ -1195,15 +1213,10 @@ export async function serverBuild({
|
||||
|
||||
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
|
||||
// lambda for the page for revalidation.
|
||||
let revalidate: NodejsLambda | undefined;
|
||||
if (isPPR) {
|
||||
if (group.isExperimentalPPR) {
|
||||
if (!options.isStreaming) {
|
||||
throw new Error("Invariant: PPR lambda isn't streaming");
|
||||
}
|
||||
@@ -1220,14 +1233,11 @@ export async function serverBuild({
|
||||
// This is the name of the page, where the root is `index`.
|
||||
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 `/`.
|
||||
const pagePathname = pagePath === '/index' ? '/' : pagePath;
|
||||
const pagePathname = normalizePage(pageName);
|
||||
|
||||
let isPrerender = prerenderRoutes.has(pagePathname);
|
||||
const isRoutePPREnabled = experimentalPPRRoutes.has(pagePathname);
|
||||
|
||||
if (!isPrerender && routesManifest?.i18n) {
|
||||
isPrerender = routesManifest.i18n.locales.some(locale => {
|
||||
@@ -1239,13 +1249,13 @@ export async function serverBuild({
|
||||
|
||||
let outputName = path.posix.join(entryDirectory, pageName);
|
||||
|
||||
if (group.isActionPrerender) {
|
||||
if (group.isActionLambda) {
|
||||
// give the streaming prerenders a .action suffix
|
||||
outputName = `${outputName}.action`;
|
||||
}
|
||||
|
||||
// If this is a PPR page, then we should prefix the output name.
|
||||
if (isPPR) {
|
||||
if (isRoutePPREnabled) {
|
||||
if (!revalidate) {
|
||||
throw new Error("Invariant: PPR lambda isn't set");
|
||||
}
|
||||
@@ -1326,6 +1336,13 @@ export async function serverBuild({
|
||||
console.timeEnd(lambdaCreationLabel);
|
||||
}
|
||||
|
||||
if (isAppPPREnabled) {
|
||||
debug(
|
||||
'experimentalStreamingLambdaPaths',
|
||||
JSON.stringify(Array.from(experimentalStreamingLambdaPaths))
|
||||
);
|
||||
}
|
||||
|
||||
const prerenderRoute = onPrerenderRoute({
|
||||
appDir,
|
||||
pagesDir,
|
||||
@@ -1345,6 +1362,7 @@ export async function serverBuild({
|
||||
hasPages404: routesManifest.pages404,
|
||||
isCorrectNotFoundRoutes,
|
||||
isEmptyAllowQueryForPrendered,
|
||||
isAppPPREnabled,
|
||||
});
|
||||
|
||||
await Promise.all(
|
||||
@@ -1413,7 +1431,8 @@ export async function serverBuild({
|
||||
bypassToken: prerenderManifest.bypassToken || '',
|
||||
isServerMode: true,
|
||||
dynamicMiddlewareRouteMap: middleware.dynamicRouteMap,
|
||||
experimentalPPRRoutes,
|
||||
isAppPPREnabled,
|
||||
hasActionOutputSupport,
|
||||
}).then(arr =>
|
||||
localizeDynamicRoutes(
|
||||
arr,
|
||||
@@ -1593,10 +1612,23 @@ export async function serverBuild({
|
||||
|
||||
if (lambdas[pathname]) {
|
||||
lambdas[`${pathname}.rsc`] = lambdas[pathname];
|
||||
|
||||
if (isAppPPREnabled) {
|
||||
lambdas[`${pathname}${RSC_PREFETCH_SUFFIX}`] = lambdas[pathname];
|
||||
}
|
||||
}
|
||||
|
||||
if (edgeFunctions[pathname]) {
|
||||
edgeFunctions[`${pathname}.rsc`] = edgeFunctions[pathname];
|
||||
|
||||
if (isAppPPREnabled) {
|
||||
edgeFunctions[`${pathname}${RSC_PREFETCH_SUFFIX}`] =
|
||||
edgeFunctions[pathname];
|
||||
}
|
||||
|
||||
if (hasActionOutputSupport) {
|
||||
edgeFunctions[`${pathname}.action`] = edgeFunctions[pathname];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1608,7 +1640,7 @@ export async function serverBuild({
|
||||
'RSC, Next-Router-State-Tree, Next-Router-Prefetch';
|
||||
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'");
|
||||
}
|
||||
|
||||
@@ -1616,7 +1648,7 @@ export async function serverBuild({
|
||||
// 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
|
||||
// routes that have `dynamicParams = false` defined.
|
||||
if (experimental.ppr) {
|
||||
if (isAppPPREnabled) {
|
||||
for (const { srcRoute, dataRoute, experimentalPPR } of Object.values(
|
||||
prerenderManifest.staticRoutes
|
||||
)) {
|
||||
@@ -1899,7 +1931,7 @@ export async function serverBuild({
|
||||
|
||||
...(appDir
|
||||
? [
|
||||
...(rscPrefetchHeader
|
||||
...(rscPrefetchHeader && isAppPPREnabled
|
||||
? [
|
||||
{
|
||||
src: `^${path.posix.join('/', entryDirectory, '/')}`,
|
||||
@@ -1948,7 +1980,7 @@ export async function serverBuild({
|
||||
// Also includes separate handling for index routes which should match to /index.action.
|
||||
// This follows the same pattern as the rewrites for .rsc files.
|
||||
{
|
||||
src: `^${path.posix.join('/', entryDirectory, '/')}`,
|
||||
src: `^${path.posix.join('/', entryDirectory, '/?')}`,
|
||||
dest: path.posix.join('/', entryDirectory, '/index.action'),
|
||||
has: [
|
||||
{
|
||||
@@ -1956,17 +1988,10 @@ export async function serverBuild({
|
||||
key: 'next-action',
|
||||
},
|
||||
],
|
||||
continue: true,
|
||||
override: true,
|
||||
},
|
||||
{
|
||||
src: `^${path.posix.join('/', entryDirectory, '/')}`,
|
||||
dest: path.posix.join('/', entryDirectory, '/index.action'),
|
||||
has: [
|
||||
missing: [
|
||||
{
|
||||
type: 'header',
|
||||
key: 'content-type',
|
||||
value: 'multipart/form-data;.*',
|
||||
key: rscHeader,
|
||||
},
|
||||
],
|
||||
continue: true,
|
||||
@@ -1985,21 +2010,10 @@ export async function serverBuild({
|
||||
key: 'next-action',
|
||||
},
|
||||
],
|
||||
continue: true,
|
||||
override: true,
|
||||
},
|
||||
{
|
||||
src: `^${path.posix.join(
|
||||
'/',
|
||||
entryDirectory,
|
||||
'/((?!.+\\.action).+?)(?:/)?$'
|
||||
)}`,
|
||||
dest: path.posix.join('/', entryDirectory, '/$1.action'),
|
||||
has: [
|
||||
missing: [
|
||||
{
|
||||
type: 'header',
|
||||
key: 'content-type',
|
||||
value: 'multipart/form-data;.*',
|
||||
key: rscHeader,
|
||||
},
|
||||
],
|
||||
continue: true,
|
||||
@@ -2008,7 +2022,7 @@ export async function serverBuild({
|
||||
]
|
||||
: []),
|
||||
{
|
||||
src: `^${path.posix.join('/', entryDirectory, '/')}`,
|
||||
src: `^${path.posix.join('/', entryDirectory, '/?')}`,
|
||||
has: [
|
||||
{
|
||||
type: 'header',
|
||||
@@ -2071,47 +2085,6 @@ export async function serverBuild({
|
||||
]
|
||||
: []),
|
||||
|
||||
...(rscPrefetchHeader && !experimental.ppr
|
||||
? [
|
||||
{
|
||||
src: path.posix.join(
|
||||
'/',
|
||||
entryDirectory,
|
||||
`/__index${RSC_PREFETCH_SUFFIX}`
|
||||
),
|
||||
dest: path.posix.join('/', entryDirectory, '/index.rsc'),
|
||||
has: [
|
||||
{
|
||||
type: 'header',
|
||||
key: rscPrefetchHeader,
|
||||
},
|
||||
],
|
||||
continue: true,
|
||||
override: true,
|
||||
},
|
||||
{
|
||||
src: `^${path.posix.join(
|
||||
'/',
|
||||
entryDirectory,
|
||||
`/(.+?)${RSC_PREFETCH_SUFFIX}(?:/)?$`
|
||||
)}`,
|
||||
dest: path.posix.join(
|
||||
'/',
|
||||
entryDirectory,
|
||||
`/$1${experimental.ppr ? RSC_PREFETCH_SUFFIX : '.rsc'}`
|
||||
),
|
||||
has: [
|
||||
{
|
||||
type: 'header',
|
||||
key: rscPrefetchHeader,
|
||||
},
|
||||
],
|
||||
continue: true,
|
||||
override: true,
|
||||
},
|
||||
]
|
||||
: []),
|
||||
|
||||
// These need to come before handle: miss or else they are grouped
|
||||
// with that routing section
|
||||
...afterFilesRewrites,
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
import type { RawSourceMap } from 'source-map';
|
||||
import {
|
||||
SourceMapConsumer,
|
||||
SourceMapGenerator,
|
||||
type RawSourceMap,
|
||||
} from 'source-map';
|
||||
import convertSourceMap from 'convert-source-map';
|
||||
import fs from 'fs-extra';
|
||||
import {
|
||||
@@ -73,15 +77,28 @@ async function getSourceMap(
|
||||
content: string,
|
||||
fullFilePath?: string
|
||||
): Promise<RawSourceMap | null> {
|
||||
let map: RawSourceMap;
|
||||
try {
|
||||
if (fullFilePath && (await fs.pathExists(`${fullFilePath}.map`))) {
|
||||
const mapJson = await fs.readFile(`${fullFilePath}.map`, 'utf8');
|
||||
return convertSourceMap.fromJSON(mapJson).toObject();
|
||||
map = convertSourceMap.fromJSON(mapJson).toObject();
|
||||
} else {
|
||||
map = convertSourceMap.fromComment(content).toObject();
|
||||
}
|
||||
return convertSourceMap.fromComment(content).toObject();
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
|
||||
if ('sections' in map) {
|
||||
// Webpack's `webpack-source` package doesn't support sectioned source maps, but Turbopack outputs them.
|
||||
// Do this conditionally as it's unnecessary work otherwise.
|
||||
return flattenSourceMap(map);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
async function flattenSourceMap(map: RawSourceMap): Promise<RawSourceMap> {
|
||||
return new SourceMapGenerator(await new SourceMapConsumer(map)).toJSON();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -192,8 +192,12 @@ function normalizePage(page: string): string {
|
||||
if (!page.startsWith('/')) {
|
||||
page = `/${page}`;
|
||||
}
|
||||
// remove '/index' from the end
|
||||
page = page.replace(/\/index$/, '/');
|
||||
|
||||
// Replace the `/index` with `/`
|
||||
if (page === '/index') {
|
||||
page = '/';
|
||||
}
|
||||
|
||||
return page;
|
||||
}
|
||||
|
||||
@@ -320,7 +324,8 @@ export async function getDynamicRoutes({
|
||||
bypassToken,
|
||||
isServerMode,
|
||||
dynamicMiddlewareRouteMap,
|
||||
experimentalPPRRoutes,
|
||||
hasActionOutputSupport,
|
||||
isAppPPREnabled,
|
||||
}: {
|
||||
entryPath: string;
|
||||
entryDirectory: string;
|
||||
@@ -332,7 +337,8 @@ export async function getDynamicRoutes({
|
||||
bypassToken?: string;
|
||||
isServerMode?: boolean;
|
||||
dynamicMiddlewareRouteMap?: ReadonlyMap<string, RouteWithSrc>;
|
||||
experimentalPPRRoutes: ReadonlySet<string>;
|
||||
hasActionOutputSupport: boolean;
|
||||
isAppPPREnabled: boolean;
|
||||
}): Promise<RouteWithSrc[]> {
|
||||
if (routesManifest) {
|
||||
switch (routesManifest.version) {
|
||||
@@ -406,7 +412,7 @@ export async function getDynamicRoutes({
|
||||
];
|
||||
}
|
||||
|
||||
if (experimentalPPRRoutes.has(page)) {
|
||||
if (isAppPPREnabled) {
|
||||
let dest = route.dest?.replace(/($|\?)/, '.prefetch.rsc$1');
|
||||
|
||||
if (page === '/' || page === '/index') {
|
||||
@@ -423,23 +429,25 @@ export async function getDynamicRoutes({
|
||||
});
|
||||
}
|
||||
|
||||
routes.push({
|
||||
...route,
|
||||
src: route.src.replace(
|
||||
new RegExp(escapeStringRegexp('(?:/)?$')),
|
||||
'(?:\\.rsc)(?:/)?$'
|
||||
),
|
||||
dest: route.dest?.replace(/($|\?)/, '.rsc$1'),
|
||||
});
|
||||
|
||||
routes.push({
|
||||
...route,
|
||||
src: route.src.replace(
|
||||
new RegExp(escapeStringRegexp('(?:/)?$')),
|
||||
'(?:\\.action)(?:/)?$'
|
||||
),
|
||||
dest: route.dest?.replace(/($|\?)/, '.action$1'),
|
||||
});
|
||||
if (hasActionOutputSupport) {
|
||||
routes.push({
|
||||
...route,
|
||||
src: route.src.replace(
|
||||
new RegExp(escapeStringRegexp('(?:/)?$')),
|
||||
'(?<nxtsuffix>(?:\\.action|\\.rsc))(?:/)?$'
|
||||
),
|
||||
dest: route.dest?.replace(/($|\?)/, '$nxtsuffix$1'),
|
||||
});
|
||||
} else {
|
||||
routes.push({
|
||||
...route,
|
||||
src: route.src.replace(
|
||||
new RegExp(escapeStringRegexp('(?:/)?$')),
|
||||
'(?:\\.rsc)(?:/)?$'
|
||||
),
|
||||
dest: route.dest?.replace(/($|\?)/, '.rsc$1'),
|
||||
});
|
||||
}
|
||||
|
||||
routes.push(route);
|
||||
}
|
||||
@@ -1435,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(
|
||||
`WARNING: Unable to find source file for page ${page} with extensions: ${extensionsToTry.join(
|
||||
', '
|
||||
@@ -1494,9 +1509,9 @@ export type LambdaGroup = {
|
||||
isAppRouter?: boolean;
|
||||
isAppRouteHandler?: boolean;
|
||||
isStreaming?: boolean;
|
||||
isPrerenders?: boolean;
|
||||
isExperimentalPPR?: boolean;
|
||||
isActionPrerender?: boolean;
|
||||
readonly isPrerenders: boolean;
|
||||
readonly isExperimentalPPR: boolean;
|
||||
isActionLambda?: boolean;
|
||||
isPages?: boolean;
|
||||
isApiLambda: boolean;
|
||||
pseudoLayer: PseudoLayer;
|
||||
@@ -1561,15 +1576,13 @@ export async function getPageLambdaGroups({
|
||||
}
|
||||
|
||||
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({
|
||||
workPath: entryPath,
|
||||
// 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`.
|
||||
page: pageFromManifest ?? page,
|
||||
page: normalizeSourceFilePageFromManifest(
|
||||
routeName,
|
||||
page,
|
||||
inversedAppPathManifest
|
||||
),
|
||||
pageExtensions,
|
||||
});
|
||||
|
||||
@@ -1653,6 +1666,43 @@ export async function getPageLambdaGroups({
|
||||
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 = (
|
||||
pages: string[],
|
||||
pseudoLayer: PseudoLayer,
|
||||
@@ -1902,6 +1952,7 @@ type OnPrerenderRouteArgs = {
|
||||
routesManifest?: RoutesManifest;
|
||||
isCorrectNotFoundRoutes?: boolean;
|
||||
isEmptyAllowQueryForPrendered?: boolean;
|
||||
isAppPPREnabled: boolean;
|
||||
};
|
||||
let prerenderGroup = 1;
|
||||
|
||||
@@ -1938,6 +1989,7 @@ export const onPrerenderRoute =
|
||||
routesManifest,
|
||||
isCorrectNotFoundRoutes,
|
||||
isEmptyAllowQueryForPrendered,
|
||||
isAppPPREnabled,
|
||||
} = prerenderRouteArgs;
|
||||
|
||||
if (isBlocking && isFallback) {
|
||||
@@ -2173,22 +2225,6 @@ export const onPrerenderRoute =
|
||||
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);
|
||||
|
||||
if (!isAppPathRoute) {
|
||||
@@ -2225,7 +2261,7 @@ export const onPrerenderRoute =
|
||||
|
||||
let outputPathPrefetchData: null | string = null;
|
||||
if (prefetchDataRoute) {
|
||||
if (!experimentalPPR) {
|
||||
if (!isAppPPREnabled) {
|
||||
throw new Error(
|
||||
"Invariant: prefetchDataRoute can't be set without PPR"
|
||||
);
|
||||
@@ -2382,7 +2418,7 @@ export const onPrerenderRoute =
|
||||
// static route first, then try the srcRoute if it doesn't exist. If we
|
||||
// can't find it at all, this constitutes an error.
|
||||
experimentalStreamingLambdaPath = experimentalStreamingLambdaPaths.get(
|
||||
pathnameToOutputName(entryDirectory, routeKey, addedIndexSuffix)
|
||||
pathnameToOutputName(entryDirectory, routeKey)
|
||||
);
|
||||
if (!experimentalStreamingLambdaPath && srcRoute) {
|
||||
experimentalStreamingLambdaPath =
|
||||
@@ -2461,6 +2497,7 @@ export const onPrerenderRoute =
|
||||
...(rscEnabled
|
||||
? {
|
||||
initialHeaders: {
|
||||
...initialHeaders,
|
||||
'content-type': rscContentTypeHeader,
|
||||
vary: rscVaryHeader,
|
||||
// If it contains a pre-render, then it was postponed.
|
||||
@@ -2473,6 +2510,22 @@ export const onPrerenderRoute =
|
||||
});
|
||||
}
|
||||
|
||||
// we need to ensure all prerenders have a matching .rsc output
|
||||
// otherwise routing could fall through unexpectedly for the
|
||||
// fallback: false case as it doesn't have a dynamic route
|
||||
// to catch the `.rsc` request for app -> pages routing
|
||||
if (outputPrerenderPathData?.endsWith('.json') && appDir) {
|
||||
const dummyOutput = new FileBlob({
|
||||
data: '{}',
|
||||
contentType: 'application/json',
|
||||
});
|
||||
const rscKey = `${outputPathPage}.rsc`;
|
||||
const prefetchRscKey = `${outputPathPage}${RSC_PREFETCH_SUFFIX}`;
|
||||
|
||||
prerenders[rscKey] = dummyOutput;
|
||||
prerenders[prefetchRscKey] = dummyOutput;
|
||||
}
|
||||
|
||||
++prerenderGroup;
|
||||
|
||||
if (routesManifest?.i18n && isBlocking) {
|
||||
@@ -2626,19 +2679,10 @@ export function getNextServerPath(nextVersion: string) {
|
||||
: 'next/dist/next-server/server';
|
||||
}
|
||||
|
||||
function pathnameToOutputName(
|
||||
entryDirectory: string,
|
||||
pathname: string,
|
||||
addedIndexSuffix = false
|
||||
) {
|
||||
function pathnameToOutputName(entryDirectory: string, pathname: string) {
|
||||
if (pathname === '/') {
|
||||
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);
|
||||
}
|
||||
@@ -2764,7 +2808,7 @@ interface EdgeFunctionInfoV2 extends BaseEdgeFunctionInfo {
|
||||
|
||||
interface EdgeFunctionInfoV3 extends BaseEdgeFunctionInfo {
|
||||
matchers: EdgeFunctionMatcher[];
|
||||
environments: Record<string, string>;
|
||||
env: Record<string, string>;
|
||||
}
|
||||
|
||||
interface EdgeFunctionMatcher {
|
||||
@@ -2999,7 +3043,7 @@ export async function getMiddlewareBundle({
|
||||
slug: 'nextjs',
|
||||
version: nextVersion,
|
||||
},
|
||||
environment: edgeFunction.environments,
|
||||
environment: edgeFunction.env,
|
||||
});
|
||||
})(),
|
||||
routeMatchers: getRouteMatchers(edgeFunction, routesManifest),
|
||||
@@ -3179,7 +3223,7 @@ export function upgradeMiddlewareManifestV1(
|
||||
return {
|
||||
...rest,
|
||||
matchers: [{ regexp }],
|
||||
environments: {},
|
||||
env: {},
|
||||
};
|
||||
}
|
||||
|
||||
@@ -3207,7 +3251,7 @@ export function upgradeMiddlewareManifestV2(
|
||||
const { ...rest } = v2Info;
|
||||
return {
|
||||
...rest,
|
||||
environments: {},
|
||||
env: {},
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
6
packages/next/test/fixtures/00-app-dir-actions-experimental-streaming/app/actions.js
vendored
Normal file
6
packages/next/test/fixtures/00-app-dir-actions-experimental-streaming/app/actions.js
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
'use server';
|
||||
|
||||
export async function increment(value) {
|
||||
await new Promise(resolve => setTimeout(resolve, 500));
|
||||
return value + 1;
|
||||
}
|
||||
@@ -1,9 +1,7 @@
|
||||
'use client';
|
||||
|
||||
import { useState } from 'react';
|
||||
import { increment } from './actions';
|
||||
|
||||
export const dynamic = 'force-static';
|
||||
import { increment } from '../../../actions';
|
||||
|
||||
export default function Page() {
|
||||
const [count, setCount] = useState(0);
|
||||
@@ -13,9 +11,9 @@ export default function Page() {
|
||||
}
|
||||
|
||||
return (
|
||||
<form>
|
||||
<form action={updateCount}>
|
||||
<div id="count">{count}</div>
|
||||
<button formAction={updateCount}>Increment</button>
|
||||
<button>Submit</button>
|
||||
</form>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
export const dynamic = 'force-dynamic';
|
||||
|
||||
export default function Layout({ children }) {
|
||||
return children;
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
'use client';
|
||||
|
||||
import { useState } from 'react';
|
||||
import { increment } from '../../../actions';
|
||||
|
||||
export default function Page() {
|
||||
const [count, setCount] = useState(0);
|
||||
async function updateCount() {
|
||||
const newCount = await increment(count);
|
||||
setCount(newCount);
|
||||
}
|
||||
|
||||
return (
|
||||
<form action={updateCount}>
|
||||
<div id="count">{count}</div>
|
||||
<button>Submit</button>
|
||||
</form>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
export const dynamic = 'force-static';
|
||||
|
||||
export default function Layout({ children }) {
|
||||
return children;
|
||||
}
|
||||
19
packages/next/test/fixtures/00-app-dir-actions-experimental-streaming/app/client/static/page.js
vendored
Normal file
19
packages/next/test/fixtures/00-app-dir-actions-experimental-streaming/app/client/static/page.js
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
'use client';
|
||||
|
||||
import { useState } from 'react';
|
||||
import { increment } from '../../actions';
|
||||
|
||||
export default function Page() {
|
||||
const [count, setCount] = useState(0);
|
||||
async function updateCount() {
|
||||
const newCount = await increment(count);
|
||||
setCount(newCount);
|
||||
}
|
||||
|
||||
return (
|
||||
<form action={updateCount}>
|
||||
<div id="count">{count}</div>
|
||||
<button>Submit</button>
|
||||
</form>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
'use client';
|
||||
|
||||
import { useState } from 'react';
|
||||
import { increment } from '../../../../actions';
|
||||
|
||||
export default function Page() {
|
||||
const [count, setCount] = useState(0);
|
||||
async function updateCount() {
|
||||
const newCount = await increment(count);
|
||||
setCount(newCount);
|
||||
}
|
||||
|
||||
return (
|
||||
<form action={updateCount}>
|
||||
<div id="count">{count}</div>
|
||||
<button>Submit</button>
|
||||
</form>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
export const dynamic = 'force-dynamic';
|
||||
|
||||
export default function Layout({ children }) {
|
||||
return children;
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
'use client';
|
||||
|
||||
import { useState } from 'react';
|
||||
import { increment } from '../../../../actions';
|
||||
|
||||
export default function Page() {
|
||||
const [count, setCount] = useState(0);
|
||||
async function updateCount() {
|
||||
const newCount = await increment(count);
|
||||
setCount(newCount);
|
||||
}
|
||||
|
||||
return (
|
||||
<form action={updateCount}>
|
||||
<div id="count">{count}</div>
|
||||
<button>Submit</button>
|
||||
</form>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
export const dynamic = 'force-static';
|
||||
|
||||
export default function Layout({ children }) {
|
||||
return children;
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
'use client';
|
||||
|
||||
import { useState } from 'react';
|
||||
import { increment } from '../../../actions';
|
||||
|
||||
export default function Page() {
|
||||
const [count, setCount] = useState(0);
|
||||
async function updateCount() {
|
||||
const newCount = await increment(count);
|
||||
setCount(newCount);
|
||||
}
|
||||
|
||||
return (
|
||||
<form action={updateCount}>
|
||||
<div id="count">{count}</div>
|
||||
<button>Submit</button>
|
||||
</form>
|
||||
);
|
||||
}
|
||||
5
packages/next/test/fixtures/00-app-dir-actions-experimental-streaming/app/edge/layout.js
vendored
Normal file
5
packages/next/test/fixtures/00-app-dir-actions-experimental-streaming/app/edge/layout.js
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
export const runtime = 'edge';
|
||||
|
||||
export default function Layout({ children }) {
|
||||
return <div>{children}</div>;
|
||||
}
|
||||
45
packages/next/test/fixtures/00-app-dir-actions-experimental-streaming/app/edge/other/page.js
vendored
Normal file
45
packages/next/test/fixtures/00-app-dir-actions-experimental-streaming/app/edge/other/page.js
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
'use client';
|
||||
|
||||
// @ts-ignore
|
||||
import { useCallback, useState } from 'react';
|
||||
|
||||
function request(method) {
|
||||
return fetch('/api/test', {
|
||||
method,
|
||||
headers: {
|
||||
'content-type': 'multipart/form-data;.*',
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
export default function Home() {
|
||||
const [result, setResult] = useState('Press submit');
|
||||
const onClick = useCallback(async method => {
|
||||
const res = await request(method);
|
||||
const text = await res.text();
|
||||
|
||||
setResult(res.ok ? `${method} ${text}` : 'Error: ' + res.status);
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="flex flex-col items-center justify-center h-screen">
|
||||
<div className="flex flex-row space-x-2 items-center justify-center">
|
||||
<button
|
||||
className="border border-white rounded-sm p-4 mb-4"
|
||||
onClick={() => onClick('GET')}
|
||||
>
|
||||
Submit GET
|
||||
</button>
|
||||
<button
|
||||
className="border border-white rounded-sm p-4 mb-4"
|
||||
onClick={() => onClick('POST')}
|
||||
>
|
||||
Submit POST
|
||||
</button>
|
||||
</div>
|
||||
<div className="text-white">{result}</div>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
export const dynamic = 'force-dynamic';
|
||||
|
||||
export default function Layout({ children }) {
|
||||
return children;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
import { revalidatePath } from 'next/cache';
|
||||
|
||||
export default async function Page() {
|
||||
async function serverAction() {
|
||||
'use server';
|
||||
await new Promise(resolve => setTimeout(resolve, 1000));
|
||||
revalidatePath('/dynamic');
|
||||
}
|
||||
|
||||
return (
|
||||
<form action={serverAction}>
|
||||
<button>Submit</button>
|
||||
</form>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
import { revalidatePath } from 'next/cache';
|
||||
|
||||
export default async function Page() {
|
||||
async function serverAction() {
|
||||
'use server';
|
||||
await new Promise(resolve => setTimeout(resolve, 1000));
|
||||
revalidatePath('/dynamic');
|
||||
}
|
||||
|
||||
return (
|
||||
<form action={serverAction}>
|
||||
<button>Submit</button>
|
||||
</form>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
import { revalidatePath } from 'next/cache';
|
||||
|
||||
export default async function Page() {
|
||||
async function serverAction() {
|
||||
'use server';
|
||||
await new Promise(resolve => setTimeout(resolve, 1000));
|
||||
revalidatePath('/dynamic');
|
||||
}
|
||||
|
||||
return (
|
||||
<form action={serverAction}>
|
||||
<button>Submit</button>
|
||||
</form>
|
||||
);
|
||||
}
|
||||
|
||||
export function generateStaticParams() {
|
||||
return [{ slug: 'pre-generated' }];
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
export const dynamic = 'force-static';
|
||||
|
||||
export default function Layout({ children }) {
|
||||
return children;
|
||||
}
|
||||
@@ -1,7 +1,5 @@
|
||||
import { revalidatePath } from 'next/cache'
|
||||
|
||||
export const dynamic = 'force-static'
|
||||
|
||||
export default async function Page() {
|
||||
async function serverAction() {
|
||||
'use server';
|
||||
10
packages/next/test/fixtures/00-app-dir-actions-experimental-streaming/app/layout.js
vendored
Normal file
10
packages/next/test/fixtures/00-app-dir-actions-experimental-streaming/app/layout.js
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
export default function Root({ children }) {
|
||||
return (
|
||||
<html>
|
||||
<head>
|
||||
<title>Hello World</title>
|
||||
</head>
|
||||
<body>{children}</body>
|
||||
</html>
|
||||
);
|
||||
}
|
||||
45
packages/next/test/fixtures/00-app-dir-actions-experimental-streaming/app/other/page.js
vendored
Normal file
45
packages/next/test/fixtures/00-app-dir-actions-experimental-streaming/app/other/page.js
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
'use client';
|
||||
|
||||
// @ts-ignore
|
||||
import { useCallback, useState } from 'react';
|
||||
|
||||
function request(method) {
|
||||
return fetch('/api/test', {
|
||||
method,
|
||||
headers: {
|
||||
'content-type': 'multipart/form-data;.*',
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
export default function Home() {
|
||||
const [result, setResult] = useState('Press submit');
|
||||
const onClick = useCallback(async method => {
|
||||
const res = await request(method);
|
||||
const text = await res.text();
|
||||
|
||||
setResult(res.ok ? `${method} ${text}` : 'Error: ' + res.status);
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="flex flex-col items-center justify-center h-screen">
|
||||
<div className="flex flex-row space-x-2 items-center justify-center">
|
||||
<button
|
||||
className="border border-white rounded-sm p-4 mb-4"
|
||||
onClick={() => onClick('GET')}
|
||||
>
|
||||
Submit GET
|
||||
</button>
|
||||
<button
|
||||
className="border border-white rounded-sm p-4 mb-4"
|
||||
onClick={() => onClick('POST')}
|
||||
>
|
||||
Submit POST
|
||||
</button>
|
||||
</div>
|
||||
<div className="text-white">{result}</div>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
export const dynamic = 'force-dynamic';
|
||||
|
||||
export default function Layout({ children }) {
|
||||
return children;
|
||||
}
|
||||
15
packages/next/test/fixtures/00-app-dir-actions-experimental-streaming/app/rsc/dynamic/page.js
vendored
Normal file
15
packages/next/test/fixtures/00-app-dir-actions-experimental-streaming/app/rsc/dynamic/page.js
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
import { revalidatePath } from 'next/cache';
|
||||
|
||||
export default async function Page() {
|
||||
async function serverAction() {
|
||||
'use server';
|
||||
await new Promise(resolve => setTimeout(resolve, 1000));
|
||||
revalidatePath('/dynamic');
|
||||
}
|
||||
|
||||
return (
|
||||
<form action={serverAction}>
|
||||
<button>Submit</button>
|
||||
</form>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
import { revalidatePath } from 'next/cache';
|
||||
|
||||
export default async function Page() {
|
||||
async function serverAction() {
|
||||
'use server';
|
||||
await new Promise(resolve => setTimeout(resolve, 1000));
|
||||
revalidatePath('/dynamic');
|
||||
}
|
||||
|
||||
return (
|
||||
<form action={serverAction}>
|
||||
<button>Submit</button>
|
||||
</form>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
import { revalidatePath } from 'next/cache';
|
||||
|
||||
export default async function Page() {
|
||||
async function serverAction() {
|
||||
'use server';
|
||||
await new Promise(resolve => setTimeout(resolve, 1000));
|
||||
revalidatePath('/dynamic');
|
||||
}
|
||||
|
||||
return (
|
||||
<form action={serverAction}>
|
||||
<button>Submit</button>
|
||||
</form>
|
||||
);
|
||||
}
|
||||
|
||||
export function generateStaticParams() {
|
||||
return [{ slug: 'pre-generated' }];
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
export const dynamic = 'force-static';
|
||||
|
||||
export default function Layout({ children }) {
|
||||
return children;
|
||||
}
|
||||
15
packages/next/test/fixtures/00-app-dir-actions-experimental-streaming/app/rsc/static/page.js
vendored
Normal file
15
packages/next/test/fixtures/00-app-dir-actions-experimental-streaming/app/rsc/static/page.js
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
import { revalidatePath } from 'next/cache'
|
||||
|
||||
export default async function Page() {
|
||||
async function serverAction() {
|
||||
'use server';
|
||||
await new Promise((resolve) => setTimeout(resolve, 1000));
|
||||
revalidatePath('/dynamic');
|
||||
}
|
||||
|
||||
return (
|
||||
<form action={serverAction}>
|
||||
<button>Submit</button>
|
||||
</form>
|
||||
);
|
||||
}
|
||||
324
packages/next/test/fixtures/00-app-dir-actions-experimental-streaming/index.test.js
vendored
Normal file
324
packages/next/test/fixtures/00-app-dir-actions-experimental-streaming/index.test.js
vendored
Normal file
@@ -0,0 +1,324 @@
|
||||
/* eslint-env jest */
|
||||
const path = require('path');
|
||||
const { deployAndTest } = require('../../utils');
|
||||
const fetch = require('../../../../../test/lib/deployment/fetch-retry');
|
||||
|
||||
const ctx = {};
|
||||
|
||||
function findActionId(page, runtime) {
|
||||
page = `app${page}/page`; // add /app prefix and /page suffix
|
||||
|
||||
for (const [actionId, details] of Object.entries(
|
||||
ctx.actionManifest[runtime]
|
||||
)) {
|
||||
if (details.workers[page]) {
|
||||
return actionId;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function generateFormDataPayload(actionId) {
|
||||
return {
|
||||
method: 'POST',
|
||||
body: `------WebKitFormBoundaryHcVuFa30AN0QV3uZ\r\nContent-Disposition: form-data; name=\"1_$ACTION_ID_${actionId}\"\r\n\r\n\r\n------WebKitFormBoundaryHcVuFa30AN0QV3uZ\r\nContent-Disposition: form-data; name=\"0\"\r\n\r\n[\"$K1\"]\r\n------WebKitFormBoundaryHcVuFa30AN0QV3uZ--\r\n`,
|
||||
headers: {
|
||||
'Content-Type':
|
||||
'multipart/form-data; boundary=----WebKitFormBoundaryHcVuFa30AN0QV3uZ',
|
||||
'Next-Action': actionId,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
describe(`${__dirname.split(path.sep).pop()}`, () => {
|
||||
beforeAll(async () => {
|
||||
const info = await deployAndTest(__dirname);
|
||||
|
||||
const actionManifest = await fetch(
|
||||
`${info.deploymentUrl}/server-reference-manifest.json`
|
||||
).then(res => res.json());
|
||||
|
||||
ctx.actionManifest = actionManifest;
|
||||
|
||||
Object.assign(ctx, info);
|
||||
});
|
||||
|
||||
describe.each(['node', 'edge'])('runtime: %s', runtime => {
|
||||
const basePath = runtime === 'edge' ? '/edge' : '';
|
||||
describe('client component', () => {
|
||||
it('should bypass the static cache for a server action', async () => {
|
||||
const path = `${basePath}/client/static`;
|
||||
const actionId = findActionId(path, runtime);
|
||||
|
||||
const res = await fetch(`${ctx.deploymentUrl}${path}`, {
|
||||
method: 'POST',
|
||||
body: JSON.stringify([1337]),
|
||||
headers: {
|
||||
'Content-Type': 'text/plain;charset=UTF-8',
|
||||
'Next-Action': actionId,
|
||||
},
|
||||
});
|
||||
|
||||
expect(res.status).toEqual(200);
|
||||
const body = await res.text();
|
||||
expect(body).toContain('1338');
|
||||
expect(res.headers.get('x-matched-path')).toBe(path + '.action');
|
||||
if (runtime === 'node') {
|
||||
expect(res.headers.get('x-vercel-cache')).toBe('MISS');
|
||||
} else {
|
||||
// in edge runtime, x-vercel-cache is not returned on MISSes for some reason.
|
||||
// this checks to ensure it was routed to the edge function instead.
|
||||
expect(res.headers.get('x-edge-runtime')).toBe('1');
|
||||
}
|
||||
});
|
||||
|
||||
it('should bypass the static cache for a server action on a page with dynamic params', async () => {
|
||||
const path = `${basePath}/client/static/[dynamic-static]`;
|
||||
const actionId = findActionId(path, runtime);
|
||||
|
||||
const res = await fetch(`${ctx.deploymentUrl}${path}`, {
|
||||
method: 'POST',
|
||||
body: JSON.stringify([1337]),
|
||||
headers: {
|
||||
'Content-Type': 'text/plain;charset=UTF-8',
|
||||
'Next-Action': actionId,
|
||||
},
|
||||
});
|
||||
|
||||
expect(res.status).toEqual(200);
|
||||
const body = await res.text();
|
||||
expect(body).toContain('1338');
|
||||
expect(res.headers.get('x-matched-path')).toBe(path + '.action');
|
||||
if (runtime === 'node') {
|
||||
expect(res.headers.get('x-vercel-cache')).toBe('MISS');
|
||||
} else {
|
||||
expect(res.headers.get('x-edge-runtime')).toBe('1');
|
||||
}
|
||||
});
|
||||
|
||||
it('should bypass the static cache for a multipart request (no action header)', async () => {
|
||||
const path = `${basePath}/client/static`;
|
||||
const actionId = findActionId(path, runtime);
|
||||
|
||||
const res = await fetch(`${ctx.deploymentUrl}${path}`, {
|
||||
method: 'POST',
|
||||
body: `------WebKitFormBoundaryHcVuFa30AN0QV3uZ\r\nContent-Disposition: form-data; name=\"1_$ACTION_ID_${actionId}\"\r\n\r\n\r\n------WebKitFormBoundaryHcVuFa30AN0QV3uZ\r\nContent-Disposition: form-data; name=\"0\"\r\n\r\n[\"$K1\"]\r\n------WebKitFormBoundaryHcVuFa30AN0QV3uZ--\r\n`,
|
||||
headers: {
|
||||
'Content-Type':
|
||||
'multipart/form-data; boundary=----WebKitFormBoundaryHcVuFa30AN0QV3uZ',
|
||||
},
|
||||
});
|
||||
|
||||
expect(res.status).toEqual(200);
|
||||
expect(res.headers.get('content-type')).toBe(
|
||||
'text/html; charset=utf-8'
|
||||
);
|
||||
if (runtime === 'node') {
|
||||
// This is a "BYPASS" because no action ID was provided, so it'll fall back to
|
||||
// `experimentalBypassFor` handling.
|
||||
expect(res.headers.get('x-vercel-cache')).toBe('BYPASS');
|
||||
} else {
|
||||
expect(res.headers.get('x-edge-runtime')).toBe('1');
|
||||
}
|
||||
expect(res.headers.get('x-matched-path')).toBe(path);
|
||||
});
|
||||
|
||||
it('should properly invoke the action on a dynamic page', async () => {
|
||||
const path = `${basePath}/client/dynamic/[id]`;
|
||||
const actionId = findActionId(path, runtime);
|
||||
|
||||
const res = await fetch(`${ctx.deploymentUrl}${path}`, {
|
||||
method: 'POST',
|
||||
body: JSON.stringify([1337]),
|
||||
headers: {
|
||||
'Content-Type': 'text/plain;charset=UTF-8',
|
||||
'Next-Action': actionId,
|
||||
},
|
||||
});
|
||||
|
||||
expect(res.status).toEqual(200);
|
||||
const body = await res.text();
|
||||
expect(body).toContain('1338');
|
||||
expect(res.headers.get('x-matched-path')).toBe(path + '.action');
|
||||
if (runtime === 'node') {
|
||||
expect(res.headers.get('x-vercel-cache')).toBe('MISS');
|
||||
} else {
|
||||
expect(res.headers.get('x-edge-runtime')).toBe('1');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
describe('server component', () => {
|
||||
it('should bypass the static cache for a server action', async () => {
|
||||
const path = `${basePath}/rsc/static`;
|
||||
const actionId = findActionId(path, runtime);
|
||||
|
||||
const res = await fetch(
|
||||
`${ctx.deploymentUrl}${path}`,
|
||||
generateFormDataPayload(actionId)
|
||||
);
|
||||
|
||||
expect(res.status).toEqual(200);
|
||||
expect(res.headers.get('x-matched-path')).toBe(path + '.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');
|
||||
}
|
||||
});
|
||||
|
||||
it('should bypass the static cache for a server action on a page with dynamic params', async () => {
|
||||
const path = `${basePath}/rsc/static/[dynamic-static]`;
|
||||
const actionId = findActionId(path, runtime);
|
||||
|
||||
const res = await fetch(
|
||||
`${ctx.deploymentUrl}${path}`,
|
||||
generateFormDataPayload(actionId)
|
||||
);
|
||||
|
||||
expect(res.status).toEqual(200);
|
||||
expect(res.headers.get('x-matched-path')).toBe(path + '.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');
|
||||
}
|
||||
});
|
||||
|
||||
it('should properly invoke the action on a dynamic page', async () => {
|
||||
const path = `${basePath}/rsc/dynamic`;
|
||||
const actionId = findActionId(path, runtime);
|
||||
|
||||
const res = await fetch(
|
||||
`${ctx.deploymentUrl}${path}`,
|
||||
generateFormDataPayload(actionId)
|
||||
);
|
||||
|
||||
expect(res.status).toEqual(200);
|
||||
expect(res.headers.get('x-matched-path')).toBe(path + '.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('generateStaticParams', () => {
|
||||
it('should bypass the static cache for a server action when pre-generated', async () => {
|
||||
const path = `${basePath}/rsc/static/generate-static-params/pre-generated`;
|
||||
const dynamicPath = `${basePath}/rsc/static/generate-static-params/[slug]`;
|
||||
const actionId = findActionId(dynamicPath, runtime);
|
||||
|
||||
const res = await fetch(
|
||||
`${ctx.deploymentUrl}${path}`,
|
||||
generateFormDataPayload(actionId)
|
||||
);
|
||||
|
||||
expect(res.status).toEqual(200);
|
||||
expect(res.headers.get('x-matched-path')).toBe(
|
||||
dynamicPath + '.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');
|
||||
}
|
||||
});
|
||||
|
||||
it('should bypass the static cache for a server action when not pre-generated', async () => {
|
||||
const page = `${basePath}/rsc/static/generate-static-params/[slug]`;
|
||||
const actionId = findActionId(page, runtime);
|
||||
|
||||
const res = await fetch(
|
||||
`${ctx.deploymentUrl}/${basePath}/rsc/static/generate-static-params/not-pre-generated`,
|
||||
generateFormDataPayload(actionId)
|
||||
);
|
||||
|
||||
expect(res.status).toEqual(200);
|
||||
expect(res.headers.get('x-matched-path')).toBe(page + '.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');
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
it('should not match to an action output when the RSC header is present', async () => {
|
||||
const canonicalPath = `${basePath}/client/dynamic/1`;
|
||||
const pagePath = `${basePath}/client/dynamic/[id]`;
|
||||
const actionId = findActionId(pagePath, runtime);
|
||||
|
||||
const res = await fetch(`${ctx.deploymentUrl}${canonicalPath}`, {
|
||||
method: 'POST',
|
||||
body: JSON.stringify([1337]),
|
||||
headers: {
|
||||
'Content-Type': 'text/plain;charset=UTF-8',
|
||||
'Next-Action': actionId,
|
||||
'Next-Response': 'rsc',
|
||||
RSC: '1',
|
||||
},
|
||||
});
|
||||
|
||||
expect(res.status).toEqual(200);
|
||||
expect(res.headers.get('x-matched-path')).toBe(pagePath + '.rsc');
|
||||
expect(res.headers.get('content-type')).toBe('text/x-component');
|
||||
const body = await res.text();
|
||||
expect(body).toContain(JSON.stringify(['id', '1', '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', () => {
|
||||
it('should not attempt to rewrite the action path for a server action (POST)', async () => {
|
||||
const res = await fetch(`${ctx.deploymentUrl}/api/test`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type':
|
||||
'multipart/form-data; boundary=----WebKitFormBoundaryHcVuFa30AN0QV3uZ',
|
||||
},
|
||||
});
|
||||
|
||||
expect(res.status).toEqual(200);
|
||||
expect(res.headers.get('x-matched-path')).toBe('/api/test');
|
||||
expect(res.headers.get('x-vercel-cache')).toBe('MISS');
|
||||
const body = await res.json();
|
||||
expect(body).toEqual({ message: 'Hello from Next.js!' });
|
||||
});
|
||||
|
||||
it('should not attempt to rewrite the action path for a server action (GET)', async () => {
|
||||
const res = await fetch(`${ctx.deploymentUrl}/api/test`);
|
||||
|
||||
expect(res.status).toEqual(200);
|
||||
expect(res.headers.get('x-matched-path')).toBe('/api/test');
|
||||
const body = await res.json();
|
||||
expect(body).toEqual({ message: 'Hello from Next.js!' });
|
||||
});
|
||||
});
|
||||
});
|
||||
14
packages/next/test/fixtures/00-app-dir-actions-experimental-streaming/next.config.js
vendored
Normal file
14
packages/next/test/fixtures/00-app-dir-actions-experimental-streaming/next.config.js
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
module.exports = {
|
||||
rewrites() {
|
||||
return [
|
||||
{
|
||||
source: '/rewrite/rsc/static',
|
||||
destination: '/rsc/static',
|
||||
},
|
||||
{
|
||||
source: '/rewrite/edge/rsc/static',
|
||||
destination: '/edge/rsc/static',
|
||||
},
|
||||
];
|
||||
},
|
||||
};
|
||||
9
packages/next/test/fixtures/00-app-dir-actions-experimental-streaming/package.json
vendored
Normal file
9
packages/next/test/fixtures/00-app-dir-actions-experimental-streaming/package.json
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"next": "canary"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "next build && cp .next/server/server-reference-manifest.json public/"
|
||||
},
|
||||
"ignoreNextjsUpdates": true
|
||||
}
|
||||
3
packages/next/test/fixtures/00-app-dir-actions-experimental-streaming/pages/api/test.js
vendored
Normal file
3
packages/next/test/fixtures/00-app-dir-actions-experimental-streaming/pages/api/test.js
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
export default function handler(req, res) {
|
||||
res.status(200).json({ message: 'Hello from Next.js!' });
|
||||
}
|
||||
0
packages/next/test/fixtures/00-app-dir-actions-experimental-streaming/public/.keep
vendored
Normal file
0
packages/next/test/fixtures/00-app-dir-actions-experimental-streaming/public/.keep
vendored
Normal file
14
packages/next/test/fixtures/00-app-dir-actions-experimental-streaming/vercel.json
vendored
Normal file
14
packages/next/test/fixtures/00-app-dir-actions-experimental-streaming/vercel.json
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"builds": [
|
||||
{
|
||||
"src": "package.json",
|
||||
"use": "@vercel/next"
|
||||
}
|
||||
],
|
||||
"build": {
|
||||
"env": {
|
||||
"NEXT_EXPERIMENTAL_STREAMING_ACTIONS": "1"
|
||||
}
|
||||
},
|
||||
"probes": []
|
||||
}
|
||||
19
packages/next/test/fixtures/00-app-dir-actions/app/client/dynamic/[id]/page.js
vendored
Normal file
19
packages/next/test/fixtures/00-app-dir-actions/app/client/dynamic/[id]/page.js
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
'use client';
|
||||
|
||||
import { useState } from 'react';
|
||||
import { increment } from '../../../actions';
|
||||
|
||||
export default function Page() {
|
||||
const [count, setCount] = useState(0);
|
||||
async function updateCount() {
|
||||
const newCount = await increment(count);
|
||||
setCount(newCount);
|
||||
}
|
||||
|
||||
return (
|
||||
<form action={updateCount}>
|
||||
<div id="count">{count}</div>
|
||||
<button>Submit</button>
|
||||
</form>
|
||||
);
|
||||
}
|
||||
5
packages/next/test/fixtures/00-app-dir-actions/app/client/dynamic/layout.js
vendored
Normal file
5
packages/next/test/fixtures/00-app-dir-actions/app/client/dynamic/layout.js
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
export const dynamic = 'force-dynamic';
|
||||
|
||||
export default function Layout({ children }) {
|
||||
return children;
|
||||
}
|
||||
19
packages/next/test/fixtures/00-app-dir-actions/app/client/static/[dynamic-static]/page.js
vendored
Normal file
19
packages/next/test/fixtures/00-app-dir-actions/app/client/static/[dynamic-static]/page.js
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
'use client';
|
||||
|
||||
import { useState } from 'react';
|
||||
import { increment } from '../../../actions';
|
||||
|
||||
export default function Page() {
|
||||
const [count, setCount] = useState(0);
|
||||
async function updateCount() {
|
||||
const newCount = await increment(count);
|
||||
setCount(newCount);
|
||||
}
|
||||
|
||||
return (
|
||||
<form action={updateCount}>
|
||||
<div id="count">{count}</div>
|
||||
<button>Submit</button>
|
||||
</form>
|
||||
);
|
||||
}
|
||||
5
packages/next/test/fixtures/00-app-dir-actions/app/client/static/layout.js
vendored
Normal file
5
packages/next/test/fixtures/00-app-dir-actions/app/client/static/layout.js
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
export const dynamic = 'force-static';
|
||||
|
||||
export default function Layout({ children }) {
|
||||
return children;
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user