Repository navigation
fix(biome-plugin): format the biome.json it patches, and leave unchanged JSON byte-identical - #284
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EZVC7xzzsEmByszmfff4u2
…d Biome Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EZVC7xzzsEmByszmfff4u2
…ches Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EZVC7xzzsEmByszmfff4u2
🦋 Changeset detectedLatest commit: c4ac242 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 |
Contributor
Preview releaseLatest commit: Some packages have been released:
Note Use the PR number as tag to install any package. For instance: |
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.
Summary
When the project already has a
biome.json,rr plugins add biomepatches it with edit-json. The kernel's engine re-stringifies the whole file: 2-space indent and one array item per line. Biome's formatter rejects that, sorr jsc/rr checkfailed right after the add. dx#276 fixed the create path; this fixes the patch path.execFileSync), becauseedit-textis(source) => string. Widening it to accept a Promise would be a contract change, and an older kernel would write the Promise to disk. No other plugin spawns ininstall()today; ADR 017 records the choice.decisions/017-plugin-owned-format-of-patched-config.md(arch-critic): the plugin that owns a config file's tool formats what it patches. ADR 004 gets a pointer to it. The wider question, whether the kernel should format everythingrr plugins addwrites, is still open, and this doesn't close it.Evidence
Non-TTY e2e with the worktree's packed
@rrlab/cli+@rrlab/biome-plugin. Each project starts as a green Biome project (biome checkexits 0), then runsrr plugins add biome </dev/nullandrr plugins add ts </dev/null:rr jscrr checkpassesfiles.includesrr checkpassesadd biome --forcebiome init)The tab and 4-space rows still fail on files this PR doesn't own:
run-run.config.mtsis written by the kernel's config-ast with 2 spaces, andtsconfig.jsonby ts-plugin's edit-json. Both are tracked separately; an ADR amending 004 is coming.Regression guard: reverting only
json-edit.tsfails 5 tests (json-edit, file-ops, 2× plugins integration). Reverting only the biome-plugin step fails its new unit and integration tests.Merge Danger
Door: two-way
Blast Radius: small
🤖 Generated with Claude Code
https://claude.ai/code/session_01EZVC7xzzsEmByszmfff4u2