Compare commits

..

14 Commits

Author SHA1 Message Date
Steven
fc0e6872e5 Publish Stable
- vercel@28.10.3
 - @vercel/frameworks@1.1.17
 - @vercel/fs-detectors@3.6.0
 - @vercel/next@3.3.7
 - @vercel/node-bridge@3.1.3
 - @vercel/node@2.8.4
 - @vercel/redwood@1.0.43
 - @vercel/remix@1.1.5
 - @vercel/static-build@1.0.46
2023-01-05 16:27:06 -05:00
Ethan Arrowood
d800d9cd68 [fs-detectors][cli] move monorepo default setting code to fs-detectors (#9101)
Makes the monorepo default setting logic reusable by API and includes a `commandForIgnoringBuildStep` setting for Turbo projects.
2023-01-05 21:16:03 +00:00
Steven
9c8f6aa70f [tests] Replace ::set-output with >> $GITHUB_OUTPUT in gh actions (#9170)
This PR fixes a deprecation warning we have been seeing in GitHub Actions for a few months. See [example](https://github.com/vercel/vercel/actions/runs/3849500423/jobs/6558559310#step:7:453).

> Warning: The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
2023-01-05 20:37:57 +00:00
Steven
feceeef7b7 [node] Fix ESM output from TS source (#7954)
- Depends on https://github.com/vercel/nft/pull/297
- Fixes #7908 
- Fixes #6194 

This PR bumps `@vercel/nft` (for production) and `ts-node` (for
development) to fix ESM behavior.

Because Node.js cannot dynamically set [loader
hooks](https://nodejs.org/docs/latest-v18.x/api/esm.html#loaders) once a
process is started, I had to change the way `ts-node` is registered by
using environment variables such as `NODE_OPTIONS`. Most of the logic
for TS and ESM was pulled out of the child process and into the parent.

Co-authored-by: Ethan Arrowood <ethan.arrowood@vercel.com>
2023-01-05 15:25:32 -05:00
Steven
6215c516e7 [tests] Turbo should use full logs when listing tests (#9172)
In PR #9168, the output mode was changed so it doesnt print logs when the result is cached. However, we need the output for the dry run where we list all relevant tests. So the flag was added to that one script only to avoid this skipped problem:

![skipped](https://user-images.githubusercontent.com/229881/210870102-a597d1b9-f007-41ba-8e1d-f53aa765b740.png)
2023-01-05 15:12:59 -05:00
Steven
ada1ad3840 [tests] Bump turbo and update turbo.json (#9168)
This PR does a few things
- Revert https://github.com/vercel/vercel/pull/8264 because it was causing some tests not to run (for example, modifying `@vercel/build-utils` should run tests for all packages)
- Bump `turbo` to version 1.6.3
- Update [`outputMode`](https://turbo.build/repo/docs/reference/configuration#outputmode) to new-only
- Update [`dependsOn`](https://turbo.build/repo/docs/reference/configuration#dependson) to `^` to ensure all dependencies are considered
2023-01-05 18:02:05 +00:00
Sean Massa
fe184618f4 [frameworks] fix blitzjs detection (#9166)
The framework detectors do not support this syntax:

```
path: 'blitz.config.(js|ts)',
```

This PR fixes framework detection for "Blitz.js (Legacy)".
2023-01-05 16:29:39 +00:00
Kiko Beats
c9c5e148f7 [tests] use assert.strictEqual (#9162)
assert.equal is deprecated
2023-01-04 13:23:01 +00:00
Andy McKay
8115582e25 [frameworks] Fix vitepress screenshot (#9158)
When you are on this page, creating a project the image here is the screenshot of an example project in the `Vercel Examples` enterprise. However that was not working:

<img width="1060" alt="Screen Shot 2023-01-03 at 2 26 58 PM" src="https://user-images.githubusercontent.com/74699/210451850-8208f42b-de43-4ac4-a1fe-b90d88fe86d8.png">

It does this by hitting the API. In this case the problem is that there is a trailing slash on the domain name, causing the API to fail:

<img width="477" alt="Screen Shot 2023-01-03 at 2 29 48 PM" src="https://user-images.githubusercontent.com/74699/210452032-2e32ae61-df29-48b4-b79f-93f5bcf299d3.png">

So this removes that trailing, but I'll see if I can tighten this up as well so in the future it doesn't matter if there is a `/` there.

FYI: this passes unit tests in framework, because it passes the URL in demo through to `URL` and grabs the hostname, which strips out the `protocol` and trailing `/`. Perhaps we should do the same on front.
2023-01-04 04:11:08 +00:00
JJ Kasper
3e3f92e6d3 [next] Lock test fixture dependency (#9159)
This locks the test dependency down for this fixture since the version of Next.js doesn't support the `node:` prefixed imports added in the latest version of `isomorphic-unfetch`. 

Fixes: https://github.com/vercel/vercel/actions/runs/3833489157/jobs/6525280122#step:9:6013
2023-01-04 01:26:50 +00:00
Steven
d6cccd70f2 Publish Stable
- @vercel/build-utils@5.7.3
 - vercel@28.10.2
 - @vercel/client@12.2.24
 - @vercel/fs-detectors@3.5.7
 - @vercel/go@2.2.22
 - @vercel/hydrogen@0.0.36
 - @vercel/next@3.3.6
 - @vercel/node@2.8.3
 - @vercel/python@3.1.32
 - @vercel/redwood@1.0.42
 - @vercel/remix@1.1.4
 - @vercel/ruby@1.3.48
 - @vercel/static-build@1.0.45
2023-01-03 17:31:50 -05:00
Sean Massa
3a68c73496 [build-utils] Revert "Support empty directory entries for glob() and download()" (#9157)
Reverts vercel/vercel#9103

We believe the original PR is the cause of errors like:

> Error: EISDIR: illegal operation on a directory, read
2023-01-03 17:29:27 -05:00
Ikko Ashimine
1c21ba52ce [docs] fix typo in DEVELOPING_A_RUNTIME.md (#9138)
specifc -> specific
2022-12-27 12:53:17 -05:00
github-actions[bot]
6e55e72498 [examples] Upgrade Next.js to version 13.1.1 (#9125)
This auto-generated PR updates Next.js to version 13.1.1

Co-authored-by: Vercel Team Bot <team@zeit.co>
2022-12-24 15:28:11 -05:00
71 changed files with 1072 additions and 871 deletions

View File

@@ -27,9 +27,9 @@ jobs:
tag="$(git describe --tags --exact-match 2> /dev/null || :)"
if [[ -z "$tag" ]];
then
echo "::set-output name=IS_RELEASE::false"
echo "IS_RELEASE=false" >> $GITHUB_OUTPUT
else
echo "::set-output name=IS_RELEASE::true"
echo "IS_RELEASE=true" >> $GITHUB_OUTPUT
fi
- name: Setup Go
if: ${{ steps.check-release.outputs.IS_RELEASE == 'true' }}

View File

@@ -47,7 +47,7 @@ jobs:
TESTS_ARRAY=$(node utils/chunk-tests.js $SCRIPT_NAME)
echo "Files to test:"
echo "$TESTS_ARRAY"
echo "::set-output name=tests::$TESTS_ARRAY"
echo "tests=$TESTS_ARRAY" >> $GITHUB_OUTPUT
- uses: patrickedqvist/wait-for-vercel-preview@ae34b392ef30297f2b672f9afb3c329bde9bd487
id: waitForTarball
with:

View File

@@ -28,7 +28,7 @@ Official Runtimes are published to [the npm registry](https://npmjs.com) as a pa
> **Note:** The `use` property in the `builds` array will work with any [npm
> install argument](https://docs.npmjs.com/cli/install) such as a git repo URL,
> which is useful for testing your Runtime. Alternatively, the `functions` property
> requires that you specify a specifc tag published to npm, for stability purposes.
> requires that you specify a specific tag published to npm, for stability purposes.
See the [Runtimes Documentation](https://vercel.com/docs/runtimes) to view example usage.

View File

@@ -8,10 +8,10 @@
"name": "nextjs",
"version": "0.1.0",
"dependencies": {
"@next/font": "13.1.0",
"@next/font": "13.1.1",
"eslint": "8.30.0",
"eslint-config-next": "13.1.0",
"next": "13.1.0",
"eslint-config-next": "13.1.1",
"next": "13.1.1",
"react": "18.2.0",
"react-dom": "18.2.0"
}
@@ -92,27 +92,27 @@
"integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA=="
},
"node_modules/@next/env": {
"version": "13.1.0",
"resolved": "https://registry.npmjs.org/@next/env/-/env-13.1.0.tgz",
"integrity": "sha512-6iNixFzCndH+Bl4FetQzOMjxCJqg8fs0LAlZviig1K6mIjOWH2m2oPcHcOg1Ta5VCe7Bx5KG1Hs+NrWDUkBt9A=="
"version": "13.1.1",
"resolved": "https://registry.npmjs.org/@next/env/-/env-13.1.1.tgz",
"integrity": "sha512-vFMyXtPjSAiOXOywMojxfKIqE3VWN5RCAx+tT3AS3pcKjMLFTCJFUWsKv8hC+87Z1F4W3r68qTwDFZIFmd5Xkw=="
},
"node_modules/@next/eslint-plugin-next": {
"version": "13.1.0",
"resolved": "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-13.1.0.tgz",
"integrity": "sha512-LGh0iqcEwxs0HmEK96cXXuhofcOGSUGl8Zms279JW8Zq/6GJkXo87gtRpfJrwD+a77nEIdRaORPM91Us3xW0Qw==",
"version": "13.1.1",
"resolved": "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-13.1.1.tgz",
"integrity": "sha512-SBrOFS8PC3nQ5aeZmawJkjKkWjwK9RoxvBSv/86nZp0ubdoVQoko8r8htALd9ufp16NhacCdqhu9bzZLDWtALQ==",
"dependencies": {
"glob": "7.1.7"
}
},
"node_modules/@next/font": {
"version": "13.1.0",
"resolved": "https://registry.npmjs.org/@next/font/-/font-13.1.0.tgz",
"integrity": "sha512-9+c2eWoeLftcGAul1fiXD8lL4o4/0beQrz2/0h0B0VV5AWrqCCfj/204quUxdp541ab+NCWVX/m49qjbqFMaFA=="
"version": "13.1.1",
"resolved": "https://registry.npmjs.org/@next/font/-/font-13.1.1.tgz",
"integrity": "sha512-amygRorS05hYK1/XQRZo5qBl7l2fpHnezeKU/cNveWU5QJg+sg8gMGkUXHtvesNKpiKIJshBRH1TzvO+2sKpvQ=="
},
"node_modules/@next/swc-android-arm-eabi": {
"version": "13.1.0",
"resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-13.1.0.tgz",
"integrity": "sha512-ANBZZRjZBV+Sii11ZVxbxSvfIi6dZwu4w+XnJBDmz+0/wtAigpjYWyMkuWZ/RCD7INdusOlU4EgJ99WzWGIDjA==",
"version": "13.1.1",
"resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-13.1.1.tgz",
"integrity": "sha512-qnFCx1kT3JTWhWve4VkeWuZiyjG0b5T6J2iWuin74lORCupdrNukxkq9Pm+Z7PsatxuwVJMhjUoYz7H4cWzx2A==",
"cpu": [
"arm"
],
@@ -125,9 +125,9 @@
}
},
"node_modules/@next/swc-android-arm64": {
"version": "13.1.0",
"resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-13.1.0.tgz",
"integrity": "sha512-nPwbkS3aZjCIe61wztgjXjIeylijOP8uGtDGjjJVUF3B/5GLVx3ngZu6tjPTMEgaLM0u//HuGK+aZolWUQWE4g==",
"version": "13.1.1",
"resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-13.1.1.tgz",
"integrity": "sha512-eCiZhTzjySubNqUnNkQCjU3Fh+ep3C6b5DCM5FKzsTH/3Gr/4Y7EiaPZKILbvnXmhWtKPIdcY6Zjx51t4VeTfA==",
"cpu": [
"arm64"
],
@@ -140,9 +140,9 @@
}
},
"node_modules/@next/swc-darwin-arm64": {
"version": "13.1.0",
"resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.1.0.tgz",
"integrity": "sha512-0hUydiAW18jK2uGPnZRdnRQtdB/3ZoPo84A6zH7MJHxAWw9lzVsv3kMg9kgVBBlrivzqdNN8rdgA+eYNxzXU9w==",
"version": "13.1.1",
"resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.1.1.tgz",
"integrity": "sha512-9zRJSSIwER5tu9ADDkPw5rIZ+Np44HTXpYMr0rkM656IvssowPxmhK0rTreC1gpUCYwFsRbxarUJnJsTWiutPg==",
"cpu": [
"arm64"
],
@@ -155,9 +155,9 @@
}
},
"node_modules/@next/swc-darwin-x64": {
"version": "13.1.0",
"resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-13.1.0.tgz",
"integrity": "sha512-3S3iQqJIysklj0Q9gnanuYMzF8H9p+fUVhvSHxVVLcKH4HsE8EGddNkXsaOyznL1kC6vGKw7h6uz1ojaXEafCA==",
"version": "13.1.1",
"resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-13.1.1.tgz",
"integrity": "sha512-qWr9qEn5nrnlhB0rtjSdR00RRZEtxg4EGvicIipqZWEyayPxhUu6NwKiG8wZiYZCLfJ5KWr66PGSNeDMGlNaiA==",
"cpu": [
"x64"
],
@@ -170,9 +170,9 @@
}
},
"node_modules/@next/swc-freebsd-x64": {
"version": "13.1.0",
"resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-13.1.0.tgz",
"integrity": "sha512-wAgzwm/em48GIuWq3OYr0BpncMy7c+UA3hsyX+xKh/vb/sOIpQly7JTa+GNdk17s7kprhMfsgzPG3da36NLpkA==",
"version": "13.1.1",
"resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-13.1.1.tgz",
"integrity": "sha512-UwP4w/NcQ7V/VJEj3tGVszgb4pyUCt3lzJfUhjDMUmQbzG9LDvgiZgAGMYH6L21MoyAATJQPDGiAMWAPKsmumA==",
"cpu": [
"x64"
],
@@ -185,9 +185,9 @@
}
},
"node_modules/@next/swc-linux-arm-gnueabihf": {
"version": "13.1.0",
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-13.1.0.tgz",
"integrity": "sha512-Cr2hzL7ad+4nj9KrR1Cz1RDcsWa61X6I7gc6PToRYIY4gL480Sijq19xo7dlXQPnr1viVzbNiNnNXZASHv7uvw==",
"version": "13.1.1",
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-13.1.1.tgz",
"integrity": "sha512-CnsxmKHco9sosBs1XcvCXP845Db+Wx1G0qouV5+Gr+HT/ZlDYEWKoHVDgnJXLVEQzq4FmHddBNGbXvgqM1Gfkg==",
"cpu": [
"arm"
],
@@ -200,9 +200,9 @@
}
},
"node_modules/@next/swc-linux-arm64-gnu": {
"version": "13.1.0",
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.1.0.tgz",
"integrity": "sha512-EjCIKfeZB9h72evL2yGNwBvE5Im96Zn7o2zxImlvCiUYb/xXDqn4hzhck035BSP3g3sGDLfijFTE1wKRyXIk4w==",
"version": "13.1.1",
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.1.1.tgz",
"integrity": "sha512-JfDq1eri5Dif+VDpTkONRd083780nsMCOKoFG87wA0sa4xL8LGcXIBAkUGIC1uVy9SMsr2scA9CySLD/i+Oqiw==",
"cpu": [
"arm64"
],
@@ -215,9 +215,9 @@
}
},
"node_modules/@next/swc-linux-arm64-musl": {
"version": "13.1.0",
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.1.0.tgz",
"integrity": "sha512-WAsZtCtPXlz/7/bnW9ryw856xEun+c6xSwZwbcvrMxtcSiW3z0LD91Nsj3AkexsjRtBjeEpNeVtDExqF2VKKSA==",
"version": "13.1.1",
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.1.1.tgz",
"integrity": "sha512-GA67ZbDq2AW0CY07zzGt07M5b5Yaq5qUpFIoW3UFfjOPgb0Sqf3DAW7GtFMK1sF4ROHsRDMGQ9rnT0VM2dVfKA==",
"cpu": [
"arm64"
],
@@ -230,9 +230,9 @@
}
},
"node_modules/@next/swc-linux-x64-gnu": {
"version": "13.1.0",
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.1.0.tgz",
"integrity": "sha512-Tjd5gieI3X9vPce5yF+GsQxOl0jwUkyOrTR1g5PQr+bT/9Qos/yPL48H1L5ayEp0hxgLVPW7skGal7lVnAoVEQ==",
"version": "13.1.1",
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.1.1.tgz",
"integrity": "sha512-nnjuBrbzvqaOJaV+XgT8/+lmXrSCOt1YYZn/irbDb2fR2QprL6Q7WJNgwsZNxiLSfLdv+2RJGGegBx9sLBEzGA==",
"cpu": [
"x64"
],
@@ -245,9 +245,9 @@
}
},
"node_modules/@next/swc-linux-x64-musl": {
"version": "13.1.0",
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.1.0.tgz",
"integrity": "sha512-H9UMEQv40e9pkgdX4mCms0dDf2dimmZ6WXhDTWF/yIh9icgcsHaP73BJ9IFlgvh80wLiUgWZ3LAX4vXnXzidmg==",
"version": "13.1.1",
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.1.1.tgz",
"integrity": "sha512-CM9xnAQNIZ8zf/igbIT/i3xWbQZYaF397H+JroF5VMOCUleElaMdQLL5riJml8wUfPoN3dtfn2s4peSr3azz/g==",
"cpu": [
"x64"
],
@@ -260,9 +260,9 @@
}
},
"node_modules/@next/swc-win32-arm64-msvc": {
"version": "13.1.0",
"resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.1.0.tgz",
"integrity": "sha512-LFFIKjW/cPl4wvG8HF/6oYPJZ+Jy32G3FUflC8UW1Od6W9yOSEvadhk9fMyDZN4cgsNOcVc3uVSMpcuuCpbDGw==",
"version": "13.1.1",
"resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.1.1.tgz",
"integrity": "sha512-pzUHOGrbgfGgPlOMx9xk3QdPJoRPU+om84hqVoe6u+E0RdwOG0Ho/2UxCgDqmvpUrMab1Deltlt6RqcXFpnigQ==",
"cpu": [
"arm64"
],
@@ -275,9 +275,9 @@
}
},
"node_modules/@next/swc-win32-ia32-msvc": {
"version": "13.1.0",
"resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.1.0.tgz",
"integrity": "sha512-MBLaoHZSenMdxhB3Ww1VNEhjyPT3uLjzAi5Ygk48LLLbOGu5KxQolhINRrqGuJWqJRNWSJ9JSFBfJrZwQzrUew==",
"version": "13.1.1",
"resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.1.1.tgz",
"integrity": "sha512-WeX8kVS46aobM9a7Xr/kEPcrTyiwJqQv/tbw6nhJ4fH9xNZ+cEcyPoQkwPo570dCOLz3Zo9S2q0E6lJ/EAUOBg==",
"cpu": [
"ia32"
],
@@ -290,9 +290,9 @@
}
},
"node_modules/@next/swc-win32-x64-msvc": {
"version": "13.1.0",
"resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.1.0.tgz",
"integrity": "sha512-fFTfIQvnmpbKoyh4v3ezlGqtERlgc2Sx8qJwPuYqoVi0V08wCx9wp2Iq1CINxP3UMHkEeNX7gYpDOd+9Cw9EiQ==",
"version": "13.1.1",
"resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.1.1.tgz",
"integrity": "sha512-mVF0/3/5QAc5EGVnb8ll31nNvf3BWpPY4pBb84tk+BfQglWLqc5AC9q1Ht/YMWiEgs8ALNKEQ3GQnbY0bJF2Gg==",
"cpu": [
"x64"
],
@@ -973,11 +973,11 @@
}
},
"node_modules/eslint-config-next": {
"version": "13.1.0",
"resolved": "https://registry.npmjs.org/eslint-config-next/-/eslint-config-next-13.1.0.tgz",
"integrity": "sha512-UdZm8GTR8PWys1dw+gJY+aLR/etkbTTsrRxiQ57nxqAE4Fw6PGZ2prLjqV6IhNkFve3c8ZgbCrUolfGad2mryA==",
"version": "13.1.1",
"resolved": "https://registry.npmjs.org/eslint-config-next/-/eslint-config-next-13.1.1.tgz",
"integrity": "sha512-/5S2XGWlGaiqrRhzpn51ux5JUSLwx8PVK2keLi5xk7QmhfYB8PqE6R6SlVw6hgnf/VexvUXSrlNJ/su00NhtHQ==",
"dependencies": {
"@next/eslint-plugin-next": "13.1.0",
"@next/eslint-plugin-next": "13.1.1",
"@rushstack/eslint-patch": "^1.1.3",
"@typescript-eslint/parser": "^5.42.0",
"eslint-import-resolver-node": "^0.3.6",
@@ -2139,11 +2139,11 @@
"integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw=="
},
"node_modules/next": {
"version": "13.1.0",
"resolved": "https://registry.npmjs.org/next/-/next-13.1.0.tgz",
"integrity": "sha512-lQMZH1V94L5IL/WaihQkTYabSY73aqgrkGPJB5uz+2O3ES4I3losV/maXLY7l7x5e+oNyE9N81upNQ8uRsR5/A==",
"version": "13.1.1",
"resolved": "https://registry.npmjs.org/next/-/next-13.1.1.tgz",
"integrity": "sha512-R5eBAaIa3X7LJeYvv1bMdGnAVF4fVToEjim7MkflceFPuANY3YyvFxXee/A+acrSYwYPvOvf7f6v/BM/48ea5w==",
"dependencies": {
"@next/env": "13.1.0",
"@next/env": "13.1.1",
"@swc/helpers": "0.4.14",
"caniuse-lite": "^1.0.30001406",
"postcss": "8.4.14",
@@ -2156,19 +2156,19 @@
"node": ">=14.6.0"
},
"optionalDependencies": {
"@next/swc-android-arm-eabi": "13.1.0",
"@next/swc-android-arm64": "13.1.0",
"@next/swc-darwin-arm64": "13.1.0",
"@next/swc-darwin-x64": "13.1.0",
"@next/swc-freebsd-x64": "13.1.0",
"@next/swc-linux-arm-gnueabihf": "13.1.0",
"@next/swc-linux-arm64-gnu": "13.1.0",
"@next/swc-linux-arm64-musl": "13.1.0",
"@next/swc-linux-x64-gnu": "13.1.0",
"@next/swc-linux-x64-musl": "13.1.0",
"@next/swc-win32-arm64-msvc": "13.1.0",
"@next/swc-win32-ia32-msvc": "13.1.0",
"@next/swc-win32-x64-msvc": "13.1.0"
"@next/swc-android-arm-eabi": "13.1.1",
"@next/swc-android-arm64": "13.1.1",
"@next/swc-darwin-arm64": "13.1.1",
"@next/swc-darwin-x64": "13.1.1",
"@next/swc-freebsd-x64": "13.1.1",
"@next/swc-linux-arm-gnueabihf": "13.1.1",
"@next/swc-linux-arm64-gnu": "13.1.1",
"@next/swc-linux-arm64-musl": "13.1.1",
"@next/swc-linux-x64-gnu": "13.1.1",
"@next/swc-linux-x64-musl": "13.1.1",
"@next/swc-win32-arm64-msvc": "13.1.1",
"@next/swc-win32-ia32-msvc": "13.1.1",
"@next/swc-win32-x64-msvc": "13.1.1"
},
"peerDependencies": {
"fibers": ">= 3.1.0",
@@ -3071,99 +3071,99 @@
"integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA=="
},
"@next/env": {
"version": "13.1.0",
"resolved": "https://registry.npmjs.org/@next/env/-/env-13.1.0.tgz",
"integrity": "sha512-6iNixFzCndH+Bl4FetQzOMjxCJqg8fs0LAlZviig1K6mIjOWH2m2oPcHcOg1Ta5VCe7Bx5KG1Hs+NrWDUkBt9A=="
"version": "13.1.1",
"resolved": "https://registry.npmjs.org/@next/env/-/env-13.1.1.tgz",
"integrity": "sha512-vFMyXtPjSAiOXOywMojxfKIqE3VWN5RCAx+tT3AS3pcKjMLFTCJFUWsKv8hC+87Z1F4W3r68qTwDFZIFmd5Xkw=="
},
"@next/eslint-plugin-next": {
"version": "13.1.0",
"resolved": "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-13.1.0.tgz",
"integrity": "sha512-LGh0iqcEwxs0HmEK96cXXuhofcOGSUGl8Zms279JW8Zq/6GJkXo87gtRpfJrwD+a77nEIdRaORPM91Us3xW0Qw==",
"version": "13.1.1",
"resolved": "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-13.1.1.tgz",
"integrity": "sha512-SBrOFS8PC3nQ5aeZmawJkjKkWjwK9RoxvBSv/86nZp0ubdoVQoko8r8htALd9ufp16NhacCdqhu9bzZLDWtALQ==",
"requires": {
"glob": "7.1.7"
}
},
"@next/font": {
"version": "13.1.0",
"resolved": "https://registry.npmjs.org/@next/font/-/font-13.1.0.tgz",
"integrity": "sha512-9+c2eWoeLftcGAul1fiXD8lL4o4/0beQrz2/0h0B0VV5AWrqCCfj/204quUxdp541ab+NCWVX/m49qjbqFMaFA=="
"version": "13.1.1",
"resolved": "https://registry.npmjs.org/@next/font/-/font-13.1.1.tgz",
"integrity": "sha512-amygRorS05hYK1/XQRZo5qBl7l2fpHnezeKU/cNveWU5QJg+sg8gMGkUXHtvesNKpiKIJshBRH1TzvO+2sKpvQ=="
},
"@next/swc-android-arm-eabi": {
"version": "13.1.0",
"resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-13.1.0.tgz",
"integrity": "sha512-ANBZZRjZBV+Sii11ZVxbxSvfIi6dZwu4w+XnJBDmz+0/wtAigpjYWyMkuWZ/RCD7INdusOlU4EgJ99WzWGIDjA==",
"version": "13.1.1",
"resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-13.1.1.tgz",
"integrity": "sha512-qnFCx1kT3JTWhWve4VkeWuZiyjG0b5T6J2iWuin74lORCupdrNukxkq9Pm+Z7PsatxuwVJMhjUoYz7H4cWzx2A==",
"optional": true
},
"@next/swc-android-arm64": {
"version": "13.1.0",
"resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-13.1.0.tgz",
"integrity": "sha512-nPwbkS3aZjCIe61wztgjXjIeylijOP8uGtDGjjJVUF3B/5GLVx3ngZu6tjPTMEgaLM0u//HuGK+aZolWUQWE4g==",
"version": "13.1.1",
"resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-13.1.1.tgz",
"integrity": "sha512-eCiZhTzjySubNqUnNkQCjU3Fh+ep3C6b5DCM5FKzsTH/3Gr/4Y7EiaPZKILbvnXmhWtKPIdcY6Zjx51t4VeTfA==",
"optional": true
},
"@next/swc-darwin-arm64": {
"version": "13.1.0",
"resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.1.0.tgz",
"integrity": "sha512-0hUydiAW18jK2uGPnZRdnRQtdB/3ZoPo84A6zH7MJHxAWw9lzVsv3kMg9kgVBBlrivzqdNN8rdgA+eYNxzXU9w==",
"version": "13.1.1",
"resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.1.1.tgz",
"integrity": "sha512-9zRJSSIwER5tu9ADDkPw5rIZ+Np44HTXpYMr0rkM656IvssowPxmhK0rTreC1gpUCYwFsRbxarUJnJsTWiutPg==",
"optional": true
},
"@next/swc-darwin-x64": {
"version": "13.1.0",
"resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-13.1.0.tgz",
"integrity": "sha512-3S3iQqJIysklj0Q9gnanuYMzF8H9p+fUVhvSHxVVLcKH4HsE8EGddNkXsaOyznL1kC6vGKw7h6uz1ojaXEafCA==",
"version": "13.1.1",
"resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-13.1.1.tgz",
"integrity": "sha512-qWr9qEn5nrnlhB0rtjSdR00RRZEtxg4EGvicIipqZWEyayPxhUu6NwKiG8wZiYZCLfJ5KWr66PGSNeDMGlNaiA==",
"optional": true
},
"@next/swc-freebsd-x64": {
"version": "13.1.0",
"resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-13.1.0.tgz",
"integrity": "sha512-wAgzwm/em48GIuWq3OYr0BpncMy7c+UA3hsyX+xKh/vb/sOIpQly7JTa+GNdk17s7kprhMfsgzPG3da36NLpkA==",
"version": "13.1.1",
"resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-13.1.1.tgz",
"integrity": "sha512-UwP4w/NcQ7V/VJEj3tGVszgb4pyUCt3lzJfUhjDMUmQbzG9LDvgiZgAGMYH6L21MoyAATJQPDGiAMWAPKsmumA==",
"optional": true
},
"@next/swc-linux-arm-gnueabihf": {
"version": "13.1.0",
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-13.1.0.tgz",
"integrity": "sha512-Cr2hzL7ad+4nj9KrR1Cz1RDcsWa61X6I7gc6PToRYIY4gL480Sijq19xo7dlXQPnr1viVzbNiNnNXZASHv7uvw==",
"version": "13.1.1",
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-13.1.1.tgz",
"integrity": "sha512-CnsxmKHco9sosBs1XcvCXP845Db+Wx1G0qouV5+Gr+HT/ZlDYEWKoHVDgnJXLVEQzq4FmHddBNGbXvgqM1Gfkg==",
"optional": true
},
"@next/swc-linux-arm64-gnu": {
"version": "13.1.0",
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.1.0.tgz",
"integrity": "sha512-EjCIKfeZB9h72evL2yGNwBvE5Im96Zn7o2zxImlvCiUYb/xXDqn4hzhck035BSP3g3sGDLfijFTE1wKRyXIk4w==",
"version": "13.1.1",
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.1.1.tgz",
"integrity": "sha512-JfDq1eri5Dif+VDpTkONRd083780nsMCOKoFG87wA0sa4xL8LGcXIBAkUGIC1uVy9SMsr2scA9CySLD/i+Oqiw==",
"optional": true
},
"@next/swc-linux-arm64-musl": {
"version": "13.1.0",
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.1.0.tgz",
"integrity": "sha512-WAsZtCtPXlz/7/bnW9ryw856xEun+c6xSwZwbcvrMxtcSiW3z0LD91Nsj3AkexsjRtBjeEpNeVtDExqF2VKKSA==",
"version": "13.1.1",
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.1.1.tgz",
"integrity": "sha512-GA67ZbDq2AW0CY07zzGt07M5b5Yaq5qUpFIoW3UFfjOPgb0Sqf3DAW7GtFMK1sF4ROHsRDMGQ9rnT0VM2dVfKA==",
"optional": true
},
"@next/swc-linux-x64-gnu": {
"version": "13.1.0",
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.1.0.tgz",
"integrity": "sha512-Tjd5gieI3X9vPce5yF+GsQxOl0jwUkyOrTR1g5PQr+bT/9Qos/yPL48H1L5ayEp0hxgLVPW7skGal7lVnAoVEQ==",
"version": "13.1.1",
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.1.1.tgz",
"integrity": "sha512-nnjuBrbzvqaOJaV+XgT8/+lmXrSCOt1YYZn/irbDb2fR2QprL6Q7WJNgwsZNxiLSfLdv+2RJGGegBx9sLBEzGA==",
"optional": true
},
"@next/swc-linux-x64-musl": {
"version": "13.1.0",
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.1.0.tgz",
"integrity": "sha512-H9UMEQv40e9pkgdX4mCms0dDf2dimmZ6WXhDTWF/yIh9icgcsHaP73BJ9IFlgvh80wLiUgWZ3LAX4vXnXzidmg==",
"version": "13.1.1",
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.1.1.tgz",
"integrity": "sha512-CM9xnAQNIZ8zf/igbIT/i3xWbQZYaF397H+JroF5VMOCUleElaMdQLL5riJml8wUfPoN3dtfn2s4peSr3azz/g==",
"optional": true
},
"@next/swc-win32-arm64-msvc": {
"version": "13.1.0",
"resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.1.0.tgz",
"integrity": "sha512-LFFIKjW/cPl4wvG8HF/6oYPJZ+Jy32G3FUflC8UW1Od6W9yOSEvadhk9fMyDZN4cgsNOcVc3uVSMpcuuCpbDGw==",
"version": "13.1.1",
"resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.1.1.tgz",
"integrity": "sha512-pzUHOGrbgfGgPlOMx9xk3QdPJoRPU+om84hqVoe6u+E0RdwOG0Ho/2UxCgDqmvpUrMab1Deltlt6RqcXFpnigQ==",
"optional": true
},
"@next/swc-win32-ia32-msvc": {
"version": "13.1.0",
"resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.1.0.tgz",
"integrity": "sha512-MBLaoHZSenMdxhB3Ww1VNEhjyPT3uLjzAi5Ygk48LLLbOGu5KxQolhINRrqGuJWqJRNWSJ9JSFBfJrZwQzrUew==",
"version": "13.1.1",
"resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.1.1.tgz",
"integrity": "sha512-WeX8kVS46aobM9a7Xr/kEPcrTyiwJqQv/tbw6nhJ4fH9xNZ+cEcyPoQkwPo570dCOLz3Zo9S2q0E6lJ/EAUOBg==",
"optional": true
},
"@next/swc-win32-x64-msvc": {
"version": "13.1.0",
"resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.1.0.tgz",
"integrity": "sha512-fFTfIQvnmpbKoyh4v3ezlGqtERlgc2Sx8qJwPuYqoVi0V08wCx9wp2Iq1CINxP3UMHkEeNX7gYpDOd+9Cw9EiQ==",
"version": "13.1.1",
"resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.1.1.tgz",
"integrity": "sha512-mVF0/3/5QAc5EGVnb8ll31nNvf3BWpPY4pBb84tk+BfQglWLqc5AC9q1Ht/YMWiEgs8ALNKEQ3GQnbY0bJF2Gg==",
"optional": true
},
"@nodelib/fs.scandir": {
@@ -3635,11 +3635,11 @@
}
},
"eslint-config-next": {
"version": "13.1.0",
"resolved": "https://registry.npmjs.org/eslint-config-next/-/eslint-config-next-13.1.0.tgz",
"integrity": "sha512-UdZm8GTR8PWys1dw+gJY+aLR/etkbTTsrRxiQ57nxqAE4Fw6PGZ2prLjqV6IhNkFve3c8ZgbCrUolfGad2mryA==",
"version": "13.1.1",
"resolved": "https://registry.npmjs.org/eslint-config-next/-/eslint-config-next-13.1.1.tgz",
"integrity": "sha512-/5S2XGWlGaiqrRhzpn51ux5JUSLwx8PVK2keLi5xk7QmhfYB8PqE6R6SlVw6hgnf/VexvUXSrlNJ/su00NhtHQ==",
"requires": {
"@next/eslint-plugin-next": "13.1.0",
"@next/eslint-plugin-next": "13.1.1",
"@rushstack/eslint-patch": "^1.1.3",
"@typescript-eslint/parser": "^5.42.0",
"eslint-import-resolver-node": "^0.3.6",
@@ -4466,24 +4466,24 @@
"integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw=="
},
"next": {
"version": "13.1.0",
"resolved": "https://registry.npmjs.org/next/-/next-13.1.0.tgz",
"integrity": "sha512-lQMZH1V94L5IL/WaihQkTYabSY73aqgrkGPJB5uz+2O3ES4I3losV/maXLY7l7x5e+oNyE9N81upNQ8uRsR5/A==",
"version": "13.1.1",
"resolved": "https://registry.npmjs.org/next/-/next-13.1.1.tgz",
"integrity": "sha512-R5eBAaIa3X7LJeYvv1bMdGnAVF4fVToEjim7MkflceFPuANY3YyvFxXee/A+acrSYwYPvOvf7f6v/BM/48ea5w==",
"requires": {
"@next/env": "13.1.0",
"@next/swc-android-arm-eabi": "13.1.0",
"@next/swc-android-arm64": "13.1.0",
"@next/swc-darwin-arm64": "13.1.0",
"@next/swc-darwin-x64": "13.1.0",
"@next/swc-freebsd-x64": "13.1.0",
"@next/swc-linux-arm-gnueabihf": "13.1.0",
"@next/swc-linux-arm64-gnu": "13.1.0",
"@next/swc-linux-arm64-musl": "13.1.0",
"@next/swc-linux-x64-gnu": "13.1.0",
"@next/swc-linux-x64-musl": "13.1.0",
"@next/swc-win32-arm64-msvc": "13.1.0",
"@next/swc-win32-ia32-msvc": "13.1.0",
"@next/swc-win32-x64-msvc": "13.1.0",
"@next/env": "13.1.1",
"@next/swc-android-arm-eabi": "13.1.1",
"@next/swc-android-arm64": "13.1.1",
"@next/swc-darwin-arm64": "13.1.1",
"@next/swc-darwin-x64": "13.1.1",
"@next/swc-freebsd-x64": "13.1.1",
"@next/swc-linux-arm-gnueabihf": "13.1.1",
"@next/swc-linux-arm64-gnu": "13.1.1",
"@next/swc-linux-arm64-musl": "13.1.1",
"@next/swc-linux-x64-gnu": "13.1.1",
"@next/swc-linux-x64-musl": "13.1.1",
"@next/swc-win32-arm64-msvc": "13.1.1",
"@next/swc-win32-ia32-msvc": "13.1.1",
"@next/swc-win32-x64-msvc": "13.1.1",
"@swc/helpers": "0.4.14",
"caniuse-lite": "^1.0.30001406",
"postcss": "8.4.14",

View File

@@ -9,10 +9,10 @@
"lint": "next lint"
},
"dependencies": {
"@next/font": "13.1.0",
"@next/font": "13.1.1",
"eslint": "8.30.0",
"eslint-config-next": "13.1.0",
"next": "13.1.0",
"eslint-config-next": "13.1.1",
"next": "13.1.1",
"react": "18.2.0",
"react-dom": "18.2.0"
}

View File

@@ -36,7 +36,7 @@
"prettier": "2.6.2",
"ts-eager": "2.0.2",
"ts-jest": "28.0.5",
"turbo": "1.4.7"
"turbo": "1.6.3"
},
"scripts": {
"lerna": "lerna",

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/build-utils",
"version": "5.7.2",
"version": "5.7.3",
"license": "MIT",
"main": "./dist/index.js",
"types": "./dist/index.d.js",

View File

@@ -2,23 +2,18 @@ import path from 'path';
import debug from '../debug';
import FileFsRef from '../file-fs-ref';
import { File, Files, Meta } from '../types';
import { remove, mkdirp, readlink, symlink, Stats } from 'fs-extra';
import { remove, mkdirp, readlink, symlink } from 'fs-extra';
import streamToBuffer from './stream-to-buffer';
export interface DownloadedFiles {
[filePath: string]: FileFsRef;
}
const STAT = new Stats();
const S_IFMT = 61440; /* 0170000 type of file */
const S_IFLNK = 40960; /* 0120000 symbolic link */
export function isSymbolicLink(mode: number): boolean {
STAT.mode = mode;
return STAT.isSymbolicLink();
}
export function isDirectory(mode: number): boolean {
STAT.mode = mode;
return STAT.isDirectory();
return (mode & S_IFMT) === S_IFLNK;
}
async function prepareSymlinkTarget(
@@ -51,11 +46,6 @@ export async function downloadFile(
): Promise<FileFsRef> {
const { mode } = file;
if (isDirectory(mode)) {
await mkdirp(fsPath);
return FileFsRef.fromFsPath({ mode, fsPath });
}
// If the source is a symlink, try to create it instead of copying the file.
// Note: creating symlinks on Windows requires admin priviliges or symlinks
// enabled in the group policy. We may want to improve the error message.

View File

@@ -15,7 +15,12 @@ export default async function glob(
opts: GlobOptions | string,
mountpoint?: string
): Promise<Record<string, FileFsRef>> {
const options: GlobOptions = typeof opts === 'string' ? { cwd: opts } : opts;
let options: GlobOptions;
if (typeof opts === 'string') {
options = { cwd: opts };
} else {
options = opts;
}
if (!options.cwd) {
throw new Error(
@@ -29,18 +34,13 @@ export default async function glob(
const results: Record<string, FileFsRef> = {};
const statCache: Record<string, Stats> = {};
const symlinks: Record<string, boolean | undefined> = {};
const files = await vanillaGlob(pattern, {
...options,
symlinks,
statCache,
stat: true,
dot: true,
});
options.symlinks = {};
options.statCache = statCache;
options.stat = true;
options.dot = true;
const dirs = new Set<string>();
const dirsWithEntries = new Set<string>();
const files = await vanillaGlob(pattern, options);
for (const relativePath of files) {
const fsPath = normalizePath(path.join(options.cwd, relativePath));
@@ -49,20 +49,12 @@ export default async function glob(
stat,
`statCache does not contain value for ${relativePath} (resolved to ${fsPath})`
);
const isSymlink = symlinks[fsPath];
if (isSymlink || stat.isFile() || stat.isDirectory()) {
const isSymlink = options.symlinks![fsPath];
if (isSymlink || stat.isFile()) {
if (isSymlink) {
stat = await lstat(fsPath);
}
// Some bookkeeping to track which directories already have entries within
const dirname = path.dirname(relativePath);
dirsWithEntries.add(dirname);
if (stat.isDirectory()) {
dirs.add(relativePath);
continue;
}
let finalPath = relativePath;
if (mountpoint) {
finalPath = path.join(mountpoint, finalPath);
@@ -72,20 +64,5 @@ export default async function glob(
}
}
// Add empty directory entries
for (const relativePath of dirs) {
if (dirsWithEntries.has(relativePath)) continue;
let finalPath = relativePath;
if (mountpoint) {
finalPath = path.join(mountpoint, finalPath);
}
const fsPath = normalizePath(path.join(options.cwd, relativePath));
const stat = statCache[fsPath];
results[finalPath] = new FileFsRef({ mode: stat.mode, fsPath });
}
return results;
}

View File

@@ -1,195 +0,0 @@
import path from 'path';
import fs, { readlink } from 'fs-extra';
import { strict as assert, strictEqual } from 'assert';
import { download, glob, FileBlob } from '../src';
describe('download()', () => {
let warningMessages: string[];
const originalConsoleWarn = console.warn;
beforeEach(() => {
warningMessages = [];
console.warn = m => {
warningMessages.push(m);
};
});
afterEach(() => {
console.warn = originalConsoleWarn;
});
it('should re-create FileFsRef symlinks properly', async () => {
if (process.platform === 'win32') {
console.log('Skipping test on windows');
return;
}
const files = await glob('**', path.join(__dirname, 'symlinks'));
assert.equal(Object.keys(files).length, 4);
const outDir = path.join(__dirname, 'symlinks-out');
await fs.remove(outDir);
const files2 = await download(files, outDir);
assert.equal(Object.keys(files2).length, 4);
const [linkStat, linkDirStat, aStat] = await Promise.all([
fs.lstat(path.join(outDir, 'link.txt')),
fs.lstat(path.join(outDir, 'link-dir')),
fs.lstat(path.join(outDir, 'a.txt')),
]);
assert(linkStat.isSymbolicLink());
assert(linkDirStat.isSymbolicLink());
assert(aStat.isFile());
const [linkDirContents, linkTextContents] = await Promise.all([
readlink(path.join(outDir, 'link-dir')),
readlink(path.join(outDir, 'link.txt')),
]);
strictEqual(linkDirContents, 'dir');
strictEqual(linkTextContents, './a.txt');
});
it('should re-create FileBlob symlinks properly', async () => {
if (process.platform === 'win32') {
console.log('Skipping test on windows');
return;
}
const files = {
'a.txt': new FileBlob({
mode: 33188,
contentType: undefined,
data: 'a text',
}),
'dir/b.txt': new FileBlob({
mode: 33188,
contentType: undefined,
data: 'b text',
}),
'link-dir': new FileBlob({
mode: 41453,
contentType: undefined,
data: 'dir',
}),
'link.txt': new FileBlob({
mode: 41453,
contentType: undefined,
data: 'a.txt',
}),
};
strictEqual(Object.keys(files).length, 4);
const outDir = path.join(__dirname, 'symlinks-out');
await fs.remove(outDir);
const files2 = await download(files, outDir);
strictEqual(Object.keys(files2).length, 4);
const [linkStat, linkDirStat, aStat, dirStat] = await Promise.all([
fs.lstat(path.join(outDir, 'link.txt')),
fs.lstat(path.join(outDir, 'link-dir')),
fs.lstat(path.join(outDir, 'a.txt')),
fs.lstat(path.join(outDir, 'dir')),
]);
assert(linkStat.isSymbolicLink());
assert(linkDirStat.isSymbolicLink());
assert(aStat.isFile());
assert(dirStat.isDirectory());
const [linkDirContents, linkTextContents] = await Promise.all([
readlink(path.join(outDir, 'link-dir')),
readlink(path.join(outDir, 'link.txt')),
]);
strictEqual(linkDirContents, 'dir');
strictEqual(linkTextContents, 'a.txt');
});
it('should download symlinks even with incorrect file', async () => {
if (process.platform === 'win32') {
console.log('Skipping test on windows');
return;
}
const files = {
'dir/file.txt': new FileBlob({
mode: 33188,
contentType: undefined,
data: 'file text',
}),
linkdir: new FileBlob({
mode: 41453,
contentType: undefined,
data: 'dir',
}),
'linkdir/file.txt': new FileBlob({
mode: 33188,
contentType: undefined,
data: 'this file should be discarded',
}),
};
const outDir = path.join(__dirname, 'symlinks-out');
await fs.remove(outDir);
await fs.mkdirp(outDir);
await download(files, outDir);
const [dir, file, linkdir] = await Promise.all([
fs.lstat(path.join(outDir, 'dir')),
fs.lstat(path.join(outDir, 'dir/file.txt')),
fs.lstat(path.join(outDir, 'linkdir')),
]);
expect(dir.isFile()).toBe(false);
expect(dir.isSymbolicLink()).toBe(false);
expect(file.isFile()).toBe(true);
expect(file.isSymbolicLink()).toBe(false);
expect(linkdir.isSymbolicLink()).toBe(true);
expect(warningMessages).toEqual([
'Warning: file "linkdir/file.txt" is within a symlinked directory "linkdir" and will be ignored',
]);
});
it('should create empty directory entries', async () => {
const outDir = path.join(__dirname, 'symlinks-out');
await fs.remove(outDir);
const files = {
'empty-dir': new FileBlob({
mode: 16877,
contentType: undefined,
data: '',
}),
dir: new FileBlob({
mode: 16877,
contentType: undefined,
data: '',
}),
'dir/subdir': new FileBlob({
mode: 16877,
contentType: undefined,
data: '',
}),
'another/subdir': new FileBlob({
mode: 16877,
contentType: undefined,
data: '',
}),
};
await download(files, outDir);
const stats = await Promise.all([
fs.lstat(path.join(outDir, 'empty-dir')),
fs.lstat(path.join(outDir, 'dir')),
fs.lstat(path.join(outDir, 'dir/subdir')),
fs.lstat(path.join(outDir, 'another/subdir')),
]);
for (const stat of stats) {
expect(stat.isDirectory()).toEqual(true);
}
});
});

View File

@@ -1,43 +0,0 @@
import fs from 'fs-extra';
import { join } from 'path';
import { tmpdir } from 'os';
import { glob } from '../src';
function isDirectory(mode: number): boolean {
const stat = new fs.Stats();
stat.mode = mode;
return stat.isDirectory();
}
describe('glob()', () => {
it('should return entries for empty directories', async () => {
const dir = await fs.mkdtemp(join(tmpdir(), 'build-utils-test'));
try {
await Promise.all([
fs.writeFile(join(dir, 'root.txt'), 'file at the root'),
fs.mkdirp(join(dir, 'empty-dir')),
fs
.mkdirp(join(dir, 'dir-with-file'))
.then(() =>
fs.writeFile(join(dir, 'dir-with-file/data.json'), '{"a":"b"}')
),
fs.mkdirp(join(dir, 'another/subdir')),
]);
const files = await glob('**', dir);
const fileNames = Object.keys(files).sort();
expect(fileNames).toHaveLength(4);
expect(fileNames).toEqual([
'another/subdir',
'dir-with-file/data.json',
'empty-dir',
'root.txt',
]);
expect(isDirectory(files['another/subdir'].mode)).toEqual(true);
expect(isDirectory(files['empty-dir'].mode)).toEqual(true);
expect(isDirectory(files['dir-with-file/data.json'].mode)).toEqual(false);
expect(isDirectory(files['root.txt'].mode)).toEqual(false);
} finally {
await fs.remove(dir);
}
});
});

View File

@@ -1,9 +1,10 @@
import ms from 'ms';
import path from 'path';
import fs from 'fs-extra';
import { strict as assert } from 'assert';
import fs, { readlink } from 'fs-extra';
import { strict as assert, strictEqual } from 'assert';
import { createZip } from '../src/lambda';
import { getSupportedNodeVersion } from '../src/fs/node-version';
import download from '../src/fs/download';
import {
glob,
spawnAsync,
@@ -13,6 +14,7 @@ import {
runNpmInstall,
runPackageJsonScript,
scanParentDirs,
FileBlob,
Prerender,
} from '../src';
@@ -49,6 +51,96 @@ afterEach(() => {
console.warn = originalConsoleWarn;
});
it('should re-create FileFsRef symlinks properly', async () => {
if (process.platform === 'win32') {
console.log('Skipping test on windows');
return;
}
const files = await glob('**', path.join(__dirname, 'symlinks'));
assert.equal(Object.keys(files).length, 4);
const outDir = path.join(__dirname, 'symlinks-out');
await fs.remove(outDir);
const files2 = await download(files, outDir);
assert.equal(Object.keys(files2).length, 4);
const [linkStat, linkDirStat, aStat] = await Promise.all([
fs.lstat(path.join(outDir, 'link.txt')),
fs.lstat(path.join(outDir, 'link-dir')),
fs.lstat(path.join(outDir, 'a.txt')),
]);
assert(linkStat.isSymbolicLink());
assert(linkDirStat.isSymbolicLink());
assert(aStat.isFile());
const [linkDirContents, linkTextContents] = await Promise.all([
readlink(path.join(outDir, 'link-dir')),
readlink(path.join(outDir, 'link.txt')),
]);
strictEqual(linkDirContents, 'dir');
strictEqual(linkTextContents, './a.txt');
});
it('should re-create FileBlob symlinks properly', async () => {
if (process.platform === 'win32') {
console.log('Skipping test on windows');
return;
}
const files = {
'a.txt': new FileBlob({
mode: 33188,
contentType: undefined,
data: 'a text',
}),
'dir/b.txt': new FileBlob({
mode: 33188,
contentType: undefined,
data: 'b text',
}),
'link-dir': new FileBlob({
mode: 41453,
contentType: undefined,
data: 'dir',
}),
'link.txt': new FileBlob({
mode: 41453,
contentType: undefined,
data: 'a.txt',
}),
};
strictEqual(Object.keys(files).length, 4);
const outDir = path.join(__dirname, 'symlinks-out');
await fs.remove(outDir);
const files2 = await download(files, outDir);
strictEqual(Object.keys(files2).length, 4);
const [linkStat, linkDirStat, aStat, dirStat] = await Promise.all([
fs.lstat(path.join(outDir, 'link.txt')),
fs.lstat(path.join(outDir, 'link-dir')),
fs.lstat(path.join(outDir, 'a.txt')),
fs.lstat(path.join(outDir, 'dir')),
]);
assert(linkStat.isSymbolicLink());
assert(linkDirStat.isSymbolicLink());
assert(aStat.isFile());
assert(dirStat.isDirectory());
const [linkDirContents, linkTextContents] = await Promise.all([
readlink(path.join(outDir, 'link-dir')),
readlink(path.join(outDir, 'link.txt')),
]);
strictEqual(linkDirContents, 'dir');
strictEqual(linkTextContents, 'a.txt');
});
it('should create zip files with symlinks properly', async () => {
if (process.platform === 'win32') {
console.log('Skipping test on windows');
@@ -77,6 +169,53 @@ it('should create zip files with symlinks properly', async () => {
assert(aStat.isFile());
});
it('should download symlinks even with incorrect file', async () => {
if (process.platform === 'win32') {
console.log('Skipping test on windows');
return;
}
const files = {
'dir/file.txt': new FileBlob({
mode: 33188,
contentType: undefined,
data: 'file text',
}),
linkdir: new FileBlob({
mode: 41453,
contentType: undefined,
data: 'dir',
}),
'linkdir/file.txt': new FileBlob({
mode: 33188,
contentType: undefined,
data: 'this file should be discarded',
}),
};
const outDir = path.join(__dirname, 'symlinks-out');
await fs.remove(outDir);
await fs.mkdirp(outDir);
await download(files, outDir);
const [dir, file, linkdir] = await Promise.all([
fs.lstat(path.join(outDir, 'dir')),
fs.lstat(path.join(outDir, 'dir/file.txt')),
fs.lstat(path.join(outDir, 'linkdir')),
]);
expect(dir.isFile()).toBe(false);
expect(dir.isSymbolicLink()).toBe(false);
expect(file.isFile()).toBe(true);
expect(file.isSymbolicLink()).toBe(false);
expect(linkdir.isSymbolicLink()).toBe(true);
expect(warningMessages).toEqual([
'Warning: file "linkdir/file.txt" is within a symlinked directory "linkdir" and will be ignored',
]);
});
it('should only match supported node versions, otherwise throw an error', async () => {
expect(await getSupportedNodeVersion('14.x', false)).toHaveProperty(
'major',

View File

@@ -1,6 +1,6 @@
{
"name": "vercel",
"version": "28.10.1",
"version": "28.10.3",
"preferGlobal": true,
"license": "Apache-2.0",
"description": "The command-line interface for Vercel",
@@ -41,16 +41,16 @@
"node": ">= 14"
},
"dependencies": {
"@vercel/build-utils": "5.7.2",
"@vercel/go": "2.2.21",
"@vercel/hydrogen": "0.0.35",
"@vercel/next": "3.3.5",
"@vercel/node": "2.8.2",
"@vercel/python": "3.1.31",
"@vercel/redwood": "1.0.41",
"@vercel/remix": "1.1.3",
"@vercel/ruby": "1.3.47",
"@vercel/static-build": "1.0.44",
"@vercel/build-utils": "5.7.3",
"@vercel/go": "2.2.22",
"@vercel/hydrogen": "0.0.36",
"@vercel/next": "3.3.7",
"@vercel/node": "2.8.4",
"@vercel/python": "3.1.32",
"@vercel/redwood": "1.0.43",
"@vercel/remix": "1.1.5",
"@vercel/ruby": "1.3.48",
"@vercel/static-build": "1.0.46",
"update-notifier": "5.1.0"
},
"devDependencies": {
@@ -93,10 +93,10 @@
"@types/which": "1.3.2",
"@types/write-json-file": "2.2.1",
"@types/yauzl-promise": "2.1.0",
"@vercel/client": "12.2.23",
"@vercel/client": "12.2.24",
"@vercel/error-utils": "1.0.3",
"@vercel/frameworks": "1.1.16",
"@vercel/fs-detectors": "3.5.6",
"@vercel/frameworks": "1.1.17",
"@vercel/fs-detectors": "3.6.0",
"@vercel/fun": "1.0.4",
"@vercel/ncc": "0.24.0",
"@zeit/source-map-support": "0.6.2",

View File

@@ -1,40 +1,28 @@
import fs from 'fs-extra';
import { join, relative, basename } from 'path';
import { relative, basename } from 'path';
import {
detectFramework,
monorepoManagers,
LocalFileSystemDetector,
packageManagers,
getMonorepoDefaultSettings,
MissingBuildPipeline,
MissingBuildTarget,
} from '@vercel/fs-detectors';
import { ProjectLinkAndSettings } from '../projects/project-settings';
import { Output } from '../output';
import title from 'title';
import JSON5 from 'json5';
import { PartialProjectSettings } from '../input/edit-project-settings';
export async function setMonorepoDefaultSettings(
cwd: string,
workPath: string,
projectSettings: ProjectLinkAndSettings['settings'],
projectSettings: ProjectLinkAndSettings['settings'] & PartialProjectSettings,
output: Output
) {
const localFileSystem = new LocalFileSystemDetector(cwd);
const [monorepoManager, packageManager] = await Promise.all([
detectFramework({
fs: localFileSystem,
frameworkList: monorepoManagers,
}),
detectFramework({
fs: localFileSystem,
frameworkList: packageManagers,
}),
]);
const projectName = basename(workPath);
const relativeToRoot = relative(workPath, cwd);
const setCommand = (
command: 'buildCommand' | 'installCommand',
command: 'buildCommand' | 'installCommand' | 'commandForIgnoringBuildStep',
value: string
) => {
if (projectSettings[command]) {
@@ -46,114 +34,43 @@ export async function setMonorepoDefaultSettings(
}
};
if (monorepoManager) {
output.log(
`Automatically detected ${title(
monorepoManager
)} monorepo manager. Attempting to assign default \`buildCommand\` and \`installCommand\` settings.`
try {
const result = await getMonorepoDefaultSettings(
projectName,
relative(cwd, workPath),
relativeToRoot,
localFileSystem
);
}
if (monorepoManager === 'turbo') {
const [turboJSONBuf, packageJSONBuf] = await Promise.all([
fs.readFile(join(cwd, 'turbo.json')).catch(() => null),
fs.readFile(join(cwd, 'package.json')).catch(() => null),
]);
let hasBuildPipeline = false;
if (turboJSONBuf !== null) {
const turboJSON = JSON5.parse(turboJSONBuf.toString('utf-8'));
if (turboJSON?.pipeline?.build) {
hasBuildPipeline = true;
}
} else if (packageJSONBuf !== null) {
const packageJSON = JSON.parse(packageJSONBuf.toString('utf-8'));
if (packageJSON?.turbo?.pipeline?.build) {
hasBuildPipeline = true;
}
}
if (!hasBuildPipeline) {
output.warn(
'Missing required `build` pipeline in turbo.json or package.json Turbo configuration. Skipping automatic setting assignment.'
);
if (result === null) {
return;
}
setCommand(
'buildCommand',
`cd ${relativeToRoot} && npx turbo run build --filter={./${relative(
cwd,
workPath
)}}...`
);
setCommand(
'installCommand',
`cd ${relativeToRoot} && ${packageManager} install`
);
} else if (monorepoManager === 'nx') {
// No ENOENT handling required here since conditional wouldn't be `true` unless `nx.json` was found.
const nxJSON = JSON5.parse(fs.readFileSync(join(cwd, 'nx.json'), 'utf-8'));
const { monorepoManager, ...commands } = result;
if (!nxJSON?.targetDefaults?.build) {
output.log(
'Missing default `build` target in nx.json. Checking for project level Nx configuration...'
output.log(
`Automatically detected ${title(
monorepoManager
)} monorepo manager. Attempting to assign default settings.`
);
setCommand('buildCommand', commands.buildCommand);
setCommand('installCommand', commands.installCommand);
if (commands.commandForIgnoringBuildStep) {
setCommand(
'commandForIgnoringBuildStep',
commands.commandForIgnoringBuildStep
);
const [projectJSONBuf, packageJSONBuf] = await Promise.all([
fs.readFile(join(workPath, 'project.json')).catch(() => null),
fs.readFile(join(workPath, 'package.json')).catch(() => null),
]);
let hasBuildTarget = false;
if (projectJSONBuf) {
output.log('Found project.json Nx configuration.');
const projectJSON = JSON5.parse(projectJSONBuf.toString('utf-8'));
if (projectJSON?.targets?.build) {
hasBuildTarget = true;
}
}
if (packageJSONBuf) {
const packageJSON = JSON5.parse(packageJSONBuf.toString('utf-8'));
if (packageJSON?.nx) {
output.log('Found package.json Nx configuration.');
if (packageJSON.nx.targets?.build) {
hasBuildTarget = true;
}
}
}
if (!hasBuildTarget) {
output.warn(
'Missing required `build` target in either project.json or package.json Nx configuration. Skipping automatic setting assignment.'
);
return;
}
}
} catch (error) {
if (
error instanceof MissingBuildPipeline ||
error instanceof MissingBuildTarget
) {
output.warn(`${error.message} Skipping automatic setting assignment.`);
return;
}
setCommand(
'buildCommand',
`cd ${relativeToRoot} && npx nx build ${projectName}`
);
setCommand(
'installCommand',
`cd ${relativeToRoot} && ${packageManager} install`
);
throw error;
}
// TODO (@Ethan-Arrowood) - Revisit rush support when we can test it better
/* else if (monorepoManager === 'rush') {
setCommand(
'buildCommand',
`node ${relativeToRoot}/common/scripts/install-run-rush.js build --to ${projectName}`
);
setCommand(
'installCommand',
`node ${relativeToRoot}/common/scripts/install-run-rush.js install`
);
} */
}

View File

@@ -2,6 +2,7 @@
"name": "vite-template-solid",
"version": "0.0.0",
"description": "",
"type": "module",
"scripts": {
"start": "vite",
"dev": "vite",

View File

@@ -10,7 +10,7 @@
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"module": "CommonJS",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,

View File

@@ -1172,6 +1172,7 @@ describe('build', () => {
afterAll(() => {
delete process.env.VERCEL_BUILD_MONOREPO_SUPPORT;
});
const setupMonorepoDetectionFixture = (fixture: string) => {
const cwd = setupFixture(`commands/build/monorepo-detection/${fixture}`);
process.chdir(cwd);
@@ -1188,14 +1189,12 @@ describe('build', () => {
'turbo',
'turbo-package-config',
])('fixture: %s', fixture => {
const monorepoManagerMap: Record<
string,
{ name: string; buildCommand: string; installCommand: string }
> = {
const monorepoManagerMap: Record<string, Record<string, string>> = {
turbo: {
name: 'Turbo',
buildCommand: 'cd ../.. && npx turbo run build --filter=app-1...',
installCommand: 'cd ../.. && yarn install',
ignoreCommand: 'cd ../.. && npx turbo-ignore',
},
nx: {
name: 'Nx',
@@ -1211,8 +1210,8 @@ describe('build', () => {
// },
};
const { name, buildCommand, installCommand } =
monorepoManagerMap[fixture.split('-')[0]];
const { name, ...commands } = monorepoManagerMap[fixture.split('-')[0]];
test(
'should detect and use correct defaults',
async () => {
@@ -1229,7 +1228,7 @@ describe('build', () => {
const exitCode = await build(client);
expect(exitCode).toBe(0);
await expect(client.stderr).toOutput(
`Automatically detected ${name} monorepo manager. Attempting to assign default \`buildCommand\` and \`installCommand\` settings.`
`Automatically detected ${name} monorepo manager. Attempting to assign default settings.`
);
const result = await fs.readFile(
join(cwd, '.vercel/output/static/index.txt'),
@@ -1262,14 +1261,23 @@ describe('build', () => {
await fs.readFile(projectJSONPath, 'utf-8')
);
const projectJSONCommands = {
...commands,
};
if (projectJSONCommands.ignoreCommand) {
projectJSONCommands.commandForIgnoringBuildStep =
projectJSONCommands.ignoreCommand;
delete projectJSONCommands.ignoreCommand;
}
await fs.writeFile(
projectJSONPath,
JSON.stringify({
...projectJSON,
settings: {
...projectJSON.settings,
buildCommand,
installCommand,
...projectJSONCommands,
},
})
);
@@ -1282,6 +1290,11 @@ describe('build', () => {
await expect(client.stderr).toOutput(
'Cannot automatically assign installCommand as it is already set via project settings or configuration overrides.'
);
if (name === 'Turbo') {
await expect(client.stderr).toOutput(
'Cannot automatically assign commandForIgnoringBuildStep as it is already set via project settings or configuration overrides.'
);
}
} finally {
process.chdir(originalCwd);
delete process.env.__VERCEL_BUILD_RUNNING;
@@ -1306,8 +1319,7 @@ describe('build', () => {
await fs.writeFile(
join(cwd, 'packages/app-1/vercel.json'),
JSON.stringify({
buildCommand,
installCommand,
...commands,
})
);
@@ -1319,6 +1331,11 @@ describe('build', () => {
await expect(client.stderr).toOutput(
'Cannot automatically assign installCommand as it is already set via project settings or configuration overrides.'
);
if (name === 'Turbo') {
await expect(client.stderr).toOutput(
'Cannot automatically assign commandForIgnoringBuildStep as it is already set via project settings or configuration overrides.'
);
}
} finally {
process.chdir(originalCwd);
delete process.env.__VERCEL_BUILD_RUNNING;
@@ -1463,8 +1480,7 @@ describe('build', () => {
'nx.json',
'targetDefaults.build',
[
'Missing default `build` target in nx.json. Checking for project level Nx configuration...',
'Missing required `build` target in either project.json or package.json Nx configuration. Skipping automatic setting assignment.',
'Missing required `build` target in either nx.json, project.json, or package.json Nx configuration. Skipping automatic setting assignment.',
],
],
[
@@ -1472,9 +1488,7 @@ describe('build', () => {
'packages/app-1/project.json',
'targets.build',
[
'Missing default `build` target in nx.json. Checking for project level Nx configuration...',
'Found project.json Nx configuration.',
'Missing required `build` target in either project.json or package.json Nx configuration. Skipping automatic setting assignment.',
'Missing required `build` target in either nx.json, project.json, or package.json Nx configuration. Skipping automatic setting assignment.',
],
],
[
@@ -1482,9 +1496,7 @@ describe('build', () => {
'packages/app-1/package.json',
'nx.targets.build',
[
'Missing default `build` target in nx.json. Checking for project level Nx configuration...',
'Found package.json Nx configuration.',
'Missing required `build` target in either project.json or package.json Nx configuration. Skipping automatic setting assignment.',
'Missing required `build` target in either nx.json, project.json, or package.json Nx configuration. Skipping automatic setting assignment.',
],
],
[

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/client",
"version": "12.2.23",
"version": "12.2.24",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
"homepage": "https://vercel.com",
@@ -43,7 +43,7 @@
]
},
"dependencies": {
"@vercel/build-utils": "5.7.2",
"@vercel/build-utils": "5.7.3",
"@vercel/routing-utils": "2.1.3",
"@zeit/fetch": "5.2.0",
"async-retry": "1.2.3",

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/frameworks",
"version": "1.1.16",
"version": "1.1.17",
"main": "./dist/frameworks.js",
"types": "./dist/frameworks.d.ts",
"files": [

View File

@@ -29,9 +29,12 @@ export const frameworks = [
envPrefix: 'NEXT_PUBLIC_',
useRuntime: { src: 'package.json', use: '@vercel/next' },
detectors: {
every: [
some: [
{
path: 'blitz.config.(js|ts)',
path: 'blitz.config.js',
},
{
path: 'blitz.config.ts',
},
],
},
@@ -1761,7 +1764,7 @@ export const frameworks = [
{
name: 'VitePress',
slug: 'vitepress',
demo: 'https://vitepress-starter-template.vercel.app/',
demo: 'https://vitepress-starter-template.vercel.app',
logo: 'https://api-frameworks.vercel.sh/framework-logos/vite.svg',
tagline: "VitePress is VuePress' little brother, built on top of Vite.",
description: 'VuePress on top of Vite',

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/fs-detectors",
"version": "3.5.6",
"version": "3.6.0",
"description": "Vercel filesystem detectors",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
@@ -20,11 +20,11 @@
},
"dependencies": {
"@vercel/error-utils": "1.0.3",
"@vercel/frameworks": "1.1.16",
"@vercel/frameworks": "1.1.17",
"@vercel/routing-utils": "2.1.3",
"glob": "8.0.3",
"js-yaml": "4.1.0",
"json5": "2.2.1",
"json5": "2.2.2",
"minimatch": "3.0.4",
"semver": "6.1.1"
},
@@ -35,7 +35,7 @@
"@types/minimatch": "3.0.5",
"@types/node": "14.18.33",
"@types/semver": "7.3.10",
"@vercel/build-utils": "5.7.2",
"@vercel/build-utils": "5.7.3",
"typescript": "4.3.4"
}
}

View File

@@ -23,3 +23,4 @@ export {
export { monorepoManagers } from './monorepos/monorepo-managers';
export { isOfficialRuntime, isStaticRuntime } from './is-official-runtime';
export { packageManagers } from './package-managers/package-managers';
export * from './monorepos/get-monorepo-default-settings';

View File

@@ -0,0 +1,130 @@
import { join } from 'path';
import { monorepoManagers } from './monorepo-managers';
import { packageManagers } from '../package-managers/package-managers';
import { DetectorFilesystem } from '../detectors/filesystem';
import { detectFramework } from '../detect-framework';
import JSON5 from 'json5';
export class MissingBuildPipeline extends Error {
constructor() {
super(
'Missing required `build` pipeline in turbo.json or package.json Turbo configuration.'
);
}
}
export class MissingBuildTarget extends Error {
constructor() {
super(
'Missing required `build` target in either nx.json, project.json, or package.json Nx configuration.'
);
}
}
export async function getMonorepoDefaultSettings(
projectName: string,
projectPath: string,
relativeToRoot: string,
detectorFilesystem: DetectorFilesystem
) {
const [monorepoManager, packageManager] = await Promise.all([
detectFramework({
fs: detectorFilesystem,
frameworkList: monorepoManagers,
}),
detectFramework({
fs: detectorFilesystem,
frameworkList: packageManagers,
}),
]);
if (monorepoManager === 'turbo') {
const [turboJSONBuf, packageJSONBuf] = await Promise.all([
detectorFilesystem.readFile('turbo.json').catch(() => null),
detectorFilesystem.readFile('package.json').catch(() => null),
]);
let hasBuildPipeline = false;
if (turboJSONBuf !== null) {
const turboJSON = JSON5.parse(turboJSONBuf.toString('utf-8'));
if (turboJSON?.pipeline?.build) {
hasBuildPipeline = true;
}
} else if (packageJSONBuf !== null) {
const packageJSON = JSON.parse(packageJSONBuf.toString('utf-8'));
if (packageJSON?.turbo?.pipeline?.build) {
hasBuildPipeline = true;
}
}
if (!hasBuildPipeline) {
throw new MissingBuildPipeline();
}
return {
monorepoManager: 'turbo',
buildCommand: `cd ${relativeToRoot} && npx turbo run build --filter=${projectName}...`,
installCommand: `cd ${relativeToRoot} && ${packageManager} install`,
commandForIgnoringBuildStep: `cd ${relativeToRoot} && npx turbo-ignore`,
};
} else if (monorepoManager === 'nx') {
// No ENOENT handling required here since conditional wouldn't be `true` unless `nx.json` was found.
const nxJSONBuf = await detectorFilesystem.readFile('nx.json');
const nxJSON = JSON5.parse(nxJSONBuf.toString('utf-8'));
if (!nxJSON?.targetDefaults?.build) {
const [projectJSONBuf, packageJSONBuf] = await Promise.all([
detectorFilesystem
.readFile(join(projectPath, 'project.json'))
.catch(() => null),
detectorFilesystem
.readFile(join(projectPath, 'package.json'))
.catch(() => null),
]);
let hasBuildTarget = false;
if (projectJSONBuf) {
const projectJSON = JSON5.parse(projectJSONBuf.toString('utf-8'));
if (projectJSON?.targets?.build) {
hasBuildTarget = true;
}
}
if (packageJSONBuf) {
const packageJSON = JSON5.parse(packageJSONBuf.toString('utf-8'));
if (packageJSON?.nx) {
if (packageJSON.nx.targets?.build) {
hasBuildTarget = true;
}
}
}
if (!hasBuildTarget) {
throw new MissingBuildTarget();
}
}
return {
monorepoManager: 'nx',
buildCommand: `cd ${relativeToRoot} && npx nx build ${projectName}`,
installCommand: `cd ${relativeToRoot} && ${packageManager} install`,
};
}
// TODO (@Ethan-Arrowood) - Revisit rush support when we can test it better
/* else if (monorepoManager === 'rush') {
setCommand(
'buildCommand',
`node ${relativeToRoot}/common/scripts/install-run-rush.js build --to ${projectName}`
);
setCommand(
'installCommand',
`node ${relativeToRoot}/common/scripts/install-run-rush.js install`
);
} */
return null;
}

View File

@@ -0,0 +1,4 @@
{
"extends": "nx/presets/npm.json",
"tasksRunnerOptions": { "default": { "runner": "nx/tasks-runners/default" } }
}

View File

@@ -0,0 +1,9 @@
{
"private": true,
"workspaces": [
"packages/*"
],
"devDependencies": {
"nx": "15.0.1"
}
}

View File

@@ -0,0 +1,17 @@
{
"name": "app-1",
"version": "0.0.1",
"nx": {
"targets": {
"build": {
"executor": "nx:run-script",
"options": {
"script": "build"
},
"dependsOn": [
"^build"
]
}
}
}
}

View File

@@ -0,0 +1,4 @@
{
"extends": "nx/presets/npm.json",
"tasksRunnerOptions": { "default": { "runner": "nx/tasks-runners/default" } }
}

View File

@@ -0,0 +1,9 @@
{
"private": true,
"workspaces": [
"packages/*"
],
"devDependencies": {
"nx": "15.0.1"
}
}

View File

@@ -0,0 +1,7 @@
{
"name": "app-1",
"version": "0.0.1",
"nx": {
"targets": {}
}
}

View File

@@ -0,0 +1,9 @@
{
"targets": {
"build": {
"executor": "nx:run-script",
"options": { "script": "build" },
"dependsOn": ["^build"]
}
}
}

View File

@@ -0,0 +1,4 @@
{
"extends": "nx/presets/npm.json",
"tasksRunnerOptions": { "default": { "runner": "nx/tasks-runners/default" } }
}

View File

@@ -0,0 +1,9 @@
{
"private": true,
"workspaces": [
"packages/*"
],
"devDependencies": {
"nx": "15.0.1"
}
}

View File

@@ -0,0 +1,17 @@
{
"name": "app-1",
"version": "0.0.1",
"nx": {
"targets": {
"build": {
"executor": "nx:run-script",
"options": {
"script": "build"
},
"dependsOn": [
"^build"
]
}
}
}
}

View File

@@ -0,0 +1,4 @@
{
"extends": "nx/presets/npm.json",
"tasksRunnerOptions": { "default": { "runner": "nx/tasks-runners/default" } }
}

View File

@@ -0,0 +1,9 @@
{
"private": true,
"workspaces": [
"packages/*"
],
"devDependencies": {
"nx": "15.0.1"
}
}

View File

@@ -0,0 +1,4 @@
{
"name": "app-1",
"version": "0.0.1"
}

View File

@@ -0,0 +1,9 @@
{
"targets": {
"build": {
"executor": "nx:run-script",
"options": { "script": "build" },
"dependsOn": ["^build"]
}
}
}

View File

@@ -0,0 +1,5 @@
{
"extends": "nx/presets/npm.json",
"tasksRunnerOptions": { "default": { "runner": "nx/tasks-runners/default" } },
"targetDefaults": { "build": { "dependsOn": ["^build"] } }
}

View File

@@ -0,0 +1,9 @@
{
"private": true,
"workspaces": [
"packages/*"
],
"devDependencies": {
"nx": "15.0.1"
}
}

View File

@@ -0,0 +1,4 @@
{
"name": "app-1",
"version": "0.0.1"
}

View File

@@ -0,0 +1,21 @@
{
"private": true,
"workspaces": [
"packages/*"
],
"devDependencies": {
"turbo": "1.6.3"
},
"turbo": {
"pipeline": {
"build": {
"dependsOn": [
"^build"
],
"outputs": [
"dist/**"
]
}
}
}
}

View File

@@ -0,0 +1,4 @@
{
"name": "app-1",
"version": "0.0.1"
}

View File

@@ -0,0 +1,9 @@
{
"private": true,
"workspaces": [
"packages/*"
],
"devDependencies": {
"turbo": "1.6.3"
}
}

View File

@@ -0,0 +1,4 @@
{
"name": "app-1",
"version": "0.0.1"
}

View File

@@ -0,0 +1,2 @@
// TEST COMMENT TO VERIFY JSON5 SUPPORT
{ "pipeline": { "build": { "dependsOn": ["^build"], "outputs": ["dist/**"] } } }

View File

@@ -420,5 +420,13 @@ describe('DetectorFilesystem', () => {
expect(await detectFramework({ fs, frameworkList })).toBe('zola');
});
it('Detect Blitz.js (Legacy)', async () => {
const fs = new VirtualFilesystem({
'blitz.config.js': '// some config',
});
expect(await detectFramework({ fs, frameworkList })).toBe('blitzjs');
});
});
});

View File

@@ -0,0 +1,69 @@
import {
getMonorepoDefaultSettings,
LocalFileSystemDetector,
MissingBuildPipeline,
MissingBuildTarget,
} from '../src';
import path from 'path';
import fs from 'fs';
import os from 'os';
import { FixtureFilesystem } from './utils/fixture-filesystem';
describe('getMonorepoDefaultSettings', () => {
test('MissingBuildTarget is an error', () => {
const missingBuildTarget = new MissingBuildTarget();
expect(missingBuildTarget).toBeInstanceOf(Error);
expect(missingBuildTarget.message).toBe(
'Missing required `build` target in either nx.json, project.json, or package.json Nx configuration.'
);
});
test('MissingBuildPipeline is an error', () => {
const missingBuildPipeline = new MissingBuildPipeline();
expect(missingBuildPipeline).toBeInstanceOf(Error);
expect(missingBuildPipeline.message).toBe(
'Missing required `build` pipeline in turbo.json or package.json Turbo configuration.'
);
});
test.each([
['turbo', 'turbo'],
['turbo-package-config', 'turbo'],
['nx', 'nx'],
['nx-package-config', 'nx'],
['nx-project-and-package-config-1', 'nx'],
['nx-project-and-package-config-2', 'nx'],
['nx-project-config', 'nx'],
])('fixture %s', async (fixture, expectedResultKey) => {
const expectedResultMap: Record<string, Record<string, string>> = {
turbo: {
monorepoManager: 'turbo',
buildCommand: 'cd ../.. && npx turbo run build --filter=app-1...',
installCommand: 'cd ../.. && yarn install',
commandForIgnoringBuildStep: 'cd ../.. && npx turbo-ignore',
},
nx: {
monorepoManager: 'nx',
buildCommand: 'cd ../.. && npx nx build app-1',
installCommand: 'cd ../.. && yarn install',
},
};
const ffs = new FixtureFilesystem(
path.join(__dirname, 'fixtures', 'get-monorepo-default-settings', fixture)
);
const result = await getMonorepoDefaultSettings(
'app-1',
'packages/app-1',
'../..',
ffs
);
expect(result).toStrictEqual(expectedResultMap[expectedResultKey]);
});
test('returns null when neither nx nor turbo is detected', async () => {
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'monorepo-test-'));
const lfs = new LocalFileSystemDetector(dir);
const result = await getMonorepoDefaultSettings('', '', '', lfs);
expect(result).toBe(null);
});
});

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/go",
"version": "2.2.21",
"version": "2.2.22",
"license": "MIT",
"main": "./dist/index",
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/go",
@@ -35,7 +35,7 @@
"@types/jest": "28.1.6",
"@types/node-fetch": "^2.3.0",
"@types/tar": "^4.0.0",
"@vercel/build-utils": "5.7.2",
"@vercel/build-utils": "5.7.3",
"@vercel/ncc": "0.24.0",
"async-retry": "1.3.1",
"execa": "^1.0.0",

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/hydrogen",
"version": "0.0.35",
"version": "0.0.36",
"license": "MIT",
"main": "./dist/index.js",
"homepage": "https://vercel.com/docs",
@@ -21,7 +21,7 @@
"devDependencies": {
"@types/jest": "27.5.1",
"@types/node": "14.18.33",
"@vercel/build-utils": "5.7.2",
"@vercel/build-utils": "5.7.3",
"@vercel/static-config": "2.0.6",
"typescript": "4.6.4"
}

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/next",
"version": "3.3.5",
"version": "3.3.7",
"license": "MIT",
"main": "./dist/index",
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/next-js",
@@ -45,8 +45,8 @@
"@types/semver": "6.0.0",
"@types/text-table": "0.2.1",
"@types/webpack-sources": "3.2.0",
"@vercel/build-utils": "5.7.2",
"@vercel/nft": "0.22.1",
"@vercel/build-utils": "5.7.3",
"@vercel/nft": "0.22.5",
"@vercel/routing-utils": "2.1.3",
"async-sema": "3.0.1",
"buffer-crc32": "0.2.13",

View File

@@ -1,6 +1,6 @@
{
"dependencies": {
"isomorphic-unfetch": "latest",
"isomorphic-unfetch": "3.1.0",
"next": "7.0.0"
}
}

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/node-bridge",
"version": "3.1.2",
"version": "3.1.3",
"license": "MIT",
"main": "./index.js",
"repository": {

View File

@@ -13,8 +13,8 @@ test('port binding', async () => {
// Test port binding
const info = await bridge.listening;
assert.equal(info.address, '127.0.0.1');
assert.equal(typeof info.port, 'number');
assert.strictEqual(info.address, '127.0.0.1');
assert.strictEqual(typeof info.port, 'number');
server.close();
});
@@ -41,13 +41,13 @@ test('`APIGatewayProxyEvent` normalizing', async () => {
},
context
);
assert.equal(result.encoding, 'base64');
assert.equal(result.statusCode, 200);
assert.strictEqual(result.encoding, 'base64');
assert.strictEqual(result.statusCode, 200);
const body = JSON.parse(Buffer.from(result.body, 'base64').toString());
assert.equal(body.method, 'GET');
assert.equal(body.path, '/apigateway');
assert.equal(body.headers.foo, 'bar');
assert.equal(context.callbackWaitsForEmptyEventLoop, false);
assert.strictEqual(body.method, 'GET');
assert.strictEqual(body.path, '/apigateway');
assert.strictEqual(body.headers.foo, 'bar');
assert.strictEqual(context.callbackWaitsForEmptyEventLoop, false);
server.close();
});
@@ -77,13 +77,13 @@ test('`NowProxyEvent` normalizing', async () => {
},
context
);
assert.equal(result.encoding, 'base64');
assert.equal(result.statusCode, 200);
assert.strictEqual(result.encoding, 'base64');
assert.strictEqual(result.statusCode, 200);
const body = JSON.parse(Buffer.from(result.body, 'base64').toString());
assert.equal(body.method, 'POST');
assert.equal(body.path, '/nowproxy');
assert.equal(body.headers.foo, 'baz');
assert.equal(context.callbackWaitsForEmptyEventLoop, false);
assert.strictEqual(body.method, 'POST');
assert.strictEqual(body.path, '/nowproxy');
assert.strictEqual(body.headers.foo, 'baz');
assert.strictEqual(context.callbackWaitsForEmptyEventLoop, false);
server.close();
});
@@ -137,9 +137,9 @@ test('multi-payload handling', async () => {
},
context
);
assert.equal(result.encoding, 'base64');
assert.equal(result.statusCode, 200);
assert.equal(
assert.strictEqual(result.encoding, 'base64');
assert.strictEqual(result.statusCode, 200);
assert.strictEqual(
result.headers['content-type'],
'multipart/mixed; boundary="payload-separator"'
);
@@ -164,25 +164,34 @@ test('multi-payload handling', async () => {
// proper parsing of the multipart body
assert(payloadParts.some(part => part.includes('content-type: text/plain')));
assert.equal(bodies[0].method, 'GET');
assert.equal(bodies[0].path, '/nowproxy');
assert.equal(bodies[0].headers.foo, 'baz');
assert.equal(bodies[1].method, 'GET');
assert.equal(bodies[1].path, '/_next/data/build-id/nowproxy.json');
assert.equal(bodies[1].headers.foo, 'baz');
assert.equal(bodies[2], '/somewhere');
assert.equal(result.headers['x-vercel-payload-3-status'], '307');
assert.equal(result.headers['x-vercel-payload-2-status'], undefined);
assert.equal(result.headers['x-vercel-payload-1-status'], undefined);
assert.equal(result.headers['x-vercel-payload-1-content-type'], 'text/html');
assert.equal(
assert.strictEqual(bodies[0].method, 'GET');
assert.strictEqual(bodies[0].path, '/nowproxy');
assert.strictEqual(bodies[0].headers.foo, 'baz');
assert.strictEqual(bodies[1].method, 'GET');
assert.strictEqual(bodies[1].path, '/_next/data/build-id/nowproxy.json');
assert.strictEqual(bodies[1].headers.foo, 'baz');
assert.strictEqual(bodies[2], '/somewhere');
assert.strictEqual(result.headers['x-vercel-payload-3-status'], '307');
assert.strictEqual(result.headers['x-vercel-payload-2-status'], undefined);
assert.strictEqual(result.headers['x-vercel-payload-1-status'], undefined);
assert.strictEqual(
result.headers['x-vercel-payload-1-content-type'],
'text/html'
);
assert.strictEqual(
result.headers['x-vercel-payload-2-content-type'],
'application/json'
);
assert.equal(result.headers['x-vercel-payload-3-content-type'], undefined);
assert.equal(result.headers['x-vercel-payload-3-location'], '/somewhere');
assert.equal(result.headers['x-vercel-payload-2-location'], undefined);
assert.equal(context.callbackWaitsForEmptyEventLoop, false);
assert.strictEqual(
result.headers['x-vercel-payload-3-content-type'],
undefined
);
assert.strictEqual(
result.headers['x-vercel-payload-3-location'],
'/somewhere'
);
assert.strictEqual(result.headers['x-vercel-payload-2-location'], undefined);
assert.strictEqual(context.callbackWaitsForEmptyEventLoop, false);
server.close();
});
@@ -288,14 +297,14 @@ test('invalid request headers', async () => {
},
context
);
assert.equal(result.encoding, 'base64');
assert.equal(result.statusCode, 200);
assert.strictEqual(result.encoding, 'base64');
assert.strictEqual(result.statusCode, 200);
const body = JSON.parse(Buffer.from(result.body, 'base64').toString());
assert.equal(body.method, 'GET');
assert.equal(body.path, '/nowproxy');
assert.equal(body.headers.ok, 'true');
assert.strictEqual(body.method, 'GET');
assert.strictEqual(body.path, '/nowproxy');
assert.strictEqual(body.headers.ok, 'true');
assert(!body.headers.foo);
assert.equal(context.callbackWaitsForEmptyEventLoop, false);
assert.strictEqual(context.callbackWaitsForEmptyEventLoop, false);
server.close();
});

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/node",
"version": "2.8.2",
"version": "2.8.4",
"license": "MIT",
"main": "./dist/index",
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/node-js",
@@ -31,14 +31,14 @@
"dependencies": {
"@edge-runtime/vm": "2.0.0",
"@types/node": "14.18.33",
"@vercel/build-utils": "5.7.2",
"@vercel/node-bridge": "3.1.2",
"@vercel/build-utils": "5.7.3",
"@vercel/node-bridge": "3.1.3",
"@vercel/static-config": "2.0.6",
"edge-runtime": "2.0.0",
"esbuild": "0.14.47",
"exit-hook": "2.2.1",
"node-fetch": "2.6.7",
"ts-node": "8.9.1",
"ts-node": "10.9.1",
"typescript": "4.3.4"
},
"devDependencies": {
@@ -53,7 +53,7 @@
"@types/node-fetch": "^2.6.1",
"@types/test-listen": "1.1.0",
"@vercel/ncc": "0.24.0",
"@vercel/nft": "0.22.1",
"@vercel/nft": "0.22.5",
"content-type": "1.0.4",
"cookie": "0.4.0",
"etag": "1.8.1",

View File

@@ -1,73 +1,15 @@
const entrypoint = process.env.VERCEL_DEV_ENTRYPOINT;
delete process.env.VERCEL_DEV_ENTRYPOINT;
const tsconfig = process.env.VERCEL_DEV_TSCONFIG;
delete process.env.VERCEL_DEV_TSCONFIG;
if (!entrypoint) {
throw new Error('`VERCEL_DEV_ENTRYPOINT` must be defined');
}
delete process.env.TS_NODE_TRANSPILE_ONLY;
delete process.env.TS_NODE_COMPILER_OPTIONS;
import { join } from 'path';
import { register } from 'ts-node';
import { fixConfig } from './typescript';
type TypescriptModule = typeof import('typescript');
let useRequire = false;
if (!process.env.VERCEL_DEV_IS_ESM) {
const resolveTypescript = (p: string): string => {
try {
return require.resolve('typescript', {
paths: [p],
});
} catch (_) {
return '';
}
};
const requireTypescript = (p: string): TypescriptModule => {
// eslint-disable-next-line @typescript-eslint/no-var-requires
return require(p) as TypescriptModule;
};
let ts: TypescriptModule | null = null;
// Use the project's version of Typescript if available and supports `target`
let compiler = resolveTypescript(process.cwd());
if (compiler) {
ts = requireTypescript(compiler);
}
// Otherwise fall back to using the copy that `@vercel/node` uses
if (!ts) {
compiler = resolveTypescript(join(__dirname, '..'));
ts = requireTypescript(compiler);
}
let config: any = {};
if (tsconfig) {
try {
config = ts.readConfigFile(tsconfig, ts.sys.readFile).config;
} catch (err) {
if (err.code !== 'ENOENT') {
console.error(`Error while parsing "${tsconfig}"`);
throw err;
}
}
}
fixConfigDev(config);
register({
compiler,
compilerOptions: config.compilerOptions,
transpileOnly: true,
});
useRequire = true;
}
const useRequire = process.env.VERCEL_DEV_IS_ESM !== '1';
import { createServer, Server, IncomingMessage, ServerResponse } from 'http';
import { VercelProxyResponse } from '@vercel/node-bridge/types';
@@ -195,21 +137,6 @@ export async function onDevRequest(
}
}
export function fixConfigDev(config: { compilerOptions: any }): void {
const nodeVersionMajor = Number(process.versions.node.split('.')[0]);
fixConfig(config, nodeVersionMajor);
// In prod, `.ts` inputs use TypeScript and
// `.js` inputs use Babel to convert ESM to CJS.
// In dev, both `.ts` and `.js` inputs use ts-node
// without Babel so we must enable `allowJs`.
config.compilerOptions.allowJs = true;
// In prod, we emit outputs to the filesystem.
// In dev, we don't emit because we use ts-node.
config.compilerOptions.noEmit = true;
}
main().catch(err => {
logError(err);
process.exit(1);

View File

@@ -52,7 +52,7 @@ import type {
} from '@vercel/build-utils';
import { getConfig } from '@vercel/static-config';
import { Register, register } from './typescript';
import { fixConfig, Register, register } from './typescript';
import {
EdgeRuntimes,
entrypointToOutputPath,
@@ -62,6 +62,8 @@ import {
export { shouldServe };
type TypescriptModule = typeof import('typescript');
interface DownloadOptions {
files: Files;
entrypoint: string;
@@ -516,8 +518,9 @@ export const startDevServer: StartDevServer = async opts => {
}
const entryDir = dirname(entrypointPath);
const ext = extname(entrypoint);
const projectTsConfig = await walkParentDirs({
const pathToTsConfig = await walkParentDirs({
base: workPath,
start: entryDir,
filename: 'tsconfig.json',
@@ -528,20 +531,99 @@ export const startDevServer: StartDevServer = async opts => {
filename: 'package.json',
});
const pkg = pathToPkg ? require_(pathToPkg) : {};
const tsNodePath = require_.resolve('ts-node');
const esmLoader = join(tsNodePath, '..', '..', 'esm.mjs');
const cjsLoader = join(tsNodePath, '..', '..', 'register', 'index.js');
const isTypescript = ['.ts', '.tsx', '.mts', '.cts'].includes(ext);
const maybeTranspile = isTypescript || !['.cjs', '.mjs'].includes(ext);
const isEsm =
entrypoint.endsWith('.mjs') ||
(pkg.type === 'module' && entrypoint.endsWith('.js'));
ext === '.mjs' ||
ext === '.mts' ||
(pkg.type === 'module' && ['.js', '.ts', '.tsx'].includes(ext));
const devServerPath = join(__dirname, 'dev-server.js');
let nodeOptions = process.env.NODE_OPTIONS;
let tsConfig: any = {};
if (maybeTranspile) {
const resolveTypescript = (p: string): string => {
try {
return require_.resolve('typescript', {
paths: [p],
});
} catch (_) {
return '';
}
};
const requireTypescript = (p: string): TypescriptModule => require_(p);
let ts: TypescriptModule | null = null;
// Use the project's version of Typescript if available and supports `target`
let compiler = resolveTypescript(process.cwd());
if (compiler) {
ts = requireTypescript(compiler);
}
// Otherwise fall back to using the copy that `@vercel/node` uses
if (!ts) {
compiler = resolveTypescript(join(__dirname, '..'));
ts = requireTypescript(compiler);
}
if (pathToTsConfig) {
try {
tsConfig = ts.readConfigFile(pathToTsConfig, ts.sys.readFile).config;
} catch (err) {
if (err.code !== 'ENOENT') {
console.error(`Error while parsing "${pathToTsConfig}"`);
throw err;
}
}
}
const nodeVersionMajor = Number(process.versions.node.split('.')[0]);
fixConfig(tsConfig, nodeVersionMajor);
// In prod, `.ts` inputs use TypeScript and
// `.js` inputs use Babel to convert ESM to CJS.
// In dev, both `.ts` and `.js` inputs use ts-node
// without Babel so we must enable `allowJs`.
tsConfig.compilerOptions.allowJs = true;
// In prod, we emit outputs to the filesystem.
// In dev, we don't emit because we use ts-node.
tsConfig.compilerOptions.noEmit = true;
if (isTypescript) {
if (isEsm) {
nodeOptions = `--loader ${esmLoader} ${nodeOptions || ''}`;
} else {
nodeOptions = `--require ${cjsLoader} ${nodeOptions || ''}`;
}
} else {
if (isEsm) {
// no transform needed because Node.js supports ESM natively
} else {
nodeOptions = `--require ${cjsLoader} ${nodeOptions || ''}`;
}
}
}
const child = fork(devServerPath, [], {
cwd: workPath,
execArgv: [],
env: cloneEnv(process.env, meta.env, {
VERCEL_DEV_ENTRYPOINT: entrypoint,
VERCEL_DEV_TSCONFIG: projectTsConfig || '',
VERCEL_DEV_IS_ESM: isEsm ? '1' : undefined,
VERCEL_DEV_CONFIG: JSON.stringify(config),
VERCEL_DEV_BUILD_ENV: JSON.stringify(meta.buildEnv || {}),
TS_NODE_TRANSPILE_ONLY: '1',
TS_NODE_COMPILER_OPTIONS: tsConfig?.compilerOptions
? JSON.stringify(tsConfig.compilerOptions)
: undefined,
NODE_OPTIONS: nodeOptions,
}),
});
@@ -560,11 +642,10 @@ export const startDevServer: StartDevServer = async opts => {
if (isPortInfo(result)) {
// "message" event
const ext = extname(entrypoint);
if (ext === '.ts' || ext === '.tsx') {
if (isTypescript) {
// Invoke `tsc --noEmit` asynchronously in the background, so
// that the HTTP request is not blocked by the type checking.
doTypeCheck(opts, projectTsConfig).catch((err: Error) => {
doTypeCheck(opts, pathToTsConfig).catch((err: Error) => {
console.error('Type check for %j failed:', entrypoint, err);
});
}

View File

@@ -490,8 +490,10 @@ export function fixConfig(
config.compilerOptions.esModuleInterop = true;
}
// Target CommonJS, always!
config.compilerOptions.module = 'CommonJS';
// If not specified, the default Node.js module is CommonJS.
if (config.compilerOptions.module === undefined) {
config.compilerOptions.module = 'CommonJS';
}
return config;
}

View File

@@ -0,0 +1,11 @@
import fetch from 'node-fetch';
import type { IncomingMessage, ServerResponse } from 'http';
export default async function handler(
_request: IncomingMessage,
response: ServerResponse
) {
const res = await fetch('https://example.vercel.sh');
const text = await res.text();
return response.end(text);
}

View File

@@ -0,0 +1,12 @@
{
"private": true,
"type": "module",
"dependencies": {
"node-fetch": "3.2.6"
},
"devDependencies": {
"@types/node": "17.0.42",
"@types/node-fetch": "2.6.1",
"typescript": "4.7.3"
}
}

View File

@@ -0,0 +1,3 @@
{
"probes": [{ "path": "/api/proxy", "mustContain": "Example Domain" }]
}

View File

@@ -0,0 +1,10 @@
{
"compilerOptions": {
"target": "esnext",
"module": "esnext",
"lib": ["esnext"],
"moduleResolution": "node",
"esModuleInterop": true,
"strict": true
}
}

View File

@@ -4,7 +4,7 @@
"allowJs": true,
"jsx": "preserve",
"target": "esnext",
"module": "esnext",
"module": "commonjs",
"lib": ["dom", "es2017"],
"noEmitOnError": true,
"moduleResolution": "node",

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/python",
"version": "3.1.31",
"version": "3.1.32",
"main": "./dist/index.js",
"license": "MIT",
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/python",
@@ -22,7 +22,7 @@
"devDependencies": {
"@types/execa": "^0.9.0",
"@types/jest": "27.4.1",
"@vercel/build-utils": "5.7.2",
"@vercel/build-utils": "5.7.3",
"@vercel/ncc": "0.24.0",
"execa": "^1.0.0",
"typescript": "4.3.4"

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/redwood",
"version": "1.0.41",
"version": "1.0.43",
"main": "./dist/index.js",
"license": "MIT",
"homepage": "https://vercel.com/docs",
@@ -19,7 +19,7 @@
"test-unit": "yarn test test/prepare-cache.test.js"
},
"dependencies": {
"@vercel/nft": "0.22.1",
"@vercel/nft": "0.22.5",
"@vercel/routing-utils": "2.1.3",
"semver": "6.1.1"
},
@@ -27,6 +27,6 @@
"@types/aws-lambda": "8.10.19",
"@types/node": "14.18.33",
"@types/semver": "6.0.0",
"@vercel/build-utils": "5.7.2"
"@vercel/build-utils": "5.7.3"
}
}

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/remix",
"version": "1.1.3",
"version": "1.1.5",
"license": "MIT",
"main": "./dist/index.js",
"homepage": "https://vercel.com/docs",
@@ -20,12 +20,12 @@
"default-server.js"
],
"dependencies": {
"@vercel/nft": "0.22.1"
"@vercel/nft": "0.22.5"
},
"devDependencies": {
"@types/jest": "27.5.1",
"@types/node": "14.18.33",
"@vercel/build-utils": "5.7.2",
"@vercel/build-utils": "5.7.3",
"typescript": "4.6.4"
}
}

View File

@@ -1,7 +1,7 @@
{
"name": "@vercel/ruby",
"author": "Nathan Cahill <nathan@nathancahill.com>",
"version": "1.3.47",
"version": "1.3.48",
"license": "MIT",
"main": "./dist/index",
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/ruby",
@@ -22,7 +22,7 @@
"devDependencies": {
"@types/fs-extra": "8.0.0",
"@types/semver": "6.0.0",
"@vercel/build-utils": "5.7.2",
"@vercel/build-utils": "5.7.3",
"@vercel/ncc": "0.24.0",
"execa": "2.0.4",
"fs-extra": "^7.0.1",

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/static-build",
"version": "1.0.44",
"version": "1.0.46",
"license": "MIT",
"main": "./dist/index",
"homepage": "https://vercel.com/docs/build-step",
@@ -36,8 +36,8 @@
"@types/ms": "0.7.31",
"@types/node-fetch": "2.5.4",
"@types/promise-timeout": "1.3.0",
"@vercel/build-utils": "5.7.2",
"@vercel/frameworks": "1.1.16",
"@vercel/build-utils": "5.7.3",
"@vercel/frameworks": "1.1.17",
"@vercel/ncc": "0.24.0",
"@vercel/routing-utils": "2.1.3",
"@vercel/static-config": "2.0.6",

View File

@@ -1,18 +1,20 @@
{
"$schema": "https://turborepo.org/schema.json",
"baseBranch": "origin/main",
"globalDependencies": ["turbo-cache-key.json", "test/lib/**"],
"pipeline": {
"build": {
"dependsOn": ["^build"],
"outputMode": "new-only",
"outputs": ["dist/**"]
},
"@vercel/node-bridge#build": {
"dependsOn": ["^build"],
"outputMode": "new-only",
"outputs": ["helpers.js", "source-map-support.js"]
},
"vercel#build": {
"dependsOn": ["^build"],
"outputMode": "new-only",
"outputs": [
"dist/**",
"src/util/constants.ts",
@@ -20,27 +22,33 @@
]
},
"test-unit": {
"dependsOn": [],
"dependsOn": ["^build"],
"outputMode": "new-only",
"outputs": []
},
"test-integration-dev": {
"dependsOn": [],
"dependsOn": ["^build"],
"outputMode": "new-only",
"outputs": []
},
"test-integration-cli": {
"dependsOn": [],
"dependsOn": ["^build"],
"outputMode": "new-only",
"outputs": []
},
"test-integration-once": {
"dependsOn": [],
"dependsOn": ["^build"],
"outputMode": "new-only",
"outputs": []
},
"test-next-local": {
"dependsOn": [],
"dependsOn": ["^build"],
"outputMode": "new-only",
"outputs": []
},
"test": {
"dependsOn": [],
"dependsOn": ["^build"],
"outputMode": "new-only",
"outputs": []
}
}

View File

@@ -14,7 +14,14 @@ async function getChunkedTests() {
const rootPath = path.resolve(__dirname, '..');
const dryRunText = (
await turbo([`run`, ...scripts, `--cache-dir=.turbo`, '--', '--listTests'])
await turbo([
`run`,
...scripts,
`--cache-dir=.turbo`,
'--output-logs=full',
'--',
'--listTests',
])
).toString('utf8');
/**

160
yarn.lock
View File

@@ -2209,6 +2209,14 @@
dependencies:
"@types/node" ">= 8"
"@rollup/pluginutils@^4.0.0":
version "4.2.1"
resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-4.2.1.tgz#e6c6c3aba0744edce3fb2074922d3776c0af2a6d"
integrity sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ==
dependencies:
estree-walker "^2.0.1"
picomatch "^2.2.2"
"@samverschueren/stream-to-observable@^0.3.0":
version "0.3.0"
resolved "https://registry.yarnpkg.com/@samverschueren/stream-to-observable/-/stream-to-observable-0.3.0.tgz#ecdf48d532c58ea477acfcab80348424f8d0662f"
@@ -3403,12 +3411,13 @@
resolved "https://registry.yarnpkg.com/@vercel/ncc/-/ncc-0.24.0.tgz#a2e8783a185caa99b5d8961a57dfc9665de16296"
integrity sha512-crqItMcIwCkvdXY/V3/TzrHJQx6nbIaRqE1cOopJhgGX6izvNov40SmD//nS5flfEvdK54YGjwVVq+zG6crjOg==
"@vercel/nft@0.22.1":
version "0.22.1"
resolved "https://registry.yarnpkg.com/@vercel/nft/-/nft-0.22.1.tgz#0d91d2a21e3a7f0b23ce1550da9870eac4942828"
integrity sha512-lYYZIoxRurqDOSoVIdBicGnpUIpfyaS5qVjdPq+EfI285WqtZK3NK/dyCkiyBul+X2U2OEhRyeMdXPCHGJbohw==
"@vercel/nft@0.22.5":
version "0.22.5"
resolved "https://registry.yarnpkg.com/@vercel/nft/-/nft-0.22.5.tgz#951bd7589ceebdd3e280afcf3a13bdacf83f6b7e"
integrity sha512-mug57Wd1BL7GMj9gXMgMeKUjdqO0e4u+0QLPYMFE1rwdJ+55oPy6lp3nIBCS8gOvigT62UI4QKUL2sGqcoW4Hw==
dependencies:
"@mapbox/node-pre-gyp" "^1.0.5"
"@rollup/pluginutils" "^4.0.0"
acorn "^8.6.0"
async-sema "^3.1.1"
bindings "^1.4.0"
@@ -3418,7 +3427,6 @@
micromatch "^4.0.2"
node-gyp-build "^4.2.2"
resolve-from "^5.0.0"
rollup-pluginutils "^2.8.2"
"@zeit/dns-cached-resolve@2.1.0":
version "2.1.0"
@@ -6208,16 +6216,11 @@ estraverse@^5.2.0:
resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.2.0.tgz#307df42547e6cc7324d3cf03c155d5cdb8c53880"
integrity sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==
estree-walker@2.0.2:
estree-walker@2.0.2, estree-walker@^2.0.1:
version "2.0.2"
resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-2.0.2.tgz#52f010178c2a4c117a7757cfe942adb7d2da4cac"
integrity sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==
estree-walker@^0.6.1:
version "0.6.1"
resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.6.1.tgz#53049143f40c6eb918b23671d1fe3219f3a1b362"
integrity sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==
esutils@^2.0.2:
version "2.0.3"
resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64"
@@ -9086,6 +9089,11 @@ json5@2.2.1, json5@^2.2.1:
resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.1.tgz#655d50ed1e6f95ad1a3caababd2b0efda10b395c"
integrity sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==
json5@2.2.2:
version "2.2.2"
resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.2.tgz#64471c5bdcc564c18f7c1d4df2e2297f2457c5ab"
integrity sha512-46Tk9JiOL2z7ytNQWFLpj99RZkVgeHf87yGQKsIkaPz1qSH9UczKH1rO7K3wgRselo0tYMUNfecYpm/p1vC7tQ==
json5@^2.1.0, json5@^2.1.2:
version "2.1.3"
resolved "https://registry.yarnpkg.com/json5/-/json5-2.1.3.tgz#c9b0f7fa9233bfe5807fe66fcf3a5617ed597d43"
@@ -10955,12 +10963,7 @@ picocolors@1.0.0, picocolors@^1.0.0:
resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c"
integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==
picomatch@^2.0.4, picomatch@^2.0.5, picomatch@^2.0.7, picomatch@^2.2.1:
version "2.2.2"
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad"
integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==
picomatch@^2.2.3:
picomatch@^2.0.4, picomatch@^2.0.5, picomatch@^2.0.7, picomatch@^2.2.1, picomatch@^2.2.2, picomatch@^2.2.3:
version "2.3.0"
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.0.tgz#f1f061de8f6a4bf022892e2d128234fb98302972"
integrity sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==
@@ -11785,13 +11788,6 @@ rimraf@^2.5.4, rimraf@^2.6.2, rimraf@^2.6.3:
dependencies:
glob "^7.1.3"
rollup-pluginutils@^2.8.2:
version "2.8.2"
resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz#72f2af0748b592364dbd3389e600e5a9444a351e"
integrity sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ==
dependencies:
estree-walker "^0.6.1"
rollup@^2.74.1:
version "2.75.7"
resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.75.7.tgz#221ff11887ae271e37dcc649ba32ce1590aaa0b9"
@@ -13106,95 +13102,47 @@ tunnel-agent@^0.6.0:
dependencies:
safe-buffer "^5.0.1"
turbo-android-arm64@1.4.7:
version "1.4.7"
resolved "https://registry.yarnpkg.com/turbo-android-arm64/-/turbo-android-arm64-1.4.7.tgz#553f68a1f475495549fb8a260461239c90f40410"
integrity sha512-BtWtH8e8w1GhtYpGQmkcDS/AUzVZhQ4ZZN+qtUFei1wZD7VAdtJ9Wcsfi3WD+mXA6vtpIpRJVfQMcShr8l8ErA==
turbo-darwin-64@1.6.3:
version "1.6.3"
resolved "https://registry.yarnpkg.com/turbo-darwin-64/-/turbo-darwin-64-1.6.3.tgz#fad7e078784b0fafc0b1f75ce9378828918595f5"
integrity sha512-QmDIX0Yh1wYQl0bUS0gGWwNxpJwrzZU2GIAYt3aOKoirWA2ecnyb3R6ludcS1znfNV2MfunP+l8E3ncxUHwtjA==
turbo-darwin-64@1.4.7:
version "1.4.7"
resolved "https://registry.yarnpkg.com/turbo-darwin-64/-/turbo-darwin-64-1.4.7.tgz#c23e2452a01115136e631dc06aa6a9bb379d2d32"
integrity sha512-bMvZaAz5diec9feZ0XpQosYI8U0kiOQM2tj2sv0Y2WZbe227wodVMCQMyUowmcotO8nr6NF76Xo5E+H+dnY6LQ==
turbo-darwin-arm64@1.6.3:
version "1.6.3"
resolved "https://registry.yarnpkg.com/turbo-darwin-arm64/-/turbo-darwin-arm64-1.6.3.tgz#f0a32cae39e3fcd3da5e3129a94c18bb2e3ed6aa"
integrity sha512-75DXhFpwE7CinBbtxTxH08EcWrxYSPFow3NaeFwsG8aymkWXF+U2aukYHJA6I12n9/dGqf7yRXzkF0S/9UtdyQ==
turbo-darwin-arm64@1.4.7:
version "1.4.7"
resolved "https://registry.yarnpkg.com/turbo-darwin-arm64/-/turbo-darwin-arm64-1.4.7.tgz#4212917f4892159033cfa88bafa662f6e865fe49"
integrity sha512-AyfxYfKgh1EigQKjypbnDoMLuy4e/n/go+KYiWKKIpOaWXWLBokrBWzYN/aI3NMDRUJWK5ExdlWI9Nleelq8uQ==
turbo-linux-64@1.6.3:
version "1.6.3"
resolved "https://registry.yarnpkg.com/turbo-linux-64/-/turbo-linux-64-1.6.3.tgz#8ddc6ac55ef84641182fe5ff50647f1b355826b0"
integrity sha512-O9uc6J0yoRPWdPg9THRQi69K6E2iZ98cRHNvus05lZbcPzZTxJYkYGb5iagCmCW/pq6fL4T4oLWAd6evg2LGQA==
turbo-freebsd-64@1.4.7:
version "1.4.7"
resolved "https://registry.yarnpkg.com/turbo-freebsd-64/-/turbo-freebsd-64-1.4.7.tgz#7d60d44a623bd000f53673a0db0205a16d8815e6"
integrity sha512-T5/osfbCh0rL53MFS5byFFfsR3vPMHIKIJ4fMMCNkoHsmFj2R0Pv53nqhEItogt0FJwCDHPyt7oBqO83H/AWQQ==
turbo-linux-arm64@1.6.3:
version "1.6.3"
resolved "https://registry.yarnpkg.com/turbo-linux-arm64/-/turbo-linux-arm64-1.6.3.tgz#846c1dc84d8dc741651906613c16acccba30428c"
integrity sha512-dCy667qqEtZIhulsRTe8hhWQNCJO0i20uHXv7KjLHuFZGCeMbWxB8rsneRoY+blf8+QNqGuXQJxak7ayjHLxiA==
turbo-freebsd-arm64@1.4.7:
version "1.4.7"
resolved "https://registry.yarnpkg.com/turbo-freebsd-arm64/-/turbo-freebsd-arm64-1.4.7.tgz#35e5b23313d42aab074e69c1d1c44cab17f438ac"
integrity sha512-PL+SaO78AUCas+YKj01UiS2rpmGcxz8XPmLdFWmq6PYjPX6GL5UBAc3pkBphIm0aTLZtsikoEul+JrwAuAy6UA==
turbo-windows-64@1.6.3:
version "1.6.3"
resolved "https://registry.yarnpkg.com/turbo-windows-64/-/turbo-windows-64-1.6.3.tgz#89ac819fa76ad31d12fbfdeb3045bcebd0d308eb"
integrity sha512-lKRqwL3mrVF09b9KySSaOwetehmGknV9EcQTF7d2dxngGYYX1WXoQLjFP9YYH8ZV07oPm+RUOAKSCQuDuMNhiA==
turbo-linux-32@1.4.7:
version "1.4.7"
resolved "https://registry.yarnpkg.com/turbo-linux-32/-/turbo-linux-32-1.4.7.tgz#2861539d767cdfca058224f284991d918d7b1965"
integrity sha512-dK94UwDzySMALoQtjBVVPbWJZP6xw3yHGuytM3q5p4kfMZPSA+rgNBn5T5Af2Rc7jxlLAsu5ODJ0SgIbWSF5Hg==
turbo-windows-arm64@1.6.3:
version "1.6.3"
resolved "https://registry.yarnpkg.com/turbo-windows-arm64/-/turbo-windows-arm64-1.6.3.tgz#977607c9a51f0b76076c8b158bafce06ce813070"
integrity sha512-BXY1sDPEA1DgPwuENvDCD8B7Hb0toscjus941WpL8CVd10hg9pk/MWn9CNgwDO5Q9ks0mw+liDv2EMnleEjeNA==
turbo-linux-64@1.4.7:
version "1.4.7"
resolved "https://registry.yarnpkg.com/turbo-linux-64/-/turbo-linux-64-1.4.7.tgz#5ff0e648a1d0b0053ad2f3c6a4fc735744cadc16"
integrity sha512-F6IM23zgTYo9gYJaNp17gVvQBt0hMIvz52OF91DpPYSLpV2h9OSlzPJ3j5TGaWueS/bc/YCV23+VojXX/MauGQ==
turbo-linux-arm64@1.4.7:
version "1.4.7"
resolved "https://registry.yarnpkg.com/turbo-linux-arm64/-/turbo-linux-arm64-1.4.7.tgz#c5cb63db0ab59dd2ea37be4e44efef119a289ad1"
integrity sha512-kFe5jzj3FoY6jAEwyNEswndj1t/fPl0qyxfcQv6aNPz7Nb2Lh7mY/EEse+CG3ydIo5RZKba7ppQoBSDmHx7JsA==
turbo-linux-arm@1.4.7:
version "1.4.7"
resolved "https://registry.yarnpkg.com/turbo-linux-arm/-/turbo-linux-arm-1.4.7.tgz#93ed9e43a95760e660a42dbf65cbfd430e558e89"
integrity sha512-FTh4itdMNZ7IxGKknFnQ6iPO9vGGKqyySkCYLR01lnw6BTnKL9KuM9XUCBRyn7dNmHhAnqu1ZtVsBkH7CE7DEw==
turbo-linux-mips64le@1.4.7:
version "1.4.7"
resolved "https://registry.yarnpkg.com/turbo-linux-mips64le/-/turbo-linux-mips64le-1.4.7.tgz#77357165c3ae0102fd5924dd85229676938dd717"
integrity sha512-756nG8dnPQVcnl9s70S4NQ43aJjpsnc2h0toktPO+9u2ayv9XTbIPvZLFsS55bDeYhodDGvxoB96W6Xnx01hyQ==
turbo-linux-ppc64le@1.4.7:
version "1.4.7"
resolved "https://registry.yarnpkg.com/turbo-linux-ppc64le/-/turbo-linux-ppc64le-1.4.7.tgz#2a7399d6ee31d894d48aea393ed1f9addc4a310c"
integrity sha512-VS2ofGN/XsafNGJdZ21UguURHb7KRG879yWLj59hO1d+0xXXQbx7ljsmEPOhiE4UjEdx4Ur6P44BhztTgDx9Og==
turbo-windows-32@1.4.7:
version "1.4.7"
resolved "https://registry.yarnpkg.com/turbo-windows-32/-/turbo-windows-32-1.4.7.tgz#e93233d8681886dc0b609c897447991afa378340"
integrity sha512-M5GkZdA0CbJAOcR8SScM63CBV+NtX7qjhoNNOl0F99nGJ+rO3dH71CcM/rbhlz9SQzKQoX8rcuwZHe4r2HZAug==
turbo-windows-64@1.4.7:
version "1.4.7"
resolved "https://registry.yarnpkg.com/turbo-windows-64/-/turbo-windows-64-1.4.7.tgz#da9fe6b6bf2b6fd1f85ecdc186fc7a49b8411d22"
integrity sha512-ftZUtZ1BX1vi8MbxKr+a7riIkhwvGnNTtWGprVu+aDJ8PnV+lNqbkrLJGvKP7Cn22hGTfzcjNNPcJ5PBZpQEQw==
turbo-windows-arm64@1.4.7:
version "1.4.7"
resolved "https://registry.yarnpkg.com/turbo-windows-arm64/-/turbo-windows-arm64-1.4.7.tgz#c60a772aab36c45ce461e3305e35d1c22a00e516"
integrity sha512-mZ79XeJFfaeVKdBV3w0eoGaqAxFnwxrme0jZtSWemAbeDSCF/13wcbLGwtq0+Lu0LxEGweeQ5AqsCIc9t9i6sA==
turbo@1.4.7:
version "1.4.7"
resolved "https://registry.yarnpkg.com/turbo/-/turbo-1.4.7.tgz#859989a5dce2a7b1fa51f17ac4fb1e34dbfd455d"
integrity sha512-oIk7PAISPidDOkTM5M+ydEe5GDQ/+TahDgIbaYKeAAy2Qpmur4s0HybSDWHIdxLqI96OPD/mOKymRLrjh3Mdhg==
turbo@1.6.3:
version "1.6.3"
resolved "https://registry.yarnpkg.com/turbo/-/turbo-1.6.3.tgz#ec26cc8907c38a9fd6eb072fb10dad254733543e"
integrity sha512-FtfhJLmEEtHveGxW4Ye/QuY85AnZ2ZNVgkTBswoap7UMHB1+oI4diHPNyqrQLG4K1UFtCkjOlVoLsllUh/9QRw==
optionalDependencies:
turbo-android-arm64 "1.4.7"
turbo-darwin-64 "1.4.7"
turbo-darwin-arm64 "1.4.7"
turbo-freebsd-64 "1.4.7"
turbo-freebsd-arm64 "1.4.7"
turbo-linux-32 "1.4.7"
turbo-linux-64 "1.4.7"
turbo-linux-arm "1.4.7"
turbo-linux-arm64 "1.4.7"
turbo-linux-mips64le "1.4.7"
turbo-linux-ppc64le "1.4.7"
turbo-windows-32 "1.4.7"
turbo-windows-64 "1.4.7"
turbo-windows-arm64 "1.4.7"
turbo-darwin-64 "1.6.3"
turbo-darwin-arm64 "1.6.3"
turbo-linux-64 "1.6.3"
turbo-linux-arm64 "1.6.3"
turbo-windows-64 "1.6.3"
turbo-windows-arm64 "1.6.3"
tweetnacl@^0.14.3, tweetnacl@~0.14.0:
version "0.14.5"