Skip to content

v2.0.2

Choose a tag to compare

@gfazioli gfazioli released this 21 Apr 11:51
· 1 commit to master since this release
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 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 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