mirror of
https://github.com/LukeHagar/vercel.git
synced 2025-12-12 04:22:14 +00:00
Compare commits
143 Commits
@vercel/py
...
@vercel/py
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
19a373288f | ||
|
|
322c88536d | ||
|
|
1f259d5eb9 | ||
|
|
3759da57ab | ||
|
|
30ba68edf9 | ||
|
|
62ca2efa73 | ||
|
|
2b71ee6b42 | ||
|
|
acb2acf953 | ||
|
|
2601257846 | ||
|
|
30b0925218 | ||
|
|
eddd432e06 | ||
|
|
b185a7e207 | ||
|
|
5c910bf937 | ||
|
|
cdddb33ad4 | ||
|
|
0da7ea7b78 | ||
|
|
7de754398e | ||
|
|
d4cc520814 | ||
|
|
03d07dd163 | ||
|
|
b6b151f391 | ||
|
|
8c4b732d41 | ||
|
|
d4335f0b56 | ||
|
|
90d0455e1f | ||
|
|
0716130e58 | ||
|
|
8b7479fb6e | ||
|
|
72d8604c9d | ||
|
|
5fe7b57b8d | ||
|
|
ab826eb83d | ||
|
|
98040ec24e | ||
|
|
21c700aa93 | ||
|
|
50ed13b6ed | ||
|
|
597508ffa6 | ||
|
|
57ee3e1fd5 | ||
|
|
83952e45c2 | ||
|
|
8e8f44a21d | ||
|
|
91f8763edc | ||
|
|
b1e0523e71 | ||
|
|
7f8f5f8651 | ||
|
|
fbe08fe57e | ||
|
|
9903f11cc3 | ||
|
|
04f5f3f3d2 | ||
|
|
5e3c077b6b | ||
|
|
2cc2fac819 | ||
|
|
c536a74bc9 | ||
|
|
838d56c31c | ||
|
|
77585013de | ||
|
|
44569e6929 | ||
|
|
6194e8ca8d | ||
|
|
7b0adf371b | ||
|
|
471bdd5b45 | ||
|
|
67fa2f3dd6 | ||
|
|
b67b97023b | ||
|
|
9146885f80 | ||
|
|
98bc41d49a | ||
|
|
a38c102208 | ||
|
|
211c74a7d2 | ||
|
|
2a40ff564e | ||
|
|
d4cf2b9ae6 | ||
|
|
7695316cd4 | ||
|
|
7ecb146fdb | ||
|
|
ec3d6ad640 | ||
|
|
5d521af586 | ||
|
|
652a312753 | ||
|
|
bd516c505b | ||
|
|
4d63d9e954 | ||
|
|
6a9002f229 | ||
|
|
2829d541b8 | ||
|
|
6880dcb3c3 | ||
|
|
832ba4b69a | ||
|
|
9a250d528c | ||
|
|
382ff2f526 | ||
|
|
f80a59c73f | ||
|
|
d09dd1794b | ||
|
|
ab34a26205 | ||
|
|
7582571d94 | ||
|
|
e6aaf79d04 | ||
|
|
a1df25a197 | ||
|
|
dfe47f6e6c | ||
|
|
3a58431695 | ||
|
|
204c3592c7 | ||
|
|
3cede43ca7 | ||
|
|
1dbb22bb6d | ||
|
|
f124779b35 | ||
|
|
371c7a08f2 | ||
|
|
447c20fb99 | ||
|
|
0fe8c07194 | ||
|
|
78d1d548d9 | ||
|
|
c41ff450c0 | ||
|
|
ca2cbf06fb | ||
|
|
2d86a2d4ba | ||
|
|
4edfcd74b6 | ||
|
|
c52bdf7758 | ||
|
|
bc5ac1ec50 | ||
|
|
aa0f3d712b | ||
|
|
e02212ae80 | ||
|
|
a8934da623 | ||
|
|
0e9bb30fd2 | ||
|
|
6afdd7fb0b | ||
|
|
fdef0339f2 | ||
|
|
4636ae54c6 | ||
|
|
61a23f1382 | ||
|
|
4b8b4992c4 | ||
|
|
611fbdd5ac | ||
|
|
ffd2f34c6c | ||
|
|
8feaa9c3b3 | ||
|
|
31daff66af | ||
|
|
48c6b2dcc3 | ||
|
|
6f3ae1a0ed | ||
|
|
88da7463ce | ||
|
|
142aa55a5d | ||
|
|
7bc8b65d13 | ||
|
|
65dec5b7e7 | ||
|
|
f3b62d8ea2 | ||
|
|
9472c22bf7 | ||
|
|
493185709a | ||
|
|
89c1e03233 | ||
|
|
ebd7e3ac39 | ||
|
|
fd29b966d3 | ||
|
|
2bd9216403 | ||
|
|
c94a082f6b | ||
|
|
66cd626d1c | ||
|
|
0861dc8fbc | ||
|
|
7b553c7032 | ||
|
|
644b8a52cb | ||
|
|
33cc8e0acf | ||
|
|
c0efce29ad | ||
|
|
b4d115b24a | ||
|
|
34dd9c0918 | ||
|
|
f5296c3c06 | ||
|
|
d9065c2102 | ||
|
|
0ad37829da | ||
|
|
67748b5207 | ||
|
|
306f653da9 | ||
|
|
9e2120a325 | ||
|
|
a6463d2636 | ||
|
|
429a111b50 | ||
|
|
431dde5fa8 | ||
|
|
1f09979c6f | ||
|
|
fc90a3dc0b | ||
|
|
57541e230d | ||
|
|
efd3cc05dc | ||
|
|
a732b64c02 | ||
|
|
f8320417a8 | ||
|
|
50791803b6 |
18
.github/CODEOWNERS
vendored
18
.github/CODEOWNERS
vendored
@@ -2,17 +2,17 @@
|
|||||||
# https://help.github.com/en/articles/about-code-owners
|
# https://help.github.com/en/articles/about-code-owners
|
||||||
|
|
||||||
# Restricted Paths
|
# Restricted Paths
|
||||||
* @TooTallNate @EndangeredMassa @styfle @cb1kenobi @Ethan-Arrowood @trek
|
* @TooTallNate @EndangeredMassa @trek
|
||||||
/.github/workflows @TooTallNate @EndangeredMassa @styfle @cb1kenobi @Ethan-Arrowood @trek @ijjk
|
/.github/workflows @TooTallNate @EndangeredMassa @trek @ijjk
|
||||||
/packages/fs-detectors @TooTallNate @EndangeredMassa @styfle @cb1kenobi @Ethan-Arrowood @trek @agadzik @chloetedder
|
/packages/fs-detectors @TooTallNate @EndangeredMassa @trek @agadzik @chloetedder
|
||||||
/packages/next @TooTallNate @EndangeredMassa @styfle @cb1kenobi @Ethan-Arrowood @trek @ijjk @ztanner
|
/packages/next @TooTallNate @EndangeredMassa @Ethan-Arrowood @trek @ijjk @ztanner
|
||||||
/packages/routing-utils @TooTallNate @EndangeredMassa @styfle @cb1kenobi @Ethan-Arrowood @trek @ijjk
|
/packages/routing-utils @TooTallNate @EndangeredMassa @trek @ijjk
|
||||||
/packages/static-build @TooTallNate @EndangeredMassa @cb1kenobi @Ethan-Arrowood @trek
|
/packages/static-build @TooTallNate @EndangeredMassa @trek
|
||||||
/packages/edge @vercel/compute @TooTallNate @EndangeredMassa @cb1kenobi @Ethan-Arrowood @trek
|
/packages/edge @vercel/compute @TooTallNate @EndangeredMassa @trek
|
||||||
/examples @leerob
|
/examples @leerob
|
||||||
/examples/create-react-app @Timer
|
/examples/create-react-app @Timer
|
||||||
/examples/nextjs @timneutkens @ijjk @styfle @ztanner @huozhi
|
/examples/nextjs @timneutkens @ijjk @ztanner @huozhi
|
||||||
/packages/node @TooTallNate @EndangeredMassa @styfle @cb1kenobi @Ethan-Arrowood @trek @Kikobeats
|
/packages/node @TooTallNate @EndangeredMassa @trek @Kikobeats
|
||||||
|
|
||||||
# Unrestricted Paths
|
# Unrestricted Paths
|
||||||
.changeset/
|
.changeset/
|
||||||
|
|||||||
4
.github/ISSUE_TEMPLATE/config.yml
vendored
4
.github/ISSUE_TEMPLATE/config.yml
vendored
@@ -1,8 +1,8 @@
|
|||||||
blank_issues_enabled: true
|
blank_issues_enabled: true
|
||||||
contact_links:
|
contact_links:
|
||||||
- name: Bug Report
|
- name: Bug Report
|
||||||
url: https://vercel.com/support/request
|
url: https://vercel.com/help
|
||||||
about: Report a bug using the Vercel support form
|
about: Reach out to our support team
|
||||||
- name: Feature Request
|
- name: Feature Request
|
||||||
url: https://github.com/orgs/vercel/discussions/new?category=ideas
|
url: https://github.com/orgs/vercel/discussions/new?category=ideas
|
||||||
about: Share ideas for new features
|
about: Share ideas for new features
|
||||||
|
|||||||
9
.github/workflows/release.yml
vendored
9
.github/workflows/release.yml
vendored
@@ -76,3 +76,12 @@ jobs:
|
|||||||
script: |
|
script: |
|
||||||
const script = require('./utils/update-latest-release.js')
|
const script = require('./utils/update-latest-release.js')
|
||||||
await script({ github, context })
|
await script({ github, context })
|
||||||
|
summary:
|
||||||
|
name: Summary
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 5
|
||||||
|
needs:
|
||||||
|
- release
|
||||||
|
steps:
|
||||||
|
- name: Check All
|
||||||
|
run: echo OK
|
||||||
|
|||||||
3
.github/workflows/test-lint.yml
vendored
3
.github/workflows/test-lint.yml
vendored
@@ -28,7 +28,8 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
ref: main
|
ref: main
|
||||||
- run: git checkout ${{ github.event.pull_request.head.ref }}
|
- run: git fetch origin ${{ github.event.pull_request.head.sha }}:pr-${{ github.event.pull_request.number }}
|
||||||
|
- run: git checkout pr-${{ github.event.pull_request.number }}
|
||||||
- name: install pnpm@8.3.1
|
- name: install pnpm@8.3.1
|
||||||
run: npm i -g pnpm@8.3.1
|
run: npm i -g pnpm@8.3.1
|
||||||
- run: pnpm install
|
- run: pnpm install
|
||||||
|
|||||||
5
.github/workflows/test.yml
vendored
5
.github/workflows/test.yml
vendored
@@ -70,6 +70,11 @@ jobs:
|
|||||||
if: matrix.runner == 'macos-latest'
|
if: matrix.runner == 'macos-latest'
|
||||||
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/
|
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
|
||||||
|
run: npm i -g yarn@1.22.19
|
||||||
|
|
||||||
- name: install pnpm@8.3.1
|
- name: install pnpm@8.3.1
|
||||||
run: npm i -g pnpm@8.3.1
|
run: npm i -g pnpm@8.3.1
|
||||||
|
|
||||||
|
|||||||
1
.node_version
Normal file
1
.node_version
Normal file
@@ -0,0 +1 @@
|
|||||||
|
v16.20.2
|
||||||
@@ -385,15 +385,16 @@ This is a [class](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refere
|
|||||||
|
|
||||||
This is an abstract enumeration type that is implemented by one of the following possible `String` values:
|
This is an abstract enumeration type that is implemented by one of the following possible `String` values:
|
||||||
|
|
||||||
|
- `nodejs20.x`
|
||||||
- `nodejs18.x`
|
- `nodejs18.x`
|
||||||
- `nodejs16.x`
|
- `nodejs16.x`
|
||||||
- `go1.x`
|
|
||||||
- `java11`
|
- `java11`
|
||||||
- `python3.9`
|
- `python3.9`
|
||||||
- `dotnet6`
|
- `dotnet6`
|
||||||
- `dotnetcore3.1`
|
- `dotnetcore3.1`
|
||||||
- `ruby2.7`
|
- `ruby2.7`
|
||||||
- `provided.al2`
|
- `provided.al2`
|
||||||
|
- `provided.al2023`
|
||||||
|
|
||||||
## `@vercel/build-utils` Helper Functions
|
## `@vercel/build-utils` Helper Functions
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
## Vercel
|
## Vercel
|
||||||
|
|
||||||
Vercel's frontend cloud gives developers frameworks, workflows, and infrastructure to build a faster, more personalized web.
|
Vercel’s Frontend Cloud provides the developer experience and infrastructure to build, scale, and secure a faster, more personalized Web.
|
||||||
|
|
||||||
## Deploy
|
## Deploy
|
||||||
|
|
||||||
|
|||||||
6
examples/CHANGELOG.md
vendored
6
examples/CHANGELOG.md
vendored
@@ -4,4 +4,10 @@
|
|||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|
||||||
|
- chore: update Nuxt example ([#10869](https://github.com/vercel/vercel/pull/10869))
|
||||||
|
|
||||||
|
## null
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
- update examples to use at least node@16 ([#10395](https://github.com/vercel/vercel/pull/10395))
|
- update examples to use at least node@16 ([#10395](https://github.com/vercel/vercel/pull/10395))
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import { deployExample } from '../test-utils';
|
import { deployExample } from '../test-utils';
|
||||||
it('should deploy', async () => {
|
it('[examples] should deploy angular', async () => {
|
||||||
await deployExample(__filename);
|
await deployExample('angular');
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
import { deployExample } from '../test-utils';
|
import { deployExample } from '../test-utils';
|
||||||
it('should deploy', async () => {
|
it('[examples] should deploy astro', async () => {
|
||||||
await deployExample(__filename);
|
await deployExample('astro');
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
import { deployExample } from '../test-utils';
|
import { deployExample } from '../test-utils';
|
||||||
it('should deploy', async () => {
|
it('[examples] should deploy blitzjs', async () => {
|
||||||
await deployExample(__filename);
|
await deployExample('blitzjs');
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
import { deployExample } from '../test-utils';
|
import { deployExample } from '../test-utils';
|
||||||
it('should deploy', async () => {
|
it('[examples] should deploy brunch', async () => {
|
||||||
await deployExample(__filename);
|
await deployExample('brunch');
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
import { deployExample } from '../test-utils';
|
import { deployExample } from '../test-utils';
|
||||||
it('should deploy', async () => {
|
it('[examples] should deploy create-react-app', async () => {
|
||||||
await deployExample(__filename);
|
await deployExample('create-react-app');
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
import { deployExample } from '../test-utils';
|
import { deployExample } from '../test-utils';
|
||||||
it('should deploy', async () => {
|
it('[examples] should deploy docusaurus-2', async () => {
|
||||||
await deployExample(__filename);
|
await deployExample('docusaurus-2');
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
import { deployExample } from '../test-utils';
|
import { deployExample } from '../test-utils';
|
||||||
it('should deploy', async () => {
|
it('[examples] should deploy docusaurus', async () => {
|
||||||
await deployExample(__filename);
|
await deployExample('docusaurus');
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
import { deployExample } from '../test-utils';
|
import { deployExample } from '../test-utils';
|
||||||
it('should deploy', async () => {
|
it('[examples] should deploy dojo', async () => {
|
||||||
await deployExample(__filename);
|
await deployExample('dojo');
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
import { deployExample } from '../test-utils';
|
import { deployExample } from '../test-utils';
|
||||||
it('should deploy', async () => {
|
it('[examples] should deploy eleventy', async () => {
|
||||||
await deployExample(__filename);
|
await deployExample('eleventy');
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
import { deployExample } from '../test-utils';
|
import { deployExample } from '../test-utils';
|
||||||
it('should deploy', async () => {
|
it('[examples] should deploy ember', async () => {
|
||||||
await deployExample(__filename);
|
await deployExample('ember');
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
import { deployExample } from '../test-utils';
|
import { deployExample } from '../test-utils';
|
||||||
it('should deploy', async () => {
|
it('[examples] should deploy gatsby', async () => {
|
||||||
await deployExample(__filename);
|
await deployExample('gatsby');
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
import { deployExample } from '../test-utils';
|
import { deployExample } from '../test-utils';
|
||||||
it('should deploy', async () => {
|
it('[examples] should deploy gridsome', async () => {
|
||||||
await deployExample(__filename);
|
await deployExample('gridsome');
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
import { deployExample } from '../test-utils';
|
import { deployExample } from '../test-utils';
|
||||||
it('should deploy', async () => {
|
it('[examples] should deploy hexo', async () => {
|
||||||
await deployExample(__filename);
|
await deployExample('hexo');
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
import { deployExample } from '../test-utils';
|
import { deployExample } from '../test-utils';
|
||||||
it('should deploy', async () => {
|
it('[examples] should deploy hugo', async () => {
|
||||||
await deployExample(__filename);
|
await deployExample('hugo');
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
import { deployExample } from '../test-utils';
|
import { deployExample } from '../test-utils';
|
||||||
it('should deploy', async () => {
|
it('[examples] should deploy hydrogen-2', async () => {
|
||||||
await deployExample(__filename);
|
await deployExample('hydrogen-2');
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
import { deployExample } from '../test-utils';
|
import { deployExample } from '../test-utils';
|
||||||
it('should deploy', async () => {
|
it('[examples] should deploy hydrogen', async () => {
|
||||||
await deployExample(__filename);
|
await deployExample('hydrogen');
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
import { deployExample } from '../test-utils';
|
import { deployExample } from '../test-utils';
|
||||||
it('should deploy', async () => {
|
it('[examples] should deploy ionic-angular', async () => {
|
||||||
await deployExample(__filename);
|
await deployExample('ionic-angular');
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
import { deployExample } from '../test-utils';
|
import { deployExample } from '../test-utils';
|
||||||
it('should deploy', async () => {
|
it('[examples] should deploy ionic-react', async () => {
|
||||||
await deployExample(__filename);
|
await deployExample('ionic-react');
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
import { deployExample } from '../test-utils';
|
import { deployExample } from '../test-utils';
|
||||||
it('should deploy', async () => {
|
it('[examples] should deploy jekyll', async () => {
|
||||||
await deployExample(__filename);
|
await deployExample('jekyll');
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
import { deployExample } from '../test-utils';
|
import { deployExample } from '../test-utils';
|
||||||
it('should deploy', async () => {
|
it('[examples] should deploy middleman', async () => {
|
||||||
await deployExample(__filename);
|
await deployExample('middleman');
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
import { deployExample } from '../test-utils';
|
import { deployExample } from '../test-utils';
|
||||||
it('should deploy', async () => {
|
it('[examples] should deploy nextjs', async () => {
|
||||||
await deployExample(__filename);
|
await deployExample('nextjs');
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
import { deployExample } from '../test-utils';
|
import { deployExample } from '../test-utils';
|
||||||
it('should deploy', async () => {
|
it('[examples] should deploy node_modules', async () => {
|
||||||
await deployExample(__filename);
|
await deployExample('node_modules');
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
import { deployExample } from '../test-utils';
|
import { deployExample } from '../test-utils';
|
||||||
it('should deploy', async () => {
|
it('[examples] should deploy nuxtjs', async () => {
|
||||||
await deployExample(__filename);
|
await deployExample('nuxtjs');
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
import { deployExample } from '../test-utils';
|
import { deployExample } from '../test-utils';
|
||||||
it('should deploy', async () => {
|
it('[examples] should deploy parcel', async () => {
|
||||||
await deployExample(__filename);
|
await deployExample('parcel');
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
import { deployExample } from '../test-utils';
|
import { deployExample } from '../test-utils';
|
||||||
it('should deploy', async () => {
|
it('[examples] should deploy polymer', async () => {
|
||||||
await deployExample(__filename);
|
await deployExample('polymer');
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
import { deployExample } from '../test-utils';
|
import { deployExample } from '../test-utils';
|
||||||
it('should deploy', async () => {
|
it('[examples] should deploy preact', async () => {
|
||||||
await deployExample(__filename);
|
await deployExample('preact');
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
import { deployExample } from '../test-utils';
|
import { deployExample } from '../test-utils';
|
||||||
it('should deploy', async () => {
|
it('[examples] should deploy redwoodjs', async () => {
|
||||||
await deployExample(__filename);
|
await deployExample('redwoodjs');
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
import { deployExample } from '../test-utils';
|
import { deployExample } from '../test-utils';
|
||||||
it('should deploy', async () => {
|
it('[examples] should deploy remix', async () => {
|
||||||
await deployExample(__filename);
|
await deployExample('remix');
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
import { deployExample } from '../test-utils';
|
import { deployExample } from '../test-utils';
|
||||||
it('should deploy', async () => {
|
it('[examples] should deploy saber', async () => {
|
||||||
await deployExample(__filename);
|
await deployExample('saber');
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
import { deployExample } from '../test-utils';
|
import { deployExample } from '../test-utils';
|
||||||
it('should deploy', async () => {
|
it('[examples] should deploy sanity', async () => {
|
||||||
await deployExample(__filename);
|
await deployExample('sanity');
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
import { deployExample } from '../test-utils';
|
import { deployExample } from '../test-utils';
|
||||||
it('should deploy', async () => {
|
it('[examples] should deploy sapper', async () => {
|
||||||
await deployExample(__filename);
|
await deployExample('sapper');
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
import { deployExample } from '../test-utils';
|
import { deployExample } from '../test-utils';
|
||||||
it('should deploy', async () => {
|
it('[examples] should deploy scully', async () => {
|
||||||
await deployExample(__filename);
|
await deployExample('scully');
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
import { deployExample } from '../test-utils';
|
import { deployExample } from '../test-utils';
|
||||||
it('should deploy', async () => {
|
it('[examples] should deploy solidstart', async () => {
|
||||||
await deployExample(__filename);
|
await deployExample('solidstart');
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
import { deployExample } from '../test-utils';
|
import { deployExample } from '../test-utils';
|
||||||
it('should deploy', async () => {
|
it('[examples] should deploy stencil', async () => {
|
||||||
await deployExample(__filename);
|
await deployExample('stencil');
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
import { deployExample } from '../test-utils';
|
import { deployExample } from '../test-utils';
|
||||||
it('should deploy', async () => {
|
it('[examples] should deploy storybook', async () => {
|
||||||
await deployExample(__filename);
|
await deployExample('storybook');
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import { deployExample } from '../test-utils';
|
import { deployExample } from '../test-utils';
|
||||||
it('should deploy', async () => {
|
it('[examples] should deploy svelte', async () => {
|
||||||
await deployExample(__filename);
|
await deployExample('svelte');
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
import { deployExample } from '../test-utils';
|
import { deployExample } from '../test-utils';
|
||||||
it('should deploy', async () => {
|
it('[examples] should deploy sveltekit-1', async () => {
|
||||||
await deployExample(__filename);
|
await deployExample('sveltekit-1');
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
import { deployExample } from '../test-utils';
|
import { deployExample } from '../test-utils';
|
||||||
it('should deploy', async () => {
|
it('[examples] should deploy sveltekit', async () => {
|
||||||
await deployExample(__filename);
|
await deployExample('sveltekit');
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
import { deployExample } from '../test-utils';
|
import { deployExample } from '../test-utils';
|
||||||
it('should deploy', async () => {
|
it('[examples] should deploy umijs', async () => {
|
||||||
await deployExample(__filename);
|
await deployExample('umijs');
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
import { deployExample } from '../test-utils';
|
import { deployExample } from '../test-utils';
|
||||||
it('should deploy', async () => {
|
it('[examples] should deploy vite', async () => {
|
||||||
await deployExample(__filename);
|
await deployExample('vite');
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
import { deployExample } from '../test-utils';
|
import { deployExample } from '../test-utils';
|
||||||
it('should deploy', async () => {
|
it('[examples] should deploy vitepress', async () => {
|
||||||
await deployExample(__filename);
|
await deployExample('vitepress');
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
import { deployExample } from '../test-utils';
|
import { deployExample } from '../test-utils';
|
||||||
it('should deploy', async () => {
|
it('[examples] should deploy vue', async () => {
|
||||||
await deployExample(__filename);
|
await deployExample('vue');
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
import { deployExample } from '../test-utils';
|
import { deployExample } from '../test-utils';
|
||||||
it('should deploy', async () => {
|
it('[examples] should deploy vuepress', async () => {
|
||||||
await deployExample(__filename);
|
await deployExample('vuepress');
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
import { deployExample } from '../test-utils';
|
import { deployExample } from '../test-utils';
|
||||||
it('should deploy', async () => {
|
it('[examples] should deploy zola', async () => {
|
||||||
await deployExample(__filename);
|
await deployExample('zola');
|
||||||
});
|
});
|
||||||
|
|
||||||
7992
examples/hydrogen/package-lock.json
generated
Normal file
7992
examples/hydrogen/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -23,7 +23,7 @@
|
|||||||
"react-router": "^5.1.2",
|
"react-router": "^5.1.2",
|
||||||
"react-router-dom": "^5.1.2",
|
"react-router-dom": "^5.1.2",
|
||||||
"react-scripts": "3.3.0",
|
"react-scripts": "3.3.0",
|
||||||
"typescript": "3.8.3"
|
"typescript": "4.9.5"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "react-scripts start",
|
"start": "react-scripts start",
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
1
examples/nextjs/.gitignore
vendored
1
examples/nextjs/.gitignore
vendored
@@ -4,6 +4,7 @@
|
|||||||
/node_modules
|
/node_modules
|
||||||
/.pnp
|
/.pnp
|
||||||
.pnp.js
|
.pnp.js
|
||||||
|
.yarn/install-state.gz
|
||||||
|
|
||||||
# testing
|
# testing
|
||||||
/coverage
|
/coverage
|
||||||
|
|||||||
@@ -25,3 +25,9 @@ body {
|
|||||||
)
|
)
|
||||||
rgb(var(--background-start-rgb));
|
rgb(var(--background-start-rgb));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@layer utilities {
|
||||||
|
.text-balance {
|
||||||
|
text-wrap: balance;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,22 +1,22 @@
|
|||||||
import type { Metadata } from 'next'
|
import type { Metadata } from "next";
|
||||||
import { Inter } from 'next/font/google'
|
import { Inter } from "next/font/google";
|
||||||
import './globals.css'
|
import "./globals.css";
|
||||||
|
|
||||||
const inter = Inter({ subsets: ['latin'] })
|
const inter = Inter({ subsets: ["latin"] });
|
||||||
|
|
||||||
export const metadata: Metadata = {
|
export const metadata: Metadata = {
|
||||||
title: 'Create Next App',
|
title: "Create Next App",
|
||||||
description: 'Generated by create next app',
|
description: "Generated by create next app",
|
||||||
}
|
};
|
||||||
|
|
||||||
export default function RootLayout({
|
export default function RootLayout({
|
||||||
children,
|
children,
|
||||||
}: {
|
}: Readonly<{
|
||||||
children: React.ReactNode
|
children: React.ReactNode;
|
||||||
}) {
|
}>) {
|
||||||
return (
|
return (
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<body className={inter.className}>{children}</body>
|
<body className={inter.className}>{children}</body>
|
||||||
</html>
|
</html>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import Image from 'next/image'
|
import Image from "next/image";
|
||||||
|
|
||||||
export default function Home() {
|
export default function Home() {
|
||||||
return (
|
return (
|
||||||
@@ -15,7 +15,7 @@ export default function Home() {
|
|||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noopener noreferrer"
|
rel="noopener noreferrer"
|
||||||
>
|
>
|
||||||
By{' '}
|
By{" "}
|
||||||
<Image
|
<Image
|
||||||
src="/vercel.svg"
|
src="/vercel.svg"
|
||||||
alt="Vercel Logo"
|
alt="Vercel Logo"
|
||||||
@@ -28,7 +28,7 @@ export default function Home() {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="relative flex place-items-center before:absolute before:h-[300px] before:w-[480px] before:-translate-x-1/2 before:rounded-full before:bg-gradient-radial before:from-white before:to-transparent before:blur-2xl before:content-[''] after:absolute after:-z-20 after:h-[180px] after:w-[240px] after:translate-x-1/3 after:bg-gradient-conic after:from-sky-200 after:via-blue-200 after:blur-2xl after:content-[''] before:dark:bg-gradient-to-br before:dark:from-transparent before:dark:to-blue-700 before:dark:opacity-10 after:dark:from-sky-900 after:dark:via-[#0141ff] after:dark:opacity-40 before:lg:h-[360px] z-[-1]">
|
<div className="relative flex place-items-center before:absolute before:h-[300px] before:w-full sm:before:w-[480px] before:-translate-x-1/2 before:rounded-full before:bg-gradient-radial before:from-white before:to-transparent before:blur-2xl before:content-[''] after:absolute after:-z-20 after:h-[180px] after:w-full sm:after:w-[240px] after:translate-x-1/3 after:bg-gradient-conic after:from-sky-200 after:via-blue-200 after:blur-2xl after:content-[''] before:dark:bg-gradient-to-br before:dark:from-transparent before:dark:to-blue-700 before:dark:opacity-10 after:dark:from-sky-900 after:dark:via-[#0141ff] after:dark:opacity-40 before:lg:h-[360px] z-[-1]">
|
||||||
<Image
|
<Image
|
||||||
className="relative dark:drop-shadow-[0_0_0.3rem_#ffffff70] dark:invert"
|
className="relative dark:drop-shadow-[0_0_0.3rem_#ffffff70] dark:invert"
|
||||||
src="/next.svg"
|
src="/next.svg"
|
||||||
@@ -47,7 +47,7 @@ export default function Home() {
|
|||||||
rel="noopener noreferrer"
|
rel="noopener noreferrer"
|
||||||
>
|
>
|
||||||
<h2 className={`mb-3 text-2xl font-semibold`}>
|
<h2 className={`mb-3 text-2xl font-semibold`}>
|
||||||
Docs{' '}
|
Docs{" "}
|
||||||
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
|
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
|
||||||
->
|
->
|
||||||
</span>
|
</span>
|
||||||
@@ -64,7 +64,7 @@ export default function Home() {
|
|||||||
rel="noopener noreferrer"
|
rel="noopener noreferrer"
|
||||||
>
|
>
|
||||||
<h2 className={`mb-3 text-2xl font-semibold`}>
|
<h2 className={`mb-3 text-2xl font-semibold`}>
|
||||||
Learn{' '}
|
Learn{" "}
|
||||||
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
|
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
|
||||||
->
|
->
|
||||||
</span>
|
</span>
|
||||||
@@ -81,13 +81,13 @@ export default function Home() {
|
|||||||
rel="noopener noreferrer"
|
rel="noopener noreferrer"
|
||||||
>
|
>
|
||||||
<h2 className={`mb-3 text-2xl font-semibold`}>
|
<h2 className={`mb-3 text-2xl font-semibold`}>
|
||||||
Templates{' '}
|
Templates{" "}
|
||||||
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
|
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
|
||||||
->
|
->
|
||||||
</span>
|
</span>
|
||||||
</h2>
|
</h2>
|
||||||
<p className={`m-0 max-w-[30ch] text-sm opacity-50`}>
|
<p className={`m-0 max-w-[30ch] text-sm opacity-50`}>
|
||||||
Explore the Next.js 13 playground.
|
Explore starter templates for Next.js.
|
||||||
</p>
|
</p>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
@@ -98,16 +98,16 @@ export default function Home() {
|
|||||||
rel="noopener noreferrer"
|
rel="noopener noreferrer"
|
||||||
>
|
>
|
||||||
<h2 className={`mb-3 text-2xl font-semibold`}>
|
<h2 className={`mb-3 text-2xl font-semibold`}>
|
||||||
Deploy{' '}
|
Deploy{" "}
|
||||||
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
|
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
|
||||||
->
|
->
|
||||||
</span>
|
</span>
|
||||||
</h2>
|
</h2>
|
||||||
<p className={`m-0 max-w-[30ch] text-sm opacity-50`}>
|
<p className={`m-0 max-w-[30ch] text-sm opacity-50 text-balance`}>
|
||||||
Instantly deploy your Next.js site to a shareable URL with Vercel.
|
Instantly deploy your Next.js site to a shareable URL with Vercel.
|
||||||
</p>
|
</p>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
/** @type {import('next').NextConfig} */
|
|
||||||
const nextConfig = {}
|
|
||||||
|
|
||||||
module.exports = nextConfig
|
|
||||||
4
examples/nextjs/next.config.mjs
Normal file
4
examples/nextjs/next.config.mjs
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
/** @type {import('next').NextConfig} */
|
||||||
|
const nextConfig = {};
|
||||||
|
|
||||||
|
export default nextConfig;
|
||||||
1222
examples/nextjs/package-lock.json
generated
1222
examples/nextjs/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -11,17 +11,17 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"react": "^18",
|
"react": "^18",
|
||||||
"react-dom": "^18",
|
"react-dom": "^18",
|
||||||
"next": "13.5.6"
|
"next": "14.1.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"typescript": "^5",
|
"typescript": "^5",
|
||||||
"@types/node": "^20",
|
"@types/node": "^20",
|
||||||
"@types/react": "^18",
|
"@types/react": "^18",
|
||||||
"@types/react-dom": "^18",
|
"@types/react-dom": "^18",
|
||||||
"autoprefixer": "^10",
|
"autoprefixer": "^10.0.1",
|
||||||
"postcss": "^8",
|
"postcss": "^8",
|
||||||
"tailwindcss": "^3",
|
"tailwindcss": "^3.3.0",
|
||||||
"eslint": "^8",
|
"eslint": "^8",
|
||||||
"eslint-config-next": "13.5.6"
|
"eslint-config-next": "14.1.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,4 +3,4 @@ module.exports = {
|
|||||||
tailwindcss: {},
|
tailwindcss: {},
|
||||||
autoprefixer: {},
|
autoprefixer: {},
|
||||||
},
|
},
|
||||||
}
|
};
|
||||||
|
|||||||
@@ -1,20 +1,20 @@
|
|||||||
import type { Config } from 'tailwindcss'
|
import type { Config } from "tailwindcss";
|
||||||
|
|
||||||
const config: Config = {
|
const config: Config = {
|
||||||
content: [
|
content: [
|
||||||
'./pages/**/*.{js,ts,jsx,tsx,mdx}',
|
"./pages/**/*.{js,ts,jsx,tsx,mdx}",
|
||||||
'./components/**/*.{js,ts,jsx,tsx,mdx}',
|
"./components/**/*.{js,ts,jsx,tsx,mdx}",
|
||||||
'./app/**/*.{js,ts,jsx,tsx,mdx}',
|
"./app/**/*.{js,ts,jsx,tsx,mdx}",
|
||||||
],
|
],
|
||||||
theme: {
|
theme: {
|
||||||
extend: {
|
extend: {
|
||||||
backgroundImage: {
|
backgroundImage: {
|
||||||
'gradient-radial': 'radial-gradient(var(--tw-gradient-stops))',
|
"gradient-radial": "radial-gradient(var(--tw-gradient-stops))",
|
||||||
'gradient-conic':
|
"gradient-conic":
|
||||||
'conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))',
|
"conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
plugins: [],
|
plugins: [],
|
||||||
}
|
};
|
||||||
export default config
|
export default config;
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"target": "es5",
|
|
||||||
"lib": ["dom", "dom.iterable", "esnext"],
|
"lib": ["dom", "dom.iterable", "esnext"],
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
export default {
|
// https://nuxt.com/docs/api/configuration/nuxt-config
|
||||||
nitro: {
|
export default defineNuxtConfig({
|
||||||
preset: 'vercel-edge',
|
devtools: { enabled: true },
|
||||||
|
routeRules: {
|
||||||
|
// prerender index route by default
|
||||||
|
'/': { prerender: true },
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"private": true,
|
"private": true,
|
||||||
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "nuxt build",
|
"build": "nuxt build",
|
||||||
"dev": "nuxt dev",
|
"dev": "nuxt dev",
|
||||||
@@ -8,6 +9,9 @@
|
|||||||
"postinstall": "nuxt prepare"
|
"postinstall": "nuxt prepare"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"nuxt": "^3.0.0"
|
"@nuxt/devtools": "^1.0.3",
|
||||||
|
"nuxt": "^3.8.2",
|
||||||
|
"vue": "^3.3.8",
|
||||||
|
"vue-router": "^4.2.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
6100
examples/nuxtjs/pnpm-lock.yaml
generated
Normal file
6100
examples/nuxtjs/pnpm-lock.yaml
generated
Normal file
File diff suppressed because it is too large
Load Diff
BIN
examples/nuxtjs/public/favicon.ico
Normal file
BIN
examples/nuxtjs/public/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.2 KiB |
3
examples/nuxtjs/server/tsconfig.json
Normal file
3
examples/nuxtjs/server/tsconfig.json
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"extends": "../.nuxt/tsconfig.server.json"
|
||||||
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
// https://v3.nuxtjs.org/concepts/typescript
|
// https://nuxt.com/docs/guide/concepts/typescript
|
||||||
"extends": "./.nuxt/tsconfig.json"
|
"extends": "./.nuxt/tsconfig.json"
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
2
examples/package.json
vendored
2
examples/package.json
vendored
@@ -9,7 +9,7 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jest": "27.4.1",
|
"@types/jest": "27.4.1",
|
||||||
"@vercel/frameworks": "2.0.2"
|
"@vercel/frameworks": "2.0.6"
|
||||||
},
|
},
|
||||||
"version": null
|
"version": null
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,12 @@
|
|||||||
|
|
||||||
This directory is a brief example of a [Remix](https://remix.run/docs) site that can be deployed to Vercel with zero configuration.
|
This directory is a brief example of a [Remix](https://remix.run/docs) site that can be deployed to Vercel with zero configuration.
|
||||||
|
|
||||||
|
To get started, run the Remix cli with this template
|
||||||
|
|
||||||
|
```sh
|
||||||
|
npx create-remix@latest --template vercel/vercel/examples/remix
|
||||||
|
```
|
||||||
|
|
||||||
## Deploy Your Own
|
## Deploy Your Own
|
||||||
|
|
||||||
[](https://vercel.com/new/clone?repository-url=https://github.com/vercel/vercel/tree/main/examples/remix&template=remix)
|
[](https://vercel.com/new/clone?repository-url=https://github.com/vercel/vercel/tree/main/examples/remix&template=remix)
|
||||||
|
|||||||
7906
examples/saber/package-lock.json
generated
Normal file
7906
examples/saber/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
31785
examples/sanity/package-lock.json
generated
Normal file
31785
examples/sanity/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -15,21 +15,21 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@fontsource/fira-mono": "^4.5.10",
|
"@fontsource/fira-mono": "^4.5.10",
|
||||||
"@neoconfetti/svelte": "^1.0.0",
|
"@neoconfetti/svelte": "^1.0.0",
|
||||||
"@playwright/test": "^1.28.1",
|
"@playwright/test": "^1.40.1",
|
||||||
"@sveltejs/adapter-vercel": "^3.0.0",
|
"@sveltejs/adapter-vercel": "^3.1.0",
|
||||||
"@sveltejs/kit": "^1.5.0",
|
"@sveltejs/kit": "^1.30.3",
|
||||||
"@types/cookie": "^0.5.1",
|
"@types/cookie": "^0.5.4",
|
||||||
"eslint": "^8.28.0",
|
"eslint": "^8.55.0",
|
||||||
"eslint-config-prettier": "^8.5.0",
|
"eslint-config-prettier": "^8.10.0",
|
||||||
"eslint-plugin-svelte": "^2.26.0",
|
"eslint-plugin-svelte": "^2.35.1",
|
||||||
"prettier": "^2.8.0",
|
"prettier": "^2.8.8",
|
||||||
"prettier-plugin-svelte": "^2.8.1",
|
"prettier-plugin-svelte": "^2.10.1",
|
||||||
"svelte": "^3.54.0",
|
"svelte": "^3.59.2",
|
||||||
"svelte-check": "^3.0.1",
|
"svelte-check": "^3.6.2",
|
||||||
"typescript": "^5.0.0",
|
"typescript": "^5.3.3",
|
||||||
"vite": "^4.3.0",
|
"vite": "^4.5.1",
|
||||||
"vitest": "^0.25.3",
|
"vitest": "^0.25.8",
|
||||||
"web-vitals": "^3.3.1"
|
"web-vitals": "^3.5.0"
|
||||||
},
|
},
|
||||||
"type": "module"
|
"type": "module"
|
||||||
}
|
}
|
||||||
|
|||||||
1148
examples/sveltekit-1/pnpm-lock.yaml
generated
1148
examples/sveltekit-1/pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,61 @@
|
|||||||
# @vercel-internals/types
|
# @vercel-internals/types
|
||||||
|
|
||||||
|
## 1.0.21
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [[`cdddb33ad`](https://github.com/vercel/vercel/commit/cdddb33ad49f6080c49f4fff3767e6111acd0bbe)]:
|
||||||
|
- @vercel/build-utils@7.5.1
|
||||||
|
|
||||||
|
## 1.0.20
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [[`98040ec24`](https://github.com/vercel/vercel/commit/98040ec24e1ee585865d11eb216b6525d39d209e)]:
|
||||||
|
- @vercel/build-utils@7.5.0
|
||||||
|
|
||||||
|
## 1.0.19
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [[`67fa2f3dd`](https://github.com/vercel/vercel/commit/67fa2f3dd6a6d5a3504b7f9081e56deff7b36eab)]:
|
||||||
|
- @vercel/build-utils@7.4.1
|
||||||
|
|
||||||
|
## 1.0.18
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [[`4d63d9e95`](https://github.com/vercel/vercel/commit/4d63d9e954549d811063d259250d1865b7de2ba1)]:
|
||||||
|
- @vercel/build-utils@7.4.0
|
||||||
|
|
||||||
|
## 1.0.17
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [[`dfe47f6e6`](https://github.com/vercel/vercel/commit/dfe47f6e6c1d395ae24d802f4b7c98e39b9f90f4)]:
|
||||||
|
- @vercel/build-utils@7.3.0
|
||||||
|
|
||||||
|
## 1.0.16
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [[`88da7463c`](https://github.com/vercel/vercel/commit/88da7463ce12df91d49fbde85cb617030d55f558)]:
|
||||||
|
- @vercel/build-utils@7.2.5
|
||||||
|
|
||||||
|
## 1.0.15
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [[`65dec5b7e`](https://github.com/vercel/vercel/commit/65dec5b7e752f4da8fe0ffdb25215170453f6f8b)]:
|
||||||
|
- @vercel/build-utils@7.2.4
|
||||||
|
|
||||||
|
## 1.0.14
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [[`0861dc8fb`](https://github.com/vercel/vercel/commit/0861dc8fbcea1037626b00664a4b6c22f1b0a7ed)]:
|
||||||
|
- @vercel/build-utils@7.2.3
|
||||||
|
|
||||||
## 1.0.13
|
## 1.0.13
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
3
internals/types/index.d.ts
vendored
3
internals/types/index.d.ts
vendored
@@ -428,7 +428,8 @@ export type ProjectLinkedError = {
|
|||||||
| 'TEAM_DELETED'
|
| 'TEAM_DELETED'
|
||||||
| 'PATH_IS_FILE'
|
| 'PATH_IS_FILE'
|
||||||
| 'INVALID_ROOT_DIRECTORY'
|
| 'INVALID_ROOT_DIRECTORY'
|
||||||
| 'MISSING_PROJECT_SETTINGS';
|
| 'MISSING_PROJECT_SETTINGS'
|
||||||
|
| 'TOO_MANY_PROJECTS';
|
||||||
};
|
};
|
||||||
|
|
||||||
export type ProjectLinkResult =
|
export type ProjectLinkResult =
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"private": true,
|
"private": true,
|
||||||
"name": "@vercel-internals/types",
|
"name": "@vercel-internals/types",
|
||||||
"version": "1.0.13",
|
"version": "1.0.21",
|
||||||
"types": "index.d.ts",
|
"types": "index.d.ts",
|
||||||
"main": "index.d.ts",
|
"main": "index.d.ts",
|
||||||
"files": [
|
"files": [
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/node": "14.14.31",
|
"@types/node": "14.14.31",
|
||||||
"@vercel-internals/constants": "1.0.4",
|
"@vercel-internals/constants": "1.0.4",
|
||||||
"@vercel/build-utils": "7.2.2",
|
"@vercel/build-utils": "7.5.1",
|
||||||
"@vercel/routing-utils": "3.1.0"
|
"@vercel/routing-utils": "3.1.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
"create-svelte": "2.0.1",
|
"create-svelte": "2.0.1",
|
||||||
"dot": "1.1.3",
|
"dot": "1.1.3",
|
||||||
"esbuild": "0.19.2",
|
"esbuild": "0.19.2",
|
||||||
"eslint": "8.14.0",
|
"eslint": "8.24.0",
|
||||||
"eslint-config-prettier": "8.5.0",
|
"eslint-config-prettier": "8.5.0",
|
||||||
"eslint-plugin-jest": "26.1.5",
|
"eslint-plugin-jest": "26.1.5",
|
||||||
"execa": "3.2.0",
|
"execa": "3.2.0",
|
||||||
@@ -29,11 +29,11 @@
|
|||||||
"lint-staged": "9.2.5",
|
"lint-staged": "9.2.5",
|
||||||
"node-fetch": "2.6.7",
|
"node-fetch": "2.6.7",
|
||||||
"npm-package-arg": "6.1.0",
|
"npm-package-arg": "6.1.0",
|
||||||
"prettier": "2.6.2",
|
"prettier": "2.7.0",
|
||||||
"source-map-support": "0.5.12",
|
"source-map-support": "0.5.12",
|
||||||
"ts-eager": "2.0.2",
|
"ts-eager": "2.0.2",
|
||||||
"ts-jest": "29.1.0",
|
"ts-jest": "29.1.0",
|
||||||
"turbo": "1.10.15",
|
"turbo": "1.11.3",
|
||||||
"typescript": "4.9.5"
|
"typescript": "4.9.5"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -1,5 +1,53 @@
|
|||||||
# @vercel/build-utils
|
# @vercel/build-utils
|
||||||
|
|
||||||
|
## 7.5.1
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Add experimental field to Lambda and size to FileFsRef output ([#11059](https://github.com/vercel/vercel/pull/11059))
|
||||||
|
|
||||||
|
## 7.5.0
|
||||||
|
|
||||||
|
### Minor Changes
|
||||||
|
|
||||||
|
- Deprecate `EdgeFunction#name` property ([#11010](https://github.com/vercel/vercel/pull/11010))
|
||||||
|
|
||||||
|
## 7.4.1
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Extend Node v16 discontinue date to 2024-06-15 ([#10967](https://github.com/vercel/vercel/pull/10967))
|
||||||
|
|
||||||
|
## 7.4.0
|
||||||
|
|
||||||
|
### Minor Changes
|
||||||
|
|
||||||
|
- Adds new helper `getPathForPackageManager()` ([#10918](https://github.com/vercel/vercel/pull/10918))
|
||||||
|
|
||||||
|
## 7.3.0
|
||||||
|
|
||||||
|
### Minor Changes
|
||||||
|
|
||||||
|
- [cli] add `--deprecated` option to `vc project ls` command ([#10919](https://github.com/vercel/vercel/pull/10919))
|
||||||
|
|
||||||
|
## 7.2.5
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Remove Node.js v20 env var check ([#10834](https://github.com/vercel/vercel/pull/10834))
|
||||||
|
|
||||||
|
## 7.2.4
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Select Node.js version based on what's available in build-container ([#10822](https://github.com/vercel/vercel/pull/10822))
|
||||||
|
|
||||||
|
## 7.2.3
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Add experimental flag to allow Node.js v20 ([#10802](https://github.com/vercel/vercel/pull/10802))
|
||||||
|
|
||||||
## 7.2.2
|
## 7.2.2
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@vercel/build-utils",
|
"name": "@vercel/build-utils",
|
||||||
"version": "7.2.2",
|
"version": "7.5.1",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
"types": "./dist/index.d.js",
|
"types": "./dist/index.d.js",
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
"@types/node-fetch": "^2.1.6",
|
"@types/node-fetch": "^2.1.6",
|
||||||
"@types/semver": "6.0.0",
|
"@types/semver": "6.0.0",
|
||||||
"@types/yazl": "2.4.2",
|
"@types/yazl": "2.4.2",
|
||||||
"@vercel/error-utils": "2.0.1",
|
"@vercel/error-utils": "2.0.2",
|
||||||
"aggregate-error": "3.0.1",
|
"aggregate-error": "3.0.1",
|
||||||
"async-retry": "1.2.3",
|
"async-retry": "1.2.3",
|
||||||
"async-sema": "2.1.4",
|
"async-sema": "2.1.4",
|
||||||
|
|||||||
@@ -8,12 +8,13 @@ export class EdgeFunction {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* A display name for the edge function.
|
* A display name for the edge function.
|
||||||
|
* @deprecated This property should no longer be used. The name is inferred from the URL path of the function.
|
||||||
*/
|
*/
|
||||||
name: string;
|
name?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The deployment target.
|
* The deployment target.
|
||||||
* Only v8-worker is currently supported.
|
* Only `v8-worker` is currently supported.
|
||||||
*/
|
*/
|
||||||
deploymentTarget: 'v8-worker';
|
deploymentTarget: 'v8-worker';
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ interface FileFsRefOptions {
|
|||||||
mode?: number;
|
mode?: number;
|
||||||
contentType?: string;
|
contentType?: string;
|
||||||
fsPath: string;
|
fsPath: string;
|
||||||
|
size?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface FromStreamOptions {
|
interface FromStreamOptions {
|
||||||
@@ -24,28 +25,38 @@ class FileFsRef implements FileBase {
|
|||||||
public type: 'FileFsRef';
|
public type: 'FileFsRef';
|
||||||
public mode: number;
|
public mode: number;
|
||||||
public fsPath: string;
|
public fsPath: string;
|
||||||
|
public size?: number;
|
||||||
public contentType: string | undefined;
|
public contentType: string | undefined;
|
||||||
|
|
||||||
constructor({ mode = 0o100644, contentType, fsPath }: FileFsRefOptions) {
|
constructor({
|
||||||
|
mode = 0o100644,
|
||||||
|
contentType,
|
||||||
|
fsPath,
|
||||||
|
size,
|
||||||
|
}: FileFsRefOptions) {
|
||||||
assert(typeof mode === 'number');
|
assert(typeof mode === 'number');
|
||||||
assert(typeof fsPath === 'string');
|
assert(typeof fsPath === 'string');
|
||||||
this.type = 'FileFsRef';
|
this.type = 'FileFsRef';
|
||||||
this.mode = mode;
|
this.mode = mode;
|
||||||
this.contentType = contentType;
|
this.contentType = contentType;
|
||||||
this.fsPath = fsPath;
|
this.fsPath = fsPath;
|
||||||
|
this.size = size;
|
||||||
}
|
}
|
||||||
|
|
||||||
static async fromFsPath({
|
static async fromFsPath({
|
||||||
mode,
|
mode,
|
||||||
contentType,
|
contentType,
|
||||||
fsPath,
|
fsPath,
|
||||||
|
size,
|
||||||
}: FileFsRefOptions): Promise<FileFsRef> {
|
}: FileFsRefOptions): Promise<FileFsRef> {
|
||||||
let m = mode;
|
let m = mode;
|
||||||
if (!m) {
|
let s = size;
|
||||||
|
if (!m || typeof s === 'undefined') {
|
||||||
const stat = await fs.lstat(fsPath);
|
const stat = await fs.lstat(fsPath);
|
||||||
m = stat.mode;
|
m = stat.mode;
|
||||||
|
s = stat.size;
|
||||||
}
|
}
|
||||||
return new FileFsRef({ mode: m, contentType, fsPath });
|
return new FileFsRef({ mode: m, contentType, fsPath, size: s });
|
||||||
}
|
}
|
||||||
|
|
||||||
static async fromStream({
|
static async fromStream({
|
||||||
@@ -69,7 +80,7 @@ class FileFsRef implements FileBase {
|
|||||||
dest.on('error', reject);
|
dest.on('error', reject);
|
||||||
});
|
});
|
||||||
|
|
||||||
return new FileFsRef({ mode, contentType, fsPath });
|
return FileFsRef.fromFsPath({ mode, contentType, fsPath });
|
||||||
}
|
}
|
||||||
|
|
||||||
async toStreamAsync(): Promise<NodeJS.ReadableStream> {
|
async toStreamAsync(): Promise<NodeJS.ReadableStream> {
|
||||||
|
|||||||
@@ -1,16 +1,19 @@
|
|||||||
|
import { statSync } from 'fs';
|
||||||
import { intersects, validRange } from 'semver';
|
import { intersects, validRange } from 'semver';
|
||||||
import { NodeVersion } from '../types';
|
import { NodeVersion } from '../types';
|
||||||
import { NowBuildError } from '../errors';
|
import { NowBuildError } from '../errors';
|
||||||
import debug from '../debug';
|
import debug from '../debug';
|
||||||
|
|
||||||
function getOptions() {
|
export type NodeVersionMajor = ReturnType<typeof getOptions>[number]['major'];
|
||||||
const options = [
|
|
||||||
|
export const NODE_VERSIONS: NodeVersion[] = [
|
||||||
|
{ major: 20, range: '20.x', runtime: 'nodejs20.x' },
|
||||||
{ major: 18, range: '18.x', runtime: 'nodejs18.x' },
|
{ major: 18, range: '18.x', runtime: 'nodejs18.x' },
|
||||||
{
|
{
|
||||||
major: 16,
|
major: 16,
|
||||||
range: '16.x',
|
range: '16.x',
|
||||||
runtime: 'nodejs16.x',
|
runtime: 'nodejs16.x',
|
||||||
discontinueDate: new Date('2024-02-06'),
|
discontinueDate: new Date('2024-06-15'),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
major: 14,
|
major: 14,
|
||||||
@@ -36,19 +39,50 @@ function getOptions() {
|
|||||||
runtime: 'nodejs8.10',
|
runtime: 'nodejs8.10',
|
||||||
discontinueDate: new Date('2020-01-06'),
|
discontinueDate: new Date('2020-01-06'),
|
||||||
},
|
},
|
||||||
] as const;
|
];
|
||||||
return options;
|
|
||||||
|
function getOptions() {
|
||||||
|
return NODE_VERSIONS;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getHint(isAuto = false) {
|
function isNodeVersionAvailable(version: NodeVersion): boolean {
|
||||||
const { major, range } = getLatestNodeVersion();
|
try {
|
||||||
|
return statSync(`/node${version.major}`).isDirectory();
|
||||||
|
} catch {
|
||||||
|
// ENOENT, or any other error, we don't care about
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getAvailableNodeVersions(): NodeVersionMajor[] {
|
||||||
|
return getOptions()
|
||||||
|
.filter(isNodeVersionAvailable)
|
||||||
|
.map(n => n.major);
|
||||||
|
}
|
||||||
|
|
||||||
|
function getHint(isAuto = false, availableVersions?: NodeVersionMajor[]) {
|
||||||
|
const { major, range } = getLatestNodeVersion(availableVersions);
|
||||||
return isAuto
|
return isAuto
|
||||||
? `Please set Node.js Version to ${range} in your Project Settings to use Node.js ${major}.`
|
? `Please set Node.js Version to ${range} in your Project Settings to use Node.js ${major}.`
|
||||||
: `Please set "engines": { "node": "${range}" } in your \`package.json\` file to use Node.js ${major}.`;
|
: `Please set "engines": { "node": "${range}" } in your \`package.json\` file to use Node.js ${major}.`;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getLatestNodeVersion() {
|
export function getLatestNodeVersion(availableVersions?: NodeVersionMajor[]) {
|
||||||
return getOptions()[0];
|
const all = getOptions();
|
||||||
|
if (availableVersions) {
|
||||||
|
// Return the first node version that is definitely
|
||||||
|
// available in the build-container.
|
||||||
|
for (const version of all) {
|
||||||
|
for (const major of availableVersions) {
|
||||||
|
if (version.major === major) {
|
||||||
|
return version;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// As a fallback for local `vc build` and the tests,
|
||||||
|
// return the first node version if none is found.
|
||||||
|
return all[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getDiscontinuedNodeVersions(): NodeVersion[] {
|
export function getDiscontinuedNodeVersions(): NodeVersion[] {
|
||||||
@@ -57,9 +91,10 @@ export function getDiscontinuedNodeVersions(): NodeVersion[] {
|
|||||||
|
|
||||||
export async function getSupportedNodeVersion(
|
export async function getSupportedNodeVersion(
|
||||||
engineRange: string | undefined,
|
engineRange: string | undefined,
|
||||||
isAuto = false
|
isAuto = false,
|
||||||
|
availableVersions?: NodeVersionMajor[]
|
||||||
): Promise<NodeVersion> {
|
): Promise<NodeVersion> {
|
||||||
let selection: NodeVersion = getLatestNodeVersion();
|
let selection: NodeVersion | undefined;
|
||||||
|
|
||||||
if (engineRange) {
|
if (engineRange) {
|
||||||
const found =
|
const found =
|
||||||
@@ -68,19 +103,29 @@ export async function getSupportedNodeVersion(
|
|||||||
// the array is already in order so return the first
|
// the array is already in order so return the first
|
||||||
// match which will be the newest version of node
|
// match which will be the newest version of node
|
||||||
selection = o;
|
selection = o;
|
||||||
return intersects(o.range, engineRange);
|
return (
|
||||||
|
intersects(o.range, engineRange) &&
|
||||||
|
(availableVersions?.length
|
||||||
|
? availableVersions.includes(o.major)
|
||||||
|
: true)
|
||||||
|
);
|
||||||
});
|
});
|
||||||
if (!found) {
|
if (!found) {
|
||||||
throw new NowBuildError({
|
throw new NowBuildError({
|
||||||
code: 'BUILD_UTILS_NODE_VERSION_INVALID',
|
code: 'BUILD_UTILS_NODE_VERSION_INVALID',
|
||||||
link: 'http://vercel.link/node-version',
|
link: 'http://vercel.link/node-version',
|
||||||
message: `Found invalid Node.js Version: "${engineRange}". ${getHint(
|
message: `Found invalid Node.js Version: "${engineRange}". ${getHint(
|
||||||
isAuto
|
isAuto,
|
||||||
|
availableVersions
|
||||||
)}`,
|
)}`,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!selection) {
|
||||||
|
selection = getLatestNodeVersion(availableVersions);
|
||||||
|
}
|
||||||
|
|
||||||
if (isDiscontinued(selection)) {
|
if (isDiscontinued(selection)) {
|
||||||
const intro = `Node.js Version "${selection.range}" is discontinued and must be upgraded.`;
|
const intro = `Node.js Version "${selection.range}" is discontinued and must be upgraded.`;
|
||||||
throw new NowBuildError({
|
throw new NowBuildError({
|
||||||
|
|||||||
@@ -9,7 +9,11 @@ import { deprecate } from 'util';
|
|||||||
import debug from '../debug';
|
import debug from '../debug';
|
||||||
import { NowBuildError } from '../errors';
|
import { NowBuildError } from '../errors';
|
||||||
import { Meta, PackageJson, NodeVersion, Config } from '../types';
|
import { Meta, PackageJson, NodeVersion, Config } from '../types';
|
||||||
import { getSupportedNodeVersion, getLatestNodeVersion } from './node-version';
|
import {
|
||||||
|
getSupportedNodeVersion,
|
||||||
|
getLatestNodeVersion,
|
||||||
|
getAvailableNodeVersions,
|
||||||
|
} from './node-version';
|
||||||
import { readConfigFile } from './read-config-file';
|
import { readConfigFile } from './read-config-file';
|
||||||
import { cloneEnv } from '../clone-env';
|
import { cloneEnv } from '../clone-env';
|
||||||
|
|
||||||
@@ -238,9 +242,10 @@ export async function getNodeVersion(
|
|||||||
destPath: string,
|
destPath: string,
|
||||||
nodeVersionFallback = process.env.VERCEL_PROJECT_SETTINGS_NODE_VERSION,
|
nodeVersionFallback = process.env.VERCEL_PROJECT_SETTINGS_NODE_VERSION,
|
||||||
config: Config = {},
|
config: Config = {},
|
||||||
meta: Meta = {}
|
meta: Meta = {},
|
||||||
|
availableVersions = getAvailableNodeVersions()
|
||||||
): Promise<NodeVersion> {
|
): Promise<NodeVersion> {
|
||||||
const latest = getLatestNodeVersion();
|
const latest = getLatestNodeVersion(availableVersions);
|
||||||
if (meta.isDev) {
|
if (meta.isDev) {
|
||||||
// Use the system-installed version of `node` in PATH for `vercel dev`
|
// Use the system-installed version of `node` in PATH for `vercel dev`
|
||||||
return { ...latest, runtime: 'nodejs' };
|
return { ...latest, runtime: 'nodejs' };
|
||||||
@@ -266,7 +271,7 @@ export async function getNodeVersion(
|
|||||||
nodeVersion = node;
|
nodeVersion = node;
|
||||||
isAuto = false;
|
isAuto = false;
|
||||||
}
|
}
|
||||||
return getSupportedNodeVersion(nodeVersion, isAuto);
|
return getSupportedNodeVersion(nodeVersion, isAuto, availableVersions);
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function scanParentDirs(
|
export async function scanParentDirs(
|
||||||
@@ -511,6 +516,10 @@ export async function runNpmInstall(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Prepares the input environment based on the used package manager and lockfile
|
||||||
|
* versions.
|
||||||
|
*/
|
||||||
export function getEnvForPackageManager({
|
export function getEnvForPackageManager({
|
||||||
cliType,
|
cliType,
|
||||||
lockfileVersion,
|
lockfileVersion,
|
||||||
@@ -522,7 +531,90 @@ export function getEnvForPackageManager({
|
|||||||
nodeVersion: NodeVersion | undefined;
|
nodeVersion: NodeVersion | undefined;
|
||||||
env: { [x: string]: string | undefined };
|
env: { [x: string]: string | undefined };
|
||||||
}) {
|
}) {
|
||||||
const newEnv: { [x: string]: string | undefined } = { ...env };
|
const {
|
||||||
|
detectedLockfile,
|
||||||
|
detectedPackageManager,
|
||||||
|
path: newPath,
|
||||||
|
yarnNodeLinker,
|
||||||
|
} = getPathForPackageManager({
|
||||||
|
cliType,
|
||||||
|
lockfileVersion,
|
||||||
|
nodeVersion,
|
||||||
|
env,
|
||||||
|
});
|
||||||
|
|
||||||
|
const newEnv: { [x: string]: string | undefined } = {
|
||||||
|
...env,
|
||||||
|
};
|
||||||
|
|
||||||
|
if (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} ` : '';
|
||||||
|
|
||||||
|
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'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return newEnv;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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 getPathForPackageManager({
|
||||||
|
cliType,
|
||||||
|
lockfileVersion,
|
||||||
|
nodeVersion,
|
||||||
|
env,
|
||||||
|
}: {
|
||||||
|
cliType: CliType;
|
||||||
|
lockfileVersion: number | undefined;
|
||||||
|
nodeVersion: NodeVersion | undefined;
|
||||||
|
env: { [x: string]: string | 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;
|
||||||
|
/**
|
||||||
|
* Set if yarn was identified as package manager and `YARN_NODE_LINKER`
|
||||||
|
* environment variable was not found on the input environment.
|
||||||
|
*/
|
||||||
|
yarnNodeLinker: string | undefined;
|
||||||
|
} {
|
||||||
|
let detectedLockfile: string | undefined;
|
||||||
|
let detectedPackageManager: string | undefined;
|
||||||
|
let pathValue: string | undefined;
|
||||||
|
let yarnNodeLinker: string | undefined;
|
||||||
const oldPath = env.PATH + '';
|
const oldPath = env.PATH + '';
|
||||||
const npm7 = '/node16/bin-npm7';
|
const npm7 = '/node16/bin-npm7';
|
||||||
const pnpm7 = '/pnpm7/node_modules/.bin';
|
const pnpm7 = '/pnpm7/node_modules/.bin';
|
||||||
@@ -537,9 +629,10 @@ export function getEnvForPackageManager({
|
|||||||
!oldPath.includes(npm7) &&
|
!oldPath.includes(npm7) &&
|
||||||
!corepackEnabled
|
!corepackEnabled
|
||||||
) {
|
) {
|
||||||
// Ensure that npm 7 is at the beginning of the `$PATH`
|
// npm 7
|
||||||
newEnv.PATH = `${npm7}${path.delimiter}${oldPath}`;
|
pathValue = npm7;
|
||||||
console.log('Detected `package-lock.json` generated by npm 7+');
|
detectedLockfile = 'package-lock.json';
|
||||||
|
detectedPackageManager = 'npm 7+';
|
||||||
}
|
}
|
||||||
} else if (cliType === 'pnpm') {
|
} else if (cliType === 'pnpm') {
|
||||||
if (
|
if (
|
||||||
@@ -548,39 +641,40 @@ export function getEnvForPackageManager({
|
|||||||
!oldPath.includes(pnpm7) &&
|
!oldPath.includes(pnpm7) &&
|
||||||
!corepackEnabled
|
!corepackEnabled
|
||||||
) {
|
) {
|
||||||
// Ensure that pnpm 7 is at the beginning of the `$PATH`
|
// pnpm 7
|
||||||
newEnv.PATH = `${pnpm7}${path.delimiter}${oldPath}`;
|
pathValue = pnpm7;
|
||||||
console.log(
|
detectedLockfile = 'pnpm-lock.yaml';
|
||||||
`Detected \`pnpm-lock.yaml\` version ${lockfileVersion} generated by pnpm 7`
|
detectedPackageManager = 'pnpm 7';
|
||||||
);
|
|
||||||
} else if (
|
} else if (
|
||||||
typeof lockfileVersion === 'number' &&
|
typeof lockfileVersion === 'number' &&
|
||||||
lockfileVersion >= 6 &&
|
lockfileVersion >= 6 &&
|
||||||
!oldPath.includes(pnpm8) &&
|
!oldPath.includes(pnpm8) &&
|
||||||
!corepackEnabled
|
!corepackEnabled
|
||||||
) {
|
) {
|
||||||
// Ensure that pnpm 8 is at the beginning of the `$PATH`
|
// pnpm 8
|
||||||
newEnv.PATH = `${pnpm8}${path.delimiter}${oldPath}`;
|
pathValue = pnpm8;
|
||||||
console.log(
|
detectedLockfile = 'pnpm-lock.yaml';
|
||||||
`Detected \`pnpm-lock.yaml\` version ${lockfileVersion} generated by pnpm 8`
|
detectedPackageManager = 'pnpm 8';
|
||||||
);
|
|
||||||
}
|
}
|
||||||
} else if (cliType === 'bun') {
|
} else if (cliType === 'bun') {
|
||||||
if (!oldPath.includes(bun1) && !corepackEnabled) {
|
if (!oldPath.includes(bun1) && !corepackEnabled) {
|
||||||
// Ensure that Bun 1 is at the beginning of the `$PATH`
|
// Bun 1
|
||||||
newEnv.PATH = `${bun1}${path.delimiter}${oldPath}`;
|
pathValue = bun1;
|
||||||
console.log('Detected `bun.lockb` generated by Bun');
|
detectedLockfile = 'bun.lockb';
|
||||||
console.warn(
|
detectedPackageManager = 'Bun';
|
||||||
'Warning: Bun is used as a package manager at build time only, not at runtime with Functions'
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Yarn v2 PnP mode may be activated, so force "node-modules" linker style
|
// Yarn v2 PnP mode may be activated, so force "node-modules" linker style
|
||||||
if (!env.YARN_NODE_LINKER) {
|
if (!env.YARN_NODE_LINKER) {
|
||||||
newEnv.YARN_NODE_LINKER = 'node-modules';
|
yarnNodeLinker = 'node-modules';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return newEnv;
|
return {
|
||||||
|
detectedLockfile,
|
||||||
|
detectedPackageManager,
|
||||||
|
path: pathValue,
|
||||||
|
yarnNodeLinker,
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function runCustomInstallCommand({
|
export async function runCustomInstallCommand({
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ import {
|
|||||||
runCustomInstallCommand,
|
runCustomInstallCommand,
|
||||||
getEnvForPackageManager,
|
getEnvForPackageManager,
|
||||||
getNodeVersion,
|
getNodeVersion,
|
||||||
|
getPathForPackageManager,
|
||||||
getSpawnOptions,
|
getSpawnOptions,
|
||||||
getNodeBinPath,
|
getNodeBinPath,
|
||||||
getNodeBinPaths,
|
getNodeBinPaths,
|
||||||
@@ -78,6 +79,7 @@ export {
|
|||||||
runCustomInstallCommand,
|
runCustomInstallCommand,
|
||||||
getEnvForPackageManager,
|
getEnvForPackageManager,
|
||||||
getNodeVersion,
|
getNodeVersion,
|
||||||
|
getPathForPackageManager,
|
||||||
getLatestNodeVersion,
|
getLatestNodeVersion,
|
||||||
getDiscontinuedNodeVersions,
|
getDiscontinuedNodeVersions,
|
||||||
getSpawnOptions,
|
getSpawnOptions,
|
||||||
@@ -104,3 +106,5 @@ export * from './should-serve';
|
|||||||
export * from './schemas';
|
export * from './schemas';
|
||||||
export * from './types';
|
export * from './types';
|
||||||
export * from './errors';
|
export * from './errors';
|
||||||
|
|
||||||
|
export { NODE_VERSIONS } from './fs/node-version';
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ export interface LambdaOptionsBase {
|
|||||||
|
|
||||||
export interface LambdaOptionsWithFiles extends LambdaOptionsBase {
|
export interface LambdaOptionsWithFiles extends LambdaOptionsBase {
|
||||||
files: Files;
|
files: Files;
|
||||||
|
experimentalAllowBundling?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -79,6 +80,7 @@ export class Lambda {
|
|||||||
supportsWrapper?: boolean;
|
supportsWrapper?: boolean;
|
||||||
supportsResponseStreaming?: boolean;
|
supportsResponseStreaming?: boolean;
|
||||||
framework?: FunctionFramework;
|
framework?: FunctionFramework;
|
||||||
|
experimentalAllowBundling?: boolean;
|
||||||
|
|
||||||
constructor(opts: LambdaOptions) {
|
constructor(opts: LambdaOptions) {
|
||||||
const {
|
const {
|
||||||
@@ -114,6 +116,16 @@ export class Lambda {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (
|
||||||
|
'experimentalAllowBundling' in opts &&
|
||||||
|
opts.experimentalAllowBundling !== undefined
|
||||||
|
) {
|
||||||
|
assert(
|
||||||
|
typeof opts.experimentalAllowBundling === 'boolean',
|
||||||
|
'"experimentalAllowBundling" is not a boolean'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
if (memory !== undefined) {
|
if (memory !== undefined) {
|
||||||
assert(typeof memory === 'number', '"memory" is not a number');
|
assert(typeof memory === 'number', '"memory" is not a number');
|
||||||
}
|
}
|
||||||
@@ -183,6 +195,10 @@ export class Lambda {
|
|||||||
this.supportsResponseStreaming =
|
this.supportsResponseStreaming =
|
||||||
supportsResponseStreaming ?? experimentalResponseStreaming;
|
supportsResponseStreaming ?? experimentalResponseStreaming;
|
||||||
this.framework = framework;
|
this.framework = framework;
|
||||||
|
this.experimentalAllowBundling =
|
||||||
|
'experimentalAllowBundling' in opts
|
||||||
|
? opts.experimentalAllowBundling
|
||||||
|
: undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
async createZip(): Promise<Buffer> {
|
async createZip(): Promise<Buffer> {
|
||||||
|
|||||||
@@ -196,6 +196,12 @@ export interface StartDevServerSuccess {
|
|||||||
* shut down the dev server once an HTTP request has been fulfilled.
|
* shut down the dev server once an HTTP request has been fulfilled.
|
||||||
*/
|
*/
|
||||||
pid: number;
|
pid: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* An optional function to shut down the dev server. If not provided, the
|
||||||
|
* dev server will forcefully be killed.
|
||||||
|
*/
|
||||||
|
shutdown?: () => Promise<void>;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,13 +1,34 @@
|
|||||||
import assert from 'assert';
|
|
||||||
import { delimiter } from 'path';
|
import { delimiter } from 'path';
|
||||||
import { getEnvForPackageManager } from '../src';
|
import { getEnvForPackageManager, getPathForPackageManager } from '../src';
|
||||||
|
|
||||||
describe('Test `getEnvForPackageManager()`', () => {
|
describe('Test `getEnvForPackageManager()`', () => {
|
||||||
const cases: Array<{
|
let consoleLogSpy: jest.SpyInstance;
|
||||||
|
let consoleWarnSpy: jest.SpyInstance;
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
consoleLogSpy = jest.spyOn(console, 'log');
|
||||||
|
consoleWarnSpy = jest.spyOn(console, 'warn');
|
||||||
|
});
|
||||||
|
|
||||||
|
afterEach(() => {
|
||||||
|
jest.restoreAllMocks();
|
||||||
|
});
|
||||||
|
|
||||||
|
test.each<{
|
||||||
name: string;
|
name: string;
|
||||||
args: Parameters<typeof getEnvForPackageManager>[0];
|
args: Parameters<typeof getEnvForPackageManager>[0];
|
||||||
want: unknown;
|
want: unknown;
|
||||||
}> = [
|
/**
|
||||||
|
* Expected output on `console.log`. Set to `null` when no output is
|
||||||
|
* expected.
|
||||||
|
*/
|
||||||
|
consoleLogOutput?: string | null;
|
||||||
|
/**
|
||||||
|
* Expected output on `console.warn`. Set to `null` when no output is
|
||||||
|
* expected.
|
||||||
|
*/
|
||||||
|
consoleWarnOutput?: string | null;
|
||||||
|
}>([
|
||||||
{
|
{
|
||||||
name: 'should do nothing to env for npm < 6 and node < 16',
|
name: 'should do nothing to env for npm < 6 and node < 16',
|
||||||
args: {
|
args: {
|
||||||
@@ -21,6 +42,8 @@ describe('Test `getEnvForPackageManager()`', () => {
|
|||||||
want: {
|
want: {
|
||||||
FOO: 'bar',
|
FOO: 'bar',
|
||||||
},
|
},
|
||||||
|
consoleLogOutput: null,
|
||||||
|
consoleWarnOutput: null,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'should set path if npm 7+ is detected and node < 16',
|
name: 'should set path if npm 7+ is detected and node < 16',
|
||||||
@@ -37,6 +60,8 @@ describe('Test `getEnvForPackageManager()`', () => {
|
|||||||
FOO: 'bar',
|
FOO: 'bar',
|
||||||
PATH: `/node16/bin-npm7${delimiter}foo`,
|
PATH: `/node16/bin-npm7${delimiter}foo`,
|
||||||
},
|
},
|
||||||
|
consoleLogOutput: 'Detected `package-lock.json` generated by npm 7+',
|
||||||
|
consoleWarnOutput: null,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'should not set npm path if corepack enabled',
|
name: 'should not set npm path if corepack enabled',
|
||||||
@@ -53,6 +78,8 @@ describe('Test `getEnvForPackageManager()`', () => {
|
|||||||
FOO: 'bar',
|
FOO: 'bar',
|
||||||
ENABLE_EXPERIMENTAL_COREPACK: '1',
|
ENABLE_EXPERIMENTAL_COREPACK: '1',
|
||||||
},
|
},
|
||||||
|
consoleLogOutput: null,
|
||||||
|
consoleWarnOutput: null,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'should not prepend npm path again if already detected',
|
name: 'should not prepend npm path again if already detected',
|
||||||
@@ -69,6 +96,8 @@ describe('Test `getEnvForPackageManager()`', () => {
|
|||||||
FOO: 'bar',
|
FOO: 'bar',
|
||||||
PATH: `/node16/bin-npm7${delimiter}foo`,
|
PATH: `/node16/bin-npm7${delimiter}foo`,
|
||||||
},
|
},
|
||||||
|
consoleLogOutput: null,
|
||||||
|
consoleWarnOutput: null,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'should not set path if node is 16 and npm 7+ is detected',
|
name: 'should not set path if node is 16 and npm 7+ is detected',
|
||||||
@@ -85,6 +114,8 @@ describe('Test `getEnvForPackageManager()`', () => {
|
|||||||
FOO: 'bar',
|
FOO: 'bar',
|
||||||
PATH: 'foo',
|
PATH: 'foo',
|
||||||
},
|
},
|
||||||
|
consoleLogOutput: null,
|
||||||
|
consoleWarnOutput: null,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'should set YARN_NODE_LINKER w/yarn if it is not already defined',
|
name: 'should set YARN_NODE_LINKER w/yarn if it is not already defined',
|
||||||
@@ -100,6 +131,8 @@ describe('Test `getEnvForPackageManager()`', () => {
|
|||||||
FOO: 'bar',
|
FOO: 'bar',
|
||||||
YARN_NODE_LINKER: 'node-modules',
|
YARN_NODE_LINKER: 'node-modules',
|
||||||
},
|
},
|
||||||
|
consoleLogOutput: null,
|
||||||
|
consoleWarnOutput: null,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'should not set YARN_NODE_LINKER if it already exists',
|
name: 'should not set YARN_NODE_LINKER if it already exists',
|
||||||
@@ -116,6 +149,8 @@ describe('Test `getEnvForPackageManager()`', () => {
|
|||||||
FOO: 'bar',
|
FOO: 'bar',
|
||||||
YARN_NODE_LINKER: 'exists',
|
YARN_NODE_LINKER: 'exists',
|
||||||
},
|
},
|
||||||
|
consoleLogOutput: null,
|
||||||
|
consoleWarnOutput: null,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'should set path if pnpm 7+ is detected',
|
name: 'should set path if pnpm 7+ is detected',
|
||||||
@@ -132,6 +167,9 @@ describe('Test `getEnvForPackageManager()`', () => {
|
|||||||
FOO: 'bar',
|
FOO: 'bar',
|
||||||
PATH: `/pnpm7/node_modules/.bin${delimiter}foo`,
|
PATH: `/pnpm7/node_modules/.bin${delimiter}foo`,
|
||||||
},
|
},
|
||||||
|
consoleLogOutput:
|
||||||
|
'Detected `pnpm-lock.yaml` version 5.4 generated by pnpm 7',
|
||||||
|
consoleWarnOutput: null,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'should set path if bun v1 is detected',
|
name: 'should set path if bun v1 is detected',
|
||||||
@@ -148,6 +186,9 @@ describe('Test `getEnvForPackageManager()`', () => {
|
|||||||
FOO: 'bar',
|
FOO: 'bar',
|
||||||
PATH: `/bun1${delimiter}/usr/local/bin`,
|
PATH: `/bun1${delimiter}/usr/local/bin`,
|
||||||
},
|
},
|
||||||
|
consoleLogOutput: 'Detected `bun.lockb` generated by Bun',
|
||||||
|
consoleWarnOutput:
|
||||||
|
'Warning: Bun is used as a package manager at build time only, not at runtime with Functions',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'should not set pnpm path if corepack is enabled',
|
name: 'should not set pnpm path if corepack is enabled',
|
||||||
@@ -164,6 +205,8 @@ describe('Test `getEnvForPackageManager()`', () => {
|
|||||||
FOO: 'bar',
|
FOO: 'bar',
|
||||||
ENABLE_EXPERIMENTAL_COREPACK: '1',
|
ENABLE_EXPERIMENTAL_COREPACK: '1',
|
||||||
},
|
},
|
||||||
|
consoleLogOutput: null,
|
||||||
|
consoleWarnOutput: null,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'should not prepend pnpm path again if already detected',
|
name: 'should not prepend pnpm path again if already detected',
|
||||||
@@ -180,6 +223,8 @@ describe('Test `getEnvForPackageManager()`', () => {
|
|||||||
FOO: 'bar',
|
FOO: 'bar',
|
||||||
PATH: `/pnpm7/node_modules/.bin${delimiter}foo`,
|
PATH: `/pnpm7/node_modules/.bin${delimiter}foo`,
|
||||||
},
|
},
|
||||||
|
consoleLogOutput: null,
|
||||||
|
consoleWarnOutput: null,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'should not set path if pnpm 6 is detected',
|
name: 'should not set path if pnpm 6 is detected',
|
||||||
@@ -194,20 +239,262 @@ describe('Test `getEnvForPackageManager()`', () => {
|
|||||||
want: {
|
want: {
|
||||||
FOO: 'bar',
|
FOO: 'bar',
|
||||||
},
|
},
|
||||||
|
consoleLogOutput: null,
|
||||||
|
consoleWarnOutput: null,
|
||||||
},
|
},
|
||||||
];
|
])('$name', ({ args, want, consoleLogOutput, consoleWarnOutput }) => {
|
||||||
|
expect(
|
||||||
for (const { name, want, args } of cases) {
|
|
||||||
it(name, () => {
|
|
||||||
assert.deepStrictEqual(
|
|
||||||
getEnvForPackageManager({
|
getEnvForPackageManager({
|
||||||
cliType: args.cliType,
|
cliType: args.cliType,
|
||||||
lockfileVersion: args.lockfileVersion,
|
lockfileVersion: args.lockfileVersion,
|
||||||
nodeVersion: args.nodeVersion,
|
nodeVersion: args.nodeVersion,
|
||||||
env: args.env,
|
env: args.env,
|
||||||
}),
|
})
|
||||||
want
|
).toStrictEqual(want);
|
||||||
);
|
|
||||||
});
|
// Check console.log output
|
||||||
|
if (typeof consoleLogOutput === 'string') {
|
||||||
|
expect(consoleLogSpy).toHaveBeenCalledWith(consoleLogOutput);
|
||||||
|
} else if (consoleLogOutput === null) {
|
||||||
|
expect(consoleLogSpy).not.toHaveBeenCalled();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check console.warn output
|
||||||
|
if (typeof consoleWarnOutput === 'string') {
|
||||||
|
expect(consoleWarnSpy).toHaveBeenCalledWith(consoleWarnOutput);
|
||||||
|
} else if (consoleLogOutput === null) {
|
||||||
|
expect(consoleWarnSpy).not.toHaveBeenCalled();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('Test `getPathForPackageManager()`', () => {
|
||||||
|
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' },
|
||||||
|
lockfileVersion: 1,
|
||||||
|
env: {
|
||||||
|
FOO: 'bar',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
want: {
|
||||||
|
detectedLockfile: undefined,
|
||||||
|
detectedPackageManager: undefined,
|
||||||
|
path: undefined,
|
||||||
|
yarnNodeLinker: 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' },
|
||||||
|
lockfileVersion: 2,
|
||||||
|
env: {
|
||||||
|
FOO: 'bar',
|
||||||
|
PATH: 'foo',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
want: {
|
||||||
|
detectedLockfile: 'package-lock.json',
|
||||||
|
detectedPackageManager: 'npm 7+',
|
||||||
|
path: '/node16/bin-npm7',
|
||||||
|
yarnNodeLinker: undefined,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'should not set npm path if corepack enabled',
|
||||||
|
args: {
|
||||||
|
cliType: 'npm',
|
||||||
|
nodeVersion: { major: 14, range: '14.x', runtime: 'nodejs14.x' },
|
||||||
|
lockfileVersion: 2,
|
||||||
|
env: {
|
||||||
|
FOO: 'bar',
|
||||||
|
ENABLE_EXPERIMENTAL_COREPACK: '1',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
want: {
|
||||||
|
detectedLockfile: undefined,
|
||||||
|
detectedPackageManager: undefined,
|
||||||
|
path: undefined,
|
||||||
|
yarnNodeLinker: undefined,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'should not prepend npm path again if already detected',
|
||||||
|
args: {
|
||||||
|
cliType: 'npm',
|
||||||
|
nodeVersion: { major: 14, range: '14.x', runtime: 'nodejs14.x' },
|
||||||
|
lockfileVersion: 2,
|
||||||
|
env: {
|
||||||
|
FOO: 'bar',
|
||||||
|
PATH: `/node16/bin-npm7${delimiter}foo`,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
want: {
|
||||||
|
detectedLockfile: undefined,
|
||||||
|
detectedPackageManager: undefined,
|
||||||
|
path: undefined,
|
||||||
|
yarnNodeLinker: 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' },
|
||||||
|
lockfileVersion: 2,
|
||||||
|
env: {
|
||||||
|
FOO: 'bar',
|
||||||
|
PATH: 'foo',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
want: {
|
||||||
|
detectedLockfile: undefined,
|
||||||
|
detectedPackageManager: undefined,
|
||||||
|
path: undefined,
|
||||||
|
yarnNodeLinker: undefined,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'should set YARN_NODE_LINKER w/yarn if it is not already defined',
|
||||||
|
args: {
|
||||||
|
cliType: 'yarn',
|
||||||
|
nodeVersion: { major: 16, range: '16.x', runtime: 'nodejs16.x' },
|
||||||
|
lockfileVersion: 2,
|
||||||
|
env: {
|
||||||
|
FOO: 'bar',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
want: {
|
||||||
|
detectedLockfile: undefined,
|
||||||
|
detectedPackageManager: undefined,
|
||||||
|
path: undefined,
|
||||||
|
yarnNodeLinker: 'node-modules',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'should not set YARN_NODE_LINKER if it already exists',
|
||||||
|
args: {
|
||||||
|
cliType: 'yarn',
|
||||||
|
nodeVersion: { major: 16, range: '16.x', runtime: 'nodejs16.x' },
|
||||||
|
lockfileVersion: 2,
|
||||||
|
env: {
|
||||||
|
FOO: 'bar',
|
||||||
|
YARN_NODE_LINKER: 'exists',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
want: {
|
||||||
|
detectedLockfile: undefined,
|
||||||
|
detectedPackageManager: undefined,
|
||||||
|
path: undefined,
|
||||||
|
yarnNodeLinker: undefined,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'should set path if pnpm 7+ is detected',
|
||||||
|
args: {
|
||||||
|
cliType: 'pnpm',
|
||||||
|
nodeVersion: { major: 16, range: '16.x', runtime: 'nodejs16.x' },
|
||||||
|
lockfileVersion: 5.4,
|
||||||
|
env: {
|
||||||
|
FOO: 'bar',
|
||||||
|
PATH: 'foo',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
want: {
|
||||||
|
detectedLockfile: 'pnpm-lock.yaml',
|
||||||
|
detectedPackageManager: 'pnpm 7',
|
||||||
|
path: '/pnpm7/node_modules/.bin',
|
||||||
|
yarnNodeLinker: undefined,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'should set path if bun v1 is detected',
|
||||||
|
args: {
|
||||||
|
cliType: 'bun',
|
||||||
|
nodeVersion: { major: 18, range: '18.x', runtime: 'nodejs18.x' },
|
||||||
|
lockfileVersion: 0,
|
||||||
|
env: {
|
||||||
|
FOO: 'bar',
|
||||||
|
PATH: '/usr/local/bin',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
want: {
|
||||||
|
detectedLockfile: 'bun.lockb',
|
||||||
|
detectedPackageManager: 'Bun',
|
||||||
|
path: '/bun1',
|
||||||
|
yarnNodeLinker: undefined,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'should not set pnpm path if corepack is enabled',
|
||||||
|
args: {
|
||||||
|
cliType: 'pnpm',
|
||||||
|
nodeVersion: { major: 16, range: '16.x', runtime: 'nodejs16.x' },
|
||||||
|
lockfileVersion: 5.4,
|
||||||
|
env: {
|
||||||
|
FOO: 'bar',
|
||||||
|
ENABLE_EXPERIMENTAL_COREPACK: '1',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
want: {
|
||||||
|
detectedLockfile: undefined,
|
||||||
|
detectedPackageManager: undefined,
|
||||||
|
path: undefined,
|
||||||
|
yarnNodeLinker: undefined,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'should not prepend pnpm path again if already detected',
|
||||||
|
args: {
|
||||||
|
cliType: 'pnpm',
|
||||||
|
nodeVersion: { major: 16, range: '16.x', runtime: 'nodejs16.x' },
|
||||||
|
lockfileVersion: 5.4,
|
||||||
|
env: {
|
||||||
|
FOO: 'bar',
|
||||||
|
PATH: `/pnpm7/node_modules/.bin${delimiter}foo`,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
want: {
|
||||||
|
detectedLockfile: undefined,
|
||||||
|
detectedPackageManager: undefined,
|
||||||
|
path: undefined,
|
||||||
|
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({
|
||||||
|
cliType: args.cliType,
|
||||||
|
lockfileVersion: args.lockfileVersion,
|
||||||
|
nodeVersion: args.nodeVersion,
|
||||||
|
env: args.env,
|
||||||
|
})
|
||||||
|
).toStrictEqual(want);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
82
packages/build-utils/test/unit.test.ts
vendored
82
packages/build-utils/test/unit.test.ts
vendored
@@ -60,7 +60,7 @@ it('should only match supported node versions, otherwise throw an error', async
|
|||||||
);
|
);
|
||||||
|
|
||||||
const autoMessage =
|
const autoMessage =
|
||||||
'Please set Node.js Version to 18.x in your Project Settings to use Node.js 18.';
|
'Please set Node.js Version to 20.x in your Project Settings to use Node.js 20.';
|
||||||
await expectBuilderError(
|
await expectBuilderError(
|
||||||
getSupportedNodeVersion('8.11.x', true),
|
getSupportedNodeVersion('8.11.x', true),
|
||||||
autoMessage
|
autoMessage
|
||||||
@@ -80,7 +80,7 @@ it('should only match supported node versions, otherwise throw an error', async
|
|||||||
);
|
);
|
||||||
|
|
||||||
const foundMessage =
|
const foundMessage =
|
||||||
'Please set "engines": { "node": "18.x" } in your `package.json` file to use Node.js 18.';
|
'Please set "engines": { "node": "20.x" } in your `package.json` file to use Node.js 20.';
|
||||||
await expectBuilderError(
|
await expectBuilderError(
|
||||||
getSupportedNodeVersion('8.11.x', false),
|
getSupportedNodeVersion('8.11.x', false),
|
||||||
foundMessage
|
foundMessage
|
||||||
@@ -101,8 +101,8 @@ it('should match all semver ranges', async () => {
|
|||||||
// See https://docs.npmjs.com/files/package.json#engines
|
// See https://docs.npmjs.com/files/package.json#engines
|
||||||
expect(await getSupportedNodeVersion('16.0.0')).toHaveProperty('major', 16);
|
expect(await getSupportedNodeVersion('16.0.0')).toHaveProperty('major', 16);
|
||||||
expect(await getSupportedNodeVersion('16.x')).toHaveProperty('major', 16);
|
expect(await getSupportedNodeVersion('16.x')).toHaveProperty('major', 16);
|
||||||
expect(await getSupportedNodeVersion('>=10')).toHaveProperty('major', 18);
|
expect(await getSupportedNodeVersion('>=10')).toHaveProperty('major', 20);
|
||||||
expect(await getSupportedNodeVersion('>=10.3.0')).toHaveProperty('major', 18);
|
expect(await getSupportedNodeVersion('>=10.3.0')).toHaveProperty('major', 20);
|
||||||
expect(await getSupportedNodeVersion('16.5.0 - 16.9.0')).toHaveProperty(
|
expect(await getSupportedNodeVersion('16.5.0 - 16.9.0')).toHaveProperty(
|
||||||
'major',
|
'major',
|
||||||
16
|
16
|
||||||
@@ -120,11 +120,33 @@ it('should match all semver ranges', async () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should allow nodejs18.x', async () => {
|
it('should allow nodejs18.x', async () => {
|
||||||
expect(getLatestNodeVersion()).toHaveProperty('major', 18);
|
|
||||||
expect(await getSupportedNodeVersion('18.x')).toHaveProperty('major', 18);
|
expect(await getSupportedNodeVersion('18.x')).toHaveProperty('major', 18);
|
||||||
expect(await getSupportedNodeVersion('18')).toHaveProperty('major', 18);
|
expect(await getSupportedNodeVersion('18')).toHaveProperty('major', 18);
|
||||||
expect(await getSupportedNodeVersion('18.1.0')).toHaveProperty('major', 18);
|
expect(await getSupportedNodeVersion('18.1.0')).toHaveProperty('major', 18);
|
||||||
expect(await getSupportedNodeVersion('>=16')).toHaveProperty('major', 18);
|
});
|
||||||
|
|
||||||
|
it('should allow nodejs20.x', async () => {
|
||||||
|
expect(getLatestNodeVersion()).toHaveProperty('major', 20);
|
||||||
|
expect(await getSupportedNodeVersion('20.x')).toHaveProperty('major', 20);
|
||||||
|
expect(await getSupportedNodeVersion('20')).toHaveProperty('major', 20);
|
||||||
|
expect(await getSupportedNodeVersion('20.1.0')).toHaveProperty('major', 20);
|
||||||
|
expect(await getSupportedNodeVersion('>=18')).toHaveProperty('major', 20);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should not allow nodejs20.x when not available', async () => {
|
||||||
|
// Simulates AL2 build-container
|
||||||
|
await expect(
|
||||||
|
getSupportedNodeVersion('20.x', true, [14, 16, 18])
|
||||||
|
).rejects.toThrow(
|
||||||
|
'Found invalid Node.js Version: "20.x". Please set Node.js Version to 18.x in your Project Settings to use Node.js 18.'
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should not allow nodejs18.x when not available', async () => {
|
||||||
|
// Simulates AL2023 build-container
|
||||||
|
await expect(getSupportedNodeVersion('18.x', true, [20])).rejects.toThrow(
|
||||||
|
'Found invalid Node.js Version: "18.x". Please set Node.js Version to 20.x in your Project Settings to use Node.js 20.'
|
||||||
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should ignore node version in vercel dev getNodeVersion()', async () => {
|
it('should ignore node version in vercel dev getNodeVersion()', async () => {
|
||||||
@@ -193,7 +215,7 @@ it('should warn when package.json engines is greater than', async () => {
|
|||||||
{},
|
{},
|
||||||
{}
|
{}
|
||||||
)
|
)
|
||||||
).toHaveProperty('range', '18.x');
|
).toHaveProperty('range', '20.x');
|
||||||
expect(warningMessages).toStrictEqual([
|
expect(warningMessages).toStrictEqual([
|
||||||
'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',
|
'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',
|
||||||
]);
|
]);
|
||||||
@@ -232,13 +254,24 @@ it('should not warn when package.json engines matches project setting from confi
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should get latest node version', async () => {
|
it('should get latest node version', async () => {
|
||||||
expect(getLatestNodeVersion()).toHaveProperty('major', 18);
|
expect(getLatestNodeVersion()).toHaveProperty('major', 20);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should get latest node version with Node 18.x in build-container', async () => {
|
||||||
|
// Simulates AL2 build-container
|
||||||
|
expect(getLatestNodeVersion([14, 16, 18])).toHaveProperty('major', 18);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should get latest node version with Node 20.x in build-container', async () => {
|
||||||
|
// Simulates AL2023 build-container
|
||||||
|
expect(getLatestNodeVersion([20])).toHaveProperty('major', 20);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should throw for discontinued versions', async () => {
|
it('should throw for discontinued versions', async () => {
|
||||||
// Mock a future date so that Node 8 and 10 become discontinued
|
// Mock a future date so that Node 16 becomes discontinued
|
||||||
const realDateNow = Date.now.bind(global.Date);
|
const realDateNow = Date.now;
|
||||||
global.Date.now = () => new Date('2024-02-13').getTime();
|
try {
|
||||||
|
global.Date.now = () => new Date('2024-07-16').getTime();
|
||||||
|
|
||||||
expect(getSupportedNodeVersion('8.10.x', false)).rejects.toThrow();
|
expect(getSupportedNodeVersion('8.10.x', false)).rejects.toThrow();
|
||||||
expect(getSupportedNodeVersion('8.10.x', true)).rejects.toThrow();
|
expect(getSupportedNodeVersion('8.10.x', true)).rejects.toThrow();
|
||||||
@@ -258,13 +291,15 @@ it('should throw for discontinued versions', async () => {
|
|||||||
expect(discontinued[2]).toHaveProperty('range', '12.x');
|
expect(discontinued[2]).toHaveProperty('range', '12.x');
|
||||||
expect(discontinued[3]).toHaveProperty('range', '10.x');
|
expect(discontinued[3]).toHaveProperty('range', '10.x');
|
||||||
expect(discontinued[4]).toHaveProperty('range', '8.10.x');
|
expect(discontinued[4]).toHaveProperty('range', '8.10.x');
|
||||||
|
} finally {
|
||||||
global.Date.now = realDateNow;
|
global.Date.now = realDateNow;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should warn for deprecated versions, soon to be discontinued', async () => {
|
it('should warn for deprecated versions, soon to be discontinued', async () => {
|
||||||
// Mock a future date so that Node 10 warns
|
// Mock a future date so that Node 16 warns
|
||||||
const realDateNow = Date.now.bind(global.Date);
|
const realDateNow = Date.now;
|
||||||
|
try {
|
||||||
global.Date.now = () => new Date('2021-02-23').getTime();
|
global.Date.now = () => new Date('2021-02-23').getTime();
|
||||||
|
|
||||||
expect(await getSupportedNodeVersion('10.x', false)).toHaveProperty(
|
expect(await getSupportedNodeVersion('10.x', false)).toHaveProperty(
|
||||||
@@ -300,17 +335,18 @@ it('should warn for deprecated versions, soon to be discontinued', async () => {
|
|||||||
16
|
16
|
||||||
);
|
);
|
||||||
expect(warningMessages).toStrictEqual([
|
expect(warningMessages).toStrictEqual([
|
||||||
'Error: Node.js version 10.x has reached End-of-Life. Deployments created on or after 2021-04-20 will fail to build. Please set "engines": { "node": "18.x" } in your `package.json` file to use Node.js 18.',
|
'Error: Node.js version 10.x has reached End-of-Life. Deployments created on or after 2021-04-20 will fail to build. Please set "engines": { "node": "20.x" } in your `package.json` file to use Node.js 20.',
|
||||||
'Error: Node.js version 10.x has reached End-of-Life. Deployments created on or after 2021-04-20 will fail to build. Please set Node.js Version to 18.x in your Project Settings to use Node.js 18.',
|
'Error: Node.js version 10.x has reached End-of-Life. Deployments created on or after 2021-04-20 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 12.x has reached End-of-Life. Deployments created on or after 2022-10-03 will fail to build. Please set "engines": { "node": "18.x" } in your `package.json` file to use Node.js 18.',
|
'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 "engines": { "node": "20.x" } in your `package.json` file to use Node.js 20.',
|
||||||
'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 18.x in your Project Settings to use Node.js 18.',
|
'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": "18.x" } in your `package.json` file to use Node.js 18.',
|
'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 18.x in your Project Settings to use Node.js 18.',
|
'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-02-06 will fail to build. Please set "engines": { "node": "18.x" } in your `package.json` file to use Node.js 18.',
|
'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-02-06 will fail to build. Please set Node.js Version to 18.x in your Project Settings to use Node.js 18.',
|
'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.',
|
||||||
]);
|
]);
|
||||||
|
} finally {
|
||||||
global.Date.now = realDateNow;
|
global.Date.now = realDateNow;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should support initialHeaders and initialStatus correctly', async () => {
|
it('should support initialHeaders and initialStatus correctly', async () => {
|
||||||
|
|||||||
@@ -1,5 +1,207 @@
|
|||||||
# vercel
|
# vercel
|
||||||
|
|
||||||
|
## 33.3.0
|
||||||
|
|
||||||
|
### Minor Changes
|
||||||
|
|
||||||
|
- Emit "filePathMap" in `vc-config.json` for `FileFsRef` instances ([#11060](https://github.com/vercel/vercel/pull/11060))
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Update `vc dev` to support `Lambda` instances without `zipBuffer` ([#11080](https://github.com/vercel/vercel/pull/11080))
|
||||||
|
|
||||||
|
- Updated dependencies [[`322c88536`](https://github.com/vercel/vercel/commit/322c88536dfa0ba3892eb580858ee54f6b04ed3f), [`62ca2efa7`](https://github.com/vercel/vercel/commit/62ca2efa731c4df46d586b94078b2dcb1c0bb934)]:
|
||||||
|
- @vercel/ruby@2.0.5
|
||||||
|
- @vercel/python@4.1.1
|
||||||
|
|
||||||
|
## 33.2.0
|
||||||
|
|
||||||
|
### Minor Changes
|
||||||
|
|
||||||
|
- chore: deprecate next/nuxt/gastby Speed Insights injection in favor of @vercel/speed-insights ([#11048](https://github.com/vercel/vercel/pull/11048))
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- fix error when @vercel/analytics is a transitive dependency of the deployed application ([#10892](https://github.com/vercel/vercel/pull/10892))
|
||||||
|
|
||||||
|
- [cli] Add documentation string for `skip-domain` option ([#11051](https://github.com/vercel/vercel/pull/11051))
|
||||||
|
|
||||||
|
- Updated dependencies [[`260125784`](https://github.com/vercel/vercel/commit/2601257846fa201fc9efde021a906c706f6191aa), [`cdddb33ad`](https://github.com/vercel/vercel/commit/cdddb33ad49f6080c49f4fff3767e6111acd0bbe), [`72d8604c9`](https://github.com/vercel/vercel/commit/72d8604c9dba108ccca41d6288b765a7ba727295), [`90d0455e1`](https://github.com/vercel/vercel/commit/90d0455e1ff7b5892ff4960226535f57f704ef6f), [`0716130e5`](https://github.com/vercel/vercel/commit/0716130e580a920d92d249d029ed37f92f2ca847), [`b6b151f39`](https://github.com/vercel/vercel/commit/b6b151f3917c5cb47226951446b9dbb96c7d872b), [`b185a7e20`](https://github.com/vercel/vercel/commit/b185a7e207b153c378bd3db2618eece3a3b6a93e)]:
|
||||||
|
- @vercel/static-build@2.1.0
|
||||||
|
- @vercel/build-utils@7.5.1
|
||||||
|
- @vercel/next@4.1.0
|
||||||
|
- @vercel/remix-builder@2.0.18
|
||||||
|
- @vercel/node@3.0.17
|
||||||
|
|
||||||
|
## 33.1.0
|
||||||
|
|
||||||
|
### Minor Changes
|
||||||
|
|
||||||
|
- Serialize duplicate `EdgeFunction` references as symlinks in `vc build` ([#11027](https://github.com/vercel/vercel/pull/11027))
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Handle rate limit response when fetching /teams ([#11013](https://github.com/vercel/vercel/pull/11013))
|
||||||
|
|
||||||
|
- Display actual deployment's 'target' ([#11025](https://github.com/vercel/vercel/pull/11025))
|
||||||
|
|
||||||
|
- Updated dependencies [[`98040ec24`](https://github.com/vercel/vercel/commit/98040ec24e1ee585865d11eb216b6525d39d209e)]:
|
||||||
|
- @vercel/build-utils@7.5.0
|
||||||
|
- @vercel/static-build@2.0.17
|
||||||
|
- @vercel/hydrogen@1.0.2
|
||||||
|
- @vercel/remix-builder@2.0.17
|
||||||
|
- @vercel/node@3.0.16
|
||||||
|
|
||||||
|
## 33.0.2
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Log extension execution failures ([#10937](https://github.com/vercel/vercel/pull/10937))
|
||||||
|
|
||||||
|
- Updated dependencies [[`fbe08fe57`](https://github.com/vercel/vercel/commit/fbe08fe57eededc0bcd2409692b23d185c70069d), [`77585013d`](https://github.com/vercel/vercel/commit/77585013dec5fc406b8b7ea00918e49fdb8f10ec), [`c536a74bc`](https://github.com/vercel/vercel/commit/c536a74bc9e7188a87b292615fa88d6fc506b105), [`91f8763ed`](https://github.com/vercel/vercel/commit/91f8763edce672a3c05b6096db6084f1e6741384), [`7f8f5f865`](https://github.com/vercel/vercel/commit/7f8f5f86516934acb0c4b936ea601433c8d30c5c)]:
|
||||||
|
- @vercel/next@4.0.17
|
||||||
|
- @vercel/go@3.0.5
|
||||||
|
- @vercel/node@3.0.15
|
||||||
|
- @vercel/redwood@2.0.6
|
||||||
|
- @vercel/remix-builder@2.0.16
|
||||||
|
|
||||||
|
## 33.0.1
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [[`67fa2f3dd`](https://github.com/vercel/vercel/commit/67fa2f3dd6a6d5a3504b7f9081e56deff7b36eab), [`7b0adf371`](https://github.com/vercel/vercel/commit/7b0adf371bae64d33ed0a1b966fc50b1f7c9639b)]:
|
||||||
|
- @vercel/build-utils@7.4.1
|
||||||
|
- @vercel/next@4.0.16
|
||||||
|
- @vercel/static-build@2.0.16
|
||||||
|
- @vercel/node@3.0.14
|
||||||
|
|
||||||
|
## 33.0.0
|
||||||
|
|
||||||
|
### Major Changes
|
||||||
|
|
||||||
|
- [cli] replace `--deprecated` with `--update-required` in `vc project ls` ([#10965](https://github.com/vercel/vercel/pull/10965))
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Fix `vercel bisect` selecting too many deployments ([#10956](https://github.com/vercel/vercel/pull/10956))
|
||||||
|
|
||||||
|
- Updated dependencies [[`6a9002f22`](https://github.com/vercel/vercel/commit/6a9002f2296c5ccce4522c0fa9a8938c3d7a4849), [`4d63d9e95`](https://github.com/vercel/vercel/commit/4d63d9e954549d811063d259250d1865b7de2ba1)]:
|
||||||
|
- @vercel/remix-builder@2.0.15
|
||||||
|
- @vercel/build-utils@7.4.0
|
||||||
|
- @vercel/static-build@2.0.15
|
||||||
|
- @vercel/node@3.0.13
|
||||||
|
|
||||||
|
## 32.7.2
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- [cli] Use new `deprecated` query param in projects api for `vc project ls --deprecated` ([#10938](https://github.com/vercel/vercel/pull/10938))
|
||||||
|
|
||||||
|
## 32.7.1
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- [cli] double page limit for vc project ls --deprecated ([#10932](https://github.com/vercel/vercel/pull/10932))
|
||||||
|
|
||||||
|
- Updated dependencies [[`d09dd1794`](https://github.com/vercel/vercel/commit/d09dd1794b5ffa28c15d3ad2880b90db2f4c06f0)]:
|
||||||
|
- @vercel/remix-builder@2.0.14
|
||||||
|
|
||||||
|
## 32.7.0
|
||||||
|
|
||||||
|
### Minor Changes
|
||||||
|
|
||||||
|
- [cli] add `--deprecated` option to `vc project ls` command ([#10919](https://github.com/vercel/vercel/pull/10919))
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Remove some debug statements and make log into warning ([#10926](https://github.com/vercel/vercel/pull/10926))
|
||||||
|
|
||||||
|
- Updated dependencies [[`3cede43ca`](https://github.com/vercel/vercel/commit/3cede43ca7ea3aec3ff33864b7d33da57891ddb2), [`dfe47f6e6`](https://github.com/vercel/vercel/commit/dfe47f6e6c1d395ae24d802f4b7c98e39b9f90f4), [`1dbb22bb6`](https://github.com/vercel/vercel/commit/1dbb22bb6d33657faa78376f527fe350188c5257), [`204c3592c`](https://github.com/vercel/vercel/commit/204c3592c78fc544e62f0210b0e7e1e4cd382a0c)]:
|
||||||
|
- @vercel/ruby@2.0.4
|
||||||
|
- @vercel/build-utils@7.3.0
|
||||||
|
- @vercel/remix-builder@2.0.13
|
||||||
|
- @vercel/node@3.0.12
|
||||||
|
- @vercel/static-build@2.0.14
|
||||||
|
|
||||||
|
## 32.6.1
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Revert "forbids globally installed @vercel/speed-insights and @vercel/analytics (#10848)" ([#10895](https://github.com/vercel/vercel/pull/10895))
|
||||||
|
|
||||||
|
## 32.6.0
|
||||||
|
|
||||||
|
### Minor Changes
|
||||||
|
|
||||||
|
- forbids globally installed @vercel/speed-insights and @vercel/analytics ([#10848](https://github.com/vercel/vercel/pull/10848))
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- [cli] Fix behavior for combination of northstar user + team scope provided to cli as an argument. ([#10884](https://github.com/vercel/vercel/pull/10884))
|
||||||
|
|
||||||
|
- Updated dependencies [[`4edfcd74b`](https://github.com/vercel/vercel/commit/4edfcd74b6dfd8e9cbc05a71d47578051a2a7d63), [`0e9bb30fd`](https://github.com/vercel/vercel/commit/0e9bb30fd285492beadc365bece2ab1df67b387b), [`ca2cbf06f`](https://github.com/vercel/vercel/commit/ca2cbf06fbf252e23aff6e007d0df5ffc243b56e), [`c52bdf775`](https://github.com/vercel/vercel/commit/c52bdf77585dfa41b25cabe2f9403827d0964169)]:
|
||||||
|
- @vercel/remix-builder@2.0.12
|
||||||
|
- @vercel/static-build@2.0.13
|
||||||
|
- @vercel/go@3.0.4
|
||||||
|
|
||||||
|
## 32.5.6
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [[`ffd2f34c6`](https://github.com/vercel/vercel/commit/ffd2f34c6c3d53bbb673aa3241845abc50e67c5e), [`4636ae54c`](https://github.com/vercel/vercel/commit/4636ae54c6c17709c1a058169cdca19c3df73ddb)]:
|
||||||
|
- @vercel/next@4.0.15
|
||||||
|
- @vercel/ruby@2.0.3
|
||||||
|
|
||||||
|
## 32.5.5
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [[`88da7463c`](https://github.com/vercel/vercel/commit/88da7463ce12df91d49fbde85cb617030d55f558)]:
|
||||||
|
- @vercel/build-utils@7.2.5
|
||||||
|
- @vercel/node@3.0.11
|
||||||
|
- @vercel/static-build@2.0.12
|
||||||
|
|
||||||
|
## 32.5.4
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [[`65dec5b7e`](https://github.com/vercel/vercel/commit/65dec5b7e752f4da8fe0ffdb25215170453f6f8b)]:
|
||||||
|
- @vercel/build-utils@7.2.4
|
||||||
|
- @vercel/node@3.0.10
|
||||||
|
- @vercel/static-build@2.0.11
|
||||||
|
|
||||||
|
## 32.5.3
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Handle `TooManyProjects` error in places where projects are created ([#10807](https://github.com/vercel/vercel/pull/10807))
|
||||||
|
|
||||||
|
- Updated dependencies [[`89c1e0323`](https://github.com/vercel/vercel/commit/89c1e032335d9ec0fcfc84fe499cf004fe73fafc), [`fd29b966d`](https://github.com/vercel/vercel/commit/fd29b966d39776318b0e11a53909edb43d1fc5f2)]:
|
||||||
|
- @vercel/node@3.0.9
|
||||||
|
- @vercel/next@4.0.14
|
||||||
|
|
||||||
|
## 32.5.2
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [[`c94a082f6`](https://github.com/vercel/vercel/commit/c94a082f6bb1b84eaf420ac47ea83640dc83668e)]:
|
||||||
|
- @vercel/next@4.0.13
|
||||||
|
|
||||||
|
## 32.5.1
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Debug log load user exceptions ([#10773](https://github.com/vercel/vercel/pull/10773))
|
||||||
|
|
||||||
|
- bump: edge-runtime ([#10712](https://github.com/vercel/vercel/pull/10712))
|
||||||
|
|
||||||
|
- Updated dependencies [[`fc90a3dc0`](https://github.com/vercel/vercel/commit/fc90a3dc0bd998453f6527c03d211c35bb0d5770), [`644b8a52c`](https://github.com/vercel/vercel/commit/644b8a52cb2cc8f05e215e2230f95f902cdf8ae8), [`0861dc8fb`](https://github.com/vercel/vercel/commit/0861dc8fbcea1037626b00664a4b6c22f1b0a7ed), [`33cc8e0ac`](https://github.com/vercel/vercel/commit/33cc8e0acf1b3466d50d45b2e5bbe66b89a87c14), [`f5296c3c0`](https://github.com/vercel/vercel/commit/f5296c3c06e620a39c5f88287ac94e58703bdaac), [`d9065c210`](https://github.com/vercel/vercel/commit/d9065c2102223e9cdb5b22df14db41c363cf7828)]:
|
||||||
|
- @vercel/next@4.0.12
|
||||||
|
- @vercel/node@3.0.8
|
||||||
|
- @vercel/build-utils@7.2.3
|
||||||
|
- @vercel/remix-builder@2.0.11
|
||||||
|
- @vercel/static-build@2.0.10
|
||||||
|
|
||||||
## 32.5.0
|
## 32.5.0
|
||||||
|
|
||||||
### Minor Changes
|
### Minor Changes
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user