Skip to content

fix(deps): update @wordpress/scripts to 37 and refresh stale npm overrides - #77

Open
aryanjasala wants to merge 1 commit into
fix/deps-security-refreshfrom
build/wordpress-scripts-37
Open

aryanjasala wants to merge 1 commit into
fix/deps-security-refreshfrom
build/wordpress-scripts-37

Conversation

@aryanjasala

Copy link
Copy Markdown
Member

What this PR does

Moves the skeleton to @wordpress/scripts 37 and its sibling packages, fixes a Stylelint crash that upgrade exposes, and fixes overrides that had started pinning the very versions Dependabot flags.

Closes

N/A

Changes

  • @wordpress/scripts 36.0.0 to 37.0.0, @wordpress/babel-preset-default 8.47.0 to 10.0.0, @wordpress/browserslist-config 6.56.0 to 7.0.0, @wordpress/eslint-plugin 25.4.1 to 27.0.0, @wordpress/interactivity 6.56.0 to 8.0.0, @wordpress/server-side-render 6.28.0 to 7.0.0, lint-staged 16.1.6 to 17.6.0.
  • @wordpress/eslint-plugin stops at 27: @rtcamp/eslint-config 1.2.0 accepts only ^25 to ^27 as a peer.
  • New dev dependency @wordpress/theme 4.0.0: a peer of @wordpress/stylelint-config 27, which this repo's legacy-peer-deps setting does not install, so Stylelint loaded the @wordpress/theme 2.3.0 the editor packages hoist and crashed reading its design tokens (Cannot convert undefined or null to object in theme-tokens.mjs). The editor packages keep their nested 2.3.0.
  • overrides: express > qs 6.16.2 and copy-webpack-plugin > serialize-javascript 7.1.4 (both were pinned to the vulnerable versions), markdownlint-cli > smol-toml 1.9.1 added; the webpack-dev-server 5.2.6 and sockjs overrides go (wp-scripts 37 needs webpack-dev-server 6, which drops sockjs).

Breaking changes checked: webpack-dev-server 6 (nothing webpack.blocks.config.js uses), interactivity 7 (none of the removed directives are used), eslint-plugin 26 and 27 (esnext parser and test-unit rules, covered by @rtcamp/eslint-config's own Jest config), lint-staged 17 and the rest (Node floors the Node 24 floor meets).

How I verified

  • npm ci on Node 24: no dependency EBADENGINE warnings.
  • npm run build:prod produces the same 34 files as the base branch.
  • lint:css, lint:package-json pass; lint:js (run outside the home directory): 0 errors, 1 warning. test:js finds no tests, as on main.
  • webpack.blocks.config.js loads with webpack-dev-server 6.1.0.
  • Open Dependabot alerts still matching an installed version: only katex (low; the fix needs 0.18 through markdownlint, a 0.x major) and deepmerge (no fix released). npm audit: 0 critical, 0 high.

Reviewer notes

  • @rtcamp/eslint-config and @rtcamp/stylelint-config peer ranges are behind (@wordpress/eslint-plugin up to 27; @wordpress/stylelint-config ^23.37.0 while wp-scripts brings 27). Widening them is a wp-tooling change.

…rides

Moves @wordpress/scripts 36.0.0 to 37.0.0, @wordpress/babel-preset-default
8.47.0 to 10.0.0, @wordpress/browserslist-config 6.56.0 to 7.0.0,
@wordpress/eslint-plugin 25.4.1 to 27.0.0, @wordpress/interactivity
6.56.0 to 8.0.0, @wordpress/server-side-render 6.28.0 to 7.0.0 and
lint-staged 16.1.6 to 17.6.0.

@wordpress/eslint-plugin stops at 27: @rtcamp/eslint-config 1.2.0
accepts only ^25 to ^27 as a peer. wp-scripts 37 keeps its own nested 28.

Adds @wordpress/theme 4.0.0 as a dev dependency. It is a peer of
@wordpress/stylelint-config 27, which this repo's legacy-peer-deps
setting does not install, so Stylelint picked up the 2.3.0 copy the
editor packages hoist and crashed loading its design tokens.

The overrides pinned the very versions Dependabot flags: express's qs at
6.16.0 and copy-webpack-plugin's serialize-javascript at 7.0.5. They move
to the patched 6.16.2 and 7.1.4, and markdownlint-cli's smol-toml is
pinned to the patched 1.9.1. The webpack-dev-server 5.2.6 and sockjs
uuid overrides go: wp-scripts 37 needs webpack-dev-server 6, which drops
sockjs.

Breaking changes checked: webpack-dev-server 6 removes nothing
webpack.blocks.config.js uses; interactivity 7 removes data-wp-ignore,
two-hyphen unique IDs and negated function calls, none of which the
skeleton uses; eslint-plugin 26 and 27 change the esnext parser and the
test-unit rules, both covered by @rtcamp/eslint-config's own Jest
config; lint-staged 17 and the rest raise Node floors the Node 24 floor
already meets.

This branch has not been deployed

No deployments
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.

1 participant