Skip to content

Commit

Permalink
Merge branch 'trunk' into add/protect-fix-threats-status
Browse files Browse the repository at this point in the history
  • Loading branch information
elliottprogrammer committed Dec 20, 2024
2 parents fd97fdc + b414852 commit a1d51a7
Show file tree
Hide file tree
Showing 33 changed files with 266 additions and 191 deletions.
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.3.0
PNPM_VERSION=9.15.0

# Other useful version numbers.
MIN_PHP_VERSION=7.2
Expand Down
3 changes: 0 additions & 3 deletions .husky/post-checkout
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

./tools/js-tools/git-hooks/post-merge-checkout-hook.sh "$1"
3 changes: 0 additions & 3 deletions .husky/post-merge
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

./tools/js-tools/git-hooks/post-merge-checkout-hook.sh ORIG_HEAD
3 changes: 0 additions & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

node tools/js-tools/git-hooks/pre-commit-hook.js
3 changes: 0 additions & 3 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

if test -c /dev/tty && sh -c ': < /dev/tty' >/dev/null 2>/dev/null; then
exec < /dev/tty
fi
Expand Down
10 changes: 10 additions & 0 deletions .pnpmfile.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,16 @@ function afterAllResolved( lockfile ) {
return lockfile;
}

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.optionalDependencies?.[ '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.\n"
);
}
}

return lockfile;
}

Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,21 @@
"php:autofix": "composer phpcs:fix",
"php:compatibility": "composer phpcs:compatibility",
"php:lint": "composer phpcs:lint",
"prepare": "husky install",
"prepare": "husky",
"reformat-files": "prettier --ignore-path .eslintignore --write \"**/*.{js,jsx,cjs,mjs,ts,tsx,svelte,json,json5}\"",
"version-packages": "bash ./tools/version-packages.sh"
},
"devDependencies": {
"eslint": "9.16.0",
"husky": "8.0.3",
"husky": "9.1.7",
"jetpack-cli": "workspace:*",
"jetpack-js-tools": "workspace:*"
},
"engines": {
"node": "^22.9.0",
"pnpm": "^9.3.0 <9.12.0"
"pnpm": "^9.15.0"
},
"packageManager": "pnpm@9.3.0",
"packageManager": "pnpm@9.15.0",
"pnpm": {
"patchedDependencies": {
"@wordpress/[email protected]": ".pnpm-patches/@[email protected]"
Expand Down
Loading

0 comments on commit a1d51a7

Please sign in to comment.