Compare commits

..

8 Commits

Author SHA1 Message Date
Jeff See
6b69dda862 WIP - adding vitest to the CLI 2024-03-13 16:24:05 -07:00
Vercel Release Bot
c3251e3775 Version Packages (#11248)
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## @vercel/build-utils@7.8.0

### Minor Changes

- Remove `VERCEL_ENABLE_NPM_DEFAULT` env var check
([#11242](https://github.com/vercel/vercel/pull/11242))

### Patch Changes

- Rename variants to flags and remove legacy flags
([#11121](https://github.com/vercel/vercel/pull/11121))

## vercel@33.5.5

### Patch Changes

- Rename variants to flags and remove legacy flags
([#11121](https://github.com/vercel/vercel/pull/11121))

- fix vc with root dir issues
([#11243](https://github.com/vercel/vercel/pull/11243))

- Updated dependencies
\[[`908e7837d`](908e7837d5),
[`5e3656ec1`](5e3656ec1b),
[`a53d1b0d3`](a53d1b0d38)]:
    -   @vercel/build-utils@7.8.0
    -   @vercel/next@4.1.5
    -   @vercel/remix-builder@2.1.2
    -   @vercel/node@3.0.22
    -   @vercel/static-build@2.4.2

## @vercel/client@13.1.5

### Patch Changes

- Updated dependencies
\[[`908e7837d`](908e7837d5),
[`5e3656ec1`](5e3656ec1b)]:
    -   @vercel/build-utils@7.8.0

## @vercel/gatsby-plugin-vercel-builder@2.0.20

### Patch Changes

- Updated dependencies
\[[`908e7837d`](908e7837d5),
[`5e3656ec1`](5e3656ec1b)]:
    -   @vercel/build-utils@7.8.0

## @vercel/next@4.1.5

### Patch Changes

- Rename variants to flags and remove legacy flags
([#11121](https://github.com/vercel/vercel/pull/11121))

## @vercel/node@3.0.22

### Patch Changes

- Updated dependencies
\[[`908e7837d`](908e7837d5),
[`5e3656ec1`](5e3656ec1b)]:
    -   @vercel/build-utils@7.8.0

## @vercel/remix-builder@2.1.2

### Patch Changes

- Update `@remix-run/dev` fork to v2.8.1
([#11241](https://github.com/vercel/vercel/pull/11241))

## @vercel/static-build@2.4.2

### Patch Changes

-   Updated dependencies \[]:
    -   @vercel/gatsby-plugin-vercel-builder@2.0.20

## @vercel-internals/types@1.0.25

### Patch Changes

- Updated dependencies
\[[`908e7837d`](908e7837d5),
[`5e3656ec1`](5e3656ec1b)]:
    -   @vercel/build-utils@7.8.0

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-08 15:42:44 -06:00
Sean Massa
33202dec1f fix vc with root dir issues (#11243)
There's an issue with `vc link` and `vc deploy` when using a project
root directory. Framework detection fails because it's looking in the
wrong directory.

---

Manually tested and this fixes the issue. A project with a rootDirectory
was previously not detecting a framework, but now it says:

```
Auto-detected Project Settings (Remix):
```

---------

Co-authored-by: Nathan Rajlich <n@n8.io>
2024-03-08 15:21:18 -06:00
Vercel Release Bot
a53d1b0d38 [remix] Update @remix-run/dev to v2.8.1 (#11241)
This auto-generated PR updates `@remix-run/dev` to version 2.8.1.
2024-03-08 20:38:02 +00:00
Nathan Rajlich
5e3656ec1b [build-utils] Remove VERCEL_ENABLE_NPM_DEFAULT env var check (#11242)
Flag has been rolled out for long enough at this point.

npm will now always be used as the package manager when no lockfile is present.
2024-03-08 20:13:30 +00:00
Andy
908e7837d5 [cli][build-utils] Rename variants to flags (#11121)
- Removes all the legacy `flags`
 - Renames the new `variants` to `flags`

Neither the legacy flags, nor the new variants were exposed to anyone, except for the type in build-utils, so there shouldn't be any issues removing/renaming them.
2024-03-08 16:06:23 +00:00
Vercel Release Bot
dfa2f07c45 [examples][tests] Upgrade Next.js to version 14.1.3 (#11237)
This auto-generated PR updates 7 packages to Next.js version 14.1.3

Co-authored-by: Steven <steven@ceriously.com>
2024-03-08 10:51:02 -05:00
Nathan Rajlich
33181274bb [static-build] Remove Build Output API v1 tests (#11247)
Remove these old tests for the legacy BOA version. Specifically,
`66-build-output-directory-with-functions` has become problematic
because the "go1.x" Lambda runtime no longer deploys. I figured we take
the opportunity to remove the others as well though. Will make running
the tests slightly faster.
2024-03-08 10:28:30 -05:00
123 changed files with 1641 additions and 816 deletions

View File

@@ -8,7 +8,7 @@
"name": "nextjs",
"version": "0.1.0",
"dependencies": {
"next": "14.1.2",
"next": "14.1.3",
"react": "^18",
"react-dom": "^18"
},
@@ -18,7 +18,7 @@
"@types/react-dom": "^18",
"autoprefixer": "^10.0.1",
"eslint": "^8",
"eslint-config-next": "14.1.2",
"eslint-config-next": "14.1.3",
"postcss": "^8",
"tailwindcss": "^3.3.0",
"typescript": "^5"
@@ -239,23 +239,23 @@
}
},
"node_modules/@next/env": {
"version": "14.1.2",
"resolved": "https://registry.npmjs.org/@next/env/-/env-14.1.2.tgz",
"integrity": "sha512-U0iEG+JF86j6qyu330sfPgsMmDVH8vWVmzZadl+an5EU3o5HqdNytOpM+HsFpl58PmhGBTKx3UmM9c+eoLK0mA=="
"version": "14.1.3",
"resolved": "https://registry.npmjs.org/@next/env/-/env-14.1.3.tgz",
"integrity": "sha512-VhgXTvrgeBRxNPjyfBsDIMvgsKDxjlpw4IAUsHCX8Gjl1vtHUYRT3+xfQ/wwvLPDd/6kqfLqk9Pt4+7gysuCKQ=="
},
"node_modules/@next/eslint-plugin-next": {
"version": "14.1.2",
"resolved": "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-14.1.2.tgz",
"integrity": "sha512-k9h9NfR1joJI48uwdQd/DuOV1mBgcjlmWaX45eAXCFGT96oc+/6SMjO3s7naVtTXqSKjFAgk2GDlW6Hv41ROXQ==",
"version": "14.1.3",
"resolved": "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-14.1.3.tgz",
"integrity": "sha512-VCnZI2cy77Yaj3L7Uhs3+44ikMM1VD/fBMwvTBb3hIaTIuqa+DmG4dhUDq+MASu3yx97KhgsVJbsas0XuiKyww==",
"dev": true,
"dependencies": {
"glob": "10.3.10"
}
},
"node_modules/@next/swc-darwin-arm64": {
"version": "14.1.2",
"resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.1.2.tgz",
"integrity": "sha512-E4/clgk0ZrYMo9eMRwP/4IO/cvXF1yEYSnGcdGfH+NYTR8bNFy76TSlc1Vb2rK3oaQY4BVHRpx8f/sMN/D5gNw==",
"version": "14.1.3",
"resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.1.3.tgz",
"integrity": "sha512-LALu0yIBPRiG9ANrD5ncB3pjpO0Gli9ZLhxdOu6ZUNf3x1r3ea1rd9Q+4xxUkGrUXLqKVK9/lDkpYIJaCJ6AHQ==",
"cpu": [
"arm64"
],
@@ -268,9 +268,9 @@
}
},
"node_modules/@next/swc-darwin-x64": {
"version": "14.1.2",
"resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-14.1.2.tgz",
"integrity": "sha512-j8mEOI+ZM0tU9B/L/OGa6F7d9FXYMkog5OWWuhTWzz3iZ91UKIGGpD/ojTNKuejainDMgbqOBTNnLg0jZywM/g==",
"version": "14.1.3",
"resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-14.1.3.tgz",
"integrity": "sha512-E/9WQeXxkqw2dfcn5UcjApFgUq73jqNKaE5bysDm58hEUdUGedVrnRhblhJM7HbCZNhtVl0j+6TXsK0PuzXTCg==",
"cpu": [
"x64"
],
@@ -283,9 +283,9 @@
}
},
"node_modules/@next/swc-linux-arm64-gnu": {
"version": "14.1.2",
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.1.2.tgz",
"integrity": "sha512-qpRrd5hl6BFTWiFLgHtJmqqQGRMs+ol0MN9pEp0SYoLs3j8OTErPiDMhbKWjMWHGdc2E3kg4RRBV3cSTZiePiQ==",
"version": "14.1.3",
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.1.3.tgz",
"integrity": "sha512-USArX9B+3rZSXYLFvgy0NVWQgqh6LHWDmMt38O4lmiJNQcwazeI6xRvSsliDLKt+78KChVacNiwvOMbl6g6BBw==",
"cpu": [
"arm64"
],
@@ -298,9 +298,9 @@
}
},
"node_modules/@next/swc-linux-arm64-musl": {
"version": "14.1.2",
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.1.2.tgz",
"integrity": "sha512-HAhvVXAv+wnbj0wztT0YnpgJVoHtw1Mv4Y1R/JJcg5yXSU8FsP2uEGUwjQaqPoD76YSZjuKl32YbJlmPgQbLFw==",
"version": "14.1.3",
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.1.3.tgz",
"integrity": "sha512-esk1RkRBLSIEp1qaQXv1+s6ZdYzuVCnDAZySpa62iFTMGTisCyNQmqyCTL9P+cLJ4N9FKCI3ojtSfsyPHJDQNw==",
"cpu": [
"arm64"
],
@@ -313,9 +313,9 @@
}
},
"node_modules/@next/swc-linux-x64-gnu": {
"version": "14.1.2",
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.1.2.tgz",
"integrity": "sha512-PCWC312woXLWOXiedi1E+fEw6B/ECP1fMiK1nSoGS2E43o56Z8kq4WeJLbJoufFQGVj5ZOKU3jIVyV//3CI4wQ==",
"version": "14.1.3",
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.1.3.tgz",
"integrity": "sha512-8uOgRlYEYiKo0L8YGeS+3TudHVDWDjPVDUcST+z+dUzgBbTEwSSIaSgF/vkcC1T/iwl4QX9iuUyUdQEl0Kxalg==",
"cpu": [
"x64"
],
@@ -328,9 +328,9 @@
}
},
"node_modules/@next/swc-linux-x64-musl": {
"version": "14.1.2",
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.1.2.tgz",
"integrity": "sha512-KQSKzdWPNrYZjeTPCsepEpagOzU8Nf3Zzu53X1cLsSY6QlOIkYcSgEihRjsMKyeQW4aSvc+nN5pIpC2pLWNSMA==",
"version": "14.1.3",
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.1.3.tgz",
"integrity": "sha512-DX2zqz05ziElLoxskgHasaJBREC5Y9TJcbR2LYqu4r7naff25B4iXkfXWfcp69uD75/0URmmoSgT8JclJtrBoQ==",
"cpu": [
"x64"
],
@@ -343,9 +343,9 @@
}
},
"node_modules/@next/swc-win32-arm64-msvc": {
"version": "14.1.2",
"resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.1.2.tgz",
"integrity": "sha512-3b0PouKd09Ulm2T1tjaRnwQj9+UwSsMO680d/sD4XAlm29KkNmVLAEIwWTfb3L+E11Qyw+jdcN3HtbDCg5+vYA==",
"version": "14.1.3",
"resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.1.3.tgz",
"integrity": "sha512-HjssFsCdsD4GHstXSQxsi2l70F/5FsRTRQp8xNgmQs15SxUfUJRvSI9qKny/jLkY3gLgiCR3+6A7wzzK0DBlfA==",
"cpu": [
"arm64"
],
@@ -358,9 +358,9 @@
}
},
"node_modules/@next/swc-win32-ia32-msvc": {
"version": "14.1.2",
"resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.1.2.tgz",
"integrity": "sha512-CC1gaJY4h+wg6d5r2biggGM6nCFXh/6WEim2VOQI0WrA6easCQi2P2hzWyrU6moQ0g1GOiWzesGc6nn0a92Kgg==",
"version": "14.1.3",
"resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.1.3.tgz",
"integrity": "sha512-DRuxD5axfDM1/Ue4VahwSxl1O5rn61hX8/sF0HY8y0iCbpqdxw3rB3QasdHn/LJ6Wb2y5DoWzXcz3L1Cr+Thrw==",
"cpu": [
"ia32"
],
@@ -373,9 +373,9 @@
}
},
"node_modules/@next/swc-win32-x64-msvc": {
"version": "14.1.2",
"resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.1.2.tgz",
"integrity": "sha512-pfASwanOd+yP3D80O63DuQffrBySZPuB7wRN0IGSRq/0rDm9p/MvvnLzzgP2kSiLOUklOrFYVax7P6AEzjGykQ==",
"version": "14.1.3",
"resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.1.3.tgz",
"integrity": "sha512-uC2DaDoWH7h1P/aJ4Fok3Xiw6P0Lo4ez7NbowW2VGNXw/Xv6tOuLUcxhBYZxsSUJtpeknCi8/fvnSpyCFp4Rcg==",
"cpu": [
"x64"
],
@@ -453,9 +453,9 @@
"dev": true
},
"node_modules/@types/node": {
"version": "20.11.24",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.24.tgz",
"integrity": "sha512-Kza43ewS3xoLgCEpQrsT+xRo/EJej1y0kVYGiLFE1NEODXGzTfwiC6tXTLMQskn1X4/Rjlh0MQUvx9W+L9long==",
"version": "20.11.25",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.25.tgz",
"integrity": "sha512-TBHyJxk2b7HceLVGFcpAUjsa5zIdsPWlR6XHfyGzd0SFu+/NFgQgMAl96MSDZgQDvJAvV6BKsFOrt6zIL09JDw==",
"dev": true,
"dependencies": {
"undici-types": "~5.26.4"
@@ -468,9 +468,9 @@
"dev": true
},
"node_modules/@types/react": {
"version": "18.2.62",
"resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.62.tgz",
"integrity": "sha512-l3f57BbaEKP0xcFzf+5qRG8/PXykZiuVM6eEoPtqBPCp6dxO3HhDkLIgIyXPhPKNAeXn3KO2pEaNgzaEo/asaw==",
"version": "18.2.64",
"resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.64.tgz",
"integrity": "sha512-MlmPvHgjj2p3vZaxbQgFUQFvD8QiZwACfGqEdDSWou5yISWxDQ4/74nCAwsUiX7UFLKZz3BbVSPj+YxeoGGCfg==",
"dev": true,
"dependencies": {
"@types/prop-types": "*",
@@ -479,9 +479,9 @@
}
},
"node_modules/@types/react-dom": {
"version": "18.2.19",
"resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.19.tgz",
"integrity": "sha512-aZvQL6uUbIJpjZk4U8JZGbau9KDeAwMfmhyWorxgBkqDIEf6ROjRozcmPIicqsUwPUjbkDfHKgGee1Lq65APcA==",
"version": "18.2.21",
"resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.21.tgz",
"integrity": "sha512-gnvBA/21SA4xxqNXEwNiVcP0xSGHh/gi1VhWv9Bl46a0ItbTT5nFY+G9VSQpaG/8N/qdJpJ+vftQ4zflTtnjLw==",
"dev": true,
"dependencies": {
"@types/react": "*"
@@ -1114,9 +1114,9 @@
}
},
"node_modules/caniuse-lite": {
"version": "1.0.30001593",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001593.tgz",
"integrity": "sha512-UWM1zlo3cZfkpBysd7AS+z+v007q9G1+fLTUU42rQnY6t2axoogPW/xol6T7juU5EUoOhML4WgBIdG+9yYqAjQ==",
"version": "1.0.30001594",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001594.tgz",
"integrity": "sha512-VblSX6nYqyJVs8DKFMldE2IVCJjZ225LW00ydtUWwh5hk9IfkTOffO6r8gJNsH0qqqeAF8KrbMYA2VEwTlGW5g==",
"funding": [
{
"type": "opencollective",
@@ -1369,9 +1369,9 @@
"dev": true
},
"node_modules/electron-to-chromium": {
"version": "1.4.692",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.692.tgz",
"integrity": "sha512-d5rZRka9n2Y3MkWRN74IoAsxR0HK3yaAt7T50e3iT9VZmCCQDT3geXUO5ZRMhDToa1pkCeQXuNo+0g+NfDOVPA==",
"version": "1.4.694",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.694.tgz",
"integrity": "sha512-kM3SwvGTYpBFJSc8jm4IYVMIOzDmAGd/Ry96O9elRiM6iEwHKNKhtXyFGzpfMMIGZD84W4/hyaULlMmNVvLQlQ==",
"dev": true
},
"node_modules/emoji-regex": {
@@ -1618,12 +1618,12 @@
}
},
"node_modules/eslint-config-next": {
"version": "14.1.2",
"resolved": "https://registry.npmjs.org/eslint-config-next/-/eslint-config-next-14.1.2.tgz",
"integrity": "sha512-g46mlgWmHoWhHuDbaQS8PLNQtBkVkiQMnVLhFcqnPSXN2I+R4Obom3ihCIQuNLbjVUgiFFHqmEwwtDuWv1wYKA==",
"version": "14.1.3",
"resolved": "https://registry.npmjs.org/eslint-config-next/-/eslint-config-next-14.1.3.tgz",
"integrity": "sha512-sUCpWlGuHpEhI0pIT0UtdSLJk5Z8E2DYinPTwsBiWaSYQomchdl0i60pjynY48+oXvtyWMQ7oE+G3m49yrfacg==",
"dev": true,
"dependencies": {
"@next/eslint-plugin-next": "14.1.2",
"@next/eslint-plugin-next": "14.1.3",
"@rushstack/eslint-patch": "^1.3.3",
"@typescript-eslint/parser": "^5.4.2 || ^6.0.0",
"eslint-import-resolver-node": "^0.3.6",
@@ -3150,11 +3150,11 @@
"dev": true
},
"node_modules/next": {
"version": "14.1.2",
"resolved": "https://registry.npmjs.org/next/-/next-14.1.2.tgz",
"integrity": "sha512-p4RfNmopqkzRP1uUyBJnHii+qMg71f2udWhTTZopBB8b3T5QXNzn7yO+LCYHPWZG2kAvEn4l4neyJHqkXvo2wg==",
"version": "14.1.3",
"resolved": "https://registry.npmjs.org/next/-/next-14.1.3.tgz",
"integrity": "sha512-oexgMV2MapI0UIWiXKkixF8J8ORxpy64OuJ/J9oVUmIthXOUCcuVEZX+dtpgq7wIfIqtBwQsKEDXejcjTsan9g==",
"dependencies": {
"@next/env": "14.1.2",
"@next/env": "14.1.3",
"@swc/helpers": "0.5.2",
"busboy": "1.6.0",
"caniuse-lite": "^1.0.30001579",
@@ -3169,15 +3169,15 @@
"node": ">=18.17.0"
},
"optionalDependencies": {
"@next/swc-darwin-arm64": "14.1.2",
"@next/swc-darwin-x64": "14.1.2",
"@next/swc-linux-arm64-gnu": "14.1.2",
"@next/swc-linux-arm64-musl": "14.1.2",
"@next/swc-linux-x64-gnu": "14.1.2",
"@next/swc-linux-x64-musl": "14.1.2",
"@next/swc-win32-arm64-msvc": "14.1.2",
"@next/swc-win32-ia32-msvc": "14.1.2",
"@next/swc-win32-x64-msvc": "14.1.2"
"@next/swc-darwin-arm64": "14.1.3",
"@next/swc-darwin-x64": "14.1.3",
"@next/swc-linux-arm64-gnu": "14.1.3",
"@next/swc-linux-arm64-musl": "14.1.3",
"@next/swc-linux-x64-gnu": "14.1.3",
"@next/swc-linux-x64-musl": "14.1.3",
"@next/swc-win32-arm64-msvc": "14.1.3",
"@next/swc-win32-ia32-msvc": "14.1.3",
"@next/swc-win32-x64-msvc": "14.1.3"
},
"peerDependencies": {
"@opentelemetry/api": "^1.1.0",
@@ -4579,9 +4579,9 @@
}
},
"node_modules/typescript": {
"version": "5.3.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz",
"integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==",
"version": "5.4.2",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.2.tgz",
"integrity": "sha512-+2/g0Fds1ERlP6JsakQQDXjZdZMM+rqpamFZJEKh4kwTIn3iDkgKtby0CeNd5ATNZ4Ry1ax15TMx0W2V+miizQ==",
"dev": true,
"bin": {
"tsc": "bin/tsc",
@@ -4855,9 +4855,9 @@
"dev": true
},
"node_modules/yaml": {
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.4.0.tgz",
"integrity": "sha512-j9iR8g+/t0lArF4V6NE/QCfT+CO7iLqrXAHZbJdo+LfjqP1vR8Fg5bSiaq6Q2lOD1AUEVrEVIgABvBFYojJVYQ==",
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.4.1.tgz",
"integrity": "sha512-pIXzoImaqmfOrL7teGUBt/T7ZDnyeGBWyXQBvOVhLkWLN37GXv8NMLK406UY6dS51JfcQHsmcW5cJ441bHg6Lg==",
"dev": true,
"bin": {
"yaml": "bin.mjs"

View File

@@ -11,7 +11,7 @@
"dependencies": {
"react": "^18",
"react-dom": "^18",
"next": "14.1.2"
"next": "14.1.3"
},
"devDependencies": {
"typescript": "^5",
@@ -22,6 +22,6 @@
"postcss": "^8",
"tailwindcss": "^3.3.0",
"eslint": "^8",
"eslint-config-next": "14.1.2"
"eslint-config-next": "14.1.3"
}
}

View File

@@ -1,5 +1,12 @@
# @vercel-internals/types
## 1.0.25
### Patch Changes
- Updated dependencies [[`908e7837d`](https://github.com/vercel/vercel/commit/908e7837d55bc02e708f402c700e00208415e954), [`5e3656ec1`](https://github.com/vercel/vercel/commit/5e3656ec1b3f0561091636582715ba09ddd8cb2d)]:
- @vercel/build-utils@7.8.0
## 1.0.24
### Patch Changes

View File

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

View File

@@ -1,5 +1,15 @@
# @vercel/build-utils
## 7.8.0
### Minor Changes
- Remove `VERCEL_ENABLE_NPM_DEFAULT` env var check ([#11242](https://github.com/vercel/vercel/pull/11242))
### Patch Changes
- Rename variants to flags and remove legacy flags ([#11121](https://github.com/vercel/vercel/pull/11121))
## 7.7.1
### Patch Changes

View File

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

View File

@@ -339,11 +339,7 @@ export async function scanParentDirs(
// TODO: read "bun-lockfile-format-v0"
lockfileVersion = 0;
} else {
if (process.env.VERCEL_ENABLE_NPM_DEFAULT === '1') {
cliType = 'npm';
} else {
cliType = 'yarn';
}
cliType = 'npm';
}
const packageJsonPath = pkgJsonPath || undefined;

View File

@@ -440,15 +440,6 @@ export interface Cron {
schedule: string;
}
/**
* @deprecated Replaced by Variants. Remove once fully replaced.
*/
export interface Flag {
key: string;
defaultValue?: unknown;
metadata: Record<string, unknown>;
}
/** The framework which created the function */
export interface FunctionFramework {
slug: string;
@@ -473,9 +464,7 @@ export interface BuildResultV2Typical {
framework?: {
version: string;
};
/** @deprecated Replaced by Variants. Remove once fully replaced. */
flags?: Flag[];
variants?: Record<string, VariantDefinition>;
flags?: { definitions: FlagDefinitions };
}
export type BuildResultV2 = BuildResultV2Typical | BuildResultBuildOutput;
@@ -500,23 +489,25 @@ export type StartDevServer = (
* TODO: The following types will eventually be exported by a more
* relevant package.
*/
type VariantJSONArray = ReadonlyArray<VariantJSONValue>;
type FlagJSONArray = ReadonlyArray<FlagJSONValue>;
type VariantJSONValue =
type FlagJSONValue =
| string
| boolean
| number
| null
| VariantJSONArray
| { [key: string]: VariantJSONValue };
| FlagJSONArray
| { [key: string]: FlagJSONValue };
type VariantOption = {
value: VariantJSONValue;
type FlagOption = {
value: FlagJSONValue;
label?: string;
};
export interface VariantDefinition {
options?: VariantOption[];
export interface FlagDefinition {
options?: FlagOption[];
origin?: string;
description?: string;
}
export type FlagDefinitions = Record<string, FlagDefinition>;

View File

@@ -1,7 +0,0 @@
{
"build": {
"env": {
"VERCEL_ENABLE_NPM_DEFAULT": "1"
}
}
}

View File

@@ -576,7 +576,7 @@ it(
ms('1m')
);
it('should return cliType npm when no lockfile is present and VERCEL_ENABLE_NPM_DEFAULT is set', async () => {
it('should return cliType "npm" when no lockfile is present', async () => {
const originalRepoLockfilePath = path.join(
__dirname,
'..',
@@ -587,36 +587,12 @@ it('should return cliType npm when no lockfile is present and VERCEL_ENABLE_NPM_
const originalRepoLockfileData = await fs.readFile(originalRepoLockfilePath);
await fs.remove(originalRepoLockfilePath);
try {
process.env.VERCEL_ENABLE_NPM_DEFAULT = '1';
const fixture = path.join(__dirname, 'fixtures', '40-no-lockfile');
const result = await scanParentDirs(fixture);
expect(result.cliType).toEqual('npm');
expect(result.lockfileVersion).toEqual(undefined);
expect(result.lockfilePath).toEqual(undefined);
expect(result.packageJsonPath).toEqual(path.join(fixture, 'package.json'));
} finally {
delete process.env.VERCEL_ENABLE_NPM_DEFAULT;
await fs.writeFile(originalRepoLockfilePath, originalRepoLockfileData);
}
});
it('should return cliType yarn when no lockfile is present and VERCEL_ENABLE_NPM_DEFAULT is not set', async () => {
const originalRepoLockfilePath = path.join(
__dirname,
'..',
'..',
'..',
'pnpm-lock.yaml'
);
const originalRepoLockfileData = await fs.readFile(originalRepoLockfilePath);
await fs.remove(originalRepoLockfilePath);
try {
const fixture = path.join(__dirname, 'fixtures', '40-no-lockfile');
const result = await scanParentDirs(fixture);
expect(result.cliType).toEqual('yarn');
expect(result.lockfileVersion).toEqual(undefined);
expect(result.lockfilePath).toEqual(undefined);
expect(result.packageJsonPath).toEqual(path.join(fixture, 'package.json'));
} finally {
await fs.writeFile(originalRepoLockfilePath, originalRepoLockfileData);
}

View File

@@ -1,5 +1,20 @@
# vercel
## 33.5.5
### Patch Changes
- Rename variants to flags and remove legacy flags ([#11121](https://github.com/vercel/vercel/pull/11121))
- fix vc with root dir issues ([#11243](https://github.com/vercel/vercel/pull/11243))
- Updated dependencies [[`908e7837d`](https://github.com/vercel/vercel/commit/908e7837d55bc02e708f402c700e00208415e954), [`5e3656ec1`](https://github.com/vercel/vercel/commit/5e3656ec1b3f0561091636582715ba09ddd8cb2d), [`a53d1b0d3`](https://github.com/vercel/vercel/commit/a53d1b0d38efa9637f8b8f81a70898add87530e3)]:
- @vercel/build-utils@7.8.0
- @vercel/next@4.1.5
- @vercel/remix-builder@2.1.2
- @vercel/node@3.0.22
- @vercel/static-build@2.4.2
## 33.5.4
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "vercel",
"version": "33.5.4",
"version": "33.5.5",
"preferGlobal": true,
"license": "Apache-2.0",
"description": "The command-line interface for Vercel",
@@ -31,17 +31,17 @@
"node": ">= 16"
},
"dependencies": {
"@vercel/build-utils": "7.7.1",
"@vercel/build-utils": "7.8.0",
"@vercel/fun": "1.1.0",
"@vercel/go": "3.0.5",
"@vercel/hydrogen": "1.0.2",
"@vercel/next": "4.1.4",
"@vercel/node": "3.0.21",
"@vercel/next": "4.1.5",
"@vercel/node": "3.0.22",
"@vercel/python": "4.1.1",
"@vercel/redwood": "2.0.8",
"@vercel/remix-builder": "2.1.1",
"@vercel/remix-builder": "2.1.2",
"@vercel/ruby": "2.0.5",
"@vercel/static-build": "2.4.1",
"@vercel/static-build": "2.4.2",
"chokidar": "3.3.1"
},
"devDependencies": {
@@ -88,8 +88,8 @@
"@types/yauzl-promise": "2.1.0",
"@vercel-internals/constants": "1.0.4",
"@vercel-internals/get-package-json": "1.0.0",
"@vercel-internals/types": "1.0.24",
"@vercel/client": "13.1.4",
"@vercel-internals/types": "1.0.25",
"@vercel/client": "13.1.5",
"@vercel/error-utils": "2.0.2",
"@vercel/frameworks": "3.0.0",
"@vercel/fs-detectors": "5.2.1",
@@ -165,6 +165,8 @@
"ts-node": "10.9.1",
"universal-analytics": "0.4.20",
"utility-types": "2.1.0",
"vite": "5.1.6",
"vitest": "1.3.1",
"which": "3.0.0",
"write-json-file": "2.2.0",
"xdg-app-paths": "5.1.0",

View File

@@ -21,8 +21,7 @@ import {
NowBuildError,
Cron,
validateNpmrc,
Flag,
VariantDefinition,
type FlagDefinitions,
} from '@vercel/build-utils';
import {
detectBuilders,
@@ -96,9 +95,6 @@ interface BuildOutputConfig {
version: string;
};
crons?: Cron[];
/** @deprecated Replaced by Variants. Remove once fully replaced. */
flags?: Flag[];
variants?: Record<string, VariantDefinition>;
}
/**
@@ -667,7 +663,6 @@ async function doBuild(
const mergedWildcard = mergeWildcard(buildResults.values());
const mergedOverrides: Record<string, PathOverride> =
overrides.length > 0 ? Object.assign({}, ...overrides) : undefined;
const mergedFlags = mergeFlags(buildResults.values());
const framework = await getFramework(cwd, buildResults);
@@ -681,12 +676,10 @@ async function doBuild(
overrides: mergedOverrides,
framework,
crons: mergedCrons,
/** @deprecated Replaced by Variants. Remove once fully replaced. */
flags: mergedFlags,
};
await fs.writeJSON(join(outputDir, 'config.json'), config, { spaces: 2 });
await writeVariantsJson(client, buildResults.values(), outputDir);
await writeFlagsJSON(client, buildResults.values(), outputDir);
const relOutputDir = relative(cwd, outputDir);
output.print(
@@ -820,60 +813,51 @@ function mergeWildcard(
return wildcard;
}
function mergeFlags(
buildResults: Iterable<BuildResult | BuildOutputConfig>
): BuildResultV2Typical['flags'] {
return Array.from(buildResults).flatMap(result => {
if ('flags' in result) {
return result.flags ?? [];
}
return [];
});
}
/**
* Takes the build output and writes all the variants into the `variants.json`
* file. It'll skip variants that already exist.
* Takes the build output and writes all the flags into the `flags.json`
* file. It'll skip flags that already exist.
*/
async function writeVariantsJson(
async function writeFlagsJSON(
{ output }: Client,
buildResults: Iterable<BuildResult | BuildOutputConfig>,
outputDir: string
): Promise<void> {
const variantsFilePath = join(outputDir, 'variants.json');
const flagsFilePath = join(outputDir, 'flags.json');
let hasVariants = true;
let hasFlags = true;
const variants = (await fs.readJSON(variantsFilePath).catch(error => {
const flags = (await fs.readJSON(flagsFilePath).catch(error => {
if (error.code === 'ENOENT') {
hasVariants = false;
hasFlags = false;
return { definitions: {} };
}
throw error;
})) as { definitions: Record<string, VariantDefinition> };
})) as { definitions: FlagDefinitions };
for (const result of buildResults) {
if (!('variants' in result) || !result.variants) continue;
if (!('flags' in result) || !result.flags || !result.flags.definitions)
continue;
for (const [key, defintion] of Object.entries(result.variants)) {
if (result.variants[key]) {
for (const [key, definition] of Object.entries(result.flags.definitions)) {
if (result.flags.definitions[key]) {
output.warn(
`The variant "${key}" was found multiple times. Only its first occurrence will be considered.`
`The flag "${key}" was found multiple times. Only its first occurrence will be considered.`
);
continue;
}
hasVariants = true;
variants.definitions[key] = defintion;
hasFlags = true;
flags.definitions[key] = definition;
}
}
// Only create the file when there are variants to write,
// Only create the file when there are flags to write,
// or when the file already exists.
if (hasVariants) {
await fs.writeJSON(variantsFilePath, variants, { spaces: 2 });
// Checking `definitions` alone won't be enough in case there
// are other properties set.
if (hasFlags) {
await fs.writeJSON(flagsFilePath, flags, { spaces: 2 });
}
}

View File

@@ -545,12 +545,17 @@ export default async (client: Client): Promise<number> => {
if (!localConfig.builds || localConfig.builds.length === 0) {
// Only add projectSettings for zero config deployments
createArgs.projectSettings =
status === 'not_linked'
? {
sourceFilesOutsideRootDirectory,
}
: { ...localConfigurationOverrides, sourceFilesOutsideRootDirectory };
createArgs.projectSettings = {
sourceFilesOutsideRootDirectory,
rootDirectory,
};
if (status !== 'not_linked') {
createArgs.projectSettings = {
...createArgs.projectSettings,
...localConfigurationOverrides,
};
}
}
deployment = await createDeploy(

View File

@@ -30,7 +30,7 @@ export default async function add(
output: Output
) {
// improve the way we show inquirer prompts
require('../../util/input/patch-inquirer');
await import('../../util/input/patch-inquirer');
const stdInput = await readStandardInput(client.stdin);
let [envName, envTargetArg, envGitBranch] = args;

View File

@@ -30,7 +30,7 @@ export default async function rm(
output: Output
) {
// improve the way we show inquirer prompts
require('../../util/input/patch-inquirer');
await import('../../util/input/patch-inquirer');
if (args.length > 3) {
output.error(

View File

@@ -1,11 +1,10 @@
import frameworkList from '@vercel/frameworks';
import { frameworks as frameworkList } from '@vercel/frameworks';
export function sortBuilders<B extends { use: string }>(builds: B[]): B[] {
const frontendRuntimeSet = new Set(
frameworkList.map(f => f.useRuntime?.use || '@vercel/static-build')
);
const toNumber = (build: B) => (frontendRuntimeSet.has(build.use) ? 0 : 1);
return builds.sort((build1, build2) => {
return toNumber(build1) - toNumber(build2);
});

View File

@@ -45,7 +45,7 @@ import {
detectApiExtensions,
isOfficialRuntime,
} from '@vercel/fs-detectors';
import frameworkList from '@vercel/frameworks';
import { frameworks as frameworkList } from '@vercel/frameworks';
import cmd from '../output/cmd';
import link from '../output/link';

View File

@@ -5,7 +5,7 @@ export default async function confirm(
message: string,
preferred: boolean
): Promise<boolean> {
require('./patch-inquirer');
await import('./patch-inquirer');
const answers = await client.prompt({
type: 'confirm',

View File

@@ -1,7 +1,7 @@
import inquirer from 'inquirer';
import confirm from './confirm';
import chalk from 'chalk';
import frameworkList, { Framework } from '@vercel/frameworks';
import { Framework, frameworks as frameworkList } from '@vercel/frameworks';
import Client from '../client';
import { isSettingValue } from '../is-setting-value';
import type { ProjectSettings } from '@vercel-internals/types';

View File

@@ -54,7 +54,7 @@ export default async function list(
eraseFinalAnswer = false, // If true, the line with the final answer that inquirer prints will be erased before returning
}: ListOptions
): Promise<string> {
require('./patch-inquirer');
await import('./patch-inquirer');
let biggestLength = 0;
let selected: string | undefined;

View File

@@ -10,7 +10,7 @@ export default async function selectOrg(
question: string,
autoConfirm?: boolean
): Promise<Org> {
require('./patch-inquirer');
await import('./patch-inquirer');
const {
output,
config: { currentTeam },

View File

@@ -198,6 +198,7 @@ export default async function setupAndLink(
projectSettings: {
...localConfigurationOverrides,
sourceFilesOutsideRootDirectory,
rootDirectory,
},
autoAssignCustomDomains: true,
};

View File

@@ -1,5 +1,5 @@
import { join } from 'path';
import frameworkList, { Framework } from '@vercel/frameworks';
import { Framework, frameworks as frameworkList } from '@vercel/frameworks';
import {
detectFrameworks,
getWorkspacePackagePaths,

View File

@@ -10,8 +10,9 @@ const {
disableSSO,
} = require('../../../../test/lib/deployment/now-deploy');
const { spawnSync, execFileSync } = require('child_process');
const vitest = require('vitest');
jest.setTimeout(10 * 60 * 1000);
vitest.vi.setConfig({ testTimeout: 10 * 60 * 1000 });
const isCI = !!process.env.CI;
const sleep = ms => new Promise(resolve => setTimeout(resolve, ms));

View File

@@ -0,0 +1,7 @@
{
"orgId": ".",
"projectId": ".",
"settings": {
"framework": null
}
}

View File

@@ -0,0 +1,21 @@
const fs = require('fs');
const path = require('path');
async function main() {
const outputDir = path.join(__dirname, '.vercel', 'output');
await fs.promises.mkdir(outputDir).catch((error) => {
if (error.code === 'EEXIST') return;
throw error;
});
await fs.promises.copyFile(path.join(__dirname, 'config.json'), path.join(outputDir, 'config.json'));
await fs.promises.copyFile(path.join(__dirname, 'flags.json'), path.join(outputDir, 'flags.json'));
}
main().then(() => {
process.exit(0);
}).catch((error) => {
console.error(error);
process.exit(1);
});

View File

@@ -0,0 +1,3 @@
{
"version": 3
}

View File

@@ -0,0 +1,7 @@
{
"definitions": {
"my-next-flag": {
"options": [{ "value": true }, { "value": false }]
}
}
}

View File

@@ -0,0 +1,5 @@
{
"scripts": {
"build": "node build.js"
}
}

View File

@@ -265,6 +265,23 @@ module.exports = async function prepare(session, binaryPath, tmpFixturesDir) {
},
}),
},
'zero-config-next-js-nested': {
'app/pages/index.js':
'export default () => <div><h1>Now CLI test</h1><p>Zero-config + Next.js</p></div>',
'app/package.json': JSON.stringify({
name: 'zero-config-next-js-test',
scripts: {
dev: 'next',
start: 'next start',
build: 'next build',
},
dependencies: {
next: 'latest',
react: 'latest',
'react-dom': 'latest',
},
}),
},
'lambda-with-128-memory': {
'api/memory.js': `
module.exports = (req, res) => {

View File

@@ -19,8 +19,10 @@ import {
import formatOutput from './helpers/format-output';
import type http from 'http';
import type { CLIProcess } from './helpers/types';
import { vi } from 'vitest';
const TEST_TIMEOUT = 3 * 60 * 1000;
jest.setTimeout(TEST_TIMEOUT);
vi.setConfig({ testTimeout: TEST_TIMEOUT });
const binaryPath = path.resolve(__dirname, `../scripts/start.js`);
@@ -584,6 +586,37 @@ test('deploy fails using --local-config flag with non-existent path', async () =
expect(stderr).toMatch(/does-not-exist\.json/);
});
test('deploy using --local-config flag above target', async () => {
const root = await setupE2EFixture('zero-config-next-js-nested');
const projectName = `project-link-dev-${
Math.random().toString(36).split('.')[1]
}`;
const vc = execCli(binaryPath, ['deploy', `--name=${projectName}`], {
cwd: root,
});
await waitForPrompt(vc, /Set up and deploy [^?]+\?/);
vc.stdin?.write('yes\n');
await waitForPrompt(vc, 'Which scope do you want to deploy to?');
vc.stdin?.write('\n');
await waitForPrompt(vc, 'Link to existing project?');
vc.stdin?.write('no\n');
await waitForPrompt(vc, `Whats your projects name? (${projectName})`);
vc.stdin?.write(`\n`);
await waitForPrompt(vc, 'In which directory is your code located?');
vc.stdin?.write('app\n');
// This means the framework detection worked!
await waitForPrompt(vc, 'Auto-detected Project Settings (Next.js)');
vc.kill();
});
test('deploy using --local-config flag above target', async () => {
const root = await setupE2EFixture('local-config-above-target');
const target = path.join(root, 'dir');

View File

@@ -27,9 +27,10 @@ import formatOutput from './helpers/format-output';
import type { PackageJson } from '@vercel/build-utils';
import type http from 'http';
import { CLIProcess } from './helpers/types';
import { vi } from 'vitest';
const TEST_TIMEOUT = 3 * 60 * 1000;
jest.setTimeout(TEST_TIMEOUT);
vi.setConfig({ testTimeout: TEST_TIMEOUT });
const binaryPath = path.resolve(__dirname, `../scripts/start.js`);
const example = (name: string) =>
@@ -1006,6 +1007,45 @@ test('[vc link --yes] should not show prompts and autolink', async () => {
).toBe(true);
});
test('[vc link] should detect frameworks in project rootDirectory', async () => {
const dir = await setupE2EFixture('zero-config-next-js-nested');
const projectRootDir = 'app';
const projectName = `project-link-dev-${
Math.random().toString(36).split('.')[1]
}`;
// remove previously linked project if it exists
await remove(path.join(dir, '.vercel'));
const vc = execCli(binaryPath, ['link', `--project=${projectName}`], {
cwd: dir,
env: {
FORCE_TTY: '1',
},
});
await waitForPrompt(vc, /Set up [^?]+\?/);
vc.stdin?.write('yes\n');
await waitForPrompt(vc, 'Which scope should contain your project?');
vc.stdin?.write('\n');
await waitForPrompt(vc, 'Link to existing project?');
vc.stdin?.write('no\n');
await waitForPrompt(vc, 'Whats your projects name?');
vc.stdin?.write(`${projectName}\n`);
await waitForPrompt(vc, 'In which directory is your code located?');
vc.stdin?.write(`${projectRootDir}\n`);
// This means the framework detection worked!
await waitForPrompt(vc, 'Auto-detected Project Settings (Next.js)');
vc.kill();
});
test('[vc link] should not duplicate paths in .gitignore', async () => {
const dir = await setupE2EFixture('project-link-gitignore');

View File

@@ -28,9 +28,10 @@ import {
import formatOutput from './helpers/format-output';
import type http from 'http';
import type { NowJson, DeploymentLike } from './helpers/types';
import { vi } from 'vitest';
const TEST_TIMEOUT = 3 * 60 * 1000;
jest.setTimeout(TEST_TIMEOUT);
vi.setConfig({ testTimeout: TEST_TIMEOUT });
const binaryPath = path.resolve(__dirname, `../scripts/start.js`);

View File

@@ -1,4 +1,328 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
exports[`help command > help output snapshots > column width 40 1`] = `
"
vercel deploy [project-path] [options]
Deploy your project to Vercel. The
\`deploy\` command is the default
command for the Vercel CLI, and can
be omitted (\`vc deploy my-app\` equals
\`vc my-app\`).
Options:
--archive Compress
the
deploym…
code
into a
file
before
uploadi…
it
-b, --build-env <key=value> Specify
environ…
variabl…
during
build-t…
(e.g.
\`-b
KEY1=va…
-b
KEY2=va…
-e, --env <key=value> Specify
environ…
variabl…
during
run-time
(e.g.
\`-e
KEY1=va…
-e
KEY2=va…
-f, --force Force a
new
deploym…
even if
nothing
has
changed
-m, --meta <key=value> Specify
metadata
for the
deploym…
(e.g.
\`-m
KEY1=va…
-m
KEY2=va…
--no-wait Don't
wait for
the
deploym…
to
finish
--prebuilt Use in
combina…
with \`vc
build\`.
Deploy
an
existing
build
--prod Create a
product…
deploym…
-p, --public Deploym…
is
public
(\`/_src…
is
exposed)
--regions Set
default
regions
to
enable
the
deploym…
on
--skip-domain Disable
the
automat…
promoti…
(aliasi…
of the
relevant
domains
to a new
product…
deploym…
You can
use \`vc
promote\`
to
complete
the
domain-…
process
later
--with-cache Retain
build
cache
when
using
"--forc…
-y, --yes Use
default
options
to skip
all
prompts
Global Options:
--cwd <DIR> Sets the
current
working
directory
for a
single run
of a
command
-d, --debug Debug mode
(default
off)
-Q, --global-config <DIR> Path to
the global
\`.vercel\`
directory
-h, --help Output
usage
informati…
-A, --local-config <FILE> Path to
the local
\`vercel.j…
file
--no-color No color
mode
(default
off)
-S, --scope Set a
custom
scope
-t, --token <TOKEN> Login
token
-v, --version Output the
version
number
Examples:
- Deploy the current directory
$ vercel
- Deploy a custom path
$ vercel /usr/src/project
- Deploy with run-time Environment Variables
$ vercel -e NODE_ENV=production
- Deploy with prebuilt outputs
$ vercel build
$ vercel deploy --prebuilt
- Write Deployment URL to a file
$ vercel > deployment-url.txt
"
`;
exports[`help command > help output snapshots > column width 80 1`] = `
"
vercel deploy [project-path] [options]
Deploy your project to Vercel. The \`deploy\` command is the default command
for the Vercel CLI, and can be omitted (\`vc deploy my-app\` equals \`vc
my-app\`).
Options:
--archive Compress the deployment code into a file before
uploading it
-b, --build-env <key=value> Specify environment variables during build-time
(e.g. \`-b KEY1=value1 -b KEY2=value2\`)
-e, --env <key=value> Specify environment variables during run-time
(e.g. \`-e KEY1=value1 -e KEY2=value2\`)
-f, --force Force a new deployment even if nothing has
changed
-m, --meta <key=value> Specify metadata for the deployment (e.g. \`-m
KEY1=value1 -m KEY2=value2\`)
--no-wait Don't wait for the deployment to finish
--prebuilt Use in combination with \`vc build\`. Deploy an
existing build
--prod Create a production deployment
-p, --public Deployment is public (\`/_src\`) is exposed)
--regions Set default regions to enable the deployment on
--skip-domain Disable the automatic promotion (aliasing) of
the relevant domains to a new production
deployment. You can use \`vc promote\` to complete
the domain-assignment process later
--with-cache Retain build cache when using "--force"
-y, --yes Use default options to skip all prompts
Global Options:
--cwd <DIR> Sets the current working directory for a single
run of a command
-d, --debug Debug mode (default off)
-Q, --global-config <DIR> Path to the global \`.vercel\` directory
-h, --help Output usage information
-A, --local-config <FILE> Path to the local \`vercel.json\` file
--no-color No color mode (default off)
-S, --scope Set a custom scope
-t, --token <TOKEN> Login token
-v, --version Output the version number
Examples:
- Deploy the current directory
$ vercel
- Deploy a custom path
$ vercel /usr/src/project
- Deploy with run-time Environment Variables
$ vercel -e NODE_ENV=production
- Deploy with prebuilt outputs
$ vercel build
$ vercel deploy --prebuilt
- Write Deployment URL to a file
$ vercel > deployment-url.txt
"
`;
exports[`help command > help output snapshots > column width 120 1`] = `
"
vercel deploy [project-path] [options]
Deploy your project to Vercel. The \`deploy\` command is the default command for the Vercel CLI, and can be omitted
(\`vc deploy my-app\` equals \`vc my-app\`).
Options:
--archive Compress the deployment code into a file before uploading it
-b, --build-env <key=value> Specify environment variables during build-time (e.g. \`-b KEY1=value1 -b KEY2=value2\`)
-e, --env <key=value> Specify environment variables during run-time (e.g. \`-e KEY1=value1 -e KEY2=value2\`)
-f, --force Force a new deployment even if nothing has changed
-m, --meta <key=value> Specify metadata for the deployment (e.g. \`-m KEY1=value1 -m KEY2=value2\`)
--no-wait Don't wait for the deployment to finish
--prebuilt Use in combination with \`vc build\`. Deploy an existing build
--prod Create a production deployment
-p, --public Deployment is public (\`/_src\`) is exposed)
--regions Set default regions to enable the deployment on
--skip-domain Disable the automatic promotion (aliasing) of the relevant domains to a new production
deployment. You can use \`vc promote\` to complete the domain-assignment process later
--with-cache Retain build cache when using "--force"
-y, --yes Use default options to skip all prompts
Global Options:
--cwd <DIR> Sets the current working directory for a single run of a command
-d, --debug Debug mode (default off)
-Q, --global-config <DIR> Path to the global \`.vercel\` directory
-h, --help Output usage information
-A, --local-config <FILE> Path to the local \`vercel.json\` file
--no-color No color mode (default off)
-S, --scope Set a custom scope
-t, --token <TOKEN> Login token
-v, --version Output the version number
Examples:
- Deploy the current directory
$ vercel
- Deploy a custom path
$ vercel /usr/src/project
- Deploy with run-time Environment Variables
$ vercel -e NODE_ENV=production
- Deploy with prebuilt outputs
$ vercel build
$ vercel deploy --prebuilt
- Write Deployment URL to a file
$ vercel > deployment-url.txt
"
`;
exports[`help command help output snapshots column width 40 1`] = `
"

View File

@@ -7,8 +7,9 @@ import { defaultProject, useProject } from '../../../mocks/project';
import { useTeams } from '../../../mocks/team';
import { useUser } from '../../../mocks/user';
import { execSync } from 'child_process';
import { vi } from 'vitest';
jest.setTimeout(6 * 60 * 1000);
vi.setConfig({ testTimeout: 6 * 60 * 1000 });
const fixture = (name: string) =>
join(__dirname, '../../../fixtures/unit/commands/build', name);
@@ -935,7 +936,7 @@ describe('build', () => {
name: 'Error',
message:
'Invalid vercel.json - `rewrites[2]` should NOT have additional property `src`. Did you mean `source`?',
stack: expect.stringContaining('at validateConfig'),
stack: expect.stringContaining('at Module.validateConfig'),
hideStackTrace: true,
code: 'INVALID_VERCEL_CONFIG',
link: 'https://vercel.com/docs/concepts/projects/project-configuration#rewrites',
@@ -1250,43 +1251,63 @@ describe('build', () => {
(await fs.readFile(join(output, 'static/index.txt'), 'utf8')).trim()
).toEqual('marketing');
});
});
it('should create symlinks for duplicate references to Lambda / EdgeFunction instances', async () => {
if (process.platform === 'win32') {
console.log('Skipping test on Windows');
return;
}
const cwd = fixture('functions-symlink');
const output = join(cwd, '.vercel/output');
client.cwd = cwd;
const exitCode = await build(client);
expect(exitCode).toEqual(0);
it('should write to flags.json', async () => {
const cwd = fixture('with-flags');
const output = join(cwd, '.vercel', 'output');
// "functions" directory has output Functions
const functions = await fs.readdir(join(output, 'functions'));
expect(functions.sort()).toEqual([
'edge.func',
'edge2.func',
'lambda.func',
'lambda2.func',
]);
expect(
fs.lstatSync(join(output, 'functions/lambda.func')).isDirectory()
).toEqual(true);
expect(
fs.lstatSync(join(output, 'functions/edge.func')).isDirectory()
).toEqual(true);
expect(
fs.lstatSync(join(output, 'functions/lambda2.func')).isSymbolicLink()
).toEqual(true);
expect(
fs.lstatSync(join(output, 'functions/edge2.func')).isSymbolicLink()
).toEqual(true);
expect(fs.readlinkSync(join(output, 'functions/lambda2.func'))).toEqual(
'lambda.func'
);
expect(fs.readlinkSync(join(output, 'functions/edge2.func'))).toEqual(
'edge.func'
);
client.cwd = cwd;
client.setArgv('build', '--yes');
const exitCode = await build(client);
expect(exitCode).toEqual(0);
expect(fs.existsSync(join(output, 'flags.json'))).toBe(true);
expect(fs.readJSONSync(join(output, 'flags.json'))).toEqual({
definitions: {
'my-next-flag': {
options: [{ value: true }, { value: false }],
},
},
});
});
it('should create symlinks for duplicate references to Lambda / EdgeFunction instances', async () => {
if (process.platform === 'win32') {
console.log('Skipping test on Windows');
return;
}
const cwd = fixture('functions-symlink');
const output = join(cwd, '.vercel/output');
client.cwd = cwd;
const exitCode = await build(client);
expect(exitCode).toEqual(0);
// "functions" directory has output Functions
const functions = await fs.readdir(join(output, 'functions'));
expect(functions.sort()).toEqual([
'edge.func',
'edge2.func',
'lambda.func',
'lambda2.func',
]);
expect(
fs.lstatSync(join(output, 'functions/lambda.func')).isDirectory()
).toEqual(true);
expect(
fs.lstatSync(join(output, 'functions/edge.func')).isDirectory()
).toEqual(true);
expect(
fs.lstatSync(join(output, 'functions/lambda2.func')).isSymbolicLink()
).toEqual(true);
expect(
fs.lstatSync(join(output, 'functions/edge2.func')).isSymbolicLink()
).toEqual(true);
expect(fs.readlinkSync(join(output, 'functions/lambda2.func'))).toEqual(
'lambda.func'
);
expect(fs.readlinkSync(join(output, 'functions/edge2.func'))).toEqual(
'edge.func'
);
});
});

View File

@@ -2,8 +2,9 @@ import login from '../../../src/commands/login';
import { emoji } from '../../../src/util/emoji';
import { client } from '../../mocks/client';
import { useUser } from '../../mocks/user';
import { vi } from 'vitest';
jest.setTimeout(10000);
vi.setConfig({ testTimeout: 10000 });
describe('login', () => {
it('should not allow the `--token` flag', async () => {

View File

@@ -6,6 +6,7 @@ import { defaultProject, useProject } from '../../mocks/project';
import { client } from '../../mocks/client';
import type { Project } from '@vercel-internals/types';
import { parseSpacedTableRow } from '../../helpers/parse-table';
import { vi } from 'vitest';
describe('project', () => {
describe('list', () => {
@@ -46,7 +47,7 @@ describe('project', () => {
});
it('should list projects running on an soon-to-be-deprecated Node.js version', async () => {
jest.useFakeTimers().setSystemTime(new Date('2023-12-08'));
vi.useFakeTimers().setSystemTime(new Date('2023-12-08'));
const user = useUser();
useTeams('team_dummy');
@@ -91,7 +92,7 @@ describe('project', () => {
data.pop();
expect(data).toEqual([project.project.name, 'https://foobar.com']);
jest.clearAllTimers();
vi.clearAllTimers();
});
it('should list projects when there is no production deployment', async () => {

View File

@@ -9,8 +9,9 @@ import { useDeployment } from '../../mocks/deployment';
import { useTeams } from '../../mocks/team';
import { useUser } from '../../mocks/user';
import sleep from '../../../src/util/sleep';
import { vi } from 'vitest';
jest.setTimeout(60000);
vi.setConfig({ testTimeout: 60000 });
describe('promote', () => {
it('should error if timeout is invalid', async () => {

View File

@@ -9,8 +9,9 @@ import { useDeployment } from '../../mocks/deployment';
import { useTeams } from '../../mocks/team';
import { useUser } from '../../mocks/user';
import sleep from '../../../src/util/sleep';
import { vi } from 'vitest';
jest.setTimeout(60000);
vi.setConfig({ testTimeout: 60000 });
describe('rollback', () => {
it('should error if timeout is invalid', async () => {

View File

@@ -8,9 +8,10 @@ import {
} from '../../../../src/util/build/import-builders';
import vercelNextPkg from '@vercel/next/package.json';
import vercelNodePkg from '@vercel/node/package.json';
import { vi } from 'vitest';
// these tests can take upwards of 190s on macos-latest
jest.setTimeout(4 * 60 * 1000);
vi.setConfig({ testTimeout: 4 * 60 * 1000 });
const repoRoot = join(__dirname, '../../../../../..');

View File

@@ -14,8 +14,9 @@ import { parseRepoUrl } from '../../../../src/util/git/connect-git-provider';
import { useUser } from '../../../mocks/user';
import { defaultProject, useProject } from '../../../mocks/project';
import type { Project } from '@vercel-internals/types';
import { vi } from 'vitest';
jest.setTimeout(10 * 1000);
vi.setConfig({ testTimeout: 10 * 1000 });
const fixture = (name: string) =>
join(__dirname, '../../../fixtures/unit/create-git-meta', name);

View File

@@ -1,13 +1,14 @@
import parseTarget from '../../../../src/util/deploy/parse-target';
import { Output } from '../../../../src/util/output';
import { Mock, vi } from 'vitest';
describe('parseTarget', () => {
let output: Output;
beforeEach(() => {
output = new Output();
output.warn = jest.fn();
output.error = jest.fn();
output.warn = vi.fn();
output.error = vi.fn();
});
it('defaults to `undefined`', () => {
@@ -19,7 +20,7 @@ describe('parseTarget', () => {
const result = parseTarget(output, 'not-a-real-environment');
expect(result).toEqual(1);
const errorMock = (output.error as jest.Mock<any, any>).mock;
const errorMock = (output.error as Mock<any, any>).mock;
expect(errorMock.calls[0][0]).toMatch(
/not-a-real-environment.+is not valid/g
);

View File

@@ -3,10 +3,11 @@ import sleep from '../../../src/util/sleep';
import tmp from 'tmp-promise';
import getLatestVersion from '../../../src/util/get-latest-version';
import { join } from 'path';
import { vi } from 'vitest';
tmp.setGracefulCleanup();
jest.setTimeout(25000);
vi.setConfig({ testTimeout: 25000 });
const cacheDir = tmp.tmpNameSync({
prefix: 'test-vercel-cli-get-latest-version-',

View File

@@ -0,0 +1,17 @@
/// <reference types="vitest" />
import { defineConfig } from 'vite';
export default defineConfig({
test: {
exclude: [
// default
'**/node_modules/**',
'**/dist/**',
'**/cypress/**',
'**/.{idea,git,cache,output,temp}/**',
'**/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress,tsup,build}.config.*',
// some artifacts in the fixtures have spec files that we're not using
'**/*.spec.js',
],
},
});

View File

@@ -1,5 +1,12 @@
# @vercel/client
## 13.1.5
### Patch Changes
- Updated dependencies [[`908e7837d`](https://github.com/vercel/vercel/commit/908e7837d55bc02e708f402c700e00208415e954), [`5e3656ec1`](https://github.com/vercel/vercel/commit/5e3656ec1b3f0561091636582715ba09ddd8cb2d)]:
- @vercel/build-utils@7.8.0
## 13.1.4
### Patch Changes

View File

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

View File

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

View File

@@ -1,5 +1,12 @@
# @vercel/gatsby-plugin-vercel-builder
## 2.0.20
### Patch Changes
- Updated dependencies [[`908e7837d`](https://github.com/vercel/vercel/commit/908e7837d55bc02e708f402c700e00208415e954), [`5e3656ec1`](https://github.com/vercel/vercel/commit/5e3656ec1b3f0561091636582715ba09ddd8cb2d)]:
- @vercel/build-utils@7.8.0
## 2.0.19
### Patch Changes

View File

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

View File

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

View File

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

View File

@@ -1,5 +1,11 @@
# @vercel/next
## 4.1.5
### Patch Changes
- Rename variants to flags and remove legacy flags ([#11121](https://github.com/vercel/vercel/pull/11121))
## 4.1.4
### Patch Changes

View File

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

View File

@@ -12,7 +12,6 @@ import {
debug,
glob,
Files,
Flag,
BuildResultV2Typical as BuildResult,
NodejsLambda,
} from '@vercel/build-utils';
@@ -47,7 +46,7 @@ import {
UnwrapPromise,
getOperationType,
FunctionsConfigManifestV1,
VariantsManifestLegacy,
VariantsManifest,
RSC_CONTENT_TYPE,
RSC_PREFETCH_SUFFIX,
normalizePrefetches,
@@ -184,7 +183,7 @@ export async function serverBuild({
imagesManifest?: NextImagesManifest;
prerenderManifest: NextPrerenderedRoutes;
requiredServerFilesManifest: NextRequiredServerFilesManifest;
variantsManifest: VariantsManifestLegacy | null;
variantsManifest: VariantsManifest | null;
experimentalPPRRoutes: ReadonlySet<string>;
}): Promise<BuildResult> {
lambdaPages = Object.assign({}, lambdaPages, lambdaAppPaths);
@@ -1579,14 +1578,6 @@ export async function serverBuild({
'RSC, Next-Router-State-Tree, Next-Router-Prefetch';
const appNotFoundPath = path.posix.join('.', entryDirectory, '_not-found');
const flags: Flag[] = variantsManifest
? Object.entries(variantsManifest).map(([key, value]) => ({
key,
...value,
metadata: value.metadata ?? {},
}))
: [];
if (experimental.ppr && !rscPrefetchHeader) {
throw new Error("Invariant: cannot use PPR without 'rsc.prefetchHeader'");
}
@@ -2354,6 +2345,6 @@ export async function serverBuild({
]),
],
framework: { version: nextVersion },
flags,
flags: variantsManifest || undefined,
};
}

View File

@@ -16,6 +16,7 @@ import {
EdgeFunction,
Images,
File,
FlagDefinitions,
} from '@vercel/build-utils';
import { NodeFileTraceReasons } from '@vercel/nft';
import type {
@@ -3307,19 +3308,14 @@ export function isApiPage(page: string | undefined) {
.match(/(serverless|server)\/pages\/api(\/|\.js$)/);
}
/** @deprecated */
export type VariantsManifestLegacy = Record<
string,
{
defaultValue?: unknown;
metadata?: Record<string, unknown>;
}
>;
export type VariantsManifest = {
definitions: FlagDefinitions;
};
export async function getVariantsManifest(
entryPath: string,
outputDirectory: string
): Promise<null | VariantsManifestLegacy> {
): Promise<null | VariantsManifest> {
const pathVariantsManifest = path.join(
entryPath,
outputDirectory,
@@ -3333,7 +3329,7 @@ export async function getVariantsManifest(
if (!hasVariantsManifest) return null;
const variantsManifest: VariantsManifestLegacy = await fs.readJSON(
const variantsManifest: VariantsManifest = await fs.readJSON(
pathVariantsManifest
);

View File

@@ -1,5 +1,12 @@
# @vercel/node
## 3.0.22
### Patch Changes
- Updated dependencies [[`908e7837d`](https://github.com/vercel/vercel/commit/908e7837d55bc02e708f402c700e00208415e954), [`5e3656ec1`](https://github.com/vercel/vercel/commit/5e3656ec1b3f0561091636582715ba09ddd8cb2d)]:
- @vercel/build-utils@7.8.0
## 3.0.21
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/node",
"version": "3.0.21",
"version": "3.0.22",
"license": "Apache-2.0",
"main": "./dist/index",
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/node-js",
@@ -24,7 +24,7 @@
"@edge-runtime/primitives": "4.1.0",
"@edge-runtime/vm": "3.2.0",
"@types/node": "14.18.33",
"@vercel/build-utils": "7.7.1",
"@vercel/build-utils": "7.8.0",
"@vercel/error-utils": "2.0.2",
"@vercel/nft": "0.26.4",
"@vercel/static-config": "3.0.0",

View File

@@ -26,7 +26,7 @@
"@types/jest": "27.4.1",
"@types/node": "14.18.33",
"@types/which": "3.0.0",
"@vercel/build-utils": "7.7.1",
"@vercel/build-utils": "7.8.0",
"execa": "^1.0.0",
"fs-extra": "11.1.1",
"jest-junit": "16.0.0",

View File

@@ -28,7 +28,7 @@
"@types/aws-lambda": "8.10.19",
"@types/node": "14.18.33",
"@types/semver": "6.0.0",
"@vercel/build-utils": "7.7.1",
"@vercel/build-utils": "7.8.0",
"execa": "3.2.0",
"fs-extra": "11.1.0",
"jest-junit": "16.0.0"

View File

@@ -1,5 +1,11 @@
# @vercel/remix-builder
## 2.1.2
### Patch Changes
- Update `@remix-run/dev` fork to v2.8.1 ([#11241](https://github.com/vercel/vercel/pull/11241))
## 2.1.1
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/remix-builder",
"version": "2.1.1",
"version": "2.1.2",
"license": "Apache-2.0",
"main": "./dist/index.js",
"homepage": "https://vercel.com/docs",
@@ -28,11 +28,11 @@
"ts-morph": "12.0.0"
},
"devDependencies": {
"@remix-run/dev": "npm:@vercel/remix-run-dev@2.8.0",
"@remix-run/dev": "npm:@vercel/remix-run-dev@2.8.1",
"@types/jest": "27.5.1",
"@types/node": "14.18.33",
"@types/semver": "7.3.13",
"@vercel/build-utils": "7.7.1",
"@vercel/build-utils": "7.8.0",
"jest-junit": "16.0.0",
"path-to-regexp": "6.2.1",
"semver": "7.5.2"

View File

@@ -23,7 +23,7 @@
"devDependencies": {
"@types/fs-extra": "8.0.0",
"@types/semver": "6.0.0",
"@vercel/build-utils": "7.7.1",
"@vercel/build-utils": "7.8.0",
"execa": "2.0.4",
"fs-extra": "^7.0.1",
"jest-junit": "16.0.0",

View File

@@ -1,5 +1,12 @@
# @vercel/static-build
## 2.4.2
### Patch Changes
- Updated dependencies []:
- @vercel/gatsby-plugin-vercel-builder@2.0.20
## 2.4.1
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/static-build",
"version": "2.4.1",
"version": "2.4.2",
"license": "Apache-2.0",
"main": "./dist/index",
"homepage": "https://vercel.com/docs/build-step",
@@ -21,7 +21,7 @@
},
"dependencies": {
"@vercel/gatsby-plugin-vercel-analytics": "1.0.11",
"@vercel/gatsby-plugin-vercel-builder": "2.0.19",
"@vercel/gatsby-plugin-vercel-builder": "2.0.20",
"@vercel/static-config": "3.0.0",
"ts-morph": "12.0.0"
},
@@ -35,7 +35,7 @@
"@types/node-fetch": "2.5.4",
"@types/promise-timeout": "1.3.0",
"@types/semver": "7.3.13",
"@vercel/build-utils": "7.7.1",
"@vercel/build-utils": "7.8.0",
"@vercel/error-utils": "2.0.2",
"@vercel/frameworks": "3.0.0",
"@vercel/fs-detectors": "5.2.1",

View File

@@ -1 +0,0 @@
.vercel_build_output

View File

@@ -1,10 +0,0 @@
[
{
"src": "/",
"dest": "/.vercel/functions/root/"
},
{
"src": "/(.*)",
"dest": "/.vercel/functions/$1"
}
]

View File

@@ -1,5 +0,0 @@
const { getAbout } = require('./util');
module.exports = async function (req, res) {
return res.end(`Hello from /about/index.js on ${req.url} - ${getAbout()}`);
};

View File

@@ -1,5 +0,0 @@
module.exports = {
getAbout() {
return 'Milkshake';
},
};

View File

@@ -1,5 +0,0 @@
import { hello } from './other.mjs';
export default async (_req, res) => {
return res.end(hello);
};

View File

@@ -1 +0,0 @@
export const hello = 'Hello from .mjs'

View File

@@ -1,7 +0,0 @@
const { getInfo } = require('./info');
module.exports = async function (req, res) {
return res.end(
`Hello from /product/index.js on ${req.url} - ${await getInfo()}`
);
};

View File

@@ -1,5 +0,0 @@
module.exports = {
async getInfo() {
return 'Information about a Product.';
},
};

View File

@@ -1,3 +0,0 @@
module.exports = async function (req, res) {
return res.end(`Hello from /root/index.js on ${req.url}`);
};

View File

@@ -1,5 +0,0 @@
{
"scripts": {
"build": "cp -r fake .vercel_build_output"
}
}

View File

@@ -1,37 +0,0 @@
{
"probes": [
{
"path": "/.vercel/functions/root",
"mustContain": "Hello from /root/index.js on /.vercel/functions/root"
},
{ "path": "/", "mustContain": "Hello from /root/index.js on /" },
{
"path": "/.vercel/functions/about",
"mustContain": "Hello from /about/index.js on /.vercel/functions/about - Milkshake"
},
{
"path": "/about",
"mustContain": "Hello from /about/index.js on /about - Milkshake"
},
{
"path": "/esm",
"mustContain": "Hello from .mjs"
},
{
"path": "/.vercel/functions/esm",
"mustContain": "Hello from .mjs"
},
{ "path": "/.vercel/functions/about/util", "status": 404 },
{ "path": "/about/util", "status": 404 },
{
"path": "/.vercel/functions/product",
"mustContain": "Hello from /product/index.js on /.vercel/functions/product - Information about a Product"
},
{
"path": "/product",
"mustContain": "Hello from /product/index.js on /product - Information about a Product"
},
{ "path": "/.vercel/functions/product/info", "status": 404 },
{ "path": "/product/info", "status": 404 }
]
}

View File

@@ -1 +0,0 @@
.vercel_build_output

View File

@@ -1,10 +0,0 @@
[
{
"src": "/",
"dest": "/.vercel/functions/root/"
},
{
"src": "/(.*)",
"dest": "/.vercel/functions/$1"
}
]

View File

@@ -1,5 +0,0 @@
const { getAbout } = require('./util');
module.exports = async function (req, res) {
return res.end(`Hello from /about/index.js on ${req.url} - ${getAbout()}`);
};

View File

@@ -1,5 +0,0 @@
module.exports = {
getAbout() {
return 'Milkshake';
},
};

View File

@@ -1,5 +0,0 @@
import { hello } from './other.mjs';
export default async (_req, res) => {
return res.end(hello);
};

View File

@@ -1 +0,0 @@
export const hello = 'Hello from .mjs'

View File

@@ -1,7 +0,0 @@
const { getInfo } = require('./info');
module.exports = async function (req, res) {
return res.end(
`Hello from /product/index.js on ${req.url} - ${await getInfo()}`
);
};

View File

@@ -1,5 +0,0 @@
module.exports = {
async getInfo() {
return 'Information about a Product.';
},
};

View File

@@ -1,3 +0,0 @@
module.exports = async function (req, res) {
return res.end(`Hello from /root/index.js on ${req.url}`);
};

View File

@@ -1,5 +0,0 @@
{
"scripts": {
"build": "mkdir -p public && echo static > public/static.txt && cp -r fake .vercel_build_output"
}
}

View File

@@ -1,26 +0,0 @@
{
"version": 2,
"builds": [
{
"src": "package.json",
"use": "@vercel/static-build",
"config": { "zeroConfig": true }
}
],
"probes": [
{ "path": "/static.txt", "mustContain": "static" },
{ "path": "/", "mustContain": "Hello from /root/index.js on /" },
{
"path": "/about",
"mustContain": "Hello from /about/index.js on /about - Milkshake"
},
{
"path": "/esm",
"mustContain": "Hello from .mjs"
},
{
"path": "/product",
"mustContain": "Hello from /product/index.js on /product - Information about a Product"
}
]
}

View File

@@ -1,2 +0,0 @@
.vercel_build_output
public

View File

@@ -1,4 +0,0 @@
{
"domains": ["assets.vercel.com"],
"sizes": [48, 96]
}

View File

@@ -1,6 +0,0 @@
[
{
"src": "/",
"dest": "/hello.txt"
}
]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

View File

@@ -1,6 +0,0 @@
{
"private": true,
"scripts": {
"build": "cp -r fake .vercel_build_output"
}
}

View File

@@ -1,18 +0,0 @@
{
"probes": [
{ "path": "/", "mustContain": "hello world" },
{ "path": "/hello.txt", "mustContain": "hello world" },
{
"path": "/_vercel/image?url=logo.png&w=96&q=75",
"headers": { "Accept": "image/webp" },
"status": 200,
"responseHeaders": { "Content-Type": "image/webp" }
},
{
"path": "/_vercel/image?url=https%3A%2F%2Fassets.vercel.com%2Fimage%2Fupload%2Fv1588805858%2Frepositories%2Fvercel%2Flogo.png&w=48&q=75",
"headers": { "Accept": "image/webp" },
"status": 200,
"responseHeaders": { "Content-Type": "image/webp" }
}
]
}

View File

@@ -1,2 +0,0 @@
.vercel_build_output
public

View File

@@ -1,6 +0,0 @@
{
"my-function": {
"memory": 128,
"maxDuration": 2
}
}

View File

@@ -1,6 +0,0 @@
[
{
"src": "/",
"dest": "/.vercel/functions/my-function"
}
]

View File

@@ -1,23 +0,0 @@
const { sleep } = require('./sleep');
const { URL } = require('url');
module.exports = async function (req, res) {
const url = new URL(req.url, `http://${req.headers.host}`);
const sleepTime = Number(url.searchParams.get('sleep')) || 0;
await sleep(sleepTime);
res.setHeader('Content-Type', 'application/json');
res.end(
JSON.stringify(
{
sleepTime,
region: process.env.AWS_REGION,
memory: process.env.AWS_LAMBDA_FUNCTION_MEMORY_SIZE,
},
null,
2
)
);
};

View File

@@ -1,9 +0,0 @@
async function sleep(time) {
await new Promise(res => {
setTimeout(res, time);
});
}
module.exports = {
sleep,
};

View File

@@ -1,6 +0,0 @@
{
"private": true,
"scripts": {
"build": "cp -r fake .vercel_build_output"
}
}

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