The bones CLI gets sturdier: it runs from any folder, renames only what it has to, updates the framework without removing it first, and the commands it generates behave as their names say.
bones
- Runs from any folder. Up to 2.0.12 bones read the plugin's
namespacefile,readme.txtand its stubs against the shell's directory, sophp my-plugin/bones <anything>stopped with a TypeError. It now moves into the plugin first, and custom commands find WordPress from there too. A relativedeploypath still means the folder it was typed in, and a plugin symlinked intowp-content/pluginsstill finds WordPress (#117). renamewrites only what changes. It used to rewrite every file of the plugin and corrupt compiled.mocatalogues: a longer plugin id shifts their strings while the offset table stays put. Files with a NUL byte are now left alone.rename --update, which Composer runs after every install, now renamesvendor/only: in a renamed plugin with anindex.phpin its root, it used to move that file over the main plugin file. The language files are renamed by the rename itself,--resetincluded, andDomain Path: /languages(with the slash) is found.updateno longer deletes the framework first. It removedvendor/wpbones/wpbonesand then ran a fullcomposer update, so a failing Composer left the plugin with no framework. It now runscomposer update wpbones/wpbones --with-dependencies, the framework and what it needs, and exits with Composer's status. For every package, runcomposer update.- The migrated
format:checkchecks.wp-scripts formatdrops--checkand always writes, so the "check" reformatted the plugin, compiled bundles included, and exited 0.migrate:to-v2now writesprettier --checkon the same files, a.prettierignore(public/,vendor/, Composer's files, the translation JSON) so thatformatleaves the bundles alone too, andprettieraswp-prettier, which pnpm 12 needs to find the binary. - Every generated widget is its own.
make:widgetgave every widget of a plugin theid_base<plugin-id>-demo-widget, so a second widget shared the first one's settings, and the description sat under a misspelled key.make:widget Shop/RecentPostsnow writes<plugin-id>-shop-recent-posts, a name and a description.
The boilerplates carry the new format:check, and their sources pass it.
Upgrading
composer update wpbones/wpbones. One behaviour to know: php bones update updates the framework and its dependencies, not every package of the plugin. Plugins migrated before 2.1.0 still have "format:check": "wp-scripts format --check": replace it as described in package.json.
Full Changelog: v2.0.12...v2.1.0