Releases: wpbones/WPBones
Release list
v2.0.3
🐛 Patch release — follow-ups to v2.0.2 CLI messaging
Three small issues surfaced while Copilot reviewed the v2.0.2 boilerplate rollout. All patched here.
Fixes
- Post-migration hint was impossible advice.
migrate:to-v2ends with a line for non-yarn users about "deleting your lockfile", but the migrator had already deletedpackage-lock.json/pnpm-lock.yamlearlier in the same run. The line now reads "Your previous lockfile was removed during migration. To switch to yarn, runyarn installinstead of step 1." php bones --versionwas reporting2.0.0. TheWPBONES_COMMAND_LINE_VERSIONconstant had drifted since before v2.0.0 and never been bumped across v2.0.1 / v2.0.2. Now returns2.0.3.- Style consistency in
detectProjectPackageManager()— rewritten with multi-line bracedifblocks to match the rest ofbones. No functional change.
See #79 for the full diff.
Upgrading
composer update wpbones/wpbonesIf you already ran composer update for v2.0.2, rerun it to pick up v2.0.3.
Full changelog
v2.0.2
📦 Patch release — package-manager-aware CLI + docs clarifications
This release responds to community feedback around inconsistent npm / yarn suggestions in the v2 tooling. The v2 boilerplates remain yarn-first (they ship yarn.lock), but there is no technical lock-in on yarn — package.json has no packageManager / engines / resolutions fields, and every script is wp-scripts <verb> which behaves identically with npm, yarn or pnpm.
v2.0.2 makes that explicit in both the CLI and the docs.
✨ CLI now detects your package manager
make:app and migrate:to-v2 used to print hardcoded yarn hints ("Run yarn dev", "1. yarn install / 2. yarn build"), which confused developers on npm or pnpm. Two small helpers — detectProjectPackageManager() and packageManagerCommand() — inspect the plugin root lockfile and format the right command.
make:app→ now printsyarn dev/pnpm dev/npm run devbased on the lockfile currently present in your plugin.migrate:to-v2→ detects your PM before deletingpackage-lock.json/pnpm-lock.yaml, then prints matching "Next steps" commands plus a hint for switching to yarn if you want to.- Fallback when no lockfile is present:
yarn(yarn-first default).
See #78 for the full change.
🐛 migrate:to-v2 also cleans up pnpm-lock.yaml
Previously the migrator removed only package-lock.json, leaving pnpm users with a stale lockfile. Now pnpm-lock.yaml is deleted alongside, matching the exclude list that bones deploy already had. Thanks to @balazsnasz for the fix in #74.
📝 Docblock alignment
The migrate:to-v2 method docblock now matches the actual behaviour (lockfile removal is PM-agnostic, PM-aware Next steps). See #75.
🙈 .gitignore
POST.md (generated locally by the announcement skill) is now ignored. See #76.
Upgrading
composer update wpbones/wpbonesThe post-autoload hook will refresh your ./bones automatically. No action required for existing plugins.
Docs
The matching docs update lands in website-docs#36 — including a new "Using npm or pnpm instead of yarn" section with the full yarn-first rationale.
Full changelog
v2.0.1
🐛 Patch release
Fixes a regression found while testing the v2.0.0 Mantine boilerplate where inline/localize scripts attached via withInlineScript() / withLocalizeScript() to a handle registered through withAdminAppsScript() were silently dropped by WordPress. The asset managers now route correctly based on where the handle was registered, and AssetEnqueuer no longer early-exits when only inline/localize payloads are present.
Details
- Before:
withInlineScript('my-app', ...)was always sent toadminAssets, sowp_add_inline_script()ran beforeAdminAppsAssetEnqueuerregistered the script — WordPress silently dropped the inline script. Any nonce/config globals came through asundefined. - After:
withInlineScript()andwithLocalizeScript()now checkadminAppsAssetsfirst and route there when the handle matches.
See #73 for the full diff.
v2.0.0 — the webpack release
Breaking changes
- Gulp is gone. Default
gulpfile.jstemplate removed.withInlineScript/withAdmin*stop double-enqueuing via legacy arrays. - Package manager: yarn across the board.
- Minimum PHP ≥ 8.1 (reaffirmed from v1.11).
New
- ✨
php bones make:app <name>— scaffold a React/TS app inresources/assets/apps/, with a reserved-WordPress-handle denylist - ✨
php bones migrate:to-v2— automated migrator converts v1.x (gulp + run-s) to v2 (webpack + unified yarn scripts) - ✨ New stubs:
app.stub,webpack-config.stub,tsconfig.stub,prettierrc.stub,jest-config.stub
Fixed
- 🐛
View::withInlineScriptdouble-emitted inline JavaScript (new AssetEnqueuer + legacy array), causingIdentifier has already been declarederrors
Upgrade path
```sh
php bones migrate:to-v2
yarn install && yarn build
```
Full guide: https://wpbones.com/docs/migrating-to-v2
Full Changelog: v1.11.1...v2.0.0
v1.11.1
Bug Fixes
- 🐛 Skip
loadKernel()forrenamecommand on bootstrap — fixes fatalClass not foundwhen runningcomposer updateon a plugin whose namespace was previously renamed (#68) - 🐛 Prevent
str_repeat()ValueError inKernel::displayHelp()when a custom command name is 24+ characters —php bones --helpno longer crashes (#69)
Chore
- 🙈 Fix typo in
.gitignore:/nodes_modules→/node_modules(#70)
Contributors
Thanks to @dansleboby for #68 and #69.
Full Changelog: v1.11.0...v1.11.1
v1.11.0
What's Changed
- Fix $ver default from [] to false to match WordPress signatures.
- Add $media parameter to style methods and $args parameter to script methods to allow full control as with native WordPress enqueue calls.
- Align View enqueue methods with WordPress wp_enqueue_style/wp_enqueue_script signatures by @dansleboby in #65
- 🚀 feat: Add asset manager and enqueuer classes for admin and frontend by @gfazioli in #66
Full Changelog: v1.10.0...v1.11.0
v1.10.0
What's Changed
- ⚡ 🐛 Fix kernel loading in
php bonescommand - Ensure the command boots the correct kernel during execution to prevent initialization errors and allow the application to run as expected. - ✨ Introduce support for using custom command with or without WordPress loaded
- ✨ Introduce minor cosmetic formatting improvements
Full Changelog: 1.9.6...v1.10.0
v1.9.6
- ✨ Fixes missing route load acction for custom route
- → Fixes wrong version number in the bones command
Full Changelog: 1.9.5...v1.9.6
1.9.5
What's Changed
- Allow controls of priority/timing of add_actions in init by @dansleboby in #62
Full Changelog: 1.9.4...1.9.5
1.9.4
- ✨ Adds
--create-zipin thephp bones deploycommand
Full Changelog: 1.9.3...1.9.4