feat(init): add generic editJson + deferred note primitives - #54
Open
Adi-ty wants to merge 3 commits into
Open
Conversation
Adi-ty
force-pushed
the
v1.0.0/task/init-list-json-contract
branch
from
August 11, 2026 12:03
65a9dd4 to
965928c
Compare
Adi-ty
force-pushed
the
v1.0.0/task/dev-tools-init-feature
branch
from
August 11, 2026 12:05
56634de to
d0f5d24
Compare
Adi-ty
marked this pull request as ready for review
August 11, 2026 12:08
Adi-ty
force-pushed
the
v1.0.0/task/init-list-json-contract
branch
from
August 27, 2026 12:09
d344a22 to
0dd4158
Compare
- Generalise editPackageJson into a journaled editJson(rel, mutator, opts) that preserves indentation, supports create/indentFrom, and names the file in parse errors; editPackageJson is now a thin wrapper - Add api.note() to defer "next steps" past the spinner; toggleFeatures flushes them once under a "Next steps" heading, draining the queue so a manage-mode toggle loop never reprints - Narrow touchesPackage to deps only; a scripts-only feature no longer suggests `npm install` - Add features.test.js covering editJson, note rollback/flush, the npm install hint, and an enable/disable/detect round trip
Lets a consumer unit-test its own scaffold config's feature hooks against the real api; the exports map has no wildcard, so a deep import is not possible.
Adi-ty
force-pushed
the
v1.0.0/task/dev-tools-init-feature
branch
from
August 27, 2026 12:59
7f6e50b to
7bf4b18
Compare
Swanand01
reviewed
Aug 27, 2026
There was a problem hiding this comment.
Pull request overview
Adds generic JSON editing and deferred next-step reporting to the feature kernel.
Changes:
- Adds journaled
editJsonand deferrednoteAPIs. - Limits npm-install hints to dependency changes.
- Adds feature lifecycle and rollback tests.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/init/features.js |
Implements editing, notes, rollback, and hint behavior. |
src/init/index.js |
Exports the feature API constructor. |
tests/init/features.test.js |
Tests the new feature-kernel behavior. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Swanand01
approved these changes
Aug 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does
Extends wp-tooling's feature kernel with the editing and reporting primitives wp-devtools needs, effort: a generic journaled editJson for managing both halves of a feature's state, a deferred "next steps" channel consumed by the dev-tools init feature, and a corrected npm install hint.
Part of
Changes
How I verified
$ npm run lint (clean — zero errors) $ npm test Test Suites: 53 passed, 53 total Tests: 749 passed, 749 totalAcceptance criteria
Runtime behavior
Code quality