Compare commits

...

56 Commits

Author SHA1 Message Date
Vercel Release Bot
f39513118a Version Packages (#11413)
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>
2024-04-11 08:59:24 -05:00
Nathan Rajlich
fd188a396b [tests] Use vercel-deno for "custom-runtime" dev fixture (#11405)
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.
2024-04-11 01:49:13 +00:00
Jeff See
cdfc879f69 Specify npm script to run during Find Changes step (#11409)
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.
2024-04-11 00:26:58 +00:00
Nathan Rajlich
b58dcc5733 [remix] Add custom entry.server for Vite test (#11408)
Adds an e2e test fixture which tests that a custom `app/entry.server` file is supported.

Related to:

* https://github.com/vercel/remix/pull/85
* https://github.com/vercel/remix/pull/89
2024-04-10 23:53:49 +00:00
Sean Massa
cddf3fa00c Revert "[cli] Revert "Disallow promoting preview deployments to production (#11363)"" (#11411)
Reverts vercel/vercel#11410 to reinstate #11363
2024-04-10 22:15:33 +00:00
Nathan Rajlich
627b79fb14 [client] Always use v13 of create deployment API endpoint (#11351)
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.
2024-04-10 20:55:28 +00:00
Mountain/\Ash
7259a324c2 [cli] optional override of existing environment variables (#11348)
## Why

Closes #11130

## Changelog

Added `--force` argument to upsert existing environment variables (#11130)

## References

- Vercel API `/v10/projects/{idOrName}/env` https://vercel.com/docs/rest-api/endpoints/projects#create-one-or-more-environment-variables
2024-04-10 20:13:53 +00:00
Nathan Rajlich
1aab599652 Version Packages (#11395)
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.

- Add support for edge function environment variables
([#11390](https://github.com/vercel/vercel/pull/11390))

- fix flickering during interactive UI rerendering
([#11392](https://github.com/vercel/vercel/pull/11392))

- fix `vc ls` message to be `vc projects ls`
([#11400](https://github.com/vercel/vercel/pull/11400))

- Updated dependencies
\[[`2461b571a`](2461b571af)]:
    -   @vercel/next@4.2.0
2024-04-10 12:43:42 -07:00
Florentin / 珞辰
2461b571af [next] use middleware manifest worker environments (#11390)
This PR adds changes to the Next.js builder to pass the per-worker environment emitted from the Next.js middleware manifest to the created `EdgeFunction` resource.
2024-04-10 08:27:53 +00:00
Nathan Rajlich
1088bf2dea [cli] Revert "Disallow promoting preview deployments to production (#11363)" (#11410)
This reverts commit 4e416d7d7b.

It was erroneously merged by Kodiak with failing unit tests.
2024-04-10 07:03:12 +00:00
Austin Merrick
c5bd242a79 [cli] Fix command recommendation (#11400)
`vc rm <project-name-that-doesn't-exist>` gives the message:
<img width="749" alt="Screenshot 2024-04-08 at 2 38 03 PM" src="https://github.com/vercel/vercel/assets/8485687/e041d47e-ce66-434b-838b-3693eb6cc4a7">

`vc ls` is not correct. `vc projects ls` is the correct command.
2024-04-09 22:15:54 +00:00
Vercel Release Bot
764ba97967 [tests] Upgrade Turbo to version 1.13.2 (#11398)
This auto-generated PR updates Turbo to version 1.13.2
2024-04-09 22:12:37 +00:00
Trek Glowacki
4e416d7d7b [cli] Disallow promoting preview deployments to production (#11363)
Blocks preview deployments from being directly promoted. This relies on a new API version bump.

Copied the warning text from the UI:
![CleanShot 2024-04-01 at 11 04 00@2x](https://github.com/vercel/vercel/assets/9736/4e93ffdd-32f2-40bc-97e7-6fe98208cd76)

This is a breaking change and will require a major version bump. Please don't merge until we're ready.
2024-04-09 22:02:29 +00:00
findseat
8775ff3fcf chore: fix some typos (#11397) 2024-04-09 20:51:35 +00:00
Nathan Rajlich
bd100baa16 [tests] Fix tarball URL from deleted project (#11403)
I did some pruning of old projects on my personal account last night, and accidentally broke CI. I've created a new tarball on the `curated-tests` team so that it doesn't happen again.
2024-04-09 19:56:47 +00:00
Austin Merrick
2e6aab01cb [cli] Unify table formatting output (#11387)
This removes 'text-table' as a dependency in favor of using 'cli-table3', and simplifies table formatting logic.
2024-04-09 07:33:04 +00:00
Nathan Rajlich
3e57c4a2de [tests] Remove disableSSO() function (#11380)
The SSO Protection feature is now turned off by default for testing accounts. So this manual logic for disabling the feature on each project test fixture is no longer necessary.
2024-04-06 07:47:56 +00:00
Austin Merrick
0c3d136414 [cli] Fix flickering during UI re-rendering (#11392)
Various UI components would flicker upon re-rendering in unoptimized terminals as OSX's stock terminal app. This change bumps these components to include [this fix](https://github.com/SBoudrias/Inquirer.js/pull/1379).

## Before
https://github.com/vercel/vercel/assets/8485687/352ce43e-9a01-4290-a4c8-8826aebf859a

## After
https://github.com/vercel/vercel/assets/8485687/9e2eb071-0f7c-4d5a-adf6-735b30bcc294
2024-04-05 22:13:37 +00:00
Jeff See
238d6db17a Fix name for integration test (#11393)
I think this was a copy/paste typo from https://github.com/vercel/vercel/pull/11243
2024-04-05 21:50:27 +00:00
Vercel Release Bot
bb7bfd027f Version Packages (#11382)
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@33.7.0

### Minor Changes

- improve UX for text input validation
([#11388](https://github.com/vercel/vercel/pull/11388))

- Replace the implementation of the yes/no prompt in several areas to be
consistent with the rest of the CLI.
([#11279](https://github.com/vercel/vercel/pull/11279))

### Patch Changes

- [cli] Fix how we determine the GIT_CONFIG_PATH to support git
worktrees and git submodules
([#11283](https://github.com/vercel/vercel/pull/11283))

- avoid printing errors when user does ctrl+c
([#11377](https://github.com/vercel/vercel/pull/11377))

- Warn that promoting preview deploys is deprecated
([#11376](https://github.com/vercel/vercel/pull/11376))

- Updated dependencies
\[[`a3fb7e6ab`](a3fb7e6abe)]:
    -   @vercel/go@3.1.1

## @vercel/go@3.1.1

### Patch Changes

- Add support for `1.22` and update Go minor versions `1.19`, `1.20` and
`1.21` ([#11156](https://github.com/vercel/vercel/pull/11156))

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-04-05 08:58:55 -05:00
Austin Merrick
a56ab4ded9 [cli] Improve UX for text input validation (#11388)
Originally, I was focused on fixing this visual bug:
<img width="565" alt="Screenshot 2024-04-04 at 9 50 56 AM" src="https://github.com/vercel/vercel/assets/8485687/eb526fae-69d4-4636-ac8b-4cf6a3475c58">

When digging into this issue, I realized there was an opportunity to improve text input validation UX and remove hand-rolled validation code.

## Before:

https://github.com/vercel/vercel/assets/8485687/5e264696-8b60-4863-8dc2-1a797f508074

https://github.com/vercel/vercel/assets/8485687/2104603a-331e-4679-9ec2-a4235fad252e

## After:

https://github.com/vercel/vercel/assets/8485687/72c51831-2b94-4cbe-b1f6-a5822bf9f1a8

https://github.com/vercel/vercel/assets/8485687/a371c7be-f7f5-4d3a-9451-58e7f572d25b

## Additional considerations

[input-root-directory](https://github.com/vercel/vercel/blob/main/packages/cli/src/util/input/input-root-directory.ts#L17) remains an instance of hand-rolled validation since it's trickier to force into inquirer's validation pattern. Also, we have a [hand-rolled text input function](https://github.com/vercel/vercel/blob/main/packages/cli/src/util/input/text.ts#L43) that will get similar benefits when replaced with `client.input.text`.
2024-04-04 22:20:38 +00:00
Nathan Rajlich
5660dab2ae [tests] Revert "fetch vercel.com cert before builds and after tests" (#11381)
This reverts commit a8eab6beb7 (#9803).

These CI steps were for an incident from close to a year ago, which has since been resolved.
2024-04-04 19:59:06 +00:00
Austin Merrick
1202cf8792 [cli] Avoid printing error when user does ctrl+c (#11377)
https://github.com/vercel/vercel/pull/11321 introduced a problem where ctrl+c during certain prompts would cause an error to be printed:

![Screenshot 2024-04-02 at 18 14 13](https://github.com/vercel/vercel/assets/8485687/6b37373d-ae83-4f75-a647-6d95536d6703)

The problem was that `@inquirer/prompts` throws errors on ctrl+c that get caught and printed in `handleError`. This fix skips printing those errors.
2024-04-04 19:43:44 +00:00
Trek Glowacki
80b8c3d022 [cli] Deprecate promoting preview deployments to production (#11376)
Warn about imminent removal of promoting preview deployments directly to
production.

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-04-04 13:01:53 -05:00
dependabot[bot]
68e5edb9a2 [framework-fixtures]: Bump the core group in /packages/static-build/test/fixtures/ionic-react-v7 with 2 updates (#11383)
Bumps the core group in /packages/static-build/test/fixtures/ionic-react-v7 with 2 updates: [@ionic/react](https://github.com/ionic-team/ionic-framework) and [@ionic/core](https://github.com/ionic-team/ionic-framework).

Updates `@ionic/react` from 7.6.1 to 7.8.3
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/ionic-team/ionic-framework/releases"><code>@​ionic/react</code>'s releases</a>.</em></p>
<blockquote>
<h2>v7.8.3</h2>
<h2><a href="https://github.com/ionic-team/ionic-framework/compare/v7.8.2...v7.8.3">7.8.3</a> (2024-04-03)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>button:</strong> activated outline button in toolbar no longer blends into background on MD dark mode (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29216">#29216</a>) (<a href="ee5da7a747">ee5da7a</a>)</li>
<li><strong>popover:</strong> viewport can be scrolled if no content present (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29215">#29215</a>) (<a href="f08759c2b8">f08759c</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29211">#29211</a></li>
</ul>
<h2>v7.8.2</h2>
<h2><a href="https://github.com/ionic-team/ionic-framework/compare/v7.8.1...v7.8.2">7.8.2</a> (2024-03-27)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>searchbar:</strong> autocapitalize is initialized correctly (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29197">#29197</a>) (<a href="8ad66c03d7">8ad66c0</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29193">#29193</a></li>
</ul>
<h2>v7.8.1</h2>
<h2><a href="https://github.com/ionic-team/ionic-framework/compare/v7.8.0...v7.8.1">7.8.1</a> (2024-03-20)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>datetime:</strong> wheel picker shows consistently in overlays (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29147">#29147</a>) (<a href="19c1bc16cb">19c1bc1</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/26234">#26234</a></li>
<li><strong>header:</strong> iOS headers in MD app are not hidden (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29164">#29164</a>) (<a href="fdfecd32c3">fdfecd3</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/28867">#28867</a></li>
<li><strong>react:</strong> avoid definitely typed errors with <code>@​types/react</code><a href="https://github.com/18"><code>@​18</code></a> (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29182">#29182</a>) (<a href="58d217d0cf">58d217d</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29178">#29178</a></li>
</ul>
<h3>Performance Improvements</h3>
<ul>
<li><strong>datetime:</strong> calendar body shows immediately in modal on ios (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29163">#29163</a>) (<a href="f75977699d">f759776</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/24542">#24542</a></li>
</ul>
<h2>v7.8.0</h2>
<h1><a href="https://github.com/ionic-team/ionic-framework/compare/v7.7.5...v7.8.0">7.8.0</a> (2024-03-13)</h1>
<h3>Features</h3>
<ul>
<li><strong>datetime:</strong> formatOptions property for Datetime (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29065">#29065</a>) (<a href="7cdbc1b5ad">7cdbc1b</a>)</li>
<li><strong>searchbar:</strong> autocapitalize, dir, lang, maxlength, and minlength are inherited to native input (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29098">#29098</a>) (<a href="a0a77f799d">a0a77f7</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/27606">#27606</a></li>
</ul>
<h2>v7.7.5</h2>
<h2><a href="https://github.com/ionic-team/ionic-framework/compare/v7.7.4...v7.7.5">7.7.5</a> (2024-03-13)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>angular:</strong> add ionNavWillChange and ionNavDidChange types for nav (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29122">#29122</a>) (<a href="85b9d5c35f">85b9d5c</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29114">#29114</a></li>
<li><strong>checkbox:</strong> set aria-checked of indeterminate checkbox to 'mixed' (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29115">#29115</a>) (<a href="b2d636f14d">b2d636f</a>)</li>
<li><strong>overlay:</strong> do not hide overlay if toast is presented (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29140">#29140</a>) (<a href="c0f5e5ebc0">c0f5e5e</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29139">#29139</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/ionic-team/ionic-framework/blob/main/CHANGELOG.md"><code>@​ionic/react</code>'s changelog</a>.</em></p>
<blockquote>
<h2><a href="https://github.com/ionic-team/ionic-framework/compare/v7.8.2...v7.8.3">7.8.3</a> (2024-04-03)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>button:</strong> activated outline button in toolbar no longer blends into background on MD dark mode (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29216">#29216</a>) (<a href="ee5da7a747">ee5da7a</a>)</li>
<li><strong>popover:</strong> viewport can be scrolled if no content present (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29215">#29215</a>) (<a href="f08759c2b8">f08759c</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29211">#29211</a></li>
</ul>
<h2><a href="https://github.com/ionic-team/ionic-framework/compare/v7.8.1...v7.8.2">7.8.2</a> (2024-03-27)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>searchbar:</strong> autocapitalize is initialized correctly (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29197">#29197</a>) (<a href="8ad66c03d7">8ad66c0</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29193">#29193</a></li>
</ul>
<h2><a href="https://github.com/ionic-team/ionic-framework/compare/v7.8.0...v7.8.1">7.8.1</a> (2024-03-20)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>datetime:</strong> wheel picker shows consistently in overlays (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29147">#29147</a>) (<a href="19c1bc16cb">19c1bc1</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/26234">#26234</a></li>
<li><strong>header:</strong> iOS headers in MD app are not hidden (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29164">#29164</a>) (<a href="fdfecd32c3">fdfecd3</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/28867">#28867</a></li>
<li><strong>react:</strong> avoid definitely typed errors with <code>@​types/react</code><a href="https://github.com/18"><code>@​18</code></a> (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29182">#29182</a>) (<a href="58d217d0cf">58d217d</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29178">#29178</a></li>
</ul>
<h3>Performance Improvements</h3>
<ul>
<li><strong>datetime:</strong> calendar body shows immediately in modal on ios (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29163">#29163</a>) (<a href="f75977699d">f759776</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/24542">#24542</a></li>
</ul>
<h1><a href="https://github.com/ionic-team/ionic-framework/compare/v7.7.5...v7.8.0">7.8.0</a> (2024-03-13)</h1>
<h3>Features</h3>
<ul>
<li><strong>datetime:</strong> formatOptions property for Datetime (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29065">#29065</a>) (<a href="7cdbc1b5ad">7cdbc1b</a>)</li>
<li><strong>searchbar:</strong> autocapitalize, dir, lang, maxlength, and minlength are inherited to native input (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29098">#29098</a>) (<a href="a0a77f799d">a0a77f7</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/27606">#27606</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="de35fa8b94"><code>de35fa8</code></a> v7.8.3</li>
<li><a href="c766528a17"><code>c766528</code></a> chore: run build (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29262">#29262</a>)</li>
<li><a href="9b3cf9fbc2"><code>9b3cf9f</code></a> chore(docs): move docs to the packages directory (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29256">#29256</a>)</li>
<li><a href="ee5da7a747"><code>ee5da7a</code></a> fix(button): activated outline button in toolbar no longer blends into backgr...</li>
<li><a href="c4bfc783e0"><code>c4bfc78</code></a> chore: remove Amanda from codeowners (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29252">#29252</a>)</li>
<li><a href="0137e732ce"><code>0137e73</code></a> chore: remove myself from code owners (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29251">#29251</a>)</li>
<li><a href="88ecb29e39"><code>88ecb29</code></a> chore: remove self from codeowners (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29250">#29250</a>)</li>
<li><a href="f726c35868"><code>f726c35</code></a> chore(deps): update dependency <code>@​stencil/vue-output-target</code> to v0.8.8 (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29243">#29243</a>)</li>
<li><a href="4a9d84ecbd"><code>4a9d84e</code></a> chore: remove mapsandapps from issue auto assignment (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29248">#29248</a>)</li>
<li><a href="f08759c2b8"><code>f08759c</code></a> fix(popover): viewport can be scrolled if no content present (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29215">#29215</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/ionic-team/ionic-framework/compare/v7.6.1...v7.8.3">compare view</a></li>
</ul>
</details>
<br />

Updates `@ionic/core` from 7.6.1 to 7.8.3
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/ionic-team/ionic-framework/releases"><code>@​ionic/core</code>'s releases</a>.</em></p>
<blockquote>
<h2>v7.8.3</h2>
<h2><a href="https://github.com/ionic-team/ionic-framework/compare/v7.8.2...v7.8.3">7.8.3</a> (2024-04-03)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>button:</strong> activated outline button in toolbar no longer blends into background on MD dark mode (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29216">#29216</a>) (<a href="ee5da7a747">ee5da7a</a>)</li>
<li><strong>popover:</strong> viewport can be scrolled if no content present (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29215">#29215</a>) (<a href="f08759c2b8">f08759c</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29211">#29211</a></li>
</ul>
<h2>v7.8.2</h2>
<h2><a href="https://github.com/ionic-team/ionic-framework/compare/v7.8.1...v7.8.2">7.8.2</a> (2024-03-27)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>searchbar:</strong> autocapitalize is initialized correctly (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29197">#29197</a>) (<a href="8ad66c03d7">8ad66c0</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29193">#29193</a></li>
</ul>
<h2>v7.8.1</h2>
<h2><a href="https://github.com/ionic-team/ionic-framework/compare/v7.8.0...v7.8.1">7.8.1</a> (2024-03-20)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>datetime:</strong> wheel picker shows consistently in overlays (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29147">#29147</a>) (<a href="19c1bc16cb">19c1bc1</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/26234">#26234</a></li>
<li><strong>header:</strong> iOS headers in MD app are not hidden (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29164">#29164</a>) (<a href="fdfecd32c3">fdfecd3</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/28867">#28867</a></li>
<li><strong>react:</strong> avoid definitely typed errors with <code>@​types/react</code><a href="https://github.com/18"><code>@​18</code></a> (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29182">#29182</a>) (<a href="58d217d0cf">58d217d</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29178">#29178</a></li>
</ul>
<h3>Performance Improvements</h3>
<ul>
<li><strong>datetime:</strong> calendar body shows immediately in modal on ios (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29163">#29163</a>) (<a href="f75977699d">f759776</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/24542">#24542</a></li>
</ul>
<h2>v7.8.0</h2>
<h1><a href="https://github.com/ionic-team/ionic-framework/compare/v7.7.5...v7.8.0">7.8.0</a> (2024-03-13)</h1>
<h3>Features</h3>
<ul>
<li><strong>datetime:</strong> formatOptions property for Datetime (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29065">#29065</a>) (<a href="7cdbc1b5ad">7cdbc1b</a>)</li>
<li><strong>searchbar:</strong> autocapitalize, dir, lang, maxlength, and minlength are inherited to native input (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29098">#29098</a>) (<a href="a0a77f799d">a0a77f7</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/27606">#27606</a></li>
</ul>
<h2>v7.7.5</h2>
<h2><a href="https://github.com/ionic-team/ionic-framework/compare/v7.7.4...v7.7.5">7.7.5</a> (2024-03-13)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>angular:</strong> add ionNavWillChange and ionNavDidChange types for nav (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29122">#29122</a>) (<a href="85b9d5c35f">85b9d5c</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29114">#29114</a></li>
<li><strong>checkbox:</strong> set aria-checked of indeterminate checkbox to 'mixed' (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29115">#29115</a>) (<a href="b2d636f14d">b2d636f</a>)</li>
<li><strong>overlay:</strong> do not hide overlay if toast is presented (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29140">#29140</a>) (<a href="c0f5e5ebc0">c0f5e5e</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29139">#29139</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/ionic-team/ionic-framework/blob/main/CHANGELOG.md"><code>@​ionic/core</code>'s changelog</a>.</em></p>
<blockquote>
<h2><a href="https://github.com/ionic-team/ionic-framework/compare/v7.8.2...v7.8.3">7.8.3</a> (2024-04-03)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>button:</strong> activated outline button in toolbar no longer blends into background on MD dark mode (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29216">#29216</a>) (<a href="ee5da7a747">ee5da7a</a>)</li>
<li><strong>popover:</strong> viewport can be scrolled if no content present (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29215">#29215</a>) (<a href="f08759c2b8">f08759c</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29211">#29211</a></li>
</ul>
<h2><a href="https://github.com/ionic-team/ionic-framework/compare/v7.8.1...v7.8.2">7.8.2</a> (2024-03-27)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>searchbar:</strong> autocapitalize is initialized correctly (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29197">#29197</a>) (<a href="8ad66c03d7">8ad66c0</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29193">#29193</a></li>
</ul>
<h2><a href="https://github.com/ionic-team/ionic-framework/compare/v7.8.0...v7.8.1">7.8.1</a> (2024-03-20)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>datetime:</strong> wheel picker shows consistently in overlays (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29147">#29147</a>) (<a href="19c1bc16cb">19c1bc1</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/26234">#26234</a></li>
<li><strong>header:</strong> iOS headers in MD app are not hidden (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29164">#29164</a>) (<a href="fdfecd32c3">fdfecd3</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/28867">#28867</a></li>
<li><strong>react:</strong> avoid definitely typed errors with <code>@​types/react</code><a href="https://github.com/18"><code>@​18</code></a> (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29182">#29182</a>) (<a href="58d217d0cf">58d217d</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29178">#29178</a></li>
</ul>
<h3>Performance Improvements</h3>
<ul>
<li><strong>datetime:</strong> calendar body shows immediately in modal on ios (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29163">#29163</a>) (<a href="f75977699d">f759776</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/24542">#24542</a></li>
</ul>
<h1><a href="https://github.com/ionic-team/ionic-framework/compare/v7.7.5...v7.8.0">7.8.0</a> (2024-03-13)</h1>
<h3>Features</h3>
<ul>
<li><strong>datetime:</strong> formatOptions property for Datetime (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29065">#29065</a>) (<a href="7cdbc1b5ad">7cdbc1b</a>)</li>
<li><strong>searchbar:</strong> autocapitalize, dir, lang, maxlength, and minlength are inherited to native input (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29098">#29098</a>) (<a href="a0a77f799d">a0a77f7</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/27606">#27606</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="de35fa8b94"><code>de35fa8</code></a> v7.8.3</li>
<li><a href="c766528a17"><code>c766528</code></a> chore: run build (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29262">#29262</a>)</li>
<li><a href="9b3cf9fbc2"><code>9b3cf9f</code></a> chore(docs): move docs to the packages directory (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29256">#29256</a>)</li>
<li><a href="ee5da7a747"><code>ee5da7a</code></a> fix(button): activated outline button in toolbar no longer blends into backgr...</li>
<li><a href="c4bfc783e0"><code>c4bfc78</code></a> chore: remove Amanda from codeowners (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29252">#29252</a>)</li>
<li><a href="0137e732ce"><code>0137e73</code></a> chore: remove myself from code owners (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29251">#29251</a>)</li>
<li><a href="88ecb29e39"><code>88ecb29</code></a> chore: remove self from codeowners (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29250">#29250</a>)</li>
<li><a href="f726c35868"><code>f726c35</code></a> chore(deps): update dependency <code>@​stencil/vue-output-target</code> to v0.8.8 (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29243">#29243</a>)</li>
<li><a href="4a9d84ecbd"><code>4a9d84e</code></a> chore: remove mapsandapps from issue auto assignment (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29248">#29248</a>)</li>
<li><a href="f08759c2b8"><code>f08759c</code></a> fix(popover): viewport can be scrolled if no content present (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29215">#29215</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/ionic-team/ionic-framework/compare/v7.6.1...v7.8.3">compare view</a></li>
</ul>
</details>
<br />


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>
2024-04-04 16:10:26 +00:00
dependabot[bot]
1545e31a31 [framework-fixtures]: Bump the core group in /packages/static-build/test/fixtures/nuxt-v3 with 3 updates (#11297)
Bumps the core group in /packages/static-build/test/fixtures/nuxt-v3 with 3 updates: [nuxt](https://github.com/nuxt/nuxt/tree/HEAD/packages/nuxt), [vue](https://github.com/vuejs/core) and [vue-router](https://github.com/vuejs/router).

Updates `nuxt` from 3.7.4 to 3.11.1
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/nuxt/nuxt/releases">nuxt's releases</a>.</em></p>
<blockquote>
<h2>v3.11.1</h2>
<blockquote>
<p>3.11.1 is a patch release addressing regressions in v3.11.0.</p>
</blockquote>
<h2> Upgrading</h2>
<p>As usual, our recommendation for upgrading is to run:</p>
<pre lang="sh"><code>nuxi upgrade --force
</code></pre>
<p>This will refresh your lockfile as well, and ensures that you pull in updates from other dependencies that Nuxt relies on, particularly in the unjs ecosystem.</p>
<h2>👉 Changelog</h2>
<p><a href="https://github.com/nuxt/nuxt/compare/v3.11.0...v3.11.1">compare changes</a></p>
<h3>🩹 Fixes</h3>
<ul>
<li><strong>nuxt:</strong> Ignore console.logs called outside event context (<a href="https://github.com/nuxt/nuxt/commit/b3ced3d69">b3ced3d69</a>)</li>
<li><strong>schema:</strong> Include <code>ofetch</code> in <code>typescript.hoist</code> defaults (<a href="https://redirect.github.com/nuxt/nuxt/pull/26316">#26316</a>)</li>
<li><strong>nuxt:</strong> Conditionally use <code>tsx</code> parser (<a href="https://redirect.github.com/nuxt/nuxt/pull/26314">#26314</a>)</li>
<li><strong>nuxt:</strong> Correct <code>finish</code> types and add to docs (<a href="https://github.com/nuxt/nuxt/commit/0d9c63b82">0d9c63b82</a>)</li>
<li><strong>nuxt:</strong> Ignore failures to access asyncContext in environments without it (<a href="https://github.com/nuxt/nuxt/commit/523db1a19">523db1a19</a>)</li>
<li><strong>nuxt:</strong> Handle failure creating BroadcastChannel (<a href="https://redirect.github.com/nuxt/nuxt/pull/26340">#26340</a>)</li>
<li><strong>nuxt:</strong> Don't warn when injecting client-only components (<a href="https://redirect.github.com/nuxt/nuxt/pull/26341">#26341</a>)</li>
<li><strong>nuxt:</strong> Prevent losing pages routes on prerender (<a href="https://redirect.github.com/nuxt/nuxt/pull/26354">#26354</a>)</li>
<li><strong>nuxt:</strong> Pass <code>undefined</code> name when resolving trailing slash (<a href="https://redirect.github.com/nuxt/nuxt/pull/26358">#26358</a>)</li>
<li><strong>vite:</strong> Use ssr result if it exists (<a href="https://redirect.github.com/nuxt/nuxt/pull/26356">#26356</a>)</li>
</ul>
<h3>📖 Documentation</h3>
<ul>
<li>Fix code block formatting for <code>usePreviewMode</code> (<a href="https://redirect.github.com/nuxt/nuxt/pull/26303">#26303</a>)</li>
<li>Fix confusing wording (<a href="https://redirect.github.com/nuxt/nuxt/pull/26301">#26301</a>)</li>
<li>Add note that <code>useId</code> must be used with single root element (<a href="https://github.com/nuxt/nuxt/commit/401370b3a">401370b3a</a>)</li>
<li>Mention <code>&lt;DevOnly&gt;</code> component in api section (<a href="https://redirect.github.com/nuxt/nuxt/pull/26029">#26029</a>)</li>
<li>Note that <code>@nuxt/schema</code> should be used by module authors (<a href="https://redirect.github.com/nuxt/nuxt/pull/26190">#26190</a>)</li>
<li>Add <code>routeNameSplitter</code> example in migration docs (<a href="https://redirect.github.com/nuxt/nuxt/pull/25838">#25838</a>)</li>
</ul>
<h3>🏡 Chore</h3>
<ul>
<li><strong>nuxt:</strong> Remove unused code (<a href="https://redirect.github.com/nuxt/nuxt/pull/26319">#26319</a>)</li>
<li>Revert update github/codeql-action action (<a href="https://github.com/nuxt/nuxt/commit/c72951b06">c72951b06</a>)</li>
</ul>
<h3>🤖 CI</h3>
<ul>
<li>Configure npm registry in release workflow (<a href="https://github.com/nuxt/nuxt/commit/68f7d4df8">68f7d4df8</a>)</li>
</ul>
<h3>❤️ Contributors</h3>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="a80d1a0d63"><code>a80d1a0</code></a> v3.11.1</li>
<li><a href="c49d206647"><code>c49d206</code></a> fix(nuxt): pass <code>undefined</code> name when resolving trailing slash (<a href="https://github.com/nuxt/nuxt/tree/HEAD/packages/nuxt/issues/26358">#26358</a>)</li>
<li><a href="7284e70de9"><code>7284e70</code></a> fix(nuxt): prevent losing pages routes on prerender (<a href="https://github.com/nuxt/nuxt/tree/HEAD/packages/nuxt/issues/26354">#26354</a>)</li>
<li><a href="0bc49eb0ca"><code>0bc49eb</code></a> chore(deps): update dependency nuxi to v3.11.0 (main) (<a href="https://github.com/nuxt/nuxt/tree/HEAD/packages/nuxt/issues/26353">#26353</a>)</li>
<li><a href="90591e3a3c"><code>90591e3</code></a> fix(nuxt): don't warn when injecting client-only components (<a href="https://github.com/nuxt/nuxt/tree/HEAD/packages/nuxt/issues/26341">#26341</a>)</li>
<li><a href="2c0fc3a15e"><code>2c0fc3a</code></a> fix(nuxt): handle failure creating BroadcastChannel (<a href="https://github.com/nuxt/nuxt/tree/HEAD/packages/nuxt/issues/26340">#26340</a>)</li>
<li><a href="9b9558bcf9"><code>9b9558b</code></a> chore(deps): update dependency ufo to v1.5.2 (main) (<a href="https://github.com/nuxt/nuxt/tree/HEAD/packages/nuxt/issues/26339">#26339</a>)</li>
<li><a href="03f7b0941e"><code>03f7b09</code></a> chore(nuxt): remove unused code (<a href="https://github.com/nuxt/nuxt/tree/HEAD/packages/nuxt/issues/26319">#26319</a>)</li>
<li><a href="523db1a197"><code>523db1a</code></a> fix(nuxt): ignore failures to access asyncContext in environments without it</li>
<li><a href="0d9c63b828"><code>0d9c63b</code></a> fix(nuxt): correct <code>finish</code> types and add to docs</li>
<li>Additional commits viewable in <a href="https://github.com/nuxt/nuxt/commits/v3.11.1/packages/nuxt">compare view</a></li>
</ul>
</details>
<br />

Updates `vue` from 3.3.4 to 3.4.21
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/vuejs/core/releases">vue's releases</a>.</em></p>
<blockquote>
<h2>v3.4.21</h2>
<p>Please refer to <a href="https://github.com/vuejs/core/blob/main/CHANGELOG.md">CHANGELOG.md</a> for details.</p>
<h2>v3.4.20</h2>
<p>Please refer to <a href="https://github.com/vuejs/core/blob/main/CHANGELOG.md">CHANGELOG.md</a> for details.</p>
<h2>v3.4.19</h2>
<p>Please refer to <a href="https://github.com/vuejs/core/blob/main/CHANGELOG.md">CHANGELOG.md</a> for details.</p>
<h2>v3.4.18</h2>
<p>Please refer to <a href="https://github.com/vuejs/core/blob/main/CHANGELOG.md">CHANGELOG.md</a> for details.</p>
<h2>v3.4.17</h2>
<p>Please refer to <a href="https://github.com/vuejs/core/blob/main/CHANGELOG.md">CHANGELOG.md</a> for details.</p>
<h2>v3.4.16</h2>
<p>Please refer to <a href="https://github.com/vuejs/core/blob/main/CHANGELOG.md">CHANGELOG.md</a> for details.</p>
<h2>v3.4.15</h2>
<p>Please refer to <a href="https://github.com/vuejs/core/blob/main/CHANGELOG.md">CHANGELOG.md</a> for details.</p>
<h2>v3.4.14</h2>
<p>Please refer to <a href="https://github.com/vuejs/core/blob/main/CHANGELOG.md">CHANGELOG.md</a> for details.</p>
<h2>v3.4.13</h2>
<p>Please refer to <a href="https://github.com/vuejs/core/blob/main/CHANGELOG.md">CHANGELOG.md</a> for details.</p>
<h2>v3.4.12</h2>
<p>Please refer to <a href="https://github.com/vuejs/core/blob/main/CHANGELOG.md">CHANGELOG.md</a> for details.</p>
<h2>v3.4.11</h2>
<p>Please refer to <a href="https://github.com/vuejs/core/blob/main/CHANGELOG.md">CHANGELOG.md</a> for details.</p>
<h2>v3.4.10</h2>
<p>Please refer to <a href="https://github.com/vuejs/core/blob/main/CHANGELOG.md">CHANGELOG.md</a> for details.</p>
<h2>v3.4.9</h2>
<p>Please refer to <a href="https://github.com/vuejs/core/blob/main/CHANGELOG.md">CHANGELOG.md</a> for details.</p>
<h2>v3.4.8</h2>
<p>Please refer to <a href="https://github.com/vuejs/core/blob/main/CHANGELOG.md">CHANGELOG.md</a> for details.</p>
<h2>v3.4.7</h2>
<p>Please refer to <a href="https://github.com/vuejs/core/blob/main/CHANGELOG.md">CHANGELOG.md</a> for details.</p>
<h2>v3.4.6</h2>
<p>Please refer to <a href="https://github.com/vuejs/core/blob/main/CHANGELOG.md">CHANGELOG.md</a> for details.</p>
<h2>v3.4.5</h2>
<p>Please refer to <a href="https://github.com/vuejs/core/blob/main/CHANGELOG.md">CHANGELOG.md</a> for details.</p>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/vuejs/core/blob/main/CHANGELOG.md">vue's changelog</a>.</em></p>
<blockquote>
<h2><a href="https://github.com/vuejs/core/compare/v3.4.20...v3.4.21">3.4.21</a> (2024-02-28)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>runtime-dom:</strong> avoid unset option's value (<a href="https://redirect.github.com/vuejs/core/issues/10416">#10416</a>) (<a href="b3f8b5a4e7">b3f8b5a</a>), closes <a href="https://redirect.github.com/vuejs/core/issues/10412">#10412</a> <a href="https://redirect.github.com/vuejs/core/issues/10396">#10396</a></li>
<li><strong>suspense:</strong> ensure nested suspense patching if in fallback state (<a href="https://redirect.github.com/vuejs/core/issues/10417">#10417</a>) (<a href="7c97778aec">7c97778</a>), closes <a href="https://redirect.github.com/vuejs/core/issues/10415">#10415</a></li>
<li><strong>warning:</strong> stringify args in warn handler (<a href="https://redirect.github.com/vuejs/core/issues/10414">#10414</a>) (<a href="bc37258caa">bc37258</a>), closes <a href="https://redirect.github.com/vuejs/core/issues/10409">#10409</a></li>
</ul>
<h2><a href="https://github.com/vuejs/core/compare/v3.4.19...v3.4.20">3.4.20</a> (2024-02-26)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>parser:</strong> should not treat uppercase components as special tags (<a href="e0e02535cd">e0e0253</a>), closes <a href="https://redirect.github.com/vuejs/core/issues/10395">#10395</a></li>
<li><strong>runtime-dom:</strong> avoid always resetting nullish option value (<a href="ff130c4702">ff130c4</a>), closes <a href="https://redirect.github.com/vuejs/core/issues/10396">#10396</a></li>
<li><strong>runtime-dom:</strong> fix nested v-show priority regression (<a href="364f8902c8">364f890</a>), closes <a href="https://redirect.github.com/vuejs/core/issues/10338">#10338</a></li>
<li><strong>runtime-dom:</strong> v-bind style should clear previous css string value (<a href="https://redirect.github.com/vuejs/core/issues/10373">#10373</a>) (<a href="e2d323538e">e2d3235</a>), closes <a href="https://redirect.github.com/vuejs/core/issues/10352">#10352</a></li>
<li><strong>suspense:</strong> handle suspense switching with nested suspense  (<a href="https://redirect.github.com/vuejs/core/issues/10184">#10184</a>) (<a href="0f3da05ea2">0f3da05</a>), closes <a href="https://redirect.github.com/vuejs/core/issues/10098">#10098</a></li>
<li><strong>types:</strong> better typing for direct setup signature of defineComponent (<a href="https://redirect.github.com/vuejs/core/issues/10357">#10357</a>) (<a href="eadce5b753">eadce5b</a>), closes <a href="https://redirect.github.com/vuejs/core/issues/8604">#8604</a> <a href="https://redirect.github.com/vuejs/core/issues/8855">#8855</a></li>
</ul>
<h2><a href="https://github.com/vuejs/core/compare/v3.4.18...v3.4.19">3.4.19</a> (2024-02-13)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>deps:</strong> pin lru-cache to avoid hashing error (<a href="b8be99018c">b8be990</a>), closes <a href="https://redirect.github.com/vuejs/core/issues/10300">#10300</a></li>
<li><strong>hydration:</strong> fix css vars hydration mismatch false positive on non-root nodes (<a href="995d2fdcca">995d2fd</a>), closes <a href="https://redirect.github.com/vuejs/core/issues/10317">#10317</a> <a href="https://redirect.github.com/vuejs/core/issues/10325">#10325</a></li>
<li><strong>runtime-dom:</strong> should not trigger transition when v-show value is falsy (<a href="https://redirect.github.com/vuejs/core/issues/10311">#10311</a>) (<a href="e50963903d">e509639</a>)</li>
</ul>
<h3>Features</h3>
<blockquote>
<p>Note: this warning is categorized as a feature but released in a patch because it does not affect public APIs.</p>
</blockquote>
<ul>
<li><strong>dx:</strong> warn users when computed is self-triggering (<a href="https://redirect.github.com/vuejs/core/issues/10299">#10299</a>) (<a href="f7ba97f975">f7ba97f</a>)</li>
</ul>
<h3>Performance Improvements</h3>
<ul>
<li><strong>runtime:</strong> improve <code>getType()</code> GC and speed (<a href="https://redirect.github.com/vuejs/core/issues/10327">#10327</a>) (<a href="603a1e1f5a">603a1e1</a>)</li>
</ul>
<h2><a href="https://github.com/vuejs/core/compare/v3.4.17...v3.4.18">3.4.18</a> (2024-02-09)</h2>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="f66a75ea75"><code>f66a75e</code></a> release: v3.4.21</li>
<li><a href="b3f8b5a4e7"><code>b3f8b5a</code></a> fix(runtime-dom): avoid unset option's value (<a href="https://redirect.github.com/vuejs/core/issues/10416">#10416</a>)</li>
<li><a href="bc37258caa"><code>bc37258</code></a> fix(warning): stringify args in warn handler (<a href="https://redirect.github.com/vuejs/core/issues/10414">#10414</a>)</li>
<li><a href="7c97778aec"><code>7c97778</code></a> fix(suspense): ensure nested suspense patching if in fallback state (<a href="https://redirect.github.com/vuejs/core/issues/10417">#10417</a>)</li>
<li><a href="1f6a1102aa"><code>1f6a110</code></a> test: clean snapshot</li>
<li><a href="89de26cdcd"><code>89de26c</code></a> release: v3.4.20</li>
<li><a href="b97ad0ee9a"><code>b97ad0e</code></a> chore: update e2eUtils puppeteer options</li>
<li><a href="b3bd3a210a"><code>b3bd3a2</code></a> build: disable reexportProtoFromExternal in rollup config</li>
<li><a href="a24809fbd2"><code>a24809f</code></a> chore: limit typescript lib to es2016 (<a href="https://redirect.github.com/vuejs/core/issues/10164">#10164</a>)</li>
<li><a href="822cb72e01"><code>822cb72</code></a> chore(deps): update test to ^1.3.1 (<a href="https://redirect.github.com/vuejs/core/issues/10355">#10355</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/vuejs/core/compare/v3.3.4...v3.4.21">compare view</a></li>
</ul>
</details>
<br />

Updates `vue-router` from 4.2.5 to 4.3.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/vuejs/router/releases">vue-router's releases</a>.</em></p>
<blockquote>
<h2>v4.3.0</h2>
<p>Please refer to <a href="https://github.com/vuejs/router/blob/main/packages/router/CHANGELOG.md">CHANGELOG.md</a> for details.</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="13303bd025"><code>13303bd</code></a> release: vue-router@4.3.0</li>
<li><a href="16f83dbb59"><code>16f83db</code></a> chore: up packages</li>
<li><a href="04b6225de8"><code>04b6225</code></a> chore: require up to date node</li>
<li><a href="17d47ed32f"><code>17d47ed</code></a> chore: comment</li>
<li><a href="c9f3e0c771"><code>c9f3e0c</code></a> docs: api updates</li>
<li><a href="9a8520ffad"><code>9a8520f</code></a> chore: up vue</li>
<li><a href="f934fcf634"><code>f934fcf</code></a> chore: update chromedriver to 121.0.2 to fix binary CDN URL issue (<a href="https://redirect.github.com/vuejs/router/issues/2144">#2144</a>)</li>
<li><a href="d14503fc38"><code>d14503f</code></a> docs(zh): translate the last paragraph of named_routes to Chinese (<a href="https://redirect.github.com/vuejs/router/issues/2141">#2141</a>)</li>
<li><a href="04b50e5a2c"><code>04b50e5</code></a> fix: keep optional params coming from a parent record (<a href="https://redirect.github.com/vuejs/router/issues/2031">#2031</a>)</li>
<li><a href="2e1ad5d51a"><code>2e1ad5d</code></a> docs: fix index.md to avoid horizontal scrolling in code (<a href="https://redirect.github.com/vuejs/router/issues/2129">#2129</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/vuejs/router/compare/v4.2.5...v4.3.0">compare view</a></li>
</ul>
</details>
<br />


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>
2024-04-04 15:46:18 +00:00
Jeff See
76ea6ea2a7 [cli] Replace promptBool with confirm prompts (#11279)
The only changes are from some slightly different punctuation and that typing 'y' or 'n' doesn't process the prompt, it now waits for "Enter". Easiest command to see this is an action is the `init`, if you provided an invalid example to initialize `vercel init astroz` and follow the prompts.
2024-04-04 09:45:02 +00:00
Dillon Mulroy
5b8b87739e [cli] Fix how we determine the GIT_CONFIG_PATH to support git worktrees and git submodules (#11283)
## Fix how we determine the GIT_CONFIG_PATH to support git worktrees and git submodules

We were previously checking for the root of the directory by looking for `.git/config` if the project was not already linked.

This was causing `ENOTDIR` error when checking `.git` in git worktree or git submodule repositories. This is due to `.git` being a file in those repo types with a pointer to the "parent" or "super" repo rather than a directory.

Resolves #10104
2024-04-04 08:54:15 +00:00
dependabot[bot]
6ff7b34a44 [framework-fixtures]: Bump the core group in /packages/static-build/test/fixtures/preact-v10 with 2 updates (#11361)
Bumps the core group in /packages/static-build/test/fixtures/preact-v10 with 2 updates: [preact](https://github.com/preactjs/preact) and [preact-render-to-string](https://github.com/preactjs/preact-render-to-string).

Updates `preact` from 10.18.1 to 10.20.1
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/preactjs/preact/releases">preact's releases</a>.</em></p>
<blockquote>
<h2>10.20.1</h2>
<h2>Fixes</h2>
<ul>
<li>Add special case for focusIn and focusOut (<a href="https://redirect.github.com/preactjs/preact/issues/4316">#4316</a>, thanks <a href="https://github.com/JoviDeCroock"><code>@​JoviDeCroock</code></a>)</li>
</ul>
<h2>10.20.0</h2>
<h2>Features</h2>
<ul>
<li>Add isMemo to compact to allow compatibility with react-is dependant libraries (<a href="https://redirect.github.com/preactjs/preact/issues/4302">#4302</a>, thanks <a href="https://github.com/ziongh"><code>@​ziongh</code></a>)</li>
</ul>
<h2>Fixes</h2>
<ul>
<li>Fix case where shrinking a list would cause an exception (<a href="https://redirect.github.com/preactjs/preact/issues/4312">#4312</a>, thanks <a href="https://github.com/JoviDeCroock"><code>@​JoviDeCroock</code></a>)</li>
</ul>
<h2>10.19.7</h2>
<h2>Types</h2>
<ul>
<li>Bring consistency to our focus-event types (<a href="https://redirect.github.com/preactjs/preact/issues/4307">#4307</a>, thanks <a href="https://github.com/JoviDeCroock"><code>@​JoviDeCroock</code></a>)</li>
<li>Add onScrollend listener type (<a href="https://redirect.github.com/preactjs/preact/issues/4305">#4305</a>, thanks <a href="https://github.com/JoviDeCroock"><code>@​JoviDeCroock</code></a>)</li>
<li>Align state updater type with Raeect (<a href="https://redirect.github.com/preactjs/preact/issues/4306">#4306</a>, thanks <a href="https://github.com/JoviDeCroock"><code>@​JoviDeCroock</code></a>)</li>
</ul>
<h2>Fixes</h2>
<ul>
<li>Revert batch commit callbacks from all components in the render queue (<a href="https://redirect.github.com/preactjs/preact/issues/4297">#4297</a>, thanks <a href="https://github.com/JoviDeCroock"><code>@​JoviDeCroock</code></a>)</li>
</ul>
<h2>10.19.6</h2>
<p><strong>tl;dr:</strong> This release contains bug fixes for incorrect ordering of unkeyed children.</p>
<h2>Fixes</h2>
<ul>
<li>Match <code>null</code> placeholders using skewed index (<a href="https://redirect.github.com/preactjs/preact/issues/4290">#4290</a>, thanks <a href="https://github.com/andrewiggins"><code>@​andrewiggins</code></a>)</li>
<li>Fix increment skew when we aren't removing the first pointer (<a href="https://redirect.github.com/preactjs/preact/issues/4284">#4284</a>, thanks <a href="https://github.com/JoviDeCroock"><code>@​JoviDeCroock</code></a>)</li>
<li>Fix invalid vnode internal id for text nodes (<a href="https://redirect.github.com/preactjs/preact/issues/4291">#4291</a>, thanks <a href="https://github.com/marvinhagemeister"><code>@​marvinhagemeister</code></a>)</li>
<li>Fix unkeyed reconciliation order in certain scenarios (<a href="https://redirect.github.com/preactjs/preact/issues/4287">#4287</a>, thanks <a href="https://github.com/marvinhagemeister"><code>@​marvinhagemeister</code></a>, thanks <a href="https://github.com/JoviDeCroock"><code>@​JoviDeCroock</code></a>)</li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/preactjs/preact/compare/10.19.5...10.19.6">https://github.com/preactjs/preact/compare/10.19.5...10.19.6</a></p>
<h2>10.19.5</h2>
<h2>Fixes</h2>
<ul>
<li>Address scenario where we would crash when replacing a matched vnode with null (<a href="https://redirect.github.com/preactjs/preact/issues/4281">#4281</a>, thanks <a href="https://github.com/JoviDeCroock"><code>@​JoviDeCroock</code></a>)</li>
<li>Correctly restore _original (<a href="https://redirect.github.com/preactjs/preact/issues/4280">#4280</a>, thanks <a href="https://github.com/JoviDeCroock"><code>@​JoviDeCroock</code></a>)</li>
<li>Protect against nullish render (<a href="https://redirect.github.com/preactjs/preact/issues/4278">#4278</a>, thanks <a href="https://github.com/JoviDeCroock"><code>@​JoviDeCroock</code></a>)</li>
<li>Support setting translate through direct access (<a href="https://redirect.github.com/preactjs/preact/issues/3800">#3800</a>, thanks <a href="https://github.com/JoviDeCroock"><code>@​JoviDeCroock</code></a>)</li>
</ul>
<h2>Types</h2>
<ul>
<li>Add dpub aria 1.0 role JSX types (<a href="https://redirect.github.com/preactjs/preact/issues/4276">#4276</a>, thanks <a href="https://github.com/novari"><code>@​novari</code></a>)</li>
</ul>
<h2>10.19.4</h2>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="bc7c551559"><code>bc7c551</code></a> 10.20.1 (<a href="https://redirect.github.com/preactjs/preact/issues/4319">#4319</a>)</li>
<li><a href="a59a78ce14"><code>a59a78c</code></a> fix focus in and out (<a href="https://redirect.github.com/preactjs/preact/issues/4316">#4316</a>)</li>
<li><a href="b820d8b73e"><code>b820d8b</code></a> 10.20.0 (<a href="https://redirect.github.com/preactjs/preact/issues/4313">#4313</a>)</li>
<li><a href="342b50e862"><code>342b50e</code></a> fix: case where shrinking a list would cause an exception (<a href="https://redirect.github.com/preactjs/preact/issues/4312">#4312</a>)</li>
<li><a href="a784a62b69"><code>a784a62</code></a> Merge pull request <a href="https://redirect.github.com/preactjs/preact/issues/4302">#4302</a> from ziongh/main</li>
<li><a href="94bfe9d779"><code>94bfe9d</code></a> Merge branch 'main' into main</li>
<li><a href="e1747136e8"><code>e174713</code></a> 10.19.7 (<a href="https://redirect.github.com/preactjs/preact/issues/4308">#4308</a>)</li>
<li><a href="b2ff0560e9"><code>b2ff056</code></a> try to fix benchmarks (<a href="https://redirect.github.com/preactjs/preact/issues/4304">#4304</a>)</li>
<li><a href="a2c12f5a46"><code>a2c12f5</code></a> bring consistency to our focus events (<a href="https://redirect.github.com/preactjs/preact/issues/4307">#4307</a>)</li>
<li><a href="cfba5eef8e"><code>cfba5ee</code></a> add onscrollend listener type (<a href="https://redirect.github.com/preactjs/preact/issues/4305">#4305</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/preactjs/preact/compare/10.18.1...10.20.1">compare view</a></li>
</ul>
</details>
<br />

Updates `preact-render-to-string` from 6.2.2 to 6.4.1
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/preactjs/preact-render-to-string/releases">preact-render-to-string's releases</a>.</em></p>
<blockquote>
<h2>v6.4.1</h2>
<h3>Patch Changes</h3>
<ul>
<li>
<p><a href="https://redirect.github.com/preactjs/preact-render-to-string/pull/344">#344</a> <a href="27a8b0e065"><code>27a8b0e</code></a> Thanks <a href="https://github.com/JoviDeCroock"><code>@​JoviDeCroock</code></a>! - Ensure commonjs also has the async export</p>
</li>
<li>
<p><a href="https://redirect.github.com/preactjs/preact-render-to-string/pull/336">#336</a> <a href="c46fb593ea"><code>c46fb59</code></a> Thanks <a href="https://github.com/marvinhagemeister"><code>@​marvinhagemeister</code></a>! - Fix error thrown after suspending not being rethrown.</p>
</li>
<li>
<p><a href="https://redirect.github.com/preactjs/preact-render-to-string/pull/339">#339</a> <a href="44628228de"><code>4462822</code></a> Thanks <a href="https://github.com/marvinhagemeister"><code>@​marvinhagemeister</code></a>! - Fix invalid parent pointer empty value when rendering a suspended vnode</p>
</li>
</ul>
<h2>6.4.0</h2>
<h3>Minor Changes</h3>
<ul>
<li><a href="https://redirect.github.com/preactjs/preact-render-to-string/pull/333">#333</a> <a href="6acc97aee9"><code>6acc97a</code></a> Thanks <a href="https://github.com/JoviDeCroock"><code>@​JoviDeCroock</code></a> and <a href="https://github.com/dios-david"><code>@​dios-david</code></a>! - Allow prepass like behavior where a Promise
will be awaited and then continued, this is done with the new <code>renderToStringAsync</code> export</li>
</ul>
<h3>Patch Changes</h3>
<ul>
<li><a href="https://redirect.github.com/preactjs/preact-render-to-string/pull/326">#326</a> <a href="87d8c21e61"><code>87d8c21</code></a> Thanks <a href="https://github.com/Geo25rey"><code>@​Geo25rey</code></a>! - fix external type definitions of <code>renderToString</code></li>
</ul>
<ul>
<li><a href="https://redirect.github.com/preactjs/preact-render-to-string/pull/329">#329</a> <a href="0a0d0ceba2"><code>0a0d0ce</code></a> Thanks <a href="https://github.com/acelaya"><code>@​acelaya</code></a>! - Remove incorrect second default export from jsx.d.ts</li>
</ul>
<h2>6.3.1</h2>
<h2>What's Changed</h2>
<ul>
<li>fix: mapped precompile children by <a href="https://github.com/marvinhagemeister"><code>@​marvinhagemeister</code></a> in <a href="https://redirect.github.com/preactjs/preact-render-to-string/pull/324">preactjs/preact-render-to-string#324</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/preactjs/preact-render-to-string/compare/v6.3.0...v6.3.1">https://github.com/preactjs/preact-render-to-string/compare/v6.3.0...v6.3.1</a></p>
<h2>6.3.0</h2>
<h2>Features</h2>
<ul>
<li>feat: add support for precompiled JSX by <a href="https://github.com/marvinhagemeister"><code>@​marvinhagemeister</code></a> in <a href="https://redirect.github.com/preactjs/preact-render-to-string/pull/322">preactjs/preact-render-to-string#322</a></li>
</ul>
<h2>Maintenance</h2>
<ul>
<li>chore: update test dependencies by <a href="https://github.com/marvinhagemeister"><code>@​marvinhagemeister</code></a> in <a href="https://redirect.github.com/preactjs/preact-render-to-string/pull/321">preactjs/preact-render-to-string#321</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/preactjs/preact-render-to-string/compare/6.2.2...v6.3.0">https://github.com/preactjs/preact-render-to-string/compare/6.2.2...v6.3.0</a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/preactjs/preact-render-to-string/blob/main/CHANGELOG.md">preact-render-to-string's changelog</a>.</em></p>
<blockquote>
<h2>6.4.1</h2>
<h3>Patch Changes</h3>
<ul>
<li><a href="https://redirect.github.com/preactjs/preact-render-to-string/pull/344">#344</a> <a href="27a8b0e065"><code>27a8b0e</code></a> Thanks <a href="https://github.com/JoviDeCroock"><code>@​JoviDeCroock</code></a>! - Ensure commonjs also has the async export</li>
</ul>
<ul>
<li><a href="https://redirect.github.com/preactjs/preact-render-to-string/pull/336">#336</a> <a href="c46fb593ea"><code>c46fb59</code></a> Thanks <a href="https://github.com/marvinhagemeister"><code>@​marvinhagemeister</code></a>! - Fix error thrown after suspending not being rethrown.</li>
</ul>
<ul>
<li><a href="https://redirect.github.com/preactjs/preact-render-to-string/pull/339">#339</a> <a href="44628228de"><code>4462822</code></a> Thanks <a href="https://github.com/marvinhagemeister"><code>@​marvinhagemeister</code></a>! - Fix invalid parent pointer empty value when rendering a suspended vnode</li>
</ul>
<h2>6.4.0</h2>
<h3>Minor Changes</h3>
<ul>
<li><a href="https://redirect.github.com/preactjs/preact-render-to-string/pull/333">#333</a> <a href="6acc97aee9"><code>6acc97a</code></a> Thanks <a href="https://github.com/JoviDeCroock"><code>@​JoviDeCroock</code></a>! - Allow prepass like behavior where a Promise
will be awaited and then continued, this is done with
the new <code>renderToStringAsync</code> export</li>
</ul>
<h3>Patch Changes</h3>
<ul>
<li><a href="https://redirect.github.com/preactjs/preact-render-to-string/pull/326">#326</a> <a href="87d8c21e61"><code>87d8c21</code></a> Thanks <a href="https://github.com/Geo25rey"><code>@​Geo25rey</code></a>! - fix external type definitions of <code>renderToString</code></li>
</ul>
<ul>
<li><a href="https://redirect.github.com/preactjs/preact-render-to-string/pull/329">#329</a> <a href="0a0d0ceba2"><code>0a0d0ce</code></a> Thanks <a href="https://github.com/acelaya"><code>@​acelaya</code></a>! - Remove incorrect second default export from jsx.d.ts</li>
</ul>
<h2>6.3.1</h2>
<h3>Patch Changes</h3>
<ul>
<li><a href="https://redirect.github.com/preactjs/preact-render-to-string/pull/324">#324</a> <a href="6bf321d31d"><code>6bf321d</code></a> Thanks <a href="https://github.com/marvinhagemeister"><code>@​marvinhagemeister</code></a>! - Fix mapped children not working with Deno's new precompile JSX transform.</li>
</ul>
<h2>6.3.0</h2>
<h3>Minor Changes</h3>
<ul>
<li>
<p><a href="926827c074"><code>926827c</code></a> Thanks <a href="https://github.com/marvinhagemeister"><code>@​marvinhagemeister</code></a>! - Add support for precompiled JSX transform, see <a href="https://deno.com/blog/v1.38#fastest-jsx-transform">https://deno.com/blog/v1.38#fastest-jsx-transform</a>. Compared to traditional JSX transforms, the precompiled JSX transform tries to pre-serialize as much of the JSX as possible. That way less objects need to be created and serialized which relieves a lot of GC pressure.</p>
<pre lang="jsx"><code>// input
&lt;div class=&quot;foo&quot;&gt;hello&lt;/div&gt;;
<p>// output
const tpl = [<code>&amp;lt;div class=&amp;quot;foo&amp;quot;&amp;gt;hello&amp;lt;/div&amp;gt;</code>];
jsxTemplate(tpl);
</code></pre></p>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="663dbb838f"><code>663dbb8</code></a> chore: add repo info to package.json</li>
<li><a href="56e116a766"><code>56e116a</code></a> chore: fix changeset action command</li>
<li><a href="8dbc8e9671"><code>8dbc8e9</code></a> Merge pull request <a href="https://redirect.github.com/preactjs/preact-render-to-string/issues/337">#337</a> from preactjs/changeset-release/main</li>
<li><a href="5ad317e4f2"><code>5ad317e</code></a> Version Packages</li>
<li><a href="f84f951a9c"><code>f84f951</code></a> Merge pull request <a href="https://redirect.github.com/preactjs/preact-render-to-string/issues/344">#344</a> from preactjs/ensure-cjs-export</li>
<li><a href="27a8b0e065"><code>27a8b0e</code></a> ensure the cjs export has our async func</li>
<li><a href="e3326e2ec9"><code>e3326e2</code></a> Merge pull request <a href="https://redirect.github.com/preactjs/preact-render-to-string/issues/342">#342</a> from jviide/up</li>
<li><a href="225563804e"><code>2255638</code></a> build(actions): update actions, use actions/setup-node's builtin caching</li>
<li><a href="4521894ae9"><code>4521894</code></a> correct my usual mistake (<a href="https://redirect.github.com/preactjs/preact-render-to-string/issues/341">#341</a>)</li>
<li><a href="7819c3eb6d"><code>7819c3e</code></a> automate publishing with provenance (<a href="https://redirect.github.com/preactjs/preact-render-to-string/issues/340">#340</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/preactjs/preact-render-to-string/compare/6.2.2...v6.4.1">compare view</a></li>
</ul>
</details>
<br />


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>
2024-04-04 08:30:19 +00:00
dependabot[bot]
97d9e83232 [framework-fixtures]: Bump the core group in /packages/static-build/test/fixtures/stencil-v4 with 1 update (#11360)
Bumps the core group in /packages/static-build/test/fixtures/stencil-v4 with 1 update: [@stencil/core](https://github.com/ionic-team/stencil).

Updates `@stencil/core` from 4.10.0 to 4.14.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/ionic-team/stencil/releases"><code>@​stencil/core</code>'s releases</a>.</em></p>
<blockquote>
<h2>🚡 4.14.0 (2024-04-01)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>mock-doc:</strong> provide a local name (<a href="https://redirect.github.com/ionic-team/stencil/issues/5480">#5480</a>) (<a href="2f67b3526c">2f67b35</a>), closes <a href="https://redirect.github.com/ionic-team/stencil/issues/5342">#5342</a></li>
<li><strong>mock-doc:</strong> resolve type issue for localName (<a href="https://redirect.github.com/ionic-team/stencil/issues/5595">#5595</a>) (<a href="d91af87d4e">d91af87</a>), closes <a href="https://redirect.github.com/ionic-team/stencil/issues/5342">#5342</a></li>
</ul>
<h3>Features</h3>
<ul>
<li><strong>testing:</strong> allow to set screenshot timeout option in Jest v28+ (<a href="https://redirect.github.com/ionic-team/stencil/issues/5537">#5537</a>) (<a href="6df12b2a44">6df12b2</a>)</li>
<li><strong>testing:</strong> support deep piercing with Puppeteer (<a href="https://redirect.github.com/ionic-team/stencil/issues/5481">#5481</a>) (<a href="13d5d4188a">13d5d41</a>)</li>
<li><strong>typescript:</strong> Update dependency typescript to v5.4.3 (<a href="https://redirect.github.com/ionic-team/stencil/issues/5588">#5588</a>) (<a href="9d489e42a6">9d489e4</a>)</li>
</ul>
<h2>🚞 v4.13.0 (2024-03-18)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>compiler:</strong> allow to set custom root directory (<a href="https://redirect.github.com/ionic-team/stencil/issues/5446">#5446</a>) (<a href="b6b96175c5">b6b9617</a>)</li>
<li><strong>compiler:</strong> don't validate references for <code>@Prop</code>, <code>@Method</code> and <code>@Event</code> decorator (<a href="https://redirect.github.com/ionic-team/stencil/issues/5475">#5475</a>) (<a href="3e45a82353">3e45a82</a>), closes <a href="https://redirect.github.com/ionic-team/stencil/issues/1352">#1352</a></li>
<li><strong>renderer:</strong> fix conditional rendering issue (<a href="https://redirect.github.com/ionic-team/stencil/issues/5365">#5365</a>) (<a href="5aa886eb52">5aa886e</a>), closes <a href="https://redirect.github.com/ionic-team/stencil/issues/5335">#5335</a></li>
<li><strong>renderer:</strong> fix missing slot ref callback handling (<a href="https://redirect.github.com/ionic-team/stencil/issues/5337">#5337</a>) (<a href="41f877ec48">41f877e</a>), closes <a href="https://redirect.github.com/ionic-team/stencil/issues/5335">#5335</a></li>
<li><strong>runtime:</strong> remove <code>forceUpdate</code> in <code>appendChild</code> patch (<a href="https://redirect.github.com/ionic-team/stencil/issues/5437">#5437</a>) (<a href="e03795b38e">e03795b</a>)</li>
<li><strong>sys:</strong> fix expected types for <code>createNodeLogger</code> and <code>createNodeSys</code> (<a href="https://redirect.github.com/ionic-team/stencil/issues/5375">#5375</a>) (<a href="7a70281bb4">7a70281</a>)</li>
<li><strong>testing:</strong> use viewport for Puppeteer screenshot clip dimensions (<a href="https://redirect.github.com/ionic-team/stencil/issues/5359">#5359</a>) (<a href="c8798002ab">c879800</a>), closes <a href="https://redirect.github.com/ionic-team/stencil/issues/5353">#5353</a></li>
</ul>
<h3>Features</h3>
<ul>
<li><strong>dev-server:</strong> add &quot;ping&quot; route (<a href="https://redirect.github.com/ionic-team/stencil/issues/5414">#5414</a>) (<a href="b279858e2f">b279858</a>)</li>
<li><strong>typescript:</strong> Update dependency typescript to ~5.4.0 (<a href="https://redirect.github.com/ionic-team/stencil/issues/5464">#5464</a>) (<a href="0833dc4929">0833dc4</a>)</li>
</ul>
<h2>Thanks</h2>
<p>🎉 Thanks <a href="https://github.com/yigityuce"><code>@​yigityuce</code></a> for their contributions! 🎉</p>
<h2>🍍 v4.12.6 (2024-03-11)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>cli:</strong> move version logging earlier in CLI to allow <code>-v</code>, <code>--version</code> (<a href="https://redirect.github.com/ionic-team/stencil/issues/5425">#5425</a>) (<a href="194b0fc0d9">194b0fc</a>)</li>
<li><strong>compiler:</strong> fix generated import statement (<a href="https://redirect.github.com/ionic-team/stencil/issues/5419">#5419</a>) (<a href="502da1bc3d">502da1b</a>)</li>
<li><strong>test:</strong> ensure screenshot dir is cleaned up (<a href="https://redirect.github.com/ionic-team/stencil/issues/5421">#5421</a>) (<a href="15e7a4960b">15e7a49</a>)</li>
</ul>
<h2>💙 v4.12.5 (2024-03-04)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>custom-elements:</strong> hydrate on client side (<a href="https://redirect.github.com/ionic-team/stencil/issues/5317">#5317</a>) (<a href="d809658635">d809658</a>), closes <a href="https://redirect.github.com/ionic-team/stencil/issues/3319">#3319</a></li>
</ul>
<h2>Thanks</h2>
<p>🎉 andrew9994 for your contribution!</p>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/ionic-team/stencil/blob/main/CHANGELOG.md"><code>@​stencil/core</code>'s changelog</a>.</em></p>
<blockquote>
<h1>🚡 <a href="https://github.com/ionic-team/stencil/compare/v4.13.0...v4.14.0">4.14.0</a> (2024-04-01)</h1>
<h3>Bug Fixes</h3>
<ul>
<li><strong>mock-doc:</strong> provide a local name (<a href="https://redirect.github.com/ionic-team/stencil/issues/5480">#5480</a>) (<a href="2f67b3526c">2f67b35</a>), closes <a href="https://redirect.github.com/ionic-team/stencil/issues/5342">#5342</a></li>
<li><strong>mock-doc:</strong> resolve type issue for localName (<a href="https://redirect.github.com/ionic-team/stencil/issues/5595">#5595</a>) (<a href="d91af87d4e">d91af87</a>), closes <a href="https://redirect.github.com/ionic-team/stencil/issues/5342">#5342</a></li>
</ul>
<h3>Features</h3>
<ul>
<li><strong>testing:</strong> allow to set screenshot timeout option in Jest v28+ (<a href="https://redirect.github.com/ionic-team/stencil/issues/5537">#5537</a>) (<a href="6df12b2a44">6df12b2</a>)</li>
<li><strong>testing:</strong> support deep piercing with Puppeteer (<a href="https://redirect.github.com/ionic-team/stencil/issues/5481">#5481</a>) (<a href="13d5d4188a">13d5d41</a>)</li>
<li><strong>typescript:</strong> Update dependency typescript to v5.4.3 (<a href="https://redirect.github.com/ionic-team/stencil/issues/5588">#5588</a>) (<a href="9d489e42a6">9d489e4</a>)</li>
</ul>
<h1>🚞 <a href="https://github.com/ionic-team/stencil/compare/v4.12.6...v4.13.0">4.13.0</a> (2024-03-18)</h1>
<h3>Bug Fixes</h3>
<ul>
<li><strong>compiler:</strong> allow to set custom root directory (<a href="https://redirect.github.com/ionic-team/stencil/issues/5446">#5446</a>) (<a href="b6b96175c5">b6b9617</a>)</li>
<li><strong>compiler:</strong> don't validate references for <a href="https://github.com/Prop"><code>@​Prop</code></a>, <a href="https://github.com/Method"><code>@​Method</code></a> and <a href="https://github.com/Event"><code>@​Event</code></a> decorator (<a href="https://redirect.github.com/ionic-team/stencil/issues/5475">#5475</a>) (<a href="3e45a82353">3e45a82</a>), closes <a href="https://redirect.github.com/ionic-team/stencil/issues/1352">#1352</a></li>
<li><strong>renderer:</strong> fix conditional rendering issue (<a href="https://redirect.github.com/ionic-team/stencil/issues/5365">#5365</a>) (<a href="5aa886eb52">5aa886e</a>), closes <a href="https://redirect.github.com/ionic-team/stencil/issues/5335">#5335</a></li>
<li><strong>renderer:</strong> fix missing slot ref callback handling (<a href="https://redirect.github.com/ionic-team/stencil/issues/5337">#5337</a>) (<a href="41f877ec48">41f877e</a>), closes <a href="https://redirect.github.com/ionic-team/stencil/issues/5335">#5335</a></li>
<li><strong>runtime:</strong> remove <code>forceUpdate</code> in <code>appendChild</code> patch (<a href="https://redirect.github.com/ionic-team/stencil/issues/5437">#5437</a>) (<a href="e03795b38e">e03795b</a>)</li>
<li><strong>sys:</strong> fix expected types for <code>createNodeLogger</code> and <code>createNodeSys</code> (<a href="https://redirect.github.com/ionic-team/stencil/issues/5375">#5375</a>) (<a href="7a70281bb4">7a70281</a>)</li>
<li><strong>testing:</strong> use viewport for Puppeteer screenshot clip dimensions (<a href="https://redirect.github.com/ionic-team/stencil/issues/5359">#5359</a>) (<a href="c8798002ab">c879800</a>), closes <a href="https://redirect.github.com/ionic-team/stencil/issues/5353">#5353</a></li>
</ul>
<h3>Features</h3>
<ul>
<li><strong>dev-server:</strong> add &quot;ping&quot; route (<a href="https://redirect.github.com/ionic-team/stencil/issues/5414">#5414</a>) (<a href="b279858e2f">b279858</a>)</li>
<li><strong>typescript:</strong> Update dependency typescript to ~5.4.0 (<a href="https://redirect.github.com/ionic-team/stencil/issues/5464">#5464</a>) (<a href="0833dc4929">0833dc4</a>)</li>
</ul>
<h2>🍍 <a href="https://github.com/ionic-team/stencil/compare/v4.12.5...v4.12.6">4.12.6</a> (2024-03-11)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>cli:</strong> move version logging earlier in CLI to allow <code>-v</code>, <code>--version</code> (<a href="https://redirect.github.com/ionic-team/stencil/issues/5425">#5425</a>) (<a href="194b0fc0d9">194b0fc</a>)</li>
<li><strong>compiler:</strong> fix generated import statement (<a href="https://redirect.github.com/ionic-team/stencil/issues/5419">#5419</a>) (<a href="502da1bc3d">502da1b</a>)</li>
<li><strong>test:</strong> ensure screenshot dir is cleaned up (<a href="https://redirect.github.com/ionic-team/stencil/issues/5421">#5421</a>) (<a href="15e7a4960b">15e7a49</a>)</li>
</ul>
<h2>💙 <a href="https://github.com/ionic-team/stencil/compare/v4.12.4...v4.12.5">4.12.5</a> (2024-03-04)</h2>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="fd144e3149"><code>fd144e3</code></a> Release v4.14.0 (<a href="https://redirect.github.com/ionic-team/stencil/issues/5612">#5612</a>)</li>
<li><a href="d2ff0ea196"><code>d2ff0ea</code></a> chore(deps): update dependency eslint-plugin-jsdoc to v48.2.2 (<a href="https://redirect.github.com/ionic-team/stencil/issues/5606">#5606</a>)</li>
<li><a href="c2ecfabb8a"><code>c2ecfab</code></a> chore(deps): update dependency glob to v10.3.12 (<a href="https://redirect.github.com/ionic-team/stencil/issues/5607">#5607</a>)</li>
<li><a href="b7901fade5"><code>b7901fa</code></a> chore(deps): update dependency minimatch to v9.0.4 (<a href="https://redirect.github.com/ionic-team/stencil/issues/5608">#5608</a>)</li>
<li><a href="211208cee1"><code>211208c</code></a> chore(deps): update dependency terser to v5.30.0 (<a href="https://redirect.github.com/ionic-team/stencil/issues/5609">#5609</a>)</li>
<li><a href="227d26546d"><code>227d265</code></a> chore(deps): update node.js to v20.12.0 (<a href="https://redirect.github.com/ionic-team/stencil/issues/5610">#5610</a>)</li>
<li><a href="b1722d0b9c"><code>b1722d0</code></a> chore(deps): update typescript-eslint to v7.4.0 (<a href="https://redirect.github.com/ionic-team/stencil/issues/5611">#5611</a>)</li>
<li><a href="871f1ba9a5"><code>871f1ba</code></a> test(wdio): make svg-attr test more robust (<a href="https://redirect.github.com/ionic-team/stencil/issues/5605">#5605</a>)</li>
<li><a href="f33c7bd2bb"><code>f33c7bd</code></a> chore(wdio): expand wdio-related readme content (<a href="https://redirect.github.com/ionic-team/stencil/issues/5603">#5603</a>)</li>
<li><a href="b62c28dbc2"><code>b62c28d</code></a> chore(spelling): add better markdown spellcheck (<a href="https://redirect.github.com/ionic-team/stencil/issues/5604">#5604</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/ionic-team/stencil/compare/v4.10.0...v4.14.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@stencil/core&package-manager=npm_and_yarn&previous-version=4.10.0&new-version=4.14.0)](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>
2024-04-04 08:05:58 +00:00
Stefan M
a3fb7e6abe [go] Added support for 1.22 and updated Go minor versions of 1.19, 1.20 and 1.21 (#11156)
Co-authored-by: Nathan Rajlich <n@n8.io>
Co-authored-by: Vedant <83997633+vedantmgoyal9@users.noreply.github.com>
2024-04-04 00:47:57 -07:00
Jeff See
b9f6d765c0 Move CONTRIBUTING into README and improve docs on running integration tests locally (#11373)
Co-authored-by: Sean Massa <EndangeredMassa@gmail.com>
2024-04-04 00:50:04 -05:00
Sean Massa
c24d85f574 disable eslint for a few files (#11378) 2024-04-04 00:09:36 -05:00
Vercel Release Bot
3c42649916 Version Packages (#11352)
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.11.0

### Minor Changes

- Add `getOsRelease()` and `getProvidedRuntime()` functions
([#11370](https://github.com/vercel/vercel/pull/11370))

## @vercel/go@3.1.0

### Minor Changes

- Use `provided.al2023` runtime when using AL2023 build image
([#11370](https://github.com/vercel/vercel/pull/11370))

## vercel@33.6.3

### Patch Changes

- Handle `--repo` linked in `vc deploy --prebuilt`
([#11309](https://github.com/vercel/vercel/pull/11309))

- Revert "[cli] extract `isZeroConfigBuild` into utility function
(#11316)" ([#11350](https://github.com/vercel/vercel/pull/11350))

- Replace `inquirer` with `@inquirer/prompts`
([#11321](https://github.com/vercel/vercel/pull/11321))

- Updated dependencies
\[[`73b112b1f`](73b112b1f7),
[`346e665bb`](346e665bb0),
[`73b112b1f`](73b112b1f7),
[`548afd371`](548afd371a)]:
    -   @vercel/go@3.1.0
    -   @vercel/node@3.0.26
    -   @vercel/build-utils@7.11.0
    -   @vercel/static-build@2.4.6

## @vercel/client@13.1.9

### Patch Changes

- Handle `--repo` linked in `vc deploy --prebuilt`
([#11309](https://github.com/vercel/vercel/pull/11309))

- Updated dependencies
\[[`73b112b1f`](73b112b1f7)]:
    -   @vercel/build-utils@7.11.0

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

### Patch Changes

- Updated dependencies
\[[`73b112b1f`](73b112b1f7)]:
    -   @vercel/build-utils@7.11.0

## @vercel/node@3.0.26

### Patch Changes

- Fix issue with serverless function on docker
([#11226](https://github.com/vercel/vercel/pull/11226))

- Add import and require ts-node files for TypeScript in `vc dev`
([#11371](https://github.com/vercel/vercel/pull/11371))

- Updated dependencies
\[[`73b112b1f`](73b112b1f7)]:
    -   @vercel/build-utils@7.11.0

## @vercel/static-build@2.4.6

### Patch Changes

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

## @vercel-internals/types@1.0.29

### Patch Changes

- Updated dependencies
\[[`73b112b1f`](73b112b1f7)]:
    -   @vercel/build-utils@7.11.0

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-04-03 09:35:02 -07:00
Trek Glowacki
c1891f64f4 [tests] add ionic React fixture to dependabot (#11172)
add ionic React fixture to dependabot
2024-04-03 09:59:24 -05:00
Erika Rowland
2fc46c0d47 [cli] Change condition to be clearer positive framing (#11317)
`status` here is guaranteed to either be `'linked'` or `'not_linked'` by this point in the code, switching the double negative to a positive condition makes it clearer.
2024-04-03 04:39:47 +00:00
Nathan Rajlich
73b112b1f7 [build-utils] Add getOsRelease() and getProvidedRuntime() functions (#11370)
Adds two new helper functions that custom runtimes can utilize in order
to determine whether they should use `provided.al2` or `provided.al2023`
Lambda "runtime" value, based on the build environment.

The new `getProvidedRuntime()` helper function is being used in
`@vercel/go`, so that Go endpoints may be used when the `20.x` Node
Version project setting is used.
2024-04-02 20:30:06 -07:00
Nathan Rajlich
548afd371a [node] Add import and require ts-node files for TypeScript in vc dev (#11371)
Fixes the case in `vc dev` where importing a `.ts` file from another `.ts` file was failing in `vc dev` when `type: "module"` is not set in `package.json`.

Supersedes https://github.com/vercel/vercel/pull/11364.
2024-04-03 02:14:15 +00:00
Austin Merrick
d0877c1023 [cli] Replace inquirer with @inquirer/prompts (#11321)
# Overview

Changing to `@inquirer/prompts` meant updating all existing usage of `inquirer.prompt`. This removed a lot of code since the `inquirer.prompt` function was extra verbose.

The user experience shouldn't have changed much besides different styling. `patch-inquirer` is incompatible with `@inquirer/prompts`. ~~We probably don't want to merge this until we have a new solution for styling.~~ The new default styling is preferred over our old styling.

There are lots of changes over many files, so I went back and organized the commit history. It will probably be easier to review this PR by commit.

## Tests

~~I had to change tests in ways that aren't great. Tests had a hard time recognizing output with escape codes in them, so I had to make the expected output more generic.~~ Using `strip-ansi` worked nicely to ignore styling changes in unit and integration tests.

I removed the unit test "should list projects running on an soon-to-be-deprecated Node.js version" because that test doing `jest.useFakeTimers().setSystemTime(new Date('2023-12-08'));` would make the "should remove a project" test fail. Really strange stuff! Couldn't think of a better solution than removing this, so looking for suggestions here.
2024-04-02 07:40:32 +00:00
Trek Glowacki
326fe0f0e6 [tests] Add Preact@10 to static build fixtures dependabot (#11306)
Add Preact@10 to static build fixtures dependabot
2024-04-01 09:31:22 -05:00
Devin345458
346e665bb0 Fix issue with serverless function on docker (#11226)
Currently the server was binding to the IPV6 [::] catchall on a random
port. The undici request is then unable to reach it.

I only have a mac so I was only able to test this change on Docker for
mac. Would love if someone on windows/linux could validate the change
works for them as well

---------

Co-authored-by: Sean Massa <EndangeredMassa@gmail.com>
2024-03-29 23:01:25 -05:00
Nathan Rajlich
9a27ccbe6d [cli][client] Handle --repo linked in vc deploy --prebuilt (#11309)
`vc deploy --prebuilt` has not properly worked for projects linked with
`vc link --repo` ever since
https://github.com/vercel/vercel/issues/11077.

To fix, don't mutate `cwd` to be the project subdir (so that `cwd` is
always the monorepo root), and instead pass in a new property to
`@vercel/client` that represents the `.vercel/output` file path. A lot
of the code is just passing this new variable through the multiple
layers of indirection in CLI before it finally reaches `@vercel/client.

Fixes https://github.com/vercel/vercel/issues/11097.
2024-03-29 17:23:24 -07:00
Erika Rowland
3b6d96891b Update CODEOWNERS (#11343) 2024-03-29 20:57:47 +00:00
Nathan Rajlich
07d8d11989 Revert "[cli] extract isZeroConfigBuild into utility function (#11316)" (#11350)
This reverts commit 78e2c012f9.

This commit causes a failing test which contains the `zeroConfig: true`
field. It should have not been merged in the first place due to the
failing test, but Kodiak erroneously merged it before the tests were
passing.

When there are `builds` configuration, the v10 create-deployment
endpoint is used instead of the latest v13 endpoint. `projectSettings`
is not allowed in the v10 endpoint, therefore we can not send the
`nodeVersion` when `builds` project exists. Instead, we should look into
moving away from the v10 endpoint so that we can be using the latest
version of the endpoint for all deployments.
2024-03-29 13:53:51 -07:00
Erika Rowland
8a16e8eb65 [cli] Add explicit vitest import to unit test for isZeroConfigBuild utility (#11341) 2024-03-28 13:32:46 -05:00
dependabot[bot]
63e9de8932 [framework-fixtures]: Bump the core group in /packages/static-build/test/fixtures/ionic-angular-v7 with 2 updates (#11289)
Bumps the core group in /packages/static-build/test/fixtures/ionic-angular-v7 with 2 updates: [@ionic/angular](https://github.com/ionic-team/ionic-framework) and [@ionic/core](https://github.com/ionic-team/ionic-framework).

Updates `@ionic/angular` from 7.6.2 to 7.8.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/ionic-team/ionic-framework/releases"><code>@​ionic/angular</code>'s releases</a>.</em></p>
<blockquote>
<h2>v7.8.0</h2>
<h1><a href="https://github.com/ionic-team/ionic-framework/compare/v7.7.5...v7.8.0">7.8.0</a> (2024-03-13)</h1>
<h3>Features</h3>
<ul>
<li><strong>datetime:</strong> formatOptions property for Datetime (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29065">#29065</a>) (<a href="7cdbc1b5ad">7cdbc1b</a>)</li>
<li><strong>searchbar:</strong> autocapitalize, dir, lang, maxlength, and minlength are inherited to native input (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29098">#29098</a>) (<a href="a0a77f799d">a0a77f7</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/27606">#27606</a></li>
</ul>
<h2>v7.7.5</h2>
<h2><a href="https://github.com/ionic-team/ionic-framework/compare/v7.7.4...v7.7.5">7.7.5</a> (2024-03-13)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>angular:</strong> add ionNavWillChange and ionNavDidChange types for nav (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29122">#29122</a>) (<a href="85b9d5c35f">85b9d5c</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29114">#29114</a></li>
<li><strong>checkbox:</strong> set aria-checked of indeterminate checkbox to 'mixed' (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29115">#29115</a>) (<a href="b2d636f14d">b2d636f</a>)</li>
<li><strong>overlay:</strong> do not hide overlay if toast is presented (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29140">#29140</a>) (<a href="c0f5e5ebc0">c0f5e5e</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29139">#29139</a></li>
</ul>
<h2>v7.7.4</h2>
<h2><a href="https://github.com/ionic-team/ionic-framework/compare/v7.7.3...v7.7.4">7.7.4</a> (2024-03-06)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>modal:</strong> ariaLabel and role are inherited when set via htmlAttributes (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29099">#29099</a>) (<a href="de13633a18">de13633</a>)</li>
</ul>
<h2>v7.7.3</h2>
<h2><a href="https://github.com/ionic-team/ionic-framework/compare/v7.7.2...v7.7.3">7.7.3</a> (2024-02-21)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>label:</strong> do not grow when in end slot (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29036">#29036</a>) (<a href="1fc4b76f59">1fc4b76</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29033">#29033</a></li>
<li><strong>overlays:</strong> focus is returned to last focus element when focusing toast (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/28950">#28950</a>) (<a href="2ed0ada923">2ed0ada</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/28261">#28261</a></li>
</ul>
<h2>v7.7.2</h2>
<h2><a href="https://github.com/ionic-team/ionic-framework/compare/v7.7.1...v7.7.2">7.7.2</a> (2024-02-14)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>overlays:</strong> do not return focus if application has already moved focus manually (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/28850">#28850</a>) (<a href="a016670a8a">a016670</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/28849">#28849</a></li>
<li><strong>overlays:</strong> ensure that only topmost overlay is announced by screen readers (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/28997">#28997</a>) (<a href="ba4ba6161c">ba4ba61</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/23472">#23472</a></li>
<li><strong>popover:</strong> render arrow above backdrop (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/28986">#28986</a>) (<a href="0a8964d30c">0a8964d</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/28985">#28985</a></li>
</ul>
<h2>v7.7.1</h2>
<h2><a href="https://github.com/ionic-team/ionic-framework/compare/v7.7.0...v7.7.1">7.7.1</a> (2024-02-07)</h2>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/ionic-team/ionic-framework/blob/main/CHANGELOG.md"><code>@​ionic/angular</code>'s changelog</a>.</em></p>
<blockquote>
<h1><a href="https://github.com/ionic-team/ionic-framework/compare/v7.7.5...v7.8.0">7.8.0</a> (2024-03-13)</h1>
<h3>Features</h3>
<ul>
<li><strong>datetime:</strong> formatOptions property for Datetime (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29065">#29065</a>) (<a href="7cdbc1b5ad">7cdbc1b</a>)</li>
<li><strong>searchbar:</strong> autocapitalize, dir, lang, maxlength, and minlength are inherited to native input (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29098">#29098</a>) (<a href="a0a77f799d">a0a77f7</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/27606">#27606</a></li>
</ul>
<h2><a href="https://github.com/ionic-team/ionic-framework/compare/v7.7.4...v7.7.5">7.7.5</a> (2024-03-13)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>angular:</strong> add ionNavWillChange and ionNavDidChange types for nav (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29122">#29122</a>) (<a href="85b9d5c35f">85b9d5c</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29114">#29114</a></li>
<li><strong>checkbox:</strong> set aria-checked of indeterminate checkbox to 'mixed' (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29115">#29115</a>) (<a href="b2d636f14d">b2d636f</a>)</li>
<li><strong>overlay:</strong> do not hide overlay if toast is presented (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29140">#29140</a>) (<a href="c0f5e5ebc0">c0f5e5e</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29139">#29139</a></li>
</ul>
<h2><a href="https://github.com/ionic-team/ionic-framework/compare/v7.7.3...v7.7.4">7.7.4</a> (2024-03-06)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>modal:</strong> ariaLabel and role are inherited when set via htmlAttributes (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29099">#29099</a>) (<a href="de13633a18">de13633</a>)</li>
</ul>
<h2><a href="https://github.com/ionic-team/ionic-framework/compare/v7.7.2...v7.7.3">7.7.3</a> (2024-02-21)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>label:</strong> do not grow when in end slot (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29036">#29036</a>) (<a href="1fc4b76f59">1fc4b76</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29033">#29033</a></li>
<li><strong>overlays:</strong> focus is returned to last focus element when focusing toast (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/28950">#28950</a>) (<a href="2ed0ada923">2ed0ada</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/28261">#28261</a></li>
</ul>
<h2><a href="https://github.com/ionic-team/ionic-framework/compare/v7.7.1...v7.7.2">7.7.2</a> (2024-02-14)</h2>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="400013d6cb"><code>400013d</code></a> v7.8.0</li>
<li><a href="6dfdc2c95f"><code>6dfdc2c</code></a> merge feature-7.8 (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29152">#29152</a>)</li>
<li><a href="01ae835ad5"><code>01ae835</code></a> chore: sync with main</li>
<li><a href="636531f5c2"><code>636531f</code></a> merge release-7.7.5 (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29151">#29151</a>)</li>
<li><a href="ddcda78ac9"><code>ddcda78</code></a> chore(): update package lock files</li>
<li><a href="82e90f28b4"><code>82e90f2</code></a> v7.7.5</li>
<li><a href="487ffca11e"><code>487ffca</code></a> chore: fix typo with close watcher const (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29146">#29146</a>)</li>
<li><a href="c0f5e5ebc0"><code>c0f5e5e</code></a> fix(overlay): do not hide overlay if toast is presented (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29140">#29140</a>)</li>
<li><a href="ac0142322a"><code>ac01423</code></a> chore: sync with main (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29142">#29142</a>)</li>
<li><a href="8f0ea0dd58"><code>8f0ea0d</code></a> chore: sync with main</li>
<li>Additional commits viewable in <a href="https://github.com/ionic-team/ionic-framework/compare/v7.6.2...v7.8.0">compare view</a></li>
</ul>
</details>
<br />

Updates `@ionic/core` from 7.6.2 to 7.8.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/ionic-team/ionic-framework/releases"><code>@​ionic/core</code>'s releases</a>.</em></p>
<blockquote>
<h2>v7.8.0</h2>
<h1><a href="https://github.com/ionic-team/ionic-framework/compare/v7.7.5...v7.8.0">7.8.0</a> (2024-03-13)</h1>
<h3>Features</h3>
<ul>
<li><strong>datetime:</strong> formatOptions property for Datetime (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29065">#29065</a>) (<a href="7cdbc1b5ad">7cdbc1b</a>)</li>
<li><strong>searchbar:</strong> autocapitalize, dir, lang, maxlength, and minlength are inherited to native input (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29098">#29098</a>) (<a href="a0a77f799d">a0a77f7</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/27606">#27606</a></li>
</ul>
<h2>v7.7.5</h2>
<h2><a href="https://github.com/ionic-team/ionic-framework/compare/v7.7.4...v7.7.5">7.7.5</a> (2024-03-13)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>angular:</strong> add ionNavWillChange and ionNavDidChange types for nav (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29122">#29122</a>) (<a href="85b9d5c35f">85b9d5c</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29114">#29114</a></li>
<li><strong>checkbox:</strong> set aria-checked of indeterminate checkbox to 'mixed' (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29115">#29115</a>) (<a href="b2d636f14d">b2d636f</a>)</li>
<li><strong>overlay:</strong> do not hide overlay if toast is presented (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29140">#29140</a>) (<a href="c0f5e5ebc0">c0f5e5e</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29139">#29139</a></li>
</ul>
<h2>v7.7.4</h2>
<h2><a href="https://github.com/ionic-team/ionic-framework/compare/v7.7.3...v7.7.4">7.7.4</a> (2024-03-06)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>modal:</strong> ariaLabel and role are inherited when set via htmlAttributes (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29099">#29099</a>) (<a href="de13633a18">de13633</a>)</li>
</ul>
<h2>v7.7.3</h2>
<h2><a href="https://github.com/ionic-team/ionic-framework/compare/v7.7.2...v7.7.3">7.7.3</a> (2024-02-21)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>label:</strong> do not grow when in end slot (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29036">#29036</a>) (<a href="1fc4b76f59">1fc4b76</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29033">#29033</a></li>
<li><strong>overlays:</strong> focus is returned to last focus element when focusing toast (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/28950">#28950</a>) (<a href="2ed0ada923">2ed0ada</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/28261">#28261</a></li>
</ul>
<h2>v7.7.2</h2>
<h2><a href="https://github.com/ionic-team/ionic-framework/compare/v7.7.1...v7.7.2">7.7.2</a> (2024-02-14)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>overlays:</strong> do not return focus if application has already moved focus manually (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/28850">#28850</a>) (<a href="a016670a8a">a016670</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/28849">#28849</a></li>
<li><strong>overlays:</strong> ensure that only topmost overlay is announced by screen readers (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/28997">#28997</a>) (<a href="ba4ba6161c">ba4ba61</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/23472">#23472</a></li>
<li><strong>popover:</strong> render arrow above backdrop (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/28986">#28986</a>) (<a href="0a8964d30c">0a8964d</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/28985">#28985</a></li>
</ul>
<h2>v7.7.1</h2>
<h2><a href="https://github.com/ionic-team/ionic-framework/compare/v7.7.0...v7.7.1">7.7.1</a> (2024-02-07)</h2>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/ionic-team/ionic-framework/blob/main/CHANGELOG.md"><code>@​ionic/core</code>'s changelog</a>.</em></p>
<blockquote>
<h1><a href="https://github.com/ionic-team/ionic-framework/compare/v7.7.5...v7.8.0">7.8.0</a> (2024-03-13)</h1>
<h3>Features</h3>
<ul>
<li><strong>datetime:</strong> formatOptions property for Datetime (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29065">#29065</a>) (<a href="7cdbc1b5ad">7cdbc1b</a>)</li>
<li><strong>searchbar:</strong> autocapitalize, dir, lang, maxlength, and minlength are inherited to native input (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29098">#29098</a>) (<a href="a0a77f799d">a0a77f7</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/27606">#27606</a></li>
</ul>
<h2><a href="https://github.com/ionic-team/ionic-framework/compare/v7.7.4...v7.7.5">7.7.5</a> (2024-03-13)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>angular:</strong> add ionNavWillChange and ionNavDidChange types for nav (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29122">#29122</a>) (<a href="85b9d5c35f">85b9d5c</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29114">#29114</a></li>
<li><strong>checkbox:</strong> set aria-checked of indeterminate checkbox to 'mixed' (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29115">#29115</a>) (<a href="b2d636f14d">b2d636f</a>)</li>
<li><strong>overlay:</strong> do not hide overlay if toast is presented (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29140">#29140</a>) (<a href="c0f5e5ebc0">c0f5e5e</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29139">#29139</a></li>
</ul>
<h2><a href="https://github.com/ionic-team/ionic-framework/compare/v7.7.3...v7.7.4">7.7.4</a> (2024-03-06)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>modal:</strong> ariaLabel and role are inherited when set via htmlAttributes (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29099">#29099</a>) (<a href="de13633a18">de13633</a>)</li>
</ul>
<h2><a href="https://github.com/ionic-team/ionic-framework/compare/v7.7.2...v7.7.3">7.7.3</a> (2024-02-21)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>label:</strong> do not grow when in end slot (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29036">#29036</a>) (<a href="1fc4b76f59">1fc4b76</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29033">#29033</a></li>
<li><strong>overlays:</strong> focus is returned to last focus element when focusing toast (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/28950">#28950</a>) (<a href="2ed0ada923">2ed0ada</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/28261">#28261</a></li>
</ul>
<h2><a href="https://github.com/ionic-team/ionic-framework/compare/v7.7.1...v7.7.2">7.7.2</a> (2024-02-14)</h2>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="400013d6cb"><code>400013d</code></a> v7.8.0</li>
<li><a href="6dfdc2c95f"><code>6dfdc2c</code></a> merge feature-7.8 (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29152">#29152</a>)</li>
<li><a href="01ae835ad5"><code>01ae835</code></a> chore: sync with main</li>
<li><a href="636531f5c2"><code>636531f</code></a> merge release-7.7.5 (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29151">#29151</a>)</li>
<li><a href="ddcda78ac9"><code>ddcda78</code></a> chore(): update package lock files</li>
<li><a href="82e90f28b4"><code>82e90f2</code></a> v7.7.5</li>
<li><a href="487ffca11e"><code>487ffca</code></a> chore: fix typo with close watcher const (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29146">#29146</a>)</li>
<li><a href="c0f5e5ebc0"><code>c0f5e5e</code></a> fix(overlay): do not hide overlay if toast is presented (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29140">#29140</a>)</li>
<li><a href="ac0142322a"><code>ac01423</code></a> chore: sync with main (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29142">#29142</a>)</li>
<li><a href="8f0ea0dd58"><code>8f0ea0d</code></a> chore: sync with main</li>
<li>Additional commits viewable in <a href="https://github.com/ionic-team/ionic-framework/compare/v7.6.2...v7.8.0">compare view</a></li>
</ul>
</details>
<br />


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>
2024-03-28 15:52:02 +00:00
Vercel Release Bot
c6d588201b Version Packages (#11322)
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.10.0

### Minor Changes

- Allow environment variables to be specified for `EdgeFunction`
([#11029](https://github.com/vercel/vercel/pull/11029))

## vercel@33.6.2

### Patch Changes

- Added sunset warning to secrets command.
([#11333](https://github.com/vercel/vercel/pull/11333))

- Swap jest for vitest in CLI unit tests
([#11302](https://github.com/vercel/vercel/pull/11302))

- Updated dependencies
\[[`988f7b75a`](988f7b75a2),
[`1825b58df`](1825b58df8)]:
    -   @vercel/remix-builder@2.1.5
    -   @vercel/build-utils@7.10.0
    -   @vercel/node@3.0.25
    -   @vercel/static-build@2.4.5

## @vercel/client@13.1.8

### Patch Changes

- Updated dependencies
\[[`1825b58df`](1825b58df8)]:
    -   @vercel/build-utils@7.10.0

## @vercel/frameworks@3.0.1

### Patch Changes

- Swap jest for vitest in CLI unit tests
([#11302](https://github.com/vercel/vercel/pull/11302))

## @vercel/fs-detectors@5.2.2

### Patch Changes

- Updated dependencies
\[[`9ed967034`](9ed967034d)]:
    -   @vercel/frameworks@3.0.1

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

### Patch Changes

- Updated dependencies
\[[`1825b58df`](1825b58df8)]:
    -   @vercel/build-utils@7.10.0

## @vercel/node@3.0.25

### Patch Changes

- Updated dependencies
\[[`1825b58df`](1825b58df8)]:
    -   @vercel/build-utils@7.10.0

## @vercel/remix-builder@2.1.5

### Patch Changes

- Add `mjs` and `mts` extensions to vite detection
([#11307](https://github.com/vercel/vercel/pull/11307))

## @vercel/static-build@2.4.5

### Patch Changes

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

## @vercel-internals/types@1.0.28

### Patch Changes

- Updated dependencies
\[[`1825b58df`](1825b58df8)]:
    -   @vercel/build-utils@7.10.0

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-28 08:43:15 -05:00
Ethan Arrowood
0b1ff4bf62 [next] add x-forwarded-port test (#11254)
This test reproduces the issue described in https://github.com/vercel/next.js/issues/61133 . Unfortunately, I can only reproduce this issue when deploying to Vercel. Any local server / test results in the header being defined. 

Related: https://github.com/vercel/next.js/issues/61133
2024-03-28 08:20:18 +00:00
dependabot[bot]
14102ddf56 [framework-fixtures]: Bump the core group in /packages/static-build/test/fixtures/astro-v4 with 1 update (#11335)
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.2.0 to 4.5.10
<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.5.10</h2>
<h3>Patch Changes</h3>
<ul>
<li>
<p><a href="https://redirect.github.com/withastro/astro/pull/10549">#10549</a> <a href="54c2f9707f"><code>54c2f9707f5d038630143f769e3075c698474654</code></a> Thanks <a href="https://github.com/admirsaheta"><code>@​admirsaheta</code></a>! - Updates the <code>HTMLAttributes</code> type exported from <code>astro</code> to allow data attributes</p>
</li>
<li>
<p><a href="https://redirect.github.com/withastro/astro/pull/10562">#10562</a> <a href="348c1ca132"><code>348c1ca1323d0516c2dcf8e963343cd12cb5407f</code></a> Thanks <a href="https://github.com/apetta"><code>@​apetta</code></a>! - Fixes minor type issues inside the built-in components of Astro</p>
</li>
<li>
<p><a href="https://redirect.github.com/withastro/astro/pull/10550">#10550</a> <a href="34fa8e131b"><code>34fa8e131b85531e6629390307108ffc4adb7ed1</code></a> Thanks <a href="https://github.com/Skn0tt"><code>@​Skn0tt</code></a>! - Fixes bug where server builds would include unneeded assets in SSR Function, potentially leading to upload errors on Vercel, Netlify because of size limits</p>
</li>
<li>
<p>Updated dependencies [<a href="c585528f44"><code>c585528f446ccca3d4c643f4af5d550b93c18902</code></a>]:</p>
<ul>
<li><code>@​astrojs/markdown-remark</code><a href="https://github.com/4"><code>@​4</code></a>.3.2</li>
</ul>
</li>
</ul>
<h2>astro@4.5.9</h2>
<h3>Patch Changes</h3>
<ul>
<li>
<p><a href="https://redirect.github.com/withastro/astro/pull/10532">#10532</a> <a href="8306ce1ff7"><code>8306ce1ff7b71a2a0d7908336c9be462a54d395a</code></a> Thanks <a href="https://github.com/martrapp"><code>@​martrapp</code></a>! - Fixes a style issue of <code>client:only</code> components in DEV mode during view transitions.</p>
</li>
<li>
<p><a href="https://redirect.github.com/withastro/astro/pull/10473">#10473</a> <a href="627e47d67a"><code>627e47d67af4846cea2acf26a96b4124001b26fc</code></a> Thanks <a href="https://github.com/bluwy"><code>@​bluwy</code></a>! - Fixes and improves performance when rendering Astro JSX</p>
</li>
</ul>
<h2>astro@4.5.8</h2>
<h3>Patch Changes</h3>
<ul>
<li>
<p><a href="https://redirect.github.com/withastro/astro/pull/10504">#10504</a> <a href="8e4e554cc2"><code>8e4e554cc211e59c329c0a5d110c839c886ff120</code></a> Thanks <a href="https://github.com/Princesseuh"><code>@​Princesseuh</code></a>! - Update Babel version to fix regression in Babel's <code>7.24.2</code>.</p>
</li>
<li>
<p>Updated dependencies [<a href="19e42c3681"><code>19e42c368184013fc30d1e46753b9e9383bb2bdf</code></a>]:</p>
<ul>
<li><code>@​astrojs/markdown-remark</code><a href="https://github.com/4"><code>@​4</code></a>.3.1</li>
</ul>
</li>
</ul>
<h2>astro@4.5.7</h2>
<h3>Patch Changes</h3>
<ul>
<li><a href="https://redirect.github.com/withastro/astro/pull/10493">#10493</a> <a href="e4a6462751"><code>e4a6462751725878bfe47632eeafa6854cad5bf2</code></a> Thanks <a href="https://github.com/firefoxic"><code>@​firefoxic</code></a>! - <code>&lt;link&gt;</code> tags created by astro for optimized stylesheets now do not include the closing forward slash. This slash is optional for void elements such as link, but made some html validation fail.</li>
</ul>
<h2>astro@4.5.6</h2>
<h3>Patch Changes</h3>
<ul>
<li>
<p><a href="https://redirect.github.com/withastro/astro/pull/10455">#10455</a> <a href="c12666166d"><code>c12666166db724915e42e37a048483c99f88e6d9</code></a> Thanks <a href="https://github.com/lilnasy"><code>@​lilnasy</code></a>! - Adds a helpful error message that will be shown when an endpoint does not return a <code>Response</code>.</p>
</li>
<li>
<p><a href="https://redirect.github.com/withastro/astro/pull/10426">#10426</a> <a href="6a9a35ee15"><code>6a9a35ee15069541c3144012385366a3c689240a</code></a> Thanks <a href="https://github.com/markgaze"><code>@​markgaze</code></a>! - Fixes an issue with generating JSON schemas when the schema is a function</p>
</li>
<li>
<p><a href="https://redirect.github.com/withastro/astro/pull/10448">#10448</a> <a href="fcece36586"><code>fcece3658697248ab58f77b3d4a8b14d362f3c47</code></a> Thanks <a href="https://github.com/lilnasy"><code>@​lilnasy</code></a>! - Fixes an issue where multiple rendering errors resulted in a crash of the SSR app server.</p>
</li>
</ul>
<h2>astro@4.5.5</h2>
<h3>Patch Changes</h3>
<ul>
<li>
<p><a href="https://redirect.github.com/withastro/astro/pull/10379">#10379</a> <a href="3776ecf0aa"><code>3776ecf0aa9e08a992d3ae76e90682fd04093721</code></a> Thanks <a href="https://github.com/1574242600"><code>@​1574242600</code></a>! - Fixes a routing issue with partially truncated dynamic segments.</p>
</li>
<li>
<p><a href="https://redirect.github.com/withastro/astro/pull/10442">#10442</a> <a href="f8e0ad3c52"><code>f8e0ad3c52a37b8a2175fe2f5ff2bd0cd738f499</code></a> Thanks <a href="https://github.com/Princesseuh"><code>@​Princesseuh</code></a>! - Fixes small rendering issues with the dev toolbar in certain contexts</p>
</li>
<li>
<p><a href="https://redirect.github.com/withastro/astro/pull/10438">#10438</a> <a href="5b48cc0fc8"><code>5b48cc0fc8383b0659a595afd3a6ee28b28779c3</code></a> Thanks <a href="https://github.com/bholmesdev"><code>@​bholmesdev</code></a>! - Generate Astro DB types when running <code>astro sync</code>.</p>
</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.5.10</h2>
<h3>Patch Changes</h3>
<ul>
<li>
<p><a href="https://redirect.github.com/withastro/astro/pull/10549">#10549</a> <a href="54c2f9707f"><code>54c2f9707f5d038630143f769e3075c698474654</code></a> Thanks <a href="https://github.com/admirsaheta"><code>@​admirsaheta</code></a>! - Updates the <code>HTMLAttributes</code> type exported from <code>astro</code> to allow data attributes</p>
</li>
<li>
<p><a href="https://redirect.github.com/withastro/astro/pull/10562">#10562</a> <a href="348c1ca132"><code>348c1ca1323d0516c2dcf8e963343cd12cb5407f</code></a> Thanks <a href="https://github.com/apetta"><code>@​apetta</code></a>! - Fixes minor type issues inside the built-in components of Astro</p>
</li>
<li>
<p><a href="https://redirect.github.com/withastro/astro/pull/10550">#10550</a> <a href="34fa8e131b"><code>34fa8e131b85531e6629390307108ffc4adb7ed1</code></a> Thanks <a href="https://github.com/Skn0tt"><code>@​Skn0tt</code></a>! - Fixes bug where server builds would include unneeded assets in SSR Function, potentially leading to upload errors on Vercel, Netlify because of size limits</p>
</li>
<li>
<p>Updated dependencies [<a href="c585528f44"><code>c585528f446ccca3d4c643f4af5d550b93c18902</code></a>]:</p>
<ul>
<li><code>@​astrojs/markdown-remark</code><a href="https://github.com/4"><code>@​4</code></a>.3.2</li>
</ul>
</li>
</ul>
<h2>4.5.9</h2>
<h3>Patch Changes</h3>
<ul>
<li>
<p><a href="https://redirect.github.com/withastro/astro/pull/10532">#10532</a> <a href="8306ce1ff7"><code>8306ce1ff7b71a2a0d7908336c9be462a54d395a</code></a> Thanks <a href="https://github.com/martrapp"><code>@​martrapp</code></a>! - Fixes a style issue of <code>client:only</code> components in DEV mode during view transitions.</p>
</li>
<li>
<p><a href="https://redirect.github.com/withastro/astro/pull/10473">#10473</a> <a href="627e47d67a"><code>627e47d67af4846cea2acf26a96b4124001b26fc</code></a> Thanks <a href="https://github.com/bluwy"><code>@​bluwy</code></a>! - Fixes and improves performance when rendering Astro JSX</p>
</li>
</ul>
<h2>4.5.8</h2>
<h3>Patch Changes</h3>
<ul>
<li>
<p><a href="https://redirect.github.com/withastro/astro/pull/10504">#10504</a> <a href="8e4e554cc2"><code>8e4e554cc211e59c329c0a5d110c839c886ff120</code></a> Thanks <a href="https://github.com/Princesseuh"><code>@​Princesseuh</code></a>! - Update Babel version to fix regression in Babel's <code>7.24.2</code>.</p>
</li>
<li>
<p>Updated dependencies [<a href="19e42c3681"><code>19e42c368184013fc30d1e46753b9e9383bb2bdf</code></a>]:</p>
<ul>
<li><code>@​astrojs/markdown-remark</code><a href="https://github.com/4"><code>@​4</code></a>.3.1</li>
</ul>
</li>
</ul>
<h2>4.5.7</h2>
<h3>Patch Changes</h3>
<ul>
<li><a href="https://redirect.github.com/withastro/astro/pull/10493">#10493</a> <a href="e4a6462751"><code>e4a6462751725878bfe47632eeafa6854cad5bf2</code></a> Thanks <a href="https://github.com/firefoxic"><code>@​firefoxic</code></a>! - <code>&lt;link&gt;</code> tags created by astro for optimized stylesheets now do not include the closing forward slash. This slash is optional for void elements such as link, but made some html validation fail.</li>
</ul>
<h2>4.5.6</h2>
<h3>Patch Changes</h3>
<ul>
<li>
<p><a href="https://redirect.github.com/withastro/astro/pull/10455">#10455</a> <a href="c12666166d"><code>c12666166db724915e42e37a048483c99f88e6d9</code></a> Thanks <a href="https://github.com/lilnasy"><code>@​lilnasy</code></a>! - Adds a helpful error message that will be shown when an endpoint does not return a <code>Response</code>.</p>
</li>
<li>
<p><a href="https://redirect.github.com/withastro/astro/pull/10426">#10426</a> <a href="6a9a35ee15"><code>6a9a35ee15069541c3144012385366a3c689240a</code></a> Thanks <a href="https://github.com/markgaze"><code>@​markgaze</code></a>! - Fixes an issue with generating JSON schemas when the schema is a function</p>
</li>
<li>
<p><a href="https://redirect.github.com/withastro/astro/pull/10448">#10448</a> <a href="fcece36586"><code>fcece3658697248ab58f77b3d4a8b14d362f3c47</code></a> Thanks <a href="https://github.com/lilnasy"><code>@​lilnasy</code></a>! - Fixes an issue where multiple rendering errors resulted in a crash of the SSR app server.</p>
</li>
</ul>
<h2>4.5.5</h2>
<h3>Patch Changes</h3>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="bb7707e171"><code>bb7707e</code></a> [ci] release (<a href="https://github.com/withastro/astro/tree/HEAD/packages/astro/issues/10556">#10556</a>)</li>
<li><a href="348c1ca132"><code>348c1ca</code></a> Patch for Astro VS Code Plugin type errors (<a href="https://github.com/withastro/astro/tree/HEAD/packages/astro/issues/10562">#10562</a>)</li>
<li><a href="51a4ea5f72"><code>51a4ea5</code></a> fix(types): Fixes HTMLAttribute extend to allow everything (<a href="https://github.com/withastro/astro/tree/HEAD/packages/astro/issues/10561">#10561</a>)</li>
<li><a href="34fa8e131b"><code>34fa8e1</code></a> fix: ensure outDir doesn't lead to bundlers bloating Lambda size (<a href="https://github.com/withastro/astro/tree/HEAD/packages/astro/issues/10550">#10550</a>)</li>
<li><a href="54c2f9707f"><code>54c2f97</code></a> Fix: Type error on <code>\&lt;Image /&gt;</code> component when strict TypeScript rules are use...</li>
<li><a href="1cd2a74022"><code>1cd2a74</code></a> [ci] release (<a href="https://github.com/withastro/astro/tree/HEAD/packages/astro/issues/10522">#10522</a>)</li>
<li><a href="8306ce1ff7"><code>8306ce1</code></a> Fixes a style issue of <code>client:only</code> components in DEV mode during view trans...</li>
<li><a href="8cac744746"><code>8cac744</code></a> Avoid generators in render head API (<a href="https://github.com/withastro/astro/tree/HEAD/packages/astro/issues/10528">#10528</a>)</li>
<li><a href="ca5455af3d"><code>ca5455a</code></a> Avoid generators when crawling module graph (<a href="https://github.com/withastro/astro/tree/HEAD/packages/astro/issues/10529">#10529</a>)</li>
<li><a href="627e47d67a"><code>627e47d</code></a> Improve Astro JSX rendering (<a href="https://github.com/withastro/astro/tree/HEAD/packages/astro/issues/10473">#10473</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/withastro/astro/commits/astro@4.5.10/packages/astro">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=astro&package-manager=npm_and_yarn&previous-version=4.2.0&new-version=4.5.10)](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>
2024-03-28 08:17:04 +00:00
Marc Greenstock
49f88975b9 IAM 1720 Added sunset warning to the secrets command (#11333)
This PR adds a warning to the secrets command that the command will be sunset on 1st May.
2024-03-28 08:13:50 +00:00
Vercel Release Bot
13f3db06a8 [tests] Upgrade Turbo to version 1.13.0 (#11325)
This auto-generated PR updates Turbo to version 1.13.0
2024-03-28 08:10:25 +00:00
Erika Rowland
78e2c012f9 [cli] extract isZeroConfigBuild into utility function (#11316)
An additional check was added to make sure that `projectSettings.nodeVersion` is sent when builds property is defined in `vercel.json`
2024-03-28 08:06:10 +00:00
kaifulee
f707f13821 chore: remove repetitive words (#11284) 2024-03-28 08:03:01 +00:00
Jeff See
9ed967034d [cli] Switch unit tests from jest to vitest (#11302) 2024-03-27 17:33:27 -07:00
Nathan Rajlich
1825b58df8 [build-utils] Allow environment variables to be specified for EdgeFunction (#11029) 2024-03-27 21:36:29 +00:00
Nathan Rajlich
c82a55c460 [tests] Use AL2 build container for relevant e2e tests (#11329)
* Forces the AL2 build container image for fixtures that depend on it,
via `engines.node` in package.json for most cases.
* The `testDeployment()` function was updated to send
`projectSettings.nodeVersion` in the POST body, to mimic the behavior in
CLI.
* For Go, Ruby, and Python tests, the `projectSettings.nodeVersion`
property is set "globally" in the Jest setup file, so that individual
fixtures didn't need to be adjusted.
2024-03-27 12:19:30 -07:00
308 changed files with 16982 additions and 7168 deletions

View File

@@ -1,2 +0,0 @@
---
---

View File

@@ -1,2 +0,0 @@
---
---

View File

@@ -1,2 +0,0 @@
---
---

View File

@@ -1,3 +0,0 @@
---
---

View File

@@ -1,5 +0,0 @@
---
"@vercel/remix-builder": patch
---
Add `mjs` and `mts` extensions to vite detection

View File

@@ -1,2 +0,0 @@
---
---

View File

@@ -1,4 +0,0 @@
---
---
Update CODEOWNERS

View File

@@ -1,2 +0,0 @@
---
---

22
.github/CODEOWNERS vendored
View File

@@ -2,17 +2,17 @@
# https://help.github.com/en/articles/about-code-owners
# Restricted Paths
* @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55
/.github/workflows @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @ijjk
/packages/fs-detectors @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @agadzik @chloetedder
/packages/next @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @timneutkens @ijjk @ztanner @huozhi @Ethan-Arrowood @styfle
/packages/routing-utils @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @ijjk
/packages/static-build @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55
/packages/edge @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @vercel/compute
/examples @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @leerob
/examples/create-react-app @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @Timer
/examples/nextjs @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @timneutkens @ijjk @ztanner @huozhi @Ethan-Arrowood @styfle
/packages/node @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @Kikobeats
* @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @erikareads
/.github/workflows @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @erikareads @ijjk
/packages/fs-detectors @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @erikareads @agadzik @chloetedder
/packages/next @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @erikareads @timneutkens @ijjk @ztanner @huozhi @Ethan-Arrowood @styfle
/packages/routing-utils @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @erikareads @ijjk
/packages/static-build @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @erikareads
/packages/edge @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @erikareads @vercel/compute
/examples @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @erikareads @leerob
/examples/create-react-app @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @erikareads @Timer
/examples/nextjs @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @erikareads @timneutkens @ijjk @ztanner @huozhi @Ethan-Arrowood @styfle
/packages/node @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @erikareads @Kikobeats
# Unrestricted Paths
.changeset/

View File

@@ -1,108 +1,3 @@
# Contributing
## Contributing
When contributing to this repository, please first discuss the change you wish to make via [GitHub Discussions](https://github.com/vercel/vercel/discussions/new) with the owners of this repository before submitting a Pull Request.
Please read our [Code of Conduct](CODE_OF_CONDUCT.md) and follow it in all your interactions with the project.
## Local development
This project is configured in a monorepo, where one repository contains multiple npm packages. Dependencies are installed and managed with `pnpm`, not `npm` CLI.
To get started, execute the following:
```
git clone https://github.com/vercel/vercel
cd vercel
corepack enable
pnpm install
pnpm build
pnpm lint
pnpm test-unit
```
Make sure all the tests pass before making changes.
### Running Vercel CLI Changes
You can use `pnpm dev` from the `cli` package to invoke Vercel CLI with local changes:
```
cd ./packages/cli
pnpm dev <cli-commands...>
```
See [CLI Local Development](../packages/cli#local-development) for more details.
## Verifying your change
Once you are done with your changes (we even suggest doing it along the way), make sure all the tests still pass by running:
```
pnpm test-unit
```
from the root of the project.
If any test fails, make sure to fix it along with your changes. See [Interpreting test errors](#Interpreting-test-errors) for more information about how the tests are executed, especially the integration tests.
## Pull Request Process
Once you are confident that your changes work properly, open a pull request on the main repository.
The pull request will be reviewed by the maintainers and the tests will be checked by our continuous integration platform.
## Interpreting test errors
There are 2 kinds of tests in this repository Unit tests and Integration tests.
Unit tests are run locally with `jest` and execute quickly because they are testing the smallest units of code.
### Integration tests
Integration tests create deployments to your Vercel account using the `test` project name. After each test is deployed, the `probes` key is used to check if the response is the expected value. If the value doesn't match, you'll see a message explaining the difference. If the deployment failed to build, you'll see a more generic message like the following:
```
[Error: Fetched page https://test-8ashcdlew.vercel.app/root.js does not contain hello Root!. Instead it contains An error occurred with this application.
NO_STATUS_CODE_FRO Response headers:
cache-control=s-maxage=0
connection=close
content-type=text/plain; charset=utf-8
date=Wed, 19 Jun 2019 18:01:37 GMT
server=now
strict-transport-security=max-age=63072000
transfer-encoding=chunked
x-now-id=iad1:hgtzj-1560967297876-44ae12559f95
x-now-trace=iad1]
```
In such cases, you can visit the URL of the failed deployment and append `/_logs` to see the build error. In the case above, that would be https://test-8ashcdlew.vercel.app/_logs
The logs of this deployment will contain the actual error which may help you to understand what went wrong.
### @vercel/nft
Some of the Builders use `@vercel/nft` to tree-shake files before deployment. If you suspect an error with this tree-shaking mechanism, you can create the following script in your project:
```js
const { nodeFileTrace } = require('@vercel/nft');
nodeFileTrace(['path/to/entrypoint.js'], {
ts: true,
mixedModules: true,
})
.then(o => console.log(o.fileList))
.then(e => console.error(e));
```
When you run this script, you'll see all the imported files. If anything file is missing, the bug is in [@vercel/nft](https://github.com/vercel/nft) and not the Builder.
## Deploy a Builder with existing project
Sometimes you want to test changes to a Builder against an existing project, maybe with `vercel dev` or actual deployment. You can avoid publishing every Builder change to npm by uploading the Builder as a tarball.
1. Change directory to the desired Builder `cd ./packages/node`
2. Run `pnpm build` to compile typescript and other build steps
3. Run `npm pack` to create a tarball file
4. Run `vercel *.tgz` to upload the tarball file and get a URL
5. Edit any existing `vercel.json` project and replace `use` with the URL
6. Run `vercel` or `vercel dev` to deploy with the experimental Builder
See the [Contributing Guidelines](../README.md#contributing) for more details.

View File

@@ -90,8 +90,15 @@ updates:
prefix: '[framework-fixtures]'
package-ecosystem: 'npm'
allow:
- dependency-name: '@angular*'
- dependency-name: '@ionic*'
- dependency-name: '@angular*'
ignore:
- dependency-name: '@ionic*'
update-types:
['version-update:semver-major', 'version-update:semver-patch']
- dependency-name: '@angular*'
update-types:
['version-update:semver-major', 'version-update:semver-patch']
groups:
core:
patterns:
@@ -100,6 +107,35 @@ updates:
update-types:
- 'minor'
- directory: /packages/static-build/test/fixtures/ionic-react-v7
schedule:
interval: 'daily'
open-pull-requests-limit: 1
reviewers:
- 'trek'
- 'TooTallNate'
- 'EndangeredMassa'
commit-message:
prefix: '[framework-fixtures]'
package-ecosystem: 'npm'
allow:
- dependency-name: '@ionic*'
- dependency-name: 'react*'
ignore:
- dependency-name: '@ionic*'
update-types:
['version-update:semver-major', 'version-update:semver-patch']
- dependency-name: 'react*'
update-types:
['version-update:semver-major', 'version-update:semver-patch']
groups:
core:
patterns:
- '@ionic*'
- 'react*'
update-types:
- 'minor'
- directory: /packages/static-build/test/fixtures/nuxt-v3
schedule:
interval: 'daily'
@@ -139,6 +175,30 @@ updates:
update-types:
- 'minor'
- directory: /packages/static-build/test/fixtures/preact-v10
schedule:
interval: 'daily'
open-pull-requests-limit: 1
reviewers:
- 'trek'
- 'TooTallNate'
- 'EndangeredMassa'
commit-message:
prefix: '[framework-fixtures]'
package-ecosystem: 'npm'
allow:
- dependency-name: 'preact*'
ignore:
- dependency-name: 'preact*'
update-types:
['version-update:semver-major', 'version-update:semver-patch']
groups:
core:
patterns:
- 'preact*'
update-types:
- 'minor'
- directory: /packages/static-build/test/fixtures/stencil-v4
schedule:
interval: 'daily'

View File

@@ -79,16 +79,13 @@ jobs:
run: npm i -g pnpm@8.3.1
- run: pnpm install
- name: fetch ssl certificate before build (linux, os x)
if: matrix.runner != 'windows-latest'
run: echo | openssl s_client -showcerts -servername 'api.vercel.com' -connect 76.76.21.21:443
- name: Build ${{matrix.packageName}} and all its dependencies
run: node utils/gen.js && node_modules/.bin/turbo run build --cache-dir=".turbo" --log-order=stream --scope=${{matrix.packageName}} --include-dependencies --no-deps
env:
FORCE_COLOR: '1'
- name: Test ${{matrix.packageName}}
run: node utils/gen.js && node_modules/.bin/turbo run test --summarize --cache-dir=".turbo" --log-order=stream --scope=${{matrix.packageName}} --no-deps -- ${{ join(matrix.testPaths, ' ') }}
run: node utils/gen.js && node_modules/.bin/turbo run ${{matrix.testScript}} --summarize --cache-dir=".turbo" --log-order=stream --scope=${{matrix.packageName}} --no-deps -- ${{ join(matrix.testPaths, ' ') }}
shell: bash
env:
JEST_JUNIT_OUTPUT_FILE: ${{github.workspace}}/.junit-reports/${{matrix.scriptName}}-${{matrix.packageName}}-${{matrix.chunkNumber}}-${{ matrix.runner }}.xml
@@ -104,9 +101,6 @@ jobs:
TURBO_MISS_COUNT=`node utils/determine-turbo-hit-or-miss.js`
echo "MISS COUNT: $TURBO_MISS_COUNT"
echo "misses=$TURBO_MISS_COUNT" >> $GITHUB_OUTPUT
- name: fetch ssl certificate after tests (linux, os x)
if: matrix.runner != 'windows-latest'
run: echo | openssl s_client -showcerts -servername 'api.vercel.com' -connect 76.76.21.21:443
- name: 'Upload Test Report to Datadog'
if: ${{ steps['turbo-summary'].outputs.misses != '0' && !cancelled() }}
run: 'npx @datadog/datadog-ci@2.18.1 junit upload --service vercel-cli .junit-reports'

129
README.md
View File

@@ -35,7 +35,134 @@ This project uses [pnpm](https://pnpm.io/) to install dependencies and run scrip
You can use the `dev` script to run local changes as if you were invoking Vercel CLI. For example, `vercel deploy --cwd=/path/to/project` could be run with local changes with `pnpm dev deploy --cwd=/path/to/project`.
See the [Contributing Guidelines](./.github/CONTRIBUTING.md) for more details.
When contributing to this repository, please first discuss the change you wish to make via [GitHub Discussions](https://github.com/vercel/vercel/discussions/new) with the owners of this repository before submitting a Pull Request.
Please read our [Code of Conduct](CODE_OF_CONDUCT.md) and follow it in all your interactions with the project.
### Local development
This project is configured in a monorepo, where one repository contains multiple npm packages. Dependencies are installed and managed with `pnpm`, not `npm` CLI.
To get started, execute the following:
```
git clone https://github.com/vercel/vercel
cd vercel
corepack enable
pnpm install
pnpm build
pnpm lint
pnpm test-unit
```
Make sure all the tests pass before making changes.
#### Running Vercel CLI Changes
You can use `pnpm dev` from the `cli` package to invoke Vercel CLI with local changes:
```
cd ./packages/cli
pnpm dev <cli-commands...>
```
See [CLI Local Development](../packages/cli#local-development) for more details.
### Verifying your change
Once you are done with your changes (we even suggest doing it along the way), make sure all the tests still pass by running:
```
pnpm test-unit
```
from the root of the project.
If any test fails, make sure to fix it along with your changes. See [Interpreting test errors](#Interpreting-test-errors) for more information about how the tests are executed, especially the integration tests.
### Pull Request Process
Once you are confident that your changes work properly, open a pull request on the main repository.
The pull request will be reviewed by the maintainers and the tests will be checked by our continuous integration platform.
### Interpreting test errors
There are 2 kinds of tests in this repository Unit tests and Integration tests.
Unit tests are run locally with `jest` and execute quickly because they are testing the smallest units of code.
#### Integration tests
Integration tests create deployments to your Vercel account using the `test` project name. After each test is deployed, the `probes` key is used to check if the response is the expected value. If the value doesn't match, you'll see a message explaining the difference. If the deployment failed to build, you'll see a more generic message like the following:
```
[Error: Fetched page https://test-8ashcdlew.vercel.app/root.js does not contain hello Root!. Instead it contains An error occurred with this application.
NO_STATUS_CODE_FRO Response headers:
cache-control=s-maxage=0
connection=close
content-type=text/plain; charset=utf-8
date=Wed, 19 Jun 2019 18:01:37 GMT
server=now
strict-transport-security=max-age=63072000
transfer-encoding=chunked
x-now-id=iad1:hgtzj-1560967297876-44ae12559f95
x-now-trace=iad1]
```
In such cases, you can visit the URL of the failed deployment and append `/_logs` to see the build error. In the case above, that would be https://test-8ashcdlew.vercel.app/_logs
The logs of this deployment will contain the actual error which may help you to understand what went wrong.
##### Running integration tests locally
While running the full integration suite locally is not recommended, it's sometimes useful to isolate a failing test by running it on your machine. To do so, you'll need to ensure you have the appropriate credentials sourced in your shell:
1. Create an access token. Follow the insructions here https://vercel.com/docs/rest-api#creating-an-access-token. Ensure the token scope is for your personal
account.
2. Grab the team ID from the Vercel dashboard at `https://vercel.com/<MY-TEAM>/~/settings`.
3. Source these into your shell rc file: `echo 'export VERCEL_TOKEN=<MY-TOKEN> VERCEL_TEAM_ID=<MY-TEAM-ID>' >> ~/.zshrc`
From there, you should be able to trigger an integration test. Choose one
that's already isolated to check that things work:
```
cd packages/next
```
Run the test:
```
pnpm test test/fixtures/00-server-build/index.test.js
```
#### @vercel/nft
Some of the Builders use `@vercel/nft` to tree-shake files before deployment. If you suspect an error with this tree-shaking mechanism, you can create the following script in your project:
```js
const { nodeFileTrace } = require('@vercel/nft');
nodeFileTrace(['path/to/entrypoint.js'], {
ts: true,
mixedModules: true,
})
.then(o => console.log(o.fileList))
.then(e => console.error(e));
```
When you run this script, you'll see all the imported files. If anything file is missing, the bug is in [@vercel/nft](https://github.com/vercel/nft) and not the Builder.
### Deploy a Builder with existing project
Sometimes you want to test changes to a Builder against an existing project, maybe with `vercel dev` or actual deployment. You can avoid publishing every Builder change to npm by uploading the Builder as a tarball.
1. Change directory to the desired Builder `cd ./packages/node`
2. Run `pnpm build` to compile typescript and other build steps
3. Run `npm pack` to create a tarball file
4. Run `vercel *.tgz` to upload the tarball file and get a URL
5. Edit any existing `vercel.json` project and replace `use` with the URL
6. Run `vercel` or `vercel dev` to deploy with the experimental Builder
## Reference

View File

@@ -50,4 +50,4 @@ Ensure any segments used in the `destination` property are also used in the `sou
- [path-to-regexp](https://github.com/pillarjs/path-to-regexp/tree/v6.1.0)
- [named parameters](https://github.com/pillarjs/path-to-regexp/blob/v6.1.0/Readme.md#named-parameters)
- [un-named paramters](https://github.com/pillarjs/path-to-regexp/blob/v6.1.0/Readme.md#unnamed-parameters)
- [un-named parameters](https://github.com/pillarjs/path-to-regexp/blob/v6.1.0/Readme.md#unnamed-parameters)

View File

@@ -4,7 +4,7 @@ import { lstatSync, readdirSync } from 'fs';
export async function deployExample(filename: string) {
const { testDeployment } = require('../../test/lib/deployment/test-deployment.js');
const example = basename(filename).replace(/\.test\.ts$/, '');
await testDeployment(join(filename, '..', '..', '..', example));
await testDeployment(join(process.cwd(), example));
}
export function getExamples() {

View File

@@ -8,6 +8,6 @@ menu:
main: {}
---
This is an example of a custom shortcode that you can put right into your content. You will need to add a form action to the the shortcode to make it work. Check out [Formspree](https://formspree.io/) for a simple, free form service.
This is an example of a custom shortcode that you can put right into your content. You will need to add a form action to the shortcode to make it work. Check out [Formspree](https://formspree.io/) for a simple, free form service.
{{< form-contact action="https://example.com" >}}

View File

@@ -9,7 +9,8 @@
},
"devDependencies": {
"@types/jest": "27.4.1",
"@vercel/frameworks": "3.0.0"
"@vercel/build-utils": "7.11.0",
"@vercel/frameworks": "3.0.1"
},
"version": null
}

View File

@@ -1,5 +1,19 @@
# @vercel-internals/types
## 1.0.29
### Patch Changes
- Updated dependencies [[`73b112b1f`](https://github.com/vercel/vercel/commit/73b112b1f74480e1bb941e1b754105fc7dace401)]:
- @vercel/build-utils@7.11.0
## 1.0.28
### Patch Changes
- Updated dependencies [[`1825b58df`](https://github.com/vercel/vercel/commit/1825b58df8d783e79f0addf262618f422246f4b3)]:
- @vercel/build-utils@7.10.0
## 1.0.27
### Patch Changes

View File

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

View File

@@ -33,7 +33,7 @@
"source-map-support": "0.5.12",
"ts-eager": "2.0.2",
"ts-jest": "29.1.0",
"turbo": "1.12.5",
"turbo": "1.13.2",
"typescript": "4.9.5"
},
"scripts": {

View File

@@ -1,5 +1,17 @@
# @vercel/build-utils
## 7.11.0
### Minor Changes
- Add `getOsRelease()` and `getProvidedRuntime()` functions ([#11370](https://github.com/vercel/vercel/pull/11370))
## 7.10.0
### Minor Changes
- Allow environment variables to be specified for `EdgeFunction` ([#11029](https://github.com/vercel/vercel/pull/11029))
## 7.9.1
### Patch Changes

View File

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

View File

@@ -1,4 +1,4 @@
import type { Files, FunctionFramework } from './types';
import type { Env, Files, FunctionFramework } from './types';
/**
* An Edge Functions output
@@ -23,6 +23,11 @@ export class EdgeFunction {
*/
entrypoint: string;
/**
* Environment variables for the edge function to use at runtime.
*/
environment?: Env;
/**
* The list of files to be included in the edge function bundle.
*/
@@ -48,5 +53,6 @@ export class EdgeFunction {
this.assets = params.assets;
this.regions = params.regions;
this.framework = params.framework;
this.environment = params.environment;
}
}

View File

@@ -103,6 +103,7 @@ export {
export { EdgeFunction } from './edge-function';
export { readConfigFile } from './fs/read-config-file';
export { normalizePath } from './fs/normalize-path';
export { getOsRelease, getProvidedRuntime } from './os';
export * from './should-serve';
export * from './schemas';

View File

@@ -5,11 +5,7 @@ import minimatch from 'minimatch';
import { readlink } from 'fs-extra';
import { isSymbolicLink, isDirectory } from './fs/download';
import streamToBuffer from './fs/stream-to-buffer';
import type { Files, Config, FunctionFramework } from './types';
interface Environment {
[key: string]: string;
}
import type { Config, Env, Files, FunctionFramework } from './types';
export type LambdaOptions = LambdaOptionsWithFiles | LambdaOptionsWithZipBuffer;
@@ -21,7 +17,7 @@ export interface LambdaOptionsBase {
architecture?: LambdaArchitecture;
memory?: number;
maxDuration?: number;
environment?: Environment;
environment?: Env;
allowQuery?: string[];
regions?: string[];
supportsMultiPayloads?: boolean;
@@ -69,7 +65,7 @@ export class Lambda {
architecture?: LambdaArchitecture;
memory?: number;
maxDuration?: number;
environment: Environment;
environment: Env;
allowQuery?: string[];
regions?: string[];
/**

View File

@@ -0,0 +1,42 @@
import { readFile } from 'fs-extra';
import { isErrnoException } from '@vercel/error-utils';
export async function getOsRelease() {
try {
const data = await readFile('/etc/os-release', 'utf8');
return await parseOsRelease(data);
} catch (err) {
if (isErrnoException(err) && err.code === 'ENOENT') {
return null;
}
throw err;
}
}
export async function parseOsRelease(data: string) {
const obj: Record<string, string> = {};
// Example file contents:
// NAME="Amazon Linux"
// VERSION="2023"
// ID="amzn"
// ID_LIKE="fedora"
for (const line of data.trim().split('\n')) {
const m = /(?<key>.*)="(?<value>.*)"/.exec(line);
if (!m?.groups) {
continue;
}
obj[m.groups.key] = m.groups.value;
}
return obj;
}
export async function getProvidedRuntime() {
const os = await getOsRelease();
if (!os) {
return 'provided.al2023';
}
return os.PRETTY_NAME === 'Amazon Linux 2'
? 'provided.al2'
: 'provided.al2023';
}

View File

@@ -3,5 +3,8 @@
"version": "1.0.0",
"scripts": {
"build": "mkdir -p public && (printf \"npm version: \" && npm -v) > public/index.txt"
},
"engines": {
"node": "16.x"
}
}

View File

@@ -5,5 +5,8 @@
},
"dependencies": {
"once": "^1.4.0"
},
"engines": {
"node": "16.x"
}
}

View File

@@ -6,5 +6,8 @@
"dependencies": {
"exeggcute": "^1.0.0",
"once": "^1.4.0"
},
"engines": {
"node": "16.x"
}
}

View File

@@ -5,5 +5,8 @@
},
"dependencies": {
"sharp": "0.33.2"
},
"engines": {
"node": "16.x"
}
}

View File

@@ -0,0 +1,89 @@
import { parseOsRelease } from '../src/os';
describe('getOsRelease()', () => {
it('should parse `amazonlinux:2`', async () => {
const data = `NAME="Amazon Linux"
VERSION="2"
ID="amzn"
ID_LIKE="centos rhel fedora"
VERSION_ID="2"
PRETTY_NAME="Amazon Linux 2"
ANSI_COLOR="0;33"
CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2"
HOME_URL="https://amazonlinux.com/"
SUPPORT_END="2025-06-30"
`;
const parsed = await parseOsRelease(data);
expect(parsed).toMatchObject({
ANSI_COLOR: '0;33',
CPE_NAME: 'cpe:2.3:o:amazon:amazon_linux:2',
HOME_URL: 'https://amazonlinux.com/',
ID: 'amzn',
ID_LIKE: 'centos rhel fedora',
NAME: 'Amazon Linux',
PRETTY_NAME: 'Amazon Linux 2',
SUPPORT_END: '2025-06-30',
VERSION: '2',
VERSION_ID: '2',
});
});
it('should parse `amazonlinux:2023`', async () => {
const data = `NAME="Amazon Linux"
VERSION="2023"
ID="amzn"
ID_LIKE="fedora"
VERSION_ID="2023"
PLATFORM_ID="platform:al2023"
PRETTY_NAME="Amazon Linux 2023"
ANSI_COLOR="0;33"
CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2023"
HOME_URL="https://aws.amazon.com/linux/"
BUG_REPORT_URL="https://github.com/amazonlinux/amazon-linux-2023"
SUPPORT_END="2028-03-01"
`;
const parsed = await parseOsRelease(data);
expect(parsed).toMatchObject({
NAME: 'Amazon Linux',
VERSION: '2023',
ID: 'amzn',
ID_LIKE: 'fedora',
VERSION_ID: '2023',
PLATFORM_ID: 'platform:al2023',
PRETTY_NAME: 'Amazon Linux 2023',
ANSI_COLOR: '0;33',
CPE_NAME: 'cpe:2.3:o:amazon:amazon_linux:2023',
HOME_URL: 'https://aws.amazon.com/linux/',
BUG_REPORT_URL: 'https://github.com/amazonlinux/amazon-linux-2023',
SUPPORT_END: '2028-03-01',
});
});
it('should parse `ubuntu:jammy`', async () => {
const data = `PRETTY_NAME="Ubuntu 22.04.3 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.3 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy
`;
const parsed = await parseOsRelease(data);
expect(parsed).toMatchObject({
PRETTY_NAME: 'Ubuntu 22.04.3 LTS',
NAME: 'Ubuntu',
VERSION_ID: '22.04',
VERSION: '22.04.3 LTS (Jammy Jellyfish)',
HOME_URL: 'https://www.ubuntu.com/',
SUPPORT_URL: 'https://help.ubuntu.com/',
BUG_REPORT_URL: 'https://bugs.launchpad.net/ubuntu/',
PRIVACY_POLICY_URL:
'https://www.ubuntu.com/legal/terms-and-policies/privacy-policy',
});
});
});

View File

@@ -1,5 +1,77 @@
# 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))
## 33.7.1
### Patch Changes
- fix flickering during interactive UI rerendering ([#11392](https://github.com/vercel/vercel/pull/11392))
- fix `vc ls` message to be `vc projects ls` ([#11400](https://github.com/vercel/vercel/pull/11400))
- Updated dependencies [[`2461b571a`](https://github.com/vercel/vercel/commit/2461b571af037fbfdf92299a272010a5a8f4898b)]:
- @vercel/next@4.2.0
## 33.7.0
### Minor Changes
- improve UX for text input validation ([#11388](https://github.com/vercel/vercel/pull/11388))
- Replace the implementation of the yes/no prompt in several areas to be consistent with the rest of the CLI. ([#11279](https://github.com/vercel/vercel/pull/11279))
### Patch Changes
- [cli] Fix how we determine the GIT_CONFIG_PATH to support git worktrees and git submodules ([#11283](https://github.com/vercel/vercel/pull/11283))
- avoid printing errors when user does ctrl+c ([#11377](https://github.com/vercel/vercel/pull/11377))
- Warn that promoting preview deploys is deprecated ([#11376](https://github.com/vercel/vercel/pull/11376))
- Updated dependencies [[`a3fb7e6ab`](https://github.com/vercel/vercel/commit/a3fb7e6abe9bb619a653850decd739728b1af225)]:
- @vercel/go@3.1.1
## 33.6.3
### Patch Changes
- Handle `--repo` linked in `vc deploy --prebuilt` ([#11309](https://github.com/vercel/vercel/pull/11309))
- Revert "[cli] extract `isZeroConfigBuild` into utility function (#11316)" ([#11350](https://github.com/vercel/vercel/pull/11350))
- Replace `inquirer` with `@inquirer/prompts` ([#11321](https://github.com/vercel/vercel/pull/11321))
- Updated dependencies [[`73b112b1f`](https://github.com/vercel/vercel/commit/73b112b1f74480e1bb941e1b754105fc7dace401), [`346e665bb`](https://github.com/vercel/vercel/commit/346e665bb021e6034bc70c82ef336485622595fe), [`73b112b1f`](https://github.com/vercel/vercel/commit/73b112b1f74480e1bb941e1b754105fc7dace401), [`548afd371`](https://github.com/vercel/vercel/commit/548afd371aa7a9dd3a7f4c60f7f94a7084d8023e)]:
- @vercel/go@3.1.0
- @vercel/node@3.0.26
- @vercel/build-utils@7.11.0
- @vercel/static-build@2.4.6
## 33.6.2
### Patch Changes
- Added sunset warning to secrets command. ([#11333](https://github.com/vercel/vercel/pull/11333))
- Swap jest for vitest in CLI unit tests ([#11302](https://github.com/vercel/vercel/pull/11302))
- Updated dependencies [[`988f7b75a`](https://github.com/vercel/vercel/commit/988f7b75a27387e84fce541b844f984d2c151980), [`1825b58df`](https://github.com/vercel/vercel/commit/1825b58df8d783e79f0addf262618f422246f4b3)]:
- @vercel/remix-builder@2.1.5
- @vercel/build-utils@7.10.0
- @vercel/node@3.0.25
- @vercel/static-build@2.4.5
## 33.6.1
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "vercel",
"version": "33.6.1",
"version": "34.0.0",
"preferGlobal": true,
"license": "Apache-2.0",
"description": "The command-line interface for Vercel",
@@ -12,7 +12,8 @@
},
"scripts": {
"test": "jest --reporters=default --reporters=jest-junit --env node --verbose --bail",
"test-unit": "pnpm test test/unit/",
"vitest-unit-run": "pnpm vitest",
"vitest-unit": "pnpm jest test/unit/ --listTests",
"test-e2e": "rimraf test/fixtures/integration && pnpm test test/integration-1.test.ts test/integration-2.test.ts test/integration-3.test.ts",
"test-dev": "pnpm test test/dev/",
"coverage": "codecov",
@@ -31,22 +32,27 @@
"node": ">= 16"
},
"dependencies": {
"@vercel/build-utils": "7.9.1",
"@vercel/build-utils": "7.11.0",
"@vercel/fun": "1.1.0",
"@vercel/go": "3.0.5",
"@vercel/go": "3.1.1",
"@vercel/hydrogen": "1.0.2",
"@vercel/next": "4.1.6",
"@vercel/node": "3.0.24",
"@vercel/next": "4.2.0",
"@vercel/node": "3.0.26",
"@vercel/python": "4.1.1",
"@vercel/redwood": "2.0.8",
"@vercel/remix-builder": "2.1.4",
"@vercel/remix-builder": "2.1.5",
"@vercel/ruby": "2.0.5",
"@vercel/static-build": "2.4.4",
"@vercel/static-build": "2.4.6",
"chokidar": "3.3.1"
},
"devDependencies": {
"@alex_neo/jest-expect-message": "1.0.5",
"@edge-runtime/node-utils": "2.3.0",
"@inquirer/checkbox": "2.2.2",
"@inquirer/confirm": "3.1.2",
"@inquirer/expand": "2.1.2",
"@inquirer/input": "2.1.2",
"@inquirer/select": "2.2.2",
"@next/env": "11.1.2",
"@sentry/node": "5.5.0",
"@sindresorhus/slugify": "0.11.0",
@@ -63,7 +69,6 @@
"@types/glob": "7.1.1",
"@types/http-proxy": "1.16.2",
"@types/ini": "1.3.31",
"@types/inquirer": "7.3.1",
"@types/jest": "27.4.1",
"@types/jest-expect-message": "1.0.3",
"@types/json-parse-better-errors": "1.0.0",
@@ -79,7 +84,6 @@
"@types/qs": "6.9.7",
"@types/semver": "6.0.1",
"@types/tar-fs": "1.16.1",
"@types/text-table": "0.2.0",
"@types/title": "3.4.1",
"@types/universal-analytics": "0.4.2",
"@types/update-notifier": "5.1.0",
@@ -88,12 +92,13 @@
"@types/yauzl-promise": "2.1.0",
"@vercel-internals/constants": "1.0.4",
"@vercel-internals/get-package-json": "1.0.0",
"@vercel-internals/types": "1.0.27",
"@vercel/client": "13.1.7",
"@vercel-internals/types": "1.0.29",
"@vercel/client": "13.2.0",
"@vercel/error-utils": "2.0.2",
"@vercel/frameworks": "3.0.0",
"@vercel/fs-detectors": "5.2.1",
"@vercel/frameworks": "3.0.1",
"@vercel/fs-detectors": "5.2.2",
"@vercel/routing-utils": "3.1.0",
"@vitest/expect": "1.4.0",
"ajv": "6.12.2",
"alpha-sort": "2.0.1",
"ansi-escapes": "4.3.2",
@@ -126,7 +131,6 @@
"glob": "7.1.2",
"http-proxy": "1.18.1",
"ini": "3.0.0",
"inquirer": "7.0.4",
"is-docker": "2.2.1",
"is-port-reachable": "3.1.0",
"is-url": "1.2.2",
@@ -158,13 +162,14 @@
"strip-ansi": "6.0.1",
"supports-hyperlinks": "3.0.0",
"tar-fs": "1.16.3",
"text-table": "0.2.0",
"title": "3.4.1",
"tmp-promise": "1.0.3",
"tree-kill": "1.2.2",
"ts-node": "10.9.1",
"universal-analytics": "0.4.20",
"utility-types": "2.1.0",
"vite": "5.1.6",
"vitest": "1.3.1",
"which": "3.0.0",
"write-json-file": "2.2.0",
"xdg-app-paths": "5.1.0",

View File

@@ -1,6 +1,6 @@
import chalk from 'chalk';
import ms from 'ms';
import table from 'text-table';
import table from '../../util/output/table';
import Client from '../../util/client';
import getAliases from '../../util/alias/get-aliases';
import getScope from '../../util/get-scope';
@@ -9,7 +9,6 @@ import {
getPaginationOpts,
} from '../../util/get-pagination-opts';
import stamp from '../../util/output/stamp';
import strlen from '../../util/strlen';
import getCommandFlags from '../../util/get-command-flags';
import { getCommandName } from '../../util/pkg-name';
import type { Alias } from '@vercel-internals/types';
@@ -78,10 +77,6 @@ function printAliasTable(aliases: Alias[]) {
ms(Date.now() - a.createdAt),
]),
],
{
align: ['l', 'l', 'r'],
hsep: ' '.repeat(4),
stringLength: strlen,
}
{ align: ['l', 'l', 'r'], hsep: 4 }
).replace(/^/gm, ' ')}\n\n`;
}

View File

@@ -1,11 +1,10 @@
import chalk from 'chalk';
import ms from 'ms';
import table from 'text-table';
import table from '../../util/output/table';
import Client from '../../util/client';
import getScope from '../../util/get-scope';
import removeAliasById from '../../util/alias/remove-alias-by-id';
import stamp from '../../util/output/stamp';
import strlen from '../../util/strlen';
import confirm from '../../util/input/confirm';
import findAliasByAliasOrId from '../../util/alias/find-alias-by-alias-or-id';
@@ -84,11 +83,7 @@ async function confirmAliasRemove(client: Client, alias: Alias) {
chalk.gray(`${ms(Date.now() - alias.createdAt)} ago`),
],
],
{
align: ['l', 'l', 'r'],
hsep: ' '.repeat(4),
stringLength: strlen,
}
{ hsep: 4 }
);
client.output.log(`The following alias will be removed permanently`);

View File

@@ -45,10 +45,16 @@ export default async function bisect(client: Client): Promise<number> {
let bad =
argv['--bad'] ||
(await prompt(client, `Specify a URL where the bug occurs:`));
(await client.input.text({
message: `Specify a URL where the bug occurs:`,
validate: val => (val ? true : 'A URL must be provided'),
}));
let good =
argv['--good'] ||
(await prompt(client, `Specify a URL where the bug does not occur:`));
(await client.input.text({
message: `Specify a URL where the bug does not occur:`,
validate: val => (val ? true : 'A URL must be provided'),
}));
let subpath = argv['--path'] || '';
let run = argv['--run'] || '';
const openEnabled = argv['--open'] || false;
@@ -97,10 +103,10 @@ export default async function bisect(client: Client): Promise<number> {
}
if (!subpath) {
subpath = await prompt(
client,
`Specify the URL subpath where the bug occurs:`
);
subpath = await client.input.text({
message: `Specify the URL subpath where the bug occurs:`,
validate: val => (val ? true : 'A subpath must be provided'),
});
}
output.spinner('Retrieving deployments…');
@@ -278,9 +284,7 @@ export default async function bisect(client: Client): Promise<number> {
if (openEnabled) {
await open(testUrl);
}
const answer = await client.prompt({
type: 'expand',
name: 'action',
action = await client.input.expand({
message: 'Select an action:',
choices: [
{ key: 'g', name: 'Good', value: 'good' },
@@ -288,7 +292,6 @@ export default async function bisect(client: Client): Promise<number> {
{ key: 's', name: 'Skip', value: 'skip' },
],
});
action = answer.action;
}
if (action === 'good') {
@@ -338,19 +341,3 @@ function getCommit(deployment: Deployment) {
deployment.meta?.bitbucketCommitMessage;
return { sha, message };
}
async function prompt(client: Client, message: string): Promise<string> {
// eslint-disable-next-line no-constant-condition
while (true) {
const { val } = await client.prompt({
type: 'input',
name: 'val',
message,
});
if (val) {
return val;
} else {
client.output.error('A value must be specified');
}
}
}

View File

@@ -4,7 +4,7 @@ import dotenv from 'dotenv';
import semver from 'semver';
import minimatch from 'minimatch';
import { join, normalize, relative, resolve, sep } from 'path';
import frameworks from '@vercel/frameworks';
import { frameworkList } from '@vercel/frameworks';
import {
getDiscontinuedNodeVersions,
normalizePath,
@@ -695,7 +695,7 @@ async function getFramework(
): Promise<{ version: string } | undefined> {
const detectedFramework = await detectFrameworkRecord({
fs: new LocalFileSystemDetector(cwd),
frameworkList: frameworks,
frameworkList,
});
if (!detectedFramework) {

View File

@@ -1,6 +1,6 @@
import chalk from 'chalk';
import ms from 'ms';
import table from 'text-table';
import table from '../../util/output/table';
import Client from '../../util/client';
import getScope from '../../util/get-scope';
import {
@@ -9,7 +9,6 @@ import {
} from '../../util/get-pagination-opts';
import stamp from '../../util/output/stamp';
import getCerts from '../../util/certs/get-certs';
import strlen from '../../util/strlen';
import type { Cert } from '@vercel-internals/types';
import getCommandFlags from '../../util/get-command-flags';
import { getCommandName } from '../../util/pkg-name';
@@ -70,11 +69,7 @@ async function ls(
function formatCertsTable(certsList: Cert[]) {
return `${table(
[formatCertsTableHead(), ...formatCertsTableBody(certsList)],
{
align: ['l', 'l', 'r', 'c', 'r'],
hsep: ' '.repeat(2),
stringLength: strlen,
}
{ align: ['l', 'l', 'r', 'c', 'r'], hsep: 2 }
).replace(/^(.*)/gm, ' $1')}\n`;
}

View File

@@ -1,7 +1,7 @@
import chalk from 'chalk';
import ms from 'ms';
import plural from 'pluralize';
import table from 'text-table';
import table from '../../util/output/table';
import type { Cert } from '@vercel-internals/types';
import * as ERRORS from '../../util/errors-ts';
import { Output } from '../../util/output';
@@ -98,11 +98,11 @@ function readConfirmation(output: Output, msg: string, certs: Cert[]) {
output.print(
`${table(certs.map(formatCertRow), {
align: ['l', 'r', 'l'],
hsep: ' '.repeat(6),
hsep: 6,
}).replace(/^(.*)/gm, ' $1')}\n`
);
output.print(
`${chalk.bold.red('> Are you sure?')} ${chalk.gray('[y/N] ')}`
`${chalk.bold.red('> Are you sure?')} ${chalk.gray('(y/N) ')}`
);
process.stdin
.on('data', d => {

View File

@@ -303,7 +303,10 @@ export default async (client: Client): Promise<number> => {
}
// build `--prebuilt`
let vercelOutputDir: string | undefined;
if (argv['--prebuilt']) {
vercelOutputDir = join(cwd, '.vercel/output');
// For repo-style linking, update `cwd` to be the Project
// subdirectory when `rootDirectory` setting is defined
if (
@@ -311,10 +314,10 @@ export default async (client: Client): Promise<number> => {
link.repoRoot &&
link.project.rootDirectory
) {
cwd = join(cwd, link.project.rootDirectory);
vercelOutputDir = join(cwd, link.project.rootDirectory, '.vercel/output');
}
const prebuiltExists = await fs.pathExists(join(cwd, '.vercel/output'));
const prebuiltExists = await fs.pathExists(vercelOutputDir);
if (!prebuiltExists) {
error(
`The ${param(
@@ -326,7 +329,7 @@ export default async (client: Client): Promise<number> => {
return 1;
}
const prebuiltBuild = await getPrebuiltJson(cwd);
const prebuiltBuild = await getPrebuiltJson(vercelOutputDir);
// Ensure that there was not a build error
const prebuiltError =
@@ -517,23 +520,6 @@ export default async (client: Client): Promise<number> => {
);
}
const { packageJson } = await scanParentDirs(
join(cwd, project?.rootDirectory ?? ''),
true,
cwd
);
let nodeVersion: string | undefined;
if (packageJson?.engines?.node) {
try {
const { range } = await getSupportedNodeVersion(packageJson.engines.node);
nodeVersion = range;
} catch (error) {
if (error instanceof Error) {
output.warn(error.message);
}
}
}
try {
// if this flag is not set, use `undefined` to allow the project setting to be used
const autoAssignCustomDomains = argv['--skip-domain'] ? false : undefined;
@@ -545,6 +531,7 @@ export default async (client: Client): Promise<number> => {
forceNew: argv['--force'],
withCache: argv['--with-cache'],
prebuilt: argv['--prebuilt'],
vercelOutputDir,
rootDirectory,
quiet,
wantsPublic: Boolean(argv['--public'] || localConfig.public),
@@ -569,10 +556,9 @@ export default async (client: Client): Promise<number> => {
createArgs.projectSettings = {
sourceFilesOutsideRootDirectory,
rootDirectory,
nodeVersion,
};
if (status !== 'not_linked') {
if (status === 'linked') {
createArgs.projectSettings = {
...createArgs.projectSettings,
...localConfigurationOverrides,
@@ -580,6 +566,30 @@ export default async (client: Client): Promise<number> => {
}
}
// Read the `engines.node` field from `package.json` and send as a
// `projectSettings` property as an optimization (so that the API
// does not need to retrieve the file to do this check).
const { packageJson } = await scanParentDirs(
join(cwd, project?.rootDirectory ?? ''),
true,
cwd
);
let nodeVersion: string | undefined;
if (packageJson?.engines?.node) {
try {
const { range } = await getSupportedNodeVersion(
packageJson.engines.node
);
nodeVersion = range;
} catch (error) {
if (error instanceof Error) {
output.warn(error.message);
}
}
}
if (!createArgs.projectSettings) createArgs.projectSettings = {};
createArgs.projectSettings.nodeVersion = nodeVersion;
deployment = await createDeploy(
client,
now,

View File

@@ -1,6 +1,6 @@
import chalk from 'chalk';
import ms from 'ms';
import table from 'text-table';
import table from '../../util/output/table';
import type { DNSRecord } from '@vercel-internals/types';
import { Output } from '../../util/output';
import Client from '../../util/client';
@@ -71,11 +71,11 @@ function readConfirmation(
output.print(
`${table([getDeleteTableRow(domainName, record)], {
align: ['l', 'r', 'l'],
hsep: ' '.repeat(6),
hsep: 6,
}).replace(/^(.*)/gm, ' $1')}\n`
);
output.print(
`${chalk.bold.red('> Are you sure?')} ${chalk.gray('[y/N] ')}`
`${chalk.bold.red('> Are you sure?')} ${chalk.gray('(y/N) ')}`
);
process.stdin
.on('data', d => {

View File

@@ -7,7 +7,7 @@ import getDomainPrice from '../../util/domains/get-domain-price';
import getDomainStatus from '../../util/domains/get-domain-status';
import getScope from '../../util/get-scope';
import param from '../../util/output/param';
import promptBool from '../../util/input/prompt-bool';
import confirm from '../../util/input/confirm';
import purchaseDomain from '../../util/domains/purchase-domain';
import stamp from '../../util/output/stamp';
import { getCommandName } from '../../util/pkg-name';
@@ -86,23 +86,25 @@ export default async function buy(
autoRenew = true;
} else {
if (
!(await promptBool(
!(await confirm(
client,
`Buy now for ${chalk.bold(`$${price}`)} (${`${period}yr${
period > 1 ? 's' : ''
}`})?`,
client
false
))
) {
return 0;
}
autoRenew = await promptBool(
autoRenew = await confirm(
client,
renewalPrice.period === 1
? `Auto renew yearly for ${chalk.bold(`$${price}`)}?`
: `Auto renew every ${renewalPrice.period} years for ${chalk.bold(
`$${price}`
)}?`,
{ ...client, defaultValue: true }
true
);
}

View File

@@ -11,7 +11,7 @@ import textInput from '../../util/input/text';
import param from '../../util/output/param';
import getDomainAliases from '../../util/alias/get-domain-aliases';
import getDomainByName from '../../util/domains/get-domain-by-name';
import promptBool from '../../util/input/prompt-bool';
import confirm from '../../util/input/confirm';
import getTeams from '../../util/teams/get-teams';
import { getCommandName } from '../../util/pkg-name';
@@ -67,11 +67,12 @@ export default async function move(
)} will have 24 hours to accept your move request before it expires.`
);
if (
!(await promptBool(
!(await confirm(
client,
`Are you sure you want to move ${param(domainName)} to ${param(
destination
)}?`,
client
false
))
) {
output.log('Canceled');
@@ -88,9 +89,10 @@ export default async function move(
)} will be removed. Run ${getCommandName(`alias ls`)} to list them.`
);
if (
!(await promptBool(
!(await confirm(
client,
`Are you sure you want to move ${param(domainName)}?`,
client
false
))
) {
output.log('Canceled');

View File

@@ -13,7 +13,7 @@ import removeDomainByName from '../../util/domains/remove-domain-by-name';
import stamp from '../../util/output/stamp';
import * as ERRORS from '../../util/errors-ts';
import param from '../../util/output/param';
import promptBool from '../../util/input/prompt-bool';
import confirm from '../../util/input/confirm';
import setCustomSuffix from '../../util/domains/set-custom-suffix';
import { findProjectsForDomain } from '../../util/projects/find-projects-for-domain';
import { getCommandName } from '../../util/pkg-name';
@@ -81,9 +81,10 @@ export default async function rm(
const skipConfirmation = opts['--yes'] || false;
if (
!skipConfirmation &&
!(await promptBool(
!(await confirm(
client,
`Are you sure you want to remove ${param(domainName)}?`,
client
false
))
) {
output.log('Canceled');
@@ -222,7 +223,11 @@ async function removeDomain(
if (
!skipConfirmation &&
!(await promptBool(`Remove conflicts associated with domain?`, client))
!(await confirm(
client,
`Remove conflicts associated with domain?`,
false
))
) {
output.log('Canceled');
return 0;

View File

@@ -9,7 +9,7 @@ import stamp from '../../util/output/stamp';
import getAuthCode from '../../util/domains/get-auth-code';
import getDomainPrice from '../../util/domains/get-domain-price';
import checkTransfer from '../../util/domains/check-transfer';
import promptBool from '../../util/input/prompt-bool';
import confirm from '../../util/input/confirm';
import isRootDomain from '../../util/is-root-domain';
import { getCommandName } from '../../util/pkg-name';
@@ -67,11 +67,12 @@ export default async function transferIn(
const authCode = await getAuthCode(opts['--code']);
const shouldTransfer = await promptBool(
const shouldTransfer = await confirm(
client,
transferPolicy === 'no-change'
? `Transfer now for ${chalk.bold(`$${price}`)}?`
: `Transfer now with 1yr renewal for ${chalk.bold(`$${price}`)}?`,
client
false
);
if (!shouldTransfer) {
return 0;

View File

@@ -20,6 +20,7 @@ import { isAPIError } from '../../util/errors-ts';
type Options = {
'--debug': boolean;
'--sensitive': boolean;
'--force': boolean;
};
export default async function add(
@@ -29,9 +30,6 @@ export default async function add(
args: string[],
output: Output
) {
// improve the way we show inquirer prompts
require('../../util/input/patch-inquirer');
const stdInput = await readStandardInput(client.stdin);
let [envName, envTargetArg, envGitBranch] = args;
@@ -66,18 +64,11 @@ export default async function add(
envTargets.push(envTargetArg);
}
while (!envName) {
const { inputName } = await client.prompt({
type: 'input',
name: 'inputName',
if (!envName) {
envName = await client.input.text({
message: `Whats the name of the variable?`,
validate: val => (val ? true : 'Name cannot be empty'),
});
envName = inputName;
if (!inputName) {
output.error('Name cannot be empty');
}
}
const { envs } = await getEnvRecords(
@@ -91,7 +82,7 @@ export default async function add(
);
const choices = envTargetChoices.filter(c => !existing.has(c.value));
if (choices.length === 0) {
if (choices.length === 0 && !opts['--force']) {
output.error(
`The variable ${param(
envName
@@ -107,26 +98,18 @@ export default async function add(
if (stdInput) {
envValue = stdInput;
} else {
const { inputValue } = await client.prompt({
type: 'input',
name: 'inputValue',
envValue = await client.input.text({
message: `Whats the value of ${envName}?`,
});
envValue = inputValue || '';
}
while (envTargets.length === 0) {
const { inputTargets } = await client.prompt({
name: 'inputTargets',
type: 'checkbox',
envTargets = await client.input.checkbox({
message: `Add ${envName} to which Environments (select multiple)?`,
choices,
});
envTargets = inputTargets;
if (inputTargets.length === 0) {
if (envTargets.length === 0) {
output.error('Please select at least one Environment');
}
}
@@ -137,15 +120,13 @@ export default async function add(
envTargets.length === 1 &&
envTargets[0] === 'preview'
) {
const { inputValue } = await client.prompt({
type: 'input',
name: 'inputValue',
envGitBranch = await client.input.text({
message: `Add ${envName} to which Git branch? (leave empty for all Preview branches)?`,
});
envGitBranch = inputValue || '';
}
const type = opts['--sensitive'] ? 'sensitive' : 'encrypted';
const upsert = opts['--force'] ? 'true' : '';
const addStamp = stamp();
try {
@@ -154,6 +135,7 @@ export default async function add(
output,
client,
project.id,
upsert,
type,
envName,
envValue,
@@ -170,9 +152,11 @@ export default async function add(
output.print(
`${prependEmoji(
`Added Environment Variable ${chalk.bold(
envName
)} to Project ${chalk.bold(project.name)} ${chalk.gray(addStamp())}`,
`${
opts['--force'] ? 'Overrode' : 'Added'
} Environment Variable ${chalk.bold(envName)} to Project ${chalk.bold(
project.name
)} ${chalk.gray(addStamp())}`,
emoji('success')
)}\n`
);

View File

@@ -43,6 +43,14 @@ export const envCommand: Command = {
deprecated: false,
multi: false,
},
{
name: 'force',
description: 'Force overwrites when a command would normally fail',
shorthand: null,
type: 'boolean',
deprecated: false,
multi: false,
},
],
examples: [],
},
@@ -126,6 +134,10 @@ export const envCommand: Command = {
`${packageName} env add DB_PASS production`,
],
},
{
name: 'Override an existing Environment Variable of same target (production, preview, deployment)',
value: `${packageName} env add API_TOKEN --force`,
},
{
name: 'Add a sensitive Environment Variable',
value: `${packageName} env add API_TOKEN --sensitive`,

View File

@@ -35,6 +35,7 @@ export default async function main(client: Client) {
'--environment': String,
'--git-branch': String,
'--sensitive': Boolean,
'--force': Boolean,
});
} catch (error) {
handleError(error);

View File

@@ -29,9 +29,6 @@ export default async function rm(
args: string[],
output: Output
) {
// improve the way we show inquirer prompts
require('../../util/input/patch-inquirer');
if (args.length > 3) {
output.error(
`Invalid number of arguments. Usage: ${getCommandName(
@@ -43,19 +40,11 @@ export default async function rm(
let [envName, envTarget, envGitBranch] = args;
while (!envName) {
const { inputName } = await client.prompt({
type: 'input',
name: 'inputName',
if (!envName) {
envName = await client.input.text({
message: `Whats the name of the variable?`,
validate: val => (val ? true : 'Name cannot be empty'),
});
if (!inputName) {
output.error(`Name cannot be empty`);
continue;
}
envName = inputName;
}
if (!isValidEnvTarget(envTarget)) {
@@ -86,9 +75,7 @@ export default async function rm(
}
while (envs.length > 1) {
const { id } = await client.prompt({
name: 'id',
type: 'list',
const id = await client.input.select({
message: `Remove ${envName} from which Environments?`,
choices: envs.map(env => ({ value: env.id, name: formatEnvTarget(env) })),
});

View File

@@ -1,6 +1,7 @@
import chalk from 'chalk';
import { LOGO, NAME } from '@vercel-internals/constants';
import Table, { CellOptions } from 'cli-table3';
import { noBorderChars } from '../util/output/table';
const INDENT = ' '.repeat(2);
const NEWLINE = '\n';
@@ -39,23 +40,7 @@ type _CellOptions = CellOptions & {
};
const tableOptions = {
chars: {
top: '',
'top-mid': '',
'top-left': '',
'top-right': '',
bottom: '',
'bottom-mid': '',
'bottom-left': '',
'bottom-right': '',
left: '',
'left-mid': '',
mid: '',
'mid-mid': '',
right: '',
'right-mid': '',
middle: '',
},
chars: noBorderChars,
style: {
'padding-left': 0,
'padding-right': 0,

View File

@@ -6,7 +6,7 @@ import chalk from 'chalk';
// @ts-ignore
import listInput from '../../util/input/list';
import listItem from '../../util/output/list-item';
import promptBool from '../../util/input/prompt-bool';
import confirm from '../../util/input/confirm';
import toHumanPath from '../../util/humanize-path';
import Client from '../../util/client';
import info from '../../util/output/info';
@@ -46,6 +46,10 @@ export default async function init(
const exampleList = examples.filter(x => x.visible).map(x => x.name);
if (!name) {
if (client.stdin.isTTY !== true) {
client.output.print(`No framework provided`);
return 0;
}
const chosen = await chooseFromDropdown(
client,
'Select example:',
@@ -122,7 +126,7 @@ async function extractExample(
ver: string = 'v2'
) {
const { output } = client;
const folder = prepareFolder(process.cwd(), dir || name, force);
const folder = prepareFolder(client.cwd, dir || name, force);
output.spinner(`Fetching ${name}`);
const url = `${EXAMPLE_API}/${ver}/download/${name}.tar.gz`;
@@ -147,7 +151,7 @@ async function extractExample(
const successLog = `Initialized "${chalk.bold(
name
)}" example in ${chalk.bold(toHumanPath(folder))}.`;
const folderRel = path.relative(process.cwd(), folder);
const folderRel = path.relative(client.cwd, folder);
const deployHint =
folderRel === ''
? listItem(`To deploy, run ${getCommandName()}.`)
@@ -209,14 +213,14 @@ async function guess(client: Client, exampleList: string[], name: string) {
)} to see the list of available examples.`
);
if (process.stdout.isTTY !== true) {
if (client.stdin.isTTY !== true) {
throw GuessError;
}
const found = didYouMean(name, exampleList, 0.7);
if (typeof found === 'string') {
if (await promptBool(`Did you mean ${chalk.bold(found)}?`, client)) {
if (await confirm(client, `Did you mean ${chalk.bold(found)}?`, false)) {
return found;
}
} else {

View File

@@ -1,12 +1,11 @@
import chalk from 'chalk';
import ms from 'ms';
import table from 'text-table';
import table from '../../util/output/table';
import title from 'title';
import Now from '../../util';
import getArgs from '../../util/get-args';
import { handleError } from '../../util/error';
import elapsed from '../../util/output/elapsed';
import strlen from '../../util/strlen';
import toHost from '../../util/to-host';
import parseMeta from '../../util/parse-meta';
import { isValidName } from '../../util/is-valid-name';
@@ -275,11 +274,7 @@ export default async function list(client: Client) {
app === null ? filterUniqueApps() : () => true
),
],
{
align: ['l', 'l', 'l', 'l', 'l'],
hsep: ' '.repeat(5),
stringLength: strlen,
}
{ hsep: 5 }
).replace(/^/gm, ' ')}\n\n`
);

View File

@@ -1,11 +1,10 @@
import chalk from 'chalk';
import ms from 'ms';
import table from 'text-table';
import table from '../../util/output/table';
import type { Project } from '@vercel-internals/types';
import Client from '../../util/client';
import getCommandFlags from '../../util/get-command-flags';
import { getCommandName } from '../../util/pkg-name';
import strlen from '../../util/strlen';
import { NODE_VERSIONS } from '@vercel/build-utils';
export default async function list(
@@ -100,11 +99,7 @@ export default async function list(
])
.flat(),
],
{
align: ['l', 'l', 'l'],
hsep: ' '.repeat(3),
stringLength: strlen,
}
{ hsep: 3 }
).replace(/^/gm, ' ');
output.print(`\n${tablePrint}\n\n`);

View File

@@ -34,7 +34,7 @@ export default async function requestPromote({
if (deployment.target !== 'production' && !yes) {
const question =
'This deployment does not target production, therefore promotion will not apply production environment variables. Are you sure you want to continue?';
'This deployment is not a production deployment and cannot be directly promoted. A new deployment will be built using your production environment. Are you sure you want to continue?';
const answer = await confirm(client, question, false);
if (!answer) {
output.error('Canceled');
@@ -43,7 +43,7 @@ export default async function requestPromote({
}
// request the promotion
await client.fetch(`/v9/projects/${project.id}/promote/${deployment.id}`, {
await client.fetch(`/v10/projects/${project.id}/promote/${deployment.id}`, {
body: {}, // required
json: false,
method: 'POST',

View File

@@ -1,7 +1,7 @@
import chalk from 'chalk';
import ms from 'ms';
import plural from 'pluralize';
import table from 'text-table';
import table from '../../util/output/table';
import Now from '../../util';
import getAliases from '../../util/alias/get-aliases';
import elapsed from '../../util/output/elapsed';
@@ -169,7 +169,7 @@ export default async function remove(client: Client) {
`or projects matching ` +
`${ids
.map(id => chalk.bold(`"${id}"`))
.join(', ')}. Run ${getCommandName('ls')} to list.`
.join(', ')}. Run ${getCommandName('projects ls')} to list.`
);
return 1;
}
@@ -245,7 +245,7 @@ function readConfirmation(
const url = depl.url ? chalk.underline(`https://${depl.url}`) : '';
return [` ${depl.id}`, url, time];
}),
{ align: ['l', 'r', 'l'], hsep: ' '.repeat(6) }
{ align: ['l', 'r', 'l'], hsep: 6 }
);
output.print(`${deploymentTable}\n`);
}
@@ -277,7 +277,7 @@ function readConfirmation(
}
output.print(
`${chalk.bold.red('> Are you sure?')} ${chalk.gray('[y/N] ')}`
`${chalk.bold.red('> Are you sure?')} ${chalk.gray('(y/N) ')}`
);
process.stdin

View File

@@ -2,9 +2,14 @@ import { packageName, getCommandName } from '../../util/pkg-name';
export const secretsCommand = {
name: 'secrets',
description: `NOTE: The ${getCommandName(
'env'
)} command is recommended instead of ${getCommandName('secrets')}`,
description:
'WARNING: On May 1st, 2024 secrets will be automatically converted to sensitive Environment Variables for Preview and Production environments. Secrets attached to Development environments will not be migrated.\n' +
`The ${getCommandName(
'secrets'
)} command will be deprecated at this time, please use the ${getCommandName(
'env'
)} command instead.\n` +
'See https://vercel.com/changelog/legacy-environment-variable-secrets-are-being-sunset for more information.',
arguments: [
{
name: 'command',

View File

@@ -1,8 +1,7 @@
import isErrnoException from '@vercel/error-utils';
import chalk from 'chalk';
import table from 'text-table';
import table from '../../util/output/table';
import ms from 'ms';
import strlen from '../../util/strlen';
import { handleError, error } from '../../util/error';
import NowSecrets from '../../util/secrets';
import getScope from '../../util/get-scope';
@@ -78,6 +77,12 @@ async function run({ output, contextName, currentTeam, client }) {
const commandName = getCommandName('secret ' + subcommand);
output.warn(
'On May 1st, 2024 secrets will be automatically converted to sensitive Environment Variables for Preview and Production environments.\n' +
'Secrets attached to Development environments will not be migrated.' +
'See https://vercel.com/changelog/legacy-environment-variable-secrets-are-being-sunset for more information.'
);
if (subcommand === 'ls' || subcommand === 'list') {
output.note(
`The ${getCommandName(
@@ -118,11 +123,7 @@ async function run({ output, contextName, currentTeam, client }) {
chalk.gray(`${ms(cur - new Date(secret.created))} ago`),
])
),
{
align: ['l', 'l', 'l'],
hsep: ' '.repeat(2),
stringLength: strlen,
}
{ hsep: 2 }
);
if (out) {
@@ -279,7 +280,7 @@ async function readConfirmation(client, output, secret, contextName) {
const time = chalk.gray(`${ms(new Date() - new Date(secret.created))} ago`);
const tbl = table([[chalk.bold(secret.name), time]], {
align: ['r', 'l'],
hsep: ' '.repeat(6),
hsep: 6,
});
output.print(

View File

@@ -1,5 +1,6 @@
import chars from '../../util/output/chars';
import table from '../../util/output/table';
import { gray } from 'chalk';
import getUser from '../../util/get-user';
import getTeams from '../../util/teams/get-teams';
import { packageName } from '../../util/pkg-name';
@@ -53,7 +54,7 @@ export default async function list(client: Client): Promise<number> {
id,
name,
value: slug,
current: id === currentTeam ? chars.tick : '',
prefix: id === currentTeam ? chars.tick : ' ',
}));
if (user.version !== 'northstar') {
@@ -61,7 +62,7 @@ export default async function list(client: Client): Promise<number> {
id: user.id,
name: user.email,
value: user.username || user.email,
current: accountIsCurrent ? chars.tick : '',
prefix: accountIsCurrent ? chars.tick : ' ',
});
}
@@ -76,14 +77,22 @@ export default async function list(client: Client): Promise<number> {
output.stopSpinner();
client.stdout.write('\n'); // empty line
table(
['', 'id', 'email / name'],
teamList.map(team => [team.current, team.value, team.name]),
[1, 5],
(str: string) => {
client.stdout.write(str);
}
const teamTable = table(
[
['id', 'email / name'].map(str => gray(str)),
...teamList.map(team => [team.value, team.name]),
],
{ hsep: 5 }
);
client.stderr.write(
currentTeam
? teamTable
.split('\n')
.map((line, i) => `${i > 0 ? teamList[i - 1].prefix : ' '} ${line}`)
.join('\n')
: teamTable
);
client.stderr.write('\n');
if (pagination?.count === 20) {
const flags = getCommandFlags(argv, ['_', '--next', '-N', '-d']);

View File

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

View File

@@ -1,5 +1,9 @@
import { bold } from 'chalk';
import inquirer from 'inquirer';
import { bold, gray } from 'chalk';
import checkbox from '@inquirer/checkbox';
import confirm from '@inquirer/confirm';
import expand from '@inquirer/expand';
import input from '@inquirer/input';
import select from '@inquirer/select';
import { EventEmitter } from 'events';
import { URL } from 'url';
import { VercelConfig } from '@vercel/client';
@@ -66,8 +70,8 @@ export default class Client extends EventEmitter implements Stdio {
agent?: Agent;
localConfig?: VercelConfig;
localConfigPath?: string;
prompt!: inquirer.PromptModule;
requestIdCounter: number;
input;
constructor(opts: ClientOptions) {
super();
@@ -83,7 +87,29 @@ export default class Client extends EventEmitter implements Stdio {
this.localConfig = opts.localConfig;
this.localConfigPath = opts.localConfigPath;
this.requestIdCounter = 1;
this._createPromptModule();
const theme = {
prefix: gray('?'),
style: { answer: gray },
};
this.input = {
text: (opts: Parameters<typeof input>[0]) =>
input({ theme, ...opts }, { input: this.stdin, output: this.stderr }),
checkbox: <T>(opts: Parameters<typeof checkbox<T>>[0]) =>
checkbox<T>(
{ theme, ...opts },
{ input: this.stdin, output: this.stderr }
),
expand: (opts: Parameters<typeof expand>[0]) =>
expand({ theme, ...opts }, { input: this.stdin, output: this.stderr }),
confirm: (opts: Parameters<typeof confirm>[0]) =>
confirm({ theme, ...opts }, { input: this.stdin, output: this.stderr }),
select: <T>(opts: Parameters<typeof select<T>>[0]) =>
select<T>(
{ theme, ...opts },
{ input: this.stdin, output: this.stderr }
),
};
}
retry<T>(fn: RetryFunction<T>, { retries = 3, maxTimeout = Infinity } = {}) {
@@ -229,13 +255,6 @@ export default class Client extends EventEmitter implements Stdio {
this.output.debug(`Retrying: ${error}\n${error.stack}`);
};
_createPromptModule() {
this.prompt = inquirer.createPromptModule({
input: this.stdin as NodeJS.ReadStream,
output: this.stderr as NodeJS.WriteStream,
});
}
get cwd(): string {
return process.cwd();
}

View File

@@ -30,7 +30,7 @@ const getGlobalPathConfig = (): string => {
];
// The customPath flag is the preferred location,
// followed by the the vercel directory,
// followed by the vercel directory,
// followed by the now directory.
// If none of those exist, use the vercel directory.
return (

View File

@@ -6,7 +6,7 @@ export default async function getPrebuiltJson(
directory: string
): Promise<BuildsManifest | null> {
try {
return await fs.readJSON(join(directory, '.vercel/output/builds.json'));
return await fs.readJSON(join(directory, 'builds.json'));
} catch (error) {
// ignoring error
}

View File

@@ -53,6 +53,7 @@ export default async function processDeployment({
withCache?: boolean;
org: Org;
prebuilt: boolean;
vercelOutputDir?: string;
projectName: string;
isSettingUpProject: boolean;
archive?: ArchiveFormat;
@@ -71,6 +72,7 @@ export default async function processDeployment({
withCache,
quiet,
prebuilt,
vercelOutputDir,
rootDirectory,
} = args;
@@ -92,6 +94,7 @@ export default async function processDeployment({
force,
withCache,
prebuilt,
vercelOutputDir,
rootDirectory,
skipAutoDetectionConfirmation,
archive,

View File

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

View File

@@ -1,7 +1,7 @@
import chalk from 'chalk';
import type { DNSRecordData } from '@vercel-internals/types';
import textInput from '../input/text';
import promptBool from '../input/prompt-bool';
import confirm from '../input/confirm';
import Client from '../client';
const RECORD_TYPES = ['A', 'AAAA', 'ALIAS', 'CAA', 'CNAME', 'MX', 'SRV', 'TXT'];
@@ -89,7 +89,7 @@ export default async function getDNSData(
}
async function verifyData(client: Client) {
return promptBool('Is this correct?', client);
return confirm(client, 'Is this correct?', false);
}
async function getRecordName(type: string) {

View File

@@ -6,7 +6,7 @@ import Client from '../client';
import eraseLines from '../output/erase-lines';
import getDomainPrice from './get-domain-price';
import getDomainStatus from './get-domain-status';
import promptBool from '../input/prompt-bool';
import confirm from '../input/confirm';
import purchaseDomain from './purchase-domain';
import stamp from '../output/stamp';
import * as ERRORS from '../errors-ts';
@@ -51,11 +51,12 @@ export default async function purchaseDomainIfAvailable(
);
if (
!(await promptBool(
!(await confirm(
client,
`Buy ${chalk.underline(domain)} for ${chalk.bold(
`$${price}`
)} (${plural('yr', period, true)})?`,
client
false
))
) {
output.print(eraseLines(1));

View File

@@ -10,14 +10,16 @@ export default async function addEnvRecord(
output: Output,
client: Client,
projectId: string,
upsert: string,
type: ProjectEnvType,
key: string,
value: string,
targets: ProjectEnvTarget[],
gitBranch: string
): Promise<void> {
const actionWord = upsert ? 'Overriding' : 'Adding';
output.debug(
`Adding ${type} Environment Variable ${key} to ${targets.length} targets`
`${actionWord} ${type} Environment Variable ${key} to ${targets.length} targets`
);
const body: Omit<ProjectEnvVariable, 'id'> = {
type,
@@ -26,7 +28,8 @@ export default async function addEnvRecord(
target: targets,
gitBranch: gitBranch || undefined,
};
const url = `/v8/projects/${projectId}/env`;
const args = upsert ? `?upsert=${upsert}` : '';
const url = `/v10/projects/${projectId}/env${args}`;
await client.fetch(url, {
method: 'POST',
body,

View File

@@ -48,7 +48,7 @@ export default async function getEnvRecords(
query.set('source', source);
}
const url = `/v8/projects/${projectId}/env?${query}`;
const url = `/v10/projects/${projectId}/env?${query}`;
return client.fetch<{ envs: ProjectEnvVariable[] }>(url);
}

View File

@@ -1,12 +1,34 @@
import { isErrnoException } from '@vercel/error-utils';
const knownErrorsCodes = new Set([
'PAYMENT_REQUIRED',
'BAD_REQUEST',
'SYSTEM_ENV_WITH_VALUE',
'RESERVED_ENV_VARIABLE',
'ENV_ALREADY_EXISTS',
'ENV_CONFLICT',
'ENV_SHOULD_BE_A_SECRET',
'EXISTING_KEY_AND_TARGET',
'FORBIDDEN',
'ID_NOT_FOUND',
'INVALID_KEY',
'INVALID_VALUE',
'KEY_INVALID_CHARACTERS',
'KEY_INVALID_LENGTH',
'KEY_RESERVED',
'RESERVED_ENV_VARIABLE',
'MAX_ENVS_EXCEEDED',
'MISSING_ID',
'MISSING_KEY',
'MISSING_TARGET',
'MISSING_VALUE',
'NOT_AUTHORIZED',
'NOT_DECRYPTABLE',
'SECRET_MISSING',
'SYSTEM_ENV_WITH_VALUE',
'TEAM_NOT_FOUND',
'TOO_MANY_IDS',
'TOO_MANY_KEYS',
'UNKNOWN_ERROR',
'VALUE_INVALID_LENGTH',
'VALUE_INVALID_TYPE',
]);
export function isKnownError(error: unknown) {

View File

@@ -10,9 +10,9 @@ export default async function removeEnvRecord(
): Promise<void> {
output.debug(`Removing Environment Variable ${env.key}`);
const urlProject = `/v8/projects/${projectId}/env/${env.id}`;
const url = `/v10/projects/${projectId}/env/${env.id}`;
await client.fetch<ProjectEnvVariable>(urlProject, {
await client.fetch<ProjectEnvVariable>(url, {
method: 'DELETE',
});
}

View File

@@ -1,16 +1,8 @@
import chalk from 'chalk';
import table from 'text-table';
import strlen from './strlen';
import table from './output/table';
import { gray } from 'chalk';
const HEADER = ['name', 'type', 'value'].map(v => chalk.gray(v));
const HEADER = ['name', 'type', 'value'].map(v => gray(v));
export default function formatDNSTable(
rows: string[][],
{ extraSpace = '' } = {}
) {
return table([HEADER, ...rows], {
align: ['l', 'l', 'l'],
hsep: ' '.repeat(8),
stringLength: strlen,
}).replace(/^(.*)/gm, `${extraSpace}$1`);
export default function formatDNSTable(rows: string[][]) {
return table([HEADER, ...rows], { hsep: 8 });
}

View File

@@ -1,6 +1,5 @@
import chalk from 'chalk';
import table from 'text-table';
import strlen from './strlen';
import table from './output/table';
import chars from './output/chars';
export default function formatNSTable(
@@ -35,10 +34,6 @@ export default function formatNSTable(
],
...rows,
],
{
align: ['l', 'l', 'l', 'l'],
hsep: ' '.repeat(4),
stringLength: strlen,
}
{ hsep: 4 }
).replace(/^(.*)/gm, `${extraSpace}$1`);
}

View File

@@ -1,5 +1,5 @@
import chalk from 'chalk';
import table from 'text-table';
import table from './output/table';
import strlen from './strlen';
// header:
@@ -19,9 +19,8 @@ import strlen from './strlen';
// ]
export default function formatTable(
header: string[],
align: Array<'l' | 'r' | 'c' | '.'>,
blocks: { name?: string; rows: string[][] }[],
hsep = ' '
align: Array<'l' | 'r' | 'c'>,
blocks: { name?: string; rows: string[][] }[]
) {
const nrCols = header.length;
const padding = [];
@@ -57,7 +56,7 @@ export default function formatTable(
rows[i][j] = al === 'l' ? col + pad : pad + col;
}
}
out += table(rows, { align, hsep, stringLength: strlen });
out += table(rows, { align, hsep: 4 });
}
out += '\n\n';
}

View File

@@ -0,0 +1,86 @@
import { execSync } from 'node:child_process';
/** Defines the options for executing Git commands */
export type GitExecOptions = Readonly<{
/** If set to true, the function will throw
* an error if any occurs during the execution of the Git command. By default,
* it is set to false, meaning errors are caught and handled gracefully.*/
unsafe?: boolean;
/** Specifies the current working directory
* from which the Git command should be executed.
*/
cwd: string;
}>;
const DEFAULT_GIT_EXEC_OPTS = {
unsafe: false,
};
/**
* Attempts to retrieve the Git directory for the specified working directory.
*
* This function runs the Git command to find the `.git` directory associated
* with the current or specified working directory. This is useful for
* determining if the current working environment is within a Git repository.
*
* @param {GitExecOptions} opts - The options for executing the Git command.
* @returns {string | null} The path to the Git directory if found; otherwise, null.
* If `opts.unsafe` is set to true and an error occurs, the function will throw
* an error instead of returning null.
*
* @throws {Error} Can throw an error if `opts.unsafe` is set to `true`
*/
export function getGitDirectory(opts: GitExecOptions): string | null {
const { cwd, unsafe } = { ...DEFAULT_GIT_EXEC_OPTS, ...opts };
try {
const gitConfigPath = execSync('git rev-parse --git-dir', {
cwd,
encoding: 'utf8',
});
return gitConfigPath;
} catch (error) {
if (unsafe) {
throw error;
}
return null;
}
}
/**
* Checks if a given directory is a Git worktree or Git submodule.
*
* A Git worktree is a linked working tree, which allows you to have multiple
* working trees attached to the same repository. This function checks if the
* specified directory (or the current working directory if none is specified)
* is a Git worktree by looking for the '.git/worktrees/' path in the Git
* configuration.
*
* A Git submodule is a repository embedded inside another repository. This
* function checks if the current working directory or the specified directory
* is part of a Git submodule by looking for the '.git/modules/' path in the
* Git configuration.
*
* @param {GitExecOptions} [opts={}] The options to use. Options include:
* - `cwd`: The directory to check. Defaults to `process.cwd()`.
* - `unsafe`: If true, throws if an error occurs during execution.
* Defaults to `false`.
* @returns {boolean} Returns `true` if the directory is a Git worktree or Git
* Submodule, otherwise `false`.
*
* @throws {Error} Can throw an error if `opts.unsafe` is set to `true`
*/
export function isGitWorktreeOrSubmodule(opts: GitExecOptions): boolean {
const gitDir = getGitDirectory(opts);
if (gitDir === null) {
return false;
}
const isGitWorktree = gitDir.includes('.git/worktrees/');
const isGitSubmodule = gitDir.includes('.git/modules/');
return isGitWorktree || isGitSubmodule;
}

View File

@@ -17,6 +17,10 @@ export default function handleError(error: unknown, { debug = false } = {}) {
console.log(`> [debug] handling error: ${stack}`);
}
if (message === 'User force closed the prompt with 0 null') {
return;
}
if (status === 403) {
console.error(
errorOutput(

View File

@@ -36,6 +36,7 @@ export interface CreateOptions {
project?: string;
wantsPublic: boolean;
prebuilt?: boolean;
vercelOutputDir?: string;
rootDirectory?: string | null;
meta: Dictionary<string>;
gitMetadata?: GitMetadata;
@@ -117,6 +118,7 @@ export default class Now extends EventEmitter {
name,
project,
prebuilt = false,
vercelOutputDir,
rootDirectory,
wantsPublic,
meta,
@@ -179,6 +181,7 @@ export default class Now extends EventEmitter {
skipAutoDetectionConfirmation,
cwd,
prebuilt,
vercelOutputDir,
rootDirectory,
noWait,
});

View File

@@ -5,14 +5,8 @@ export default async function confirm(
message: string,
preferred: boolean
): Promise<boolean> {
require('./patch-inquirer');
const answers = await client.prompt({
type: 'confirm',
name: 'value',
return client.input.confirm({
message,
default: preferred,
});
return answers.value;
}

View File

@@ -1,7 +1,6 @@
import inquirer from 'inquirer';
import confirm from './confirm';
import chalk from 'chalk';
import frameworkList, { Framework } from '@vercel/frameworks';
import { frameworkList, Framework } from '@vercel/frameworks';
import Client from '../client';
import { isSettingValue } from '../is-setting-value';
import type { ProjectSettings } from '@vercel-internals/types';
@@ -125,48 +124,26 @@ export default async function editProjectSettings(
return settings;
}
const choices = settingKeys.reduce<Array<{ name: string; value: string }>>(
(acc, setting) => {
const skip =
setting === 'framework' ||
setting === 'commandForIgnoringBuildStep' ||
setting === 'installCommand' ||
localConfigurationOverrides?.[setting];
if (!skip) {
acc.push({ name: settingMap[setting], value: setting });
}
return acc;
},
[]
);
const choices = settingKeys.reduce((acc, setting) => {
const skip =
setting === 'framework' ||
setting === 'commandForIgnoringBuildStep' ||
setting === 'installCommand' ||
localConfigurationOverrides?.[setting];
if (skip) return acc;
return [...acc, { name: settingMap[setting], value: setting }];
}, [] as { name: string; value: ConfigKeys }[]);
const { settingFields } = await inquirer.prompt<{
settingFields: Array<
Exclude<
ConfigKeys,
'framework' | 'commandForIgnoringBuildStep' | 'installCommand'
>
>;
}>({
name: 'settingFields',
type: 'checkbox',
const settingFields = await client.input.checkbox({
message: 'Which settings would you like to overwrite (select multiple)?',
choices,
});
for (let setting of settingFields) {
const field = settingMap[setting];
const answers = await inquirer.prompt<{
[k in Exclude<
ConfigKeys,
'framework' | 'commandForIgnoringBuildStep' | 'installCommand'
>]: string;
}>({
type: 'input',
name: setting,
settings[setting] = await client.input.text({
message: `What's your ${chalk.bold(field)}?`,
});
settings[setting] = answers[setting];
}
return settings;
}

View File

@@ -75,70 +75,37 @@ export default async function inputProject(
if (shouldLinkProject) {
// user wants to link a project
let project: Project | ProjectNotFound | null = null;
while (!project || project instanceof ProjectNotFound) {
const answers = await client.prompt({
type: 'input',
name: 'existingProjectName',
message: `Whats the name of your existing project?`,
});
const projectName = answers.existingProjectName as string;
if (!projectName) {
output.error(`Project name cannot be empty`);
continue;
}
output.spinner('Verifying project name…', 1000);
try {
project = await getProjectByIdOrName(client, projectName, org.id);
} finally {
output.stopSpinner();
}
if (project instanceof ProjectNotFound) {
output.error(`Project not found`);
}
}
return project;
let toLink: Project;
await client.input.text({
message: 'Whats the name of your existing project?',
validate: async val => {
if (!val) {
return 'Project name cannot be empty';
}
const project = await getProjectByIdOrName(client, val, org.id);
if (project instanceof ProjectNotFound) {
return 'Project not found';
}
toLink = project;
return true;
},
});
return toLink!;
}
// user wants to create a new project
let newProjectName: string | null = null;
while (!newProjectName) {
const answers = await client.prompt({
type: 'input',
name: 'newProjectName',
message: `Whats your projects name?`,
default: !detectedProject ? slugifiedName : undefined,
});
newProjectName = answers.newProjectName as string;
if (!newProjectName) {
output.error(`Project name cannot be empty`);
continue;
}
output.spinner('Verifying project name…', 1000);
let existingProject: Project | ProjectNotFound;
try {
existingProject = await getProjectByIdOrName(
client,
newProjectName,
org.id
);
} finally {
output.stopSpinner();
}
if (existingProject && !(existingProject instanceof ProjectNotFound)) {
output.print(`Project already exists`);
newProjectName = null;
}
}
return newProjectName;
return await client.input.text({
message: `Whats your projects name?`,
default: !detectedProject ? slugifiedName : undefined,
validate: async val => {
if (!val) {
return 'Project name cannot be empty';
}
const project = await getProjectByIdOrName(client, val, org.id);
if (!(project instanceof ProjectNotFound)) {
return 'Project already exists';
}
return true;
},
});
}

View File

@@ -14,9 +14,7 @@ export async function inputRootDirectory(
// eslint-disable-next-line no-constant-condition
while (true) {
const { rootDirectory } = await client.prompt({
type: 'input',
name: 'rootDirectory',
const rootDirectory = await client.input.text({
message: `In which directory is your code located?`,
transformer: (input: string) => {
return `${chalk.dim(`./`)}${input}`;

View File

@@ -1,4 +1,4 @@
import inquirer from 'inquirer';
import { Separator } from '@inquirer/select';
import stripAnsi from 'strip-ansi';
import Client from '../client';
import eraseLines from '../output/erase-lines';
@@ -14,7 +14,7 @@ interface ListSeparator {
separator: string;
}
export type ListChoice = ListEntry | ListSeparator | typeof inquirer.Separator;
export type ListChoice = ListEntry | ListSeparator | typeof Separator;
interface ListOptions {
message: string;
@@ -54,8 +54,6 @@ export default async function list(
eraseFinalAnswer = false, // If true, the line with the final answer that inquirer prints will be erased before returning
}: ListOptions
): Promise<string> {
require('./patch-inquirer');
let biggestLength = 0;
let selected: string | undefined;
@@ -70,14 +68,14 @@ export default async function list(
}
const choices = _choices.map(choice => {
if (choice instanceof inquirer.Separator) {
if (choice instanceof Separator) {
return choice;
}
if ('separator' in choice) {
const prefix = `── ${choice.separator} `;
const suffix = '─'.repeat(biggestLength - getLength(prefix));
return new inquirer.Separator(`${prefix}${suffix}`);
return new Separator(`${prefix}${suffix}`);
}
if ('short' in choice) {
@@ -93,11 +91,11 @@ export default async function list(
if (separator) {
for (let i = 0; i < choices.length; i += 2) {
choices.splice(i, 0, new inquirer.Separator(' '));
choices.splice(i, 0, new Separator(' '));
}
}
const cancelSeparator = new inquirer.Separator('─'.repeat(biggestLength));
const cancelSeparator = new Separator('─'.repeat(biggestLength));
const _cancel = {
name: 'Cancel',
value: '',
@@ -110,18 +108,16 @@ export default async function list(
choices.push(cancelSeparator, _cancel);
}
const answer = await client.prompt({
name: 'value',
type: 'list',
default: selected,
const answer = await client.input.select({
message,
choices,
pageSize,
default: selected,
});
if (eraseFinalAnswer === true) {
process.stdout.write(eraseLines(2));
}
return answer.value;
return answer;
}

View File

@@ -1,210 +0,0 @@
import chalk from 'chalk';
import inquirer from 'inquirer';
import Prompt from 'inquirer/lib/prompts/base';
import Choice from 'inquirer/lib/objects/choice';
import Separator from 'inquirer/lib/objects/separator';
/**
* Here we patch inquirer with some tweaks:
* - update "list" to use ● and ○ and hide tips
* - update "checkbox" to use ◻︎ and ◼︎ and hide tips
* - use '?' before questions
* - do not apply color to question's answer
*/
// adjusted from https://github.com/SBoudrias/Inquirer.js/blob/942908f17319343d1acc7b876f990797c5695918/packages/inquirer/lib/prompts/base.js#L126
const getQuestion = function (this: Prompt) {
let message = `${chalk.gray('?')} ${this.opt.message} `;
if (this.opt.type === 'confirm') {
if (this.opt.default === 'y/N') {
message += `[y/${chalk.bold('N')}] `;
} else {
message += `[${chalk.bold('Y')}/n] `;
}
}
// Append the default if available, and if question isn't answered
else if (this.opt.default != null && this.status !== 'answered') {
message += chalk.dim(`(${this.opt.default}) `);
}
return message;
};
inquirer.prompt.prompts.list.prototype.getQuestion = getQuestion;
inquirer.prompt.prompts.checkbox.prototype.getQuestion = getQuestion;
inquirer.prompt.prompts.input.prototype.getQuestion = getQuestion;
inquirer.prompt.prompts.confirm.prototype.getQuestion = getQuestion;
// adjusted from https://github.com/SBoudrias/Inquirer.js/blob/942908f17319343d1acc7b876f990797c5695918/packages/inquirer/lib/prompts/list.js#L80
inquirer.prompt.prompts.list.prototype.render = function () {
// Render question
let message = this.getQuestion();
// Render choices or answer depending on the state
if (this.status === 'answered') {
message += this.opt.choices.getChoice(this.selected).short;
} else {
let choicesStr = listRender(this.opt.choices, this.selected);
let indexPosition = this.opt.choices.indexOf(
this.opt.choices.getChoice(this.selected)
);
message +=
'\n' +
this.paginator.paginate(choicesStr, indexPosition, this.opt.pageSize);
}
this.firstRender = false;
this.screen.render(message);
};
function listRender(choices: (Choice | Separator)[], pointer: number) {
let output = '';
let separatorOffset = 0;
choices.forEach((choice, i) => {
if (choice.type === 'separator') {
separatorOffset++;
output += ' ' + choice + '\n';
return;
}
if (choice.disabled) {
separatorOffset++;
output += ' - ' + choice.name;
output +=
' (' +
(typeof choice.disabled === 'string' ? choice.disabled : 'Disabled') +
')';
output += '\n';
return;
}
let isSelected = i - separatorOffset === pointer;
let line = (isSelected ? '● ' : '○ ') + choice.name;
if (isSelected) {
line = chalk.cyan(line);
}
output += line + ' \n';
});
return output.replace(/\n$/, '');
}
// adjusted from https://github.com/SBoudrias/Inquirer.js/blob/942908f17319343d1acc7b876f990797c5695918/packages/inquirer/lib/prompts/checkbox.js#L84
inquirer.prompt.prompts.checkbox.prototype.render = function (error?: string) {
// Render question
let message = this.getQuestion();
let bottomContent = '';
if (!this.spaceKeyPressed) {
message +=
'(Press ' +
chalk.cyan.bold('<space>') +
' to select, ' +
chalk.cyan.bold('<a>') +
' to toggle all, ' +
chalk.cyan.bold('<i>') +
' to invert selection)';
}
// Render choices or answer depending on the state
if (this.status === 'answered') {
message += this.selection.length > 0 ? this.selection.join(', ') : 'None';
} else {
let choicesStr = renderChoices(this.opt.choices, this.pointer);
let indexPosition = this.opt.choices.indexOf(
this.opt.choices.getChoice(this.pointer)
);
message +=
'\n' +
this.paginator.paginate(choicesStr, indexPosition, this.opt.pageSize);
}
if (error) {
bottomContent = chalk.red('>> ') + error;
}
this.screen.render(message, bottomContent);
};
function renderChoices(choices: (Choice | Separator)[], pointer: number) {
let output = '';
let separatorOffset = 0;
choices.forEach(function (choice, i) {
if (choice.type === 'separator') {
separatorOffset++;
output += '' + choice + '\n';
return;
}
if (choice.disabled) {
separatorOffset++;
output += '- ' + choice.name;
output +=
' (' +
(typeof choice.disabled === 'string' ? choice.disabled : 'Disabled') +
')';
} else {
if (i - separatorOffset === pointer) {
output += chalk.cyan(
(choice.checked ? ' ▪︎' : ' ▫︎') + ' ' + choice.name
);
} else {
output += chalk.cyan(
(choice.checked ? ' ▪︎' : ' ▫︎') + ' ' + choice.name
);
}
}
output += '\n';
});
return output.replace(/\n$/, '');
}
// adjusted from https://github.com/SBoudrias/Inquirer.js/blob/942908f17319343d1acc7b876f990797c5695918/packages/inquirer/lib/prompts/input.js#L44
inquirer.prompt.prompts.input.prototype.render = function (error?: string) {
let bottomContent = '';
let appendContent = '';
let message = this.getQuestion();
let transformer = this.opt.transformer;
let isFinal = this.status === 'answered';
if (isFinal) {
appendContent = this.answer;
} else {
appendContent = this.rl.line;
}
if (transformer) {
message += transformer(appendContent, this.answers, { isFinal });
} else {
message += appendContent;
}
if (error) {
bottomContent = chalk.red('>> ') + error;
}
this.screen.render(message, bottomContent);
};
// adjusted from https://github.com/SBoudrias/Inquirer.js/blob/942908f17319343d1acc7b876f990797c5695918/packages/inquirer/lib/prompts/confirm.js#L64
inquirer.prompt.prompts.confirm.prototype.render = function (answer?: boolean) {
let message = this.getQuestion();
if (this.status === 'answered') {
message += answer ? 'y' : 'n';
} else {
message += this.rl.line;
}
this.screen.render(message);
return this;
};

View File

@@ -1,86 +0,0 @@
import chalk from 'chalk';
import type { ReadableTTY, WritableTTY } from '@vercel-internals/types';
type Options = {
abortSequences?: Set<string>;
defaultValue?: boolean;
noChar?: string;
resolveChars?: Set<string>;
stdin: ReadableTTY;
stdout: WritableTTY;
trailing?: string;
yesChar?: string;
};
export default async function promptBool(label: string, options: Options) {
const {
stdin,
stdout,
defaultValue = false,
abortSequences = new Set(['\u0003']),
resolveChars = new Set(['\r']),
yesChar = 'y',
noChar = 'n',
trailing = '',
} = options;
return new Promise<boolean>(resolve => {
const isRaw = Boolean(stdin && stdin.isRaw);
if (stdin) {
if (stdin.setRawMode) {
stdin.setRawMode(true);
}
stdin.resume();
}
function restore() {
stdout.write(trailing);
if (stdin) {
if (stdin.setRawMode) {
stdin.setRawMode(isRaw);
}
stdin.pause();
stdin.removeListener('data', onData);
}
}
function onData(buffer: Buffer) {
const data = buffer.toString();
if (data[0].toLowerCase() === yesChar) {
restore();
stdout.write(`\n`);
resolve(true);
} else if (data[0].toLowerCase() === noChar) {
stdout.write(`\n`);
restore();
resolve(false);
} else if (abortSequences.has(data)) {
stdout.write(`\n`);
restore();
resolve(false);
} else if (resolveChars.has(data[0])) {
stdout.write(`\n`);
restore();
resolve(defaultValue);
} else {
// ignore extraneous input
}
}
const defaultText =
defaultValue === null
? `[${yesChar}|${noChar}]`
: defaultValue
? `[${chalk.bold(yesChar.toUpperCase())}|${noChar}]`
: `[${yesChar}|${chalk.bold(noChar.toUpperCase())}]`;
stdout.write(`${chalk.gray('>')} ${label} ${chalk.gray(defaultText)} `);
if (stdin) {
stdin.on('data', onData);
}
});
}

View File

@@ -10,7 +10,6 @@ export default async function selectOrg(
question: string,
autoConfirm?: boolean
): Promise<Org> {
require('./patch-inquirer');
const {
output,
config: { currentTeam },
@@ -52,14 +51,9 @@ export default async function selectOrg(
return choices[defaultChoiceIndex].value;
}
const answers = await client.prompt({
type: 'list',
name: 'org',
return await client.input.select({
message: question,
choices,
default: defaultChoiceIndex,
default: choices[defaultChoiceIndex].value,
});
const org = answers.org;
return org;
}

View File

@@ -77,7 +77,7 @@ export default function text({
// Tab
// Right arrow
autoCompleteChars = new Set(['\t', '\x1b[C']),
// If true, converts everything the user types to to lowercase
// If true, converts everything the user types to lowercase
forceLowerCase = false,
}: TextParams = {}): Promise<string> {
return new Promise((resolve, reject) => {

View File

@@ -1,5 +1,5 @@
import chalk from 'chalk';
import inquirer from 'inquirer';
import { Separator } from '@inquirer/checkbox';
import pluralize from 'pluralize';
import { homedir } from 'os';
import slugify from '@sindresorhus/slugify';
@@ -22,6 +22,7 @@ import { detectProjects } from '../projects/detect-projects';
import { repoInfoToUrl } from '../git/repo-info-to-url';
import { connectGitProvider, parseRepoUrl } from '../git/connect-git-provider';
import { isAPIError } from '../errors-ts';
import { isGitWorktreeOrSubmodule } from '../git-helpers';
const home = homedir();
@@ -144,16 +145,13 @@ export async function ensureRepoLink(
if (yes) {
remoteName = defaultRemote;
} else {
const answer = await client.prompt({
type: 'list',
name: 'value',
remoteName = await client.input.select({
message: 'Which Git remote should be used?',
choices: remoteNames.map(name => {
return { name: name, value: name };
}),
default: defaultRemote,
});
remoteName = answer.value;
}
}
const repoUrl = remoteUrls[remoteName];
@@ -222,15 +220,13 @@ export async function ensureRepoLink(
selected = projects;
} else {
const addSeparators = projects.length > 0 && detectedProjectsCount > 0;
const answer = await client.prompt({
type: 'checkbox',
name: 'selected',
selected = await client.input.checkbox<Project | NewProject>({
message: `Which Projects should be ${
projects.length ? 'linked to' : 'created'
}?`,
choices: [
...(addSeparators
? [new inquirer.Separator('----- Existing Projects -----')]
? [new Separator('----- Existing Projects -----')]
: []),
...projects.map(project => {
return {
@@ -240,7 +236,7 @@ export async function ensureRepoLink(
};
}),
...(addSeparators
? [new inquirer.Separator('----- New Projects to be created -----')]
? [new Separator('----- New Projects to be created -----')]
: []),
...Array.from(detectedProjects.entries()).flatMap(
([rootDirectory, frameworks]) =>
@@ -264,12 +260,11 @@ export async function ensureRepoLink(
},
// Checked by default when there are no other existing Projects
checked: projects.length === 0,
};
} as const;
})
),
],
});
selected = answer.selected;
}
if (selected.length === 0) {
@@ -365,7 +360,13 @@ export async function findRepoRoot(
): Promise<string | undefined> {
const { debug } = client.output;
const REPO_JSON_PATH = join(VERCEL_DIR, VERCEL_DIR_REPO);
const GIT_CONFIG_PATH = normalize('.git/config');
/**
* If the current repo is a git submodule or git worktree '.git' is a file
* with a pointer to the "parent" git repository instead of a directory.
*/
const GIT_PATH = isGitWorktreeOrSubmodule({ cwd: client.cwd })
? normalize('.git')
: normalize('.git/config');
for (const current of traverseUpDirectories({ start })) {
if (current === home) {
@@ -389,12 +390,12 @@ export async function findRepoRoot(
// if `.git/config` exists (unlinked),
// then consider this the repo root
const gitConfigPath = join(current, GIT_CONFIG_PATH);
const gitConfigPath = join(current, GIT_PATH);
stat = await lstat(gitConfigPath).catch(err => {
if (err.code !== 'ENOENT') throw err;
});
if (stat) {
debug(`Found "${GIT_CONFIG_PATH}" - detected "${current}" as repo root`);
debug(`Found "${GIT_PATH}" - detected "${current}" as repo root`);
return current;
}
}

View File

@@ -62,12 +62,7 @@ export async function readInput(
while (!input) {
try {
const { val } = await client.prompt({
type: 'input',
name: 'val',
message,
});
input = val;
input = await client.input.text({ message });
} catch (err: any) {
console.log(); // \n

View File

@@ -1,38 +1,52 @@
import chalk from 'chalk';
import Table from 'cli-table3';
const printLine = (data: string[], sizes: number[]) =>
data.reduce((line, col, i) => line + col.padEnd(sizes[i]), '');
const defaultStyle = {
'padding-left': 0,
'padding-right': 2,
};
export const noBorderChars = {
top: '',
'top-mid': '',
'top-left': '',
'top-right': '',
bottom: '',
'bottom-mid': '',
'bottom-left': '',
'bottom-right': '',
left: '',
'left-mid': '',
mid: '',
'mid-mid': '',
right: '',
'right-mid': '',
middle: '',
};
const alignMap = {
l: 'left',
c: 'center',
r: 'right',
} as const;
/**
* Print a table.
*/
export default function table(
fieldNames: string[] = [],
data: string[][] = [],
margins: number[] = [],
print: (str: string) => void
rows: string[][],
opts?: { hsep?: number; align?: ('l' | 'c' | 'r')[] }
) {
// Compute size of each column
const sizes = data
.reduce(
(acc, row) =>
row.map((col, i) => {
const currentMaxColSize = acc[i] || 0;
const colSize = (col && col.length) || 0;
return Math.max(currentMaxColSize, colSize);
}),
fieldNames.map(col => col.length)
const table = new Table({
style: {
...defaultStyle,
'padding-right': opts?.hsep ?? defaultStyle['padding-right'],
},
chars: noBorderChars,
});
table.push(
...rows.map(row =>
row.map((cell, i) => ({
content: cell,
hAlign: alignMap[opts?.align?.[i] ?? 'l'],
}))
)
// Add margin to all columns except the last
.map((size, i) => (i < margins.length && size + margins[i]) || size);
// Print header
print(chalk.grey(printLine(fieldNames, sizes)));
print('\n');
// Print content
for (const row of data) {
print(printLine(row, sizes));
print('\n');
}
);
return table.toString();
}

View File

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

View File

@@ -97,16 +97,13 @@ async function getProjectLinkFromRepoLink(
} else {
const selectableProjects =
projects.length > 0 ? projects : repoLink.repoConfig.projects;
const { p } = await client.prompt({
name: 'p',
type: 'list',
project = await client.input.select({
message: `Please select a Project:`,
choices: selectableProjects.map(p => ({
value: p,
name: p.name,
})),
});
project = p;
}
if (project) {
return {

View File

@@ -0,0 +1,6 @@
{
"private": true,
"engines": {
"node": "16.x"
}
}

View File

@@ -10,6 +10,6 @@ menu:
---
This is an example of a custom shortcode that you can put right into your content. You will need to add a form action to the the shortcode to make it work. Check out [Formspree](https://formspree.io/) for a simple, free form service.
This is an example of a custom shortcode that you can put right into your content. You will need to add a form action to the shortcode to make it work. Check out [Formspree](https://formspree.io/) for a simple, free form service.
{{< form-contact action="https://example.com" >}}

View File

@@ -1,3 +0,0 @@
handler() {
echo "Hello, from Bash!"
}

View File

@@ -0,0 +1,3 @@
export default (req: Request) => {
return new Response('Hello, from Deno!');
}

View File

@@ -1,7 +1,7 @@
{
"functions": {
"api/user.sh": {
"runtime": "vercel-bash@3.0.8"
"api/user.ts": {
"runtime": "vercel-deno@3.1.0"
}
}
}

View File

@@ -0,0 +1,6 @@
{
"private": true,
"engines": {
"node": "16.x"
}
}

View File

@@ -0,0 +1,6 @@
{
"private": true,
"engines": {
"node": "16.x"
}
}

View File

@@ -0,0 +1,6 @@
{
"private": true,
"engines": {
"node": "16.x"
}
}

View File

@@ -0,0 +1,5 @@
import { name } from '../backend/app'
export default async function handler(request, response) {
return response.status(200).send(`Hello, ${name}!`);
}

View File

@@ -0,0 +1 @@
export const name = 'Batman'

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