Commit Graph

799 Commits

Author SHA1 Message Date
Nathan Rajlich
ab826eb83d [cli] Serialize duplicate EdgeFunction references as symlinks in vc build (#11027)
Enables the symlink optimization that currently exists for `Lambda`
instances, but now for `EdgeFunction` instances as well. This will be
particularly beneficial for Remix applications which use edge functions
for many routes, since they will now all be represented by the same
underling function in production.

---------

Co-authored-by: Sean Massa <EndangeredMassa@gmail.com>
2024-01-10 13:17:59 -08:00
Nathan Rajlich
98040ec24e [build-utils] Deprecate EdgeFunction#name property (#11010)
The `name` property of the `EdgeFunction` class is no longer necessary
on the infra side. Instead, its value is inferred based on the URL path
that the function is representing. So deprecate the property on the
class, and remove its usage throughout the codebase.
2024-01-10 12:32:38 -08:00
Chris Barber
21c700aa93 [cli] Display actual deployment's 'target' (#11025)
The CLI renders the deploy URL with the "Preview" label on first deploy because the CLI treats deploys as previews unless `--prod` is set. However the first deploy for a new project is always production, so the CLI needs to render the deploy URL based on the actual deployment's `target`.
2024-01-10 14:05:52 +00:00
Trek Glowacki
597508ffa6 [cli] handle rate limit respones when fetching /teams endpoint (#11013)
Not the biggest fan of handling this here but of all the various location we do response handling, this seems to be the appropriate location.
2024-01-04 15:04:54 +00:00
Vercel Release Bot
57ee3e1fd5 [tests] Update Gatsby fixture versions (#10995)
Automatically generated PR to update Gatsby fixture versions in `@vercel/static-build`
2024-01-04 07:08:17 +00:00
Vercel Release Bot
83952e45c2 Version Packages (#10982)
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.0.2

### Patch Changes

-   Log extension execution failures ([#10937](https://github.com/vercel/vercel/pull/10937))

-   Updated dependencies \[[`fbe08fe57`](fbe08fe57e), [`77585013d`](77585013de), [`c536a74bc`](c536a74bc9), [`91f8763ed`](91f8763edc), [`7f8f5f865`](7f8f5f8651)]:
    -   @vercel/next@4.0.17
    -   @vercel/go@3.0.5
    -   @vercel/node@3.0.15
    -   @vercel/redwood@2.0.6
    -   @vercel/remix-builder@2.0.16

## @vercel/go@3.0.5

### Patch Changes

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

## @vercel/next@4.0.17

### Patch Changes

-   Ensure rewrites handle RSC requests ([#11005](https://github.com/vercel/vercel/pull/11005))

-   [next][node][redwood][remix] Bump `@vercel/nft@0.26.1` ([#11009](https://github.com/vercel/vercel/pull/11009))

## @vercel/node@3.0.15

### Patch Changes

-   Await waitUntil promises to resolve before exiting ([#10915](https://github.com/vercel/vercel/pull/10915))

-   [next][node][redwood][remix] Bump `@vercel/nft@0.26.1` ([#11009](https://github.com/vercel/vercel/pull/11009))

## @vercel/redwood@2.0.6

### Patch Changes

-   [next][node][redwood][remix] Bump `@vercel/nft@0.26.1` ([#11009](https://github.com/vercel/vercel/pull/11009))

## @vercel/remix-builder@2.0.16

### Patch Changes

-   [next][node][redwood][remix] Bump `@vercel/nft@0.26.1` ([#11009](https://github.com/vercel/vercel/pull/11009))

-   Update `@remix-run/dev` fork to v2.4.1 ([#10992](https://github.com/vercel/vercel/pull/10992))
2024-01-03 22:20:58 +00:00
Trek Glowacki
8e8f44a21d [static-build] Update stencil fixture to latest 4.x (#10990)
Update stencil framework fixture to latest minor in the major.
2024-01-03 21:13:45 +00:00
Steven
91f8763edc [next][node][redwood][remix] Bump @vercel/nft@0.26.2 (#11009)
https://github.com/vercel/nft/releases/tag/0.26.2
https://github.com/vercel/nft/releases/tag/0.26.1
https://github.com/vercel/nft/releases/tag/0.25.0
2024-01-03 15:18:30 -05:00
Brody McKee
b1e0523e71 [cli] log extension execution failures (#10937)
Co-authored-by: Nathan Rajlich <n@n8.io>
2024-01-03 16:05:18 +11:00
Vercel Release Bot
7f8f5f8651 [remix] Update @remix-run/dev to v2.4.1 (#10992)
This auto-generated PR updates `@remix-run/dev` to version 2.4.1.
2024-01-03 00:05:52 +00:00
JJ Kasper
fbe08fe57e [next] Ensure rewrites handle RSC requests (#11005)
This ensures we add handling for our internal `.rsc` suffixes for rewrites since this currently fail to match by default unless the user manually adds handling for this. Updated our test fixture to ensure this is tested properly.
2024-01-02 18:46:31 +00:00
Luc Leray
9903f11cc3 [examples] Fix ERR_PNPM_OUTDATED_LOCKFILE when deploying SvelteKit example (#10984)
Currently, [the SvelteKit (v1)](https://vercel.com/new/clone?b=main&s=https%3A%2F%2Fgithub.com%2Fvercel%2Fvercel%2Ftree%2Fmain%2Fexamples%2Fsveltekit-1&showOptionalTeamCreation=false&template=sveltekit-1&teamCreateStatus=hidden) example fails with:
```
ERR_PNPM_OUTDATED_LOCKFILE  Cannot install with "frozen-lockfile" because pnpm-lock.yaml is not up to date with package.json
```

This fixes the lockfile, and therefore fixes the example.

---

As a side-quest, I also fixed the "unmet peer" warnings:
```
└─┬ @vercel/style-guide 4.0.2
  ├── ✕ unmet peer eslint@^8.24.0: found 8.14.0
  ├── ✕ unmet peer prettier@^2.7.0: found 2.6.2
  └─┬ eslint-plugin-unicorn 43.0.2
    └── ✕ unmet peer eslint@>=8.18.0: found 8.14.0
```
2023-12-21 19:21:53 +00:00
Luc Leray
04f5f3f3d2 [examples] Fix TypeScript error in ionic react example (#10985)
The ionic react build currently fails with:
```
$ react-scripts build
09:06:23.084 | Creating an optimized production build...
09:06:45.231 | Failed to compile.
09:06:45.231 |  
09:06:45.232 | /vercel/path0/node_modules/@types/babel__traverse/index.d.ts
09:06:45.232 | TypeScript error in /vercel/path0/node_modules/@types/babel__traverse/index.d.ts(314,13):
09:06:45.232 | Type expected.  TS1110
09:06:45.232 |  
09:06:45.232 | 312 \|         // too complex for TS. So we type it as a general visitor only if the key contains `\|`
09:06:45.232 | 313 \|         // this is good enough for non-visitor traverse options e.g. `noScope`
09:06:45.232 | > 314 \|         [k: `${string}\|${string}`]: VisitNode<S, Node>;
09:06:45.232 | \|             ^
09:06:45.232 | 315 \|     };
09:06:45.232 | 316 \|
09:06:45.232 | 317 \| export type VisitNode<S, P extends Node> = VisitNodeFunction<S, P> \| VisitNodeObject<S, P>;
09:06:45.232
```

Upgrading to TypeScript 4 fixes the issue.

---------

Co-authored-by: Trek Glowacki <trek.glowacki@vercel.com>
2023-12-21 13:04:26 -06:00
Trek Glowacki
5e3c077b6b [static-build] update ionic/angular to latest v7 (#10986)
update ionic/angular to latest v7. Needed to add and `overrides` entry.
Some packages just specify angular >= 14 and this bumps us to angular
17, which we're not ready for yet.
2023-12-21 11:01:52 -06:00
Trek Glowacki
2cc2fac819 Revert #10980 (#10989)
Undoes #10980 (mostly). This appears to be some kind of caching issue. Works locally until you run `eslint` without `--cache` and then it will reproduce. Hopefully this is the last time and we're not playing whack-a-mole with these pragmas every day?
2023-12-21 16:17:38 +00:00
Seiya Nuta
c536a74bc9 [node] Await waitUntil promises to resolve before exiting (#10915)
Say you have a middleware (`middleware.js`) that looks like this:

```js
export async default function middleware(req, ctx) {
  ctx.waitUntil(tooLongFunction())
}

async function tooLongFunction() {
  console.log('tooLongFunction started')
  await new Promise((resolve) => setTimeout(resolve, 10000))
  console.log('tooLongFunction finished')
}
```

When you run this middleware locally with `vercel dev`, you won't see the `tooLongFunction finished` message because the server process is killed right after finishing the response. While Edge Runtime's `server.close()`, which awaits all `waitUntil` promises, is called, but `exit-hook`'s callback in CLI doesn't wait for the `close` promise to resolve.

This PR fixes this by allowing an optional graceful shutdown callback instead of killing the process immediately.
2023-12-21 10:11:34 +00:00
Trek Glowacki
838d56c31c [static-build] Add Angular 17 fixture (#10969)
Add Angular 17 fixture
2023-12-20 21:25:04 +00:00
Nathan Rajlich
77585013de [go] Remove VERCEL_USE_GO_PROVIDED_RUNTIME env var check (#10968)
Feature flag has been rolled out for long enough now. Remove this check.
2023-12-20 11:35:12 -08:00
Trek Glowacki
44569e6929 Remove unneeded global directives (#10980)
An update to latest `turbo` somehow made these no longer required? 🤷

---------

Co-authored-by: Sean Massa <EndangeredMassa@gmail.com>
2023-12-20 12:14:10 -06:00
Vercel Release Bot
6194e8ca8d Version Packages (#10971)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-12-20 08:34:34 -06:00
Wyatt Johnson
7b0adf371b [next] App Pages Prerender Manifest Update (#10978)
Previously routes that did not have a `dataRoute` key in the `prerender-manifest.json` would be treated as an App Route. The logic has been updated (for partial prerendering support) to also consider the new `prefetchDataRoute`. Entries with either of these keys are treated as an App Page instead of an App Route.

This also addressed the scenerio where a app route (`route.ts`) with a dynamic segment (`/api/[slug]/route.ts`) which doesn't emit a `.body` during build doesn't cause the build to fail by checking for the file first.
2023-12-19 21:03:18 +00:00
S3Prototype
471bdd5b45 Update nuxt logo (#10977)
We're using an out of date Nuxt logo, and the team has requested an update. This PR updates it
2023-12-19 20:29:59 +00:00
Nathan Rajlich
67fa2f3dd6 [build-utils] Extend Node v16 discontinue date to 2024-06-15 (#10967)
AWS has extended the discontinue date for `nodejs16.x` Lambda runtime, so we will follow suit.
2023-12-18 23:45:45 +00:00
Vercel Release Bot
b67b97023b Version Packages (#10944)
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.0.0

### Major Changes

- [cli] replace `--deprecated` with `--update-required` in `vc project
ls` ([#10965](https://github.com/vercel/vercel/pull/10965))

### Patch Changes

- Fix `vercel bisect` selecting too many deployments
([#10956](https://github.com/vercel/vercel/pull/10956))

- Updated dependencies
\[[`6a9002f22`](6a9002f229),
[`4d63d9e95`](4d63d9e954)]:
    -   @vercel/remix-builder@2.0.15
    -   @vercel/build-utils@7.4.0
    -   @vercel/static-build@2.0.15
    -   @vercel/node@3.0.13

## @vercel/build-utils@7.4.0

### Minor Changes

- Adds new helper `getPathForPackageManager()`
([#10918](https://github.com/vercel/vercel/pull/10918))

## @vercel/client@13.0.11

### Patch Changes

- Updated dependencies
\[[`4d63d9e95`](4d63d9e954)]:
    -   @vercel/build-utils@7.4.0

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

### Patch Changes

- Add support for "rewrites"
([#10954](https://github.com/vercel/vercel/pull/10954))

- Updated dependencies
\[[`4d63d9e95`](4d63d9e954)]:
    -   @vercel/build-utils@7.4.0

## @vercel/node@3.0.13

### Patch Changes

- Updated dependencies
\[[`4d63d9e95`](4d63d9e954)]:
    -   @vercel/build-utils@7.4.0

## @vercel/remix-builder@2.0.15

### Patch Changes

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

## @vercel/static-build@2.0.15

### Patch Changes

- Updated dependencies
\[[`652a31275`](652a312753)]:
    -   @vercel/gatsby-plugin-vercel-builder@2.0.13

## @vercel-internals/types@1.0.18

### Patch Changes

- Updated dependencies
\[[`4d63d9e95`](4d63d9e954)]:
    -   @vercel/build-utils@7.4.0

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-12-18 12:25:56 -07:00
Ethan Arrowood
9146885f80 [cli] replace --deprecated with --update-required in vc project ls (#10965)
Replaces the new `--deprecated` option with `--update-required` in the `vc project ls` command.
2023-12-18 19:10:07 +00:00
Mitch (a.k.a Voz)
98bc41d49a fix: Doc links in auth files (#10955)
Fixed the links in the auth files to reflect what the doc links currently are.
2023-12-18 16:59:19 +00:00
Trek Glowacki
211c74a7d2 [static-build] Add vite@5 test fixture (#10953)
Add vite@5 test fixture
2023-12-15 18:58:29 +00:00
Trek Glowacki
2a40ff564e [static-build] update ember-v5 fixture to latest minor (#10957)
Update ember-v5 fixture to latest minor.
2023-12-15 18:32:14 +00:00
Trek Glowacki
d4cf2b9ae6 [static-build] Update astro-v3 to fixture to latest (#10952)
Update astro-v3 to fixture to latest
2023-12-15 18:07:55 +00:00
Trek Glowacki
7695316cd4 [examples] Update sveltekit1 fixture to latest 1.x (#10948)
Update sveltekit1 fixture to latest 1.x
2023-12-15 16:22:00 +00:00
Trek Glowacki
7ecb146fdb [examples] Update ionic-react to latest (#10949)
Update ionic-react example to latest minor of its current major.
2023-12-15 09:02:18 +00:00
Trek Glowacki
ec3d6ad640 [static-build] Update storybook-v7 fixture to latest (#10951)
Update storybook-v7 fixture to latest
2023-12-15 08:38:45 +00:00
Nathan Rajlich
5d521af586 [cli] Fix vc bisect selecting too many deployments (#10956) 2023-12-15 00:17:29 -08:00
Nathan Rajlich
652a312753 [gatsby-plugin-vercel-builder] Add support for "rewrites" (#10954) 2023-12-14 17:08:07 -08:00
Trek Glowacki
bd516c505b [static-build] Update test fixture stencil-v4 to latest (#10950)
Update test fixture stencil-v4 to latest
2023-12-14 17:18:43 +00:00
Felix Haus
4d63d9e954 [build-utils] Add getPathForPackageManager (#10918)
To use this outside of CLI we want a way to suppress the `console.log`s in `getEnvForPackageManager`.
For achieving this, we introduce a new helper `getPathForPackageManager()` which contains the core logic.

Best to review commit by commit + hide whitespace.

**X-Ref**
- [Internal Context](https://vercel.slack.com/archives/C03F2CMNGKG/p1701970097725689)
2023-12-14 15:17:20 +00:00
Vercel Release Bot
6a9002f229 [remix] Update @remix-run/dev to v2.4.0 (#10943)
This auto-generated PR updates `@remix-run/dev` to version 2.4.0.
2023-12-14 04:05:10 +00:00
Vercel Release Bot
2829d541b8 Version Packages (#10939) 2023-12-13 07:46:11 -07:00
Ethan Arrowood
6880dcb3c3 [cli] Use new deprecated query param in projects api for vc project ls --deprecated (#10938)
Uses the new `deprecated` query param for the GET /projects API instead of client-side filtering.

This enables a better UX so that results are properly paginated. 

Here are some example runs:

Pagination works as expected:
<img width="831" alt="Screenshot 2023-12-12 at 20 59 57" src="https://github.com/vercel/vercel/assets/16144158/c592752d-bf49-41a0-8dae-8b8e233052f8">

Usage without the flag results in different output (as expected!)
<img width="830" alt="Screenshot 2023-12-12 at 21 04 52" src="https://github.com/vercel/vercel/assets/16144158/c65461e0-b4a0-4725-aaae-a63739e6c8e9">
2023-12-13 07:22:10 +00:00
Trek Glowacki
832ba4b69a [tests] Add "Summary" Step to release workflow (#10936) 2023-12-12 15:08:12 -06:00
Vercel Release Bot
9a250d528c Version Packages (#10935)
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@32.7.1

### Patch Changes

- [cli] double page limit for vc project ls --deprecated
([#10932](https://github.com/vercel/vercel/pull/10932))

- Updated dependencies
\[[`d09dd1794`](d09dd1794b)]:
    -   @vercel/remix-builder@2.0.14

## @vercel/remix-builder@2.0.14

### Patch Changes

- Reinstall dependencies during `prepareCache()`
([#10922](https://github.com/vercel/vercel/pull/10922))

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-12-12 10:31:23 -07:00
Vercel Release Bot
382ff2f526 [tests] Update Gatsby fixture versions (#10931)
Automatically generated PR to update Gatsby fixture versions in
`@vercel/static-build`

---------

Co-authored-by: Ethan Arrowood <ethan.arrowood@vercel.com>
2023-12-12 09:52:07 -07:00
Ethan Arrowood
f80a59c73f [cli] double page limit for vc project ls --deprecated (#10932)
As titled. Increases api page size for `vc project ls` when
`--deprecated` is used.

This is a temporary workaround since we do the filtering "client-side".
We will eventually update the API itself to support this and then we can
remove the client-based filter and reduce the page limit back to the
ideal `20`.

---------

Co-authored-by: Sean Massa <EndangeredMassa@gmail.com>
2023-12-12 08:27:25 -07:00
Nathan Rajlich
d09dd1794b [remix] Reinstall dependencies during prepareCache() (#10922)
https://github.com/vercel/vercel/pull/10819 introduced a bug causing the `prepareCache()` function to fail (due to `@remix-run/dev` no longer being require-able). Even if it were not failing, the deps installed are not a valid representation of the user's `package.json` / lockfile. So to have more truthful cache contents, run `npm install` once again during `prepareCache()` to fix both issues at the same time.
2023-12-12 00:41:51 +00:00
Zack Tanner
ab34a26205 [tests] fix brittle next rewrite probe test (#10934)
It seems the intention of this test was to verify that the rewritten
file matches the original file, but it does so by just asserting on
arbitrary script text, which is brittle and broke as a result of
https://github.com/vercel/next.js/pull/56294

The right way to test this would be to fetch the original script and
compare the contents with the rewritten script, but this relies on
`__NEXT_SCRIPT__` magic which is only available in probe checks. For now
this just asserts on a valid status code, as a chunk that isn't properly
rewritten should 404 in this case.
2023-12-11 16:24:43 -08:00
Vercel Release Bot
7582571d94 Version Packages (#10913)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-12-11 10:39:34 -06:00
John Pham
e6aaf79d04 Update Next.js screenshot preview (#10921)
This new screenshot matches the template. It removes the version number
so this screenshot will not go stale.
2023-12-08 11:25:42 -08:00
Ethan Arrowood
a1df25a197 [cli] Clean up project ls --deprecate (#10926)
Follow up to #10919

Removes console.log statements and changes log into warning.
2023-12-08 17:55:24 +00:00
Ethan Arrowood
dfe47f6e6c [cli] add --deprecated option to vc project ls command (#10919)
Adds a `--deprecated` option to the `vc project ls` command that will only show projects currently running on a soon-to-be-deprecated Node.js version.

It also adds additional output providing more information to the user about what versions and a link to our documentation so they can learn more.

Example:

<img width="836" alt="Screenshot 2023-12-07 at 15 01 22" src="https://github.com/vercel/vercel/assets/16144158/3b7f7b13-802e-4af1-a76e-a158a477beb4">
2023-12-08 17:09:18 +00:00
Vercel Release Bot
3a58431695 [examples][tests] Upgrade Next.js to version 14.0.4 (#10923)
This auto-generated PR updates 7 packages to Next.js version 14.0.4
2023-12-08 11:17:39 +01:00