Skip to content

[build-utils] add pnpm 10 detection for new projects - #13072

Merged
onsclom merged 17 commits into
mainfrom
austinmerrick/reintroduce-pnpm-10-support
Feb 20, 2025
Merged

onsclom merged 17 commits into
mainfrom
austinmerrick/reintroduce-pnpm-10-support

Conversation

@onsclom

@onsclom onsclom commented Feb 14, 2025 •

Copy link
Copy Markdown
Contributor

Reintroduces #12852, but with a new strategy:

if `pnpm-lock.yaml` v9 is found:
	if project was created before 2025-02-24T20:00:00Z:
		use pnpm 9
	else:
		use pnpm 10

This will avoid breaking old projects, and will add zero configuration pnpm 10 support for new projects.

@changeset-bot

changeset-bot Bot commented Feb 14, 2025 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 929f95a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 10 packages
Name Type
@vercel/static-build Minor
@vercel/build-utils Minor
@vercel/hydrogen Minor
@vercel/redwood Minor
@vercel/client Minor
@vercel/remix-builder Minor
@vercel/next Minor
vercel Minor
@vercel/gatsby-plugin-vercel-builder Patch
@vercel/node Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@onsclom onsclom changed the title Revert support pnpm 10 [build-utils] Reintroduce pnpm 10 support Feb 14, 2025
Zhang-Wei-666 added a commit to MoomFE/mixte that referenced this pull request Feb 17, 2025
@onsclom onsclom changed the title [build-utils] Reintroduce pnpm 10 support [build-utils] Add pnpm 10 support Feb 18, 2025
@onsclom onsclom changed the title [build-utils] Add pnpm 10 support [build-utils] support pnpm 10 Feb 18, 2025
TooTallNate
TooTallNate previously approved these changes Feb 18, 2025
@onsclom
onsclom marked this pull request as draft February 19, 2025 19:05
@onsclom

onsclom commented Feb 19, 2025

Copy link
Copy Markdown
Contributor Author

Updating the strategy here to stick with pnpm 9 for old projects, and use pnpm 10 for new projects.

@onsclom

onsclom commented Feb 19, 2025

Copy link
Copy Markdown
Contributor Author

Updated the strategy of this PR from checking engines.pnpm to checking the project creation timestamp.

@TooTallNate

Copy link
Copy Markdown
Member

Is there an explanation for the change in strategy? I thought the engines.pnpm check made sense.

So with the new strategy, if I have an old project there is no way to opt-in to pnpm 10? And vice versa?

@onsclom

onsclom commented Feb 20, 2025 •

Copy link
Copy Markdown
Contributor Author

Is there an explanation for the change in strategy? I thought the engines.pnpm check made sense.

So with the new strategy, if I have an old project there is no way to opt-in to pnpm 10? And vice versa?

We talked about this on slack, but to record here:

The new strategy is because there's another tricky case where pnpm@10 can break builds. The package.json#packageManager can specify pnpm@8 while the lockfile is v9, so the project currently uses pnpm@9. Upgrading this project to use pnpm@10 means actually using pnpm@8 and ignoring the lockfile.

Old projects can still opt-in to pnpm 10 with corepack or a custom install command. New projects can still opt in to pnpm 9.

@onsclom
onsclom merged commit 1b5c536 into main Feb 20, 2025
@onsclom
onsclom deleted the austinmerrick/reintroduce-pnpm-10-support branch February 20, 2025 19:51
onsclom pushed a commit that referenced this pull request Feb 21, 2025
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/[email protected]

### Minor Changes

- Detect v9 pnpm lock files as pnpm 10 for new projects
([#13072](#13072))

### Patch Changes

- Improve build log messages surrounding pnpm 10
([#13088](#13088))

- [build-utils] extract checkIfAlreadyInstalled helper to clarify intent
([#13060](#13060))

- Allow pnpm 10 to use package.json#packageManager without an engines
error ([#13083](#13083))

## [email protected]

### Minor Changes

- Detect v9 pnpm lock files as pnpm 10 for new projects
([#13072](#13072))

### Patch Changes

- [cli] bump `@vercel/fun` to v1.1.5
([#13070](#13070))

- Updated dependencies
\[[`adb1f80db1337f10c6310e3d05bbabb7bac3f05d`](adb1f80),
[`00c622d4497d37932d17571854c19bd2340d5c36`](00c622d),
[`ef75bcc0ef2400f4f704f500b09a0f20e1f0d0a0`](ef75bcc),
[`1b5c53642abca43ce6223f1f58d1586ee2fd87b1`](1b5c536)]:
    -   @vercel/[email protected]
    -   @vercel/[email protected]
    -   @vercel/[email protected]
    -   @vercel/[email protected]
    -   @vercel/[email protected]
    -   @vercel/[email protected]
    -   @vercel/[email protected]

## @vercel/[email protected]

### Minor Changes

- Detect v9 pnpm lock files as pnpm 10 for new projects
([#13072](#13072))

### Patch Changes

- fix(cli): catch json parse
([#13071](#13071))

- Updated dependencies
\[[`adb1f80db1337f10c6310e3d05bbabb7bac3f05d`](adb1f80),
[`00c622d4497d37932d17571854c19bd2340d5c36`](00c622d),
[`ef75bcc0ef2400f4f704f500b09a0f20e1f0d0a0`](ef75bcc),
[`1b5c53642abca43ce6223f1f58d1586ee2fd87b1`](1b5c536)]:
    -   @vercel/[email protected]

## @vercel/[email protected]

### Minor Changes

- Detect v9 pnpm lock files as pnpm 10 for new projects
([#13072](#13072))

## @vercel/[email protected]

### Minor Changes

- Detect v9 pnpm lock files as pnpm 10 for new projects
([#13072](#13072))

## @vercel/[email protected]

### Minor Changes

- Detect v9 pnpm lock files as pnpm 10 for new projects
([#13072](#13072))

## @vercel/[email protected]

### Minor Changes

- Detect v9 pnpm lock files as pnpm 10 for new projects
([#13072](#13072))

## @vercel/[email protected]

### Minor Changes

- Detect v9 pnpm lock files as pnpm 10 for new projects
([#13072](#13072))

### Patch Changes

-   Updated dependencies \[]:
    -   @vercel/[email protected]

## @vercel/[email protected]

### Patch Changes

- Updated dependencies
\[[`adb1f80db1337f10c6310e3d05bbabb7bac3f05d`](adb1f80),
[`00c622d4497d37932d17571854c19bd2340d5c36`](00c622d),
[`ef75bcc0ef2400f4f704f500b09a0f20e1f0d0a0`](ef75bcc),
[`1b5c53642abca43ce6223f1f58d1586ee2fd87b1`](1b5c536)]:
    -   @vercel/[email protected]

## @vercel/[email protected]

### Patch Changes

- Updated dependencies
\[[`adb1f80db1337f10c6310e3d05bbabb7bac3f05d`](adb1f80),
[`00c622d4497d37932d17571854c19bd2340d5c36`](00c622d),
[`ef75bcc0ef2400f4f704f500b09a0f20e1f0d0a0`](ef75bcc),
[`1b5c53642abca43ce6223f1f58d1586ee2fd87b1`](1b5c536)]:
    -   @vercel/[email protected]

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
QuietCraftsmanship pushed a commit to QuietCraftsmanship/Vercel that referenced this pull request Jul 6, 2025
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/[email protected]

### Minor Changes

- Detect v9 pnpm lock files as pnpm 10 for new projects
([#13072](vercel/vercel#13072))

### Patch Changes

- Improve build log messages surrounding pnpm 10
([#13088](vercel/vercel#13088))

- [build-utils] extract checkIfAlreadyInstalled helper to clarify intent
([#13060](vercel/vercel#13060))

- Allow pnpm 10 to use package.json#packageManager without an engines
error ([#13083](vercel/vercel#13083))

## [email protected]

### Minor Changes

- Detect v9 pnpm lock files as pnpm 10 for new projects
([#13072](vercel/vercel#13072))

### Patch Changes

- [cli] bump `@vercel/fun` to v1.1.5
([#13070](vercel/vercel#13070))

- Updated dependencies
\[[`2692de22d771704a7a48e6f812836d2f5cc19d58`](vercel/vercel@2692de2),
[`bf5662d7029a0c7e032da87db6a005fe3cbaa7a5`](vercel/vercel@bf5662d),
[`fef47933a5b215bc25fc2833960a0abc7e5acc96`](vercel/vercel@fef4793),
[`95d9553a726a068457d05e4d59fd7d045d0ba5f4`](vercel/vercel@95d9553)]:
    -   @vercel/[email protected]
    -   @vercel/[email protected]
    -   @vercel/[email protected]
    -   @vercel/[email protected]
    -   @vercel/[email protected]
    -   @vercel/[email protected]
    -   @vercel/[email protected]

## @vercel/[email protected]

### Minor Changes

- Detect v9 pnpm lock files as pnpm 10 for new projects
([#13072](vercel/vercel#13072))

### Patch Changes

- fix(cli): catch json parse
([#13071](vercel/vercel#13071))

- Updated dependencies
\[[`2692de22d771704a7a48e6f812836d2f5cc19d58`](vercel/vercel@2692de2),
[`bf5662d7029a0c7e032da87db6a005fe3cbaa7a5`](vercel/vercel@bf5662d),
[`fef47933a5b215bc25fc2833960a0abc7e5acc96`](vercel/vercel@fef4793),
[`95d9553a726a068457d05e4d59fd7d045d0ba5f4`](vercel/vercel@95d9553)]:
    -   @vercel/[email protected]

## @vercel/[email protected]

### Minor Changes

- Detect v9 pnpm lock files as pnpm 10 for new projects
([#13072](vercel/vercel#13072))

## @vercel/[email protected]

### Minor Changes

- Detect v9 pnpm lock files as pnpm 10 for new projects
([#13072](vercel/vercel#13072))

## @vercel/[email protected]

### Minor Changes

- Detect v9 pnpm lock files as pnpm 10 for new projects
([#13072](vercel/vercel#13072))

## @vercel/[email protected]

### Minor Changes

- Detect v9 pnpm lock files as pnpm 10 for new projects
([#13072](vercel/vercel#13072))

## @vercel/[email protected]

### Minor Changes

- Detect v9 pnpm lock files as pnpm 10 for new projects
([#13072](vercel/vercel#13072))

### Patch Changes

-   Updated dependencies \[]:
    -   @vercel/[email protected]

## @vercel/[email protected]

### Patch Changes

- Updated dependencies
\[[`2692de22d771704a7a48e6f812836d2f5cc19d58`](vercel/vercel@2692de2),
[`bf5662d7029a0c7e032da87db6a005fe3cbaa7a5`](vercel/vercel@bf5662d),
[`fef47933a5b215bc25fc2833960a0abc7e5acc96`](vercel/vercel@fef4793),
[`95d9553a726a068457d05e4d59fd7d045d0ba5f4`](vercel/vercel@95d9553)]:
    -   @vercel/[email protected]

## @vercel/[email protected]

### Patch Changes

- Updated dependencies
\[[`2692de22d771704a7a48e6f812836d2f5cc19d58`](vercel/vercel@2692de2),
[`bf5662d7029a0c7e032da87db6a005fe3cbaa7a5`](vercel/vercel@bf5662d),
[`fef47933a5b215bc25fc2833960a0abc7e5acc96`](vercel/vercel@fef4793),
[`95d9553a726a068457d05e4d59fd7d045d0ba5f4`](vercel/vercel@95d9553)]:
    -   @vercel/[email protected]

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

This branch was successfully deployed

1 active deployment
Preview — 929f95a5 Deployed Feb 20, 2025 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants