Repository navigation
fix(flame): quiet the Node/Deno build log in CI - #428
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Reviewed the full diff (standard mode). It quiets two sources of noise in the Node/Deno client build log and adds regression tests for both.
clientBuildOnWarninhydrate.node.ts: Rolldown'sMODULE_LEVEL_DIRECTIVEis now dropped only for"use client"and the empty''statement, and everything else still passes through. I ran a probe against the bundled Vite: Rolldown normalizes quotes in the message, so'use client'matches too. ANSI codes appear only in the[CODE]prefix, so the regex matches the same way with or without a TTY.- No-history handling in
git.ts: when the batch fails with exit128orENOENT, it now stays silent and setshistoryUnavailable. That stops the per-pagegit logspawns, and the flag resets at the start of each batch. Any other failure prints oneconsole.warnline. Both the Bun (build.ts) and Node (build.impl.ts) builds pick this up throughmdx.ts. The dev server callscompileMdxwithout a batch, so the flag does not affect it. - Tests:
git.test.tsandhydrate-onwarn.test.tspass locally under Node (10/10) after building the workspace deps. - Changeset:
@docubook/flamepatch.
claude-opus-5-5 | 𝕏
A template build outside a git repository, the usual CI setup, buried its output under two kinds of noise: - 19 multi-line Rolldown MODULE_LEVEL_DIRECTIVE diagnostics from the client bundle: 14 for "use client" in flame's and @docubook/ui-react's components, and 5 for the empty '' statements that JSDoc-only @import blocks leave in @mdx-js/mdx and hast-util-to-estree. Neither has any meaning in a browser-only bundle. hydrate.node.ts now passes clientBuildOnWarn as onwarn, which drops just those two. Other directives (for example "use server") and other warnings still show. - A console.error from getGitLastModifiedBatch that printed every page path, the git stderr, and a stack trace when git had no history. git.ts now treats git exit 128 (not a repository, no commits yet, dubious ownership) and ENOENT (git not installed) as no history and says nothing, so dates fall back to file mtime as before. After such a batch, getGitLastModified returns null without starting one failing git log per page. Any other failure is a single warning line. Co-Authored-By: Claude Opus 5.5 <[email protected]>
gitfromwildan
force-pushed
the
fix/flame-quiet-ci-build-log
branch
from
October 26, 2026 15:19
9e5e000 to
4d6032e
Compare
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.

Summary
A
flame buildof the template on Node/Deno, run outside a git repository (a common CI setup), buried its real output under noise. This PR removes both kinds of noise and leaves real warnings in place..gitMODULE_LEVEL_DIRECTIVEdiagnostics (multi-line each)console.errorwith every page path, git's stderr and a full stack tracegit logspawnsThe "Some chunks are larger than 500 kB" warning (mermaid) is real and still shows.
1.
"use client"and''directive warnings:.docu/node/hydrate.node.tsRolldown warns
MODULE_LEVEL_DIRECTIVEfor any module-level directive other than"use strict". In the client bundle these came from two sources:"use client"in flame's components (Theme,Sidebar,Toc,Menu,Context,Search, …) and in@docubook/ui-react'sdist/(dropdown,theme-controller, …).''in@mdx-js/mdxandhast-util-to-estree. These are empty string statements left by JSDoc-only/** @import */blocks, not real directives.Neither has any meaning in a browser-only bundle. The new
clientBuildOnWarnis passed asonwarnand drops only those two cases. Other directives (for example"use server") and all other warnings pass through. The Bun build (Bun.build) never printed these warnings and is unchanged.2. Missing git history:
.docu/node/git.tsWhen
git logcould not run,getGitLastModifiedBatchcalledconsole.error("Failed to get git last modified batch for", <every path>, err). Now:128(not a repository, a freshgit initwith no commits, dubious ownership) orENOENT(git not installed). Page dates fall back to file mtime, as before.getGitLastModifiedreturnsnullright away, so build no longer spawns one failinggit logper page. The flag resets on every batch, so a later build that does have history works again.[git] last-modified lookup failed, falling back to file mtime: <first line of git's stderr>.Verification
git initwith no commits, on Node: exit 0, 0 directive warnings, 0 git lines. Before the change, the same build printed 19 diagnostics plus a stack trace.@docubook/flame: 35 files, 676 tests passed (10 new).tsc --noEmitand oxlint report 0 errors, and prettier passes. The pre-pushturbo lint,turbo buildand commitlint pass.git.test.ts(mocksexecFile): silent for "not a git repository", "no commits yet" andENOENT; no per-page spawn after a no-history batch; per-page lookups resume after a batch with history; an unexpected failure gives exactly one warning line.hydrate-onwarn.test.ts(real Vite/Rolldown build): checks that Rolldown does raiseMODULE_LEVEL_DIRECTIVEfor"use client"and'', and that the filter drops it. If Rolldown changes the warning's code or wording, this test fails rather than passing silently."use server"still surfaces, and unrelated warnings pass through unchanged.@docubook/flamepatch.🤖 Generated with Claude Code