Repository navigation
Conversation
Bump transitive dependencies within their existing ranges: - lodash 4.17.21 -> 4.18.1 (GHSA-r5fr-rjxr-66jc, high), via @wordpress/data - proxy-addr 2.0.7 -> 2.0.8 (GHSA-jqcg-44mw-7w3h, critical), via express - shell-quote 1.8.3 -> 1.12.0 (GHSA-w7jw-789q-3m8p, critical), via launch-editor - websocket-driver 0.7.4 -> 0.7.5 (GHSA-xv26-6w52-cph6, critical), via sockjs None of them end up in the built plugin: lodash is only reached through @wordpress/data, which the build externalises. Lockfile-only change.
|
This is linked to GitHub issue #604. |
Test the buildWordPress Playground - runs in your browser
ℹ️ Neither can connect to Square: signing in to Square has to send you back to the site, and a site that runs in your browser tab has no public address to come back to. Without a connection the store cannot take payments, sync products or receive webhooks, so the previews show what a merchant sees before connecting. Do not enter Square access tokens or other credentials in a preview. The links stop working 14 days after the last build. Build info:
Note: the build is updated when a new commit is pushed to this PR. |
✅ WordPress Plugin Check Report
📊 ReportAll checks passed! No errors or warnings found. 🤖 Generated by WordPress Plugin Check Action • Learn more about Plugin Check |
@wordpress/env 10 pins simple-git 3.x, and every simple-git 3.x release is affected by GHSA-r275-fr43-pm7q and GHSA-x6jw-m9v5-85vh (critical). simple-git 4 is not callable the way wp-env 10 requires it, so the only fix is the wp-env major. wp-env 12 also drops extract-zip 1.x and the old tmp from its own tree. wp-env 12 requires Node >= 22.13, so move .nvmrc to 22.23.5 and engines.node to >=22.13.0. Every workflow reads the Node version from .nvmrc, so CI follows. wp-env 12 pulls isomorphic-git 1.37.6 through @wp-playground/storage; a scoped override holds it at ~1.38.10, the patched line. Side effects in the lockfile: express 4.22.2, body-parser 1.20.9 and qs 6.16.2 move up because @wp-playground/cli requires them, and js-yaml 3.14.1 -> 3.15.2. The built plugin zip is byte-identical to trunk built with Node 20, apart from the .pot creation date and the commit hash in vendor/composer/installed.php. Refs #604
Dependabot still reported critical and high advisories in dev dependencies after the wp-env upgrade. Move each one to a patched release: - In-range lockfile bumps: axios 1.11.0 -> 1.21.1, node-forge 1.3.1 -> 1.4.4, fast-uri 3.0.6 -> 3.1.9, js-yaml 4.1.0 -> 4.3.2, svgo 2.8.0 -> 2.8.4, immutable 5.1.3 -> 5.2.1, glob 10.5.0 / 11.1.0, minimatch 3.1.5 / 9.0.9 / 10.2.6, brace-expansion 1.1.22 / 2.1.8, tar-fs 2.1.6, ws 8.23.0, tmp 0.2.7 (external-editor is replaced by @inquirer/external-editor), browserslist 4.29.6, @babel/plugin-transform-modules-systemjs 7.29.15, compression 1.8.2, flatted 3.4.4, form-data 4.0.6, launch-editor 2.14.2, nanoid 3.3.20, source-map-js 1.2.4, webpack-dev-middleware 7.4.6. - postcss 8.5.6 -> 8.5.23. Held below 8.5.24, which starts writing a UTF-8 BOM into built CSS. - Overrides: axios for wait-on under @wordpress/scripts moves from ^0.30.0 to ^0.34.0; adm-zip ^0.6.1 under @wordpress/scripts; minimatch ^3.1.3 under markdownlint-cli; serialize-javascript ^7.0.3, used by copy-webpack-plugin and terser-webpack-plugin. Left open: extract-zip (no patched release, comes in through puppeteer-core 13), and linkify-it / markdown-it, which markdownlint-cli pins to markdown-it 12. Both need a @wordpress/scripts major. The build/ output is byte-identical to trunk built with Node 20. Refs #604
The Woo dependency extraction plugin (3.x) builds on @wordpress/dependency-extraction-webpack-plugin 3.7, which predates the react-jsx-runtime script handle. Any module compiled with the automatic JSX runtime therefore gets react/jsx-runtime bundled from whatever React sits in node_modules. Today that already happens for onboarding.js and settings.js through the @wordpress/icons and @wordpress/components code they import. That works only while the bundled runtime matches the React that WordPress loads. Once @wordpress/scripts compiles our own JSX with the automatic runtime and node_modules hoists React 19, the bundles create React 19 elements that WordPress' React 18 refuses to render. Map react/jsx-runtime to the ReactJSXRuntime global and the react-jsx-runtime handle, the same mapping newer @wordpress/dependency-extraction-webpack-plugin releases ship by default. WordPress registers that script since 6.6; the plugin requires 6.9. Refs #604
The security overrides on this branch force patched versions of adm-zip, axios (wait-on) and minimatch (markdownlint-cli) under @wordpress/scripts 24. Newer @wordpress/scripts releases carry those fixes themselves: 34 drops jest-dev-server, wait-on and axios 0.x, 35 moves to adm-zip ^0.6.1 and @wordpress/e2e-test-utils-playwright 2 (no proxy-agent, get-uri or basic-ftp), 36 moves to markdownlint-cli 0.49. 37 also brings webpack-dev-server 6 and drops puppeteer-core 13 with its extract-zip, which had no patched release. @wordpress/scripts 34+ declares a peer on React 18 or 19, and the runtime dependency @wordpress/data 7 peers on React 17, so npm cannot resolve both. Move @wordpress/data to ^10.27.0, the line that matches the @wordpress/icons and @wordpress/i18n versions already in use. The build externalizes @wordpress/data to the wp-data script, so the bump does not change what ships. Node 22.23.5 from .nvmrc already satisfies the new engines range (^22.22.2). Refs #604
@wordpress/scripts 37 runs ESLint 10, which no longer reads .eslintrc.js or .eslintignore. Without a flat config, lint-js falls back to the wp-scripts defaults and ignores the project rules. Move the project config to eslint.config.mjs, built on @woocommerce/eslint-plugin 4.1 (the first release with flat configs and ESLint 10 support). The globals, settings, rule overrides and ignore list carry over. The ignore patterns keep their gitignore meaning (any directory named js, build, ...), so lint still covers the same 74 files in src/. The webpack config keeps CommonJS; the old config allowed require() in .js files through @typescript-eslint/no-var-requires, which typescript-eslint 8 renamed to no-require-imports. Swap the config file names in .gitattributes and the Plugin Check exclude list. Refs #604
@wordpress/scripts 37 brings patched versions on its own: - adm-zip ^0.6.1 directly. - axios: wait-on and jest-dev-server are gone; nothing under @wordpress/scripts requires axios 0.x any more. - markdownlint-cli 0.49 resolves minimatch 10.2.6, markdown-it 14.3.3 and linkify-it 5.0.2 instead of minimatch 3, markdown-it 12 and linkify-it 3. Also drop the webpack-dev-server ^5.2.1 override. @wordpress/scripts 37 requires webpack-dev-server ^6, and the override was holding it at 5.2.2. Version 6.1.0 also moves selfsigned to 5, which no longer depends on node-forge. Kept: isomorphic-git (@wp-playground/storage 3.1.66 still pins 1.37.6) and serialize-javascript (@wordpress/scripts 37 still ships copy-webpack-plugin 10 and terser-webpack-plugin 5.3, which require serialize-javascript ^6). Refs #604
copy-webpack-plugin 14 depends on serialize-javascript ^7.0.3, the patched line, so the direct dependency no longer relies on the serialize-javascript override. The override stays for the copy-webpack-plugin 10 and terser-webpack-plugin 5.3 that @wordpress/scripts 37 still ships. Version 14 requires Node >= 20.9, which .nvmrc already exceeds. The copied images in build/images are unchanged. Refs #604
Three E2E helpers import node-fetch, but package.json never listed it. It resolved only because @wordpress/scripts 24 hoisted node-fetch 2.6.7 into node_modules. @wordpress/scripts 37 no longer brings it, so every E2E suite failed with "Cannot find module 'node-fetch'". Declare node-fetch ^2.7.0. Version 2 keeps the CommonJS default export the helpers import; version 3 is ESM only. Refs #604
|
Re-ran this against today's
The JS and CSS bundles are byte-identical to the build behind the screenshots in the description, so those still apply. The lint increase is the one the description already explains. Same results as the description. |
All Submissions:
Changes proposed in this Pull Request:
This PR closes all 87 open critical and high Dependabot alerts, including all 5 critical ones. Every change is in dev tooling and build config.
The simple-git alerts need
@wordpress/env12, and wp-env 12 needs Node 22.13 or later. So this PR moves.nvmrcto22.23.5andengines.nodeto>=22.13.0. Every workflow reads.nvmrc, so CI moves too.@wordpress/scriptsgoes from 24 to 37.2.0. That release brings patchedadm-zip,markdownlint-cli(minimatch, markdown-it, linkify-it) andwebpack-dev-server6 on its own, and dropspuppeteer-core13 with its unpatchedextract-zip. The overrides that patched those inside the old tree are gone. The upgrade needs four follow-ups:@wordpress/data7 peers on React 17 and wp-scripts 37 peers on React 18 or 19, so@wordpress/datamoves to^10.27.0. The build externalizes it towp-data, so nothing ships from it..eslintrc.js. The config moves toeslint.config.mjson@woocommerce/eslint-plugin4.1, with the same rules, globals and ignores.react/jsx-runtimeto WordPress'react-jsx-runtimescript instead of bundling it. Without that, the bundles would carry React 19's runtime, which WordPress' React 18 cannot render.node-fetchwithout declaring it. wp-scripts 24 used to hoist it, so it is now a devDependency.copy-webpack-pluginmoves to 14, which depends on the patchedserialize-javascript7.Overrides: removed
adm-zipandaxiosunder@wordpress/scripts,minimatchundermarkdownlint-cli, and the oldwebpack-dev-server^5.2.1(wp-scripts 37 requires^6). Kept:isomorphic-git~1.38.10under@wp-playground/storage(3.1.66 still pins 1.37.6), andserialize-javascript^7.0.3, because wp-scripts 37 still shipscopy-webpack-plugin10 andterser-webpack-plugin5.3.Left open: none of the critical or high alerts. 9 moderate and low alerts stay (minimatch 9/10, qs, postcss-selector-parser,
@babel/core, uuid, picomatch).Lint: the new config reports problems that ESLint 8 with
@woocommerce/eslint-plugin2.3 did not.npm run lint:jsonsrc/goes from 0 to 11 errors and 43 warnings:prettier/prettier6,@typescript-eslint/no-unused-vars3,import/order1, one inline disable of the removed@woocommerce/dependency-grouprule, 27import/no-unresolvedwarnings for externalized@wordpress/*packages, and 16 unusedeslint-disablewarnings. This PR does not touchsrc/. The ESLint workflow only lints changed.jsfiles, and it passes.Contributors need Node 22.13 or later (wp-scripts 37: 22.22.2 or later). Some
@woocommerce/*and@php-wasm/*dev packages printEBADENGINEwarnings. They are only warnings: the repo has noengine-strict.Steps to test the changes in this Pull Request:
Tested against
trunkwith the same steps on both sides.trunkused Node 20 with wp-env 10. This branch used Node 22.23.5 with wp-env 12.npm cinpm auditcritical / highnpm run buildrelease zip*-rtl.cssfiles. 9 JS and CSS bundles and all 16.asset.phpfiles differ (webpack 5.113, terser and cssnano output). Bundles now listreact-jsx-runtimeinstead ofreactwhere they use JSX. No React 19 code in any bundlenpm run lint:jswp-env start+postenv:startreact-jsx-runtime. No console errors, nodebug.loglinestests-wordpress(PHP 8.3)The 2 remaining
npm audithighs arepath-to-regexpandpicomatch, which have no high or critical Dependabot alert here.Screenshots
Each image is
trunk| this PR | pixel diff: onboarding, the Square and Credit Card settings pages, block checkout at 1440 and 390, and a product page at 390. Square ran in sandbox mode with placeholder credentials, so Square's payment SDK leaves the card fields and wallet buttons empty on both sides. All six pairs have 0 differing pixels, with the same console output on both sides and an emptydebug.log. None of the new*-rtl.cssfiles is enqueued, because the plugin registers its styles without RTL data, so no RTL screen is shown.Changelog entry
Closes #604