This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.
# Releases
## vercel@34.1.3
### Patch Changes
- Updated dependencies
\[[`5758838d0`](5758838d09)]:
- @vercel/next@4.2.3
## @vercel/next@4.2.3
### Patch Changes
- [next] Reland add .action handling for dynamic routes
([#11487](https://github.com/vercel/vercel/pull/11487))
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Migrating `vc alias` to use new argument parsing utilities.
Note that our snapshot tests show that our help text was out of sync with what we were actually parsing from the user.
In particular, we were showing `-n` as the shorthand for both `next` and `limit` and neither of these had this shortflag. `next` was parsing `-N` (capital), so I've updated it to that.
`--json` was parsed, but wasn't mentioned in the help text. I've kept it this way, but it may be worth adding a description. We may want to have a separate discussion about the nature and role of `json` output from our CLI as a whole.
There aren't currently any tests for server actions which have special handling in the builder. This adds tests to help avoid regressions in future Next.js builder work.
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.
# Releases
## @vercel/python@4.2.0
### Minor Changes
- Add support for Python 3.12
([#11478](https://github.com/vercel/vercel/pull/11478))
## vercel@34.1.2
### Patch Changes
- Updated dependencies
\[[`64bd6dd05`](64bd6dd057),
[`532885148`](532885148b),
[`adcfc365a`](adcfc365a7)]:
- @vercel/next@4.2.2
- @vercel/python@4.2.0
## @vercel/next@4.2.2
### Patch Changes
- [next] revert .action rewrites
([#11470](https://github.com/vercel/vercel/pull/11470))
- Next.js builds: support sectioned source maps
([#11453](https://github.com/vercel/vercel/pull/11453))
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Allows for `python3.12` to be used when the build is being run in the AL2023 build container (Node v20 project setting). This version is not usable in the AL2 image because `python3.12` is not installed there.
The e2e tests now default to running in AL2023, except for a few fixtures which require an older version of Python.
Turbopack outputs sectioned source maps, but webpack’s `webpack-sources`
packages doesn’t support these. For performance reasons, it should, but
as an interim solution, flatten these sections maps for compatibility.
---------
Co-authored-by: Nathan Rajlich <n@n8.io>
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.
# Releases
## @vercel/build-utils@7.12.0
### Minor Changes
- Trigger release
([#11465](https://github.com/vercel/vercel/pull/11465))
## @vercel/static-build@2.5.0
### Minor Changes
- Don't rely on `hugo` binary existing in build-container
([#11455](https://github.com/vercel/vercel/pull/11455))
### Patch Changes
- Updated dependencies \[]:
- @vercel/gatsby-plugin-vercel-builder@2.0.25
## vercel@34.1.1
### Patch Changes
- Updated dependencies
\[[`f4c181a2c`](f4c181a2c2),
[`2826563ff`](2826563ffa)]:
- @vercel/static-build@2.5.0
- @vercel/build-utils@7.12.0
- @vercel/node@3.0.27
## @vercel/client@13.2.1
### Patch Changes
- Updated dependencies
\[[`2826563ff`](2826563ffa)]:
- @vercel/build-utils@7.12.0
## @vercel/gatsby-plugin-vercel-builder@2.0.25
### Patch Changes
- Updated dependencies
\[[`2826563ff`](2826563ffa)]:
- @vercel/build-utils@7.12.0
## @vercel/node@3.0.27
### Patch Changes
- Updated dependencies
\[[`2826563ff`](2826563ffa)]:
- @vercel/build-utils@7.12.0
## @vercel-internals/types@1.0.30
### Patch Changes
- Updated dependencies
\[[`2826563ff`](2826563ffa)]:
- @vercel/build-utils@7.12.0
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
PR #11305 didn't include this package as part of its changeset, so there
was no new release even though it is exporting a new function. Adding
this changeset so that the package is properly published.
Closes#11464.
* Makes `hugo` framework preset work when Node.js v20.x is selected in
Project Settings.
* Stores the downloaded `hugo` binary in the `.vercel/cache` directory,
so that it does not need to be re-downloaded upon every deployment.
* Makes `vc build` work when run locally for Hugo projects - tested on
macOS arm64.
This PR adds a rule to disallow the use of console.log/console.error/etc
from within the CLI package. The aim is to centralize our use of stdio
within the CLI so that everything moves through our client's output
module. It also disables the rule for all of the current console usage,
with the hopes that we will clean things up soon™
Also want to note that the rule only applies to usage from within the
CLI, so dependencies that the CLI pulls in (both external and even
within this monorepo) are unaffected.
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Bumps the core group in /packages/static-build/test/fixtures/astro-v4 with 1 update: [astro](https://github.com/withastro/astro/tree/HEAD/packages/astro).
Updates `astro` from 4.5.10 to 4.6.2
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/withastro/astro/releases">astro's releases</a>.</em></p>
<blockquote>
<h2>astro@4.6.2</h2>
<h3>Patch Changes</h3>
<ul>
<li>
<p><a href="https://redirect.github.com/withastro/astro/pull/10732">#10732</a> <a href="a92e263beb"><code>a92e263beb6e0166f1f13c97803d1861793e2a99</code></a> Thanks <a href="https://github.com/rishi-raj-jain"><code>@rishi-raj-jain</code></a>! - Correctly sets <code>build.assets</code> directory during <code>vite</code> config setup</p>
</li>
<li>
<p><a href="https://redirect.github.com/withastro/astro/pull/10776">#10776</a> <a href="1607face67"><code>1607face67051b16d4648555f1001b2a9308e377</code></a> Thanks <a href="https://github.com/fshafiee"><code>@fshafiee</code></a>! - Fixes cookies type inference</p>
</li>
<li>
<p><a href="https://redirect.github.com/withastro/astro/pull/10796">#10796</a> <a href="90669472df"><code>90669472df3a05b33f0de46fd2d039e3eba7f7dd</code></a> Thanks <a href="https://github.com/bluwy"><code>@bluwy</code></a>! - Disables streaming when rendering site with <code>output: "static"</code></p>
</li>
<li>
<p><a href="https://redirect.github.com/withastro/astro/pull/10782">#10782</a> <a href="b0589d0553"><code>b0589d05538fcc77dd3c38198bf93f3548362cd8</code></a> Thanks <a href="https://github.com/nektro"><code>@nektro</code></a>! - Handles possible null value when calling <code>which-pm</code> during dynamic package installation</p>
</li>
<li>
<p><a href="https://redirect.github.com/withastro/astro/pull/10774">#10774</a> <a href="308b5d8c12"><code>308b5d8c122f44e7724bb2f3ad3aa5c43a83e584</code></a> Thanks <a href="https://github.com/Princesseuh"><code>@Princesseuh</code></a>! - Fixes <code>astro add</code> sometimes modifying <code>baseUrl</code> unintentionally</p>
</li>
<li>
<p><a href="https://redirect.github.com/withastro/astro/pull/10783">#10783</a> <a href="4dbd545304"><code>4dbd545304d1a8af903c8c97f237eb55c988c40b</code></a> Thanks <a href="https://github.com/jurajkapsz"><code>@jurajkapsz</code></a>! - Fixes Picture component specialFormatsFallback fallback check</p>
</li>
<li>
<p><a href="https://redirect.github.com/withastro/astro/pull/10775">#10775</a> <a href="0684312145"><code>06843121450899ecf0390ca4efaff6c9a6fe0f75</code></a> Thanks <a href="https://github.com/Princesseuh"><code>@Princesseuh</code></a>! - Fixes assets endpoint in serverless returning 404 in certain situations where the website might be under a protected route</p>
</li>
<li>
<p><a href="https://redirect.github.com/withastro/astro/pull/10787">#10787</a> <a href="699f4559a2"><code>699f4559a279b374bddb3e5e48c72afe2709e8e7</code></a> Thanks <a href="https://github.com/martrapp"><code>@martrapp</code></a>! - Fixes a timing issue in the view transition simulation.</p>
</li>
</ul>
<h2>astro@4.6.1</h2>
<h3>Patch Changes</h3>
<ul>
<li>
<p><a href="https://redirect.github.com/withastro/astro/pull/10708">#10708</a> <a href="742866c566"><code>742866c5669a2be4f8b5a4c861cadb933c381415</code></a> Thanks <a href="https://github.com/horo-fox"><code>@horo-fox</code></a>! - Limits parallel imports within <code>getCollection()</code> to prevent EMFILE errors when accessing files</p>
</li>
<li>
<p><a href="https://redirect.github.com/withastro/astro/pull/10755">#10755</a> <a href="c6d59b6fb7"><code>c6d59b6fb7db20af957a8706c8159c50619235ef</code></a> Thanks <a href="https://github.com/ematipico"><code>@ematipico</code></a>! - Fixes a case where the i18n fallback failed to correctly redirect to the index page with SSR enabled</p>
</li>
</ul>
<h2>astro@4.6.0</h2>
<h3>Minor Changes</h3>
<ul>
<li>
<p><a href="https://redirect.github.com/withastro/astro/pull/10591">#10591</a> <a href="39988ef8e2"><code>39988ef8e2c4c4888543c973e06d9b9939e4ac95</code></a> Thanks <a href="https://github.com/mingjunlu"><code>@mingjunlu</code></a>! - Adds a new dev toolbar settings option to change the horizontal placement of the dev toolbar on your screen: bottom left, bottom center, or bottom right.</p>
</li>
<li>
<p><a href="https://redirect.github.com/withastro/astro/pull/10689">#10689</a> <a href="683d51a5ee"><code>683d51a5eecafbbfbfed3910a3f1fbf0b3531b99</code></a> Thanks <a href="https://github.com/ematipico"><code>@ematipico</code></a>! - Deprecate support for versions of Node.js older than <code>v18.17.1</code> for Node.js 18, older than <code>v20.0.3</code> for Node.js 20, and the complete Node.js v19 release line.</p>
<p>This change is in line with Astro's <a href="https://docs.astro.build/en/upgrade-astro/#support">Node.js support policy</a>.</p>
</li>
<li>
<p><a href="https://redirect.github.com/withastro/astro/pull/10678">#10678</a> <a href="2e53b5fff6"><code>2e53b5fff6d292b7acdf8c30a6ecf5e5696846a1</code></a> Thanks <a href="https://github.com/ematipico"><code>@ematipico</code></a>! - Adds a new experimental security option to prevent <a href="https://owasp.org/www-community/attacks/csrf">Cross-Site Request Forgery (CSRF) attacks</a>. This feature is available only for pages rendered on demand:</p>
<pre lang="js"><code>import { defineConfig } from 'astro/config';
export default defineConfig({
experimental: {
security: {
csrfProtection: {
origin: true,
},
},
},
});
</code></pre>
</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/withastro/astro/blob/main/packages/astro/CHANGELOG.md">astro's changelog</a>.</em></p>
<blockquote>
<h2>4.6.2</h2>
<h3>Patch Changes</h3>
<ul>
<li>
<p><a href="https://redirect.github.com/withastro/astro/pull/10732">#10732</a> <a href="a92e263beb"><code>a92e263beb6e0166f1f13c97803d1861793e2a99</code></a> Thanks <a href="https://github.com/rishi-raj-jain"><code>@rishi-raj-jain</code></a>! - Correctly sets <code>build.assets</code> directory during <code>vite</code> config setup</p>
</li>
<li>
<p><a href="https://redirect.github.com/withastro/astro/pull/10776">#10776</a> <a href="1607face67"><code>1607face67051b16d4648555f1001b2a9308e377</code></a> Thanks <a href="https://github.com/fshafiee"><code>@fshafiee</code></a>! - Fixes cookies type inference</p>
</li>
<li>
<p><a href="https://redirect.github.com/withastro/astro/pull/10796">#10796</a> <a href="90669472df"><code>90669472df3a05b33f0de46fd2d039e3eba7f7dd</code></a> Thanks <a href="https://github.com/bluwy"><code>@bluwy</code></a>! - Disables streaming when rendering site with <code>output: "static"</code></p>
</li>
<li>
<p><a href="https://redirect.github.com/withastro/astro/pull/10782">#10782</a> <a href="b0589d0553"><code>b0589d05538fcc77dd3c38198bf93f3548362cd8</code></a> Thanks <a href="https://github.com/nektro"><code>@nektro</code></a>! - Handles possible null value when calling <code>which-pm</code> during dynamic package installation</p>
</li>
<li>
<p><a href="https://redirect.github.com/withastro/astro/pull/10774">#10774</a> <a href="308b5d8c12"><code>308b5d8c122f44e7724bb2f3ad3aa5c43a83e584</code></a> Thanks <a href="https://github.com/Princesseuh"><code>@Princesseuh</code></a>! - Fixes <code>astro add</code> sometimes modifying <code>baseUrl</code> unintentionally</p>
</li>
<li>
<p><a href="https://redirect.github.com/withastro/astro/pull/10783">#10783</a> <a href="4dbd545304"><code>4dbd545304d1a8af903c8c97f237eb55c988c40b</code></a> Thanks <a href="https://github.com/jurajkapsz"><code>@jurajkapsz</code></a>! - Fixes Picture component specialFormatsFallback fallback check</p>
</li>
<li>
<p><a href="https://redirect.github.com/withastro/astro/pull/10775">#10775</a> <a href="0684312145"><code>06843121450899ecf0390ca4efaff6c9a6fe0f75</code></a> Thanks <a href="https://github.com/Princesseuh"><code>@Princesseuh</code></a>! - Fixes assets endpoint in serverless returning 404 in certain situations where the website might be under a protected route</p>
</li>
<li>
<p><a href="https://redirect.github.com/withastro/astro/pull/10787">#10787</a> <a href="699f4559a2"><code>699f4559a279b374bddb3e5e48c72afe2709e8e7</code></a> Thanks <a href="https://github.com/martrapp"><code>@martrapp</code></a>! - Fixes a timing issue in the view transition simulation.</p>
</li>
</ul>
<h2>4.6.1</h2>
<h3>Patch Changes</h3>
<ul>
<li>
<p><a href="https://redirect.github.com/withastro/astro/pull/10708">#10708</a> <a href="742866c566"><code>742866c5669a2be4f8b5a4c861cadb933c381415</code></a> Thanks <a href="https://github.com/horo-fox"><code>@horo-fox</code></a>! - Limits parallel imports within <code>getCollection()</code> to prevent EMFILE errors when accessing files</p>
</li>
<li>
<p><a href="https://redirect.github.com/withastro/astro/pull/10755">#10755</a> <a href="c6d59b6fb7"><code>c6d59b6fb7db20af957a8706c8159c50619235ef</code></a> Thanks <a href="https://github.com/ematipico"><code>@ematipico</code></a>! - Fixes a case where the i18n fallback failed to correctly redirect to the index page with SSR enabled</p>
</li>
</ul>
<h2>4.6.0</h2>
<h3>Minor Changes</h3>
<ul>
<li>
<p><a href="https://redirect.github.com/withastro/astro/pull/10591">#10591</a> <a href="39988ef8e2"><code>39988ef8e2c4c4888543c973e06d9b9939e4ac95</code></a> Thanks <a href="https://github.com/mingjunlu"><code>@mingjunlu</code></a>! - Adds a new dev toolbar settings option to change the horizontal placement of the dev toolbar on your screen: bottom left, bottom center, or bottom right.</p>
</li>
<li>
<p><a href="https://redirect.github.com/withastro/astro/pull/10689">#10689</a> <a href="683d51a5ee"><code>683d51a5eecafbbfbfed3910a3f1fbf0b3531b99</code></a> Thanks <a href="https://github.com/ematipico"><code>@ematipico</code></a>! - Deprecate support for versions of Node.js older than <code>v18.17.1</code> for Node.js 18, older than <code>v20.0.3</code> for Node.js 20, and the complete Node.js v19 release line.</p>
<p>This change is in line with Astro's <a href="https://docs.astro.build/en/upgrade-astro/#support">Node.js support policy</a>.</p>
</li>
<li>
<p><a href="https://redirect.github.com/withastro/astro/pull/10678">#10678</a> <a href="2e53b5fff6"><code>2e53b5fff6d292b7acdf8c30a6ecf5e5696846a1</code></a> Thanks <a href="https://github.com/ematipico"><code>@ematipico</code></a>! - Adds a new experimental security option to prevent <a href="https://owasp.org/www-community/attacks/csrf">Cross-Site Request Forgery (CSRF) attacks</a>. This feature is available only for pages rendered on demand:</p>
<pre lang="js"><code>import { defineConfig } from 'astro/config';
export default defineConfig({
experimental: {
security: {
csrfProtection: {
origin: true,
},
},
},
</code></pre>
</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="668d97319c"><code>668d973</code></a> [ci] release (<a href="https://github.com/withastro/astro/tree/HEAD/packages/astro/issues/10777">#10777</a>)</li>
<li><a href="a92e263beb"><code>a92e263</code></a> fix: use assetsDir in creating vite config (<a href="https://github.com/withastro/astro/tree/HEAD/packages/astro/issues/10732">#10732</a>)</li>
<li><a href="90669472df"><code>9066947</code></a> Disable streaming for SSG (<a href="https://github.com/withastro/astro/tree/HEAD/packages/astro/issues/10796">#10796</a>)</li>
<li><a href="b0589d0553"><code>b0589d0</code></a> astro/cli/install-package.ts: whichPm may return null if ran in an empty dire...</li>
<li><a href="af1af9faee"><code>af1af9f</code></a> [ci] format</li>
<li><a href="0684312145"><code>0684312</code></a> fix(assets): Forward headers from the original request to the internal reques...</li>
<li><a href="01cb41763e"><code>01cb417</code></a> [ci] format</li>
<li><a href="699f4559a2"><code>699f455</code></a> Make viewTransition.finished wait for animations triggered by viewTransition....</li>
<li><a href="1607face67"><code>1607fac</code></a> Fix <code>@types/cookie</code> dependency (<a href="https://github.com/withastro/astro/tree/HEAD/packages/astro/issues/10776">#10776</a>)</li>
<li><a href="4dbd545304"><code>4dbd545</code></a> fix: picture fallback check (<a href="https://github.com/withastro/astro/tree/HEAD/packages/astro/issues/10783">#10783</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/withastro/astro/commits/astro@4.6.2/packages/astro">compare view</a></li>
</ul>
</details>
<br />
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will remove the ignore condition of the specified dependency and ignore conditions
</details>
Invoking an action that's a Prerender will currently bypass the static cache (via `experimentalBypassFor`), but the prerender group doesn't support streaming.
This clones the prerender group and adds corresponding rewrites for those requests. Separately, we'll deprecate `experimentalBypassFor`.
Depends on:
- https://github.com/vercel/next.js/pull/64592
In the past, we used the `VERCEL_ANALYTICS_ID` environment variable with the previous Speed Insights feature on Vercel to activate specific logic in Next.js, Nuxt and Gatsby for collecting and sending web vitals data.
With the new Speed Insights, that's not required anymore.
We no longer want to set the environment variable when detecting the new `@vercel/speed-insights` package.
This PR confirms that the variable is not set if the new package is detected.
The user's default team should be sorted to the top of the selector. This is a nice and simple way to do this, though I'm not sure how to test my changes -- would appreciate guidance!
`vc dev` in a dir without a `.git` dir would display an error the user should not see:
```
Vercel CLI 34.0.0
fatal: not a git repository (or any of the parent directories): .git
> Ready! Available at [http://localhost:3000](http://localhost:3000)
```
This fixes that by ignoring the stderr from `git rev-parse`.
Adds snapshot tests for the output from help as output by various commands. I expect to be changing some of the `Command` structs to continue the work started in [ [cli] Improve type signature of CommandOption #11394 ](https://github.com/vercel/vercel/pull/11394) especially as I build on work in [ Get flags specification #11433 ](https://github.com/vercel/vercel/pull/11433), and I want to be sure that the associated changes to help output are what we expect.
This ensures we properly include `_not-found` assets when present for
app router specific functions as otherwise when attempting to render
`notFound()` case we can hit `MODULE_NOT_FOUND` errors. A test case for
this behavior has been added under `00-app-router-not-found`.
Closes: [NEXT-3084](https://linear.app/vercel/issue/NEXT-3084)
Historically, we used to have a compressed function size limit of `50MB` but this is a very old limit and was removed long ago. Considering this limit is removed and it requires additional overhead to calculate, this removes the compressed size limit handling while leaving the uncompressed size limit detection/handling.
A customer was worried about security vulnerabilities that `pnpm audit` listed for `@babel/traverse`, `http-cache-semantics`, and `json5`. This updates those deps, removing those vulnerability messages.
The way that we currently parse arguments throughout the vercel command line is through the `getArgs` function. This function takes three arguments: `argv`, `argOptions`, and `argsOptions`. (Those last two arguments are swapped in order from the real function). This is semantically muddy and likely to create mistakes. We have instances in our code base, such as `deploy/index.ts` which at the time of this pull request creates a variable named `argOptions` and passes it to the `argsOptions` argument of `getArgs`.
Further, the return type of `arg` the library we currently use to parse arguments is unclear as well. It puts positional arguments under an `_` key, instead of a meaningful name.
In this pull request, I create a function called `parseArguments` that takes the same three arguments as `getArgs` with improved names: `args`, `flags`, and `parserOptions`. It also changes the return type to be an object with two keys: `{args, flags}` allowing for clearer access patterns where the argument parser is used.
The previous type signature of `CommandOption` did not cover all of the actual uses of option types throughout the codebase. This one may not cover all possible types, but comes much closer and allows us to literally state the type constructor used by `arg` to parse options.
This will allow for direct use of `command.ts` data structures so that Help output matches the actually parsed options used by every subcommand.
`deploy/index.ts` already shows an example of this, and a future pull request can build on that example by extracting that logic into a utility function.
We've done a pretty significant update over the past few months on
SolidStart and 1.0 is looming. Thought I'd update the official templates
to get in line before we do the release.
I wasn't sure what to do with the `output` fields as we use Vercel's
build output V3 here. But otherwise I think everything should be good.
---------
Co-authored-by: Nathan Rajlich <n@n8.io>
Co-authored-by: Jeff See <jeffsee.55@gmail.com>
We have several instances of `console.log` being used with colors or other indicators that they're trying to communicate to the user, and not in a way that makes sense for standard output. These should be migrated to use the `client.output` methods where possible.
This introduces some additional capabilities on the `MockClient` and `MockStream` classes used in our unit tests.
The bulk of this code is copied over from https://github.com/SBoudrias/Inquirer.js/tree/master/packages/testing, but uses our existing stdin/stdout mocks instead of what's used there.
You can now use `client.getScreen()` to see the "last" screen pushed to stdin, which is super handy for snapshot tests. I've added a few as part of this PR, but many more can be written for our client output as well in the near future.
---
The `client.getScreen()` is also a handy debug tool, use it with `raw: true` to see a pretty printed output during tests:
https://github.com/vercel/vercel/assets/5414297/d0be6078-4901-4eb2-a6c9-1b51b576c1ba
---
This also adds an `events` object on the `MockClient` which allows us to write `client.events.keypress("down")` instead of the less readable `client.stdin.write('\x1B[B')` throughout our testing. This could also be moved to so that it's `client.stdin.keypress(...` or something similar. Note that I've only tested that this works in a login test, included in this PR. If we're happy to make this change I will make update the rest of the unit tests to use this syntax for the inputs.
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.
# Releases
## vercel@34.0.0
### Major Changes
- Disables promotion of preview deployments
([#11411](https://github.com/vercel/vercel/pull/11411))
### Patch Changes
- Always set `projectSettings.nodeVersion` in `vc deploy`
([#11351](https://github.com/vercel/vercel/pull/11351))
- [cli] optional override of existing environment variables with --force
([#11348](https://github.com/vercel/vercel/pull/11348))
## @vercel/client@13.2.0
### Minor Changes
- Always use v13 of create deployment API endpoint
([#11351](https://github.com/vercel/vercel/pull/11351))
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This is related #11133. This `custom-runtime` tests is failing on that branch since the "macos-14" test runner uses arm64 processor, and the `static-binaries` "import" package that the "vercel-bash" runtime is using does not have binaries for arm64. Switch this test fixture to use "vercel-deno" instead, which won't have this problem.