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 to pnpm v9 #37720

Merged
merged 2 commits into from
Jun 6, 2024
Merged
Show file tree
Hide file tree
Changes from all 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.7.1
NODE_VERSION=20.8.1
PNPM_VERSION=8.6.8
PNPM_VERSION=9.2.0

# Other useful version numbers.
MIN_PHP_VERSION=7.0
Expand Down
17 changes: 3 additions & 14 deletions .pnpmfile.cjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
// Note if you change something here, you'll have to make a package.json mismatch pnpm-lock.yaml to
// get it re-run. An easy way to do that is to just edit pnpm-lock.yaml to change the version number
// of husky near the top.

/**
* Fix package dependencies.
*
Expand Down Expand Up @@ -179,20 +175,13 @@ function afterAllResolved( lockfile ) {
return lockfile;
}

// eslint-disable-next-line no-unused-vars -- Don't care.
for ( const [ k, v ] of Object.entries( lockfile.packages ) ) {
// Forbid installing webpack without webpack-cli. It results in lots of spurious lockfile changes.
// https://github.com/pnpm/pnpm/issues/3935
if ( k.startsWith( '/webpack/' ) && ! v.dependencies[ 'webpack-cli' ] ) {
throw new Error(
"Something you've done is trying to add a dependency on webpack without webpack-cli.\nThis is not allowed, as it tends to result in pnpm lockfile flip-flopping.\nSee https://github.com/pnpm/pnpm/issues/3935 for the upstream bug report."
);
}

// Forbid `@wordpress/dependency-extraction-webpack-plugin` v6 until WP 6.5 support is dropped.
// https://github.com/WordPress/gutenberg/issues/62202
if (
k.startsWith( '/@wordpress/dependency-extraction-webpack-plugin/' ) &&
! k.startsWith( '/@wordpress/dependency-extraction-webpack-plugin/5.' )
k.startsWith( '@wordpress/dependency-extraction-webpack-plugin@' ) &&
! k.startsWith( '@wordpress/dependency-extraction-webpack-plugin@5.' )
) {
throw new Error(
'@wordpress/dependency-extraction-webpack-plugin >= 6.0.0 is not allowed until we drop WordPress 6.5 support.\nSee https://github.com/WordPress/gutenberg/issues/62202 for details.'
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@
},
"engines": {
"node": "^20.8.1",
"pnpm": "^8.6.2"
"pnpm": "^9.2.0"
}
}
Loading
Loading