Four fixes, each with tests.
View
- The order of the fluent chain no longer matters.
withLocalizeScript(),withInlineScript()andwithInlineStyle()used to pick their asset manager the moment they were called, so describing a payload before declaring the app it belongs to sent it to the wrong manager.wp_localize_script()then ran before the matchingwp_enqueue_script()and WordPress discarded it without a word, leaving the JavaScript global undefined. The three methods now stage their arguments and a single resolver dispatches them from the admin hooks, when every handle is known. Fixes #81. (#94)
bones deploy
- A failed production build now stops the deploy. The build ran through
shell_exec(), which discards the exit status, so a broken build printed✅ Build completed, the deploy packaged whatever was already inpublic/and the command exited 0. It now reports the exit code with the tail of the build log and aborts. Fixes #83. (#95) - Files your repository ignores stay out of the package. The deploy asks the plugin's own git repository what it ignores and lists every path it leaves out — a local
POST.mdshipped to WordPress.org twice before this.vendor/,public/andstorage/are never consulted, because the repository's ignore rules do not describe them: most plugins gitignore all three and need all three at runtime.--keep-ignoredrestores the previous behaviour. Fixes #84. (#96)
bones version
package.jsonandpackage-lock.jsonare bumped too, and every file the command writes is listed. Previously it announcedVersion updated to X.Y.Zwhile both kept the old number. The dependency tree is untouched: everything from the first"node_modules/"key of the lockfile onwards is left exactly as npm wrote it. Fixes #85. (#97)
Upgrading
Drop-in for 2.0.x. Two commands behave differently on purpose: a deploy whose build fails now exits non-zero, and a deploy no longer packages ignored files unless you pass --keep-ignored. If you reordered a view chain to work around #81, you can leave it as it is — both orders work.
Full Changelog: v2.0.5...v2.0.6