Commit Graph

1171 Commits

Author SHA1 Message Date
Nathan Rajlich
7b01a07394 [cli] Use getNodeBinPaths() in vc dev (#10225)
This allows for the "dev command" of a Project to work better in monorepos, where the dev server might live up the node_modules hierarchy within the repo.
2023-07-19 22:19:43 +00:00
Nathan Rajlich
ce4633fe4d [frameworks][static-build] Add ignorePackageJsonScript configuration for Framework command settings (#10228)
When this property is set to `true`, then the corresponding `package.json` script will not be invoked, allowing for the default setting value will be executed.

This is enabled for Storybook's `buildCommand`, since we do not want the "build" script to be invoked, since that would belong to the frontend application's build instead of Storybook's.
2023-07-19 20:23:51 +00:00
Nathan Rajlich
fdf86fda03 [cli] Update proxy-agent to v6.3.0 (#10226)
This version includes a refactor for proxies specified via PAC files such that it no longer uses the deprecated `vm2` module.

See https://github.com/TooTallNate/proxy-agents/issues/218.
2023-07-18 20:29:37 +00:00
Vercel Release Bot
56178e6a46 Version Packages (#10213)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-07-18 14:02:19 -05:00
Nathan Rajlich
9969f0ba18 [cli] Use detectFrameworks() during vc link --repo (#10203)
Allows for multiple frameworks to be detectable within the same root directory. This is basically specifically for Storybook.

<img width="700" alt="Screenshot 2023-07-12 at 6 04 37 PM" src="https://github.com/vercel/vercel/assets/71256/5a240f1e-b000-42ad-b36f-3c151d3cd449">
2023-07-14 18:11:49 +00:00
Vercel Release Bot
a91bde5287 Version Packages (#10192)
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/fs-detectors@4.1.0

### Minor Changes

- Add `detectFrameworks()` function
([#10195](https://github.com/vercel/vercel/pull/10195))

## @vercel/build-utils@6.8.2

### Patch Changes

- Push back `nodejs16.x` discontinue date to `2024-02-06`
([#10209](https://github.com/vercel/vercel/pull/10209))

## vercel@31.0.3

### Patch Changes

- Fix redeploy target to be undefined when null
([#10201](https://github.com/vercel/vercel/pull/10201))

- Respect forbidden API responses
([#10178](https://github.com/vercel/vercel/pull/10178))

- Update `supports-hyperlinks` to v3
([#10208](https://github.com/vercel/vercel/pull/10208))

- Updated dependencies
\[[`0750517af`](0750517af9)]:
    -   @vercel/build-utils@6.8.2
    -   @vercel/static-build@1.3.40
    -   @vercel/node@2.15.5
    -   @vercel/remix-builder@1.8.17

## @vercel/client@12.6.5

### Patch Changes

- Updated dependencies
\[[`0750517af`](0750517af9)]:
    -   @vercel/build-utils@6.8.2

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

### Patch Changes

- Updated dependencies
\[[`0750517af`](0750517af9)]:
    -   @vercel/build-utils@6.8.2
    -   @vercel/node@2.15.5

## @vercel/node@2.15.5

### Patch Changes

- Updated dependencies
\[[`0750517af`](0750517af9)]:
    -   @vercel/build-utils@6.8.2

## @vercel/remix-builder@1.8.17

### Patch Changes

- Updated dependencies
\[[`0750517af`](0750517af9)]:
    -   @vercel/build-utils@6.8.2

## @vercel/static-build@1.3.40

### Patch Changes

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

## @vercel-internals/types@1.0.5

### Patch Changes

- Updated dependencies
\[[`0750517af`](0750517af9)]:
    -   @vercel/build-utils@6.8.2

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-07-13 19:17:13 -04:00
Nathan Rajlich
5f1e37ee16 Update supports-hyperlinks to v3 (#10208)
Enables proper detection for VSCode's terminal emulator, and allows us
to remove the in-house types since v3 includes its own types.
2023-07-13 12:24:30 -07:00
Chris Barber
06a5dccfed [cli] Fix redeploy target to be undefined when null (#10201) 2023-07-12 16:26:33 -05:00
balazs4
e9ec779f1c [rbac]s show forbidden error in case of missing permission (#10178)
fixes
[iam-941](https://linear.app/vercel/issue/IAM-941/cli-improve-handling-of-insufficient-permissions-no-access)
2023-07-11 12:32:43 +02:00
Vercel Release Bot
493a31091d Version Packages (#10158)
## @vercel/build-utils@6.8.1

### Patch Changes

- Revert "[build-utils] Allow file-ref sema to be controlled through env
flag" ([#10167](https://github.com/vercel/vercel/pull/10167))

## vercel@31.0.2

### Patch Changes

- Allow additional project settings in `createProject()`
([#10172](https://github.com/vercel/vercel/pull/10172))

- Run local Project detection during `vc link --repo`.
([#10094](https://github.com/vercel/vercel/pull/10094))
This allows for creation of new Projects that do not yet exist under the
selected scope.

- Redeploy command no longer redeploys preview deployments to production
([#10186](https://github.com/vercel/vercel/pull/10186))

- Added trailing new line at end of help output
([#10170](https://github.com/vercel/vercel/pull/10170))

- Create new help output and arg parsing for deploy command
([#10090](https://github.com/vercel/vercel/pull/10090))

- [cli] Remove `preinstall` script
([#10157](https://github.com/vercel/vercel/pull/10157))

- Updated dependencies
\[[`7021279b2`](7021279b28),
[`5e5332fbc`](5e5332fbc9),
[`027bce00b`](027bce00b3)]:
    -   @vercel/build-utils@6.8.1
    -   @vercel/node@2.15.4
    -   @vercel/remix-builder@1.8.16
    -   @vercel/static-build@1.3.39

## @vercel/client@12.6.4

### Patch Changes

- Updated dependencies
\[[`7021279b2`](7021279b28)]:
    -   @vercel/build-utils@6.8.1

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

### Patch Changes

- Updated dependencies
\[[`7021279b2`](7021279b28),
[`5e5332fbc`](5e5332fbc9)]:
    -   @vercel/build-utils@6.8.1
    -   @vercel/node@2.15.4

## @vercel/node@2.15.4

### Patch Changes

- [node] fix decompress mismatching
([#10184](https://github.com/vercel/vercel/pull/10184))

- Updated dependencies
\[[`7021279b2`](7021279b28)]:
    -   @vercel/build-utils@6.8.1

## @vercel/remix-builder@1.8.16

### Patch Changes

- Update `@remix-run/dev` fork to v1.18.1
([#10180](https://github.com/vercel/vercel/pull/10180))

- Updated dependencies
\[[`7021279b2`](7021279b28)]:
    -   @vercel/build-utils@6.8.1

## @vercel/static-build@1.3.39

### Patch Changes

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

## @vercel-internals/constants@1.0.4

### Patch Changes

- Create new help output and arg parsing for deploy command
([#10090](https://github.com/vercel/vercel/pull/10090))

## @vercel-internals/types@1.0.4

### Patch Changes

- Updated dependencies
\[[`7021279b2`](7021279b28),
[`718bbd365`](718bbd365a)]:
    -   @vercel/build-utils@6.8.1
    -   @vercel-internals/constants@1.0.4

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-07-10 15:48:32 -07:00
Nathan Rajlich
8d7206f5b6 [cli] Run local Project detection during vc link --repo (#10094)
Run local Project detection during `vc link --repo`. This allows for creation of new Projects that do not yet exist under the selected scope.
2023-07-10 22:42:13 +00:00
Ethan Arrowood
281ec776a5 Fix redeploy target (#10186)
This PR fixes customer issue
https://github.com/vercel/customer-issues/issues/1310 which identified
an issue with the `redeploy` command.

`redeploy` should not default the `target` to `'production'` as an
`undefined` target is meant to mean `'preview'`.
2023-07-07 11:50:06 -06:00
Nathan Rajlich
834b3e652b [cli] Allow additional project settings in createProject() (#10172)
Previously, `createProject()` only allowed a string `name` to be provided, and another API call would need to be done after creation with `updateProject()`. This should not be necessary since the `POST` endpoint can accept additional properties already.
2023-07-03 21:42:00 +00:00
Chris Barber
1d01703dc3 [cli] Added line return at end of help output (#10170)
I noticed the help output doesn't render a line return at the end.

<img width="290" alt="image" src="https://github.com/vercel/vercel/assets/97262/8aea6be0-9620-4445-b05d-62b838cefb07">
2023-07-03 16:46:29 +00:00
Ethan Arrowood
28acf50bdf Removes a leftover console.log in the new help method (#10162)
Removes a leftover `console.log` in the new `help` method. Whoops!
2023-06-30 15:50:22 +00:00
Ethan Arrowood
718bbd365a Improve help output UX and DX (#10090)
This PR adds a new utility for generating `help` output for CLI
commands. Backed by a JSON data structure that represents the commands,
this utility uses deterministic functions for generating the different
output sections (such as `options` and `examples`). This change will let
contributor easily add/modify command details. The data structure is
also used by the CLI to generate the args parsing structure for the
`deploy` command. Optimistically, this same data structure can be used
to generate documentation output for `front` such that the online docs
will match the `help` output.

---------

Co-authored-by: Sean Massa <EndangeredMassa@gmail.com>
2023-06-29 14:08:17 -06:00
Steven
7e791ee080 [cli] Remove preinstall script (#10157)
This will solve two of the warnings from [Socket.dev](https://socket.dev/npm/package/vercel):

<img width="1126" alt="image" src="https://github.com/vercel/vercel/assets/229881/c890c973-4f5a-44d9-9b96-2580a1e40ed0">

This preinstall script isn't necessary to run Vercel CLI, its only used to improve the error message in two cases:

- The system has `node` version prior to 14.x (3 years ago)
- The system still has `now` installed but should be using `vercel` (last shipped 3 years ago)

The usage of `preinstall` scripts have gone out of style due to security audits so we should remove this script now.
2023-06-28 22:30:49 +00:00
Vercel Release Bot
13769106cb Version Packages (#10156)
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@31.0.1

### Patch Changes

- Updated dependencies
\[[`aa734efc6`](aa734efc6c)]:
    -   @vercel/next@3.8.8

## @vercel/next@3.8.8

### Patch Changes

- [next] Ensure RSC paths handle basePath
([#10155](https://github.com/vercel/vercel/pull/10155))
2023-06-28 14:49:14 -07:00
Vercel Release Bot
acc10e47c7 Version Packages (#10123)
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@31.0.0

### Major Changes

- Update `vc dev` redirect response to match production behavior
([#10143](https://github.com/vercel/vercel/pull/10143))

### Patch Changes

- require `--yes` to promote preview deployment
([#10135](https://github.com/vercel/vercel/pull/10135))

- [cli] Optimize write build result for vc build
([#10154](https://github.com/vercel/vercel/pull/10154))

- Only show relevant Project matches in Project selector
([#10114](https://github.com/vercel/vercel/pull/10114))

- [cli] Fix error message when token is invalid
([#10131](https://github.com/vercel/vercel/pull/10131))

- Updated dependencies
\[[`e4895d979`](e4895d979b),
[`346892210`](3468922108),
[`346892210`](3468922108),
[`a6de052ed`](a6de052ed2)]:
    -   @vercel/next@3.8.7
    -   @vercel/static-build@1.3.38
    -   @vercel/build-utils@6.8.0
    -   @vercel/remix-builder@1.8.15
    -   @vercel/node@2.15.3

## @vercel/build-utils@6.8.0

### Minor Changes

- Add `getNodeBinPaths()` and `traverseUpDirectories()` functions
([#10150](https://github.com/vercel/vercel/pull/10150))

## @vercel/client@12.6.3

### Patch Changes

- Updated dependencies
\[[`346892210`](3468922108)]:
    -   @vercel/build-utils@6.8.0

## @vercel/frameworks@1.4.3

### Patch Changes

- [frameworks] Update `saber.land` to `saber.egoist.dev`
([#10148](https://github.com/vercel/vercel/pull/10148))

## @vercel/fs-detectors@4.0.1

### Patch Changes

- Resolve symlinks in `LocalFileSystemDetector#readdir()`
([#10126](https://github.com/vercel/vercel/pull/10126))

- Updated dependencies
\[[`0867f11a6`](0867f11a6a)]:
    -   @vercel/frameworks@1.4.3

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

### Patch Changes

- Updated dependencies
\[[`346892210`](3468922108)]:
    -   @vercel/build-utils@6.8.0
    -   @vercel/node@2.15.3

## @vercel/next@3.8.7

### Patch Changes

- [next] Update payload flag
([#10147](https://github.com/vercel/vercel/pull/10147))

- Use `getNodeBinPaths()` function to improve monorepo support
([#10150](https://github.com/vercel/vercel/pull/10150))

## @vercel/node@2.15.3

### Patch Changes

- Updated dependencies
\[[`346892210`](3468922108)]:
    -   @vercel/build-utils@6.8.0

## @vercel/remix-builder@1.8.15

### Patch Changes

- Update `@remix-run/dev` fork to v1.18.0
([#10146](https://github.com/vercel/vercel/pull/10146))

- Updated dependencies
\[[`346892210`](3468922108)]:
    -   @vercel/build-utils@6.8.0

## @vercel/static-build@1.3.38

### Patch Changes

- Use `getNodeBinPaths()` function to improve monorepo support
([#10150](https://github.com/vercel/vercel/pull/10150))

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

## @vercel-internals/constants@1.0.3

### Patch Changes

- Updated dependencies
\[[`346892210`](3468922108)]:
    -   @vercel/build-utils@6.8.0

## @vercel-internals/types@1.0.3

### Patch Changes

- Updated dependencies
\[[`346892210`](3468922108)]:
    -   @vercel/build-utils@6.8.0
    -   @vercel-internals/constants@1.0.3
2023-06-28 12:29:31 -07:00
JJ Kasper
6a0e1e0b66 [cli] Optimize write build result for vc build (#10154)
As noticed this is copying all fallback files from output even if they are already on the disk in the build container which should be able to be considered a "pure" environment. This copying can cause disk space/perf issues when there are massive amounts of fallback files generated e.g. 8000 outputs at 200KB/output is already 1.6GB of copying needing to be done that could just be a move operation. 


x-ref: [slack thread](https://vercel.slack.com/archives/C03F2CMNGKG/p1687969734598509?thread_ts=1687963253.178369&cid=C03F2CMNGKG)
x-ref: [slack thread](https://vercel.slack.com/archives/C02SM2K2UM9/p1687970267370669)
x-ref: [slack thread](https://vercel.slack.com/archives/C03DQ3QFV7C/p1687338157228459)
2023-06-28 19:07:52 +00:00
Nathan Rajlich
3468922108 [build-utils] Add getNodeBinPaths() function (#10150)
The `getNodeBinPath()` function is problematic because it assumes that commands are installed in the `node_modules` directory alongside the detected lockfile. This works fine the majority of the time, but ends up not being the case when using a monorepo that uses a package manager in "linked" mode (i.e. pnpm by default).

Consider the following:

```
.
├── pnpm-lock.yaml
├── node_modules
├── blog
│   ├── node_modules
│   │   ├── hexo -> .pnpm/hexo@3.9.0/node_modules/hexo
```

In this setup, adding the root-level `node_modules/.bin` would not make the `hexo` command be visible in the `$PATH`.

To solve this issue, the new `getNodeBinPaths()` function returns an array of all directories up to the specified `root`, which can then be placed into the `$PATH`. It's also more efficient (synchronous) since it does not need to scan for a lockfile anymore (the `root` needs to be specified explicitly).

The new function is being used in `@vercel/next` and `@vercel/static-build`.

The `traverseUpDirectories()` function from CLI was moved to `build-utils` to implement this function. Consequently, that makes the implementations of `walkParentDirs()` and `walkParentDirsMulti()` simpler, since it's using this generator now.
2023-06-28 01:53:34 +00:00
Steven
733ff5ed85 [tests] Add x-vercel-id to test error message (#10149)
Including the `x-vercel-id` header when a e2e test fails will help us
debug issues
2023-06-27 19:05:55 -04:00
Sean Massa
6ec1180798 require --yes flag to promote preview deployment (#10135)
In order to promote a preview deployment, we want to make sure the user knows that this is not typical. Now the `--yes` flag is required to make this work.
2023-06-26 21:43:48 +00:00
Nathan Rajlich
8163a153df [cli] Respond with "Redirecting..." to match production behavior (#10143)
Production was recently changed to make redirect responses return the text "Redirecting..." without the destination nor status code in the text.

This caused some tests to start failing, so update `vc dev` to match this new behavior and update the relevant tests.
2023-06-26 19:41:35 +00:00
Steven
c2f1bebd1f [cli] Fix error message when token is invalid (#10131)
This changes the error when a token is invalid or expired from

```
Error: Could not retrieve Project Settings. To link your Project, remove the `.vercel` directory and deploy again.
Learn More: https://vercel.link/cannot-load-project-settings
```

to a better error

```
Error: The specified token is not valid. Use `vercel login` to generate a new token.
```

- This could be considered a follow up to
https://github.com/vercel/vercel/pull/7794
2023-06-23 11:18:58 -04:00
Nathan Rajlich
734499fc03 [cli] Only show relevant Project matches in Project selector (#10114)
When showing the Project selector and there's more than one Project matched given the current cwd, only show the matched Projects instead of all Projects listed in the `repo.json` file.
2023-06-21 17:22:21 +00:00
Nathan Rajlich
f06988d914 [cli] Add debug logging for repo link root lookup (#10112)
Adds some logging during the root directory resolving logic to help debug any cases where that lookup isn't behaving correctly.
2023-06-20 18:09:40 +00:00
Vercel Release Bot
71ac16220b Version Packages (#10107)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-06-20 11:42:04 -05:00
Kiko Beats
8b3a4146af [node][edge][cli] upgrade Edge Runtime (#10051)
We avoided to use `undici.WebSocket` because @jawj found a bug in the
implementation.

The [fix was merged](https://github.com/nodejs/undici/pull/2106) in
[undici@5.22.1](https://github.com/nodejs/undici/releases/tag/v5.22.1),
so we can be back to use it.

The latest version of Edge Runtime exposes `undici.WebSocket` compatible
with node.js 14, 16 & 18

---------

Co-authored-by: Sean Massa <endangeredmassa@gmail.com>
2023-06-20 11:06:43 +02:00
Sean Massa
bc7c80fb9b [cli] do not force auto-assign value on deployments (#10110)
When `vc deploy` happens, it was forcing a `true`/`false` value for `autoAssignCustomDomains`. This overwrites the project setting in some cases, which is not what we want.

If a CLI command or API call explicitly wants to force `autoAssignCustomDomains` on or off, it can. Otherwise, the project setting value should be used.

This PR only sets `autoAssignCustomDomains` to `false` when the `--skip-domain` flag is passed. Otherwise, the value is `undefined` so that the project setting can take effect.
2023-06-15 22:19:34 +00:00
Vercel Release Bot
f057f0421b Version Packages (#10081) 2023-06-14 10:47:10 -07:00
Chris Barber
d61a1a7988 [cli] Fix team validation bug where you are apart of a team (#10092)
When consolidating the deployment team validation, a bug was introduced where the command would error if the user was currently using a team. The logic was meant to copy the logic in `getDeploymentByIdOrURL()`: https://github.com/vercel/vercel/blob/main/packages/cli/src/util/deploy/get-deployment-by-id-or-url.ts#L80.
2023-06-12 16:32:01 +00:00
Nathan Rajlich
79dee367cf [cli] Remove findProjectFromPath() (#10093)
Superceded by the `findProjectsFromPath()` function which may return multiple matches, and it was only being used in tests.

The relevant tests have been updated to use the multiple matches version instead, and updated to include the case where multiple matches are returned.

__Note:__ No changeset for this one since it's an internal function being removed, and doesn't need to be referenced in the public changelog.
2023-06-09 22:59:17 +00:00
Nathan Rajlich
dea58dea7e [cli] Add support for vc deploy --prebuilt command with repo link (#10083)
When repo linked, `vc deploy --prebuilt` will change working directory to the Project root directory, instead of the repo root, so that the project's local `.vercel/output` directory is what gets uploaded + deployed.
2023-06-09 09:54:17 +00:00
Steven
fecebfa7fa [cli] vc env pull should add .env*.local to .gitignore (#10085)
This is a follow up to PR #9892 which changed the default to `.env.local`.

Now that we know local files should never be committed to git, we can automatically add `.env*.local` to `.gitignore`. Note that this is the same ignore pattern that ships with create-next-app [as seen here](06abd63489/packages/create-next-app/templates/app/js/gitignore (L28)), so most Next.js users won't see anything change.

See the related [Linear ticket](https://linear.app/vercel/issue/VCCLI-461/)
2023-06-08 00:09:22 +00:00
Nathan Rajlich
94d5612dce [cli] Move readme copy logic to a helper function for vc link (#10084)
ncc has an issue with detecting + rewriting this file path for some reason. Moving to a helper function should work around that issue.

Fixing:

```
Error: ENOENT: no such file or directory, open '/node_modules/vercel/projects/VERCEL_DIR_README.txt'
```
2023-06-07 21:33:47 +00:00
Nathan Rajlich
3eaf58bb74 [cli] Add support for vc dev command with repo link (#10082)
When repo linked, `vc dev` already works fine when run from the root of the repo. This change makes it so that `vc dev` also works as expected when executed within a project subdirectory.
2023-06-07 18:48:28 +00:00
Nathan Rajlich
e63cf40153 [cli] Add support for vc build command with repo link (#10075)
When the repo is linked to Vercel with `vc link --repo`, the `vc build` command should be invoked from the project subdirectory (otherwise the project selector is displayed). The output directory is at `<projectRoot>/.vercel/output` instead of at the repo root.
2023-06-07 08:26:13 +00:00
Sean Massa
709c9509f4 Revert "Revert "[cli] Add support for vc pull command with repo link"" (#10078)
Reverts vercel/vercel#10076

Restores the original PR: https://github.com/vercel/vercel/pull/10071

With the fix from: https://github.com/vercel/vercel/pull/10073
2023-06-07 07:49:45 +00:00
Vercel Release Bot
7a0f377afe Version Packages (#10074)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-06-07 01:23:29 -05:00
Sean Massa
7923056bc0 Revert "[cli] Add support for vc pull command with repo link" (#10076) 2023-06-07 00:35:12 -05:00
Nathan Rajlich
71ff193ea3 [cli] Add support for vc pull command with repo link (#10071)
When the repo is linked to Vercel with `vc link --repo`, the `.vercel` directory will be created at the _project root_ instead of the _repo root_, and will still contain the `project.json`.

The difference is that the `orgId` and `projectId` props will not be present in the `project.json` file when repo linked, since that information is available at the root level `repo.json` file.
2023-06-06 22:01:37 +00:00
Vercel Release Bot
c21d93de44 Version Packages (#10062)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-06-06 16:34:04 -05:00
Kiko Beats
0039c8b5ce [node] Add isomorphic functions (#9947)
This PR allow using Web APIs in Serverless functions

```js
// api/serverless.js
export const GET = () => {
  return new Response(`new Response('👋 Hello from Serverless Web!)`)
}
```

More about that
https://nextjs.org/docs/app/building-your-application/routing/router-handlers

---------

Co-authored-by: Sean Massa <EndangeredMassa@gmail.com>
2023-06-06 23:15:10 +02:00
Nathan Rajlich
a5e32ec31d [cli] Add client.fetchPaginated() async iterator (#10054)
Adds async iterator helper function for interacting with endpoints that have pagination.

Implemented for use with `vc bisect` (fetching deployments) and `vc link --repo` (fetching projects).
2023-06-05 17:06:57 +00:00
Vercel Release Bot
4ad1cbbd7d Version Packages (#10058)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-06-02 19:29:17 -05:00
Vercel Release Bot
f373c94508 Version Packages (#10055)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-06-02 16:28:57 -05:00
Chris Barber
553c001eb0 [cli] vc build ignore .env* & ignore files for @vercel/static (#10056)
For projects with static files only (e.g. `@vercel/static` builder), do not copy`.env*`, `.vercelignore`, or `.nowignore` into the BOA output dir.
2023-06-02 21:04:03 +00:00
Chris Barber
f6c3a95783 [cli] Ensure .npmrc does not contain use-node-version (#10049)
When a project has a `.npmrc` containing `use-node-version`, package managers (notably `pnpm`) will download the specified Node.js version. This is not the correct way as it can lead to `pnpm` downloading Node.js 18 or newer which depends on a version of GLIBC that is not present in the current AWS image. The proper way is to set the `"engines"` in the `package.json`.

<img width="468" alt="image" src="https://github.com/vercel/vercel/assets/97262/0974cf05-6a11-4d95-88e8-13affc4aad2a">

Discussion: https://github.com/orgs/vercel/discussions/2436
2023-06-02 15:27:28 +00:00
Vercel Release Bot
4cd77608e8 Version Packages (#10020)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-06-01 10:09:24 -05:00