Commit Graph

799 Commits

Author SHA1 Message Date
Vercel Release Bot
49c7178567 [remix] Update @remix-run/dev to v1.17.0 (#10072)
This auto-generated PR updates `@remix-run/dev` to version 1.17.0.
2023-06-06 20:31:48 +00:00
Ethan Arrowood
b038b29614 Add vercel.json setting overrides to storybook example for zero-config experience (#10067)
This PR adds necessary configuration overrides to the storybook example so that it can have a zero-config experience.
2023-06-06 00:52:38 +00: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
Florentin / 珞辰
bc5afe24c4 [node] add maxDuration config support for vc node deployments (#10028)
This PR enables specifying `maxDuration` in `config` for node vc
deployments.

---------

Co-authored-by: Nathan Rajlich <n@n8.io>
2023-06-05 10:05:53 +02: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
Chris Barber
cd35071f60 Attempting to publish build-utils and vercel (#10057) 2023-06-02 19:22:22 -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
Nathan Rajlich
67e20a6ede [cli] Add repo linking support for deploy command (#10013)
Adds support for `vercel deploy` command when the repository has been linked via `vercel link --repo`.
2023-05-31 18:07:30 +00:00
JJ Kasper
c63679ea0a Revert "[next] Update rsc content-type test fixtures" (#10040)
Relies on https://github.com/vercel/next.js/pull/50472 this should only be merged after the Next.js PR is released to canary

Reverts vercel/vercel#10023
2023-05-31 15:38:22 +00:00
Nathan Rajlich
ef30a46c03 [cli] Add client.cwd to unify all working directory related logic (#10031)
A few commands were still checking on `--cwd` explicitly, which is incorrect since the entrypoint file already handles the directory change.

The new `client.cwd` property is a helper to make writing tests easier. Tests no longer need to `chdir()` explicitly and then revert afterwards.
2023-05-26 20:42:03 +00:00
Shohei Maeda
b56ac2717d [next] Pass pageExtensions data to apiLambdaGroups (#10015)
Right now, we can't detect API routes correctly if `pageExtensions` is set:

> WARNING: Unable to find source file for page xxxx with extensions: js, jsx, ts, tsx, this can cause functions config from `vercel.json` to not be applied
2023-05-26 18:01:05 +00:00
Shohei Maeda
c6c19354e8 [next] Fix functions config with App Router (#9889)
We added appDir support in https://github.com/vercel/vercel/pull/9811 so that users can customize `memory`/`maxDuration` for routes in appDir.

But since RSC is enabled by default in Next.js 13, `vercel build` still reports some warning messages, such as:

```json
"functions": {
  "app/**/*": {
    "maxDuration": 5,
    "memory": 512
  }
}
```
```
WARNING: Unable to find source file for page hello.js with extensions: ts, tsx, js, jsx, md, mdx, this can cause functions config from `vercel.json` to not be applied
WARNING: Unable to find source file for page index.js with extensions: ts, tsx, js, jsx, md, mdx, this can cause functions config from `vercel.json` to not be applied
```

To suppress these errors and properly apply `functions` setting to those routes, updating the current detection logic to also search `page.${ext}` files.
2023-05-25 21:01:29 +00:00
JJ Kasper
96b2502133 [next] Update rsc content-type test fixtures (#10023)
This updates the tests to the latest expected content-type header for RSC responses. 

x-ref: https://github.com/vercel/next.js/pull/50314
2023-05-25 08:32:53 +00:00
Chris Barber
a73ec6343f [cli] Clean up 'vc rollback' (#10019)
This PR removes dependency on the deprecated `lastRollbackTarget` project property and adopts many of the code conventions used in `vc promote`.

Important! Please merge #9984 first!
2023-05-24 19:10:28 +00:00
Chris Barber
4bd70d4b6e [cli] New vc promote command (#9984)
~This PR is blocked by https://github.com/vercel/api/pull/19508.~

Linear: https://linear.app/vercel/issue/VCCLI-262/cli-new-command-to-promote-deployment
2023-05-24 17:22:11 +00:00
Javi Velasco
c7bcea4081 Remove usage of env from Edge Functions and Middleware (#10018)
Co-authored-by: Steven <steven@ceriously.com>
2023-05-24 18:22:43 +02:00
Vercel Release Bot
aab95532d6 Version Packages (#10006)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-05-24 10:13:01 -05:00
Sean Massa
1b18c853c2 [cli] implement vc deploy --prod --skip-domain (#9836)
Adds the `--skip-domain` option to be used like `vc deploy --prod --skip-domain`. This passes along the `autoAliasCustomDomains: false` flag to the API so that the deployment will not auto alias domains for this deployment.

This PR also moves the `commands/deploy/archive` fixture to `commands/deploy/static` to better describe what the fixture is, not how it is sometimes used in a test.

---

Depends on: https://github.com/vercel/api/pull/18730
Card: https://linear.app/vercel/issue/VCCLI-276/cli-allow-creation-of-production-deployment-without-auto-alias
2023-05-23 19:26:47 +00:00
Samuel Bodin
a19edc985b [cli] Fix vercel git connect command when passing a URL parameter (#9967)
Hey team,

I had an error this morning when trying to link my repo using the CLI 
![Screenshot 2023-05-17 at 11 38 01](https://github.com/vercel/vercel/assets/1637651/798d6e4f-8c9e-41b7-b712-0322001fca02)


Seems like a combination of `: any` and a recent refacto introduced an issue here.

~- Removed all `any` that were hiding the error~
- Correctly pass the URL already parsed

~- Removed the second useless parsing~
~- Added missing `--help` flag~
  ~I noticed you never specify them and Typescript screams because of that, not sure if on purpose and how you make the compilation pass with this error. Don't hesitate to tell me.~

The fix could be improved by using `arg.Result<THE_ACTUAL_TYPE>` but that would require to store the dictionnary of flags somewhere else and also create an external type. This is already better so...

--- 

NB: 
I had multiple issues while cloning this repo
- pnpm bootstrap does not work
- missing `constants.ts` file that is not explained in the Contributing guidelines
- maybe due to bootstrap not working, almost nothing else worked and the tests too.
2023-05-23 02:50:42 +00:00
Dan Stowell
1b0d72aba5 [cli] Change vc env pull default output file to .env.local (#9892)
`vc deploy` ignores `.env.local`. To make sure we don't inadvertently
push people's secrets to source control, have all environment pulls
default to writing to `.env.local`.
2023-05-22 15:24:38 -07:00
Chris Barber
cdf55b3b1a [cli] New vc redeploy command (#9956)
This adds a new `vc redeploy <url-or-id>` command. It fetches the requested deployment, then performs a redeploy with similar output to `vc deploy` including the ability to pipe the deployment URL into a file or program.

### Redeploy Example:

<img width="650" alt="image" src="https://github.com/vercel/vercel/assets/97262/b17fc424-558b-415c-8b74-63e450f4b753">

### Bad deployment URL:

<img width="579" alt="image" src="https://github.com/vercel/vercel/assets/97262/0cb53209-396e-4490-b5d0-744d5d870aaf">

### No args:

<img width="622" alt="image" src="https://github.com/vercel/vercel/assets/97262/cb36d625-991b-41fa-bb49-d7d36c1a201b">

Linear: https://linear.app/vercel/issue/VCCLI-558/cli-new-command-to-redeploy
2023-05-22 22:08:49 +00:00
Nathan Rajlich
8de42e0a70 [cli] Remove --platform-version global common arg (#9807)
Removes the unused `--platform-version` flag from the common args.

Technically this is a breaking change, so we should probably hold off on merging until we plan to do a major version bump.
2023-05-22 21:44:52 +00:00
Vercel Release Bot
46950633f4 Version Packages (#9994) 2023-05-22 10:47:47 -07:00
Sean Massa
761db597be clarify next.js dupe api directory warning (#9979)
In a Next.js app, if you have Node.js Functions in both `api` and `pages/api`, you'll get a warning about moving those `api` functions into `pages/api`. This does specify Node.js Functions already, but a user was confused and tried to move their non-Node.js functions into `pages/api` as well.

This PR tries to make it clearer that you can do both. Note that this still requires a non-ideal local dev setup where you:

- update next config to fall back to the `vc dev` port for `api` handlers
- run `next dev` for the Next.js app on one port
- run `vc dev` for the top-level `api` Functions on another port

---

Example repo: https://github.com/rexfordessilfie/vercel-api-languages
2023-05-19 19:31:32 +00:00
Nathan Rajlich
671e63e7b8 [cli] Add vc link --repo flag (alpha) (#8931)
Adding a new `--repo` flag to `vc link` which is a new linking style to
link to a Git URL rather then directly to a single Vercel Project. This
allows for multiple Projects to be linked simultaneously, which is
useful for monorepo setups.

Utilization of this new linking style in other commands will be done in
a follow-up PR.
2023-05-19 11:53:49 -07:00
Vercel Release Bot
f7bdc6cc26 Version Packages (#9991)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-05-19 12:08:50 -05:00
Sean Massa
e94a153b2f add repo details for packages that are missing it (#9990) 2023-05-19 12:02:12 -05:00
Vercel Release Bot
74e639a772 Version Packages (#9978)
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@6.7.3

### Patch Changes

- Deprecate Node.js 14.x and 16.x with warning
([#9976](https://github.com/vercel/vercel/pull/9976))

## vercel@29.3.5

### Patch Changes

- Updated dependencies
\[[`2c950d47a`](2c950d47ae),
[`71b9f3a94`](71b9f3a94b),
[`f00b08a82`](f00b08a820)]:
    -   @vercel/static-build@1.3.31
    -   @vercel/build-utils@6.7.3
    -   @vercel/next@3.8.5
    -   @vercel/node@2.14.3
    -   @vercel/remix-builder@1.8.10

## @vercel/client@12.5.1

### Patch Changes

- Updated dependencies
\[[`71b9f3a94`](71b9f3a94b)]:
    -   @vercel/build-utils@6.7.3

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

### Patch Changes

- Updated dependencies
\[[`71b9f3a94`](71b9f3a94b)]:
    -   @vercel/build-utils@6.7.3
    -   @vercel/node@2.14.3

## @vercel/next@3.8.5

### Patch Changes

- [next] Ensure app functions are detected/separated properly
([#9989](https://github.com/vercel/vercel/pull/9989))

## @vercel/node@2.14.3

### Patch Changes

- Updated dependencies
\[[`71b9f3a94`](71b9f3a94b)]:
    -   @vercel/build-utils@6.7.3

## @vercel/remix-builder@1.8.10

### Patch Changes

- Updated dependencies
\[[`71b9f3a94`](71b9f3a94b)]:
    -   @vercel/build-utils@6.7.3

## @vercel/static-build@1.3.31

### Patch Changes

- ensure cleanup after gatsby plugin runs
([#9975](https://github.com/vercel/vercel/pull/9975))

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

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-05-19 09:34:26 -07:00
JJ Kasper
f00b08a820 [next] Ensure app functions are detected/separated properly (#9989)
Follow-up to https://github.com/vercel/vercel/pull/9974 this uses the `lambdaAppPaths` as the source of truth instead of the manifest which is more accurate for separating/detecting. Also adds additional test cases for new root and index app functions. 

x-ref: https://github.com/vercel/next.js/issues/49169
2023-05-19 16:22:44 +00:00
Sean Massa
2c950d47ae ensure cleanup after the gatsby plugin runs (#9975)
There is an issue where you can interrupt a gatsby project build and the temporary files are not cleaned up. If you try to build again, it will get stuck in an infinite loop.

This PR adds an exit hook to make sure the cleanup happens.
2023-05-18 19:42:08 +00:00
Sean Massa
71b9f3a94b Deprecate Node.js 14.x and 16.x with warning (#9976)
Node.js 14 and 16 are being deprecated. This PR will cause a warning when they are used today and an error after August 15.
2023-05-18 19:03:01 +00:00
Vercel Release Bot
91b7f6dcd9 Version Packages (#9973)
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@29.3.4

### Patch Changes

- Updated dependencies
\[[`67e556bc8`](67e556bc80),
[`ba10fb4dd`](ba10fb4dd4)]:
    -   @vercel/remix-builder@1.8.9
    -   @vercel/next@3.8.4

## @vercel/next@3.8.4

### Patch Changes

- Update handling for react prebundled flag
([#9974](https://github.com/vercel/vercel/pull/9974))

## @vercel/remix-builder@1.8.9

### Patch Changes

- Upgrade `@remix-run/dev` fork to v1.16.1
([#9971](https://github.com/vercel/vercel/pull/9971))

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-05-18 10:38:24 -07:00
JJ Kasper
ba10fb4dd4 [next] Update handling for react prebundled flag (#9974)
This ensures we properly set the prebundled react flag conditionally for
app and pages ensuring they are kept separate when bundling.

x-ref: https://github.com/vercel/next.js/issues/49169
2023-05-18 06:37:50 -07:00
Vercel Release Bot
67e556bc80 [remix] Upgrade @remix-run/dev to version 1.16.1 (#9971)
This auto-generated PR updates @remix-run/dev to version 1.16.1
2023-05-17 19:34:12 +00:00
Vercel Release Bot
c879401bbc Version Packages (#9966)
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@29.3.3

### Patch Changes

- Updated dependencies
\[[`6c6f3ce9d`](6c6f3ce9d2)]:
    -   @vercel/next@3.8.3

## @vercel/next@3.8.3

### Patch Changes

- Ensure un-necessary rsc routes are not added
([#9963](https://github.com/vercel/vercel/pull/9963))

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-05-17 10:45:41 +02:00
JJ Kasper
6c6f3ce9d2 [next] Ensure un-necessary rsc routes are not added (#9963)
These routes aren't needed for RSC as `_next/data` isn't used for
routing app paths.

x-ref: [slack
thread](https://vercel.slack.com/archives/C058FQFKAGH/p1684272340654679?thread_ts=1684271538.503259&cid=C058FQFKAGH)
2023-05-16 16:33:09 -07:00
Vercel Release Bot
06113d3e39 Version Packages (#9962)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-05-16 15:53:57 -05:00
Luc Leray
5150f21404 [vc dev] Fix serverless function size limit condition (#9961)
Co-authored-by: Sean Massa <EndangeredMassa@gmail.com>
2023-05-16 14:17:00 -05:00
Vercel Release Bot
d8e3b6e738 Version Packages (#9950)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Sean Massa <EndangeredMassa@gmail.com>
2023-05-16 11:48:06 -05:00
Nathan Rajlich
14c877e468 [cli] Sort keys in vc env pull (#9949)
Makes sense to have the output be deterministic. Alphabetical sort seems like a logical choice.
2023-05-12 22:08:59 +00:00
Vercel Release Bot
b739c1845c Version Packages (#9939)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-05-11 10:46:10 -05:00
Sean Massa
e9f0fcf397 [cli] remove vc rollback beta label (#9928)
Remove the "beta" label from `vc rollback`.
2023-05-11 15:16:48 +00:00
Vercel Release Bot
380ed38c71 Version Packages (#9935)
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@29.2.1

### Patch Changes

-   Updated dependencies \[[`6d5983eaa`](6d5983eaae)]:
    -   @vercel/remix-builder@1.8.8

## @vercel/remix-builder@1.8.8

### Patch Changes

-   Upgrade `@remix-run/dev` to v1.16.0-patch.1 to fix erroneous "not found in your node_modules" warning ([#9930](https://github.com/vercel/vercel/pull/9930))
2023-05-10 22:55:42 +00:00
Nathan Rajlich
9bd92535d6 Use Svelte's changelog generator and don't delete CHANGELOG.md (#9933)
Partial revert of #9932, since apparently [that didn't
work](https://github.com/vercel/vercel/actions/runs/4941266637/jobs/8833725828).

We can investigate that more later, but this gets it working again
properly at least.

Also use Svelte's changelog generator, since it includes the PR numbers
which Sean wanted.
2023-05-10 14:41:19 -07:00
Vercel Release Bot
6d5983eaae [remix] Upgrade @remix-run/dev to version 1.16.0-patch.1 (#9930)
This auto-generated PR updates @remix-run/dev to version 1.16.0-patch.1
2023-05-10 20:20:15 +00:00
Nathan Rajlich
2fd59a3b5a Use changesets instead of lerna (#9914)
`changesets` will improve our release workflow, since we will no longer need to manually curate and publish the changelog and GitHub Release. Instead, you simply merge the publish PR that the changesets GH action maintains as we push commits to `main`.
2023-05-10 19:35:17 +00:00