Skip to content

Releases: wpbones/WPBones

v2.0.3

Choose a tag to compare

@gfazioli gfazioli released this 21 Apr 13:59
e745719

🐛 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-v2 ends with a line for non-yarn users about "deleting your lockfile", but the migrator had already deleted package-lock.json / pnpm-lock.yaml earlier in the same run. The line now reads "Your previous lockfile was removed during migration. To switch to yarn, run yarn install instead of step 1."
  • php bones --version was reporting 2.0.0. The WPBONES_COMMAND_LINE_VERSION constant had drifted since before v2.0.0 and never been bumped across v2.0.1 / v2.0.2. Now returns 2.0.3.
  • Style consistency in detectProjectPackageManager() — rewritten with multi-line braced if blocks to match the rest of bones. No functional change.

See #79 for the full diff.

Upgrading

composer update wpbones/wpbones

If you already ran composer update for v2.0.2, rerun it to pick up v2.0.3.

Full changelog

v2.0.2...v2.0.3

v2.0.2

Choose a tag to compare

@gfazioli gfazioli released this 21 Apr 11:51
f149adb

📦 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 yarnpackage.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 prints yarn dev / pnpm dev / npm run dev based on the lockfile currently present in your plugin.
  • migrate:to-v2 → detects your PM before deleting package-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/wpbones

The 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...v2.0.2

v2.0.1

Choose a tag to compare

@gfazioli gfazioli released this 20 Apr 07:49
8821e66

🐛 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 to adminAssets, so wp_add_inline_script() ran before AdminAppsAssetEnqueuer registered the script — WordPress silently dropped the inline script. Any nonce/config globals came through as undefined.
  • After: withInlineScript() and withLocalizeScript() now check adminAppsAssets first and route there when the handle matches.

See #73 for the full diff.

v2.0.0 — the webpack release

Choose a tag to compare

@gfazioli gfazioli released this 19 Apr 16:12
ac74550

Breaking changes

  • Gulp is gone. Default gulpfile.js template 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 in resources/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::withInlineScript double-emitted inline JavaScript (new AssetEnqueuer + legacy array), causing Identifier has already been declared errors

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

Choose a tag to compare

@gfazioli gfazioli released this 18 Apr 13:55
0f20ae2

Bug Fixes

  • 🐛 Skip loadKernel() for rename command on bootstrap — fixes fatal Class not found when running composer update on a plugin whose namespace was previously renamed (#68)
  • 🐛 Prevent str_repeat() ValueError in Kernel::displayHelp() when a custom command name is 24+ characters — php bones --help no 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

Choose a tag to compare

@gfazioli gfazioli released this 11 Feb 09:34

What's Changed

@dansleboby

  • 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

Choose a tag to compare

@gfazioli gfazioli released this 10 Nov 17:12

What's Changed

  • ⚡ 🐛 Fix kernel loading in php bones command - 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

Choose a tag to compare

@gfazioli gfazioli released this 27 May 06:00
  • ✨ 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

Choose a tag to compare

@gfazioli gfazioli released this 15 May 10:36

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

Choose a tag to compare

@gfazioli gfazioli released this 16 Apr 07:41
  • ✨ Adds --create-zip in the php bones deploy command

Full Changelog: 1.9.3...1.9.4