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.