Repository navigation
fix: write JSON in the repository's own format - #169
Merged
Merged
Conversation
🦋 Changeset detectedLatest commit: 32d8ec6 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
unional
force-pushed
the
up-164-json-format
branch
6 times, most recently
from
October 11, 2026 08:50
0427f42 to
055dc48
Compare
plugin build, plugin version and publish sync-version now keep the existing file's indentation, line ending and trailing newline, and copy the original text of every value they leave unchanged, so a formatter's collapsed arrays survive a rebuild or sync. A new file, or one with no indentation to read, takes the indentation .editorconfig sets for it. Refs #164 (item 4) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
unional
force-pushed
the
up-164-json-format
branch
from
October 11, 2026 08:52
055dc48 to
32d8ec6
Compare
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.
Refs #164 (item 4)
What
plugin build,plugin versionandpublish sync-versionused to write every JSON file withJSON.stringify(value, null, indent). That expanded every array and always added a trailing newline, so a repository formatted by biome or prettier failedbiome ciafter each build or sync. They now write through one serializer,formatJsoninsrc/json.ts, which:.editorconfigsets for that path (newsrc/editorconfig/), then the previous default: the canonical manifest's indentation for derived files, a tab for authored filesThe writers covered: vendor manifests, derived hooks and mcp files, the Copilot namespace hooks file, refreshed catalogs, the
plugin.json/package.jsonwrites shared byplugin versionandsync-version, andplugin init'splugin.jsonandpackage.jsonwrites (including the changesetsversionscript wiring from #168).Spec
plugin/build: a new "Writes keep the repository's JSON format" use case and an "Output format" section inbuild.featureplugin/init: one sentence in the npm use caseplugin/version: a rationale paragraph and two scenarios, with matching edge-table rows and CLI testsNotes
This repo's
biome.jsonexcludes the derived*-plugin/plugin.jsonfiles because the old writer and the formatter kept flipping their array wrapping. That exclusion can probably go once this lands. I left it alone to keep this PR to item 4.🤖 Generated with Claude Code