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.2.5
### Patch Changes
- Adds a route for the `.rsc` pathname as well when app has ppr enabled
but not all routes.
([#11681](https://github.com/vercel/vercel/pull/11681))
- Updated dependencies
\[[`7457767a7`](7457767a77),
[`4337ea065`](4337ea0654)]:
- @vercel/next@4.2.15
## @vercel/fs-detectors@5.2.4
### Patch Changes
- Add support for detecting Turborepo 2
([#11680](https://github.com/vercel/vercel/pull/11680))
## @vercel/next@4.2.15
### Patch Changes
- ensure unmatched action rewrites are routed to correct handler
([#11686](https://github.com/vercel/vercel/pull/11686))
- Adds a route for the `.rsc` pathname as well when app has ppr enabled
but not all routes.
([#11681](https://github.com/vercel/vercel/pull/11681))
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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.3.0
### Minor Changes
- support newer python versions
([#11675](https://github.com/vercel/vercel/pull/11675))
## @vercel/build-utils@8.2.1
### Patch Changes
- [node] update node@16 deprecation day
([#11671](https://github.com/vercel/vercel/pull/11671))
## vercel@34.2.4
### Patch Changes
- Updated dependencies
\[[`3eb9d8c89`](3eb9d8c892),
[`83741a0eb`](83741a0eb9)]:
- @vercel/python@4.3.0
- @vercel/build-utils@8.2.1
- @vercel/node@3.1.6
- @vercel/static-build@2.5.10
## @vercel/client@13.2.8
### Patch Changes
- Updated dependencies
\[[`83741a0eb`](83741a0eb9)]:
- @vercel/build-utils@8.2.1
## @vercel/gatsby-plugin-vercel-builder@2.0.32
### Patch Changes
- Updated dependencies
\[[`83741a0eb`](83741a0eb9)]:
- @vercel/build-utils@8.2.1
## @vercel/node@3.1.6
### Patch Changes
- Updated dependencies
\[[`83741a0eb`](83741a0eb9)]:
- @vercel/build-utils@8.2.1
## @vercel/static-build@2.5.10
### Patch Changes
- Updated dependencies \[]:
- @vercel/gatsby-plugin-vercel-builder@2.0.32
## @vercel-internals/types@1.0.37
### Patch Changes
- Updated dependencies
\[[`83741a0eb`](83741a0eb9)]:
- @vercel/build-utils@8.2.1
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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.2.3
### Patch Changes
- Don't create streaming lambdas for pages router routes
([#11660](https://github.com/vercel/vercel/pull/11660))
- Updated dependencies
\[[`c9d53d4e3`](c9d53d4e3e),
[`5f561f8cf`](5f561f8cfa)]:
- @vercel/next@4.2.14
## @vercel/next@4.2.14
### Patch Changes
- Don't create streaming lambdas for pages router routes
([#11660](https://github.com/vercel/vercel/pull/11660))
- Ensure user rewrites still match to action outputs
([#11628](https://github.com/vercel/vercel/pull/11628))
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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.2.2
### Patch Changes
- Fix related to erroring when a prefetch route is not provided but the
route is PPR enabled
([#11638](https://github.com/vercel/vercel/pull/11638))
- Updated dependencies
\[[`8e44ef5b9`](8e44ef5b9d),
[`61e6af374`](61e6af3740)]:
- @vercel/next@4.2.13
## @vercel/next@4.2.13
### Patch Changes
- Fix static case for detecting when a page supports PPR
([#11635](https://github.com/vercel/vercel/pull/11635))
- Fix related to erroring when a prefetch route is not provided but the
route is PPR enabled
([#11638](https://github.com/vercel/vercel/pull/11638))
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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.2.1
### Patch Changes
- Support incremental PPR for large applications
([#11625](https://github.com/vercel/vercel/pull/11625))
- Updated dependencies
\[[`73e558913`](73e558913a)]:
- @vercel/next@4.2.12
## @vercel/next@4.2.12
### Patch Changes
- Support incremental PPR for large applications
([#11625](https://github.com/vercel/vercel/pull/11625))
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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@8.2.0
### Minor Changes
- fix corepack detection for package manager version determination
([#11596](https://github.com/vercel/vercel/pull/11596))
### Patch Changes
- Fix triggering of ignored project settings node version warning
([#11550](https://github.com/vercel/vercel/pull/11550))
## vercel@34.2.0
### Minor Changes
- Stop sending system environment variables in dev
([#11526](https://github.com/vercel/vercel/pull/11526))
### Patch Changes
- Updated dependencies
\[[`d3c1267e2`](d3c1267e24),
[`ccd7eb1fb`](ccd7eb1fb7)]:
- @vercel/build-utils@8.2.0
- @vercel/node@3.1.5
- @vercel/static-build@2.5.9
## @vercel/client@13.2.7
### Patch Changes
- Updated dependencies
\[[`d3c1267e2`](d3c1267e24),
[`ccd7eb1fb`](ccd7eb1fb7)]:
- @vercel/build-utils@8.2.0
## @vercel/gatsby-plugin-vercel-builder@2.0.31
### Patch Changes
- Updated dependencies
\[[`d3c1267e2`](d3c1267e24),
[`ccd7eb1fb`](ccd7eb1fb7)]:
- @vercel/build-utils@8.2.0
## @vercel/node@3.1.5
### Patch Changes
- Updated dependencies
\[[`d3c1267e2`](d3c1267e24),
[`ccd7eb1fb`](ccd7eb1fb7)]:
- @vercel/build-utils@8.2.0
## @vercel/static-build@2.5.9
### Patch Changes
- Updated dependencies \[]:
- @vercel/gatsby-plugin-vercel-builder@2.0.31
## @vercel-internals/types@1.0.36
### Patch Changes
- Updated dependencies
\[[`d3c1267e2`](d3c1267e24),
[`ccd7eb1fb`](ccd7eb1fb7)]:
- @vercel/build-utils@8.2.0
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
System environment variables would get set with empty strings in development which breaks some builds. This fixes that by using the v2 of `/env/pull` introduced in https://github.com/vercel/api/pull/27777.
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@8.1.3
### Patch Changes
- [build-utils] log more around package manager detection
([#11594](https://github.com/vercel/vercel/pull/11594))
## vercel@34.1.14
### Patch Changes
- Updated dependencies
\[[`ad6945435`](ad69454352)]:
- @vercel/build-utils@8.1.3
- @vercel/node@3.1.4
- @vercel/static-build@2.5.8
## @vercel/client@13.2.6
### Patch Changes
- Updated dependencies
\[[`ad6945435`](ad69454352)]:
- @vercel/build-utils@8.1.3
## @vercel/gatsby-plugin-vercel-builder@2.0.30
### Patch Changes
- Updated dependencies
\[[`ad6945435`](ad69454352)]:
- @vercel/build-utils@8.1.3
## @vercel/node@3.1.4
### Patch Changes
- Updated dependencies
\[[`ad6945435`](ad69454352)]:
- @vercel/build-utils@8.1.3
## @vercel/static-build@2.5.8
### Patch Changes
- Updated dependencies \[]:
- @vercel/gatsby-plugin-vercel-builder@2.0.30
## @vercel-internals/types@1.0.35
### Patch Changes
- Updated dependencies
\[[`ad6945435`](ad69454352)]:
- @vercel/build-utils@8.1.3
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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@8.1.2
### Patch Changes
- add log to package manager version detection
([#11592](https://github.com/vercel/vercel/pull/11592))
## vercel@34.1.13
### Patch Changes
- Updated dependencies
\[[`1682ad43d`](1682ad43d0)]:
- @vercel/build-utils@8.1.2
- @vercel/node@3.1.3
- @vercel/static-build@2.5.7
## @vercel/client@13.2.5
### Patch Changes
- Updated dependencies
\[[`1682ad43d`](1682ad43d0)]:
- @vercel/build-utils@8.1.2
## @vercel/gatsby-plugin-vercel-builder@2.0.29
### Patch Changes
- Updated dependencies
\[[`1682ad43d`](1682ad43d0)]:
- @vercel/build-utils@8.1.2
## @vercel/node@3.1.3
### Patch Changes
- Updated dependencies
\[[`1682ad43d`](1682ad43d0)]:
- @vercel/build-utils@8.1.2
## @vercel/static-build@2.5.7
### Patch Changes
- Updated dependencies \[]:
- @vercel/gatsby-plugin-vercel-builder@2.0.29
## @vercel-internals/types@1.0.34
### Patch Changes
- Updated dependencies
\[[`1682ad43d`](1682ad43d0)]:
- @vercel/build-utils@8.1.2
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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@8.1.1
### Patch Changes
- [build-utils] pnpm lockfile testing and fixing
([#11591](https://github.com/vercel/vercel/pull/11591))
## vercel@34.1.12
### Patch Changes
- Updated dependencies
\[[`67afc2608`](67afc26085),
[`2f7a6ed5f`](2f7a6ed5f9)]:
- @vercel/next@4.2.11
- @vercel/build-utils@8.1.1
- @vercel/node@3.1.2
- @vercel/static-build@2.5.6
## @vercel/client@13.2.4
### Patch Changes
- Updated dependencies
\[[`2f7a6ed5f`](2f7a6ed5f9)]:
- @vercel/build-utils@8.1.1
## @vercel/gatsby-plugin-vercel-builder@2.0.28
### Patch Changes
- Updated dependencies
\[[`2f7a6ed5f`](2f7a6ed5f9)]:
- @vercel/build-utils@8.1.1
## @vercel/next@4.2.11
### Patch Changes
- normalize source file locations for special metadata files
([#11579](https://github.com/vercel/vercel/pull/11579))
## @vercel/node@3.1.2
### Patch Changes
- Updated dependencies
\[[`2f7a6ed5f`](2f7a6ed5f9)]:
- @vercel/build-utils@8.1.1
## @vercel/static-build@2.5.6
### Patch Changes
- Updated dependencies \[]:
- @vercel/gatsby-plugin-vercel-builder@2.0.28
## @vercel-internals/types@1.0.33
### Patch Changes
- Updated dependencies
\[[`2f7a6ed5f`](2f7a6ed5f9)]:
- @vercel/build-utils@8.1.1
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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.10
### Patch Changes
- Updated dependencies
\[[`119f80e96`](119f80e961),
[`11584b0e9`](11584b0e9b),
[`3023122d4`](3023122d4e),
[`0e774b6be`](0e774b6be0)]:
- @vercel/next@4.2.9
- @vercel/static-build@2.5.4
## @vercel/next@4.2.9
### Patch Changes
- Support incremental partial prerendering
([#11560](https://github.com/vercel/vercel/pull/11560))
- ensure `.action` outputs are created for edge functions
([#11568](https://github.com/vercel/vercel/pull/11568))
- ([#11566](https://github.com/vercel/vercel/pull/11566))
## @vercel/static-build@2.5.4
### Patch Changes
- Fix `Cannot read properties of null` error
([#11559](https://github.com/vercel/vercel/pull/11559))
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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.8
### Patch Changes
- Updated dependencies
\[[`52e435aa5`](52e435aa5d),
[`124846a3e`](124846a3e6),
[`dc974b679`](dc974b6797),
[`58c6755e0`](58c6755e0c)]:
- @vercel/next@4.2.7
- @vercel/static-build@2.5.3
## @vercel/next@4.2.7
### Patch Changes
- Fix missing .rsc outputs for pages prerenders
([#11503](https://github.com/vercel/vercel/pull/11503))
- Fix base path app index RSC handling
([#11528](https://github.com/vercel/vercel/pull/11528))
- Fix interception routes PPR route handling
([#11527](https://github.com/vercel/vercel/pull/11527))
## @vercel/static-build@2.5.3
### Patch Changes
- Support Ruby and Python static site generators in AL2023 build image
([#11529](https://github.com/vercel/vercel/pull/11529))
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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.7
### Patch Changes
- Updated dependencies
\[[`3420ba015`](3420ba0153)]:
- @vercel/next@4.2.6
## @vercel/next@4.2.6
### Patch Changes
- [next] Update test fixture version
([#11514](https://github.com/vercel/vercel/pull/11514))
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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.6
### Patch Changes
- Updated dependencies
\[[`b1adaf76e`](b1adaf76ec),
[`3fb97d1d2`](3fb97d1d27)]:
- @vercel/next@4.2.5
- @vercel/static-build@2.5.2
## @vercel/next@4.2.5
### Patch Changes
- Only rewrite next-action requests to `.action` handlers
([#11504](https://github.com/vercel/vercel/pull/11504))
## @vercel/static-build@2.5.2
### Patch Changes
- Revert `SUPPORTED_RUBY_VERSION` change to fix Ruby site generators on
AL2 build image ([#11522](https://github.com/vercel/vercel/pull/11522))
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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.4
### Patch Changes
- Updated dependencies
\[[`5b7960337`](5b79603378)]:
- @vercel/next@4.2.4
## @vercel/next@4.2.4
### Patch Changes
- [next]: Revert .action handling for dynamic routes
([#11509](https://github.com/vercel/vercel/pull/11509))
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Migrate `vc bisect` to updated argument parsing.
I added a `try` block with `handleError`, this seems to be in line with how we do this in other `vc` commands. It might be worth thinking about how we might abstract this logic to centralize it.
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.
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>
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>
* 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>
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.
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 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.
Add a new vitest-unit test type and specify which npm script to run for a given chunks tests. Currently the CLI unit tests are actually running as part of the Find Changes action, because vitest ignores the `--listTests` flag and just runs the tests immediately.
Updates `@vercel/client` to always use the v13 create-deployment endpoint, even when `builds` is present. This allows for `projectSettings.nodeVersion` to be passed when `builds` is present.