Repository navigation
fix: make rr plugins add work without a TTY and leave a project rr check passes - #276
Merged
Merged
Conversation
🦋 Changeset detectedLatest commit: c9903ab The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 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 |
rqbazan
force-pushed
the
chore/bump-tsgolint
branch
from
October 18, 2026 00:06
f7e2247 to
e1ced7f
Compare
…e-terminated magicast's imports.$add puts each new import first, so after `rr plugins add tsdown`, `ts` and `biome` the imports came in reverse, and recast dropped the final newline: `rr jsc` failed on the file rr had just written. Move each added import to its place in Biome's organizeImports order, without reordering the others, join the blank lines recast leaves between imports, and end the file with a newline. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Tj9MBgi2cQcRxSD9uikx6k
The scaffold came out of JSON.stringify, which puts the one-item `extends` array on three lines, so Biome's own format check failed. Its `$schema` was a 2.4.4 URL while the plugin installs `@biomejs/biome@^2.0.0`. Write it in Biome's format, and point `$schema` at the installed Biome's configuration_schema.json, which always matches its version. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Tj9MBgi2cQcRxSD9uikx6k
`rr lint` ran `oxlint --check`, which exits with "`--check` is not expected in this context" (1.66 and 1.88 alike), and `rr format --fix` ran `oxfmt --fix` where oxfmt writes with `--write`. dx only uses oxc for the type-check, so no test ran either. Run oxlint without a mode flag to check, and oxfmt with `--write` to fix. Add oxc cases to the lint and format integration tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Tj9MBgi2cQcRxSD9uikx6k
…s on react With `--yes` or without a TTY, `rr plugins add ts` always picked the Node.js app preset, which can't type-check a React app (no DOM lib, no JSX). Default to the React preset when react is in dependencies, devDependencies or peerDependencies. It's also where the interactive prompt now starts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Tj9MBgi2cQcRxSD9uikx6k
…-yes Only --yes made `rr plugins add` non-interactive, so from an agent or CI it waited on "Scaffold biome.json?" or exited 13 on a closed stdin, with the plugin installed but not configured. `rr plugins remove` waited on its confirmation the same way. Treat a run without a TTY on stdin and stdout as unattended. add takes the defaults, as with --yes. remove, which deletes files and dependencies, stops with an error that asks for --yes. The integration tests add plugins with a pnpm stub and then run `rr jsc` on the result. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Tj9MBgi2cQcRxSD9uikx6k
rqbazan
force-pushed
the
fix/rr-plugins-add-unattended
branch
from
October 18, 2026 00:09
6c531ee to
c9903ab
Compare
Contributor
Preview releaseLatest commit: Some packages have been released:
Note Use the PR number as tag to install any package. For instance: |
Merged
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.
Pairs with #269 at runtime, not in code: a project that keeps oxc's type-check needs #269's
oxlint-tsgolintrange. Nothing here touches #269's files, and the verification below uses oxc for lint and format only.Summary
The vland templates (#271) ship
plugins: [], and each project runsrr plugins addfor the ones it wants, often from an agent with no TTY. On a fresh project, that never ended with a greenrr check. Five fixes, one commit each, a patch changeset per package:canPrompt()asks for TTYs on both stdin and stdout, because clack reads one and draws on the other. clibuddy'shasTTYonly checks stdout. Decision 004 already says the unattended flow takes the defaults; this only adds the missing TTY as a trigger.Import order: Biome's groups (protocol, package, alias, path), then plain code-unit order inside each, not
localeCompare.localeCompareputstsdown-pluginbeforets-plugin, andrr jscwould fail on the file rr just wrote.Evidence
Before, the published rr 1.3.5: each template generated with feat: bring the vland templates to the org standard, and fix vland init's git identity and hooks #271, then each plugin added with no TTY and no
--yes:After, this branch packed into tarballs and installed into each generated project through pnpm
overrides, under the same matrix:oxc runs as
oxc({ only: ["lint", "format"] }), which feat: bring the vland templates to the org standard, and fix vland init's git identity and hooks #271's READMEs ask for, because oxc and ts both provide the type-check.Tests, each red on the code before its fix:
There was no oxc case in lint or format, so
--checkwent unnoticed: dx only uses oxc for the type-check.Merge Danger
Door: two-way
Blast Radius:
rr plugins add/removetsstarts on the React preset when there's areactdependency.biome.jsonkeeps its own$schema, because the patch path only sets it if it's missing.rr plugins removefrom a script without--yesnow exits 1 instead of hanging.run-run.config.mtsjoins any blank lines between consecutive imports, including ones a user left to separate groups.Not fixed here, for later:
rr plugins add tsdowndoesn't installtypescript, but@rrlab/tsdown-configbuilds withdts: true. A project with tsdown and notsplugin failsrr pack("TypeScript is not installed").biome.json) can still write a file Biome reformats.@types/nodeto>=20.🤖 Generated with Claude Code
https://claude.ai/code/session_01Tj9MBgi2cQcRxSD9uikx6k