Skip to content

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

Merged
aryanjasala merged 7 commits into
mainfrom
build/wordpress-scripts-37
Nov 10, 2026
Merged

aryanjasala merged 7 commits into
mainfrom
build/wordpress-scripts-37

Conversation

@aryanjasala

Copy link
Copy Markdown
Member

What this PR does

Moves the theme to @wordpress/scripts 37 and its sibling packages, 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.56.0 to 10.0.0, @wordpress/browserslist-config 6.56.0 to 7.0.0, @wordpress/interactivity 6.56.0 to 8.0.0.
  • @wordpress/eslint-plugin stays on 27.0.0: @rtcamp/eslint-config 1.2.0 accepts only ^25 to ^27 as a peer. wp-scripts 37 keeps its own nested 28.
  • overrides: express > qs 6.16.0 to 6.16.2 and copy-webpack-plugin > serialize-javascript 7.0.5 to 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 override goes (wp-scripts 37 needs 6) and so does the sockjs one (webpack-dev-server 6 drops sockjs).

Breaking changes checked: webpack-dev-server 6 removes nothing webpack.blocks.config.js uses (it deletes the default proxy and sets port and allowed hosts). Interactivity 7 removes data-wp-ignore, two-hyphen unique IDs and negated function calls; the theme uses none of them. The rest raise the Node floor to 22.13, which the Node 24 floor meets.

How I verified

  • npm ci on Node 24 with CI's npm settings (no user .npmrc): no dependency EBADENGINE warnings.
  • npm run build:prod produces the same 18 files as the base branch.
  • Jest: 33 of 33 tests in 3 suites. lint:css and lint:package-json pass. lint:js (run outside the home directory): 0 errors, 6 warnings as on main.
  • webpack.blocks.config.js loads with webpack-dev-server 6.1.0.
  • No open Dependabot alert matches an installed version any more. npm audit: 0 critical, 0 high.

Bumps @wordpress/env to 12.1.0, which moves simple-git to v4 and clears
the two critical Dependabot alerts (simple-git and its argv parser) and
the minimatch one, and refreshes package-lock.json within the declared
ranges, which also clears npm audit's high findings in body-parser,
zod, chromium-bidi and puppeteer-core.

wp-env 12's only breaking change is a Node 22.13 floor, which the
engines range already meets. The two import/no-extraneous-dependencies
lint errors for @rtcamp/tailwind-config are already on main.
The refreshed schema-utils has a webpack ^5.112.0 peer, so with webpack
pinned at 5.111.1 npm 10 (the version CI's Node 22 ships) wanted nested
webpack copies the npm 11 lockfile didn't have, and npm ci failed.
Pinning webpack 5.112.2 keeps one copy; the lockfile is now written by
npm 10 and installs cleanly with npm 10 and 11.

A dependency change makes CI lint the whole project, which surfaced
two import/no-extraneous-dependencies errors already on main for
@rtcamp/tailwind-config. It is optional, installed by the tailwind init
feature, and webpack.config.js already guards it with try/catch, so
both imports get a scoped disable with the reason.
@wordpress/env 12 pulls in @php-wasm/* and @wp-playground/* 3.1.62,
which need Node 24.18+ and npm 11.16+, so every install on the pinned
Node 22.23.4 printed 21 EBADENGINE warnings (and fails with
engine-strict). Going back to @wordpress/env 11.16 isn't an option: it
still uses simple-git 3, so the critical alert would stay open.

Pin Node 24.22.1 (npm 11.19.1) in .nvmrc, set engines to
^24.22.1 || >=26.12.1, update the docs, and write package-lock.json
with npm 11 again. The only EBADENGINE warning left is the project
itself on Node older than the floor.

Also drops the two import/no-extraneous-dependencies suppressions for
@rtcamp/tailwind-config: ESLint only flagged those imports where a
parent folder's node_modules happened to contain the package. On a
clean checkout, and in CI, the import doesn't resolve and isn't
reported, so the disables were unused.
Moves @wordpress/scripts 36.0.0 to 37.0.0, @wordpress/babel-preset-default
8.56.0 to 10.0.0, @wordpress/browserslist-config 6.56.0 to 7.0.0 and
@wordpress/interactivity 6.56.0 to 8.0.0.

Breaking changes checked: scripts 37 bundles webpack-dev-server 6, and
webpack.blocks.config.js only deletes the default proxy and sets port and
allowedHosts, none of which v6 removed. Interactivity 7 drops
data-wp-ignore, two-hyphen unique IDs and negated function calls; the
theme uses none of them. The rest raise the Node floor to 22.13, which
the Node 24 floor already meets.

@wordpress/eslint-plugin stays on 27: @rtcamp/eslint-config 1.2.0 accepts
only ^25 to ^27 as a peer. wp-scripts 37 keeps its own nested 28.
The overrides pinned the very versions Dependabot now 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, since wp-scripts 37 still asks
for markdownlint-cli 0.49.

The webpack-dev-server 5.2.6 override goes: wp-scripts 37 needs
webpack-dev-server 6, which also drops sockjs, so the sockjs uuid
override goes too. package-lock.json is resolved without user-level npm
settings, as CI resolves it.
@aryanjasala
aryanjasala changed the base branch from fix/deps-security-refresh to main November 9, 2026 19:32
…ts-37

# Conflicts:
#	package-lock.json
#	package.json

@Adi-ty Adi-ty left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved. Please correct the stale dev-server docs and comments in docs/hmr.md and webpack.blocks.config.js.

Hold #843 (#843), which upgrades @wordpress/eslint-plugin to 28.1.0, until eslint-config 2.0.0 from wp-tooling #94 (rtCamp/wp-tooling#94) is published and adopted here; the current config doesn’t support plugin 28.

@aryanjasala
aryanjasala merged commit 3aa32b9 into main Nov 10, 2026
16 checks passed
aryanjasala added a commit that referenced this pull request Nov 10, 2026
* docs: bring the block dev-server notes in line with webpack-dev-server 6

* docs: drop the task and epic templates from the init cleanup notes
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.

2 participants