Skip to content

chore(biome): flag console in package source - #668

Merged
goosewobbler merged 8 commits into
mainfrom
chore/biome-no-console
Oct 22, 2026
Merged

goosewobbler merged 8 commits into
mainfrom
chore/biome-no-console

Conversation

@goosewobbler

@goosewobbler goosewobbler commented Oct 22, 2026 •

Copy link
Copy Markdown
Owner

Description

Package code logs through the logger: core's, or version's own utils/logging.ts. Biome's suspicious/noConsole now enforces that in packages/*/src, with these exemptions:

  • The loggers themselves: packages/core/src/logger.ts and packages/version/src/utils/logging.ts.
  • The CLI command layer: packages/*/src/command.ts and packages/*/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, and notes providers's list.

Every console.* call in package source, classified:

Where Calls Classification Outcome
core/src/logger.ts, version/src/utils/logging.ts 6 Logger implementations Exempt by path
release/src/commands/** (incl. emitResult.ts), {notes,publish,version}/src/command.ts 16 CLI output channel Exempt by path
version/src/git/commands.ts, core/versionEngine.ts, core/versionCalculator.ts 13 Stray: stack traces and git output dumped with console.error next to log(..., 'error') Now go through version's log(..., 'error')
version/src/utils/jsonOutput.ts printJsonOutput 1 releasekit-version --json result on stdout Suppressed (one line)
release/src/preview/preview.ts 1 preview --dry-run prints the comment to stdout, as documented Suppressed (one line)
notes/src/llm/messages.ts 2 RELEASEKIT_DEBUG=1 prompt dump Folded into one write, suppressed

The converted calls change no output streams. Version's log writes the error level to stderr in both JSON and non-JSON modes, which is where console.error wrote. Two calls passed the raw error value to console.error; they now print it with util.inspect, which is what console.error did for non-string values. The only visible difference is the red colouring log applies on a TTY.

The RELEASEKIT_DEBUG dump stays on console. Moving it to the logger would add an [INFO] prefix, and --quiet would 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 feature
  • fix — Bug fix
  • docs — Documentation change
  • refactor — Code refactoring
  • test — Adding or updating tests
  • chore — Maintenance, dependencies, tooling
  • Breaking change — Requires major version bump

Scope

  • @releasekit/version
  • @releasekit/notes
  • @releasekit/publish
  • @releasekit/config
  • @releasekit/core
  • CI / workflows
  • Root / monorepo
  • @releasekit/release (one suppression in preview.ts)

Checklist

  • Lint passes (pnpm lint)
  • Tests pass (unit tests of the touched packages: notes, release, version)
  • Typecheck passes (pnpm typecheck)
  • Documentation updated (if applicable)
  • Breaking changes noted in description

Testing Notes

  • pnpm lint passes with the same 29 warnings and 1 info as main.
  • Before the source changes, the new override flagged exactly the 17 non-exempt calls listed above, and nothing in the exempt paths.
  • Temporarily appending 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 build and pnpm typecheck pass.
  • Unit tests pass: notes 443 passed / 2 skipped, release 847, version 726.
  • The RELEASEKIT_DEBUG=1 dump from main and from this branch on the same messages: stderr byte-identical.
  • The commit hook runs biome check --write without --unsafe, so it won't silently apply noConsole's unsafe fix, which deletes the call.

Open points for review:

  • The command-layer exemption covers whole files, so a stray console.log inside a command's action handler won't be caught. The alternative is ~16 one-line suppressions across those files.
  • The converted stack-trace dumps stay at error level to keep behaviour identical; arguably they belong at debug.
  • Version's own logger prints non-error messages to stdout outside JSON mode, which doesn't match the "only the result goes to stdout" rule. Out of scope here.

Generated by Claude Code

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; no actionable issues were found.

Summary

Enables Biome's noConsole rule in package source, with exceptions for loggers and command files.

  • Biome now checks package source for direct console calls.
  • Version errors now use the version logger for their detailed messages.

No actionable issues found. Tests and builds were not run during this review.

Acknowledged scope from goosewobbler:

  • Whole command-file exemptions intentionally leave stray console calls there unchecked.
  • Stack traces intentionally remain at the error level to preserve behavior.
  • Version's existing non-error stdout logging is deferred as out of scope.

Reviews (1) · Last reviewed commit: "chore(biome): flag console in package so..." · Reviewed by Greptile

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
@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

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

Note: Labels on this PR are advisory in standing-pr mode. Bumps come from conventional commits in the standing PR; override by editing labels on the standing PR itself. Add release:immediate to bypass the standing PR and release this PR directly.

These changes will be added to the release PR (#614) when merged:

Changelog

monorepo 0.41.2 → 0.41.3

Changed

  • reword the noConsole override and debug-dump suppression (biome)
  • shorten the noConsole override comment and suppression reasons (biome)
  • skip CodeQL, release preview and title checks on the standing release PR (PR #672)
  • add .git-blame-ignore-revs for the block-statement sweep (PR #680)
  • add commands and gotchas to AGENTS.md, and drop CLAUDE.md (PR #673)
  • make noExplicitAny an error outside specs and mocks (biome) (PR #682)
  • update package versions and lockfile (deps) (PR #681)
  • add braces to every single-statement body
  • drop the comment on the cargoLock mock (version)
  • stop the strategy unit tests running real cargo (version)
  • flag console in package source (biome)

All packages → 0.41.3 (sync versioning)

  • @releasekit/version
  • @releasekit/notes
  • @releasekit/publish
  • @releasekit/release

After merge — predicted release

No version escalation — this PR's changes will be included in the queued release without affecting the projected versions.

Package Standing PR This PR After merge
monorepo 0.42.0 0.41.3 0.42.0

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
goosewobbler pushed a commit that referenced this pull request Oct 22, 2026
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

Copy link
Copy Markdown
Owner Author

Unit Tests (24) failed on versionStrategies.spec.ts > createSyncStrategy > should update all packages to the same version (5s timeout). Not this PR's: that spec mocks node:fs, so the real syncCargoLockfile shells out to cargo update --workspace --offline 78 times per run, and a cold runner pushes one test over the limit. The same test failed the same way on #671 (turbo bump only). Fix is #676 (mock the sync in that spec); ported here as 099a7a4, which no-ops once #676 is on main.


Generated by Claude Code

goosewobbler added a commit that referenced this pull request Oct 22, 2026
* 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>
@goosewobbler goosewobbler mentioned this pull request Oct 22, 2026
10 of 19 tasks
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
@goosewobbler
goosewobbler merged commit 09bcdfe into main Oct 22, 2026
29 checks passed
@goosewobbler
goosewobbler deleted the chore/biome-no-console branch October 22, 2026 20:39
@github-actions github-actions Bot mentioned this pull request Oct 22, 2026
goosewobbler pushed a commit that referenced this pull request Oct 22, 2026
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants