Compare commits

..

32 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
Chris Barber
cb29bfdd68 Publish Stable
- @vercel/build-utils@5.7.2
 - vercel@28.10.1
 - @vercel/client@12.2.23
 - @vercel/frameworks@1.1.16
 - @vercel/fs-detectors@3.5.6
 - @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
2022-12-22 18:47:23 -06:00
github-actions[bot]
5ba2d61c77 [examples] Upgrade Next.js to version 13.1.0 (#9117)
This auto-generated PR updates Next.js to version 13.1.0

Co-authored-by: Vercel Team Bot <team@zeit.co>
2022-12-22 19:31:42 -05:00
Chris Barber
879096fff3 [frameworks] Fix vitepress output directory (#9115)
In July 2022, VitePress changed (https://github.com/vuejs/vitepress/pull/931) the output directory from `.vitepress/dist` to `docs/.vitepress/dist`, however the framework detector was still referencing the old .vitepress/dist` output directory.
2022-12-21 21:09:12 +00:00
Nathan Rajlich
99e40272cf [build-utils] Support empty directory entries for glob() and download() (#9103)
There are some edge-case situations where a dependency or build process is expecting an empty directory to exist, and this expectation would fail currently because `glob()` does not return directory entries.

So update `glob()` to return entries for empty directories, which are also re-created properly when passed to the `download()` function.
2022-12-21 20:06:14 +00:00
Steven
04e9f771df Publish Stable
- vercel@28.10.0
 - @vercel/edge@0.2.1
 - @vercel/next@3.3.4
2022-12-21 11:13:25 -05:00
JJ Kasper
6f21f1081d [next] Ensure updated path is specific (#9112)
Follow-up to https://github.com/vercel/vercel/pull/9111
2022-12-21 09:39:45 +00:00
JJ Kasper
d806c9f846 [next] Handle output location (#9111)
Ensures output location is handled x-ref: [slack thread](https://vercel.slack.com/archives/C04DUD7EB1B/p1671473159350219?thread_ts=1671467623.309669&cid=C04DUD7EB1B)
2022-12-21 00:30:48 +00:00
Steven
71cc4ca865 [next] Disable Image Optimization API when next.config.js has unoptimized: true (#9110)
- Related to https://github.com/vercel/next.js/pull/44205
2022-12-21 00:07:07 +00:00
Nathan Rajlich
21f25f5eb0 [cli] Add Output#link() function to format terminal hyperlinks (#8370)
This adds a `link()` helper function to the `Output` class that is inspired by the `terminal-link` npm package.

The main difference with this version is that it's more tightly integrated with the `Output` class for the purposes of being able to toggle hyperlinks support on/off for [unit tests](4a54b19f46/packages/cli/test/unit/util/output/create-output.test.ts) by setting the `output.supportsHyperlink` boolean.

> **Note:** Since hyperlinks are still a relatively new feature, and users might not yet understand how to interact with them, we should only use this function for progressive enhancement scenarios at this time, and _not_ as part of a critical UX.
2022-12-20 02:33:59 +00:00
Andy McKay
2a492fa7ec Delete comment-on-pr.yml 2022-12-19 11:20:10 -08:00
Andy McKay
f8ca24b226 Create comment-on-pr.yml 2022-12-19 11:19:53 -08:00
Chris Barber
019590e845 [cli] Only throw DeploymentNotReady if deployment not ready (#9100)
When adding an alias, the server can return a 400 Bad Request under these circumstances:

1. Invalid alias: no alias, empty string, null alias, alias domain is invalid, alias is not public, alias is not a subdomain (code: `'invalid_alias'`)
2. The deployment is indeed not ready (code `'deployment_not_ready'`)
3. The cert for the provided alias is not ready (code `'cert_missing'`)
4. There was an error assigning the alias (code varies)

`vc alias add` will treat all 4 of those bad request errors as the deployment "is not ready". Instead of treating all 400's as not ready, only return `DeploymentNotReady` if the `code` is set to `'deployment_not_ready'`.
2022-12-19 18:20:04 +00:00
Simon He
6180701f8d [tests] add eslintcache (#8993)
Co-authored-by: Steven <steven@ceriously.com>
2022-12-19 11:58:42 -05:00
github-actions[bot]
b1c7ca8e91 [examples] Upgrade Next.js to version 13.0.7 (#9082)
This auto-generated PR updates Next.js to version 13.0.7
2022-12-16 23:27:31 +00:00
Sean Massa
dbc00a7c3e [admin] Update CODEOWNERS for edge (#9084)
The CODEOWNERS file had an error referencing the `@vercel/edge-function` team, which does not exist. I assume this is supposed to be `@vercel/edge-compute`, but please confirm.

There are a [few edge-related teams](https://github.com/orgs/vercel/teams?query=edge).
2022-12-15 19:03:27 +00:00
Sean Massa
5ae7c2f452 Publish Stable
- @vercel/edge@0.2.0
2022-12-15 12:32:53 -06:00
Sean Massa
0cbc676a6f [edge] publish process.env types for edge functions (#9083) 2022-12-15 12:00:53 -06:00
Damien Simonin Feugas
61e588cd63 feat(edge): adds json() response helper (#9081)
### 🔖 What's in there?

Because Typescript's `libdom` does not have [`static Response.json()`](https://github.com/microsoft/TypeScript-DOM-lib-generator/issues/1444) (which modern browsers and edge runtimes are supporting), Typescript users can't use easily use it.

This helper fills the gap.

### 🧪 How to test?

It's covered with unit tests
2022-12-15 11:01:02 +00:00
92 changed files with 1891 additions and 964 deletions

3
.github/CODEOWNERS vendored
View File

@@ -7,11 +7,10 @@
/packages/cli/src/commands/certs @mglagola @anatrajkovska
/packages/cli/src/commands/env @TooTallNate @EndangeredMassa @styfle @cb1kenobi @Ethan-Arrowood
/packages/fs-detectors @TooTallNate @EndangeredMassa @styfle @cb1kenobi @Ethan-Arrowood @agadzik @chloetedder
/packages/middleware @gdborton @vercel/edge-function
/packages/node-bridge @TooTallNate @EndangeredMassa @styfle @cb1kenobi @Ethan-Arrowood @ijjk
/packages/next @TooTallNate @EndangeredMassa @styfle @cb1kenobi @Ethan-Arrowood @ijjk
/packages/routing-utils @TooTallNate @EndangeredMassa @styfle @cb1kenobi @Ethan-Arrowood @ijjk
/packages/edge @vercel/edge-function
/packages/edge @vercel/edge-compute
/examples @leerob
/examples/create-react-app @Timer
/examples/nextjs @timneutkens @ijjk @styfle

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:

1
.gitignore vendored
View File

@@ -28,4 +28,5 @@ test/lib/deployment/failed-page.txt
__pycache__
.vercel
.turbo
.eslintcache
turbo-cache-key.json

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

@@ -30,7 +30,3 @@ yarn-error.log*
# vercel
.vercel
# typescript
*.tsbuildinfo
next-env.d.ts

View File

@@ -18,6 +18,8 @@ You can start editing the page by modifying `pages/index.js`. The page auto-upda
The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.
This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.
## Learn More
To learn more about Next.js, take a look at the following resources:

File diff suppressed because it is too large Load Diff

View File

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

View File

@@ -1,7 +1,5 @@
import '../styles/globals.css'
function MyApp({ Component, pageProps }) {
export default function App({ Component, pageProps }) {
return <Component {...pageProps} />
}
export default MyApp

View File

@@ -0,0 +1,13 @@
import { Html, Head, Main, NextScript } from 'next/document'
export default function Document() {
return (
<Html lang="en">
<Head />
<body>
<Main />
<NextScript />
</body>
</Html>
)
}

View File

@@ -1,71 +1,123 @@
import Head from 'next/head'
import Image from 'next/image'
import { Inter } from '@next/font/google'
import styles from '../styles/Home.module.css'
const inter = Inter({ subsets: ['latin'] })
export default function Home() {
return (
<div className={styles.container}>
<>
<Head>
<title>Create Next App</title>
<meta name="description" content="Generated by create next app" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" href="/favicon.ico" />
</Head>
<main className={styles.main}>
<h1 className={styles.title}>
Welcome to <a href="https://nextjs.org">Next.js!</a>
</h1>
<div className={styles.description}>
<p>
Get started by editing&nbsp;
<code className={styles.code}>pages/index.js</code>
</p>
<div>
<a
href="https://vercel.com?utm_source=create-next-app&utm_medium=default-template&utm_campaign=create-next-app"
target="_blank"
rel="noopener noreferrer"
>
By{' '}
<Image
src="/vercel.svg"
alt="Vercel Logo"
className={styles.vercelLogo}
width={100}
height={24}
priority
/>
</a>
</div>
</div>
<p className={styles.description}>
Get started by editing{' '}
<code className={styles.code}>pages/index.js</code>
</p>
<div className={styles.center}>
<Image
className={styles.logo}
src="/next.svg"
alt="Next.js Logo"
width={180}
height={37}
priority
/>
<div className={styles.thirteen}>
<Image
src="/thirteen.svg"
alt="13"
width={40}
height={31}
priority
/>
</div>
</div>
<div className={styles.grid}>
<a href="https://nextjs.org/docs" className={styles.card}>
<h2>Documentation &rarr;</h2>
<p>Find in-depth information about Next.js features and API.</p>
</a>
<a href="https://nextjs.org/learn" className={styles.card}>
<h2>Learn &rarr;</h2>
<p>Learn about Next.js in an interactive course with quizzes!</p>
<a
href="https://nextjs.org/docs?utm_source=create-next-app&utm_medium=default-template&utm_campaign=create-next-app"
className={styles.card}
target="_blank"
rel="noopener noreferrer"
>
<h2 className={inter.className}>
Docs <span>-&gt;</span>
</h2>
<p className={inter.className}>
Find in-depth information about Next.js features and&nbsp;API.
</p>
</a>
<a
href="https://github.com/vercel/next.js/tree/canary/examples"
href="https://nextjs.org/learn?utm_source=create-next-app&utm_medium=default-template&utm_campaign=create-next-app"
className={styles.card}
target="_blank"
rel="noopener noreferrer"
>
<h2>Examples &rarr;</h2>
<p>Discover and deploy boilerplate example Next.js projects.</p>
<h2 className={inter.className}>
Learn <span>-&gt;</span>
</h2>
<p className={inter.className}>
Learn about Next.js in an interactive course with&nbsp;quizzes!
</p>
</a>
<a
href="https://vercel.com/templates?framework=next.js&utm_source=create-next-app&utm_medium=default-template&utm_campaign=create-next-app"
className={styles.card}
target="_blank"
rel="noopener noreferrer"
>
<h2 className={inter.className}>
Templates <span>-&gt;</span>
</h2>
<p className={inter.className}>
Discover and deploy boilerplate example Next.js&nbsp;projects.
</p>
</a>
<a
href="https://vercel.com/new?utm_source=create-next-app&utm_medium=default-template&utm_campaign=create-next-app"
className={styles.card}
target="_blank"
rel="noopener noreferrer"
className={styles.card}
>
<h2>Deploy &rarr;</h2>
<p>
Instantly deploy your Next.js site to a public URL with Vercel.
<h2 className={inter.className}>
Deploy <span>-&gt;</span>
</h2>
<p className={inter.className}>
Instantly deploy your Next.js site to a shareable URL
with&nbsp;Vercel.
</p>
</a>
</div>
</main>
<footer className={styles.footer}>
<a
href="https://vercel.com?utm_source=create-next-app&utm_medium=default-template&utm_campaign=create-next-app"
target="_blank"
rel="noopener noreferrer"
>
Powered by{' '}
<span className={styles.logo}>
<Image src="/vercel.svg" alt="Vercel Logo" width={72} height={16} />
</span>
</a>
</footer>
</div>
</>
)
}

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 394 80"><path fill="#000" d="M262 0h68.5v12.7h-27.2v66.6h-13.6V12.7H262V0ZM149 0v12.7H94v20.4h44.3v12.6H94v21h55v12.6H80.5V0h68.7zm34.3 0h-17.8l63.8 79.4h17.9l-32-39.7 32-39.6h-17.9l-23 28.6-23-28.6zm18.3 56.7-9-11-27.1 33.7h17.8l18.3-22.7z"/><path fill="#000" d="M81 79.3 17 0H0v79.3h13.6V17l50.2 62.3H81Zm252.6-.4c-1 0-1.8-.4-2.5-1s-1.1-1.6-1.1-2.6.3-1.8 1-2.5 1.6-1 2.6-1 1.8.3 2.5 1a3.4 3.4 0 0 1 .6 4.3 3.7 3.7 0 0 1-3 1.8zm23.2-33.5h6v23.3c0 2.1-.4 4-1.3 5.5a9.1 9.1 0 0 1-3.8 3.5c-1.6.8-3.5 1.3-5.7 1.3-2 0-3.7-.4-5.3-1s-2.8-1.8-3.7-3.2c-.9-1.3-1.4-3-1.4-5h6c.1.8.3 1.6.7 2.2s1 1.2 1.6 1.5c.7.4 1.5.5 2.4.5 1 0 1.8-.2 2.4-.6a4 4 0 0 0 1.6-1.8c.3-.8.5-1.8.5-3V45.5zm30.9 9.1a4.4 4.4 0 0 0-2-3.3 7.5 7.5 0 0 0-4.3-1.1c-1.3 0-2.4.2-3.3.5-.9.4-1.6 1-2 1.6a3.5 3.5 0 0 0-.3 4c.3.5.7.9 1.3 1.2l1.8 1 2 .5 3.2.8c1.3.3 2.5.7 3.7 1.2a13 13 0 0 1 3.2 1.8 8.1 8.1 0 0 1 3 6.5c0 2-.5 3.7-1.5 5.1a10 10 0 0 1-4.4 3.5c-1.8.8-4.1 1.2-6.8 1.2-2.6 0-4.9-.4-6.8-1.2-2-.8-3.4-2-4.5-3.5a10 10 0 0 1-1.7-5.6h6a5 5 0 0 0 3.5 4.6c1 .4 2.2.6 3.4.6 1.3 0 2.5-.2 3.5-.6 1-.4 1.8-1 2.4-1.7a4 4 0 0 0 .8-2.4c0-.9-.2-1.6-.7-2.2a11 11 0 0 0-2.1-1.4l-3.2-1-3.8-1c-2.8-.7-5-1.7-6.6-3.2a7.2 7.2 0 0 1-2.4-5.7 8 8 0 0 1 1.7-5 10 10 0 0 1 4.3-3.5c2-.8 4-1.2 6.4-1.2 2.3 0 4.4.4 6.2 1.2 1.8.8 3.2 2 4.3 3.4 1 1.4 1.5 3 1.5 5h-5.8z"/></svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="40" height="31" fill="none"><g opacity=".9"><path fill="url(#a)" d="M13 .4v29.3H7V6.3h-.2L0 10.5V5L7.2.4H13Z"/><path fill="url(#b)" d="M28.8 30.1c-2.2 0-4-.3-5.7-1-1.7-.8-3-1.8-4-3.1a7.7 7.7 0 0 1-1.4-4.6h6.2c0 .8.3 1.4.7 2 .4.5 1 .9 1.7 1.2.7.3 1.6.4 2.5.4 1 0 1.7-.2 2.5-.5.7-.3 1.3-.8 1.7-1.4.4-.6.6-1.2.6-2s-.2-1.5-.7-2.1c-.4-.6-1-1-1.8-1.4-.8-.4-1.8-.5-2.9-.5h-2.7v-4.6h2.7a6 6 0 0 0 2.5-.5 4 4 0 0 0 1.7-1.3c.4-.6.6-1.3.6-2a3.5 3.5 0 0 0-2-3.3 5.6 5.6 0 0 0-4.5 0 4 4 0 0 0-1.7 1.2c-.4.6-.6 1.2-.6 2h-6c0-1.7.6-3.2 1.5-4.5 1-1.3 2.2-2.3 3.8-3C25 .4 26.8 0 28.8 0s3.8.4 5.3 1.1c1.5.7 2.7 1.7 3.6 3a7.2 7.2 0 0 1 1.2 4.2c0 1.6-.5 3-1.5 4a7 7 0 0 1-4 2.2v.2c2.2.3 3.8 1 5 2.2a6.4 6.4 0 0 1 1.6 4.6c0 1.7-.5 3.1-1.4 4.4a9.7 9.7 0 0 1-4 3.1c-1.7.8-3.7 1.1-5.8 1.1Z"/></g><defs><linearGradient id="a" x1="20" x2="20" y1="0" y2="30.1" gradientUnits="userSpaceOnUse"><stop/><stop offset="1" stop-color="#3D3D3D"/></linearGradient><linearGradient id="b" x1="20" x2="20" y1="0" y2="30.1" gradientUnits="userSpaceOnUse"><stop/><stop offset="1" stop-color="#3D3D3D"/></linearGradient></defs></svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -1,4 +1 @@
<svg width="283" height="64" viewBox="0 0 283 64" fill="none"
xmlns="http://www.w3.org/2000/svg">
<path d="M141.04 16c-11.04 0-19 7.2-19 18s8.96 18 20 18c6.67 0 12.55-2.64 16.19-7.09l-7.65-4.42c-2.02 2.21-5.09 3.5-8.54 3.5-4.79 0-8.86-2.5-10.37-6.5h28.02c.22-1.12.35-2.28.35-3.5 0-10.79-7.96-17.99-19-17.99zm-9.46 14.5c1.25-3.99 4.67-6.5 9.45-6.5 4.79 0 8.21 2.51 9.45 6.5h-18.9zM248.72 16c-11.04 0-19 7.2-19 18s8.96 18 20 18c6.67 0 12.55-2.64 16.19-7.09l-7.65-4.42c-2.02 2.21-5.09 3.5-8.54 3.5-4.79 0-8.86-2.5-10.37-6.5h28.02c.22-1.12.35-2.28.35-3.5 0-10.79-7.96-17.99-19-17.99zm-9.45 14.5c1.25-3.99 4.67-6.5 9.45-6.5 4.79 0 8.21 2.51 9.45 6.5h-18.9zM200.24 34c0 6 3.92 10 10 10 4.12 0 7.21-1.87 8.8-4.92l7.68 4.43c-3.18 5.3-9.14 8.49-16.48 8.49-11.05 0-19-7.2-19-18s7.96-18 19-18c7.34 0 13.29 3.19 16.48 8.49l-7.68 4.43c-1.59-3.05-4.68-4.92-8.8-4.92-6.07 0-10 4-10 10zm82.48-29v46h-9V5h9zM36.95 0L73.9 64H0L36.95 0zm92.38 5l-27.71 48L73.91 5H84.3l17.32 30 17.32-30h10.39zm58.91 12v9.69c-1-.29-2.06-.49-3.2-.49-5.81 0-10 4-10 10V51h-9V17h9v9.2c0-5.08 5.91-9.2 13.2-9.2z" fill="#000"/>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 283 64"><path fill="black" d="M141 16c-11 0-19 7-19 18s9 18 20 18c7 0 13-3 16-7l-7-5c-2 3-6 4-9 4-5 0-9-3-10-7h28v-3c0-11-8-18-19-18zm-9 15c1-4 4-7 9-7s8 3 9 7h-18zm117-15c-11 0-19 7-19 18s9 18 20 18c6 0 12-3 16-7l-8-5c-2 3-5 4-8 4-5 0-9-3-11-7h28l1-3c0-11-8-18-19-18zm-10 15c2-4 5-7 10-7s8 3 9 7h-19zm-39 3c0 6 4 10 10 10 4 0 7-2 9-5l8 5c-3 5-9 8-17 8-11 0-19-7-19-18s8-18 19-18c8 0 14 3 17 8l-8 5c-2-3-5-5-9-5-6 0-10 4-10 10zm83-29v46h-9V5h9zM37 0l37 64H0L37 0zm92 5-27 48L74 5h10l18 30 17-30h10zm59 12v10l-3-1c-6 0-10 4-10 10v15h-9V17h9v9c0-5 6-9 13-9z"/></svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 629 B

View File

@@ -1,129 +1,278 @@
.container {
padding: 0 2rem;
}
.main {
min-height: 100vh;
padding: 4rem 0;
flex: 1;
display: flex;
flex-direction: column;
justify-content: center;
justify-content: space-between;
align-items: center;
padding: 6rem;
min-height: 100vh;
}
.footer {
display: flex;
flex: 1;
padding: 2rem 0;
border-top: 1px solid #eaeaea;
justify-content: center;
align-items: center;
.description {
display: inherit;
justify-content: inherit;
align-items: inherit;
font-size: 0.85rem;
max-width: var(--max-width);
width: 100%;
z-index: 2;
font-family: var(--font-mono);
}
.footer a {
.description a {
display: flex;
justify-content: center;
align-items: center;
flex-grow: 1;
gap: 0.5rem;
}
.title a {
color: #0070f3;
text-decoration: none;
}
.title a:hover,
.title a:focus,
.title a:active {
text-decoration: underline;
}
.title {
.description p {
position: relative;
margin: 0;
line-height: 1.15;
font-size: 4rem;
}
.title,
.description {
text-align: center;
}
.description {
margin: 4rem 0;
line-height: 1.5;
font-size: 1.5rem;
padding: 1rem;
background-color: rgba(var(--callout-rgb), 0.5);
border: 1px solid rgba(var(--callout-border-rgb), 0.3);
border-radius: var(--border-radius);
}
.code {
background: #fafafa;
border-radius: 5px;
padding: 0.75rem;
font-size: 1.1rem;
font-family: Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono,
Bitstream Vera Sans Mono, Courier New, monospace;
font-weight: 700;
font-family: var(--font-mono);
}
.grid {
display: flex;
align-items: center;
justify-content: center;
flex-wrap: wrap;
max-width: 800px;
display: grid;
grid-template-columns: repeat(4, minmax(25%, auto));
width: var(--max-width);
max-width: 100%;
}
.card {
margin: 1rem;
padding: 1.5rem;
text-align: left;
color: inherit;
text-decoration: none;
border: 1px solid #eaeaea;
border-radius: 10px;
transition: color 0.15s ease, border-color 0.15s ease;
max-width: 300px;
padding: 1rem 1.2rem;
border-radius: var(--border-radius);
background: rgba(var(--card-rgb), 0);
border: 1px solid rgba(var(--card-border-rgb), 0);
transition: background 200ms, border 200ms;
}
.card:hover,
.card:focus,
.card:active {
color: #0070f3;
border-color: #0070f3;
.card span {
display: inline-block;
transition: transform 200ms;
}
.card h2 {
margin: 0 0 1rem 0;
font-size: 1.5rem;
font-weight: 600;
margin-bottom: 0.7rem;
}
.card p {
margin: 0;
font-size: 1.25rem;
opacity: 0.6;
font-size: 0.9rem;
line-height: 1.5;
max-width: 30ch;
}
.logo {
height: 1em;
margin-left: 0.5rem;
.center {
display: flex;
justify-content: center;
align-items: center;
position: relative;
padding: 4rem 0;
}
@media (max-width: 600px) {
.center::before {
background: var(--secondary-glow);
border-radius: 50%;
width: 480px;
height: 360px;
margin-left: -400px;
}
.center::after {
background: var(--primary-glow);
width: 240px;
height: 180px;
z-index: -1;
}
.center::before,
.center::after {
content: '';
left: 50%;
position: absolute;
filter: blur(45px);
transform: translateZ(0);
}
.logo,
.thirteen {
position: relative;
}
.thirteen {
display: flex;
justify-content: center;
align-items: center;
width: 75px;
height: 75px;
padding: 25px 10px;
margin-left: 16px;
transform: translateZ(0);
border-radius: var(--border-radius);
overflow: hidden;
box-shadow: 0px 2px 8px -1px #0000001a;
}
.thirteen::before,
.thirteen::after {
content: '';
position: absolute;
z-index: -1;
}
/* Conic Gradient Animation */
.thirteen::before {
animation: 6s rotate linear infinite;
width: 200%;
height: 200%;
background: var(--tile-border);
}
/* Inner Square */
.thirteen::after {
inset: 0;
padding: 1px;
border-radius: var(--border-radius);
background: linear-gradient(
to bottom right,
rgba(var(--tile-start-rgb), 1),
rgba(var(--tile-end-rgb), 1)
);
background-clip: content-box;
}
/* Enable hover only on non-touch devices */
@media (hover: hover) and (pointer: fine) {
.card:hover {
background: rgba(var(--card-rgb), 0.1);
border: 1px solid rgba(var(--card-border-rgb), 0.15);
}
.card:hover span {
transform: translateX(4px);
}
}
@media (prefers-reduced-motion) {
.thirteen::before {
animation: none;
}
.card:hover span {
transform: none;
}
}
/* Mobile */
@media (max-width: 700px) {
.content {
padding: 4rem;
}
.grid {
grid-template-columns: 1fr;
margin-bottom: 120px;
max-width: 320px;
text-align: center;
}
.card {
padding: 1rem 2.5rem;
}
.card h2 {
margin-bottom: 0.5rem;
}
.center {
padding: 8rem 0 6rem;
}
.center::before {
transform: none;
height: 300px;
}
.description {
font-size: 0.8rem;
}
.description a {
padding: 1rem;
}
.description p,
.description div {
display: flex;
justify-content: center;
position: fixed;
width: 100%;
flex-direction: column;
}
.description p {
align-items: center;
inset: 0 0 auto;
padding: 2rem 1rem 1.4rem;
border-radius: 0;
border: none;
border-bottom: 1px solid rgba(var(--callout-border-rgb), 0.25);
background: linear-gradient(
to bottom,
rgba(var(--background-start-rgb), 1),
rgba(var(--callout-rgb), 0.5)
);
background-clip: padding-box;
backdrop-filter: blur(24px);
}
.description div {
align-items: flex-end;
pointer-events: none;
inset: auto 0 0;
padding: 2rem;
height: 200px;
background: linear-gradient(
to bottom,
transparent 0%,
rgb(var(--background-end-rgb)) 40%
);
z-index: 1;
}
}
/* Tablet and Smaller Desktop */
@media (min-width: 701px) and (max-width: 1120px) {
.grid {
grid-template-columns: repeat(2, 50%);
}
}
@media (prefers-color-scheme: dark) {
.card,
.footer {
border-color: #222;
}
.code {
background: #111;
}
.logo img {
.vercelLogo {
filter: invert(1);
}
.logo,
.thirteen img {
filter: invert(1) drop-shadow(0 0 0.3rem #ffffff70);
}
}
@keyframes rotate {
from {
transform: rotate(360deg);
}
to {
transform: rotate(0deg);
}
}

View File

@@ -1,9 +1,98 @@
html,
body {
:root {
--max-width: 1100px;
--border-radius: 12px;
--font-mono: ui-monospace, Menlo, Monaco, 'Cascadia Mono', 'Segoe UI Mono',
'Roboto Mono', 'Oxygen Mono', 'Ubuntu Monospace', 'Source Code Pro',
'Fira Mono', 'Droid Sans Mono', 'Courier New', monospace;
--foreground-rgb: 0, 0, 0;
--background-start-rgb: 214, 219, 220;
--background-end-rgb: 255, 255, 255;
--primary-glow: conic-gradient(
from 180deg at 50% 50%,
#16abff33 0deg,
#0885ff33 55deg,
#54d6ff33 120deg,
#0071ff33 160deg,
transparent 360deg
);
--secondary-glow: radial-gradient(
rgba(255, 255, 255, 1),
rgba(255, 255, 255, 0)
);
--tile-start-rgb: 239, 245, 249;
--tile-end-rgb: 228, 232, 233;
--tile-border: conic-gradient(
#00000080,
#00000040,
#00000030,
#00000020,
#00000010,
#00000010,
#00000080
);
--callout-rgb: 238, 240, 241;
--callout-border-rgb: 172, 175, 176;
--card-rgb: 180, 185, 188;
--card-border-rgb: 131, 134, 135;
}
@media (prefers-color-scheme: dark) {
:root {
--foreground-rgb: 255, 255, 255;
--background-start-rgb: 0, 0, 0;
--background-end-rgb: 0, 0, 0;
--primary-glow: radial-gradient(rgba(1, 65, 255, 0.4), rgba(1, 65, 255, 0));
--secondary-glow: linear-gradient(
to bottom right,
rgba(1, 65, 255, 0),
rgba(1, 65, 255, 0),
rgba(1, 65, 255, 0.3)
);
--tile-start-rgb: 2, 13, 46;
--tile-end-rgb: 2, 5, 19;
--tile-border: conic-gradient(
#ffffff80,
#ffffff40,
#ffffff30,
#ffffff20,
#ffffff10,
#ffffff10,
#ffffff80
);
--callout-rgb: 20, 20, 20;
--callout-border-rgb: 108, 108, 108;
--card-rgb: 100, 100, 100;
--card-border-rgb: 200, 200, 200;
}
}
* {
box-sizing: border-box;
padding: 0;
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,
Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
}
html,
body {
max-width: 100vw;
overflow-x: hidden;
}
body {
color: rgb(var(--foreground-rgb));
background: linear-gradient(
to bottom,
transparent,
rgb(var(--background-end-rgb))
)
rgb(var(--background-start-rgb));
}
a {
@@ -11,16 +100,8 @@ a {
text-decoration: none;
}
* {
box-sizing: border-box;
}
@media (prefers-color-scheme: dark) {
html {
color-scheme: dark;
}
body {
color: white;
background: black;
}
}

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",
@@ -53,7 +53,7 @@
"test-integration-cli": "node utils/gen.js && turbo run test-integration-cli",
"test-integration-once": "node utils/gen.js && turbo run test-integration-once",
"test-integration-dev": "node utils/gen.js && turbo run test-integration-dev",
"lint": "eslint . --ext .ts,.js",
"lint": "eslint . --cache --ext .ts,.js",
"prepare": "husky install",
"pack": "cd utils && node -r ts-eager/register ./pack.ts"
},

View File

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

View File

@@ -1,6 +1,6 @@
{
"name": "vercel",
"version": "28.9.0",
"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.1",
"@vercel/go": "2.2.20",
"@vercel/hydrogen": "0.0.34",
"@vercel/next": "3.3.3",
"@vercel/node": "2.8.1",
"@vercel/python": "3.1.30",
"@vercel/redwood": "1.0.40",
"@vercel/remix": "1.1.2",
"@vercel/ruby": "1.3.46",
"@vercel/static-build": "1.0.43",
"@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": {
@@ -60,8 +60,6 @@
"@sindresorhus/slugify": "0.11.0",
"@swc/core": "1.2.218",
"@tootallnate/once": "1.1.2",
"@types/ansi-escapes": "3.0.0",
"@types/ansi-regex": "4.0.0",
"@types/async-retry": "1.2.1",
"@types/bytes": "3.0.0",
"@types/chance": "1.1.3",
@@ -95,17 +93,17 @@
"@types/which": "1.3.2",
"@types/write-json-file": "2.2.1",
"@types/yauzl-promise": "2.1.0",
"@vercel/client": "12.2.22",
"@vercel/client": "12.2.24",
"@vercel/error-utils": "1.0.3",
"@vercel/frameworks": "1.1.15",
"@vercel/fs-detectors": "3.5.5",
"@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",
"ajv": "6.12.2",
"alpha-sort": "2.0.1",
"ansi-escapes": "3.0.0",
"ansi-regex": "3.0.0",
"ansi-escapes": "4.3.2",
"ansi-regex": "5.0.1",
"arg": "5.0.0",
"async-listen": "1.2.0",
"async-retry": "1.1.3",
@@ -161,8 +159,9 @@
"rimraf": "3.0.2",
"semver": "5.5.0",
"serve-handler": "6.1.1",
"strip-ansi": "5.2.0",
"strip-ansi": "6.0.1",
"stripe": "5.1.0",
"supports-hyperlinks": "2.2.0",
"tar-fs": "1.16.3",
"test-listen": "1.1.0",
"text-table": "0.2.0",

View File

@@ -88,6 +88,9 @@ async function performCreateAlias(
if (err.code === 'invalid_alias') {
return new ERRORS.InvalidAlias(alias);
}
if (err.code === 'deployment_not_ready') {
return new ERRORS.DeploymentNotReady({ url: deployment.url });
}
if (err.status === 403) {
if (err.code === 'alias_in_use') {
return new ERRORS.AliasInUse(alias);
@@ -96,9 +99,6 @@ async function performCreateAlias(
return new ERRORS.DomainPermissionDenied(alias, contextName);
}
}
if (err.status === 400) {
return new ERRORS.DeploymentNotReady({ url: deployment.url });
}
}
throw err;

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

@@ -1,4 +1,6 @@
import chalk from 'chalk';
import * as ansiEscapes from 'ansi-escapes';
import { supportsHyperlink as detectSupportsHyperlink } from 'supports-hyperlinks';
import renderLink from './link';
import wait, { StopSpinner } from './wait';
import type { WritableTTY } from '../../types';
@@ -8,24 +10,34 @@ const IS_TEST = process.env.NODE_ENV === 'test';
export interface OutputOptions {
debug?: boolean;
supportsHyperlink?: boolean;
}
export interface LogOptions {
color?: typeof chalk;
}
interface LinkOptions {
fallback?: false | (() => string);
}
export class Output {
stream: WritableTTY;
debugEnabled: boolean;
supportsHyperlink: boolean;
private spinnerMessage: string;
private _spinner: StopSpinner | null;
constructor(
stream: WritableTTY,
{ debug: debugEnabled = false }: OutputOptions = {}
{
debug: debugEnabled = false,
supportsHyperlink = detectSupportsHyperlink(stream),
}: OutputOptions = {}
) {
this.stream = stream;
this.debugEnabled = debugEnabled;
this.supportsHyperlink = supportsHyperlink;
this.spinnerMessage = '';
this._spinner = null;
}
@@ -167,4 +179,27 @@ export class Output {
return promise;
};
/**
* Returns an ANSI formatted hyperlink when support has been enabled.
*/
link = (
text: string,
url: string,
{ fallback }: LinkOptions = {}
): string => {
// Based on https://github.com/sindresorhus/terminal-link (MIT license)
if (!this.supportsHyperlink) {
// If the fallback has been explicitly disabled, don't modify the text itself
if (fallback === false) {
return renderLink(text);
}
return typeof fallback === 'function'
? fallback()
: `${text} (${renderLink(url)})`;
}
return ansiEscapes.link(chalk.cyan(text), url);
};
}

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

@@ -0,0 +1,37 @@
import stripAnsi from 'strip-ansi';
import { client } from '../../../mocks/client';
describe('Output', () => {
describe('link()', () => {
it('should return hyperlink ANSI codes when `supportsHyperlink=true`', () => {
client.output.supportsHyperlink = true;
const val = client.output.link('Click Here', 'https://example.com');
expect(val).toEqual(
'\x1B]8;;https://example.com\x07Click Here\x1B]8;;\x07'
);
expect(stripAnsi(val)).toEqual('Click Here');
});
it('should return default fallback when `supportsHyperlink=false`', () => {
client.output.supportsHyperlink = false;
const val = client.output.link('Click Here', 'https://example.com');
expect(val).toEqual('Click Here (https://example.com)');
});
it('should return text fallback when `supportsHyperlink=false` with `fallback: false`', () => {
client.output.supportsHyperlink = false;
const val = client.output.link('Click Here', 'https://example.com', {
fallback: false,
});
expect(val).toEqual('Click Here');
});
it('should return fallback when `supportsHyperlink=false` with `fallback` function', () => {
client.output.supportsHyperlink = false;
const val = client.output.link('Click Here', 'https://example.com', {
fallback: () => 'other',
});
expect(val).toEqual('other');
});
});
});

View File

@@ -0,0 +1,4 @@
declare module 'supports-hyperlinks' {
import { Writable } from 'stream';
export function supportsHyperlink(stream: Writable): boolean;
}

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/client",
"version": "12.2.22",
"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.1",
"@vercel/build-utils": "5.7.3",
"@vercel/routing-utils": "2.1.3",
"@zeit/fetch": "5.2.0",
"async-retry": "1.2.3",

View File

@@ -22,6 +22,7 @@
- [geolocation](README.md#geolocation)
- [ipAddress](README.md#ipaddress)
- [json](README.md#json)
- [next](README.md#next)
- [rewrite](README.md#rewrite)
@@ -169,6 +170,49 @@ Returns the IP address of the request from the headers.
---
### json
**json**(`data`, `init?`): `Response`
Builds a response object from a serializable JavaScript object:
- sets the 'Content-Type' response header to 'application/json'
- sets the response body from provided data
**`See`**
[https://fetch.spec.whatwg.org/#dom-response-json](https://fetch.spec.whatwg.org/#dom-response-json)
**`Example`**
<caption>Building a JSON response</caption>
```ts
import { json } from '@vercel/edge';
const response = json(
{ notification: { success: true, content: 'worked' } },
{ headers: { 'x-custom': '1' } }
);
```
#### Parameters
| Name | Type | Description |
| :------ | :------------- | :------------------------------------------------------ |
| `data` | `any` | serialized data |
| `init?` | `ResponseInit` | optional custom response status, statusText and headers |
#### Returns
`Response`
#### Defined in
[src/response.ts:19](https://github.com/vercel/vercel/blob/main/packages/edge/src/response.ts#L19)
---
### next
**next**(`init?`): `Response`

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/edge",
"version": "0.1.2",
"version": "0.2.1",
"license": "MIT",
"main": "dist/index.js",
"module": "dist/index.mjs",

View File

@@ -3,3 +3,6 @@ export * from './middleware-helpers';
export type { Geo } from './edge-headers';
export * from './edge-headers';
export * from './response';
import './published-types.d.ts';

View File

@@ -0,0 +1,8 @@
/* eslint-disable no-var */
declare global {
// must be `var` to work
var process: {
env: Record<string, string>;
};
}

View File

@@ -0,0 +1,22 @@
/**
* Builds a response object from a serializable JavaScript object:
* - sets the 'Content-Type' response header to 'application/json'
* - sets the response body from provided data
*
* @see {@link https://fetch.spec.whatwg.org/#dom-response-json}
* @param data serialized data
* @param init optional custom response status, statusText and headers
*
* @example
* <caption>Building a JSON response</caption>
*
* ```ts
* import { json } from '@vercel/edge';
*
* const response = json({ notification: { success: true, content: 'worked' } }, { headers: {'x-custom': '1' }})
* ```
*/
export function json(data: any, init?: ResponseInit): Response {
// @ts-expect-error This is not in lib/dom right now, and we can't augment it.
return Response.json(data, init);
}

34
packages/edge/test/response.test.ts vendored Normal file
View File

@@ -0,0 +1,34 @@
/**
* @jest-environment @edge-runtime/jest-environment
*/
import { json } from '../src/response';
describe('json', () => {
it('returns a response with JSON content', async () => {
const content = { foo: 'bar' };
const response = json(content);
expect(response.headers.get('content-type')).toEqual('application/json');
expect(await response.json()).toEqual(content);
});
it('can set response init', async () => {
const content = { bar: 'baz' };
const status = 201;
const statusText = 'it is in';
const customHeader = 'x-custom';
const customHeaderValue = '1';
const response = json(content, {
status,
statusText,
headers: { [customHeader]: customHeaderValue },
});
expect(response).toMatchObject({
status,
statusText,
});
expect(response.headers.get('content-type')).toEqual('application/json');
expect(response.headers.get(customHeader)).toEqual(customHeaderValue);
expect(await response.json()).toEqual(content);
});
});

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/frameworks",
"version": "1.1.15",
"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',
@@ -1790,7 +1793,7 @@ export const frameworks = [
value: 'docs/.vitepress/dist',
},
},
getOutputDirName: async () => '.vitepress/dist',
getOutputDirName: async () => 'docs/.vitepress/dist',
},
{
name: 'VuePress',

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/fs-detectors",
"version": "3.5.5",
"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.15",
"@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.1",
"@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.20",
"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.1",
"@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.34",
"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.1",
"@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.3",
"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.1",
"@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

@@ -24,6 +24,7 @@ import {
PrepareCache,
NodejsLambda,
BuildResultV2Typical as BuildResult,
BuildResultBuildOutput,
} from '@vercel/build-utils';
import { Route, RouteWithHandle, RouteWithSrc } from '@vercel/routing-utils';
import {
@@ -65,6 +66,7 @@ import {
getExportIntent,
getExportStatus,
getFilesMapFromReasons,
getImagesConfig,
getImagesManifest,
getMiddlewareManifest,
getNextConfig,
@@ -453,6 +455,24 @@ export const build: BuildV2 = async ({
}
debug('build command exited');
let buildOutputVersion: undefined | number;
try {
const data = await readJSON(
path.join(outputDirectory, 'output/config.json')
);
buildOutputVersion = data.version;
} catch (_) {
// tolerate for older versions
}
if (buildOutputVersion) {
return {
buildOutputPath: path.join(outputDirectory, 'output'),
buildOutputVersion,
} as BuildResultBuildOutput;
}
let appMountPrefixNoTrailingSlash = path.posix
.join('/', entryDirectory)
.replace(/\/+$/, '');
@@ -802,18 +822,7 @@ export const build: BuildV2 = async ({
return {
output,
images:
imagesManifest?.images?.loader === 'default'
? {
domains: imagesManifest.images.domains,
sizes: imagesManifest.images.sizes,
remotePatterns: imagesManifest.images.remotePatterns,
minimumCacheTTL: imagesManifest.images.minimumCacheTTL,
dangerouslyAllowSVG: imagesManifest.images.dangerouslyAllowSVG,
contentSecurityPolicy:
imagesManifest.images.contentSecurityPolicy,
}
: undefined,
images: getImagesConfig(imagesManifest),
routes: [
...privateOutputs.routes,
@@ -2170,17 +2179,7 @@ export const build: BuildV2 = async ({
...privateOutputs.files,
},
wildcard: wildcardConfig,
images:
imagesManifest?.images?.loader === 'default'
? {
domains: imagesManifest.images.domains,
sizes: imagesManifest.images.sizes,
remotePatterns: imagesManifest.images.remotePatterns,
minimumCacheTTL: imagesManifest.images.minimumCacheTTL,
dangerouslyAllowSVG: imagesManifest.images.dangerouslyAllowSVG,
contentSecurityPolicy: imagesManifest.images.contentSecurityPolicy,
}
: undefined,
images: getImagesConfig(imagesManifest),
/*
Desired routes order
- Runtime headers

View File

@@ -38,6 +38,7 @@ import {
outputFunctionFileSizeInfo,
MAX_UNCOMPRESSED_LAMBDA_SIZE,
normalizeIndexOutput,
getImagesConfig,
getNextServerPath,
getMiddlewareBundle,
getFilesMapFromReasons,
@@ -1158,18 +1159,7 @@ export async function serverBuild({
return {
wildcard: wildcardConfig,
images:
imagesManifest?.images?.loader === 'default'
? {
domains: imagesManifest.images.domains,
sizes: imagesManifest.images.sizes,
remotePatterns: imagesManifest.images.remotePatterns,
minimumCacheTTL: imagesManifest.images.minimumCacheTTL,
formats: imagesManifest.images.formats,
dangerouslyAllowSVG: imagesManifest.images.dangerouslyAllowSVG,
contentSecurityPolicy: imagesManifest.images.contentSecurityPolicy,
}
: undefined,
images: getImagesConfig(imagesManifest),
output: {
...publicDirectoryFiles,
...lambdas,

View File

@@ -14,6 +14,7 @@ import {
isSymbolicLink,
NodejsLambda,
EdgeFunction,
Images,
} from '@vercel/build-utils';
import { NodeFileTraceReasons } from '@vercel/nft';
import type {
@@ -155,6 +156,23 @@ async function getNextConfig(workPath: string, entryPath: string) {
return null;
}
function getImagesConfig(
imagesManifest: NextImagesManifest | undefined
): Images | undefined {
return imagesManifest?.images?.loader === 'default' &&
imagesManifest.images?.unoptimized !== true
? {
domains: imagesManifest.images.domains,
sizes: imagesManifest.images.sizes,
remotePatterns: imagesManifest.images.remotePatterns,
minimumCacheTTL: imagesManifest.images.minimumCacheTTL,
formats: imagesManifest.images.formats,
dangerouslyAllowSVG: imagesManifest.images.dangerouslyAllowSVG,
contentSecurityPolicy: imagesManifest.images.contentSecurityPolicy,
}
: undefined;
}
function normalizePage(page: string): string {
// Resolve on anything that doesn't start with `/`
if (!page.startsWith('/')) {
@@ -499,6 +517,7 @@ export type NextImagesManifest = {
remotePatterns: RemotePattern[];
minimumCacheTTL?: number;
formats?: ImageFormat[];
unoptimized?: boolean;
dangerouslyAllowSVG?: boolean;
contentSecurityPolicy?: string;
};
@@ -2244,6 +2263,7 @@ export {
validateEntrypoint,
normalizePackageJson,
getNextConfig,
getImagesConfig,
stringMap,
normalizePage,
isDynamicRoute,

View File

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

View File

@@ -3,6 +3,7 @@ const {
excludeFiles,
validateEntrypoint,
normalizePackageJson,
getImagesConfig,
getNextConfig,
} = require('../../dist/utils');
const { FileRef } = require('@vercel/build-utils');
@@ -27,6 +28,86 @@ describe('getNextConfig', () => {
});
});
describe('getImagesConfig', () => {
it('should return undefined when undefined config', async () => {
const result = await getImagesConfig(undefined);
expect(result).toBeUndefined();
});
it('should return undefined when null config', async () => {
const result = await getImagesConfig(null);
expect(result).toBeUndefined();
});
it('should return undefined when empty object config', async () => {
const result = await getImagesConfig({ images: {} });
expect(result).toBeUndefined();
});
it('should return pass-through props when loader is default and unoptimized undefined', async () => {
const images = {
loader: 'default',
domains: ['example.com'],
sizes: [512, 1024],
remotePatterns: undefined,
formats: ['image/webp'],
minimumCacheTTL: 60,
dangerouslyAllowSVG: false,
contentSecurityPolicy: undefined,
};
const result = await getImagesConfig({ images });
expect(result).toEqual({
domains: ['example.com'],
sizes: [512, 1024],
remotePatterns: undefined,
formats: ['image/webp'],
minimumCacheTTL: 60,
dangerouslyAllowSVG: false,
contentSecurityPolicy: undefined,
});
});
it('should return pass-through props when loader is default and unoptimized false', async () => {
const images = {
unoptimized: false,
loader: 'default',
domains: ['example.com'],
sizes: [512, 1024],
remotePatterns: undefined,
formats: ['image/webp'],
minimumCacheTTL: 60,
dangerouslyAllowSVG: false,
contentSecurityPolicy: undefined,
};
const result = await getImagesConfig({ images });
expect(result).toEqual({
domains: ['example.com'],
sizes: [512, 1024],
remotePatterns: undefined,
formats: ['image/webp'],
minimumCacheTTL: 60,
dangerouslyAllowSVG: false,
contentSecurityPolicy: undefined,
});
});
it('return return undefined when loader is default and unoptimized true', async () => {
const images = {
unoptimized: true,
loader: 'default',
domains: ['example.com'],
sizes: [512, 1024],
remotePatterns: undefined,
formats: ['image/webp'],
minimumCacheTTL: 60,
dangerouslyAllowSVG: false,
contentSecurityPolicy: undefined,
};
const result = await getImagesConfig({ images });
expect(result).toBeUndefined();
});
});
describe('excludeFiles', () => {
it('should exclude files', () => {
const files = {

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.1",
"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.1",
"@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.30",
"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.1",
"@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.40",
"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.1"
"@vercel/build-utils": "5.7.3"
}
}

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/remix",
"version": "1.1.2",
"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.1",
"@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.46",
"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.1",
"@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.43",
"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.1",
"@vercel/frameworks": "1.1.15",
"@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');
/**

231
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"
@@ -2532,18 +2540,6 @@
resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.3.tgz#472eaab5f15c1ffdd7f8628bd4c4f753995ec79e"
integrity sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==
"@types/ansi-escapes@3.0.0":
version "3.0.0"
resolved "https://registry.yarnpkg.com/@types/ansi-escapes/-/ansi-escapes-3.0.0.tgz#619bbc6d46fc75da6d784e53b5a25d2efff07108"
integrity sha512-aamJrX6PdmIO8E9qhZaYmXiMGXwnkF2lcga/VbqLf8g90aaKGZ4cSFP5AabqxAbmp0h69C9yE3a4fUBtVpqtmg==
dependencies:
"@types/node" "*"
"@types/ansi-regex@4.0.0":
version "4.0.0"
resolved "https://registry.yarnpkg.com/@types/ansi-regex/-/ansi-regex-4.0.0.tgz#cb20bb66da7700ea9b26f16971f03f0e092eddad"
integrity sha512-r1W316vjsZXn1/csLC4HcCJs6jIHIzksHJd7xx+Dl+PAb0S2Dh9cR8ZsIMEfGmbBtP7JNWlf2KKahSkDP6rg3g==
"@types/async-retry@1.2.1":
version "1.2.1"
resolved "https://registry.yarnpkg.com/@types/async-retry/-/async-retry-1.2.1.tgz#fa9ac165907a8ee78f4924f4e393b656c65b5bb4"
@@ -3415,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"
@@ -3430,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"
@@ -3616,10 +3612,12 @@ ansi-align@^3.0.0:
dependencies:
string-width "^3.0.0"
ansi-escapes@3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.0.0.tgz#ec3e8b4e9f8064fc02c3ac9b65f1c275bda8ef92"
integrity sha512-O/klc27mWNUigtv0F8NJWbLF00OcegQalkqKURWdosW08YZKi4m6CnSUSvIZG1otNJbTWhN01Hhz389DW7mvDQ==
ansi-escapes@4.3.2:
version "4.3.2"
resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e"
integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==
dependencies:
type-fest "^0.21.3"
ansi-escapes@^3.0.0, ansi-escapes@^3.2.0:
version "3.2.0"
@@ -3633,16 +3631,21 @@ ansi-escapes@^4.2.0, ansi-escapes@^4.2.1:
dependencies:
type-fest "^0.11.0"
ansi-regex@3.0.0, ansi-regex@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998"
integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=
ansi-regex@5.0.1, ansi-regex@^5.0.1:
version "5.0.1"
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304"
integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==
ansi-regex@^2.0.0:
version "2.1.1"
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df"
integrity sha1-w7M6te42DYbg5ijwRorn7yfWVN8=
ansi-regex@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998"
integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=
ansi-regex@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997"
@@ -3653,11 +3656,6 @@ ansi-regex@^5.0.0:
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75"
integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==
ansi-regex@^5.0.1:
version "5.0.1"
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304"
integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==
ansi-styles@^2.2.1:
version "2.2.1"
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe"
@@ -6218,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"
@@ -9096,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"
@@ -10965,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==
@@ -11795,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"
@@ -12444,12 +12430,12 @@ stringify-object@^3.3.0:
is-obj "^1.0.1"
is-regexp "^1.0.0"
strip-ansi@5.2.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0:
version "5.2.0"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae"
integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==
strip-ansi@6.0.1, strip-ansi@^6.0.1:
version "6.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
dependencies:
ansi-regex "^4.1.0"
ansi-regex "^5.0.1"
strip-ansi@^3.0.0, strip-ansi@^3.0.1:
version "3.0.1"
@@ -12465,6 +12451,13 @@ strip-ansi@^4.0.0:
dependencies:
ansi-regex "^3.0.0"
strip-ansi@^5.1.0, strip-ansi@^5.2.0:
version "5.2.0"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae"
integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==
dependencies:
ansi-regex "^4.1.0"
strip-ansi@^6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.0.tgz#0b1571dd7669ccd4f3e06e14ef1eed26225ae532"
@@ -12472,13 +12465,6 @@ strip-ansi@^6.0.0:
dependencies:
ansi-regex "^5.0.0"
strip-ansi@^6.0.1:
version "6.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
dependencies:
ansi-regex "^5.0.1"
strip-bom-buf@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/strip-bom-buf/-/strip-bom-buf-2.0.0.tgz#ff9c223937f8e7154b77e9de9bde094186885c15"
@@ -12622,7 +12608,7 @@ supports-color@^8.0.0:
dependencies:
has-flag "^4.0.0"
supports-hyperlinks@^2.0.0:
supports-hyperlinks@2.2.0, supports-hyperlinks@^2.0.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/supports-hyperlinks/-/supports-hyperlinks-2.2.0.tgz#4f77b42488765891774b70c79babd87f9bd594bb"
integrity sha512-6sXEzV5+I5j8Bmq9/vUphGRM/RJNT9SCURJLjwfOg51heRtguGWDzcaBlgAzKhQa0EVNpPEKzQuBwZ8S8WaCeQ==
@@ -13116,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"
@@ -13238,6 +13176,11 @@ type-fest@^0.20.2:
resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4"
integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==
type-fest@^0.21.3:
version "0.21.3"
resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37"
integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==
type-fest@^0.3.0:
version "0.3.1"
resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.3.1.tgz#63d00d204e059474fe5e1b7c011112bbd1dc29e1"