Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update pnpm to v10 #41821

Merged
merged 6 commits into from
Feb 17, 2025
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
PHP_VERSION=8.2
COMPOSER_VERSION=2.8.3
NODE_VERSION=22.9.0
PNPM_VERSION=9.15.0
PNPM_VERSION=10.4.0

# Other useful version numbers.
MIN_PHP_VERSION=7.2
Expand Down
6 changes: 6 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,9 @@ resolution-mode = highest
jetpack-webpack-config-resolve-conditions=jetpack:src

manage-package-manager-versions=false

# Ensure dependencies were properly built.
strict-dep-builds = true

# Warn if `node_modules` do not match lockfile.
verify-deps-before-run = warn
13 changes: 10 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,19 @@
},
"engines": {
"node": "^22.9.0",
"pnpm": "^9.15.0"
"pnpm": "^10.4.0"
},
"packageManager": "pnpm@9.15.0",
"packageManager": "pnpm@10.4.0",
"pnpm": {
"patchedDependencies": {
"@wordpress/dataviews": ".pnpm-patches/@[email protected]"
}
},
"onlyBuiltDependencies": [
Copy link
Contributor

@anomiex anomiex Feb 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we don't seem to actually need any of these, I might do

Suggested change
"onlyBuiltDependencies": [
"ignoredBuiltDependencies": [

instead. At the least we might drop core-js, svlte-preprocess, and swiper in there since their builds do nothing useful.

Copy link
Contributor

@tbradsha tbradsha Feb 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I was hoping to do this, but when I ran it locally (with either ignoredBuiltDependencies or neverBuiltDependencies) I was still getting the ERR_PNPM_IGNORED_BUILDS error, and I didn't see any support for overrides in a brief skim of the source (pnpm/pnpm#9071). Does it work for you? 🤔

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, seems to work for me with ignoredBuiltDependencies and 10.4.0 or 10.4.1.

I had a typo earlier, copied from a typo in https://github.com/pnpm/pnpm/releases/tag/v10.4.1 😀

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like it was my end (surprise!); clearing node_modules fixed it.

"@swc/core",
"core-js",
"esbuild",
"svelte-preprocess",
"swiper"
]
}
}
78 changes: 39 additions & 39 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tools/cli/commands/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function cliLink( options ) {
[
{
title: chalkJetpackGreen( `Enabling global access to the CLI` ),
task: () => command( 'pnpm link --global', options.v, path.resolve( 'tools/cli' ) ),
task: () => command( 'pnpm link', options.v, path.resolve( 'tools/cli' ) ),
},
],
opts
Expand Down
Loading