Compare commits

...

64 Commits

Author SHA1 Message Date
Vercel Release Bot
423630a168 Version Packages (#11589)
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@8.1.1

### Patch Changes

- [build-utils] pnpm lockfile testing and fixing
([#11591](https://github.com/vercel/vercel/pull/11591))

## vercel@34.1.12

### Patch Changes

- Updated dependencies
\[[`67afc2608`](67afc26085),
[`2f7a6ed5f`](2f7a6ed5f9)]:
    -   @vercel/next@4.2.11
    -   @vercel/build-utils@8.1.1
    -   @vercel/node@3.1.2
    -   @vercel/static-build@2.5.6

## @vercel/client@13.2.4

### Patch Changes

- Updated dependencies
\[[`2f7a6ed5f`](2f7a6ed5f9)]:
    -   @vercel/build-utils@8.1.1

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

### Patch Changes

- Updated dependencies
\[[`2f7a6ed5f`](2f7a6ed5f9)]:
    -   @vercel/build-utils@8.1.1

## @vercel/next@4.2.11

### Patch Changes

- normalize source file locations for special metadata files
([#11579](https://github.com/vercel/vercel/pull/11579))

## @vercel/node@3.1.2

### Patch Changes

- Updated dependencies
\[[`2f7a6ed5f`](2f7a6ed5f9)]:
    -   @vercel/build-utils@8.1.1

## @vercel/static-build@2.5.6

### Patch Changes

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

## @vercel-internals/types@1.0.33

### Patch Changes

- Updated dependencies
\[[`2f7a6ed5f`](2f7a6ed5f9)]:
    -   @vercel/build-utils@8.1.1

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-05-13 13:18:24 -05:00
Sean Massa
2f7a6ed5f9 [build-utils] log pnpm lockfile selection (#11591)
Both `pnpm@6` and `pnpm@7` can parse lockfile versions `5.3` and `5.4`, but if there's a mismatch, `pnpm` will output a warning saying so. In order to prevent confusing warnings from being displayed to the user, this PR aligns the pnpm version with the exact lockfile verison.

It also adds a debug log to show which package manager version was determined based on the lockfile version.
2024-05-13 18:16:24 +00:00
Zack Tanner
67afc26085 [next]: normalize source path for special app-dir metadata files (#11579)
When specifying a functions configuration in `vercel.json`, we attempt to find source files for all entrypoints.  This attempts to normalize those source paths for some special cases so that we don't show a build warning for completely normal usage.

- `/_not-found` is an entrypoint automatically inserted by Next.js -- if we don't find a source file for it, don't warn, as the user might not have added one
- special metadata files like `favicon.ico` and `opengraph-image.<ext>` will be bundled as `favicon.ico/route.js` but the source file will be the raw extension.
2024-05-13 16:04:16 +00:00
Vercel Release Bot
c224fb1d2e Version Packages (#11584)
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@8.1.0

### Minor Changes

- Update pnpm version detection logic
([#11445](https://github.com/vercel/vercel/pull/11445))
    Add support for pnpm 9

## vercel@34.1.11

### Patch Changes

- Updated dependencies
\[[`5014b1e82`](5014b1e82a),
[`18d1703d5`](18d1703d5b),
[`e87d4c14d`](e87d4c14d0),
[`bc5fd4115`](bc5fd41158)]:
    -   @vercel/build-utils@8.1.0
    -   @vercel/next@4.2.10
    -   @vercel/redwood@2.0.9
    -   @vercel/remix-builder@2.1.6
    -   @vercel/node@3.1.1
    -   @vercel/static-build@2.5.5

## @vercel/client@13.2.3

### Patch Changes

- Updated dependencies
\[[`5014b1e82`](5014b1e82a)]:
    -   @vercel/build-utils@8.1.0

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

### Patch Changes

- Updated dependencies
\[[`5014b1e82`](5014b1e82a)]:
    -   @vercel/build-utils@8.1.0

## @vercel/next@4.2.10

### Patch Changes

- skip action rewrites for RSC requests
([#11576](https://github.com/vercel/vercel/pull/11576))

- Bump `@vercel/nft@0.27.0`
([#11580](https://github.com/vercel/vercel/pull/11580))

## @vercel/node@3.1.1

### Patch Changes

- Bump `@vercel/nft@0.27.0`
([#11580](https://github.com/vercel/vercel/pull/11580))

- Updated dependencies
\[[`5014b1e82`](5014b1e82a)]:
    -   @vercel/build-utils@8.1.0

## @vercel/redwood@2.0.9

### Patch Changes

- Bump `@vercel/nft@0.27.0`
([#11580](https://github.com/vercel/vercel/pull/11580))

## @vercel/remix-builder@2.1.6

### Patch Changes

- Bump `@vercel/nft@0.27.0`
([#11580](https://github.com/vercel/vercel/pull/11580))

- Update `@remix-run/dev` fork to v2.9.2-patch.2
([#11582](https://github.com/vercel/vercel/pull/11582))

## @vercel/static-build@2.5.5

### Patch Changes

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

## @vercel-internals/types@1.0.32

### Patch Changes

- Updated dependencies
\[[`5014b1e82`](5014b1e82a)]:
    -   @vercel/build-utils@8.1.0

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-05-11 14:36:18 -05:00
Erika Rowland
5014b1e82a Update pnpm version detection logic (#11445)
The code we use to detect the version of `pnpm` based on lockfiles is hard to follow. It doesn't pick and executable, it instead of *sometimes* overrides the `PATH` for these utilities with a prepended alternate path. 

This means that there is no one single place where we definitively specify which version of `pnpm` that is used, so much as *hope* that the `PATH` has the correct version on it. I don't know that we *can* specify an executable outside of the build container, and it's unclear, since this is a package, whether this utility is used outside of a build container setting.

In this pull request I cleaned up the code and updated the logic to include the `pnpm 7` and `pnpm 8` changes requested, with no changes yet to implement `pnpm 9`.

It's possible that we want to rewrite this detection logic from scratch to avoid this roundabout way of "finding" the executable, but I haven't done that here.
2024-05-11 07:09:53 +00:00
Steven
6a8a84907b [tests] remove styfle from codeowners (#11585)
Remove `styfle` from codeowners
2024-05-11 04:25:41 +00:00
Sean Massa
722adf0e10 some errors can specify retries (#11581)
Trying a different approach to retrying errors when logs must contain a value.

Alternative to: https://github.com/vercel/vercel/pull/11577
2024-05-10 22:19:10 +00:00
Vercel Release Bot
bc5fd41158 [remix] Update @remix-run/dev to v2.9.2-patch.2 (#11582)
This auto-generated PR updates `@remix-run/dev` to version 2.9.2-patch.2.
2024-05-10 21:35:49 +00:00
Austin Merrick
e87d4c14d0 [node][next][redwood][remix] bump @vercel/nft@0.27.0 (#11580)
[@vercel/nft@0.27.0](https://github.com/vercel/nft/releases/tag/0.27.0) is necessary for parsing import assertions. Import assertions are causing [this issue](https://github.com/vercel/vercel/issues/11533).
2024-05-10 21:25:40 +00:00
Kiko Beats
bc95d764b4 ci: add Node.js v18 tests (#11575)
Some tests are skipped because CI tests are running against v16.

I added a new GitHub CI job just inlcuding the tests that are skipped for now.
2024-05-10 21:15:37 +00:00
Nathan Rajlich
1b5ce5644f [examples] Fix "remix" template (#11583)
`@vercel/remix@2.9.2` is broken, but that's the version that tries to
get installed from the `^` caret. For now, explicitly use the
`2.9.2-patch.2` release which works correctly.
2024-05-10 14:11:16 -07:00
Zack Tanner
18d1703d5b [next]: skip action rewrite if RSC header is present (#11576)
When rewriting requests that contain a `next-action` header to a `.action` output, we should do so only in the case where the RSC header isn't present. When a Next.js server action triggers a `redirect`, an intra-app RSC request will be made to that requested URL, with the `next-action` header still present. This means the intra-app request will be incorrectly rewritten, when we only intended to handle the actual action request.

This was patched in Next.js in the following PR:
- https://github.com/vercel/next.js/pull/65615

But it seems like a good idea to be resilient to this here as well.
2024-05-10 21:09:56 +00:00
Zack Tanner
5c6f9c0b66 [tests] fix maxDuration integration test (#11578)
Since maxDuration was updated for this tier ([x-ref](https://vercel.com/changelog/vercel-functions-for-hobby-can-now-run-up-to-60-seconds))
2024-05-10 18:39:49 +00:00
Vercel Release Bot
809740b385 Version Packages (#11570)
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/functions@1.0.2

### Patch Changes

- Convert package to CommonJS
([#11569](https://github.com/vercel/vercel/pull/11569))

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-05-09 18:12:02 -07:00
Nathan Rajlich
bf9acd023d [functions] Convert to CommonJS (#11569)
The package was not working because it is using ESM syntax, but the
`package.json` did not have `"type": "module"`.

Anyways, for broader compatibility, let's use CommonJS.
2024-05-09 18:10:39 -07:00
Vercel Release Bot
f4ba9cdcf8 Version Packages (#11564)
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## vercel@34.1.10

### Patch Changes

- Updated dependencies
\[[`119f80e96`](119f80e961),
[`11584b0e9`](11584b0e9b),
[`3023122d4`](3023122d4e),
[`0e774b6be`](0e774b6be0)]:
    -   @vercel/next@4.2.9
    -   @vercel/static-build@2.5.4

## @vercel/next@4.2.9

### Patch Changes

- Support incremental partial prerendering
([#11560](https://github.com/vercel/vercel/pull/11560))

- ensure `.action` outputs are created for edge functions
([#11568](https://github.com/vercel/vercel/pull/11568))

-   ([#11566](https://github.com/vercel/vercel/pull/11566))

## @vercel/static-build@2.5.4

### Patch Changes

- Fix `Cannot read properties of null` error
([#11559](https://github.com/vercel/vercel/pull/11559))

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-05-09 10:03:52 -07:00
Zack Tanner
11584b0e9b [next] ensure action outputs are created for edge functions (#11568)
Since we're rewriting `next-action` requests to `.action` outputs, we need to ensure that we also duplicate the edge function handler for it. 

This runs all of the existing Node runtime tests in the Edge runtime as well. However, there's a discrepancy in how `x-vercel-cache` is returned, so for now we instead validate that its responding with `x-edge-runtime`.
2024-05-09 01:39:08 +00:00
JJ Kasper
3023122d4e [next] Update react version in next fixtures (#11566)
We are locking the peerDependency to react v19 beta on canary so we need to update these fixtures to tolerate that. 

x-ref: [slack thread](https://vercel.slack.com/archives/C048KLPEEH1/p1715191372631389)
x-ref: https://github.com/vercel/next.js/pull/65058
2024-05-08 23:33:24 +00:00
Nathan Rajlich
0e774b6be0 [static-build] Fix Cannot read properties of null error (#11559)
A bug was introduced in #11529 that causes the build to fail if `ruby`
is not installed. The fix here accounts for that scenario.

Closes #11547.
2024-05-08 11:44:49 -07:00
Wyatt Johnson
119f80e961 [next] Support Incremental Partial Prerendering (#11560)
This fixes the logic that detects if partial prerendering (PPR) has been
enabled for a project. The new incremental adoption pathway allows
setting the `experimental.ppr = 'incremental'` which the previous code
did not support.
2024-05-08 08:13:39 -06:00
Vercel Release Bot
9fe92d7de0 Version Packages (#11558)
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/functions@1.0.1

### Patch Changes

- Don't throw error if context is missing
([`0817527f9`](0817527f9e))

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-05-07 17:13:10 +02:00
Kiko Beats
0817527f9e [@vercel/functions]: don't throw error if context is missing (#11557)
making `waituntil` a noop
2024-05-07 17:02:23 +02:00
Vercel Release Bot
6476f4f786 Version Packages (#11551)
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/functions@1.0.0

### Major Changes

- Initial release
([#11553](https://github.com/vercel/vercel/pull/11553))

## @vercel/node@3.1.0

### Minor Changes

- Make waitUntil consistent for Node.js & Edge
([#11553](https://github.com/vercel/vercel/pull/11553))

## vercel@34.1.9

### Patch Changes

- Updated dependencies
\[[`5a532a5b9`](5a532a5b94),
[`50fc27ba5`](50fc27ba57),
[`c1d852295`](c1d8522950),
[`a5ea04154`](a5ea04154b)]:
    -   @vercel/next@4.2.8
    -   @vercel/node@3.1.0

## @vercel/next@4.2.8

### Patch Changes

- Fix missing initial RSC headers
([#11552](https://github.com/vercel/vercel/pull/11552))

- Remove .prefetch.rsc rewrites for non-PPR
([#11540](https://github.com/vercel/vercel/pull/11540))

- [next] rename middleware manifest env
([#11549](https://github.com/vercel/vercel/pull/11549))

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-05-07 15:40:37 +02:00
Kiko Beats
a5ea04154b Make waitUntil consistent for Node.js & Edge (#11553)
This PR makes `waitUntil` consistent when interacting with it via `vc
dev`. That includes:

**be possible to call `waitUntil` from the context second argument in
web handlers functions (Node.js & Edge)**:

```js
export function GET(request, { waitUntil }) {
  waitUntil(fetch('https://vercel.com'));
  return new Response('OK');
}
```

**be possible to call `waitUntil` imported from `@vercel/functions`**
(Node.js & Edge):

```js
import { waitUntil } from '@vercel/functions';

export function GET(request) {
  waitUntil(fetch('https://vercel.com'));
  return new Response('OK');
}
```

Additionally, `@vercel/functions` can be adopted for other framework to
take advantage of this pattern at Vercel.

---------

Co-authored-by: Javi Velasco <javier.velasco86@gmail.com>
2024-05-07 15:36:43 +02:00
JJ Kasper
5a532a5b94 [next] Fix missing initial RSC headers (#11552)
While investigating https://github.com/vercel/next.js/issues/59883 we noticed the RSC Prerender did not have all the expected headers like the HTML Prerender which caused unexpected revalidation behavior specifically on client-transition as some of these headers are used to detect if a revalidated tag is associated with specific outputs. 

x-ref: https://github.com/vercel/next.js/issues/59883
2024-05-07 07:43:00 +00:00
Jiachi Liu
c1d8522950 [next] rename middleware manifest env (#11549)
Rename `environment` property to `env` from middleware manifest added in
#11390.
Align with https://github.com/vercel/next.js/pull/64521

The `environments` property wasn't working properly before due to
unfinished next.js changes, it should work now after testing with next
build from https://github.com/vercel/next.js/pull/64521. We change it to
a better naming word `env`.
2024-05-06 21:32:07 +02:00
JJ Kasper
50fc27ba57 [next] Remove .prefetch.rsc rewrites for non-PPR (#11540)
Removes .prefetch.rsc rewrites rules for non-PPR, as Next.js doesn't emit any static prefetches otherwise
2024-05-06 18:17:22 +00:00
Joel Henningsen
3101d2497f Fix broken link to Code of Conduct in README (#11544)
### Purpose of the Pull Request

This PR addresses a broken link in the README.md file that is supposed
to direct readers to the Code of Conduct. Previously, the link pointed
to `CODE_OF_CONDUCT.md`, which does not exist in the repository's main
directory. The corrected link points to the actual location of the file
in the `.github` directory.

### Changes Made

- Updated the link to the Code of Conduct from `[Code of
Conduct](CODE_OF_CONDUCT.md)` to `[Code of
Conduct](./.github/CODE_OF_CONDUCT.md)` to reflect the correct path.

### Additional Information

I previously opened discussion #11498 regarding this issue with the goal
of following the [Contribuing
Guidelines](https://github.com/vercel/vercel?tab=readme-ov-file#contributing),
but did not receive any feedback over the past week. Given the nature of
the change (a simple documentation fix), I proceeded with this pull
request to ensure the documentation remains useful and accurate for all
users.

### Impact

This change will help ensure that new contributors and users can easily
access the Code of Conduct, fostering better community interactions and
adherence to project standards.

Thank you for considering this pull request. I am open to any further
suggestions or requirements needed to merge this change.
2024-05-04 17:28:21 -07:00
Vercel Release Bot
4b0716b556 Version Packages (#11524)
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## vercel@34.1.8

### Patch Changes

- Updated dependencies
\[[`52e435aa5`](52e435aa5d),
[`124846a3e`](124846a3e6),
[`dc974b679`](dc974b6797),
[`58c6755e0`](58c6755e0c)]:
    -   @vercel/next@4.2.7
    -   @vercel/static-build@2.5.3

## @vercel/next@4.2.7

### Patch Changes

- Fix missing .rsc outputs for pages prerenders
([#11503](https://github.com/vercel/vercel/pull/11503))

- Fix base path app index RSC handling
([#11528](https://github.com/vercel/vercel/pull/11528))

- Fix interception routes PPR route handling
([#11527](https://github.com/vercel/vercel/pull/11527))

## @vercel/static-build@2.5.3

### Patch Changes

- Support Ruby and Python static site generators in AL2023 build image
([#11529](https://github.com/vercel/vercel/pull/11529))

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-05-03 10:01:03 -07:00
JJ Kasper
124846a3e6 [next] Fix base path app index RSC handling (#11528)
This ensures we properly name the outputs when a basePath is present for the `index` output as previously we weren't properly routing to the RSC output due to nested `index` naming/route conflict. This only was a noticeable issue with prerender/static index outputs with base path and app router since if the index route was dynamic it would still catch the RSC request and just handle it without the correct naming. 

Fixes: https://github.com/vercel/next.js/issues/64903
2024-05-02 21:07:58 +00:00
dependabot[bot]
30cd0ec898 [framework-fixtures]: Bump the core group in /packages/static-build/test/fixtures/ionic-angular-v8 with 2 updates (#11530)
Bumps the core group in /packages/static-build/test/fixtures/ionic-angular-v8 with 2 updates: [@ionic/angular](https://github.com/ionic-team/ionic-framework) and [@ionic/core](https://github.com/ionic-team/ionic-framework).

Updates `@ionic/angular` from 8.0.1 to 8.1.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/ionic-team/ionic-framework/releases"><code>@​ionic/angular</code>'s releases</a>.</em></p>
<blockquote>
<h2>v8.1.0</h2>
<h1><a href="https://github.com/ionic-team/ionic-framework/compare/v8.0.2...v8.1.0">8.1.0</a> (2024-05-01)</h1>
<h3>Features</h3>
<ul>
<li>add experimental transition focus manager (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29400">#29400</a>) (<a href="5b686efc10">5b686ef</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/23650">#23650</a></li>
<li><strong>content:</strong> add fixedSlotPlacement prop (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29233">#29233</a>) (<a href="90a7e70a1c">90a7e70</a>)</li>
<li><strong>datetime:</strong> pass roles to overlay when dismissing (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29221">#29221</a>) (<a href="6945adc3cc">6945adc</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/28298">#28298</a></li>
<li><strong>input:</strong> add clearInputIcon property (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29246">#29246</a>) (<a href="0f5d1c02d2">0f5d1c0</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/26974">#26974</a></li>
<li><strong>modal, popover:</strong> add ability to temporarily disable focus trapping (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29379">#29379</a>) (<a href="7c00351680">7c00351</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/24646">#24646</a></li>
<li><strong>picker:</strong> picker column is easier to select with assistive technology (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29371">#29371</a>) (<a href="e38e2e4d35">e38e2e4</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/25221">#25221</a></li>
</ul>
<h2>v8.0.2</h2>
<h2><a href="https://github.com/ionic-team/ionic-framework/compare/v8.0.1...v8.0.2">8.0.2</a> (2024-05-01)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>datetime:</strong> navigating months in RTL works correctly (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29421">#29421</a>) (<a href="4d09890d69">4d09890</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29198">#29198</a></li>
<li><strong>ios:</strong> large title transition accounts for back button with no text  (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29327">#29327</a>) (<a href="bd8d065e1a">bd8d065</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/28751">#28751</a></li>
<li><strong>md:</strong> item border has improved contrast in dark mode (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29398">#29398</a>) (<a href="fa85f030cf">fa85f03</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29386">#29386</a></li>
<li><strong>select:</strong> options are visible with fit-content width and fill outline (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29408">#29408</a>) (<a href="f15b62a9ca">f15b62a</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29321">#29321</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/ionic-team/ionic-framework/blob/main/CHANGELOG.md"><code>@​ionic/angular</code>'s changelog</a>.</em></p>
<blockquote>
<h1><a href="https://github.com/ionic-team/ionic-framework/compare/v8.0.2...v8.1.0">8.1.0</a> (2024-05-01)</h1>
<h3>Features</h3>
<ul>
<li>add experimental transition focus manager (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29400">#29400</a>) (<a href="5b686efc10">5b686ef</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/23650">#23650</a></li>
<li><strong>content:</strong> add fixedSlotPlacement prop (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29233">#29233</a>) (<a href="90a7e70a1c">90a7e70</a>)</li>
<li><strong>datetime:</strong> pass roles to overlay when dismissing (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29221">#29221</a>) (<a href="6945adc3cc">6945adc</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/28298">#28298</a></li>
<li><strong>input:</strong> add clearInputIcon property (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29246">#29246</a>) (<a href="0f5d1c02d2">0f5d1c0</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/26974">#26974</a></li>
<li><strong>modal, popover:</strong> add ability to temporarily disable focus trapping (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29379">#29379</a>) (<a href="7c00351680">7c00351</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/24646">#24646</a></li>
<li><strong>picker:</strong> picker column is easier to select with assistive technology (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29371">#29371</a>) (<a href="e38e2e4d35">e38e2e4</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/25221">#25221</a></li>
</ul>
<h2><a href="https://github.com/ionic-team/ionic-framework/compare/v8.0.1...v8.0.2">8.0.2</a> (2024-05-01)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>datetime:</strong> navigating months in RTL works correctly (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29421">#29421</a>) (<a href="4d09890d69">4d09890</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29198">#29198</a></li>
<li><strong>ios:</strong> large title transition accounts for back button with no text  (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29327">#29327</a>) (<a href="bd8d065e1a">bd8d065</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/28751">#28751</a></li>
<li><strong>md:</strong> item border has improved contrast in dark mode (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29398">#29398</a>) (<a href="fa85f030cf">fa85f03</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29386">#29386</a></li>
<li><strong>select:</strong> options are visible with fit-content width and fill outline (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29408">#29408</a>) (<a href="f15b62a9ca">f15b62a</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29321">#29321</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="78d3076703"><code>78d3076</code></a> v8.1.0</li>
<li><a href="4ef5036c7b"><code>4ef5036</code></a> chore: sync with main (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29433">#29433</a>)</li>
<li><a href="72711bba2e"><code>72711bb</code></a> chore: sync with main</li>
<li><a href="d81c88403e"><code>d81c884</code></a> merge release-8.0.2 (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29431">#29431</a>)</li>
<li><a href="5b686efc10"><code>5b686ef</code></a> feat: add experimental transition focus manager (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29400">#29400</a>)</li>
<li><a href="665d67778f"><code>665d677</code></a> chore(): update package lock files</li>
<li><a href="101b50e14c"><code>101b50e</code></a> v8.0.2</li>
<li><a href="a01c3d49bb"><code>a01c3d4</code></a> docs(testing, components): clarify testing and focusable usage (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29424">#29424</a>)</li>
<li><a href="bd8d065e1a"><code>bd8d065</code></a> fix(ios): large title transition accounts for back button with no text  (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29327">#29327</a>)</li>
<li><a href="4d09890d69"><code>4d09890</code></a> fix(datetime): navigating months in RTL works correctly (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29421">#29421</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/ionic-team/ionic-framework/compare/v8.0.1...v8.1.0">compare view</a></li>
</ul>
</details>
<br />

Updates `@ionic/core` from 8.0.1 to 8.1.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/ionic-team/ionic-framework/releases"><code>@​ionic/core</code>'s releases</a>.</em></p>
<blockquote>
<h2>v8.1.0</h2>
<h1><a href="https://github.com/ionic-team/ionic-framework/compare/v8.0.2...v8.1.0">8.1.0</a> (2024-05-01)</h1>
<h3>Features</h3>
<ul>
<li>add experimental transition focus manager (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29400">#29400</a>) (<a href="5b686efc10">5b686ef</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/23650">#23650</a></li>
<li><strong>content:</strong> add fixedSlotPlacement prop (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29233">#29233</a>) (<a href="90a7e70a1c">90a7e70</a>)</li>
<li><strong>datetime:</strong> pass roles to overlay when dismissing (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29221">#29221</a>) (<a href="6945adc3cc">6945adc</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/28298">#28298</a></li>
<li><strong>input:</strong> add clearInputIcon property (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29246">#29246</a>) (<a href="0f5d1c02d2">0f5d1c0</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/26974">#26974</a></li>
<li><strong>modal, popover:</strong> add ability to temporarily disable focus trapping (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29379">#29379</a>) (<a href="7c00351680">7c00351</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/24646">#24646</a></li>
<li><strong>picker:</strong> picker column is easier to select with assistive technology (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29371">#29371</a>) (<a href="e38e2e4d35">e38e2e4</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/25221">#25221</a></li>
</ul>
<h2>v8.0.2</h2>
<h2><a href="https://github.com/ionic-team/ionic-framework/compare/v8.0.1...v8.0.2">8.0.2</a> (2024-05-01)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>datetime:</strong> navigating months in RTL works correctly (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29421">#29421</a>) (<a href="4d09890d69">4d09890</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29198">#29198</a></li>
<li><strong>ios:</strong> large title transition accounts for back button with no text  (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29327">#29327</a>) (<a href="bd8d065e1a">bd8d065</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/28751">#28751</a></li>
<li><strong>md:</strong> item border has improved contrast in dark mode (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29398">#29398</a>) (<a href="fa85f030cf">fa85f03</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29386">#29386</a></li>
<li><strong>select:</strong> options are visible with fit-content width and fill outline (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29408">#29408</a>) (<a href="f15b62a9ca">f15b62a</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29321">#29321</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/ionic-team/ionic-framework/blob/main/CHANGELOG.md"><code>@​ionic/core</code>'s changelog</a>.</em></p>
<blockquote>
<h1><a href="https://github.com/ionic-team/ionic-framework/compare/v8.0.2...v8.1.0">8.1.0</a> (2024-05-01)</h1>
<h3>Features</h3>
<ul>
<li>add experimental transition focus manager (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29400">#29400</a>) (<a href="5b686efc10">5b686ef</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/23650">#23650</a></li>
<li><strong>content:</strong> add fixedSlotPlacement prop (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29233">#29233</a>) (<a href="90a7e70a1c">90a7e70</a>)</li>
<li><strong>datetime:</strong> pass roles to overlay when dismissing (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29221">#29221</a>) (<a href="6945adc3cc">6945adc</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/28298">#28298</a></li>
<li><strong>input:</strong> add clearInputIcon property (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29246">#29246</a>) (<a href="0f5d1c02d2">0f5d1c0</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/26974">#26974</a></li>
<li><strong>modal, popover:</strong> add ability to temporarily disable focus trapping (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29379">#29379</a>) (<a href="7c00351680">7c00351</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/24646">#24646</a></li>
<li><strong>picker:</strong> picker column is easier to select with assistive technology (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29371">#29371</a>) (<a href="e38e2e4d35">e38e2e4</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/25221">#25221</a></li>
</ul>
<h2><a href="https://github.com/ionic-team/ionic-framework/compare/v8.0.1...v8.0.2">8.0.2</a> (2024-05-01)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>datetime:</strong> navigating months in RTL works correctly (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29421">#29421</a>) (<a href="4d09890d69">4d09890</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29198">#29198</a></li>
<li><strong>ios:</strong> large title transition accounts for back button with no text  (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29327">#29327</a>) (<a href="bd8d065e1a">bd8d065</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/28751">#28751</a></li>
<li><strong>md:</strong> item border has improved contrast in dark mode (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29398">#29398</a>) (<a href="fa85f030cf">fa85f03</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29386">#29386</a></li>
<li><strong>select:</strong> options are visible with fit-content width and fill outline (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29408">#29408</a>) (<a href="f15b62a9ca">f15b62a</a>), closes <a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29321">#29321</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="78d3076703"><code>78d3076</code></a> v8.1.0</li>
<li><a href="4ef5036c7b"><code>4ef5036</code></a> chore: sync with main (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29433">#29433</a>)</li>
<li><a href="72711bba2e"><code>72711bb</code></a> chore: sync with main</li>
<li><a href="d81c88403e"><code>d81c884</code></a> merge release-8.0.2 (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29431">#29431</a>)</li>
<li><a href="5b686efc10"><code>5b686ef</code></a> feat: add experimental transition focus manager (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29400">#29400</a>)</li>
<li><a href="665d67778f"><code>665d677</code></a> chore(): update package lock files</li>
<li><a href="101b50e14c"><code>101b50e</code></a> v8.0.2</li>
<li><a href="a01c3d49bb"><code>a01c3d4</code></a> docs(testing, components): clarify testing and focusable usage (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29424">#29424</a>)</li>
<li><a href="bd8d065e1a"><code>bd8d065</code></a> fix(ios): large title transition accounts for back button with no text  (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29327">#29327</a>)</li>
<li><a href="4d09890d69"><code>4d09890</code></a> fix(datetime): navigating months in RTL works correctly (<a href="https://redirect.github.com/ionic-team/ionic-framework/issues/29421">#29421</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/ionic-team/ionic-framework/compare/v8.0.1...v8.1.0">compare view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will remove the ignore condition of the specified dependency and ignore conditions


</details>
2024-05-02 15:23:12 +00:00
Nathan Rajlich
dc974b6797 [static-build] Support Ruby static site generators in AL2023 build image (#11529)
* Set `GEM_HOME` env var based on the Ruby version in `$PATH` (i.e.
`3.2.0` for the AL2 build image, `3.3.0` for the AL2023 build image)
* Copy previous `jekyll-v4` test fixture to `jekyll-v4-al2` (uses AL2
build image)
* Update `jekyll-v4` test fixture to use Jekyll 4.3.3 (required for Ruby
3.3.0), and remove `package.json` so that it uses AL2023 build image
* Copy previous `middleman-v4` test fixture to `middleman-v4-al2` (uses
AL2 build image)
* Removed `package.json` from `middleman-v4` fixture, so that it uses
AL2023 build image
2024-05-02 00:57:59 -07:00
JJ Kasper
58c6755e0c [next] Fix interception routes PPR route handling (#11527)
This ensures we properly create `.prefetch.rsc` output aliases for non-prerender outputs when PPR is enabled so that we can properly route which handles the interception route case as that is always dynamic so was missing it's `.prefetch.rsc` output causing the prefetch request to 404 unexpectedly. 

x-ref: [slack thread](https://vercel.slack.com/archives/C070ZMMKVU7/p1714511126337289)
2024-05-01 22:40:04 +00:00
dependabot[bot]
f18575fcd0 [framework-fixtures]: Bump preact from 10.20.1 to 10.21.0 in /packages/static-build/test/fixtures/preact-v10 in the core group (#11517)
Bumps the core group in /packages/static-build/test/fixtures/preact-v10 with 1 update: [preact](https://github.com/preactjs/preact).

Updates `preact` from 10.20.1 to 10.21.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/preactjs/preact/releases">preact's releases</a>.</em></p>
<blockquote>
<h2>10.21.0</h2>
<h2>Features</h2>
<ul>
<li>Debug throw on too many rerenders (<a href="https://redirect.github.com/preactjs/preact/issues/4349">#4349</a>, thanks <a href="https://github.com/rschristian"><code>@​rschristian</code></a>)</li>
<li>Add compat/client types (<a href="https://redirect.github.com/preactjs/preact/issues/4345">#4345</a>, thanks <a href="https://github.com/rschristian"><code>@​rschristian</code></a>)</li>
</ul>
<h2>Fixes</h2>
<ul>
<li>Expose hooks through compat's <code>ReactCurrentDispatcher</code> (<a href="https://redirect.github.com/preactjs/preact/issues/4342">#4342</a>, thanks <a href="https://github.com/rschristian"><code>@​rschristian</code></a>)</li>
<li>Respect default value (<a href="https://redirect.github.com/preactjs/preact/issues/4341">#4341</a>, thanks <a href="https://github.com/JoviDeCroock"><code>@​JoviDeCroock</code></a>)</li>
<li>Incorrect &quot;missing transform-jsx-source&quot; warning (<a href="https://redirect.github.com/preactjs/preact/issues/4350">#4350</a>, thanks <a href="https://github.com/rschristian"><code>@​rschristian</code></a>)</li>
</ul>
<h2>Types</h2>
<ul>
<li>Support ComponentChild(ren) in compat render/hydrate/createPortal (<a href="https://redirect.github.com/preactjs/preact/issues/4346">#4346</a>, thanks <a href="https://github.com/rschristian"><code>@​rschristian</code></a>)</li>
<li>Import and re-export PreactElement (<a href="https://redirect.github.com/preactjs/preact/issues/3228">#3228</a>, thanks <a href="https://github.com/henryqdineen"><code>@​henryqdineen</code></a>)</li>
</ul>
<h2>Maintenance</h2>
<ul>
<li>Add zustand and redux-toolkit to the demo. (<a href="https://redirect.github.com/preactjs/preact/issues/3523">#3523</a>, thanks <a href="https://github.com/MortezaMirjavadi"><code>@​MortezaMirjavadi</code></a>)</li>
<li>Optimise jsx runtime (<a href="https://redirect.github.com/preactjs/preact/issues/4337">#4337</a>, thanks <a href="https://github.com/JoviDeCroock"><code>@​JoviDeCroock</code></a>)</li>
</ul>
<h2>10.20.2</h2>
<h2>Fixes</h2>
<ul>
<li>Check whether <code>oldDom</code> is present in the DOM (<a href="https://redirect.github.com/preactjs/preact/issues/4318">#4318</a>, thanks <a href="https://github.com/JoviDeCroock"><code>@​JoviDeCroock</code></a>)</li>
<li>Simplify the logic introduced in <a href="https://redirect.github.com/preactjs/preact/issues/4322">#4322</a> &amp; use eventClock for capture events too (<a href="https://redirect.github.com/preactjs/preact/issues/4324">#4324</a>, thanks <a href="https://github.com/jviide"><code>@​jviide</code></a>)</li>
<li>Use a virtual clock instead of Date.now() for event dispatch times (<a href="https://redirect.github.com/preactjs/preact/issues/4322">#4322</a>, thanks <a href="https://github.com/jviide"><code>@​jviide</code></a>)</li>
</ul>
<h2>Types</h2>
<ul>
<li>Add template tag JSX type (<a href="https://redirect.github.com/preactjs/preact/issues/4334">#4334</a>, thanks <a href="https://github.com/marvinhagemeister"><code>@​marvinhagemeister</code></a>)</li>
</ul>
<h2>Maintenance</h2>
<ul>
<li>Integrate the new benchmarks repo and update  (<a href="https://redirect.github.com/preactjs/preact/issues/4310">#4310</a>, thanks <a href="https://github.com/andrewiggins"><code>@​andrewiggins</code></a>)</li>
<li>Some byte improvements (<a href="https://redirect.github.com/preactjs/preact/issues/4321">#4321</a>, thanks <a href="https://github.com/JoviDeCroock"><code>@​JoviDeCroock</code></a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="a832512a4e"><code>a832512</code></a> 10.21.0 (<a href="https://redirect.github.com/preactjs/preact/issues/4360">#4360</a>)</li>
<li><a href="dbc4d6109c"><code>dbc4d61</code></a> Merge pull request <a href="https://redirect.github.com/preactjs/preact/issues/4350">#4350</a> from preactjs/fix/jsx-source-debug-warning</li>
<li><a href="50c3f3ebe8"><code>50c3f3e</code></a> Merge branch 'main' into fix/jsx-source-debug-warning</li>
<li><a href="613cacc0e3"><code>613cacc</code></a> feat: debug throw on too many rerenders (<a href="https://redirect.github.com/preactjs/preact/issues/4349">#4349</a>)</li>
<li><a href="2e2f5ab3a7"><code>2e2f5ab</code></a> fix: Appease ESLint</li>
<li><a href="d4ff12e97c"><code>d4ff12e</code></a> test: Add test for fixed jsx-source warning</li>
<li><a href="61ce7a4f26"><code>61ce7a4</code></a> refactor: Slight rename</li>
<li><a href="784af469d1"><code>784af46</code></a> fix: Incorrect &quot;missing <code>transform-jsx-source</code>&quot; warning</li>
<li><a href="aa95aa924d"><code>aa95aa9</code></a> Merge pull request <a href="https://redirect.github.com/preactjs/preact/issues/4346">#4346</a> from preactjs/types/fix-hydrate-render-createPortal</li>
<li><a href="1fc799dc6f"><code>1fc799d</code></a> refactor: Support ComponentChild(ren) in compat render/hydrate/createPortal</li>
<li>Additional commits viewable in <a href="https://github.com/preactjs/preact/compare/10.20.1...10.21.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=preact&package-manager=npm_and_yarn&previous-version=10.20.1&new-version=10.21.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will remove the ignore condition of the specified dependency and ignore conditions


</details>
2024-04-30 21:37:27 +00:00
Erika Rowland
d6412be6bc Migrate build argument parsing (#11492)
Migrate `vc build` to use updated argument parsing helpers.

Adds `try/catch` and `handleError` logic that was previously missing.
2024-04-30 21:23:41 +00:00
JJ Kasper
52e435aa5d Fix missing .rsc outputs for pages prerenders (#11503)
When generating the outputs for pages when app router is also present we weren't creating the placeholder `.rsc` outputs for all prerender outputs so when a `fallback: false` route was configured in the pages router that could fall through to an app route it causes issues with client-navigation behaving differently than a direct visit. 

This ensures we add the placeholder `.rsc` outputs for all prerenders so that `fallback: false` pages don't have this unexpected behavior.
2024-04-30 20:34:41 +00:00
Vercel Release Bot
303256343a Version Packages (#11523)
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## vercel@34.1.7

### Patch Changes

- Updated dependencies
\[[`3420ba015`](3420ba0153)]:
    -   @vercel/next@4.2.6

## @vercel/next@4.2.6

### Patch Changes

- [next] Update test fixture version
([#11514](https://github.com/vercel/vercel/pull/11514))

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-04-30 13:09:58 -07:00
Vercel Release Bot
88f3a816d9 Version Packages (#11520)
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## vercel@34.1.6

### Patch Changes

- Updated dependencies
\[[`b1adaf76e`](b1adaf76ec),
[`3fb97d1d2`](3fb97d1d27)]:
    -   @vercel/next@4.2.5
    -   @vercel/static-build@2.5.2

## @vercel/next@4.2.5

### Patch Changes

- Only rewrite next-action requests to `.action` handlers
([#11504](https://github.com/vercel/vercel/pull/11504))

## @vercel/static-build@2.5.2

### Patch Changes

- Revert `SUPPORTED_RUBY_VERSION` change to fix Ruby site generators on
AL2 build image ([#11522](https://github.com/vercel/vercel/pull/11522))

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-04-30 13:04:00 -07:00
JJ Kasper
3420ba0153 [next] Update test fixture version (#11514)
Noticed in https://github.com/vercel/vercel/pull/11503 that this test
fixture is incorrectly locked to a specific version when we don't want
it to be.
2024-04-30 13:03:36 -07:00
Nathan Rajlich
3fb97d1d27 [static-build] Add changeset for SUPPORTED_RUBY_VERSION revert (#11522)
A changeset should have been included for
https://github.com/vercel/vercel/pull/11518. Adding that here.
2024-04-30 13:01:59 -07:00
Nathan Rajlich
f11c7024c4 [static-build] Fix running of e2e tests (#11518)
We accidentally committed a change which prevented the static-build e2e
tests, so fixing that.

Also reverting a change from https://github.com/vercel/vercel/pull/11497
which was causing issues with Ruby-based static site generators when
using the AL2 build image.
2024-04-30 12:57:25 -07:00
Sean Massa
5eb4cc6f5d Revert "[framework-fixtures]: Bump the core group in /packages/static-build/test/fixtures/hydrogen-v2023 with 6 updates" (#11521)
Reverts vercel/vercel#11480

This was merged in when we weren't running the tests.
([Fix](https://github.com/vercel/vercel/pull/11518)).
2024-04-30 12:35:07 -07:00
Zack Tanner
b1adaf76ec [next] Only rewrite next-action requests to .action handlers (#11504)
This only rewrites requests that contain a `next-action` header (explicitly indicating it's a server action). A side effect is that POST requests to a server action on a static route, without a next-action header, won't be marked as streaming (but will still execute normally). This is fine as only the handled action needs to stream. 

This relands .action handling behind a feature flag.
2024-04-30 18:32:54 +00:00
Vercel Release Bot
1bf04ba421 Version Packages (#11512)
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@8.0.0

### Major Changes

- Remove legacy `avoidTopLevelInstall` logic
([#11513](https://github.com/vercel/vercel/pull/11513))

### Patch Changes

- [build-utils] Add `VERCEL_PROJECT_PRODUCTION_URL` framework env var
prefix ([#11506](https://github.com/vercel/vercel/pull/11506))

## @vercel/ruby@2.1.0

### Minor Changes

- Add support for Ruby 3.3
([#11497](https://github.com/vercel/vercel/pull/11497))

- Remove legacy `avoidTopLevelInstall` logic
([#11513](https://github.com/vercel/vercel/pull/11513))

## vercel@34.1.5

### Patch Changes

- Updated dependencies
\[[`763a6d107`](763a6d1070),
[`15475c8a2`](15475c8a2c),
[`21f5e7375`](21f5e7375e)]:
    -   @vercel/ruby@2.1.0
    -   @vercel/build-utils@8.0.0
    -   @vercel/node@3.0.28
    -   @vercel/static-build@2.5.1

## @vercel/client@13.2.2

### Patch Changes

- Updated dependencies
\[[`15475c8a2`](15475c8a2c),
[`21f5e7375`](21f5e7375e)]:
    -   @vercel/build-utils@8.0.0

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

### Patch Changes

- Updated dependencies
\[[`15475c8a2`](15475c8a2c),
[`21f5e7375`](21f5e7375e)]:
    -   @vercel/build-utils@8.0.0

## @vercel/node@3.0.28

### Patch Changes

- Updated dependencies
\[[`15475c8a2`](15475c8a2c),
[`21f5e7375`](21f5e7375e)]:
    -   @vercel/build-utils@8.0.0

## @vercel/static-build@2.5.1

### Patch Changes

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

## @vercel-internals/types@1.0.31

### Patch Changes

- Updated dependencies
\[[`15475c8a2`](15475c8a2c),
[`21f5e7375`](21f5e7375e)]:
    -   @vercel/build-utils@8.0.0

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-04-30 09:26:54 -05:00
Nathan Rajlich
15475c8a2c [build-utils][ruby] Remove legacy avoidTopLevelInstall logic (#11513)
This logic was left over from a previous iteration of the `vc build`
command which was never shipped. Thus, this logic is no longer
necessary.
2024-04-30 01:37:43 -07:00
dependabot[bot]
1c8f0a4c33 [framework-fixtures]: Bump the core group in /packages/static-build/test/fixtures/hydrogen-v2023 with 6 updates (#11480)
Bumps the core group in /packages/static-build/test/fixtures/hydrogen-v2023 with 6 updates:

| Package | From | To |
| --- | --- | --- |
| [@shopify/cli](https://github.com/Shopify/cli) | `3.49.2` | `3.59.1` |
| [@shopify/cli-hydrogen](https://github.com/Shopify/cli) | `5.4.1` | `5.5.2` |
| [@shopify/hydrogen](https://github.com/Shopify/hydrogen-v1/tree/HEAD/packages/hydrogen) | `2023.7.9` | `2023.10.6` |
| @shopify/remix-oxygen | `1.1.5` | `1.1.8` |
| [@shopify/hydrogen-react](https://github.com/shopify/hydrogen/tree/HEAD/packages/hydrogen-react) | `2023.7.4` | `2023.10.1` |
| [@shopify/mini-oxygen](https://github.com/Shopify/hydrogen) | `2.2.2` | `2.2.5` |

Updates `@shopify/cli` from 3.49.2 to 3.59.1
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/Shopify/cli/releases"><code>@​shopify/cli</code>'s releases</a>.</em></p>
<blockquote>
<h2>3.59.1</h2>
<h2>Themes</h2>
<ul>
<li>Fix <code>shopify theme dev</code> and <code>shopify theme console</code> proxies following session changes and bring back the legacy <code>shopify theme push</code> implementation in CI/CD workflows: <a href="https://redirect.github.com/Shopify/cli/pull/3769">Shopify/cli#3769</a></li>
<li>Fix <code>shopify theme dev</code> proxy to use development theme: <a href="https://redirect.github.com/Shopify/cli/pull/3771">Shopify/cli#3771</a></li>
</ul>
<h2>3.59.0</h2>
<h2>Shopify CLI</h2>
<p>Shopify CLI now defaults to be a global CLI and all commands have been unified under a single npm package: <code>@shopify/cli</code>.</p>
<p>Check out the <a href="https://shopify.dev/docs/api/shopify-cli">new CLI documentation</a>.</p>
<h2>Apps</h2>
<ul>
<li>Use a random port for GraphiQL when the default one is not available: <a href="https://redirect.github.com/Shopify/cli/pull/3579">Shopify/cli#3579</a></li>
<li>Filter env vars to always be valid for ESBuild: <a href="https://redirect.github.com/Shopify/cli/pull/3656">Shopify/cli#3656</a></li>
<li>Sanitize &quot;api_key&quot; from verbose log: <a href="https://redirect.github.com/Shopify/cli/pull/3558">Shopify/cli#3558</a></li>
<li>Fix issue when you deploy an empty array of redirect_urls: <a href="https://redirect.github.com/Shopify/cli/pull/3667">Shopify/cli#3667</a></li>
<li>Do not show api-key flag deprecation warning when using SHOPIFY_API_KEY: <a href="https://redirect.github.com/Shopify/cli/pull/3671">Shopify/cli#3671</a></li>
<li>Updated header regex: <a href="https://redirect.github.com/Shopify/cli/pull/3658">Shopify/cli#3658</a></li>
</ul>
<h2>Themes</h2>
<ul>
<li>Fix Theme Push Execution when password flag is provided: <a href="https://redirect.github.com/Shopify/cli/pull/3645">Shopify/cli#3645</a></li>
<li>Remove requirement to provide <code>name</code> flag in <code>theme rename</code> command: <a href="https://redirect.github.com/Shopify/cli/pull/3644">Shopify/cli#3644</a></li>
<li>Update theme push theme selection text: <a href="https://redirect.github.com/Shopify/cli/pull/3670">Shopify/cli#3670</a></li>
<li>Improve Glob Pattern subdirectory mismatch error handling: <a href="https://redirect.github.com/Shopify/cli/pull/3669">Shopify/cli#3669</a></li>
<li>Introduce support to Theme Access app in the new <code>shopify theme push</code> implementation: <a href="https://redirect.github.com/Shopify/cli/pull/3675">Shopify/cli#3675</a></li>
<li>Introduce support to the <code>blocks/</code> directory in <code>shopify theme push</code>: <a href="https://redirect.github.com/Shopify/cli/pull/3676">Shopify/cli#3676</a></li>
<li>Fix <code>shopify theme dev</code> issue to avoid previewing the live theme instead of the development: <a href="https://redirect.github.com/Shopify/cli/pull/3706">Shopify/cli#3706</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/Shopify/cli/compare/3.58.2...3.59.0">https://github.com/Shopify/cli/compare/3.58.2...3.59.0</a></p>
<h2>3.58.2</h2>
<h2>What's Changed</h2>
<ul>
<li><a href="https://redirect.github.com/Shopify/cli/pull/3651">Fix <code>shopify theme push</code> issue when password flag is provided</a></li>
</ul>
<h2>3.58.1</h2>
<h2>What's Changed</h2>
<ul>
<li><a href="https://redirect.github.com/Shopify/cli/pull/3640">Fix selection of apps beyond the first 25 in the list</a></li>
<li><a href="https://redirect.github.com/Shopify/cli/pull/3648">Implement fallback for apps not yet opted-in to versioned config</a></li>
</ul>
<h2>3.58.0</h2>
<h2><code>@​shopify/app</code><a href="https://github.com/3"><code>@​3</code></a>.58.0</h2>
<h3>Minor Changes</h3>
<ul>
<li>960cdc0a2: Add a new &quot;app init&quot; command</li>
</ul>
<h3>Patch Changes</h3>
<ul>
<li>94da7f678: Move webhook commands under app</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="d82d4a46b0"><code>d82d4a4</code></a> add changeset</li>
<li><a href="4975bb99a3"><code>4975bb9</code></a> Add clean and build steps to stable shipit config</li>
<li><a href="a5c2d79f4d"><code>a5c2d79</code></a> [3.59] Fix <code>shopify theme dev</code> proxy to use development theme (<a href="https://redirect.github.com/Shopify/cli/issues/3771">#3771</a>)</li>
<li><a href="8a26af93e8"><code>8a26af9</code></a> Merge pull request <a href="https://redirect.github.com/Shopify/cli/issues/3770">#3770</a> from Shopify/changeset-release/stable/3.59</li>
<li><a href="a9e9b69641"><code>a9e9b69</code></a> Version Packages</li>
<li><a href="c181ebea4c"><code>c181ebe</code></a> [3.59] Fix <code>shopify theme dev</code> and <code>shopify theme console</code> proxies following ...</li>
<li><a href="a70ec32b0e"><code>a70ec32</code></a> Add stable/3.59 shipit configuration</li>
<li><a href="2b5c29657d"><code>2b5c296</code></a> Merge pull request <a href="https://redirect.github.com/Shopify/cli/issues/3726">#3726</a> from Shopify/release-notes-3.59</li>
<li><a href="083a2a21d5"><code>083a2a2</code></a> Add release notes for 3.59.0</li>
<li><a href="03c64195bf"><code>03c6419</code></a> Merge pull request <a href="https://redirect.github.com/Shopify/cli/issues/3724">#3724</a> from Shopify/fix-pnpm-version-on-shipit-scripts</li>
<li>Additional commits viewable in <a href="https://github.com/Shopify/cli/compare/3.49.2...3.59.1">compare view</a></li>
</ul>
</details>
<br />

Updates `@shopify/cli-hydrogen` from 5.4.1 to 5.5.2
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a href="https://github.com/Shopify/cli/commits">compare view</a></li>
</ul>
</details>
<br />

Updates `@shopify/hydrogen` from 2023.7.9 to 2023.10.6
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a href="https://github.com/Shopify/hydrogen-v1/commits/HEAD/packages/hydrogen">compare view</a></li>
</ul>
</details>
<br />

Updates `@shopify/remix-oxygen` from 1.1.5 to 1.1.8

Updates `@shopify/hydrogen-react` from 2023.7.4 to 2023.10.1
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/shopify/hydrogen/releases"><code>@​shopify/hydrogen-react</code>'s releases</a>.</em></p>
<blockquote>
<h2><code>@​shopify/hydrogen-react</code><a href="https://github.com/2023"><code>@​2023</code></a>.10.1</h2>
<h3>Patch Changes</h3>
<ul>
<li>
<p>Update all Node.js dependencies to version 18. (Not a breaking change, since Node.js 18 is already required by Remix v2.) (<a href="https://redirect.github.com/Shopify/hydrogen/pull/1543">#1543</a>) by <a href="https://github.com/michenly"><code>@​michenly</code></a></p>
</li>
<li>
<p>Skip private access token warning when using mock.shop. (<a href="https://redirect.github.com/Shopify/hydrogen/pull/1538">#1538</a>) by <a href="https://github.com/frandiox"><code>@​frandiox</code></a></p>
</li>
<li>
<p>Add an optional <code>channel</code> prop to the <code>ShopPayButton</code> component, which adds order attribution support for either the Headless or Hydrogen sales channel. (<a href="https://redirect.github.com/Shopify/hydrogen/pull/1447">#1447</a>) by <a href="https://github.com/QuintonC"><code>@​QuintonC</code></a></p>
</li>
</ul>
<h2><code>@​shopify/hydrogen-react</code><a href="https://github.com/2023"><code>@​2023</code></a>.10.0</h2>
<h3>Major Changes</h3>
<ul>
<li>
<p>The Storefront API types included are now generated using <code>@graphql-codegen/typescript@4</code> (<a href="https://github.com/dotansimha/graphql-code-generator/blob/master/packages/plugins/typescript/typescript/CHANGELOG.md#400">changelog</a>). This results in a breaking change if you were importing <code>Scalars</code> directly from <code>@shopify/hydrogen-react</code> or <code>@shopify/hydrogen</code>: (<a href="https://redirect.github.com/Shopify/hydrogen/pull/1108">#1108</a>) by <a href="https://github.com/frandiox"><code>@​frandiox</code></a></p>
<pre lang="diff"><code> import type {Scalars} from '@shopify/hydrogen/storefront-api-types';
<p>type Props = {</p>
<ul>
<li>id: Scalars['ID']; // This was a string</li>
</ul>
<ul>
<li>id: Scalars['ID']['input']; // Need to access 'input' or 'output' to get the string
};
</code></pre></li>
</ul>
</li>
</ul>
<h3>Patch Changes</h3>
<ul>
<li>
<p>Remove deprecated parameters and props (<a href="https://github.com/shopify/hydrogen/tree/HEAD/packages/hydrogen-react/issues/1455">#1455</a> and <a href="https://github.com/shopify/hydrogen/tree/HEAD/packages/hydrogen-react/issues/1435">#1435</a>): (<a href="https://redirect.github.com/Shopify/hydrogen/pull/1435">#1435</a>) by <a href="https://github.com/wizardlyhel"><code>@​wizardlyhel</code></a></p>
<ul>
<li><code>createStorefrontClient</code> parameters <code>buyerIp</code> and <code>requestGroupId</code></li>
<li><code>&lt;Image&gt;</code> props <code>loaderOptions</code> and <code>widths</code></li>
</ul>
</li>
</ul>
<h2><code>@​shopify/hydrogen-react</code><a href="https://github.com/2023"><code>@​2023</code></a>.7.6</h2>
<h3>Patch Changes</h3>
<ul>
<li>Fix template dist package due to CI error (<a href="https://redirect.github.com/Shopify/hydrogen/pull/1451">#1451</a>) by <a href="https://github.com/wizardlyhel"><code>@​wizardlyhel</code></a></li>
</ul>
<h2><code>@​shopify/hydrogen-react</code><a href="https://github.com/2023"><code>@​2023</code></a>.7.5</h2>
<h3>Patch Changes</h3>
<ul>
<li>
<p>Add Language to CartProvider (<a href="https://redirect.github.com/Shopify/hydrogen/pull/1408">#1408</a>) by <a href="https://github.com/Qubica"><code>@​Qubica</code></a></p>
</li>
<li>
<p>Add attributes option to useLoadScript (<a href="https://redirect.github.com/Shopify/hydrogen/pull/1442">#1442</a>) by <a href="https://github.com/wizardlyhel"><code>@​wizardlyhel</code></a></p>
</li>
<li>
<p>Unlock <code>hydrogen-react</code> package.json exports to make it easier to use with NextJS and other frameworks. <strong>Note</strong>: Using Hydrogen internals is not officially supported, and those internal APIs could change at anytime outside our usual calendar versioning. (<a href="https://redirect.github.com/Shopify/hydrogen/pull/994">#994</a>) by <a href="https://github.com/blittle"><code>@​blittle</code></a></p>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/Shopify/hydrogen/blob/main/packages/hydrogen-react/CHANGELOG.md"><code>@​shopify/hydrogen-react</code>'s changelog</a>.</em></p>
<blockquote>
<h2>2023.10.1</h2>
<h3>Patch Changes</h3>
<ul>
<li>
<p>Update all Node.js dependencies to version 18. (Not a breaking change, since Node.js 18 is already required by Remix v2.) (<a href="https://redirect.github.com/Shopify/hydrogen/pull/1543">#1543</a>) by <a href="https://github.com/michenly"><code>@​michenly</code></a></p>
</li>
<li>
<p>Skip private access token warning when using mock.shop. (<a href="https://redirect.github.com/Shopify/hydrogen/pull/1538">#1538</a>) by <a href="https://github.com/frandiox"><code>@​frandiox</code></a></p>
</li>
<li>
<p>Add an optional <code>channel</code> prop to the <code>ShopPayButton</code> component, which adds order attribution support for either the Headless or Hydrogen sales channel. (<a href="https://redirect.github.com/Shopify/hydrogen/pull/1447">#1447</a>) by <a href="https://github.com/QuintonC"><code>@​QuintonC</code></a></p>
</li>
</ul>
<h2>2023.10.0</h2>
<h3>Major Changes</h3>
<ul>
<li>
<p>The Storefront API types included are now generated using <code>@graphql-codegen/typescript@4</code> (<a href="https://github.com/dotansimha/graphql-code-generator/blob/master/packages/plugins/typescript/typescript/CHANGELOG.md#400">changelog</a>). This results in a breaking change if you were importing <code>Scalars</code> directly from <code>@shopify/hydrogen-react</code> or <code>@shopify/hydrogen</code>: (<a href="https://redirect.github.com/Shopify/hydrogen/pull/1108">#1108</a>) by <a href="https://github.com/frandiox"><code>@​frandiox</code></a></p>
<pre lang="diff"><code> import type {Scalars} from '@shopify/hydrogen/storefront-api-types';
<p>type Props = {</p>
<ul>
<li>id: Scalars['ID']; // This was a string</li>
</ul>
<ul>
<li>id: Scalars['ID']['input']; // Need to access 'input' or 'output' to get the string
};
</code></pre></li>
</ul>
</li>
</ul>
<h3>Patch Changes</h3>
<ul>
<li>
<p>Remove deprecated parameters and props (<a href="https://github.com/shopify/hydrogen/tree/HEAD/packages/hydrogen-react/issues/1455">#1455</a> and <a href="https://github.com/shopify/hydrogen/tree/HEAD/packages/hydrogen-react/issues/1435">#1435</a>): (<a href="https://redirect.github.com/Shopify/hydrogen/pull/1435">#1435</a>) by <a href="https://github.com/wizardlyhel"><code>@​wizardlyhel</code></a></p>
<ul>
<li><code>createStorefrontClient</code> parameters <code>buyerIp</code> and <code>requestGroupId</code></li>
<li><code>&lt;Image&gt;</code> props <code>loaderOptions</code> and <code>widths</code></li>
</ul>
</li>
</ul>
<h2>2023.7.6</h2>
<h3>Patch Changes</h3>
<ul>
<li>Fix template dist package due to CI error (<a href="https://redirect.github.com/Shopify/hydrogen/pull/1451">#1451</a>) by <a href="https://github.com/wizardlyhel"><code>@​wizardlyhel</code></a></li>
</ul>
<h2>2023.7.5</h2>
<h3>Patch Changes</h3>
<ul>
<li>
<p>Add Language to CartProvider (<a href="https://redirect.github.com/Shopify/hydrogen/pull/1408">#1408</a>) by <a href="https://github.com/Qubica"><code>@​Qubica</code></a></p>
</li>
<li>
<p>Add attributes option to useLoadScript (<a href="https://redirect.github.com/Shopify/hydrogen/pull/1442">#1442</a>) by <a href="https://github.com/wizardlyhel"><code>@​wizardlyhel</code></a></p>
</li>
<li>
<p>Unlock <code>hydrogen-react</code> package.json exports to make it easier to use with NextJS and other frameworks. <strong>Note</strong>: Using Hydrogen internals is not officially supported, and those internal APIs could change at anytime outside our usual calendar versioning. (<a href="https://redirect.github.com/Shopify/hydrogen/pull/994">#994</a>) by <a href="https://github.com/blittle"><code>@​blittle</code></a></p>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="727baacf60"><code>727baac</code></a> [ci] release 2023-10 (<a href="https://github.com/shopify/hydrogen/tree/HEAD/packages/hydrogen-react/issues/1491">#1491</a>)</li>
<li><a href="62f6787335"><code>62f6787</code></a> Hide token warning in mock.shop (<a href="https://github.com/shopify/hydrogen/tree/HEAD/packages/hydrogen-react/issues/1538">#1538</a>)</li>
<li><a href="f352f16ec4"><code>f352f16</code></a> Add docs commands to turbo (<a href="https://github.com/shopify/hydrogen/tree/HEAD/packages/hydrogen-react/issues/1472">#1472</a>)</li>
<li><a href="848c6260a2"><code>848c626</code></a> 🔼 Update dependency to require node v18 (<a href="https://github.com/shopify/hydrogen/tree/HEAD/packages/hydrogen-react/issues/1543">#1543</a>)</li>
<li><a href="e8cc49feff"><code>e8cc49f</code></a> Adds optional channel prop to ShopPayButton (<a href="https://github.com/shopify/hydrogen/tree/HEAD/packages/hydrogen-react/issues/1447">#1447</a>)</li>
<li><a href="300fe1b681"><code>300fe1b</code></a> [ci] release 2023-10 (<a href="https://github.com/shopify/hydrogen/tree/HEAD/packages/hydrogen-react/issues/1453">#1453</a>)</li>
<li><a href="2ff057d493"><code>2ff057d</code></a> Fix 2023-10 links (<a href="https://github.com/shopify/hydrogen/tree/HEAD/packages/hydrogen-react/issues/1471">#1471</a>)</li>
<li><a href="ad45656c5f"><code>ad45656</code></a> Update Codegen dependencies and make it stable (<a href="https://github.com/shopify/hydrogen/tree/HEAD/packages/hydrogen-react/issues/1108">#1108</a>)</li>
<li><a href="0ae7cbe280"><code>0ae7cbe</code></a> Remove deprecated props (<a href="https://github.com/shopify/hydrogen/tree/HEAD/packages/hydrogen-react/issues/1435">#1435</a>)</li>
<li><a href="7fc088e21b"><code>7fc088e</code></a> Sfapi 2023-10 update (<a href="https://github.com/shopify/hydrogen/tree/HEAD/packages/hydrogen-react/issues/1431">#1431</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/shopify/hydrogen/commits/@shopify/hydrogen-react@2023.10.1/packages/hydrogen-react">compare view</a></li>
</ul>
</details>
<br />

Updates `@shopify/mini-oxygen` from 2.2.2 to 2.2.5
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/Shopify/hydrogen/releases"><code>@​shopify/mini-oxygen</code>'s releases</a>.</em></p>
<blockquote>
<h2><code>@​shopify/mini-oxygen</code><a href="https://github.com/2"><code>@​2</code></a>.2.4</h2>
<h3>Patch Changes</h3>
<ul>
<li>
<p>Update all Node.js dependencies to version 18. (Not a breaking change, since Node.js 18 is already required by Remix v2.) (<a href="https://redirect.github.com/Shopify/hydrogen/pull/1543">#1543</a>) by <a href="https://github.com/michenly"><code>@​michenly</code></a></p>
</li>
<li>
<p>Fix how peer dependencies are resolved. (<a href="https://redirect.github.com/Shopify/hydrogen/pull/1489">#1489</a>) by <a href="https://github.com/frandiox"><code>@​frandiox</code></a></p>
</li>
</ul>
<h2><code>@​shopify/mini-oxygen</code><a href="https://github.com/2"><code>@​2</code></a>.2.3</h2>
<h3>Patch Changes</h3>
<ul>
<li>Increase the request body size limit to 100mb when running locally. (<a href="https://redirect.github.com/Shopify/hydrogen/pull/1421">#1421</a>) by <a href="https://github.com/frandiox"><code>@​frandiox</code></a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a href="https://github.com/Shopify/hydrogen/commits">compare view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will remove the ignore condition of the specified dependency and ignore conditions


</details>
2024-04-30 08:24:28 +00:00
dependabot[bot]
ba65da97e1 [framework-fixtures]: Bump parcel from 2.11.0 to 2.12.0 in /packages/static-build/test/fixtures/parcel-v2 in the core group (#11515)
Bumps the core group in /packages/static-build/test/fixtures/parcel-v2 with 1 update: [parcel](https://github.com/parcel-bundler/parcel).

Updates `parcel` from 2.11.0 to 2.12.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/parcel-bundler/parcel/releases">parcel's releases</a>.</em></p>
<blockquote>
<h2>v2.12.0</h2>
<p>Blog post: <a href="https://parceljs.org/blog/v2-12-0/">https://parceljs.org/blog/v2-12-0/</a></p>
<h3>Added</h3>
<ul>
<li>
<p>Core</p>
<ul>
<li>Add REPL playground for Parcel to the website – <a href="https://redirect.github.com/parcel-bundler/parcel/pull/9365">Details</a></li>
<li>Improve package manager detection for auto install – <a href="https://redirect.github.com/parcel-bundler/parcel/pull/9505">Details</a></li>
</ul>
</li>
<li>
<p>JavaScript</p>
<ul>
<li>Add support for JS macros – <a href="https://redirect.github.com/parcel-bundler/parcel/pull/9299">Details</a></li>
<li>Statically evaluate constants referenced by macros – <a href="https://redirect.github.com/parcel-bundler/parcel/pull/9487">Details</a></li>
<li>Upgrade to ESLint 8 – <a href="https://redirect.github.com/parcel-bundler/parcel/pull/8580">Details</a></li>
<li>Bump swc – <a href="https://redirect.github.com/parcel-bundler/parcel/pull/9498">Details</a></li>
</ul>
</li>
<li>
<p>CSS</p>
<ul>
<li>Use lightningcss to implement CSS packager – <a href="https://redirect.github.com/parcel-bundler/parcel/pull/8492">Details</a></li>
</ul>
</li>
<li>
<p>Bundler</p>
<ul>
<li>Rename &quot;parentAsset&quot; to &quot;root&quot; for Manual Shared Bundle config and remove unstable prefix – <a href="https://redirect.github.com/parcel-bundler/parcel/pull/9486">Details</a></li>
</ul>
</li>
<li>
<p>Web Extensions</p>
<ul>
<li>Add content script world property to manifest schema validation – <a href="https://redirect.github.com/parcel-bundler/parcel/pull/9510">Details</a></li>
</ul>
</li>
<li>
<p>Performance</p>
<ul>
<li>Adjacency list optimizations – <a href="https://redirect.github.com/parcel-bundler/parcel/pull/9444">Details</a></li>
<li>Break up request graph cache serialisation and run after build completion – <a href="https://redirect.github.com/parcel-bundler/parcel/pull/9384">Details</a></li>
</ul>
</li>
</ul>
<h3>Fixed</h3>
<ul>
<li>
<p>Core</p>
<ul>
<li>Drop per-pipeline transformation cache – <a href="https://redirect.github.com/parcel-bundler/parcel/pull/9459">Details</a></li>
<li>Clippy and use napi's Either3 – <a href="https://redirect.github.com/parcel-bundler/parcel/pull/9047">Details</a></li>
<li>Add lazy/eager cache key to avoid invalid change when switching modes – <a href="https://redirect.github.com/parcel-bundler/parcel/pull/9518">Details</a></li>
</ul>
</li>
<li>
<p>JavaScript</p>
<ul>
<li>Remove decl_collector pass and use SWC's unresolved_mark instead – <a href="https://redirect.github.com/parcel-bundler/parcel/pull/9520">Details</a></li>
</ul>
</li>
<li>
<p>Bundler</p>
<ul>
<li>Fix multiple css bundles in entry bundle groups issue – <a href="https://redirect.github.com/parcel-bundler/parcel/pull/9023">Details</a></li>
<li>Allow parallel type change bundles to be reused by async siblings – <a href="https://redirect.github.com/parcel-bundler/parcel/pull/9504">Details</a></li>
<li>Skip on missing parent asset for manual shared bundles – <a href="https://redirect.github.com/parcel-bundler/parcel/pull/9538">Details</a></li>
</ul>
</li>
</ul>
<h3>Unstable</h3>
<ul>
<li>Add source map support to the inline-require optimizer – <a href="https://redirect.github.com/parcel-bundler/parcel/pull/9511">Details</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/parcel-bundler/parcel/blob/v2/CHANGELOG.md">parcel's changelog</a>.</em></p>
<blockquote>
<h2>[2.12.0] - 2024-02-28</h2>
<h3>Added</h3>
<ul>
<li>
<p>Core</p>
<ul>
<li>Add REPL playground for Parcel to the website – <a href="https://redirect.github.com/parcel-bundler/parcel/pull/9365">Details</a></li>
<li>Improve package manager detection for auto install – <a href="https://redirect.github.com/parcel-bundler/parcel/pull/9505">Details</a></li>
</ul>
</li>
<li>
<p>JavaScript</p>
<ul>
<li>Add support for JS macros – <a href="https://redirect.github.com/parcel-bundler/parcel/pull/9299">Details</a></li>
<li>Statically evaluate constants referenced by macros – <a href="https://redirect.github.com/parcel-bundler/parcel/pull/9487">Details</a></li>
<li>Upgrade to ESLint 8 – <a href="https://redirect.github.com/parcel-bundler/parcel/pull/8580">Details</a></li>
<li>Bump swc – <a href="https://redirect.github.com/parcel-bundler/parcel/pull/9498">Details</a></li>
</ul>
</li>
<li>
<p>CSS</p>
<ul>
<li>Use lightningcss to implement CSS packager – <a href="https://redirect.github.com/parcel-bundler/parcel/pull/8492">Details</a></li>
</ul>
</li>
<li>
<p>Bundler</p>
<ul>
<li>Rename &quot;parentAsset&quot; to &quot;root&quot; for Manual Shared Bundle config and remove unstable prefix – <a href="https://redirect.github.com/parcel-bundler/parcel/pull/9486">Details</a></li>
</ul>
</li>
<li>
<p>Web Extensions</p>
<ul>
<li>Add content script world property to manifest schema validation – <a href="https://redirect.github.com/parcel-bundler/parcel/pull/9510">Details</a></li>
</ul>
</li>
<li>
<p>Performance</p>
<ul>
<li>Adjacency list optimizations – <a href="https://redirect.github.com/parcel-bundler/parcel/pull/9444">Details</a></li>
<li>Break up request graph cache serialisation and run after build completion – <a href="https://redirect.github.com/parcel-bundler/parcel/pull/9384">Details</a></li>
</ul>
</li>
</ul>
<h3>Fixed</h3>
<ul>
<li>
<p>Core</p>
<ul>
<li>Drop per-pipeline transformation cache – <a href="https://redirect.github.com/parcel-bundler/parcel/pull/9459">Details</a></li>
<li>Clippy and use napi's Either3 – <a href="https://redirect.github.com/parcel-bundler/parcel/pull/9047">Details</a></li>
<li>Add lazy/eager cache key to avoid invalid change when switching modes – <a href="https://redirect.github.com/parcel-bundler/parcel/pull/9518">Details</a></li>
</ul>
</li>
<li>
<p>JavaScript</p>
<ul>
<li>Remove decl_collector pass and use SWC's unresolved_mark instead – <a href="https://redirect.github.com/parcel-bundler/parcel/pull/9520">Details</a></li>
</ul>
</li>
<li>
<p>Bundler</p>
<ul>
<li>Fix multiple css bundles in entry bundle groups issue – <a href="https://redirect.github.com/parcel-bundler/parcel/pull/9023">Details</a></li>
<li>Allow parallel type change bundles to be reused by async siblings – <a href="https://redirect.github.com/parcel-bundler/parcel/pull/9504">Details</a></li>
<li>Skip on missing parent asset for manual shared bundles – <a href="https://redirect.github.com/parcel-bundler/parcel/pull/9538">Details</a></li>
</ul>
</li>
</ul>
<h3>Unstable</h3>
<ul>
<li>Add source map support to the inline-require optimizer – <a href="https://redirect.github.com/parcel-bundler/parcel/pull/9511">Details</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="face1c2879"><code>face1c2</code></a> v2.12.0</li>
<li><a href="3398e6e2a4"><code>3398e6e</code></a> changelog for v2.12.0</li>
<li><a href="475a0af48e"><code>475a0af</code></a> Add repl deploy to release workflow (<a href="https://redirect.github.com/parcel-bundler/parcel/issues/9548">#9548</a>)</li>
<li><a href="78fe2ce24f"><code>78fe2ce</code></a> Add <code>@​parcel/macros</code> package with macro context TS definitions (<a href="https://redirect.github.com/parcel-bundler/parcel/issues/9544">#9544</a>)</li>
<li><a href="ac43c39e23"><code>ac43c39</code></a> Skip on missing parent asset for manual shared bundles (<a href="https://redirect.github.com/parcel-bundler/parcel/issues/9538">#9538</a>)</li>
<li><a href="05604990d7"><code>0560499</code></a> Break up request graph cache serialisation and run after build completion (<a href="https://redirect.github.com/parcel-bundler/parcel/issues/9">#9</a>...</li>
<li><a href="2215d360dc"><code>2215d36</code></a> Adjacency list optimizations (<a href="https://redirect.github.com/parcel-bundler/parcel/issues/9444">#9444</a>)</li>
<li><a href="e14784dedd"><code>e14784d</code></a> Support default interop for CommonJS macros (<a href="https://redirect.github.com/parcel-bundler/parcel/issues/9525">#9525</a>)</li>
<li><a href="a93af6a3d4"><code>a93af6a</code></a> Allow parallel type change bundles to be reused by async siblings (<a href="https://redirect.github.com/parcel-bundler/parcel/issues/9504">#9504</a>)</li>
<li><a href="e0b99c2a42"><code>e0b99c2</code></a> Remove decl_collector pass and use SWC's unresolved_mark instead (<a href="https://redirect.github.com/parcel-bundler/parcel/issues/9520">#9520</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/parcel-bundler/parcel/compare/v2.11.0...v2.12.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=parcel&package-manager=npm_and_yarn&previous-version=2.11.0&new-version=2.12.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will remove the ignore condition of the specified dependency and ignore conditions


</details>
2024-04-30 06:22:58 +00:00
dependabot[bot]
28b6b810be [framework-fixtures]: Bump the core group in /packages/static-build/test/fixtures/ionic-react-v7 with 4 updates (#11499)
Bumps the core group in /packages/static-build/test/fixtures/ionic-react-v7 with 4 updates: [react](https://github.com/facebook/react/tree/HEAD/packages/react), [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react), [react-dom](https://github.com/facebook/react/tree/HEAD/packages/react-dom) and [@types/react-dom](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-dom).

Updates `react` from 18.2.0 to 18.3.0
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a href="https://github.com/facebook/react/commits/HEAD/packages/react">compare view</a></li>
</ul>
</details>
<details>
<summary>Maintainer changes</summary>
<p>This version was pushed to npm by <a href="https://www.npmjs.com/~react-bot">react-bot</a>, a new releaser for react since your current version.</p>
</details>
<br />

Updates `@types/react` from 18.2.45 to 18.3.0
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a href="https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react">compare view</a></li>
</ul>
</details>
<br />

Updates `react-dom` from 18.2.0 to 18.3.0
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a href="https://github.com/facebook/react/commits/HEAD/packages/react-dom">compare view</a></li>
</ul>
</details>
<details>
<summary>Maintainer changes</summary>
<p>This version was pushed to npm by <a href="https://www.npmjs.com/~react-bot">react-bot</a>, a new releaser for react-dom since your current version.</p>
</details>
<br />

Updates `@types/react-dom` from 18.2.17 to 18.3.0
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a href="https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-dom">compare view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will remove the ignore condition of the specified dependency and ignore conditions


</details>
2024-04-30 03:48:56 +00:00
Trek Glowacki
9fc9a10c82 [static-build] Add ParcelJS to dependabot (#11501)
Add ParcelJS to dependabot 🤖
2024-04-30 03:27:19 +00:00
dependabot[bot]
aef56edc35 [framework-fixtures]: Bump astro from 4.6.2 to 4.7.0 in /packages/static-build/test/fixtures/astro-v4 in the core group (#11500)
Bumps the core group in /packages/static-build/test/fixtures/astro-v4 with 1 update: [astro](https://github.com/withastro/astro/tree/HEAD/packages/astro).

Updates `astro` from 4.6.2 to 4.7.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/withastro/astro/releases">astro's releases</a>.</em></p>
<blockquote>
<h2>astro@4.7.0</h2>
<h3>Minor Changes</h3>
<ul>
<li>
<p><a href="https://redirect.github.com/withastro/astro/pull/10665">#10665</a> <a href="7b4f284020"><code>7b4f284</code></a> Thanks <a href="https://github.com/Princesseuh"><code>@​Princesseuh</code></a>! - Adds new utilities to ease the creation of toolbar apps including <code>defineToolbarApp</code> to make it easier to define your toolbar app and <code>app</code> and <code>server</code> helpers for easier communication between the toolbar and the server. These new utilities abstract away some of the boilerplate code that is common in toolbar apps, and lower the barrier of entry for app authors.</p>
<p>For example, instead of creating an event listener for the <code>app-toggled</code> event and manually typing the value in the callback, you can now use the <code>onAppToggled</code> method. Additionally, communicating with the server does not require knowing any of the Vite APIs anymore, as a new <code>server</code> object is passed to the <code>init</code> function that contains easy to use methods for communicating with the server.</p>
<pre lang="diff"><code>import { defineToolbarApp } from &quot;astro/toolbar&quot;;
<p>export default defineToolbarApp({
init(canvas, app, server) {</p>
<ul>
<li>app.addEventListener(&quot;app-toggled&quot;, (e) =&gt; {</li>
<li>
<pre><code> console.log(`App is now ${state ? &amp;quot;enabled&amp;quot; : &amp;quot;disabled&amp;quot;}`);.
</code></pre>
</li>
<li>});</li>
</ul>
<ul>
<li>app.onToggled(({ state }) =&gt; {</li>
<li>
<pre><code>   console.log(`App is now ${state ? &amp;quot;enabled&amp;quot; : &amp;quot;disabled&amp;quot;}`);
</code></pre>
</li>
<li>});</li>
</ul>
<ul>
<li>if (import.meta.hot) {</li>
<li>
<pre><code> import.meta.hot.send(&amp;quot;my-app:my-client-event&amp;quot;, { message: &amp;quot;world&amp;quot; });
</code></pre>
</li>
<li>}</li>
</ul>
<ul>
<li>server.send(&quot;my-app:my-client-event&quot;, { message: &quot;world&quot; })</li>
</ul>
<ul>
<li>if (import.meta.hot) {</li>
<li>
<pre><code> import.meta.hot.on(&amp;quot;my-server-event&amp;quot;, (data: {message: string}) =&amp;gt; {
</code></pre>
</li>
<li>
<pre><code>   console.log(data.message);
</code></pre>
</li>
<li>
<pre><code> });
</code></pre>
</li>
<li>}</li>
</ul>
<ul>
<li>server.on&lt;{ message: string }&gt;(&quot;my-server-event&quot;, (data) =&gt; {</li>
<li>
<pre><code> console.log(data.message); // data is typed using the type parameter
</code></pre>
</li>
<li>});
},
})
</code></pre></li>
</ul>
<p>Server helpers are also available on the server side, for use in your integrations, through the new <code>toolbar</code> object:</p>
<pre lang="ts"><code>&quot;astro:server:setup&quot;: ({ toolbar }) =&gt; {
  toolbar.on&lt;{ message: string }&gt;(&quot;my-app:my-client-event&quot;, (data) =&gt; {
    console.log(data.message);
    toolbar.send(&quot;my-server-event&quot;, { message: &quot;hello&quot; });
  });
}
</code></pre>
</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/withastro/astro/blob/main/packages/astro/CHANGELOG.md">astro's changelog</a>.</em></p>
<blockquote>
<h2>4.7.0</h2>
<h3>Minor Changes</h3>
<ul>
<li>
<p><a href="https://redirect.github.com/withastro/astro/pull/10665">#10665</a> <a href="7b4f284020"><code>7b4f284</code></a> Thanks <a href="https://github.com/Princesseuh"><code>@​Princesseuh</code></a>! - Adds new utilities to ease the creation of toolbar apps including <code>defineToolbarApp</code> to make it easier to define your toolbar app and <code>app</code> and <code>server</code> helpers for easier communication between the toolbar and the server. These new utilities abstract away some of the boilerplate code that is common in toolbar apps, and lower the barrier of entry for app authors.</p>
<p>For example, instead of creating an event listener for the <code>app-toggled</code> event and manually typing the value in the callback, you can now use the <code>onAppToggled</code> method. Additionally, communicating with the server does not require knowing any of the Vite APIs anymore, as a new <code>server</code> object is passed to the <code>init</code> function that contains easy to use methods for communicating with the server.</p>
<pre lang="diff"><code>import { defineToolbarApp } from &quot;astro/toolbar&quot;;
<p>export default defineToolbarApp({
init(canvas, app, server) {</p>
<ul>
<li>app.addEventListener(&quot;app-toggled&quot;, (e) =&gt; {</li>
<li>
<pre><code> console.log(`App is now ${state ? &amp;quot;enabled&amp;quot; : &amp;quot;disabled&amp;quot;}`);.
</code></pre>
</li>
<li>});</li>
</ul>
<ul>
<li>app.onToggled(({ state }) =&gt; {</li>
<li>
<pre><code>   console.log(`App is now ${state ? &amp;quot;enabled&amp;quot; : &amp;quot;disabled&amp;quot;}`);
</code></pre>
</li>
<li>});</li>
</ul>
<ul>
<li>if (import.meta.hot) {</li>
<li>
<pre><code> import.meta.hot.send(&amp;quot;my-app:my-client-event&amp;quot;, { message: &amp;quot;world&amp;quot; });
</code></pre>
</li>
<li>}</li>
</ul>
<ul>
<li>server.send(&quot;my-app:my-client-event&quot;, { message: &quot;world&quot; })</li>
</ul>
<ul>
<li>if (import.meta.hot) {</li>
<li>
<pre><code> import.meta.hot.on(&amp;quot;my-server-event&amp;quot;, (data: {message: string}) =&amp;gt; {
</code></pre>
</li>
<li>
<pre><code>   console.log(data.message);
</code></pre>
</li>
<li>
<pre><code> });
</code></pre>
</li>
<li>}</li>
</ul>
<ul>
<li>server.on&lt;{ message: string }&gt;(&quot;my-server-event&quot;, (data) =&gt; {</li>
<li>
<pre><code> console.log(data.message); // data is typed using the type parameter
</code></pre>
</li>
<li>});
},
})
</code></pre></li>
</ul>
<p>Server helpers are also available on the server side, for use in your integrations, through the new <code>toolbar</code> object:</p>
<pre lang="ts"><code>&quot;astro:server:setup&quot;: ({ toolbar }) =&gt; {
  toolbar.on&lt;{ message: string }&gt;(&quot;my-app:my-client-event&quot;, (data) =&gt; {
    console.log(data.message);
    toolbar.send(&quot;my-server-event&quot;, { message: &quot;hello&quot; });
  });
}
</code></pre>
</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="9876163406"><code>9876163</code></a> [ci] release (<a href="https://github.com/withastro/astro/tree/HEAD/packages/astro/issues/10865">#10865</a>)</li>
<li><a href="fc097e81a8"><code>fc097e8</code></a> [ci] format</li>
<li><a href="7b4f284020"><code>7b4f284</code></a> feat(toolbar): Toolbar API improvements (<a href="https://github.com/withastro/astro/tree/HEAD/packages/astro/issues/10665">#10665</a>)</li>
<li><a href="6fc4c0e420"><code>6fc4c0e</code></a> feat: add a new message telling the user that a new version of Astro is avail...</li>
<li><a href="43ead8fbd5"><code>43ead8f</code></a> Enable <code>allowJs</code> for <code>strictest.json</code> (<a href="https://github.com/withastro/astro/tree/HEAD/packages/astro/issues/10762">#10762</a>)</li>
<li><a href="8b59d5d078"><code>8b59d5d</code></a> Update sharp to 0.33 to fix issue with Alpine Linux (<a href="https://github.com/withastro/astro/tree/HEAD/packages/astro/issues/10684">#10684</a>)</li>
<li><a href="b673bc8505"><code>b673bc8</code></a> Fix an issue where <code>astro build</code> writes type declaration files to <code>outDir</code> (#...</li>
<li><a href="a94046588c"><code>a940465</code></a> [ci] release (<a href="https://github.com/withastro/astro/tree/HEAD/packages/astro/issues/10842">#10842</a>)</li>
<li><a href="9326531333"><code>9326531</code></a> [ci] format</li>
<li><a href="30cf82ac3e"><code>30cf82a</code></a> Prevents inputs from changing ViewTransitions' form method or action (<a href="https://github.com/withastro/astro/tree/HEAD/packages/astro/issues/10856">#10856</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/withastro/astro/commits/astro@4.7.0/packages/astro">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=astro&package-manager=npm_and_yarn&previous-version=4.6.2&new-version=4.7.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will remove the ignore condition of the specified dependency and ignore conditions


</details>
2024-04-30 03:23:28 +00:00
Vercel Release Bot
e6a3497fb1 [tests] Upgrade Turbo to version 1.13.3 (#11505)
This auto-generated PR updates Turbo to version 1.13.3
2024-04-30 03:10:10 +00:00
Jeff See
763a6d1070 Add support for ruby 3.3 (#11497)
Add support for ruby3.3 when using AL2023 (Node v20). No support for
ruby3.3 on Node <20 planned.

Ruby integration tests will now running on AL2023

---------

Co-authored-by: Nathan Rajlich <n@n8.io>
2024-04-29 19:43:28 -07:00
Steven
21f5e7375e [build-utils] Fix getPrefixedEnvVars() to handle VERCEL_PROJECT_PRODUCTION_URL (#11506)
This will ensure the framework env var prefix is applied to
`VERCEL_PROJECT_PRODUCTION_URL` as well.


https://vercel.com/docs/projects/environment-variables/system-environment-variables#framework-environment-variables
2024-04-29 14:20:01 -04:00
Vercel Release Bot
256d0fd463 Version Packages (#11511)
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## vercel@34.1.4

### Patch Changes

- Updated dependencies
\[[`5b7960337`](5b79603378)]:
    -   @vercel/next@4.2.4

## @vercel/next@4.2.4

### Patch Changes

- [next]&#x3A; Revert .action handling for dynamic routes
([#11509](https://github.com/vercel/vercel/pull/11509))

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-04-29 10:29:48 -05:00
Zack Tanner
5b79603378 Revert "[next] Reland add .action handling for dynamic routes" (#11509)
Reverts vercel/vercel#11487.

This feature will be relanded behind a feature flag.
2024-04-29 10:26:15 -05:00
Erika Rowland
863199aa0a Migrate bisect argument parsing (#11491)
Migrate `vc bisect` to updated argument parsing.

I added a `try` block with `handleError`, this seems to be in line with how we do this in other `vc` commands. It might be worth thinking about how we might abstract this logic to centralize it.
2024-04-29 15:18:29 +00:00
Erika Rowland
97e02ae506 Erikarowland/zero 1891 update ionic angular package in fixtures (#11485)
We follow this guide: https://ionicframework.com/docs/updating/8-0. There were no major breaking changes.
2024-04-29 09:10:27 +00:00
dependabot[bot]
bd9236f228 [framework-fixtures]: Bump @stencil/core from 4.16.0 to 4.17.0 in /packages/static-build/test/fixtures/stencil-v4 in the core group (#11476)
Bumps the core group in /packages/static-build/test/fixtures/stencil-v4 with 1 update: [@stencil/core](https://github.com/ionic-team/stencil).

Updates `@stencil/core` from 4.16.0 to 4.17.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/ionic-team/stencil/releases"><code>@​stencil/core</code>'s releases</a>.</em></p>
<blockquote>
<h2>♨️ 4.17.0 (2024-04-22)</h2>
<h3>Internal</h3>
<ul>
<li><strong>Rollup to Esbuild Migration</strong>
The Stencil team has been working on a migration from Rollup to Esbuild. This release (v4.17.0) is the first release we make in which the published Stencil code is compiled by Esbuild. We have done our due diligence to ensure that this will have no impact on Stencil users nor the output of your compiled components. If you experience any problems though, please <a href="https://github.com/ionic-team/stencil/issues/new?assignees=&amp;labels=&amp;projects=&amp;template=bug_report.yml&amp;title=bug%3A+">raise an issue</a> and we will address it accordingly.</li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li><strong>docs:</strong> merge together style docs from multiple CSS files (<a href="https://redirect.github.com/ionic-team/stencil/issues/5653">#5653</a>) (<a href="84e1a14048">84e1a14</a>)</li>
<li><strong>docs:</strong> respect custom README content when writing to a custom path (<a href="https://redirect.github.com/ionic-team/stencil/issues/5648">#5648</a>) (<a href="6bfba1dda5">6bfba1d</a>), fixes <a href="https://redirect.github.com/ionic-team/stencil/issues/5400">#5400</a></li>
<li><strong>slot-fallback:</strong> fix hiding fallback slot content issue when the slotted element is a text node (<a href="https://redirect.github.com/ionic-team/stencil/issues/5496">#5496</a>) (<a href="29c69c48a2">29c69c4</a>), fixes <a href="https://redirect.github.com/ionic-team/stencil/issues/5335">#5335</a></li>
<li><strong>testing:</strong> perform string -&gt; boolean type casting for Jest config (<a href="https://redirect.github.com/ionic-team/stencil/issues/5672">#5672</a>) (<a href="20f74fce81">20f74fc</a>), fixes <a href="https://redirect.github.com/ionic-team/stencil/issues/5640">#5640</a></li>
</ul>
<h1>Thanks</h1>
<p>🎉 Thanks <a href="https://github.com/yigityuce"><code>@​yigityuce</code></a> &amp; <a href="https://github.com/PebblerWon"><code>@​PebblerWon</code></a> for their contributions! 🎉</p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/ionic-team/stencil/blob/main/CHANGELOG.md"><code>@​stencil/core</code>'s changelog</a>.</em></p>
<blockquote>
<h1>♨️ <a href="https://github.com/ionic-team/stencil/compare/v4.16.0...v4.17.0">4.17.0</a> (2024-04-22)</h1>
<h3>Internal</h3>
<ul>
<li><strong>Rollup to Esbuild Migration</strong>
The Stencil team has been working on a migration from Rollup to Esbuild. This release (v4.17.0) is the first release we make in which the published Stencil code is compiled by Esbuild. We have done our due diligence to ensure that this will have no impact on Stencil users nor the output of your compiled components. If you experience any problems though, please <a href="https://github.com/ionic-team/stencil/issues/new?assignees=&amp;labels=&amp;projects=&amp;template=bug_report.yml&amp;title=bug%3A+">raise an issue</a> and we will address it accordingly.</li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li><strong>docs:</strong> merge together style docs from multiple CSS files (<a href="https://redirect.github.com/ionic-team/stencil/issues/5653">#5653</a>) (<a href="84e1a14048">84e1a14</a>)</li>
<li><strong>docs:</strong> respect custom README content when writing to a custom path (<a href="https://redirect.github.com/ionic-team/stencil/issues/5648">#5648</a>) (<a href="6bfba1dda5">6bfba1d</a>), fixes <a href="https://redirect.github.com/ionic-team/stencil/issues/5400">#5400</a></li>
<li><strong>slot-fallback:</strong> fix hiding fallback slot content issue when the slotted element is a text node (<a href="https://redirect.github.com/ionic-team/stencil/issues/5496">#5496</a>) (<a href="29c69c48a2">29c69c4</a>), fixes <a href="https://redirect.github.com/ionic-team/stencil/issues/5335">#5335</a></li>
<li><strong>testing:</strong> perform string -&gt; boolean type casting for Jest config (<a href="https://redirect.github.com/ionic-team/stencil/issues/5672">#5672</a>) (<a href="20f74fce81">20f74fc</a>), fixes <a href="https://redirect.github.com/ionic-team/stencil/issues/5640">#5640</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="9a28fa5a2c"><code>9a28fa5</code></a> Release v4.17.0 (<a href="https://redirect.github.com/ionic-team/stencil/issues/5690">#5690</a>)</li>
<li><a href="9bd5527074"><code>9bd5527</code></a> chore(deps): update dependency dts-bundle-generator to ~9.5.0 (<a href="https://redirect.github.com/ionic-team/stencil/issues/5687">#5687</a>)</li>
<li><a href="29c69c48a2"><code>29c69c4</code></a> fix(slot-fallback): fix hiding fallback slot content issue when the slotted e...</li>
<li><a href="20f74fce81"><code>20f74fc</code></a> fix(testing): perform string -&gt; boolean type casting for Jest config (<a href="https://redirect.github.com/ionic-team/stencil/issues/5672">#5672</a>)</li>
<li><a href="dcbaaf30e2"><code>dcbaaf3</code></a> chore(deps): update dependency <code>@​types/eslint</code> to v8.56.10 (<a href="https://redirect.github.com/ionic-team/stencil/issues/5683">#5683</a>)</li>
<li><a href="bb9647c955"><code>bb9647c</code></a> chore(deps): update download + upload artifacts (<a href="https://redirect.github.com/ionic-team/stencil/issues/5685">#5685</a>)</li>
<li><a href="913b621979"><code>913b621</code></a> chore(validation): remove unneeded path arg (<a href="https://redirect.github.com/ionic-team/stencil/issues/5628">#5628</a>)</li>
<li><a href="1a64abb38c"><code>1a64abb</code></a> chore(deps): update dependency magic-string to v0.30.10 (<a href="https://redirect.github.com/ionic-team/stencil/issues/5684">#5684</a>)</li>
<li><a href="d0b3a798a0"><code>d0b3a79</code></a> chore(deps): update peter-evans/create-pull-request action to v6.0.4 (<a href="https://redirect.github.com/ionic-team/stencil/issues/5686">#5686</a>)</li>
<li><a href="840d3fd061"><code>840d3fd</code></a> chore(deps): update typescript-eslint to v7.7.0 (<a href="https://redirect.github.com/ionic-team/stencil/issues/5688">#5688</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/ionic-team/stencil/compare/v4.16.0...v4.17.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@stencil/core&package-manager=npm_and_yarn&previous-version=4.16.0&new-version=4.17.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will remove the ignore condition of the specified dependency and ignore conditions


</details>
2024-04-29 08:57:05 +00:00
Vercel Release Bot
26bc51e0d6 [examples][tests] Upgrade Next.js to version 14.2.3 (#11490)
This auto-generated PR updates 8 packages to Next.js version 14.2.3

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-04-25 19:07:35 -04:00
Vercel Release Bot
21b87d2ee6 Version Packages (#11489)
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## vercel@34.1.3

### Patch Changes

- Updated dependencies
\[[`5758838d0`](5758838d09)]:
    -   @vercel/next@4.2.3

## @vercel/next@4.2.3

### Patch Changes

- [next] Reland add .action handling for dynamic routes
([#11487](https://github.com/vercel/vercel/pull/11487))

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-04-25 12:32:46 -05:00
dependabot[bot]
f765c24689 [framework-fixtures]: Bump vite from 4.4.11 to 4.5.3 in /packages/static-build/test/fixtures/vite-v5 in the core group (#11479)
Bumps the core group in /packages/static-build/test/fixtures/vite-v5 with 1 update: [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite).

Updates `vite` from 4.4.11 to 4.5.3
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/vitejs/vite/blob/v4.5.3/packages/vite/CHANGELOG.md">vite's changelog</a>.</em></p>
<blockquote>
<h2><!-- raw HTML omitted -->4.5.3 (2024-03-24)<!-- raw HTML omitted --></h2>
<ul>
<li>fix: <code>fs.deny</code> with globs with directories (<a href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/16250">#16250</a>) (<a href="https://github.com/vitejs/vite/commit/96a7f3a">96a7f3a</a>), closes <a href="https://redirect.github.com/vitejs/vite/issues/16250">#16250</a></li>
</ul>
<h2><!-- raw HTML omitted -->4.5.2 (2024-01-19)<!-- raw HTML omitted --></h2>
<ul>
<li>fix: fs deny for case insensitive systems (<a href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/15653">#15653</a>) (<a href="https://github.com/vitejs/vite/commit/eeec23b">eeec23b</a>), closes <a href="https://redirect.github.com/vitejs/vite/issues/15653">#15653</a></li>
</ul>
<h2><!-- raw HTML omitted -->4.5.1 (2023-12-04)<!-- raw HTML omitted --></h2>
<ul>
<li>fix: backport <a href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/15223">#15223</a>, proxy html path should be encoded (<a href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/15226">#15226</a>) (<a href="https://github.com/vitejs/vite/commit/41bb354">41bb354</a>), closes <a href="https://redirect.github.com/vitejs/vite/issues/15223">#15223</a> <a href="https://redirect.github.com/vitejs/vite/issues/15226">#15226</a></li>
</ul>
<h2>4.5.0 (2023-10-18)</h2>
<ul>
<li>feat: backport mdx as known js source (<a href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/14560">#14560</a>) (<a href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/14670">#14670</a>) (<a href="https://github.com/vitejs/vite/commit/45595ef">45595ef</a>), closes <a href="https://redirect.github.com/vitejs/vite/issues/14560">#14560</a> <a href="https://redirect.github.com/vitejs/vite/issues/14670">#14670</a></li>
<li>feat: scan .marko files (<a href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/14669">#14669</a>) (<a href="https://github.com/vitejs/vite/commit/ed7bdc5">ed7bdc5</a>), closes <a href="https://redirect.github.com/vitejs/vite/issues/14669">#14669</a></li>
<li>feat(ssr): backport ssr.resolve.conditions and ssr.resolve.externalConditions (<a href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/14498">#14498</a>) (<a href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/14668">#14668</a>) (<a href="https://github.com/vitejs/vite/commit/520139c">520139c</a>), closes <a href="https://redirect.github.com/vitejs/vite/issues/14498">#14498</a> <a href="https://redirect.github.com/vitejs/vite/issues/14668">#14668</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="aac695e9f8"><code>aac695e</code></a> release: v4.5.3</li>
<li><a href="96a7f3a41e"><code>96a7f3a</code></a> fix: <code>fs.deny</code> with globs with directories (<a href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/16250">#16250</a>)</li>
<li><a href="d0360c1247"><code>d0360c1</code></a> release: v4.5.2</li>
<li><a href="eeec23bbc9"><code>eeec23b</code></a> fix: fs deny for case insensitive systems (<a href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/15653">#15653</a>)</li>
<li><a href="c0751156f0"><code>c075115</code></a> release: v4.5.1</li>
<li><a href="41bb3546a8"><code>41bb354</code></a> fix: backport <a href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/15223">#15223</a>, proxy html path should be encoded (<a href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/15226">#15226</a>)</li>
<li><a href="055d2b86b0"><code>055d2b8</code></a> release: v4.5.0</li>
<li><a href="ed7bdc5206"><code>ed7bdc5</code></a> feat: scan .marko files (<a href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/14669">#14669</a>)</li>
<li><a href="45595ef82f"><code>45595ef</code></a> feat: backport mdx as known js source (<a href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/14560">#14560</a>) (<a href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/14670">#14670</a>)</li>
<li><a href="520139cdff"><code>520139c</code></a> feat(ssr): backport ssr.resolve.conditions and ssr.resolve.externalConditions...</li>
<li>See full diff in <a href="https://github.com/vitejs/vite/commits/v4.5.3/packages/vite">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=vite&package-manager=npm_and_yarn&previous-version=4.4.11&new-version=4.5.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will remove the ignore condition of the specified dependency and ignore conditions


</details>
2024-04-25 16:46:52 +00:00
Erika Rowland
0f12005a68 [cli] Migrate alias command to use parseArguments and getFlagsSpecification (#11467)
Migrating `vc alias` to use new argument parsing utilities.

Note that our snapshot tests show that our help text was out of sync with what we were actually parsing from the user. 

In particular, we were showing `-n` as the shorthand for both `next` and `limit` and neither of these had this shortflag. `next` was parsing `-N` (capital), so I've updated it to that.

`--json` was parsed, but wasn't mentioned in the help text. I've kept it this way, but it may be worth adding a description. We may want to have a separate discussion about the nature and role of `json` output from our CLI as a whole.
2024-04-24 19:48:04 +00:00
JJ Kasper
5758838d09 [next] Reland add .action handling for dynamic routes (#11487)
This relands https://github.com/vercel/vercel/pull/11461 fixing the
routes increase by combining with the existing route so we don't hit the
routes limit like we did previously.

---------

Co-authored-by: Zack Tanner <1939140+ztanner@users.noreply.github.com>
2024-04-24 12:33:16 -07:00
Zack Tanner
9dab15dc88 [next] add tests for server actions (#11482)
There aren't currently any tests for server actions which have special handling in the builder. This adds tests to help avoid regressions in future Next.js builder work.
2024-04-24 18:10:51 +00:00
349 changed files with 6266 additions and 3345 deletions

4
.github/CODEOWNERS vendored
View File

@@ -5,13 +5,13 @@
* @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @erikareads
/.github/workflows @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @erikareads @ijjk
/packages/fs-detectors @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @erikareads @agadzik @chloetedder
/packages/next @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @erikareads @timneutkens @ijjk @ztanner @huozhi @Ethan-Arrowood @styfle
/packages/next @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @erikareads @timneutkens @ijjk @ztanner @huozhi @Ethan-Arrowood
/packages/routing-utils @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @erikareads @ijjk
/packages/static-build @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @erikareads
/packages/edge @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @erikareads @vercel/compute
/examples @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @erikareads @leerob
/examples/create-react-app @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @erikareads @Timer
/examples/nextjs @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @erikareads @timneutkens @ijjk @ztanner @huozhi @Ethan-Arrowood @styfle
/examples/nextjs @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @erikareads @timneutkens @ijjk @ztanner @huozhi @Ethan-Arrowood
/packages/node @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @erikareads @Kikobeats
# Unrestricted Paths

View File

@@ -78,7 +78,7 @@ updates:
update-types:
- 'minor'
- directory: /packages/static-build/test/fixtures/ionic-angular-v7
- directory: /packages/static-build/test/fixtures/ionic-angular-v8
schedule:
interval: 'daily'
open-pull-requests-limit: 1
@@ -175,6 +175,33 @@ updates:
update-types:
- 'minor'
- directory: /packages/static-build/test/fixtures/parcel-v2
schedule:
interval: 'daily'
open-pull-requests-limit: 1
reviewers:
- 'trek'
- 'TooTallNate'
- 'EndangeredMassa'
- 'erikareads'
- 'jeffsee55'
- 'onsclom'
commit-message:
prefix: '[framework-fixtures]'
package-ecosystem: 'npm'
allow:
- dependency-name: 'parcel'
ignore:
- dependency-name: 'parcel'
update-types:
['version-update:semver-major', 'version-update:semver-patch']
groups:
core:
patterns:
- 'parcel'
update-types:
- 'minor'
- directory: /packages/static-build/test/fixtures/preact-v10
schedule:
interval: 'daily'

124
.github/workflows/test-18.yml vendored Normal file
View File

@@ -0,0 +1,124 @@
name: Tests Node.js v18
on:
push:
branches:
- main
tags:
- '!*'
pull_request:
env:
NODE_VERSION: '18'
TURBO_REMOTE_ONLY: 'true'
TURBO_TEAM: 'vercel'
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
setup:
name: Find Changes
runs-on: ubuntu-latest
outputs:
tests: ${{ steps['set-tests'].outputs['tests'] }}
dplUrl: ${{ steps.waitForTarball.outputs.url }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: install pnpm@8.3.1
run: npm i -g pnpm@8.3.1
- run: pnpm install
- id: set-tests
run: |
TESTS_ARRAY=$(node utils/chunk-tests-18.js $SCRIPT_NAME)
echo "Files to test:"
echo "$TESTS_ARRAY"
echo "tests=$TESTS_ARRAY" >> $GITHUB_OUTPUT
- uses: patrickedqvist/wait-for-vercel-preview@bfdff514ff78a669f2536e9f4dd4ef5813a704a2
id: waitForTarball
with:
token: ${{ secrets.GITHUB_TOKEN }}
max_timeout: 360
check_interval: 5
test:
timeout-minutes: 120
runs-on: ${{ matrix.runner }}
name: ${{matrix.scriptName}} (${{matrix.packageName}}, ${{matrix.chunkNumber}}, ${{ matrix.runner }})
if: ${{ needs.setup.outputs['tests'] != '[]' }}
needs:
- setup
strategy:
fail-fast: false
matrix:
include: ${{ fromJson(needs.setup.outputs['tests']) }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.nodeVersion || env.NODE_VERSION }}
# yarn 1.22.21 introduced a Corepack bug when running tests.
# this can be removed once https://github.com/yarnpkg/yarn/issues/9015 is resolved
- name: install yarn@1.22.19
run: npm i -g yarn@1.22.19
- name: install pnpm@8.3.1
run: npm i -g pnpm@8.3.1
- run: pnpm install
- name: Build ${{matrix.packageName}} and all its dependencies
run: node utils/gen.js && node_modules/.bin/turbo run build --cache-dir=".turbo" --log-order=stream --scope=${{matrix.packageName}} --include-dependencies --no-deps
env:
FORCE_COLOR: '1'
- name: Test ${{matrix.packageName}}
run: node utils/gen.js && node_modules/.bin/turbo run ${{matrix.testScript}} --summarize --cache-dir=".turbo" --log-order=stream --scope=${{matrix.packageName}} --no-deps -- ${{ join(matrix.testPaths, ' ') }}
shell: bash
env:
JEST_JUNIT_OUTPUT_FILE: ${{github.workspace}}/.junit-reports/${{matrix.scriptName}}-${{matrix.packageName}}-${{matrix.chunkNumber}}-${{ matrix.runner }}.xml
VERCEL_CLI_VERSION: ${{ needs.setup.outputs.dplUrl }}/tarballs/vercel.tgz
VERCEL_TEST_TOKEN: ${{ secrets.VERCEL_TEST_TOKEN }}
VERCEL_TEST_REGISTRATION_URL: ${{ secrets.VERCEL_TEST_REGISTRATION_URL }}
FORCE_COLOR: '1'
- name: 'Determine Turbo HIT or MISS'
if: ${{ !cancelled() }}
id: turbo-summary
shell: bash
run: |
TURBO_MISS_COUNT=`node utils/determine-turbo-hit-or-miss.js`
echo "MISS COUNT: $TURBO_MISS_COUNT"
echo "misses=$TURBO_MISS_COUNT" >> $GITHUB_OUTPUT
- name: 'Upload Test Report to Datadog'
if: ${{ steps['turbo-summary'].outputs.misses != '0' && !cancelled() }}
run: 'npx @datadog/datadog-ci@2.18.1 junit upload --service vercel-cli .junit-reports'
env:
DATADOG_API_KEY: ${{secrets.DATADOG_API_KEY_CLI}}
DD_ENV: ci
summary:
name: Summary
runs-on: ubuntu-latest
timeout-minutes: 5
if: always()
needs:
- test
steps:
- name: Check All
run: |-
for status in ${{ join(needs.*.result, ' ') }}
do
if [ "$status" != "success" ] && [ "$status" != "skipped" ]
then
echo "Some checks failed"
exit 1
fi
done

View File

@@ -1,4 +1,4 @@
name: Tests
name: Tests Node.js v16
on:
push:

View File

@@ -37,7 +37,7 @@ You can use the `dev` script to run local changes as if you were invoking Vercel
When contributing to this repository, please first discuss the change you wish to make via [GitHub Discussions](https://github.com/vercel/vercel/discussions/new) with the owners of this repository before submitting a Pull Request.
Please read our [Code of Conduct](CODE_OF_CONDUCT.md) and follow it in all your interactions with the project.
Please read our [Code of Conduct](./.github/CODE_OF_CONDUCT.md) and follow it in all your interactions with the project.
### Local development

View File

@@ -8,7 +8,7 @@
"name": "nextjs",
"version": "0.1.0",
"dependencies": {
"next": "14.2.2",
"next": "14.2.3",
"react": "^18",
"react-dom": "^18"
},
@@ -17,7 +17,7 @@
"@types/react": "^18",
"@types/react-dom": "^18",
"eslint": "^8",
"eslint-config-next": "14.2.2",
"eslint-config-next": "14.2.3",
"postcss": "^8",
"tailwindcss": "^3.4.1",
"typescript": "^5"
@@ -238,23 +238,23 @@
}
},
"node_modules/@next/env": {
"version": "14.2.2",
"resolved": "https://registry.npmjs.org/@next/env/-/env-14.2.2.tgz",
"integrity": "sha512-sk72qRfM1Q90XZWYRoJKu/UWlTgihrASiYw/scb15u+tyzcze3bOuJ/UV6TBOQEeUaxOkRqGeuGUdiiuxc5oqw=="
"version": "14.2.3",
"resolved": "https://registry.npmjs.org/@next/env/-/env-14.2.3.tgz",
"integrity": "sha512-W7fd7IbkfmeeY2gXrzJYDx8D2lWKbVoTIj1o1ScPHNzvp30s1AuoEFSdr39bC5sjxJaxTtq3OTCZboNp0lNWHA=="
},
"node_modules/@next/eslint-plugin-next": {
"version": "14.2.2",
"resolved": "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-14.2.2.tgz",
"integrity": "sha512-q+Ec2648JtBpKiu/FSJm8HAsFXlNvioHeBCbTP12T1SGcHYwhqHULSfQgFkPgHDu3kzNp2Kem4J54bK4rPQ5SQ==",
"version": "14.2.3",
"resolved": "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-14.2.3.tgz",
"integrity": "sha512-L3oDricIIjgj1AVnRdRor21gI7mShlSwU/1ZGHmqM3LzHhXXhdkrfeNY5zif25Bi5Dd7fiJHsbhoZCHfXYvlAw==",
"dev": true,
"dependencies": {
"glob": "10.3.10"
}
},
"node_modules/@next/swc-darwin-arm64": {
"version": "14.2.2",
"resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.2.2.tgz",
"integrity": "sha512-3iPgMhzbalizGwHNFUcGnDhFPSgVBHQ8aqSTAMxB5BvJG0oYrDf1WOJZlbXBgunOEj/8KMVbejEur/FpvFsgFQ==",
"version": "14.2.3",
"resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.2.3.tgz",
"integrity": "sha512-3pEYo/RaGqPP0YzwnlmPN2puaF2WMLM3apt5jLW2fFdXD9+pqcoTzRk+iZsf8ta7+quAe4Q6Ms0nR0SFGFdS1A==",
"cpu": [
"arm64"
],
@@ -267,9 +267,9 @@
}
},
"node_modules/@next/swc-darwin-x64": {
"version": "14.2.2",
"resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-14.2.2.tgz",
"integrity": "sha512-x7Afi/jt0ZBRUZHTi49yyej4o8znfIMHO4RvThuoc0P+uli8Jd99y5GKjxoYunPKsXL09xBXEM1+OQy2xEL0Ag==",
"version": "14.2.3",
"resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-14.2.3.tgz",
"integrity": "sha512-6adp7waE6P1TYFSXpY366xwsOnEXM+y1kgRpjSRVI2CBDOcbRjsJ67Z6EgKIqWIue52d2q/Mx8g9MszARj8IEA==",
"cpu": [
"x64"
],
@@ -282,9 +282,9 @@
}
},
"node_modules/@next/swc-linux-arm64-gnu": {
"version": "14.2.2",
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.2.2.tgz",
"integrity": "sha512-zbfPtkk7L41ODMJwSp5VbmPozPmMMQrzAc0HAUomVeVIIwlDGs/UCqLJvLNDt4jpWgc21SjjyIn762lNGrMaUA==",
"version": "14.2.3",
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.2.3.tgz",
"integrity": "sha512-cuzCE/1G0ZSnTAHJPUT1rPgQx1w5tzSX7POXSLaS7w2nIUJUD+e25QoXD/hMfxbsT9rslEXugWypJMILBj/QsA==",
"cpu": [
"arm64"
],
@@ -297,9 +297,9 @@
}
},
"node_modules/@next/swc-linux-arm64-musl": {
"version": "14.2.2",
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.2.2.tgz",
"integrity": "sha512-wPbS3pI/JU16rm3XdLvvTmlsmm1nd+sBa2ohXgBZcShX4TgOjD4R+RqHKlI1cjo/jDZKXt6OxmcU0Iys0OC/yg==",
"version": "14.2.3",
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.2.3.tgz",
"integrity": "sha512-0D4/oMM2Y9Ta3nGuCcQN8jjJjmDPYpHX9OJzqk42NZGJocU2MqhBq5tWkJrUQOQY9N+In9xOdymzapM09GeiZw==",
"cpu": [
"arm64"
],
@@ -312,9 +312,9 @@
}
},
"node_modules/@next/swc-linux-x64-gnu": {
"version": "14.2.2",
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.2.2.tgz",
"integrity": "sha512-NqWOHqqq8iC9tuHvZxjQ2tX+jWy2X9y8NX2mcB4sj2bIccuCxbIZrU/ThFPZZPauygajZuVQ6zediejQHwZHwQ==",
"version": "14.2.3",
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.2.3.tgz",
"integrity": "sha512-ENPiNnBNDInBLyUU5ii8PMQh+4XLr4pG51tOp6aJ9xqFQ2iRI6IH0Ds2yJkAzNV1CfyagcyzPfROMViS2wOZ9w==",
"cpu": [
"x64"
],
@@ -327,9 +327,9 @@
}
},
"node_modules/@next/swc-linux-x64-musl": {
"version": "14.2.2",
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.2.2.tgz",
"integrity": "sha512-lGepHhwb9sGhCcU7999+iK1ZZT+6rrIoVg40MP7DZski9GIZP80wORSbt5kJzh9v2x2ev2lxC6VgwMQT0PcgTA==",
"version": "14.2.3",
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.2.3.tgz",
"integrity": "sha512-BTAbq0LnCbF5MtoM7I/9UeUu/8ZBY0i8SFjUMCbPDOLv+un67e2JgyN4pmgfXBwy/I+RHu8q+k+MCkDN6P9ViQ==",
"cpu": [
"x64"
],
@@ -342,9 +342,9 @@
}
},
"node_modules/@next/swc-win32-arm64-msvc": {
"version": "14.2.2",
"resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.2.2.tgz",
"integrity": "sha512-TZSh/48SfcLEQ4rD25VVn2kdIgUWmMflRX3OiyPwGNXn3NiyPqhqei/BaqCYXViIQ+6QsG9R0C8LftMqy8JPMA==",
"version": "14.2.3",
"resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.2.3.tgz",
"integrity": "sha512-AEHIw/dhAMLNFJFJIJIyOFDzrzI5bAjI9J26gbO5xhAKHYTZ9Or04BesFPXiAYXDNdrwTP2dQceYA4dL1geu8A==",
"cpu": [
"arm64"
],
@@ -357,9 +357,9 @@
}
},
"node_modules/@next/swc-win32-ia32-msvc": {
"version": "14.2.2",
"resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.2.2.tgz",
"integrity": "sha512-M0tBVNMEBJN2ZNQWlcekMn6pvLria7Sa2Fai5znm7CCJz4pP3lrvlSxhKdkCerk0D9E0bqx5yAo3o2Q7RrD4gA==",
"version": "14.2.3",
"resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.2.3.tgz",
"integrity": "sha512-vga40n1q6aYb0CLrM+eEmisfKCR45ixQYXuBXxOOmmoV8sYST9k7E3US32FsY+CkkF7NtzdcebiFT4CHuMSyZw==",
"cpu": [
"ia32"
],
@@ -372,9 +372,9 @@
}
},
"node_modules/@next/swc-win32-x64-msvc": {
"version": "14.2.2",
"resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.2.2.tgz",
"integrity": "sha512-a/20E/wtTJZ3Ykv3f/8F0l7TtgQa2LWHU2oNB9bsu0VjqGuGGHmm/q6waoUNQYTVPYrrlxxaHjJcDV6aiSTt/w==",
"version": "14.2.3",
"resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.2.3.tgz",
"integrity": "sha512-Q1/zm43RWynxrO7lW4ehciQVj+5ePBhOK+/K2P7pLFX3JaJ/IZVC69SHidrmZSOkqz7ECIOhhy7XhAFG4JYyHA==",
"cpu": [
"x64"
],
@@ -1021,9 +1021,9 @@
}
},
"node_modules/caniuse-lite": {
"version": "1.0.30001610",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001610.tgz",
"integrity": "sha512-QFutAY4NgaelojVMjY63o6XlZyORPaLfyMnsl3HgnWdJUcX6K0oaJymHjH8PT5Gk7sTm8rvC/c5COUQKXqmOMA==",
"version": "1.0.30001612",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001612.tgz",
"integrity": "sha512-lFgnZ07UhaCcsSZgWW0K5j4e69dK1u/ltrL9lTUiFOwNHs12S3UMIEYgBV0Z6C6hRDev7iRnMzzYmKabYdXF9g==",
"funding": [
{
"type": "opencollective",
@@ -1571,12 +1571,12 @@
}
},
"node_modules/eslint-config-next": {
"version": "14.2.2",
"resolved": "https://registry.npmjs.org/eslint-config-next/-/eslint-config-next-14.2.2.tgz",
"integrity": "sha512-12/uFc0KX+wUs7EDpOUGKMXBXZJiBVGdK5/m/QgXOCg2mQ0bQWoKSWNrCeOg7Vum6Kw1d1TW453W6xh+GbHquw==",
"version": "14.2.3",
"resolved": "https://registry.npmjs.org/eslint-config-next/-/eslint-config-next-14.2.3.tgz",
"integrity": "sha512-ZkNztm3Q7hjqvB1rRlOX8P9E/cXRL9ajRcs8jufEtwMfTVYRqnmtnaSu57QqHyBlovMuiB8LEzfLBkh5RYV6Fg==",
"dev": true,
"dependencies": {
"@next/eslint-plugin-next": "14.2.2",
"@next/eslint-plugin-next": "14.2.3",
"@rushstack/eslint-patch": "^1.3.3",
"@typescript-eslint/parser": "^5.4.2 || ^6.0.0 || 7.0.0 - 7.2.0",
"eslint-import-resolver-node": "^0.3.6",
@@ -3117,11 +3117,11 @@
"dev": true
},
"node_modules/next": {
"version": "14.2.2",
"resolved": "https://registry.npmjs.org/next/-/next-14.2.2.tgz",
"integrity": "sha512-oGwUaa2bCs47FbuxWMpOoXtBMPYpvTPgdZr3UAo+pu7Ns00z9otmYpoeV1HEiYL06AlRQQIA/ypK526KjJfaxg==",
"version": "14.2.3",
"resolved": "https://registry.npmjs.org/next/-/next-14.2.3.tgz",
"integrity": "sha512-dowFkFTR8v79NPJO4QsBUtxv0g9BrS/phluVpMAt2ku7H+cbcBJlopXjkWlwxrk/xGqMemr7JkGPGemPrLLX7A==",
"dependencies": {
"@next/env": "14.2.2",
"@next/env": "14.2.3",
"@swc/helpers": "0.5.5",
"busboy": "1.6.0",
"caniuse-lite": "^1.0.30001579",
@@ -3136,15 +3136,15 @@
"node": ">=18.17.0"
},
"optionalDependencies": {
"@next/swc-darwin-arm64": "14.2.2",
"@next/swc-darwin-x64": "14.2.2",
"@next/swc-linux-arm64-gnu": "14.2.2",
"@next/swc-linux-arm64-musl": "14.2.2",
"@next/swc-linux-x64-gnu": "14.2.2",
"@next/swc-linux-x64-musl": "14.2.2",
"@next/swc-win32-arm64-msvc": "14.2.2",
"@next/swc-win32-ia32-msvc": "14.2.2",
"@next/swc-win32-x64-msvc": "14.2.2"
"@next/swc-darwin-arm64": "14.2.3",
"@next/swc-darwin-x64": "14.2.3",
"@next/swc-linux-arm64-gnu": "14.2.3",
"@next/swc-linux-arm64-musl": "14.2.3",
"@next/swc-linux-x64-gnu": "14.2.3",
"@next/swc-linux-x64-musl": "14.2.3",
"@next/swc-win32-arm64-msvc": "14.2.3",
"@next/swc-win32-ia32-msvc": "14.2.3",
"@next/swc-win32-x64-msvc": "14.2.3"
},
"peerDependencies": {
"@opentelemetry/api": "^1.1.0",

View File

@@ -11,7 +11,7 @@
"dependencies": {
"react": "^18",
"react-dom": "^18",
"next": "14.2.2"
"next": "14.2.3"
},
"devDependencies": {
"typescript": "^5",
@@ -21,6 +21,6 @@
"postcss": "^8",
"tailwindcss": "^3.4.1",
"eslint": "^8",
"eslint-config-next": "14.2.2"
"eslint-config-next": "14.2.3"
}
}

View File

@@ -9,7 +9,7 @@
},
"devDependencies": {
"@types/jest": "27.4.1",
"@vercel/build-utils": "7.12.0",
"@vercel/build-utils": "8.1.1",
"@vercel/frameworks": "3.0.2"
},
"version": null

View File

@@ -9,18 +9,18 @@
"typecheck": "tsc"
},
"dependencies": {
"@remix-run/node": "^2.8.0",
"@remix-run/react": "^2.8.0",
"@remix-run/server-runtime": "^2.8.0",
"@remix-run/node": "^2.9.2",
"@remix-run/react": "^2.9.2",
"@remix-run/server-runtime": "^2.9.2",
"@vercel/analytics": "^1.2.2",
"@vercel/remix": "^2.8.0",
"@vercel/remix": "2.9.2-patch.2",
"isbot": "^4",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@remix-run/dev": "^2.8.0",
"@remix-run/eslint-config": "^2.8.0",
"@remix-run/dev": "^2.9.2",
"@remix-run/eslint-config": "^2.9.2",
"@types/react": "^18.2.20",
"@types/react-dom": "^18.2.7",
"eslint": "^8.38.0",

View File

@@ -1,5 +1,26 @@
# @vercel-internals/types
## 1.0.33
### Patch Changes
- Updated dependencies [[`2f7a6ed5f`](https://github.com/vercel/vercel/commit/2f7a6ed5f92d454000f92247d3b6548e2064f4e6)]:
- @vercel/build-utils@8.1.1
## 1.0.32
### Patch Changes
- Updated dependencies [[`5014b1e82`](https://github.com/vercel/vercel/commit/5014b1e82a46181baeb727ffe6d14000b6a4b1d7)]:
- @vercel/build-utils@8.1.0
## 1.0.31
### Patch Changes
- Updated dependencies [[`15475c8a2`](https://github.com/vercel/vercel/commit/15475c8a2c303a1dd189ba24044fac750280dd2e), [`21f5e7375`](https://github.com/vercel/vercel/commit/21f5e7375e4cb4ceed98ab56486d09a85fa3894d)]:
- @vercel/build-utils@8.0.0
## 1.0.30
### Patch Changes

View File

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

View File

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

View File

@@ -1,5 +1,28 @@
# @vercel/build-utils
## 8.1.1
### Patch Changes
- [build-utils] pnpm lockfile testing and fixing ([#11591](https://github.com/vercel/vercel/pull/11591))
## 8.1.0
### Minor Changes
- Update pnpm version detection logic ([#11445](https://github.com/vercel/vercel/pull/11445))
Add support for pnpm 9
## 8.0.0
### Major Changes
- Remove legacy `avoidTopLevelInstall` logic ([#11513](https://github.com/vercel/vercel/pull/11513))
### Patch Changes
- [build-utils] Add `VERCEL_PROJECT_PRODUCTION_URL` framework env var prefix ([#11506](https://github.com/vercel/vercel/pull/11506))
## 7.12.0
### Minor Changes

View File

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

View File

@@ -546,8 +546,7 @@ export function getEnvForPackageManager({
detectedLockfile,
detectedPackageManager,
path: newPath,
yarnNodeLinker,
} = getPathForPackageManager({
} = getPathOverrideForPackageManager({
cliType,
lockfileVersion,
nodeVersion,
@@ -558,36 +557,176 @@ export function getEnvForPackageManager({
...env,
};
if (newPath) {
const alreadyInPath = (newPath: string) => {
const oldPath = env.PATH ?? '';
return oldPath.split(path.delimiter).includes(newPath);
};
if (newPath && !alreadyInPath(newPath)) {
// Ensure that the binaries of the detected package manager are at the
// beginning of the `$PATH`.
const oldPath = env.PATH + '';
newEnv.PATH = `${newPath}${path.delimiter}${oldPath}`;
}
if (yarnNodeLinker) {
newEnv.YARN_NODE_LINKER = yarnNodeLinker;
}
if (detectedLockfile && detectedPackageManager) {
// For pnpm we also show the version of the lockfile we found
const versionString =
cliType === 'pnpm' ? `version ${lockfileVersion} ` : '';
if (detectedLockfile && detectedPackageManager) {
// For pnpm we also show the version of the lockfile we found
const versionString =
cliType === 'pnpm' ? `version ${lockfileVersion} ` : '';
console.log(
`Detected \`${detectedLockfile}\` ${versionString}generated by ${detectedPackageManager}`
);
if (cliType === 'bun') {
console.warn(
'Warning: Bun is used as a package manager at build time only, not at runtime with Functions'
console.log(
`Detected \`${detectedLockfile}\` ${versionString}generated by ${detectedPackageManager}`
);
if (cliType === 'bun') {
console.warn(
'Warning: Bun is used as a package manager at build time only, not at runtime with Functions'
);
}
}
}
if (cliType === 'yarn' && !env.YARN_NODE_LINKER) {
newEnv.YARN_NODE_LINKER = 'node-modules';
}
return newEnv;
}
type DetectedPnpmVersion =
| 'not found'
| 'pnpm 6'
| 'pnpm 7'
| 'pnpm 8'
| 'pnpm 9'
| 'corepack_enabled';
function detectPnpmVersion(
lockfileVersion: number | undefined,
corepackEnabled: boolean
): DetectedPnpmVersion {
switch (true) {
case corepackEnabled:
return 'corepack_enabled';
case lockfileVersion === undefined:
return 'not found';
case lockfileVersion === 5.3:
return 'pnpm 6';
case lockfileVersion === 5.4:
return 'pnpm 7';
case lockfileVersion === 6.0 || lockfileVersion === 6.1:
return 'pnpm 8';
case lockfileVersion === 7.0 || lockfileVersion === 9.0:
return 'pnpm 9';
default:
return 'not found';
}
}
function shouldUseNpm7(
lockfileVersion: number | undefined,
nodeVersion: NodeVersion | undefined
): boolean {
if (lockfileVersion === undefined) return false;
return lockfileVersion >= 2 && (nodeVersion?.major || 0) < 16;
}
/**
* Helper to get the binary paths that link to the used package manager.
* Note: Make sure it doesn't contain any `console.log` calls.
*/
export function getPathOverrideForPackageManager({
cliType,
lockfileVersion,
nodeVersion,
env,
}: {
cliType: CliType;
lockfileVersion: number | undefined;
nodeVersion: NodeVersion | undefined;
env: { [x: string]: string | undefined };
}): {
/**
* Which lockfile was detected.
*/
detectedLockfile: string | undefined;
/**
* Detected package manager that generated the found lockfile.
*/
detectedPackageManager: string | undefined;
/**
* Value of $PATH that includes the binaries for the detected package manager.
* Undefined if no $PATH are necessary.
*/
path: string | undefined;
} {
const no_override = {
detectedLockfile: undefined,
detectedPackageManager: undefined,
path: undefined,
};
const corepackEnabled = env.ENABLE_EXPERIMENTAL_COREPACK === '1';
switch (cliType) {
case 'npm':
switch (true) {
case corepackEnabled:
return no_override;
case shouldUseNpm7(lockfileVersion, nodeVersion):
return {
path: '/node16/bin-npm7',
detectedLockfile: 'package-lock.json',
detectedPackageManager: 'npm 7+',
};
default:
return no_override;
}
case 'pnpm':
switch (detectPnpmVersion(lockfileVersion, corepackEnabled)) {
case 'corepack_enabled':
return no_override;
case 'pnpm 7':
// pnpm 7
return {
path: '/pnpm7/node_modules/.bin',
detectedLockfile: 'pnpm-lock.yaml',
detectedPackageManager: 'pnpm 7',
};
case 'pnpm 8':
// pnpm 8
return {
path: '/pnpm8/node_modules/.bin',
detectedLockfile: 'pnpm-lock.yaml',
detectedPackageManager: 'pnpm 8',
};
case 'pnpm 9':
// pnpm 9
return {
path: '/pnpm9/node_modules/.bin',
detectedLockfile: 'pnpm-lock.yaml',
detectedPackageManager: 'pnpm 9',
};
case 'pnpm 6':
default:
return no_override;
}
case 'bun':
switch (true) {
case corepackEnabled:
return no_override;
default:
// Bun 1
return {
path: '/bun1',
detectedLockfile: 'bun.lockb',
detectedPackageManager: 'Bun',
};
}
case 'yarn':
return no_override;
}
}
/**
* Helper to get the binary paths that link to the used package manager.
* Note: Make sure it doesn't contain any `console.log` calls.
@@ -622,70 +761,39 @@ export function getPathForPackageManager({
*/
yarnNodeLinker: string | undefined;
} {
let detectedLockfile: string | undefined;
let detectedPackageManager: string | undefined;
let pathValue: string | undefined;
let yarnNodeLinker: string | undefined;
const oldPath = env.PATH + '';
const npm7 = '/node16/bin-npm7';
const pnpm7 = '/pnpm7/node_modules/.bin';
const pnpm8 = '/pnpm8/node_modules/.bin';
const bun1 = '/bun1';
const corepackEnabled = env.ENABLE_EXPERIMENTAL_COREPACK === '1';
if (cliType === 'npm') {
if (
typeof lockfileVersion === 'number' &&
lockfileVersion >= 2 &&
(nodeVersion?.major || 0) < 16 &&
!oldPath.includes(npm7) &&
!corepackEnabled
) {
// npm 7
pathValue = npm7;
detectedLockfile = 'package-lock.json';
detectedPackageManager = 'npm 7+';
}
} else if (cliType === 'pnpm') {
if (
typeof lockfileVersion === 'number' &&
lockfileVersion === 5.4 &&
!oldPath.includes(pnpm7) &&
!corepackEnabled
) {
// pnpm 7
pathValue = pnpm7;
detectedLockfile = 'pnpm-lock.yaml';
detectedPackageManager = 'pnpm 7';
} else if (
typeof lockfileVersion === 'number' &&
lockfileVersion >= 6 &&
!oldPath.includes(pnpm8) &&
!corepackEnabled
) {
// pnpm 8
pathValue = pnpm8;
detectedLockfile = 'pnpm-lock.yaml';
detectedPackageManager = 'pnpm 8';
}
} else if (cliType === 'bun') {
if (!oldPath.includes(bun1) && !corepackEnabled) {
// Bun 1
pathValue = bun1;
detectedLockfile = 'bun.lockb';
detectedPackageManager = 'Bun';
}
} else {
// Yarn v2 PnP mode may be activated, so force "node-modules" linker style
if (!env.YARN_NODE_LINKER) {
yarnNodeLinker = 'node-modules';
}
}
return {
detectedLockfile,
detectedPackageManager,
path: pathValue,
yarnNodeLinker,
const overrides = getPathOverrideForPackageManager({
cliType,
lockfileVersion,
nodeVersion,
env,
});
debug(
`Detected ${
overrides.detectedPackageManager
} with lockfileVersion ${lockfileVersion} (${typeof lockfileVersion}): ${
overrides.path
}`
);
const alreadyInPath = (newPath: string) => {
const oldPath = env.PATH ?? '';
return oldPath.split(path.delimiter).includes(newPath);
};
switch (true) {
case cliType === 'yarn' && !env.YARN_NODE_LINKER:
return { ...overrides, yarnNodeLinker: 'node-modules' };
case alreadyInPath(overrides.path ?? ''):
return {
detectedLockfile: undefined,
detectedPackageManager: undefined,
path: undefined,
yarnNodeLinker: undefined,
};
default:
return { ...overrides, yarnNodeLinker: undefined };
}
}
export async function runCustomInstallCommand({

View File

@@ -19,6 +19,7 @@ export function getPrefixedEnvVars({
'VERCEL_ENV',
'VERCEL_REGION',
'VERCEL_BRANCH_URL',
'VERCEL_PROJECT_PRODUCTION_URL',
];
const newEnvs: Envs = {};
if (envPrefix && envs.VERCEL_URL) {

View File

@@ -66,7 +66,6 @@ export interface Meta {
filesRemoved?: string[];
env?: Env;
buildEnv?: Env;
avoidTopLevelInstall?: boolean;
[key: string]: unknown;
}

View File

@@ -4,7 +4,7 @@
"probes": [
{
"path": "/",
"mustContain": "pnpm version: 6",
"mustContain": "pnpm version: 7",
"logMustContain": "pnpm run build"
}
]

View File

@@ -1,5 +1,6 @@
import { delimiter } from 'path';
import { getEnvForPackageManager, getPathForPackageManager } from '../src';
import { getPathOverrideForPackageManager } from '../src/fs/run-user-scripts';
describe('Test `getEnvForPackageManager()`', () => {
let consoleLogSpy: jest.SpyInstance;
@@ -171,6 +172,44 @@ describe('Test `getEnvForPackageManager()`', () => {
'Detected `pnpm-lock.yaml` version 5.4 generated by pnpm 7',
consoleWarnOutput: null,
},
{
name: 'should set path if pnpm 8 is detected',
args: {
cliType: 'pnpm',
nodeVersion: { major: 18, range: '18.x', runtime: 'nodejs18.x' },
lockfileVersion: 6.0,
env: {
FOO: 'bar',
PATH: 'foo',
},
},
want: {
FOO: 'bar',
PATH: `/pnpm8/node_modules/.bin${delimiter}foo`,
},
consoleLogOutput:
'Detected `pnpm-lock.yaml` version 6 generated by pnpm 8',
consoleWarnOutput: null,
},
{
name: 'should set path if pnpm 8 is detected',
args: {
cliType: 'pnpm',
nodeVersion: { major: 18, range: '18.x', runtime: 'nodejs18.x' },
lockfileVersion: 9.0,
env: {
FOO: 'bar',
PATH: 'foo',
},
},
want: {
FOO: 'bar',
PATH: `/pnpm9/node_modules/.bin${delimiter}foo`,
},
consoleLogOutput:
'Detected `pnpm-lock.yaml` version 9 generated by pnpm 9',
consoleWarnOutput: null,
},
{
name: 'should set path if bun v1 is detected',
args: {
@@ -226,22 +265,6 @@ describe('Test `getEnvForPackageManager()`', () => {
consoleLogOutput: null,
consoleWarnOutput: null,
},
{
name: 'should not set path if pnpm 6 is detected',
args: {
cliType: 'pnpm',
nodeVersion: { major: 14, range: '14.x', runtime: 'nodejs14.x' },
lockfileVersion: 5.3,
env: {
FOO: 'bar',
},
},
want: {
FOO: 'bar',
},
consoleLogOutput: null,
consoleWarnOutput: null,
},
])('$name', ({ args, want, consoleLogOutput, consoleWarnOutput }) => {
expect(
getEnvForPackageManager({
@@ -268,6 +291,193 @@ describe('Test `getEnvForPackageManager()`', () => {
});
});
describe('Test `getPathOverrideForPackageManager()`', () => {
test.each<{
name: string;
args: Parameters<typeof getEnvForPackageManager>[0];
want: unknown;
}>([
{
name: 'should do nothing to env for npm < 6 and node < 16',
args: {
cliType: 'npm',
nodeVersion: { major: 14, range: '14.x', runtime: 'nodejs14.x' },
lockfileVersion: 1,
env: {
FOO: 'bar',
},
},
want: {
detectedLockfile: undefined,
detectedPackageManager: undefined,
path: undefined,
},
},
{
name: 'should set path if npm 7+ is detected and node < 16',
args: {
cliType: 'npm',
nodeVersion: { major: 14, range: '14.x', runtime: 'nodejs14.x' },
lockfileVersion: 2,
env: {
FOO: 'bar',
PATH: 'foo',
},
},
want: {
detectedLockfile: 'package-lock.json',
detectedPackageManager: 'npm 7+',
path: '/node16/bin-npm7',
},
},
{
name: 'should not set npm path if corepack enabled',
args: {
cliType: 'npm',
nodeVersion: { major: 14, range: '14.x', runtime: 'nodejs14.x' },
lockfileVersion: 2,
env: {
FOO: 'bar',
ENABLE_EXPERIMENTAL_COREPACK: '1',
},
},
want: {
detectedLockfile: undefined,
detectedPackageManager: undefined,
path: undefined,
},
},
{
name: 'should not set path if node is 16 and npm 7+ is detected',
args: {
cliType: 'npm',
nodeVersion: { major: 16, range: '16.x', runtime: 'nodejs16.x' },
lockfileVersion: 2,
env: {
FOO: 'bar',
PATH: 'foo',
},
},
want: {
detectedLockfile: undefined,
detectedPackageManager: undefined,
path: undefined,
},
},
{
name: 'should not set path if pnpm 6 is detected',
args: {
cliType: 'pnpm',
nodeVersion: { major: 16, range: '16.x', runtime: 'nodejs16.x' },
lockfileVersion: 5.3, // detects as pnpm@6, which is the default
env: {
FOO: 'bar',
PATH: 'foo',
},
},
want: {
detectedLockfile: undefined,
detectedPackageManager: undefined,
path: undefined,
},
},
{
name: 'should set path if pnpm 7+ is detected',
args: {
cliType: 'pnpm',
nodeVersion: { major: 16, range: '16.x', runtime: 'nodejs16.x' },
lockfileVersion: 5.4,
env: {
FOO: 'bar',
PATH: 'foo',
},
},
want: {
detectedLockfile: 'pnpm-lock.yaml',
detectedPackageManager: 'pnpm 7',
path: '/pnpm7/node_modules/.bin',
},
},
{
name: 'should set path if pnpm 8 is detected',
args: {
cliType: 'pnpm',
nodeVersion: { major: 18, range: '18.x', runtime: 'nodejs18.x' },
lockfileVersion: 6.1,
env: {
FOO: 'bar',
PATH: 'foo',
},
},
want: {
detectedLockfile: 'pnpm-lock.yaml',
detectedPackageManager: 'pnpm 8',
path: '/pnpm8/node_modules/.bin',
},
},
{
name: 'should set path if pnpm 9 is detected',
args: {
cliType: 'pnpm',
nodeVersion: { major: 18, range: '18.x', runtime: 'nodejs18.x' },
lockfileVersion: 7.0,
env: {
FOO: 'bar',
PATH: 'foo',
},
},
want: {
detectedLockfile: 'pnpm-lock.yaml',
detectedPackageManager: 'pnpm 9',
path: '/pnpm9/node_modules/.bin',
},
},
{
name: 'should set path if bun v1 is detected',
args: {
cliType: 'bun',
nodeVersion: { major: 18, range: '18.x', runtime: 'nodejs18.x' },
lockfileVersion: 0,
env: {
FOO: 'bar',
PATH: '/usr/local/bin',
},
},
want: {
detectedLockfile: 'bun.lockb',
detectedPackageManager: 'Bun',
path: '/bun1',
},
},
{
name: 'should not set pnpm path if corepack is enabled',
args: {
cliType: 'pnpm',
nodeVersion: { major: 16, range: '16.x', runtime: 'nodejs16.x' },
lockfileVersion: 5.4,
env: {
FOO: 'bar',
ENABLE_EXPERIMENTAL_COREPACK: '1',
},
},
want: {
detectedLockfile: undefined,
detectedPackageManager: undefined,
path: undefined,
},
},
])('$name', ({ args, want }) => {
expect(
getPathOverrideForPackageManager({
cliType: args.cliType,
lockfileVersion: args.lockfileVersion,
nodeVersion: args.nodeVersion,
env: args.env,
})
).toStrictEqual(want);
});
});
describe('Test `getPathForPackageManager()`', () => {
test.each<{
name: string;
@@ -470,23 +680,6 @@ describe('Test `getPathForPackageManager()`', () => {
yarnNodeLinker: undefined,
},
},
{
name: 'should not set path if pnpm 6 is detected',
args: {
cliType: 'pnpm',
nodeVersion: { major: 14, range: '14.x', runtime: 'nodejs14.x' },
lockfileVersion: 5.3,
env: {
FOO: 'bar',
},
},
want: {
detectedLockfile: undefined,
detectedPackageManager: undefined,
path: undefined,
yarnNodeLinker: undefined,
},
},
])('$name', ({ args, want }) => {
expect(
getPathForPackageManager({

View File

@@ -15,6 +15,7 @@ describe('Test `getPrefixedEnvVars()`', () => {
VERCEL_URL: 'example.vercel.sh',
VERCEL_ENV: 'production',
VERCEL_BRANCH_URL: 'example-git-main-acme.vercel.app',
VERCEL_PROJECT_PRODUCTION_URL: 'example.com',
USER_ENV_VAR_NOT_VERCEL: 'example.com',
VERCEL_ARTIFACTS_TOKEN: 'abc123',
FOO: 'bar',
@@ -24,6 +25,7 @@ describe('Test `getPrefixedEnvVars()`', () => {
NEXT_PUBLIC_VERCEL_URL: 'example.vercel.sh',
NEXT_PUBLIC_VERCEL_ENV: 'production',
NEXT_PUBLIC_VERCEL_BRANCH_URL: 'example-git-main-acme.vercel.app',
NEXT_PUBLIC_VERCEL_PROJECT_PRODUCTION_URL: 'example.com',
TURBO_CI_VENDOR_ENV_KEY: 'NEXT_PUBLIC_VERCEL_',
},
},

View File

@@ -1,5 +1,90 @@
# vercel
## 34.1.12
### Patch Changes
- Updated dependencies [[`67afc2608`](https://github.com/vercel/vercel/commit/67afc26085e2ebdaa33a8cbce112afec4cb1c4f5), [`2f7a6ed5f`](https://github.com/vercel/vercel/commit/2f7a6ed5f92d454000f92247d3b6548e2064f4e6)]:
- @vercel/next@4.2.11
- @vercel/build-utils@8.1.1
- @vercel/node@3.1.2
- @vercel/static-build@2.5.6
## 34.1.11
### Patch Changes
- Updated dependencies [[`5014b1e82`](https://github.com/vercel/vercel/commit/5014b1e82a46181baeb727ffe6d14000b6a4b1d7), [`18d1703d5`](https://github.com/vercel/vercel/commit/18d1703d5b4f2adc61fd56011f874c393fa57d0d), [`e87d4c14d`](https://github.com/vercel/vercel/commit/e87d4c14d0e718281f9ba91c9ec1cc6e142d383d), [`bc5fd4115`](https://github.com/vercel/vercel/commit/bc5fd41158ec9f36e5db1fe749589adcbaec6950)]:
- @vercel/build-utils@8.1.0
- @vercel/next@4.2.10
- @vercel/redwood@2.0.9
- @vercel/remix-builder@2.1.6
- @vercel/node@3.1.1
- @vercel/static-build@2.5.5
## 34.1.10
### Patch Changes
- Updated dependencies [[`119f80e96`](https://github.com/vercel/vercel/commit/119f80e9611a7a5a755aa689502dcdab323194aa), [`11584b0e9`](https://github.com/vercel/vercel/commit/11584b0e9b55f312f34d0d6467ab498e472ac9df), [`3023122d4`](https://github.com/vercel/vercel/commit/3023122d4e0dd292340d9e9e61ef232baf6e610d), [`0e774b6be`](https://github.com/vercel/vercel/commit/0e774b6be0c832213a64124e1f4fc6d150e87d9f)]:
- @vercel/next@4.2.9
- @vercel/static-build@2.5.4
## 34.1.9
### Patch Changes
- Updated dependencies [[`5a532a5b9`](https://github.com/vercel/vercel/commit/5a532a5b948994ba04783ac560357eed9f94a3f3), [`50fc27ba5`](https://github.com/vercel/vercel/commit/50fc27ba5773870956300bbbaffbe387d549bc12), [`c1d852295`](https://github.com/vercel/vercel/commit/c1d85229509dd319a1f11beb940a759113564d33), [`a5ea04154`](https://github.com/vercel/vercel/commit/a5ea04154ba26ee4e635d8953aa4f0d9d82d3a96)]:
- @vercel/next@4.2.8
- @vercel/node@3.1.0
## 34.1.8
### Patch Changes
- Updated dependencies [[`52e435aa5`](https://github.com/vercel/vercel/commit/52e435aa5d7b4014d19477969ad5cbfbe94aa76f), [`124846a3e`](https://github.com/vercel/vercel/commit/124846a3e65a3bf1ae82327fd4ba2b132674fb39), [`dc974b679`](https://github.com/vercel/vercel/commit/dc974b6797de0b6e90373c92e1f2bbdafcfc6687), [`58c6755e0`](https://github.com/vercel/vercel/commit/58c6755e0c12cae2ce55978b7bf8722133151196)]:
- @vercel/next@4.2.7
- @vercel/static-build@2.5.3
## 34.1.7
### Patch Changes
- Updated dependencies [[`3420ba015`](https://github.com/vercel/vercel/commit/3420ba0153dcabffef7114ba2361fb0f3c43a7b3)]:
- @vercel/next@4.2.6
## 34.1.6
### Patch Changes
- Updated dependencies [[`b1adaf76e`](https://github.com/vercel/vercel/commit/b1adaf76ec17d1bbfe30a2bf65405bd886fa9bcf), [`3fb97d1d2`](https://github.com/vercel/vercel/commit/3fb97d1d270e835ce34a687bd234ea53dfe446a2)]:
- @vercel/next@4.2.5
- @vercel/static-build@2.5.2
## 34.1.5
### Patch Changes
- Updated dependencies [[`763a6d107`](https://github.com/vercel/vercel/commit/763a6d10709ca40405634d41863c2e524917ebe1), [`15475c8a2`](https://github.com/vercel/vercel/commit/15475c8a2c303a1dd189ba24044fac750280dd2e), [`21f5e7375`](https://github.com/vercel/vercel/commit/21f5e7375e4cb4ceed98ab56486d09a85fa3894d)]:
- @vercel/ruby@2.1.0
- @vercel/build-utils@8.0.0
- @vercel/node@3.0.28
- @vercel/static-build@2.5.1
## 34.1.4
### Patch Changes
- Updated dependencies [[`5b7960337`](https://github.com/vercel/vercel/commit/5b79603378a50fd04d5be1c3a3e5cd605b61478f)]:
- @vercel/next@4.2.4
## 34.1.3
### Patch Changes
- Updated dependencies [[`5758838d0`](https://github.com/vercel/vercel/commit/5758838d090b9789ca6821e1122781352021109f)]:
- @vercel/next@4.2.3
## 34.1.2
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "vercel",
"version": "34.1.2",
"version": "34.1.12",
"preferGlobal": true,
"license": "Apache-2.0",
"description": "The command-line interface for Vercel",
@@ -32,17 +32,17 @@
"node": ">= 16"
},
"dependencies": {
"@vercel/build-utils": "7.12.0",
"@vercel/build-utils": "8.1.1",
"@vercel/fun": "1.1.0",
"@vercel/go": "3.1.1",
"@vercel/hydrogen": "1.0.2",
"@vercel/next": "4.2.2",
"@vercel/node": "3.0.27",
"@vercel/next": "4.2.11",
"@vercel/node": "3.1.2",
"@vercel/python": "4.2.0",
"@vercel/redwood": "2.0.8",
"@vercel/remix-builder": "2.1.5",
"@vercel/ruby": "2.0.5",
"@vercel/static-build": "2.5.0",
"@vercel/redwood": "2.0.9",
"@vercel/remix-builder": "2.1.6",
"@vercel/ruby": "2.1.0",
"@vercel/static-build": "2.5.6",
"chokidar": "3.3.1"
},
"devDependencies": {
@@ -92,8 +92,8 @@
"@types/yauzl-promise": "2.1.0",
"@vercel-internals/constants": "1.0.4",
"@vercel-internals/get-package-json": "1.0.0",
"@vercel-internals/types": "1.0.30",
"@vercel/client": "13.2.1",
"@vercel-internals/types": "1.0.33",
"@vercel/client": "13.2.4",
"@vercel/error-utils": "2.0.2",
"@vercel/frameworks": "3.0.2",
"@vercel/fs-detectors": "5.2.3",

View File

@@ -52,7 +52,7 @@ export const aliasCommand: Command = {
name: 'next',
description: 'Show next page of results',
argument: 'MS',
shorthand: 'n',
shorthand: 'N',
type: String,
deprecated: false,
},
@@ -65,13 +65,14 @@ export const aliasCommand: Command = {
},
{
name: 'limit',
shorthand: 'n',
shorthand: null,
description:
'Number of results to return per page (default: 20, max: 100)',
argument: 'NUMBER',
type: String,
deprecated: false,
},
{ name: 'json', shorthand: null, type: Boolean, deprecated: false },
],
examples: [
{

View File

@@ -1,12 +1,13 @@
import { handleError } from '../../util/error';
import Client from '../../util/client';
import getArgs from '../../util/get-args';
import { parseArguments } from '../../util/get-args';
import getSubcommand from '../../util/get-subcommand';
import { help } from '../help';
import ls from './ls';
import rm from './rm';
import set from './set';
import { aliasCommand } from './command';
import { getFlagsSpecification } from '../../util/get-flags-specification';
const COMMAND_CONFIG = {
default: ['set'],
@@ -16,35 +17,33 @@ const COMMAND_CONFIG = {
};
export default async function alias(client: Client) {
let argv;
let parsedArguments;
const flagsSpecification = getFlagsSpecification(aliasCommand.options);
try {
argv = getArgs(client.argv.slice(2), {
'--json': Boolean,
'--yes': Boolean,
'--next': Number,
'--limit': Number,
'-y': '--yes',
'-N': '--next',
});
parsedArguments = parseArguments(client.argv.slice(2), flagsSpecification);
} catch (err) {
handleError(err);
return 1;
}
if (argv['--help']) {
if (parsedArguments.flags['--help']) {
client.output.print(help(aliasCommand, { columns: client.stderr.columns }));
return 2;
}
const { subcommand, args } = getSubcommand(argv._.slice(1), COMMAND_CONFIG);
const { subcommand, args } = getSubcommand(
parsedArguments.args.slice(1),
COMMAND_CONFIG
);
switch (subcommand) {
case 'ls':
return ls(client, argv, args);
return ls(client, parsedArguments.flags, args);
case 'rm':
return rm(client, argv, args);
return rm(client, parsedArguments.flags, args);
default:
return set(client, argv, args);
return set(client, parsedArguments.flags, args);
}
}

View File

@@ -27,7 +27,7 @@ export const bisectCommand: Command = {
description: 'Automatically open each URL in the browser',
argument: 'URL',
shorthand: 'o',
type: String,
type: Boolean,
deprecated: false,
},
{

View File

@@ -8,7 +8,7 @@ import { URLSearchParams, parse } from 'url';
import box from '../../util/output/box';
import formatDate from '../../util/format-date';
import link from '../../util/output/link';
import getArgs from '../../util/get-args';
import { parseArguments } from '../../util/get-args';
import Client from '../../util/client';
import { Deployment } from '@vercel-internals/types';
import { normalizeURL } from '../../util/bisect/normalize-url';
@@ -16,6 +16,8 @@ import getScope from '../../util/get-scope';
import getDeployment from '../../util/get-deployment';
import { help } from '../help';
import { bisectCommand } from './command';
import { getFlagsSpecification } from '../../util/get-flags-specification';
import handleError from '../../util/handle-error';
interface Deployments {
deployments: Deployment[];
@@ -25,39 +27,37 @@ export default async function bisect(client: Client): Promise<number> {
const scope = await getScope(client);
const { contextName } = scope;
const argv = getArgs(client.argv.slice(2), {
'--bad': String,
'-b': '--bad',
'--good': String,
'-g': '--good',
'--open': Boolean,
'-o': '--open',
'--path': String,
'-p': '--path',
'--run': String,
'-r': '--run',
});
let parsedArgs = null;
if (argv['--help']) {
const flagsSpecification = getFlagsSpecification(bisectCommand.options);
try {
parsedArgs = parseArguments(client.argv.slice(2), flagsSpecification);
} catch (error) {
handleError(error);
return 1;
}
if (parsedArgs.flags['--help']) {
output.print(help(bisectCommand, { columns: client.stderr.columns }));
return 2;
}
let bad =
argv['--bad'] ||
parsedArgs.flags['--bad'] ||
(await client.input.text({
message: `Specify a URL where the bug occurs:`,
validate: val => (val ? true : 'A URL must be provided'),
}));
let good =
argv['--good'] ||
parsedArgs.flags['--good'] ||
(await client.input.text({
message: `Specify a URL where the bug does not occur:`,
validate: val => (val ? true : 'A URL must be provided'),
}));
let subpath = argv['--path'] || '';
let run = argv['--run'] || '';
const openEnabled = argv['--open'] || false;
let subpath = parsedArgs.flags['--path'] || '';
let run = parsedArgs.flags['--run'] || '';
const openEnabled = parsedArgs.flags['--open'] || false;
if (run) {
run = resolve(run);

View File

@@ -10,7 +10,7 @@ export const buildCommand: Command = {
name: 'prod',
description: 'Build a production deployment',
shorthand: null,
type: String,
type: Boolean,
deprecated: false,
},
{

View File

@@ -43,7 +43,7 @@ import type { VercelConfig } from '@vercel/client';
import pull from '../pull';
import { staticFiles as getFiles } from '../../util/get-files';
import Client from '../../util/client';
import getArgs from '../../util/get-args';
import { parseArguments } from '../../util/get-args';
import cmd from '../../util/output/cmd';
import * as cli from '../../util/pkg-name';
import cliPkg from '../../util/pkg';
@@ -66,12 +66,13 @@ import {
import { importBuilders } from '../../util/build/import-builders';
import { initCorepack, cleanupCorepack } from '../../util/build/corepack';
import { sortBuilders } from '../../util/build/sort-builders';
import { toEnumerableError } from '../../util/error';
import { handleError, toEnumerableError } from '../../util/error';
import { validateConfig } from '../../util/validate-config';
import { setMonorepoDefaultSettings } from '../../util/build/monorepo';
import { help } from '../help';
import { buildCommand } from './command';
import { scrubArgv } from '../../util/build/scrub-argv';
import { getFlagsSpecification } from '../../util/get-flags-specification';
type BuildResult = BuildResultV2 | BuildResultV3;
@@ -133,22 +134,26 @@ export default async function main(client: Client): Promise<number> {
process.env.__VERCEL_BUILD_RUNNING = '1';
}
// Parse CLI args
const argv = getArgs(client.argv.slice(2), {
'--output': String,
'--prod': Boolean,
'--yes': Boolean,
'-y': '--yes',
});
let parsedArgs = null;
if (argv['--help']) {
const flagsSpecification = getFlagsSpecification(buildCommand.options);
// Parse CLI args
try {
parsedArgs = parseArguments(client.argv.slice(2), flagsSpecification);
} catch (error) {
handleError(error);
return 1;
}
if (parsedArgs.flags['--help']) {
output.print(help(buildCommand, { columns: client.stderr.columns }));
return 2;
}
// Build `target` influences which environment variables will be used
const target = argv['--prod'] ? 'production' : 'preview';
const yes = Boolean(argv['--yes']);
const target = parsedArgs.flags['--prod'] ? 'production' : 'preview';
const yes = Boolean(parsedArgs.flags['--yes']);
try {
await validateNpmrc(cwd);
@@ -213,8 +218,8 @@ export default async function main(client: Client): Promise<number> {
// Delete output directory from potential previous build
const defaultOutputDir = join(cwd, projectRootDirectory, OUTPUT_DIR);
const outputDir = argv['--output']
? resolve(argv['--output'])
const outputDir = parsedArgs.flags['--output']
? resolve(parsedArgs.flags['--output'])
: defaultOutputDir;
await Promise.all([
fs.remove(outputDir),

View File

@@ -1255,7 +1255,7 @@ test('fail to deploy a Lambda with an incorrect value for maxDuration', async ()
expect(output.exitCode, formatOutput(output)).toBe(1);
expect(output.stderr).toMatch(
/maxDuration must be between 1 second and 10 seconds/gm
/maxDuration must be between \d+ second and \d+ seconds/gm
);
});

View File

@@ -24,18 +24,16 @@ exports[`help command > alias help output snapshots > alias help column width 40
Options:
-n, --limit <NUMBER> Number of
results to
return per page
(default: 20,
max: 100)
-n, --next <MS> Show next page
of results
-y, --yes Skip the
confirmation
prompt when
removing an
alias
--limit <NUMBER> Number of results to
return per page
(default: 20, max:
100)
-N, --next <MS> Show next page of
results
-y, --yes Skip the
confirmation prompt
when removing an
alias
Global Options:
@@ -108,10 +106,9 @@ exports[`help command > alias help output snapshots > alias help column width 80
Options:
-n, --limit <NUMBER> Number of results to return per page (default: 20, max:
100)
-n, --next <MS> Show next page of results
-y, --yes Skip the confirmation prompt when removing an alias
--limit <NUMBER> Number of results to return per page (default: 20, max: 100)
-N, --next <MS> Show next page of results
-y, --yes Skip the confirmation prompt when removing an alias
Global Options:
@@ -160,9 +157,9 @@ exports[`help command > alias help output snapshots > alias help column width 12
Options:
-n, --limit <NUMBER> Number of results to return per page (default: 20, max: 100)
-n, --next <MS> Show next page of results
-y, --yes Skip the confirmation prompt when removing an alias
--limit <NUMBER> Number of results to return per page (default: 20, max: 100)
-N, --next <MS> Show next page of results
-y, --yes Skip the confirmation prompt when removing an alias
Global Options:

View File

@@ -1,5 +1,26 @@
# @vercel/client
## 13.2.4
### Patch Changes
- Updated dependencies [[`2f7a6ed5f`](https://github.com/vercel/vercel/commit/2f7a6ed5f92d454000f92247d3b6548e2064f4e6)]:
- @vercel/build-utils@8.1.1
## 13.2.3
### Patch Changes
- Updated dependencies [[`5014b1e82`](https://github.com/vercel/vercel/commit/5014b1e82a46181baeb727ffe6d14000b6a4b1d7)]:
- @vercel/build-utils@8.1.0
## 13.2.2
### Patch Changes
- Updated dependencies [[`15475c8a2`](https://github.com/vercel/vercel/commit/15475c8a2c303a1dd189ba24044fac750280dd2e), [`21f5e7375`](https://github.com/vercel/vercel/commit/21f5e7375e4cb4ceed98ab56486d09a85fa3894d)]:
- @vercel/build-utils@8.0.0
## 13.2.1
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/client",
"version": "13.2.1",
"version": "13.2.4",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
"homepage": "https://vercel.com",
@@ -37,7 +37,7 @@
"typescript": "4.9.5"
},
"dependencies": {
"@vercel/build-utils": "7.12.0",
"@vercel/build-utils": "8.1.1",
"@vercel/error-utils": "2.0.2",
"@vercel/routing-utils": "3.1.0",
"@zeit/fetch": "5.2.0",

View File

@@ -37,7 +37,7 @@
"@types/minimatch": "3.0.5",
"@types/node": "14.18.33",
"@types/semver": "7.3.10",
"@vercel/build-utils": "7.12.0",
"@vercel/build-utils": "8.1.1",
"jest-junit": "16.0.0",
"typescript": "4.9.5"
}

View File

@@ -0,0 +1,19 @@
# @vercel/functions
## 1.0.2
### Patch Changes
- Convert package to CommonJS ([#11569](https://github.com/vercel/vercel/pull/11569))
## 1.0.1
### Patch Changes
- Don't throw error if context is missing ([`0817527f9`](https://github.com/vercel/vercel/commit/0817527f9e9d0d5fceb73f21e695089349a96d3e))
## 1.0.0
### Major Changes
- Initial release ([#11553](https://github.com/vercel/vercel/pull/11553))

17
packages/functions/index.d.ts vendored Normal file
View File

@@ -0,0 +1,17 @@
/**
* Extends the lifetime of the request handler for the lifetime of the given {@link Promise}
* @see https://developer.mozilla.org/en-US/docs/Web/API/ExtendableEvent/waitUntil
*
* @param promise The promise to wait for.
* @example
*
* ```
* import { waitUntil } from '@vercel/functions';
*
* export function GET(request) {
* waitUntil(fetch('https://vercel.com'));
* return new Response('OK');
* }
* ```
*/
export function waitUntil(promise: Promise<unknown>): void;

View File

@@ -0,0 +1,16 @@
/* global globalThis */
exports.waitUntil = promise => {
if (
promise === null ||
typeof promise !== 'object' ||
typeof promise.then !== 'function'
) {
throw new TypeError(
`waitUntil can only be called with a Promise, got ${typeof promise}`
);
}
const ctx = globalThis[Symbol.for('@vercel/request-context')]?.get?.() ?? {};
ctx.waitUntil?.(promise);
};

View File

@@ -0,0 +1,42 @@
/* global globalThis */
import { vi, expect, test } from 'vitest';
import { waitUntil } from '.';
test.each([
{},
() => {},
function () {},
NaN,
1,
false,
undefined,
null,
[],
'▲',
])('waitUntil throws when called with %s', input => {
expect(() => waitUntil(input)).toThrow(TypeError);
expect(() => waitUntil(input)).toThrow(
`waitUntil can only be called with a Promise, got ${typeof input}`
);
});
test.each([null, undefined, {}])(
'waitUntil does not throw an error when context is %s',
input => {
const promise = Promise.resolve();
globalThis[Symbol.for('@vercel/request-context')] = input;
expect(() => waitUntil(promise)).not.toThrow();
}
);
test('waitUntil calls ctx.waitUntil when available', async () => {
const promise = Promise.resolve();
const waitUntilMock = vi.fn().mockReturnValue(promise);
globalThis[Symbol.for('@vercel/request-context')] = {
get: () => ({ waitUntil: waitUntilMock }),
};
waitUntil(promise);
expect(waitUntilMock).toHaveBeenCalledWith(promise);
});

View File

@@ -0,0 +1,33 @@
{
"name": "@vercel/functions",
"description": "Runtime functions to be used with your Vercel Functions",
"homepage": "https://vercel.com",
"version": "1.0.2",
"types": "index.d.ts",
"main": "index.js",
"repository": {
"directory": "packages/functions",
"type": "git",
"url": "git+https://github.com/vercel/vercel.git"
},
"bugs": {
"url": "https://github.com/vercel/vercel/issues"
},
"devDependencies": {
"vitest": "1.3.1"
},
"engines": {
"node": ">= 16"
},
"files": [
"index.d.ts",
"index.js"
],
"scripts": {
"test": "vitest"
},
"license": "Apache-2.0",
"publishConfig": {
"access": "public"
}
}

View File

@@ -1,5 +1,26 @@
# @vercel/gatsby-plugin-vercel-builder
## 2.0.28
### Patch Changes
- Updated dependencies [[`2f7a6ed5f`](https://github.com/vercel/vercel/commit/2f7a6ed5f92d454000f92247d3b6548e2064f4e6)]:
- @vercel/build-utils@8.1.1
## 2.0.27
### Patch Changes
- Updated dependencies [[`5014b1e82`](https://github.com/vercel/vercel/commit/5014b1e82a46181baeb727ffe6d14000b6a4b1d7)]:
- @vercel/build-utils@8.1.0
## 2.0.26
### Patch Changes
- Updated dependencies [[`15475c8a2`](https://github.com/vercel/vercel/commit/15475c8a2c303a1dd189ba24044fac750280dd2e), [`21f5e7375`](https://github.com/vercel/vercel/commit/21f5e7375e4cb4ceed98ab56486d09a85fa3894d)]:
- @vercel/build-utils@8.0.0
## 2.0.25
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/gatsby-plugin-vercel-builder",
"version": "2.0.25",
"version": "2.0.28",
"main": "dist/index.js",
"files": [
"dist",
@@ -20,7 +20,7 @@
},
"dependencies": {
"@sinclair/typebox": "0.25.24",
"@vercel/build-utils": "7.12.0",
"@vercel/build-utils": "8.1.1",
"@vercel/routing-utils": "3.1.0",
"esbuild": "0.14.47",
"etag": "1.8.1",

View File

@@ -29,7 +29,7 @@
"@types/node-fetch": "^2.3.0",
"@types/tar": "6.1.5",
"@types/yauzl-promise": "2.1.0",
"@vercel/build-utils": "7.12.0",
"@vercel/build-utils": "8.1.1",
"async-retry": "1.3.3",
"execa": "^1.0.0",
"fs-extra": "^7.0.0",

View File

@@ -26,7 +26,7 @@
"devDependencies": {
"@types/jest": "27.5.1",
"@types/node": "14.18.33",
"@vercel/build-utils": "7.12.0",
"@vercel/build-utils": "8.1.1",
"execa": "3.2.0",
"fs-extra": "11.1.0",
"jest-junit": "16.0.0"

View File

@@ -1,5 +1,73 @@
# @vercel/next
## 4.2.11
### Patch Changes
- normalize source file locations for special metadata files ([#11579](https://github.com/vercel/vercel/pull/11579))
## 4.2.10
### Patch Changes
- skip action rewrites for RSC requests ([#11576](https://github.com/vercel/vercel/pull/11576))
- Bump `@vercel/nft@0.27.0` ([#11580](https://github.com/vercel/vercel/pull/11580))
## 4.2.9
### Patch Changes
- Support incremental partial prerendering ([#11560](https://github.com/vercel/vercel/pull/11560))
- ensure `.action` outputs are created for edge functions ([#11568](https://github.com/vercel/vercel/pull/11568))
- ([#11566](https://github.com/vercel/vercel/pull/11566))
## 4.2.8
### Patch Changes
- Fix missing initial RSC headers ([#11552](https://github.com/vercel/vercel/pull/11552))
- Remove .prefetch.rsc rewrites for non-PPR ([#11540](https://github.com/vercel/vercel/pull/11540))
- [next] rename middleware manifest env ([#11549](https://github.com/vercel/vercel/pull/11549))
## 4.2.7
### Patch Changes
- Fix missing .rsc outputs for pages prerenders ([#11503](https://github.com/vercel/vercel/pull/11503))
- Fix base path app index RSC handling ([#11528](https://github.com/vercel/vercel/pull/11528))
- Fix interception routes PPR route handling ([#11527](https://github.com/vercel/vercel/pull/11527))
## 4.2.6
### Patch Changes
- [next] Update test fixture version ([#11514](https://github.com/vercel/vercel/pull/11514))
## 4.2.5
### Patch Changes
- Only rewrite next-action requests to `.action` handlers ([#11504](https://github.com/vercel/vercel/pull/11504))
## 4.2.4
### Patch Changes
- [next]: Revert .action handling for dynamic routes ([#11509](https://github.com/vercel/vercel/pull/11509))
## 4.2.3
### Patch Changes
- [next] Reland add .action handling for dynamic routes ([#11487](https://github.com/vercel/vercel/pull/11487))
## 4.2.2
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/next",
"version": "4.2.2",
"version": "4.2.11",
"license": "Apache-2.0",
"main": "./dist/index",
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/next-js",
@@ -23,7 +23,7 @@
"dist"
],
"dependencies": {
"@vercel/nft": "0.26.4"
"@vercel/nft": "0.27.0"
},
"devDependencies": {
"@types/aws-lambda": "8.10.19",
@@ -40,7 +40,7 @@
"@types/semver": "6.0.0",
"@types/text-table": "0.2.1",
"@types/webpack-sources": "3.2.0",
"@vercel/build-utils": "7.12.0",
"@vercel/build-utils": "8.1.1",
"@vercel/routing-utils": "3.1.0",
"async-sema": "3.0.1",
"buffer-crc32": "0.2.13",

View File

@@ -1928,6 +1928,7 @@ export const build: BuildV2 = async ({
bypassToken: prerenderManifest.bypassToken || '',
isServerMode,
experimentalPPRRoutes,
hasActionOutputSupport: false,
}).then(arr =>
localizeDynamicRoutes(
arr,
@@ -1958,6 +1959,7 @@ export const build: BuildV2 = async ({
bypassToken: prerenderManifest.bypassToken || '',
isServerMode,
experimentalPPRRoutes,
hasActionOutputSupport: false,
}).then(arr =>
arr.map(route => {
route.src = route.src.replace('^', `^${dynamicPrefix}`);

View File

@@ -51,6 +51,7 @@ import {
normalizePrefetches,
CreateLambdaFromPseudoLayersOptions,
getPostponeResumePathname,
LambdaGroup,
MAX_UNCOMPRESSED_LAMBDA_SIZE,
} from './utils';
import {
@@ -68,6 +69,7 @@ const CORRECT_NOT_FOUND_ROUTES_VERSION = 'v12.0.1';
const CORRECT_MIDDLEWARE_ORDER_VERSION = 'v12.1.7-canary.29';
const NEXT_DATA_MIDDLEWARE_RESOLVING_VERSION = 'v12.1.7-canary.33';
const EMPTY_ALLOW_QUERY_FOR_PRERENDERED_VERSION = 'v12.2.0';
const ACTION_OUTPUT_SUPPORT_VERSION = 'v14.2.2';
const CORRECTED_MANIFESTS_VERSION = 'v12.2.0';
// Ideally this should be in a Next.js manifest so we can change it in
@@ -199,6 +201,9 @@ export async function serverBuild({
nextVersion,
EMPTY_ALLOW_QUERY_FOR_PRERENDERED_VERSION
);
const hasActionOutputSupport =
semver.gte(nextVersion, ACTION_OUTPUT_SUPPORT_VERSION) &&
Boolean(process.env.NEXT_EXPERIMENTAL_STREAMING_ACTIONS);
const projectDir = requiredServerFilesManifest.relativeAppDir
? path.join(baseDir, requiredServerFilesManifest.relativeAppDir)
: requiredServerFilesManifest.appDir || entryPath;
@@ -213,7 +218,9 @@ export async function serverBuild({
}
const experimental = {
ppr: requiredServerFilesManifest.config.experimental?.ppr === true,
ppr:
requiredServerFilesManifest.config.experimental?.ppr === true ||
requiredServerFilesManifest.config.experimental?.ppr === 'incremental',
};
let appRscPrefetches: UnwrapPromise<ReturnType<typeof glob>> = {};
@@ -223,8 +230,6 @@ export async function serverBuild({
if (appPathRoutesManifest) {
appDir = path.join(pagesDir, '../app');
appBuildTraces = await glob('**/*.js.nft.json', appDir);
// TODO: maybe?
appRscPrefetches = experimental.ppr
? {}
: await glob(`**/*${RSC_PREFETCH_SUFFIX}`, appDir);
@@ -246,7 +251,7 @@ export async function serverBuild({
if (rewrite.src && rewrite.dest) {
rewrite.src = rewrite.src.replace(
/\/?\(\?:\/\)\?/,
'(?<rscsuff>(\\.prefetch)?\\.rsc)?(?:/)?'
`(?<rscsuff>${experimental.ppr ? '(\\.prefetch)?' : ''}\\.rsc)?(?:/)?`
);
let destQueryIndex = rewrite.dest.indexOf('?');
@@ -926,11 +931,23 @@ export async function serverBuild({
inversedAppPathManifest,
});
const appRouterStreamingActionLambdaGroups: LambdaGroup[] = [];
for (const group of appRouterLambdaGroups) {
if (!group.isPrerenders || group.isExperimentalPPR) {
group.isStreaming = true;
}
group.isAppRouter = true;
// We create a streaming variant of the Prerender lambda group
// to support actions that are part of a Prerender
if (hasActionOutputSupport) {
appRouterStreamingActionLambdaGroups.push({
...group,
isActionLambda: true,
isStreaming: true,
});
}
}
for (const group of appRouteHandlersLambdaGroups) {
@@ -982,6 +999,13 @@ export async function serverBuild({
pseudoLayerBytes: group.pseudoLayerBytes,
uncompressedLayerBytes: group.pseudoLayerUncompressedBytes,
})),
appRouterStreamingPrerenderLambdaGroups:
appRouterStreamingActionLambdaGroups.map(group => ({
pages: group.pages,
isPrerender: group.isPrerenders,
pseudoLayerBytes: group.pseudoLayerBytes,
uncompressedLayerBytes: group.pseudoLayerUncompressedBytes,
})),
appRouteHandlersLambdaGroups: appRouteHandlersLambdaGroups.map(
group => ({
pages: group.pages,
@@ -999,6 +1023,7 @@ export async function serverBuild({
const combinedGroups = [
...pageLambdaGroups,
...appRouterLambdaGroups,
...appRouterStreamingActionLambdaGroups,
...apiLambdaGroups,
...appRouteHandlersLambdaGroups,
];
@@ -1208,6 +1233,11 @@ export async function serverBuild({
let outputName = path.posix.join(entryDirectory, pageName);
if (group.isActionLambda) {
// give the streaming prerenders a .action suffix
outputName = `${outputName}.action`;
}
// If this is a PPR page, then we should prefix the output name.
if (isPPR) {
if (!revalidate) {
@@ -1378,6 +1408,7 @@ export async function serverBuild({
isServerMode: true,
dynamicMiddlewareRouteMap: middleware.dynamicRouteMap,
experimentalPPRRoutes,
hasActionOutputSupport,
}).then(arr =>
localizeDynamicRoutes(
arr,
@@ -1557,10 +1588,23 @@ export async function serverBuild({
if (lambdas[pathname]) {
lambdas[`${pathname}.rsc`] = lambdas[pathname];
if (experimental.ppr) {
lambdas[`${pathname}${RSC_PREFETCH_SUFFIX}`] = lambdas[pathname];
}
}
if (edgeFunctions[pathname]) {
edgeFunctions[`${pathname}.rsc`] = edgeFunctions[pathname];
if (experimental.ppr) {
edgeFunctions[`${pathname}${RSC_PREFETCH_SUFFIX}`] =
edgeFunctions[pathname];
}
if (hasActionOutputSupport) {
edgeFunctions[`${pathname}.action`] = edgeFunctions[pathname];
}
}
}
}
@@ -1863,7 +1907,7 @@ export async function serverBuild({
...(appDir
? [
...(rscPrefetchHeader
...(rscPrefetchHeader && experimental.ppr
? [
{
src: `^${path.posix.join('/', entryDirectory, '/')}`,
@@ -1905,9 +1949,56 @@ export async function serverBuild({
},
]
: []),
...(hasActionOutputSupport
? [
// Create rewrites for streaming prerenders (.action routes)
// This contains separate rewrites for each possible "has" (action header, or content-type)
// Also includes separate handling for index routes which should match to /index.action.
// This follows the same pattern as the rewrites for .rsc files.
{
src: `^${path.posix.join('/', entryDirectory, '/?')}`,
dest: path.posix.join('/', entryDirectory, '/index.action'),
has: [
{
type: 'header',
key: 'next-action',
},
],
missing: [
{
type: 'header',
key: rscHeader,
},
],
continue: true,
override: true,
},
{
src: `^${path.posix.join(
'/',
entryDirectory,
'/((?!.+\\.action).+?)(?:/)?$'
)}`,
dest: path.posix.join('/', entryDirectory, '/$1.action'),
has: [
{
type: 'header',
key: 'next-action',
},
],
missing: [
{
type: 'header',
key: rscHeader,
},
],
continue: true,
override: true,
},
]
: []),
{
src: `^${path.posix.join('/', entryDirectory, '/')}`,
src: `^${path.posix.join('/', entryDirectory, '/?')}`,
has: [
{
type: 'header',
@@ -1970,47 +2061,6 @@ export async function serverBuild({
]
: []),
...(rscPrefetchHeader && !experimental.ppr
? [
{
src: path.posix.join(
'/',
entryDirectory,
`/__index${RSC_PREFETCH_SUFFIX}`
),
dest: path.posix.join('/', entryDirectory, '/index.rsc'),
has: [
{
type: 'header',
key: rscPrefetchHeader,
},
],
continue: true,
override: true,
},
{
src: `^${path.posix.join(
'/',
entryDirectory,
`/(.+?)${RSC_PREFETCH_SUFFIX}(?:/)?$`
)}`,
dest: path.posix.join(
'/',
entryDirectory,
`/$1${experimental.ppr ? RSC_PREFETCH_SUFFIX : '.rsc'}`
),
has: [
{
type: 'header',
key: rscPrefetchHeader,
},
],
continue: true,
override: true,
},
]
: []),
// These need to come before handle: miss or else they are grouped
// with that routing section
...afterFilesRewrites,

View File

@@ -321,6 +321,7 @@ export async function getDynamicRoutes({
isServerMode,
dynamicMiddlewareRouteMap,
experimentalPPRRoutes,
hasActionOutputSupport,
}: {
entryPath: string;
entryDirectory: string;
@@ -333,6 +334,7 @@ export async function getDynamicRoutes({
isServerMode?: boolean;
dynamicMiddlewareRouteMap?: ReadonlyMap<string, RouteWithSrc>;
experimentalPPRRoutes: ReadonlySet<string>;
hasActionOutputSupport: boolean;
}): Promise<RouteWithSrc[]> {
if (routesManifest) {
switch (routesManifest.version) {
@@ -423,14 +425,25 @@ export async function getDynamicRoutes({
});
}
routes.push({
...route,
src: route.src.replace(
new RegExp(escapeStringRegexp('(?:/)?$')),
'(?:\\.rsc)(?:/)?$'
),
dest: route.dest?.replace(/($|\?)/, '.rsc$1'),
});
if (hasActionOutputSupport) {
routes.push({
...route,
src: route.src.replace(
new RegExp(escapeStringRegexp('(?:/)?$')),
'(?<nxtsuffix>(?:\\.action|\\.rsc))(?:/)?$'
),
dest: route.dest?.replace(/($|\?)/, '$nxtsuffix$1'),
});
} else {
routes.push({
...route,
src: route.src.replace(
new RegExp(escapeStringRegexp('(?:/)?$')),
'(?:\\.rsc)(?:/)?$'
),
dest: route.dest?.replace(/($|\?)/, '.rsc$1'),
});
}
routes.push(route);
}
@@ -1426,6 +1439,13 @@ async function getSourceFilePathFromPage({
}
}
// if we got here, and didn't find a source not-found file, then it was the one injected
// by Next.js. There's no need to warn or return a source file in this case, as it won't have
// any configuration applied to it.
if (page === '/_not-found/page') {
return '';
}
console.log(
`WARNING: Unable to find source file for page ${page} with extensions: ${extensionsToTry.join(
', '
@@ -1487,6 +1507,7 @@ export type LambdaGroup = {
isStreaming?: boolean;
isPrerenders?: boolean;
isExperimentalPPR?: boolean;
isActionLambda?: boolean;
isPages?: boolean;
isApiLambda: boolean;
pseudoLayer: PseudoLayer;
@@ -1551,15 +1572,13 @@ export async function getPageLambdaGroups({
}
if (config && config.functions) {
// `pages` are normalized without route groups (e.g., /app/(group)/page.js).
// we keep track of that mapping in `inversedAppPathManifest`
// `getSourceFilePathFromPage` needs to use the path from source to properly match the config
const pageFromManifest = inversedAppPathManifest?.[routeName];
const sourceFile = await getSourceFilePathFromPage({
workPath: entryPath,
// since this function is used by both `pages` and `app`, the manifest might not be provided
// so fallback to normal behavior of just checking the `page`.
page: pageFromManifest ?? page,
page: normalizeSourceFilePageFromManifest(
routeName,
page,
inversedAppPathManifest
),
pageExtensions,
});
@@ -1643,6 +1662,43 @@ export async function getPageLambdaGroups({
return groups;
}
// `pages` are normalized without route groups (e.g., /app/(group)/page.js).
// we keep track of that mapping in `inversedAppPathManifest`
// `getSourceFilePathFromPage` needs to use the path from source to properly match the config
function normalizeSourceFilePageFromManifest(
routeName: string,
page: string,
inversedAppPathManifest?: Record<string, string>
) {
const pageFromManifest = inversedAppPathManifest?.[routeName];
if (!pageFromManifest) {
// since this function is used by both `pages` and `app`, the manifest might not be provided
// so fallback to normal behavior of just checking the `page`.
return page;
}
const metadataConventions = [
'/favicon.',
'/icon.',
'/apple-icon.',
'/opengraph-image.',
'/twitter-image.',
'/sitemap.',
'/robots.',
];
// these special metadata files for will not contain `/route` or `/page` suffix, so return the routeName as-is.
const isSpecialFile = metadataConventions.some(convention =>
routeName.startsWith(convention)
);
if (isSpecialFile) {
return routeName;
}
return pageFromManifest;
}
export const outputFunctionFileSizeInfo = (
pages: string[],
pseudoLayer: PseudoLayer,
@@ -2451,6 +2507,7 @@ export const onPrerenderRoute =
...(rscEnabled
? {
initialHeaders: {
...initialHeaders,
'content-type': rscContentTypeHeader,
vary: rscVaryHeader,
// If it contains a pre-render, then it was postponed.
@@ -2463,6 +2520,22 @@ export const onPrerenderRoute =
});
}
// we need to ensure all prerenders have a matching .rsc output
// otherwise routing could fall through unexpectedly for the
// fallback: false case as it doesn't have a dynamic route
// to catch the `.rsc` request for app -> pages routing
if (outputPrerenderPathData?.endsWith('.json') && appDir) {
const dummyOutput = new FileBlob({
data: '{}',
contentType: 'application/json',
});
const rscKey = `${outputPathPage}.rsc`;
const prefetchRscKey = `${outputPathPage}${RSC_PREFETCH_SUFFIX}`;
prerenders[rscKey] = dummyOutput;
prerenders[prefetchRscKey] = dummyOutput;
}
++prerenderGroup;
if (routesManifest?.i18n && isBlocking) {
@@ -2754,7 +2827,7 @@ interface EdgeFunctionInfoV2 extends BaseEdgeFunctionInfo {
interface EdgeFunctionInfoV3 extends BaseEdgeFunctionInfo {
matchers: EdgeFunctionMatcher[];
environments: Record<string, string>;
env: Record<string, string>;
}
interface EdgeFunctionMatcher {
@@ -2989,7 +3062,7 @@ export async function getMiddlewareBundle({
slug: 'nextjs',
version: nextVersion,
},
environment: edgeFunction.environments,
environment: edgeFunction.env,
});
})(),
routeMatchers: getRouteMatchers(edgeFunction, routesManifest),
@@ -3169,7 +3242,7 @@ export function upgradeMiddlewareManifestV1(
return {
...rest,
matchers: [{ regexp }],
environments: {},
env: {},
};
}
@@ -3197,7 +3270,7 @@ export function upgradeMiddlewareManifestV2(
const { ...rest } = v2Info;
return {
...rest,
environments: {},
env: {},
};
}

View File

@@ -0,0 +1,6 @@
'use server';
export async function increment(value) {
await new Promise(resolve => setTimeout(resolve, 500));
return value + 1;
}

View File

@@ -0,0 +1,19 @@
'use client';
import { useState } from 'react';
import { increment } from '../../../actions';
export default function Page() {
const [count, setCount] = useState(0);
async function updateCount() {
const newCount = await increment(count);
setCount(newCount);
}
return (
<form action={updateCount}>
<div id="count">{count}</div>
<button>Submit</button>
</form>
);
}

View File

@@ -0,0 +1,5 @@
export const dynamic = 'force-dynamic';
export default function Layout({ children }) {
return children;
}

View File

@@ -0,0 +1,19 @@
'use client';
import { useState } from 'react';
import { increment } from '../../../actions';
export default function Page() {
const [count, setCount] = useState(0);
async function updateCount() {
const newCount = await increment(count);
setCount(newCount);
}
return (
<form action={updateCount}>
<div id="count">{count}</div>
<button>Submit</button>
</form>
);
}

View File

@@ -0,0 +1,5 @@
export const dynamic = 'force-static';
export default function Layout({ children }) {
return children;
}

View File

@@ -0,0 +1,19 @@
'use client';
import { useState } from 'react';
import { increment } from '../../actions';
export default function Page() {
const [count, setCount] = useState(0);
async function updateCount() {
const newCount = await increment(count);
setCount(newCount);
}
return (
<form action={updateCount}>
<div id="count">{count}</div>
<button>Submit</button>
</form>
);
}

View File

@@ -0,0 +1,19 @@
'use client';
import { useState } from 'react';
import { increment } from '../../../../actions';
export default function Page() {
const [count, setCount] = useState(0);
async function updateCount() {
const newCount = await increment(count);
setCount(newCount);
}
return (
<form action={updateCount}>
<div id="count">{count}</div>
<button>Submit</button>
</form>
);
}

View File

@@ -0,0 +1,5 @@
export const dynamic = 'force-dynamic';
export default function Layout({ children }) {
return children;
}

View File

@@ -0,0 +1,19 @@
'use client';
import { useState } from 'react';
import { increment } from '../../../../actions';
export default function Page() {
const [count, setCount] = useState(0);
async function updateCount() {
const newCount = await increment(count);
setCount(newCount);
}
return (
<form action={updateCount}>
<div id="count">{count}</div>
<button>Submit</button>
</form>
);
}

View File

@@ -0,0 +1,5 @@
export const dynamic = 'force-static';
export default function Layout({ children }) {
return children;
}

View File

@@ -0,0 +1,19 @@
'use client';
import { useState } from 'react';
import { increment } from '../../../actions';
export default function Page() {
const [count, setCount] = useState(0);
async function updateCount() {
const newCount = await increment(count);
setCount(newCount);
}
return (
<form action={updateCount}>
<div id="count">{count}</div>
<button>Submit</button>
</form>
);
}

View File

@@ -0,0 +1,5 @@
export const runtime = 'edge';
export default function Layout({ children }) {
return <div>{children}</div>;
}

View File

@@ -0,0 +1,45 @@
'use client';
// @ts-ignore
import { useCallback, useState } from 'react';
function request(method) {
return fetch('/api/test', {
method,
headers: {
'content-type': 'multipart/form-data;.*',
},
});
}
export default function Home() {
const [result, setResult] = useState('Press submit');
const onClick = useCallback(async method => {
const res = await request(method);
const text = await res.text();
setResult(res.ok ? `${method} ${text}` : 'Error: ' + res.status);
}, []);
return (
<>
<div className="flex flex-col items-center justify-center h-screen">
<div className="flex flex-row space-x-2 items-center justify-center">
<button
className="border border-white rounded-sm p-4 mb-4"
onClick={() => onClick('GET')}
>
Submit GET
</button>
<button
className="border border-white rounded-sm p-4 mb-4"
onClick={() => onClick('POST')}
>
Submit POST
</button>
</div>
<div className="text-white">{result}</div>
</div>
</>
);
}

View File

@@ -0,0 +1,5 @@
export const dynamic = 'force-dynamic';
export default function Layout({ children }) {
return children;
}

View File

@@ -0,0 +1,15 @@
import { revalidatePath } from 'next/cache';
export default async function Page() {
async function serverAction() {
'use server';
await new Promise(resolve => setTimeout(resolve, 1000));
revalidatePath('/dynamic');
}
return (
<form action={serverAction}>
<button>Submit</button>
</form>
);
}

View File

@@ -0,0 +1,15 @@
import { revalidatePath } from 'next/cache';
export default async function Page() {
async function serverAction() {
'use server';
await new Promise(resolve => setTimeout(resolve, 1000));
revalidatePath('/dynamic');
}
return (
<form action={serverAction}>
<button>Submit</button>
</form>
);
}

View File

@@ -0,0 +1,19 @@
import { revalidatePath } from 'next/cache';
export default async function Page() {
async function serverAction() {
'use server';
await new Promise(resolve => setTimeout(resolve, 1000));
revalidatePath('/dynamic');
}
return (
<form action={serverAction}>
<button>Submit</button>
</form>
);
}
export function generateStaticParams() {
return [{ slug: 'pre-generated' }];
}

View File

@@ -0,0 +1,5 @@
export const dynamic = 'force-static';
export default function Layout({ children }) {
return children;
}

View File

@@ -0,0 +1,15 @@
import { revalidatePath } from 'next/cache'
export default async function Page() {
async function serverAction() {
'use server';
await new Promise((resolve) => setTimeout(resolve, 1000));
revalidatePath('/dynamic');
}
return (
<form action={serverAction}>
<button>Submit</button>
</form>
);
}

View File

@@ -0,0 +1,10 @@
export default function Root({ children }) {
return (
<html>
<head>
<title>Hello World</title>
</head>
<body>{children}</body>
</html>
);
}

View File

@@ -0,0 +1,45 @@
'use client';
// @ts-ignore
import { useCallback, useState } from 'react';
function request(method) {
return fetch('/api/test', {
method,
headers: {
'content-type': 'multipart/form-data;.*',
},
});
}
export default function Home() {
const [result, setResult] = useState('Press submit');
const onClick = useCallback(async method => {
const res = await request(method);
const text = await res.text();
setResult(res.ok ? `${method} ${text}` : 'Error: ' + res.status);
}, []);
return (
<>
<div className="flex flex-col items-center justify-center h-screen">
<div className="flex flex-row space-x-2 items-center justify-center">
<button
className="border border-white rounded-sm p-4 mb-4"
onClick={() => onClick('GET')}
>
Submit GET
</button>
<button
className="border border-white rounded-sm p-4 mb-4"
onClick={() => onClick('POST')}
>
Submit POST
</button>
</div>
<div className="text-white">{result}</div>
</div>
</>
);
}

View File

@@ -0,0 +1,5 @@
export const dynamic = 'force-dynamic';
export default function Layout({ children }) {
return children;
}

View File

@@ -0,0 +1,15 @@
import { revalidatePath } from 'next/cache';
export default async function Page() {
async function serverAction() {
'use server';
await new Promise(resolve => setTimeout(resolve, 1000));
revalidatePath('/dynamic');
}
return (
<form action={serverAction}>
<button>Submit</button>
</form>
);
}

View File

@@ -0,0 +1,15 @@
import { revalidatePath } from 'next/cache';
export default async function Page() {
async function serverAction() {
'use server';
await new Promise(resolve => setTimeout(resolve, 1000));
revalidatePath('/dynamic');
}
return (
<form action={serverAction}>
<button>Submit</button>
</form>
);
}

View File

@@ -0,0 +1,19 @@
import { revalidatePath } from 'next/cache';
export default async function Page() {
async function serverAction() {
'use server';
await new Promise(resolve => setTimeout(resolve, 1000));
revalidatePath('/dynamic');
}
return (
<form action={serverAction}>
<button>Submit</button>
</form>
);
}
export function generateStaticParams() {
return [{ slug: 'pre-generated' }];
}

View File

@@ -0,0 +1,5 @@
export const dynamic = 'force-static';
export default function Layout({ children }) {
return children;
}

View File

@@ -0,0 +1,15 @@
import { revalidatePath } from 'next/cache'
export default async function Page() {
async function serverAction() {
'use server';
await new Promise((resolve) => setTimeout(resolve, 1000));
revalidatePath('/dynamic');
}
return (
<form action={serverAction}>
<button>Submit</button>
</form>
);
}

View File

@@ -0,0 +1,304 @@
/* eslint-env jest */
const path = require('path');
const { deployAndTest } = require('../../utils');
const fetch = require('../../../../../test/lib/deployment/fetch-retry');
const ctx = {};
function findActionId(page, runtime) {
page = `app${page}/page`; // add /app prefix and /page suffix
for (const [actionId, details] of Object.entries(
ctx.actionManifest[runtime]
)) {
if (details.workers[page]) {
return actionId;
}
}
return null;
}
function generateFormDataPayload(actionId) {
return {
method: 'POST',
body: `------WebKitFormBoundaryHcVuFa30AN0QV3uZ\r\nContent-Disposition: form-data; name=\"1_$ACTION_ID_${actionId}\"\r\n\r\n\r\n------WebKitFormBoundaryHcVuFa30AN0QV3uZ\r\nContent-Disposition: form-data; name=\"0\"\r\n\r\n[\"$K1\"]\r\n------WebKitFormBoundaryHcVuFa30AN0QV3uZ--\r\n`,
headers: {
'Content-Type':
'multipart/form-data; boundary=----WebKitFormBoundaryHcVuFa30AN0QV3uZ',
'Next-Action': actionId,
},
};
}
describe(`${__dirname.split(path.sep).pop()}`, () => {
beforeAll(async () => {
const info = await deployAndTest(__dirname);
const actionManifest = await fetch(
`${info.deploymentUrl}/server-reference-manifest.json`
).then(res => res.json());
ctx.actionManifest = actionManifest;
Object.assign(ctx, info);
});
describe.each(['node', 'edge'])('runtime: %s', runtime => {
const basePath = runtime === 'edge' ? '/edge' : '';
describe('client component', () => {
it('should bypass the static cache for a server action', async () => {
const path = `${basePath}/client/static`;
const actionId = findActionId(path, runtime);
const res = await fetch(`${ctx.deploymentUrl}${path}`, {
method: 'POST',
body: JSON.stringify([1337]),
headers: {
'Content-Type': 'text/plain;charset=UTF-8',
'Next-Action': actionId,
},
});
expect(res.status).toEqual(200);
const body = await res.text();
expect(body).toContain('1338');
expect(res.headers.get('x-matched-path')).toBe(path + '.action');
if (runtime === 'node') {
expect(res.headers.get('x-vercel-cache')).toBe('MISS');
} else {
// in edge runtime, x-vercel-cache is not returned on MISSes for some reason.
// this checks to ensure it was routed to the edge function instead.
expect(res.headers.get('x-edge-runtime')).toBe('1');
}
});
it('should bypass the static cache for a server action on a page with dynamic params', async () => {
const path = `${basePath}/client/static/[dynamic-static]`;
const actionId = findActionId(path, runtime);
const res = await fetch(`${ctx.deploymentUrl}${path}`, {
method: 'POST',
body: JSON.stringify([1337]),
headers: {
'Content-Type': 'text/plain;charset=UTF-8',
'Next-Action': actionId,
},
});
expect(res.status).toEqual(200);
const body = await res.text();
expect(body).toContain('1338');
expect(res.headers.get('x-matched-path')).toBe(path + '.action');
if (runtime === 'node') {
expect(res.headers.get('x-vercel-cache')).toBe('MISS');
} else {
expect(res.headers.get('x-edge-runtime')).toBe('1');
}
});
it('should bypass the static cache for a multipart request (no action header)', async () => {
const path = `${basePath}/client/static`;
const actionId = findActionId(path, runtime);
const res = await fetch(`${ctx.deploymentUrl}${path}`, {
method: 'POST',
body: `------WebKitFormBoundaryHcVuFa30AN0QV3uZ\r\nContent-Disposition: form-data; name=\"1_$ACTION_ID_${actionId}\"\r\n\r\n\r\n------WebKitFormBoundaryHcVuFa30AN0QV3uZ\r\nContent-Disposition: form-data; name=\"0\"\r\n\r\n[\"$K1\"]\r\n------WebKitFormBoundaryHcVuFa30AN0QV3uZ--\r\n`,
headers: {
'Content-Type':
'multipart/form-data; boundary=----WebKitFormBoundaryHcVuFa30AN0QV3uZ',
},
});
expect(res.status).toEqual(200);
expect(res.headers.get('content-type')).toBe(
'text/html; charset=utf-8'
);
if (runtime === 'node') {
// This is a "BYPASS" because no action ID was provided, so it'll fall back to
// `experimentalBypassFor` handling.
expect(res.headers.get('x-vercel-cache')).toBe('BYPASS');
} else {
expect(res.headers.get('x-edge-runtime')).toBe('1');
}
expect(res.headers.get('x-matched-path')).toBe(path);
});
it('should properly invoke the action on a dynamic page', async () => {
const path = `${basePath}/client/dynamic/[id]`;
const actionId = findActionId(path, runtime);
const res = await fetch(`${ctx.deploymentUrl}${path}`, {
method: 'POST',
body: JSON.stringify([1337]),
headers: {
'Content-Type': 'text/plain;charset=UTF-8',
'Next-Action': actionId,
},
});
expect(res.status).toEqual(200);
const body = await res.text();
expect(body).toContain('1338');
expect(res.headers.get('x-matched-path')).toBe(path + '.action');
if (runtime === 'node') {
expect(res.headers.get('x-vercel-cache')).toBe('MISS');
} else {
expect(res.headers.get('x-edge-runtime')).toBe('1');
}
});
});
describe('server component', () => {
it('should bypass the static cache for a server action', async () => {
const path = `${basePath}/rsc/static`;
const actionId = findActionId(path, runtime);
const res = await fetch(
`${ctx.deploymentUrl}${path}`,
generateFormDataPayload(actionId)
);
expect(res.status).toEqual(200);
expect(res.headers.get('x-matched-path')).toBe(path + '.action');
expect(res.headers.get('content-type')).toBe('text/x-component');
if (runtime === 'node') {
expect(res.headers.get('x-vercel-cache')).toBe('MISS');
} else {
expect(res.headers.get('x-edge-runtime')).toBe('1');
}
});
it('should bypass the static cache for a server action on a page with dynamic params', async () => {
const path = `${basePath}/rsc/static/[dynamic-static]`;
const actionId = findActionId(path, runtime);
const res = await fetch(
`${ctx.deploymentUrl}${path}`,
generateFormDataPayload(actionId)
);
expect(res.status).toEqual(200);
expect(res.headers.get('x-matched-path')).toBe(path + '.action');
expect(res.headers.get('content-type')).toBe('text/x-component');
if (runtime === 'node') {
expect(res.headers.get('x-vercel-cache')).toBe('MISS');
} else {
expect(res.headers.get('x-edge-runtime')).toBe('1');
}
});
it('should properly invoke the action on a dynamic page', async () => {
const path = `${basePath}/rsc/dynamic`;
const actionId = findActionId(path, runtime);
const res = await fetch(
`${ctx.deploymentUrl}${path}`,
generateFormDataPayload(actionId)
);
expect(res.status).toEqual(200);
expect(res.headers.get('x-matched-path')).toBe(path + '.action');
expect(res.headers.get('content-type')).toBe('text/x-component');
if (runtime === 'node') {
expect(res.headers.get('x-vercel-cache')).toBe('MISS');
} else {
expect(res.headers.get('x-edge-runtime')).toBe('1');
}
});
describe('generateStaticParams', () => {
it('should bypass the static cache for a server action when pre-generated', async () => {
const path = `${basePath}/rsc/static/generate-static-params/pre-generated`;
const dynamicPath = `${basePath}/rsc/static/generate-static-params/[slug]`;
const actionId = findActionId(dynamicPath, runtime);
const res = await fetch(
`${ctx.deploymentUrl}${path}`,
generateFormDataPayload(actionId)
);
expect(res.status).toEqual(200);
expect(res.headers.get('x-matched-path')).toBe(
dynamicPath + '.action'
);
expect(res.headers.get('content-type')).toBe('text/x-component');
if (runtime === 'node') {
expect(res.headers.get('x-vercel-cache')).toBe('MISS');
} else {
expect(res.headers.get('x-edge-runtime')).toBe('1');
}
});
it('should bypass the static cache for a server action when not pre-generated', async () => {
const page = `${basePath}/rsc/static/generate-static-params/[slug]`;
const actionId = findActionId(page, runtime);
const res = await fetch(
`${ctx.deploymentUrl}/${basePath}/rsc/static/generate-static-params/not-pre-generated`,
generateFormDataPayload(actionId)
);
expect(res.status).toEqual(200);
expect(res.headers.get('x-matched-path')).toBe(page + '.action');
expect(res.headers.get('content-type')).toBe('text/x-component');
if (runtime === 'node') {
expect(res.headers.get('x-vercel-cache')).toBe('MISS');
} else {
expect(res.headers.get('x-edge-runtime')).toBe('1');
}
});
});
});
it('should not match to an action output when the RSC header is present', async () => {
const canonicalPath = `${basePath}/client/dynamic/1`;
const pagePath = `${basePath}/client/dynamic/[id]`;
const actionId = findActionId(pagePath, runtime);
const res = await fetch(`${ctx.deploymentUrl}${canonicalPath}`, {
method: 'POST',
body: JSON.stringify([1337]),
headers: {
'Content-Type': 'text/plain;charset=UTF-8',
'Next-Action': actionId,
'Next-Response': 'rsc',
RSC: '1',
},
});
expect(res.status).toEqual(200);
expect(res.headers.get('x-matched-path')).toBe(pagePath + '.rsc');
expect(res.headers.get('content-type')).toBe('text/x-component');
const body = await res.text();
expect(body).toContain(JSON.stringify(['id', '1', 'd']));
expect(body).not.toContain(JSON.stringify(['id', '1.action', 'd']));
});
});
describe('pages', () => {
it('should not attempt to rewrite the action path for a server action (POST)', async () => {
const res = await fetch(`${ctx.deploymentUrl}/api/test`, {
method: 'POST',
headers: {
'Content-Type':
'multipart/form-data; boundary=----WebKitFormBoundaryHcVuFa30AN0QV3uZ',
},
});
expect(res.status).toEqual(200);
expect(res.headers.get('x-matched-path')).toBe('/api/test');
expect(res.headers.get('x-vercel-cache')).toBe('MISS');
const body = await res.json();
expect(body).toEqual({ message: 'Hello from Next.js!' });
});
it('should not attempt to rewrite the action path for a server action (GET)', async () => {
const res = await fetch(`${ctx.deploymentUrl}/api/test`);
expect(res.status).toEqual(200);
expect(res.headers.get('x-matched-path')).toBe('/api/test');
const body = await res.json();
expect(body).toEqual({ message: 'Hello from Next.js!' });
});
});
});

View File

@@ -0,0 +1 @@
module.exports = {};

View File

@@ -0,0 +1,9 @@
{
"dependencies": {
"next": "canary"
},
"scripts": {
"build": "next build && cp .next/server/server-reference-manifest.json public/"
},
"ignoreNextjsUpdates": true
}

View File

@@ -0,0 +1,3 @@
export default function handler(req, res) {
res.status(200).json({ message: 'Hello from Next.js!' });
}

View File

@@ -0,0 +1,14 @@
{
"builds": [
{
"src": "package.json",
"use": "@vercel/next"
}
],
"build": {
"env": {
"NEXT_EXPERIMENTAL_STREAMING_ACTIONS": "1"
}
},
"probes": []
}

View File

@@ -0,0 +1,6 @@
'use server';
export async function increment(value) {
await new Promise(resolve => setTimeout(resolve, 500));
return value + 1;
}

View File

@@ -0,0 +1,19 @@
'use client';
import { useState } from 'react';
import { increment } from '../../../actions';
export default function Page() {
const [count, setCount] = useState(0);
async function updateCount() {
const newCount = await increment(count);
setCount(newCount);
}
return (
<form action={updateCount}>
<div id="count">{count}</div>
<button>Submit</button>
</form>
);
}

View File

@@ -0,0 +1,5 @@
export const dynamic = 'force-dynamic';
export default function Layout({ children }) {
return children;
}

View File

@@ -0,0 +1,19 @@
'use client';
import { useState } from 'react';
import { increment } from '../../../actions';
export default function Page() {
const [count, setCount] = useState(0);
async function updateCount() {
const newCount = await increment(count);
setCount(newCount);
}
return (
<form action={updateCount}>
<div id="count">{count}</div>
<button>Submit</button>
</form>
);
}

View File

@@ -0,0 +1,5 @@
export const dynamic = 'force-static';
export default function Layout({ children }) {
return children;
}

View File

@@ -0,0 +1,19 @@
'use client';
import { useState } from 'react';
import { increment } from '../../actions';
export default function Page() {
const [count, setCount] = useState(0);
async function updateCount() {
const newCount = await increment(count);
setCount(newCount);
}
return (
<form action={updateCount}>
<div id="count">{count}</div>
<button>Submit</button>
</form>
);
}

View File

@@ -0,0 +1,10 @@
export default function Root({ children }) {
return (
<html>
<head>
<title>Hello World</title>
</head>
<body>{children}</body>
</html>
);
}

View File

@@ -0,0 +1,45 @@
'use client';
// @ts-ignore
import { useCallback, useState } from 'react';
function request(method) {
return fetch('/api/test', {
method,
headers: {
'content-type': 'multipart/form-data;.*',
},
});
}
export default function Home() {
const [result, setResult] = useState('Press submit');
const onClick = useCallback(async method => {
const res = await request(method);
const text = await res.text();
setResult(res.ok ? `${method} ${text}` : 'Error: ' + res.status);
}, []);
return (
<>
<div className="flex flex-col items-center justify-center h-screen">
<div className="flex flex-row space-x-2 items-center justify-center">
<button
className="border border-white rounded-sm p-4 mb-4"
onClick={() => onClick('GET')}
>
Submit GET
</button>
<button
className="border border-white rounded-sm p-4 mb-4"
onClick={() => onClick('POST')}
>
Submit POST
</button>
</div>
<div className="text-white">{result}</div>
</div>
</>
);
}

View File

@@ -0,0 +1,5 @@
export const dynamic = 'force-dynamic';
export default function Layout({ children }) {
return children;
}

View File

@@ -0,0 +1,15 @@
import { revalidatePath } from 'next/cache';
export default async function Page() {
async function serverAction() {
'use server';
await new Promise(resolve => setTimeout(resolve, 1000));
revalidatePath('/dynamic');
}
return (
<form action={serverAction}>
<button>Submit</button>
</form>
);
}

View File

@@ -0,0 +1,15 @@
import { revalidatePath } from 'next/cache';
export default async function Page() {
async function serverAction() {
'use server';
await new Promise(resolve => setTimeout(resolve, 1000));
revalidatePath('/dynamic');
}
return (
<form action={serverAction}>
<button>Submit</button>
</form>
);
}

View File

@@ -0,0 +1,19 @@
import { revalidatePath } from 'next/cache';
export default async function Page() {
async function serverAction() {
'use server';
await new Promise(resolve => setTimeout(resolve, 1000));
revalidatePath('/dynamic');
}
return (
<form action={serverAction}>
<button>Submit</button>
</form>
);
}
export function generateStaticParams() {
return [{ slug: 'pre-generated' }];
}

View File

@@ -0,0 +1,5 @@
export const dynamic = 'force-static';
export default function Layout({ children }) {
return children;
}

View File

@@ -0,0 +1,15 @@
import { revalidatePath } from 'next/cache'
export default async function Page() {
async function serverAction() {
'use server';
await new Promise((resolve) => setTimeout(resolve, 1000));
revalidatePath('/dynamic');
}
return (
<form action={serverAction}>
<button>Submit</button>
</form>
);
}

View File

@@ -0,0 +1,237 @@
/* eslint-env jest */
const path = require('path');
const { deployAndTest } = require('../../utils');
const fetch = require('../../../../../test/lib/deployment/fetch-retry');
const ctx = {};
function findActionId(page) {
page = `app${page}/page`; // add /app prefix and /page suffix
for (const [actionId, details] of Object.entries(ctx.actionManifest.node)) {
if (details.workers[page]) {
return actionId;
}
}
return null;
}
function generateFormDataPayload(actionId) {
return {
method: 'POST',
body: `------WebKitFormBoundaryHcVuFa30AN0QV3uZ\r\nContent-Disposition: form-data; name=\"1_$ACTION_ID_${actionId}\"\r\n\r\n\r\n------WebKitFormBoundaryHcVuFa30AN0QV3uZ\r\nContent-Disposition: form-data; name=\"0\"\r\n\r\n[\"$K1\"]\r\n------WebKitFormBoundaryHcVuFa30AN0QV3uZ--\r\n`,
headers: {
'Content-Type':
'multipart/form-data; boundary=----WebKitFormBoundaryHcVuFa30AN0QV3uZ',
'Next-Action': actionId,
},
};
}
describe(`${__dirname.split(path.sep).pop()}`, () => {
beforeAll(async () => {
const info = await deployAndTest(__dirname);
const actionManifest = await fetch(
`${info.deploymentUrl}/server-reference-manifest.json`
).then(res => res.json());
ctx.actionManifest = actionManifest;
Object.assign(ctx, info);
});
describe('client component', () => {
it('should bypass the static cache for a server action', async () => {
const path = '/client/static';
const actionId = findActionId(path);
const res = await fetch(`${ctx.deploymentUrl}${path}`, {
method: 'POST',
body: JSON.stringify([1337]),
headers: {
'Content-Type': 'text/plain;charset=UTF-8',
'Next-Action': actionId,
},
});
expect(res.status).toEqual(200);
const body = await res.text();
expect(body).toContain('1338');
expect(res.headers.get('x-matched-path')).toBe(path);
expect(res.headers.get('x-vercel-cache')).toBe('BYPASS');
});
it('should bypass the static cache for a server action on a page with dynamic params', async () => {
const path = '/client/static/[dynamic-static]';
const actionId = findActionId(path);
const res = await fetch(`${ctx.deploymentUrl}${path}`, {
method: 'POST',
body: JSON.stringify([1337]),
headers: {
'Content-Type': 'text/plain;charset=UTF-8',
'Next-Action': actionId,
},
});
expect(res.status).toEqual(200);
const body = await res.text();
expect(body).toContain('1338');
expect(res.headers.get('x-matched-path')).toBe(path);
expect(res.headers.get('x-vercel-cache')).toBe('BYPASS');
});
it('should bypass the static cache for a multipart request (no action header)', async () => {
const path = '/client/static';
const actionId = findActionId(path);
const res = await fetch(`${ctx.deploymentUrl}${path}`, {
method: 'POST',
body: `------WebKitFormBoundaryHcVuFa30AN0QV3uZ\r\nContent-Disposition: form-data; name=\"1_$ACTION_ID_${actionId}\"\r\n\r\n\r\n------WebKitFormBoundaryHcVuFa30AN0QV3uZ\r\nContent-Disposition: form-data; name=\"0\"\r\n\r\n[\"$K1\"]\r\n------WebKitFormBoundaryHcVuFa30AN0QV3uZ--\r\n`,
headers: {
'Content-Type':
'multipart/form-data; boundary=----WebKitFormBoundaryHcVuFa30AN0QV3uZ',
},
});
expect(res.status).toEqual(200);
expect(res.headers.get('content-type')).toBe('text/html; charset=utf-8');
expect(res.headers.get('x-vercel-cache')).toBe('BYPASS');
expect(res.headers.get('x-matched-path')).toBe(path);
});
it('should properly invoke the action on a dynamic page', async () => {
const path = '/client/dynamic/[id]';
const actionId = findActionId(path);
const res = await fetch(`${ctx.deploymentUrl}${path}`, {
method: 'POST',
body: JSON.stringify([1337]),
headers: {
'Content-Type': 'text/plain;charset=UTF-8',
'Next-Action': actionId,
},
});
expect(res.status).toEqual(200);
const body = await res.text();
expect(body).toContain('1338');
expect(res.headers.get('x-matched-path')).toBe(path);
// This isn't a "BYPASS" because the action wasn't part of a static prerender
expect(res.headers.get('x-vercel-cache')).toBe('MISS');
});
});
describe('server component', () => {
it('should bypass the static cache for a server action', async () => {
const path = '/rsc/static';
const actionId = findActionId(path);
const res = await fetch(
`${ctx.deploymentUrl}${path}`,
generateFormDataPayload(actionId)
);
expect(res.status).toEqual(200);
expect(res.headers.get('x-matched-path')).toBe(path);
expect(res.headers.get('content-type')).toBe('text/x-component');
expect(res.headers.get('x-vercel-cache')).toBe('BYPASS');
});
it('should bypass the static cache for a server action on a page with dynamic params', async () => {
const path = '/rsc/static/[dynamic-static]';
const actionId = findActionId(path);
const res = await fetch(
`${ctx.deploymentUrl}${path}`,
generateFormDataPayload(actionId)
);
expect(res.status).toEqual(200);
expect(res.headers.get('x-matched-path')).toBe(path);
expect(res.headers.get('content-type')).toBe('text/x-component');
expect(res.headers.get('x-vercel-cache')).toBe('BYPASS');
});
it('should properly invoke the action on a dynamic page', async () => {
const path = '/rsc/dynamic';
const actionId = findActionId(path);
const res = await fetch(
`${ctx.deploymentUrl}${path}`,
generateFormDataPayload(actionId)
);
expect(res.status).toEqual(200);
expect(res.headers.get('x-matched-path')).toBe(path);
expect(res.headers.get('content-type')).toBe('text/x-component');
// This isn't a "BYPASS" because the action wasn't part of a static prerender
expect(res.headers.get('x-vercel-cache')).toBe('MISS');
});
describe('generateStaticParams', () => {
it('should bypass the static cache for a server action when pre-generated', async () => {
const path = '/rsc/static/generate-static-params/pre-generated';
const actionId = findActionId(
'/rsc/static/generate-static-params/[slug]'
);
const res = await fetch(
`${ctx.deploymentUrl}${path}`,
generateFormDataPayload(actionId)
);
expect(res.status).toEqual(200);
expect(res.headers.get('x-matched-path')).toBe(
'/rsc/static/generate-static-params/pre-generated'
);
expect(res.headers.get('content-type')).toBe('text/x-component');
expect(res.headers.get('x-vercel-cache')).toBe('BYPASS');
});
it('should bypass the static cache for a server action when not pre-generated', async () => {
const page = '/rsc/static/generate-static-params/[slug]';
const actionId = findActionId(page);
const res = await fetch(
`${ctx.deploymentUrl}/rsc/static/generate-static-params/not-pre-generated`,
generateFormDataPayload(actionId)
);
expect(res.status).toEqual(200);
expect(res.headers.get('x-matched-path')).toBe(page);
expect(res.headers.get('content-type')).toBe('text/x-component');
// This isn't a "BYPASS" because the action wasn't part of a static prerender
expect(res.headers.get('x-vercel-cache')).toBe('BYPASS');
});
});
});
describe('pages', () => {
it('should not attempt to rewrite the action path for a server action (POST)', async () => {
const res = await fetch(`${ctx.deploymentUrl}/api/test`, {
method: 'POST',
headers: {
'Content-Type':
'multipart/form-data; boundary=----WebKitFormBoundaryHcVuFa30AN0QV3uZ',
},
});
expect(res.status).toEqual(200);
expect(res.headers.get('x-matched-path')).toBe('/api/test');
expect(res.headers.get('x-vercel-cache')).toBe('MISS');
const body = await res.json();
expect(body).toEqual({ message: 'Hello from Next.js!' });
});
it('should not attempt to rewrite the action path for a server action (GET)', async () => {
const res = await fetch(`${ctx.deploymentUrl}/api/test`);
expect(res.status).toEqual(200);
expect(res.headers.get('x-matched-path')).toBe('/api/test');
const body = await res.json();
expect(body).toEqual({ message: 'Hello from Next.js!' });
});
});
});

View File

@@ -0,0 +1 @@
module.exports = {};

View File

@@ -0,0 +1,9 @@
{
"dependencies": {
"next": "canary"
},
"scripts": {
"build": "next build && cp .next/server/server-reference-manifest.json public/"
},
"ignoreNextjsUpdates": true
}

View File

@@ -0,0 +1,3 @@
export default function handler(req, res) {
res.status(200).json({ message: 'Hello from Next.js!' });
}

View File

@@ -0,0 +1,9 @@
{
"builds": [
{
"src": "package.json",
"use": "@vercel/next"
}
],
"probes": []
}

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