Bump @wordpress/scripts and @wordpress/prettier-config#168
Bump @wordpress/scripts and @wordpress/prettier-config#168galatanovidiu wants to merge 1 commit intotrunkfrom
Conversation
|
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 If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
There was a problem hiding this comment.
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/envto^11.3.0,@wordpress/scriptsto^31.8.0, and@wordpress/prettier-configto^4.43.0. - Update
plugin-zipto runcomposer install --no-dev --optimize-autoloaderbefore zipping and then re-install dev dependencies afterward.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "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", |
There was a problem hiding this comment.
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.
| "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'", |
There was a problem hiding this comment.
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.
If we're updating to env 11.3, we should split the test configs at the same time, or explicitly set |
Codecov Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
05f2f5b to
44ae6d9
Compare
- @wordpress/scripts ^30.22.0 → ^31.8.0 - @wordpress/prettier-config ^4.29.0 → ^4.43.0
44ae6d9 to
24249f5
Compare
|
@justlevine I checked this and the current config still works in 11.3.0, Plan: narrow this PR to just the |
|
oh thought itd suppress the error. if requires more than a one-line 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 |
Summary
@wordpress/scriptsfrom 30.x to 31.8.0@wordpress/prettier-configfrom 4.29 to 4.43.0The
@wordpress/env11.3.0 bump originally included here has been deferred to a dedicated follow-up PR that will also migrate.wp-env.jsonto the split-config pattern Gutenberg adopted in wp-env 11.0 (see review discussion below).Test plan
npm run lint:jspasses with new prettier-confignpm run formatproduces no unexpected churnnpm run test:phpstill works (lockfile regen verified)