Skip to content

Bump @wordpress/scripts and @wordpress/prettier-config#168

Open
galatanovidiu wants to merge 1 commit intotrunkfrom
update/bump-dev-dependencies
Open

Bump @wordpress/scripts and @wordpress/prettier-config#168
galatanovidiu wants to merge 1 commit intotrunkfrom
update/bump-dev-dependencies

Conversation

@galatanovidiu
Copy link
Copy Markdown
Contributor

@galatanovidiu galatanovidiu commented Apr 9, 2026

Summary

  • Bump @wordpress/scripts from 30.x to 31.8.0
  • Bump @wordpress/prettier-config from 4.29 to 4.43.0

The @wordpress/env 11.3.0 bump originally included here has been deferred to a dedicated follow-up PR that will also migrate .wp-env.json to the split-config pattern Gutenberg adopted in wp-env 11.0 (see review discussion below).

Test plan

  • npm run lint:js passes with new prettier-config
  • npm run format produces no unexpected churn
  • npm run test:php still works (lockfile regen verified)

Copilot AI review requested due to automatic review settings April 9, 2026 08:33
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 9, 2026

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: galatanovidiu <ovidiu-galatan@git.wordpress.org>
Co-authored-by: justlevine <justlevine@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates WordPress tooling dev dependencies and modifies the distribution zip workflow to generate a production-only archive by temporarily installing Composer dependencies without dev packages.

Changes:

  • Bump @wordpress/env to ^11.3.0, @wordpress/scripts to ^31.8.0, and @wordpress/prettier-config to ^4.43.0.
  • Update plugin-zip to run composer install --no-dev --optimize-autoloader before zipping and then re-install dev dependencies afterward.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread package.json Outdated
"scripts": {
"build": "wp-env run tests-cli --env-cwd=wp-content/plugins/$(basename \"$(pwd)\")/ composer install --no-dev --optimize-autoloader",
"plugin-zip": "wp-scripts plugin-zip",
"plugin-zip": "composer install --no-dev --optimize-autoloader && wp-scripts plugin-zip && composer install",
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

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

plugin-zip uses && ... && composer install, so if wp-scripts plugin-zip fails (or the process is interrupted), dev dependencies won’t be restored and the working copy is left in a --no-dev state. Consider wrapping this in a cleanup that always runs (e.g., a shell trap on EXIT) so composer install is executed even on failures.

Suggested change
"plugin-zip": "composer install --no-dev --optimize-autoloader && wp-scripts plugin-zip && composer install",
"plugin-zip": "sh -c 'trap '\\''status=$?; composer install; exit $status'\\'' EXIT; composer install --no-dev --optimize-autoloader && wp-scripts plugin-zip'",

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor

@justlevine justlevine Apr 9, 2026

Choose a reason for hiding this comment

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

I'm generally against this change. We're already doing this in build. Why pollute our other scripts with cross concerns?

If you think this projects justifies a npm run install-composer-deps-and-zip-without-building-first script, then add that.

@justlevine
Copy link
Copy Markdown
Contributor

@wordpress/env from 10.x to 11.3.0

If we're updating to env 11.3, we should split the test configs at the same time, or explicitly set testsEnvironment: true in our group-one.

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.25%. Comparing base (8d0f1ef) to head (24249f5).
⚠️ Report is 3 commits behind head on trunk.

Additional details and impacted files
@@            Coverage Diff            @@
##              trunk     #168   +/-   ##
=========================================
  Coverage     88.25%   88.25%           
  Complexity     1243     1243           
=========================================
  Files            54       54           
  Lines          4035     4035           
=========================================
  Hits           3561     3561           
  Misses          474      474           
Flag Coverage Δ
unit 88.25% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@galatanovidiu galatanovidiu force-pushed the update/bump-dev-dependencies branch from 05f2f5b to 44ae6d9 Compare April 14, 2026 12:32
- @wordpress/scripts ^30.22.0 → ^31.8.0
- @wordpress/prettier-config ^4.29.0 → ^4.43.0
@galatanovidiu galatanovidiu force-pushed the update/bump-dev-dependencies branch from 44ae6d9 to 24249f5 Compare April 14, 2026 12:39
@galatanovidiu galatanovidiu changed the title Bump dev dependencies and improve plugin-zip script Bump @wordpress/scripts and @wordpress/prettier-config Apr 14, 2026
@galatanovidiu
Copy link
Copy Markdown
Contributor Author

@justlevine I checked this and the current config still works in 11.3.0, testsEnvironment defaults to true, and tests-* containers still spin up. But you're right, the deprecation warning fires every wp-env start, and explicit true doesn't silence it.

Plan: narrow this PR to just the wp-scripts + prettier-config bumps, then open a focused follow-up for wp-env 11.3 + the split-config migration (.wp-env.json + .wp-env.tests.json, Gutenberg's shape). Cool?

@justlevine
Copy link
Copy Markdown
Contributor

oh thought itd suppress the error. if requires more than a one-line true change for now then yeah I'd definitely punt from this PR into its own.

If you need, here's some prior art I generated, https://github.com/rtCamp/plugin-skeleton-d was going to use it to inform the PR to the AI repo if nobody beat me to it or a better one didn't emerge elsewhere. E.g. we might not need as much verbosity on an IRL plugin and just pass the port as an env var

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.

3 participants