Commit Graph

1171 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Austin Merrick
6f46b1fc70 [cli][tests] Fix getUpdateCommand for local dev (#11276)
This unit test fails on my machine:
```
Expected: "pnpm i vercel@latest"
Received: "pnpm i -g vercel@latest"
```

This change allows the test to succeed on machines that need the `-g` flag.
2024-03-16 00:31:26 +00:00
Vercel Release Bot
8619992def Version Packages (#11275)
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.9.1

### Patch Changes

- Export `getSupportedNodeVersion`
([#11277](https://github.com/vercel/vercel/pull/11277))

## vercel@33.6.1

### Patch Changes

- Don't send `projectSettings.nodeVersion` for unsupported versions
([#11277](https://github.com/vercel/vercel/pull/11277))

- Updated dependencies
\[[`4bca0c6d0`](4bca0c6d0b),
[`a67ad4b5a`](a67ad4b5a1),
[`11218a179`](11218a1798),
[`64b97bf4b`](64b97bf4b5)]:
    -   @vercel/next@4.1.6
    -   @vercel/remix-builder@2.1.4
    -   @vercel/build-utils@7.9.1
    -   @vercel/static-build@2.4.4
    -   @vercel/node@3.0.24

## @vercel/client@13.1.7

### Patch Changes

- Updated dependencies
\[[`11218a179`](11218a1798)]:
    -   @vercel/build-utils@7.9.1

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

### Patch Changes

- Updated dependencies
\[[`11218a179`](11218a1798)]:
    -   @vercel/build-utils@7.9.1

## @vercel/next@4.1.6

### Patch Changes

- Ensure that static PPR pages have static streaming lambda paths.
([#11259](https://github.com/vercel/vercel/pull/11259))

## @vercel/node@3.0.24

### Patch Changes

- Updated dependencies
\[[`11218a179`](11218a1798)]:
    -   @vercel/build-utils@7.9.1

## @vercel/remix-builder@2.1.4

### Patch Changes

- Disable `prepareCache()` npm install for Remix + Vite
([#11281](https://github.com/vercel/vercel/pull/11281))

## @vercel/static-build@2.4.4

### Patch Changes

- [framework-fixtures]&#x3A; Bump the core group in
/packages/static-build/test/fixtures/angular-v17 with 15 updates
([#11274](https://github.com/vercel/vercel/pull/11274))

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

## @vercel-internals/types@1.0.27

### Patch Changes

- Updated dependencies
\[[`11218a179`](11218a1798)]:
    -   @vercel/build-utils@7.9.1

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-15 10:21:07 -05:00
Erika Rowland
11218a1798 [cli] Don't send projectSettings.nodeVersion for unsupported versions (#11277)
Previously, we used `semver` which correctly identified the nodeVersion used in `package.json`, but failed in two cases:

1. If the specified `engines` range started too low, it wouldn't correctly identify a later version compatible with Vercel. (`">10"` was detecting as Node `"10.x"` not `"20.x"`)
2. If the specified `engines` version was fixed too low to be compatible with Vercel, we sent it, and then Vercel predictably errored. (`"10"` was detecting as Node `"10.x"` which would lead to an error in the build process)

Now, case 1 should properly use the latest node version. And case 2 will not send a node version override to the API and will print a warning to the user on the CLI, but the deployment will still proceed with the version specified for the project in the web interface.

We chose to keep the error message shown to the user consistent with what shows in the logs for the build container, that is:
> WARN! Node.js Version "10.x" is discontinued and must be upgraded. Please set "engines": { "node": "20.x" } in your `package.json` file to use Node.js 20.
2024-03-14 21:34:51 +00:00
Vercel Release Bot
fab5fca939 Version Packages (#11262)
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.9.0

### Minor Changes

- Add `base` parameter to `scanParentDirs()`
([#11261](https://github.com/vercel/vercel/pull/11261))

## vercel@33.6.0

### Minor Changes

- Set `projectSettings.nodeVersion` in `vc deploy` based on
"engines.node" field
([#11261](https://github.com/vercel/vercel/pull/11261))

### Patch Changes

- Stops warning about legacy Speed Insights for Next.js apps
([#11268](https://github.com/vercel/vercel/pull/11268))

- Fix framework version detection in monorepos
([#11212](https://github.com/vercel/vercel/pull/11212))

- Updated dependencies
\[[`8ea93839c`](8ea93839cc),
[`58ef91bfe`](58ef91bfe8)]:
    -   @vercel/build-utils@7.9.0
    -   @vercel/remix-builder@2.1.3
    -   @vercel/node@3.0.23
    -   @vercel/static-build@2.4.3

## @vercel/client@13.1.6

### Patch Changes

- Updated dependencies
\[[`8ea93839c`](8ea93839cc)]:
    -   @vercel/build-utils@7.9.0

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

### Patch Changes

- Updated dependencies
\[[`8ea93839c`](8ea93839cc)]:
    -   @vercel/build-utils@7.9.0

## @vercel/node@3.0.23

### Patch Changes

- Updated dependencies
\[[`8ea93839c`](8ea93839cc)]:
    -   @vercel/build-utils@7.9.0

## @vercel/remix-builder@2.1.3

### Patch Changes

- Improve hueristics for detecting Remix + Vite
([#11256](https://github.com/vercel/vercel/pull/11256))

## @vercel/static-build@2.4.3

### Patch Changes

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

## @vercel-internals/types@1.0.26

### Patch Changes

- Updated dependencies
\[[`8ea93839c`](8ea93839cc)]:
    -   @vercel/build-utils@7.9.0

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-14 10:37:36 -05:00
Damien Simonin Feugas
2ad44999dd [cli] stops warning Next.js users about legacy Speed Insights (#11268)
### 🧐 What's in there?

Vercel's Speed Insights legacy injection is deprecated in favor of `@vercel/speed-insights` package.
CLI has a couple places where it warns users running `vc build` locally (or on their CI).

Some users complained about seeing the warning while they are already using the package.

This PR removes the message

###  Note to reviewers

@tobiaslins, @timolins and I had a long discussion on the approach here.

This warning is issued because during `vc pull`, the project API on Vercel returns a legacy analytics.id field, [which is stored](https://github.com/vercel/vercel/blame/main/packages/cli/src/util/projects/project-settings.ts#L35) in `.vercel/project.json`.
While it is legit for users who never used `@vercel/speed-insights` package, it also appear for users who migrated from legacy.

Besides setting the warning, `VERCEL_ANALYTICS_ID` is set, which triggers auto-injection in Next.js, and is useful during self-hosting.

We first considered removing the legacy id from `project.json`, but it would break self-hosting.
We also considered printing the warning only if the application never used the package (which the project API on Vercel knows). 
In the end, we realized that vercel.com Speed Insights dashboard has plenty of disclaimer and incentives to use the new package. Having it in the CLI doesn't worth the annoyance.
2024-03-14 15:00:43 +00:00
Nathan Rajlich
8ea93839cc [cli] Set projectSettings.nodeVersion in vc deploy based on "engines.node" field (#11261)
Read the package.json and use the `engines.node` value to set the
`projectSettings.nodeVersion` property on the create deployment API call
POST body. This allows for the Node 20 build container image to be
properly specified before the deployment is created on the server side.
2024-03-13 15:39:51 -07:00
Nathan Rajlich
b9f3438c2d [cli] Fix framework version detection in monorepos (#11212)
I noticed that the framework version was not being printed on deployments in a monorepo. Turns out the framework detection logic was happening at the root of the monorepo, instead of the project directory.
2024-03-12 22:54:53 +00:00
Nathan Rajlich
4111fbaa89 [tests] Specify testing tsconfig path for Jest (#11253)
This fixes the stack traces on failed Jest tests.
2024-03-11 14:39:08 -07:00
Vercel Release Bot
c3251e3775 Version Packages (#11248)
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.8.0

### Minor Changes

- Remove `VERCEL_ENABLE_NPM_DEFAULT` env var check
([#11242](https://github.com/vercel/vercel/pull/11242))

### Patch Changes

- Rename variants to flags and remove legacy flags
([#11121](https://github.com/vercel/vercel/pull/11121))

## vercel@33.5.5

### Patch Changes

- Rename variants to flags and remove legacy flags
([#11121](https://github.com/vercel/vercel/pull/11121))

- fix vc with root dir issues
([#11243](https://github.com/vercel/vercel/pull/11243))

- Updated dependencies
\[[`908e7837d`](908e7837d5),
[`5e3656ec1`](5e3656ec1b),
[`a53d1b0d3`](a53d1b0d38)]:
    -   @vercel/build-utils@7.8.0
    -   @vercel/next@4.1.5
    -   @vercel/remix-builder@2.1.2
    -   @vercel/node@3.0.22
    -   @vercel/static-build@2.4.2

## @vercel/client@13.1.5

### Patch Changes

- Updated dependencies
\[[`908e7837d`](908e7837d5),
[`5e3656ec1`](5e3656ec1b)]:
    -   @vercel/build-utils@7.8.0

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

### Patch Changes

- Updated dependencies
\[[`908e7837d`](908e7837d5),
[`5e3656ec1`](5e3656ec1b)]:
    -   @vercel/build-utils@7.8.0

## @vercel/next@4.1.5

### Patch Changes

- Rename variants to flags and remove legacy flags
([#11121](https://github.com/vercel/vercel/pull/11121))

## @vercel/node@3.0.22

### Patch Changes

- Updated dependencies
\[[`908e7837d`](908e7837d5),
[`5e3656ec1`](5e3656ec1b)]:
    -   @vercel/build-utils@7.8.0

## @vercel/remix-builder@2.1.2

### Patch Changes

- Update `@remix-run/dev` fork to v2.8.1
([#11241](https://github.com/vercel/vercel/pull/11241))

## @vercel/static-build@2.4.2

### Patch Changes

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

## @vercel-internals/types@1.0.25

### Patch Changes

- Updated dependencies
\[[`908e7837d`](908e7837d5),
[`5e3656ec1`](5e3656ec1b)]:
    -   @vercel/build-utils@7.8.0

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-08 15:42:44 -06:00
Sean Massa
33202dec1f fix vc with root dir issues (#11243)
There's an issue with `vc link` and `vc deploy` when using a project
root directory. Framework detection fails because it's looking in the
wrong directory.

---

Manually tested and this fixes the issue. A project with a rootDirectory
was previously not detecting a framework, but now it says:

```
Auto-detected Project Settings (Remix):
```

---------

Co-authored-by: Nathan Rajlich <n@n8.io>
2024-03-08 15:21:18 -06:00
Andy
908e7837d5 [cli][build-utils] Rename variants to flags (#11121)
- Removes all the legacy `flags`
 - Renames the new `variants` to `flags`

Neither the legacy flags, nor the new variants were exposed to anyone, except for the type in build-utils, so there shouldn't be any issues removing/renaming them.
2024-03-08 16:06:23 +00:00
Vercel Release Bot
96117d3f17 Version Packages (#11210)
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.7.1

### Patch Changes

- [build-utils] increase max memory limit
([#11209](https://github.com/vercel/vercel/pull/11209))

## vercel@33.5.4

### Patch Changes

- [build-utils] increase max memory limit
([#11209](https://github.com/vercel/vercel/pull/11209))

- Updated dependencies
\[[`b1d8b83ab`](b1d8b83abb),
[`37b193c84`](37b193c845),
[`20237d4f7`](20237d4f7b),
[`f8fab639b`](f8fab639bf),
[`6ed0fe6fb`](6ed0fe6fb1)]:
    -   @vercel/next@4.1.4
    -   @vercel/build-utils@7.7.1
    -   @vercel/remix-builder@2.1.1
    -   @vercel/static-build@2.4.1
    -   @vercel/node@3.0.21

## @vercel/client@13.1.4

### Patch Changes

- Updated dependencies
\[[`37b193c84`](37b193c845)]:
    -   @vercel/build-utils@7.7.1

## @vercel/fs-detectors@5.2.1

### Patch Changes

- [build-utils] increase max memory limit
([#11209](https://github.com/vercel/vercel/pull/11209))

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

### Patch Changes

- Updated dependencies
\[[`37b193c84`](37b193c845)]:
    -   @vercel/build-utils@7.7.1

## @vercel/next@4.1.4

### Patch Changes

- Enable partial prerendering support for pre-generated pages
([#11183](https://github.com/vercel/vercel/pull/11183))

## @vercel/node@3.0.21

### Patch Changes

- Updated dependencies
\[[`37b193c84`](37b193c845)]:
    -   @vercel/build-utils@7.7.1

## @vercel/remix-builder@2.1.1

### Patch Changes

- [build-utils] increase max memory limit
([#11209](https://github.com/vercel/vercel/pull/11209))

- Remove usage of `ensureResolvable()` in Vite builds
([#11213](https://github.com/vercel/vercel/pull/11213))

- Update `@remix-run/dev` fork to v2.8.0
([#11206](https://github.com/vercel/vercel/pull/11206))

- Ensure the symlink directory exists in `ensureSymlink()`
([#11205](https://github.com/vercel/vercel/pull/11205))

## @vercel/static-build@2.4.1

### Patch Changes

- [build-utils] increase max memory limit
([#11209](https://github.com/vercel/vercel/pull/11209))

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

## @vercel-internals/types@1.0.24

### Patch Changes

- Updated dependencies
\[[`37b193c84`](37b193c845)]:
    -   @vercel/build-utils@7.7.1

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-06 10:19:42 -06:00
Nathan Rajlich
293770a2f6 [cli] Fix failing test due to npm default change (#11230) 2024-03-05 17:52:19 -08:00
Shohei Maeda
37b193c845 [build-utils] increase max memory limit (#11209)
internal ref. https://github.com/vercel/api/pull/25997

increasing max limit from 3008 -> 3009 MB

---------

Co-authored-by: Nathan Rajlich <n@n8.io>
2024-03-01 08:23:11 +09:00
Vercel Release Bot
de2738ba06 Version Packages (#11193)
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/frameworks@3.0.0

### Major Changes

- Make "remix" framework preset supersede "vite"
([#11031](https://github.com/vercel/vercel/pull/11031))

## @vercel/fs-detectors@5.2.0

### Minor Changes

- Make "remix" framework preset supersede "vite"
([#11031](https://github.com/vercel/vercel/pull/11031))

### Patch Changes

- Updated dependencies
\[[`1333071a3`](1333071a3a)]:
    -   @vercel/frameworks@3.0.0

## @vercel/remix-builder@2.1.0

### Minor Changes

- Remix Vite plugin support
([#11031](https://github.com/vercel/vercel/pull/11031))

## vercel@33.5.3

### Patch Changes

- Updated dependencies
\[[`c2d99855e`](c2d99855ea),
[`1333071a3`](1333071a3a)]:
    -   @vercel/next@4.1.3
    -   @vercel/remix-builder@2.1.0

## @vercel/next@4.1.3

### Patch Changes

- Fix manifest with experimental flag
([#11192](https://github.com/vercel/vercel/pull/11192))

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-02-28 11:34:25 -06:00
Vercel Release Bot
0d112c848a Version Packages (#11154)
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.5.2

### Patch Changes

- Updated dependencies
\[[`e109e3325`](e109e3325a),
[`d17abf463`](d17abf463a),
[`644721a90`](644721a90d),
[`ea0e9aeae`](ea0e9aeaec),
[`e318a0eea`](e318a0eea5),
[`1fee87e76`](1fee87e76f),
[`bfc01fd98`](bfc01fd98f),
[`7910f2f30`](7910f2f307),
[`440ef3ba9`](440ef3ba98)]:
    -   @vercel/remix-builder@2.0.20
    -   @vercel/next@4.1.2
    -   @vercel/node@3.0.20
    -   @vercel/redwood@2.0.8

## @vercel/next@4.1.2

### Patch Changes

- Update experimental bundle flag
([#11187](https://github.com/vercel/vercel/pull/11187))

- [next] Add flag for experimental grouping
([#11177](https://github.com/vercel/vercel/pull/11177))

- bump `@vercel/nft@0.26.4`
([#11155](https://github.com/vercel/vercel/pull/11155))

- fix: missing experimental field
([#11184](https://github.com/vercel/vercel/pull/11184))

## @vercel/node@3.0.20

### Patch Changes

- bump `@vercel/nft@0.26.4`
([#11155](https://github.com/vercel/vercel/pull/11155))

## @vercel/redwood@2.0.8

### Patch Changes

- bump `@vercel/nft@0.26.4`
([#11155](https://github.com/vercel/vercel/pull/11155))

## @vercel/remix-builder@2.0.20

### Patch Changes

- Don't install Remix fork when not using split configuration
([#11152](https://github.com/vercel/vercel/pull/11152))

- Add `serverBundles` post-build sanity check and fallback
([#11153](https://github.com/vercel/vercel/pull/11153))

- bump `@vercel/nft@0.26.4`
([#11155](https://github.com/vercel/vercel/pull/11155))

- Update `@remix-run/dev` fork to v2.6.0
([#11162](https://github.com/vercel/vercel/pull/11162))

- Update `@remix-run/dev` fork to v2.7.0
([#11180](https://github.com/vercel/vercel/pull/11180))

- Update `@remix-run/dev` fork to v2.7.2
([#11186](https://github.com/vercel/vercel/pull/11186))

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-02-22 10:08:24 -06:00
Vercel Release Bot
e50fe2b37c Version Packages (#11149)
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.7.0

### Minor Changes

- Revert "Revert "Default ruby to only currently supported version
(3.2.0)"" ([#11137](https://github.com/vercel/vercel/pull/11137))

## @vercel/static-build@2.4.0

### Minor Changes

- Revert "Revert "Default ruby to only currently supported version
(3.2.0)"" ([#11137](https://github.com/vercel/vercel/pull/11137))

### Patch Changes

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

## vercel@33.5.1

### Patch Changes

- build: upgrade edge-runtime
([#11148](https://github.com/vercel/vercel/pull/11148))

- Updated dependencies
\[[`24c3dd282`](24c3dd282d),
[`10e200e0b`](10e200e0bf),
[`678ebbe52`](678ebbe525)]:
    -   @vercel/build-utils@7.7.0
    -   @vercel/static-build@2.4.0
    -   @vercel/node@3.0.19

## @vercel/client@13.1.3

### Patch Changes

- Updated dependencies
\[[`24c3dd282`](24c3dd282d)]:
    -   @vercel/build-utils@7.7.0

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

### Patch Changes

- Updated dependencies
\[[`24c3dd282`](24c3dd282d)]:
    -   @vercel/build-utils@7.7.0

## @vercel/node@3.0.19

### Patch Changes

- build: upgrade edge-runtime
([#11148](https://github.com/vercel/vercel/pull/11148))

- refactor: simplify content-length check
([#11150](https://github.com/vercel/vercel/pull/11150))

- Updated dependencies
\[[`24c3dd282`](24c3dd282d)]:
    -   @vercel/build-utils@7.7.0

## @vercel-internals/types@1.0.23

### Patch Changes

- Updated dependencies
\[[`24c3dd282`](24c3dd282d)]:
    -   @vercel/build-utils@7.7.0

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-02-13 11:52:52 -06:00
Kiko Beats
10e200e0bf build: upgrade edge-runtime (#11148)
Upgrade Edge Runtime and related dependencies 🙂

---------

Co-authored-by: Sean Massa <EndangeredMassa@gmail.com>
2024-02-13 11:20:11 -06:00
Vercel Release Bot
0dd9a27859 Version Packages (#11108)
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.6.0

### Minor Changes

- Revert "Default ruby to only currently supported version (3.2.0)"
([#11135](https://github.com/vercel/vercel/pull/11135))

- Mark `flags` as deprecated and replace them with `variants`
([#11098](https://github.com/vercel/vercel/pull/11098))

- [build-utils] change default package manager when no lockfile detected
from `yarn` to `npm` (gated behind feature flag)
([#11131](https://github.com/vercel/vercel/pull/11131))

### Patch Changes

- Update internal type for variants
([#11111](https://github.com/vercel/vercel/pull/11111))

## vercel@33.5.0

### Minor Changes

- Mark `flags` as deprecated and replace them with `variants`
([#11098](https://github.com/vercel/vercel/pull/11098))

### Patch Changes

- Updated dependencies
\[[`c32a909af`](c32a909afc),
[`b6ed28b9b`](b6ed28b9b1),
[`d21bb9f87`](d21bb9f87e),
[`4027a1833`](4027a18337),
[`8ba0ce932`](8ba0ce9324),
[`0d034b682`](0d034b6820),
[`abaa700ce`](abaa700cea),
[`3bad73401`](3bad73401b)]:
    -   @vercel/next@4.1.1
    -   @vercel/node@3.0.18
    -   @vercel/redwood@2.0.7
    -   @vercel/remix-builder@2.0.19
    -   @vercel/build-utils@7.6.0
    -   @vercel/static-build@2.3.0

## @vercel/static-build@2.3.0

### Minor Changes

- Revert "Default ruby to only currently supported version (3.2.0)"
([#11135](https://github.com/vercel/vercel/pull/11135))

### Patch Changes

- Updated dependencies
\[[`ab2444466`](ab24444660)]:
    -   @vercel/gatsby-plugin-vercel-builder@2.0.17

## @vercel/client@13.1.2

### Patch Changes

- Updated dependencies
\[[`b6ed28b9b`](b6ed28b9b1),
[`8ba0ce932`](8ba0ce9324),
[`0d034b682`](0d034b6820),
[`abaa700ce`](abaa700cea)]:
    -   @vercel/build-utils@7.6.0

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

### Patch Changes

- [gatsby-plugin-vercel-builder] use --keep-names esbuild flag
([#11117](https://github.com/vercel/vercel/pull/11117))

- Updated dependencies
\[[`b6ed28b9b`](b6ed28b9b1),
[`8ba0ce932`](8ba0ce9324),
[`0d034b682`](0d034b6820),
[`abaa700ce`](abaa700cea)]:
    -   @vercel/build-utils@7.6.0

## @vercel/next@4.1.1

### Patch Changes

- [node][next][redwood][remix] bump `@vercel/nft@0.26.3`
([#11115](https://github.com/vercel/vercel/pull/11115))

- Load common chunks on module initialization
([#11126](https://github.com/vercel/vercel/pull/11126))

- Fix index normalizing for app outputs
([#11099](https://github.com/vercel/vercel/pull/11099))

- Mark `flags` as deprecated and replace them with `variants`
([#11098](https://github.com/vercel/vercel/pull/11098))

- Fix rewrite RSC handling with trailingSlash
([#11107](https://github.com/vercel/vercel/pull/11107))

## @vercel/node@3.0.18

### Patch Changes

- [node][next][redwood][remix] bump `@vercel/nft@0.26.3`
([#11115](https://github.com/vercel/vercel/pull/11115))

- Updated dependencies
\[[`b6ed28b9b`](b6ed28b9b1),
[`8ba0ce932`](8ba0ce9324),
[`0d034b682`](0d034b6820),
[`abaa700ce`](abaa700cea)]:
    -   @vercel/build-utils@7.6.0

## @vercel/redwood@2.0.7

### Patch Changes

- [node][next][redwood][remix] bump `@vercel/nft@0.26.3`
([#11115](https://github.com/vercel/vercel/pull/11115))

## @vercel/remix-builder@2.0.19

### Patch Changes

- [node][next][redwood][remix] bump `@vercel/nft@0.26.3`
([#11115](https://github.com/vercel/vercel/pull/11115))

## @vercel-internals/types@1.0.22

### Patch Changes

- Updated dependencies
\[[`b6ed28b9b`](b6ed28b9b1),
[`8ba0ce932`](8ba0ce9324),
[`0d034b682`](0d034b6820),
[`abaa700ce`](abaa700cea)]:
    -   @vercel/build-utils@7.6.0

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-02-09 10:26:27 -06:00
Andy
8ba0ce9324 [cli] Add Variants to Build Output API (#11098)
Makes adjustments to replace `flags` with `variants`.

Also marks the current `flags` implementation as deprecated, as it
should get removed soon. Which I'll do in a follow up PR.
2024-02-01 10:28:12 +01:00
Vercel Release Bot
50e135ea47 Version Packages (#11106)
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/static-build@2.2.0

### Minor Changes

- Default ruby to only currently supported version (3.2.0)
([#11104](https://github.com/vercel/vercel/pull/11104))

### Patch Changes

- [tests] Update Gatsby fixture versions
([#11101](https://github.com/vercel/vercel/pull/11101))

## vercel@33.4.1

### Patch Changes

- Updated dependencies
\[[`d05e41eea`](d05e41eeaf),
[`de63e3562`](de63e35622)]:
    -   @vercel/static-build@2.2.0

## @vercel/client@13.1.1

### Patch Changes

- More helpful error message when `vc deploy --prebuilt` has missing
files ([#11105](https://github.com/vercel/vercel/pull/11105))

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-01-30 16:07:17 -06:00
Vercel Release Bot
a03cfa1040 Version Packages (#11103)
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.4.0

### Minor Changes

- Added a new option to add a sensitive environment variable
([#11033](https://github.com/vercel/vercel/pull/11033))

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-01-29 11:19:25 -06:00
Ana Trajkovska
77bc00f92e [cli] Add support for sensitive env var (#11033)
This PR updates the `vercel env add` command to support a new option
called `--sensitive` that allows an env var to be created of type
`sensitive`.
2024-01-29 16:48:07 +01:00
Vercel Release Bot
19a373288f Version Packages (#11079)
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.3.0

### Minor Changes

- Emit "filePathMap" in `vc-config.json` for `FileFsRef` instances
([#11060](https://github.com/vercel/vercel/pull/11060))

### Patch Changes

- Update `vc dev` to support `Lambda` instances without `zipBuffer`
([#11080](https://github.com/vercel/vercel/pull/11080))

- Updated dependencies
\[[`322c88536`](322c88536d),
[`62ca2efa7`](62ca2efa73)]:
    -   @vercel/ruby@2.0.5
    -   @vercel/python@4.1.1

## @vercel/client@13.1.0

### Minor Changes

- Upload files referenced by "filePathMap" during `vc deploy --prebuilt`
([#11077](https://github.com/vercel/vercel/pull/11077))

## @vercel/python@4.1.1

### Patch Changes

- Remove deprecated `createLambda()` usage
([#11080](https://github.com/vercel/vercel/pull/11080))

## @vercel/ruby@2.0.5

### Patch Changes

- add ruby3 to path during build
([#11094](https://github.com/vercel/vercel/pull/11094))

- Remove deprecated `createLambda()` usage
([#11080](https://github.com/vercel/vercel/pull/11080))

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-01-25 14:29:57 -06:00