chore(deps): move to @wordpress/scripts 34 and @wordpress/env 11 - #249
Merged
Conversation
Brings the build toolchain up to date and puts this repo on the same version as the rest of the plugins. Nothing here uses wp-scripts beyond `start` and `build`, so the breaking changes in 30-34 (stylelint config, lint-js extensions, eslint 10 with flat config, Playwright replacing Puppeteer in test-e2e, Jest 30) do not apply: linting is biome and stylelint, e2e runs from our own Playwright config, unit tests are PHPUnit. wp-env 11 defaults its port to auto-select, which does not reach us — nk-wp-env always passes WP_ENV_PORT and WP_ENV_TESTS_PORT explicitly. webpack.config.js switches from getWordPressSrcDirectory to getProjectSourcePath: the helper was renamed and the build failed with "getWordPressSrcDirectory is not a function". The rename is not in the upstream changelog. Both return the same relative source path, and the CopyWebpackPlugin pattern it feeds is a no-op here — no src/ directory, no block.json files, before or after.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Puts the build toolchain on the current major and brings all six plugin repos to the same version.
Nothing here uses
wp-scriptsbeyondstartandbuild, which is what makes this a small change rather than a migration. The breaking changes across 30–34 all land on commands this repo does not run:scss-stylistic.stylelintrc.jslint-jsalso lints.cjs/.mjs/.cts/.mtstest-e2emoved from Puppeteer to Playwright@wordpress/envgoes to 11 alongside it. Its one change that could have bitten us is theportdefault becoming auto-select, and it does not:nk-wp-envalways passesWP_ENV_PORTandWP_ENV_TESTS_PORTexplicitly. Pretty permalinks are now on by default in the test environment, which e2e will confirm.This does not reduce
npm audit. The earlier advice that these findings are "fixed via @wordpress/scripts@34.1.0" was wrong: on 34.1.0 the same chain is still flagged, and npm now suggests downgrading to 19.2.4 instead. What remains sits inside the toolchain's own tree and cannot be fixed from here. All of it is dev-only.Generated output under
build/is not committed here; the release build regenerates it.One source change comes with it.
webpack.config.jsimportedgetWordPressSrcDirectoryfrom@wordpress/scripts/utils, which the newer version renamed togetProjectSourcePath— the build died withTypeError: getWordPressSrcDirectory is not a functionbefore webpack started. The rename is not listed in the upstream changelog's breaking changes, so it only surfaced on the first build. Both helpers return the same relative source path, and theCopyWebpackPluginpattern it feeds has always been a no-op here: this repo has nosrc/directory and noblock.jsonfiles, before or after.