Repository navigation
chore(biome): flag console in package source - #668
Conversation
Package code logs through the logger: core's, or version's own utils/logging.ts. Biome's noConsole now enforces that in packages/*/src, except the loggers themselves and the CLI command layer (command.ts, commands/), which owns the terminal: the JSON result on stdout and the final error message on stderr. The version package's error paths dumped stack traces and git output with console.error next to log(..., 'error'); they now go through log, which writes the error level to stderr in both modes, so the stream is unchanged. Three outputs that aren't diagnostics keep console behind a suppression: version's --json result, preview's dry-run comment, and the RELEASEKIT_DEBUG prompt dump (folded into one write, same bytes), which must print regardless of log level or --quiet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HQN3v9Z4f1mu3xK4Z7K44e
|
Standing release PR: #614 · v0.42.0 queued (4 packages) · open 82d 2h 27m · ✅ ready to merge Release Preview — v0.41.2 → v0.41.3
These changes will be added to the release PR (#614) when merged: Changelogmonorepo 0.41.2 → 0.41.3
After merge — predicted release
Updated automatically by ReleaseKit |
versionStrategies.spec.ts mocks node:fs, so the Cargo.lock lookup in syncCargoLockfile finds a lock and the real sync shells out to `cargo update --workspace --offline` — 78 times per run. On a cold CI runner that pushes "should update all packages to the same version" past its 5s timeout; it failed that way on #668 and #671. Mock the sync like the other collaborators. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HQN3v9Z4f1mu3xK4Z7K44e
versionStrategies.spec.ts mocks node:fs, so the Cargo.lock lookup in syncCargoLockfile finds a lock and the real sync shells out to `cargo update --workspace --offline` — 78 times per run. On a cold CI runner that pushes "should update all packages to the same version" past its 5s timeout; it failed that way on #668 and #671. Mock the sync like the other collaborators. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HQN3v9Z4f1mu3xK4Z7K44e
|
Generated by Claude Code |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HQN3v9Z4f1mu3xK4Z7K44e
# Conflicts: # biome.jsonc
* chore(turbo): bump to 2.11.7 and opt out of agent guidance From 2.11.6, turbo appends a turborepo-agent-rules block to the root AGENTS.md whenever it runs under an AI agent (CLAUDECODE, AI_AGENT, CURSOR_TRACE_ID and similar). Here that lands as a stray diff in every agent worktree, and CLAUDE.md imports AGENTS.md, so the block would also ride into every agent's context. Set agentGuidance to false. turbo 2.10.9 rejects agentGuidance as an unknown turbo.json key, so the opt-out needs the bump; 2.11.7 matches webdriverio/desktop-mobile and the turbo entry in the open dependabot dev-dependencies group (#660), which would otherwise turn the block on when it merges. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HQN3v9Z4f1mu3xK4Z7K44e * chore(turbo): bump to 2.11.10 Move to the current latest turbo. Since 2.11.8 (vercel/turborepo#14490) agentGuidance defaults to false, so the explicit false in turbo.json now restates the default; keeping it holds the opt-out if that default flips back. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HQN3v9Z4f1mu3xK4Z7K44e * test(version): stop the strategy unit tests running real cargo versionStrategies.spec.ts mocks node:fs, so the Cargo.lock lookup in syncCargoLockfile finds a lock and the real sync shells out to `cargo update --workspace --offline` — 78 times per run. On a cold CI runner that pushes "should update all packages to the same version" past its 5s timeout; it failed that way on #668 and #671. Mock the sync like the other collaborators. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HQN3v9Z4f1mu3xK4Z7K44e * test(version): drop the comment on the cargoLock mock Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HQN3v9Z4f1mu3xK4Z7K44e --------- Co-authored-by: Claude <noreply@anthropic.com>
Same sweep as #679, run on this branch so merging main resolves cleanly. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HQN3v9Z4f1mu3xK4Z7K44e
# Conflicts: # packages/notes/src/llm/messages.ts
…reasons Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HQN3v9Z4f1mu3xK4Z7K44e
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HQN3v9Z4f1mu3xK4Z7K44e
…e-commands #668's noConsole rule meets this branch's core/src/cli.ts, the shared JSON writer behind every command's --json/--output, so it joins the exempt CLI files. printJsonOutput keeps this branch's writeEnvelope version, which no longer needs #668's suppression. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HQN3v9Z4f1mu3xK4Z7K44e
Description
Package code logs through the logger: core's, or version's own
utils/logging.ts. Biome'ssuspicious/noConsolenow enforces that inpackages/*/src, with these exemptions:packages/core/src/logger.tsandpackages/version/src/utils/logging.ts.packages/*/src/command.tsandpackages/*/src/commands/**. This layer owns the terminal. It prints the JSON result or envelope on stdout (emitResult,publish --json), each command's final error message on stderr, andnotes providers's list.Every
console.*call in package source, classified:core/src/logger.ts,version/src/utils/logging.tsrelease/src/commands/**(incl.emitResult.ts),{notes,publish,version}/src/command.tsversion/src/git/commands.ts,core/versionEngine.ts,core/versionCalculator.tsconsole.errornext tolog(..., 'error')log(..., 'error')version/src/utils/jsonOutput.tsprintJsonOutputreleasekit-version --jsonresult on stdoutrelease/src/preview/preview.tspreview --dry-runprints the comment to stdout, as documentednotes/src/llm/messages.tsRELEASEKIT_DEBUG=1prompt dumpThe converted calls change no output streams. Version's
logwrites theerrorlevel to stderr in both JSON and non-JSON modes, which is whereconsole.errorwrote. Two calls passed the raw error value toconsole.error; they now print it withutil.inspect, which is whatconsole.errordid for non-string values. The only visible difference is the red colouringlogapplies on a TTY.The
RELEASEKIT_DEBUGdump stays onconsole. Moving it to the logger would add an[INFO]prefix, and--quietwould then silence a dump the user explicitly asked for. Its two calls are folded into one write so it needs one suppression (a Biome range suppression would need two reasons). Its stderr bytes are unchanged.AGENTS.md states no console rule, so it's untouched.
Related Issue(s)
None. Ports webdriverio/desktop-mobile#726 (a releasekit consumer), adapted: there the two logger fallbacks took one-line suppressions; here the loggers are whole files, so they're exempt by path.
Type of Change
feat— New featurefix— Bug fixdocs— Documentation changerefactor— Code refactoringtest— Adding or updating testschore— Maintenance, dependencies, toolingScope
@releasekit/version@releasekit/notes@releasekit/publish@releasekit/config@releasekit/core@releasekit/release(one suppression inpreview.ts)Checklist
pnpm lint)pnpm typecheck)Testing Notes
pnpm lintpasses with the same 29 warnings and 1 info asmain.console.log('probe')to five files: Biome flagged the three covered files (core/src/utils.ts,forge/src/index.ts,version/src/core/versionEngine.ts) and not the two exempt command files (release/src/commands/changed.ts,notes/src/command.ts). Probes removed.pnpm buildandpnpm typecheckpass.RELEASEKIT_DEBUG=1dump frommainand from this branch on the same messages: stderr byte-identical.biome check --writewithout--unsafe, so it won't silently apply noConsole's unsafe fix, which deletes the call.Open points for review:
console.loginside a command's action handler won't be caught. The alternative is ~16 one-line suppressions across those files.errorlevel to keep behaviour identical; arguably they belong atdebug.Generated by Claude Code


Confidence Score: 5/5
The PR appears safe to merge; no actionable issues were found.Summary
Enables Biome's
noConsolerule in package source, with exceptions for loggers and command files.No actionable issues found. Tests and builds were not run during this review.
Acknowledged scope from
goosewobbler:Reviews (1) · Last reviewed commit: "chore(biome): flag console in package so..." · Reviewed by Greptile