build: suppress rolldown-plugin-dts CommonJS dts warnings from bundled zod locales#84592
Conversation
|
Codex review: needs changes before merge. Workflow note: Future ClawSweeper reviews update this same comment in place. How this review workflow works
Summary Reproducibility: yes. with high confidence from source and contributor terminal proof. Current main bundles PR rating Rank-up moves:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. Real behavior proof Risk before merge
Maintainer options:
Copy recommended automerge instructionNext step before merge Security Review findings
Review detailsBest possible solution: Keep zod inlined, but suppress only normalized warning paths under Do we have a high-confidence way to reproduce the issue? Yes, with high confidence from source and contributor terminal proof. Current main bundles Is this the best way to solve the issue? No, not as written. Suppressing this known zod-locale warning is a reasonable direction, but the predicate should verify the declaration path so unrelated CommonJS-dts warnings remain visible. Label justifications:
Full review comments:
Overall correctness: patch is incorrect Acceptance criteria:
What I checked:
Likely related people:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 5c4c6a42071c. |
|
ClawSweeper PR egg 🔥 Warming up: real-behavior proof passed; findings, security review, or rank-up moves are still in progress. Hatch commandComment Hatchability rules:
What is this egg doing here?
|
1086630 to
10dedd3
Compare
b7cfc54 to
b42b990
Compare
b42b990 to
d1259ff
Compare
…d zod locales After bumping rolldown-plugin-dts to 0.25.1 (94ac563), every `pnpm build` emits a 'CommonJS dts' warning per zod `v4/locales/*.d.cts` file because zod is intentionally inlined for global pnpm install resolution (#78515) and tsdown's external option cannot be scoped to the dts pass only. Filter the warning in the existing onLog suppression list (same pattern as PLUGIN_TIMINGS / UNRESOLVED_IMPORT / EVAL) so other rolldown-plugin-dts warnings remain visible.
d1259ff to
476ac0f
Compare
…d zod locales (openclaw#84592) * build: suppress rolldown-plugin-dts CommonJS dts warnings from bundled zod locales After bumping rolldown-plugin-dts to 0.25.1 (94ac563), every `pnpm build` emits a 'CommonJS dts' warning per zod `v4/locales/*.d.cts` file because zod is intentionally inlined for global pnpm install resolution (openclaw#78515) and tsdown's external option cannot be scoped to the dts pass only. Filter the warning in the existing onLog suppression list (same pattern as PLUGIN_TIMINGS / UNRESOLVED_IMPORT / EVAL) so other rolldown-plugin-dts warnings remain visible. * docs(changelog): move rolldown-dts entry into 2026.5.20 fixes
…d zod locales (openclaw#84592) * build: suppress rolldown-plugin-dts CommonJS dts warnings from bundled zod locales After bumping rolldown-plugin-dts to 0.25.1 (94ac563), every `pnpm build` emits a 'CommonJS dts' warning per zod `v4/locales/*.d.cts` file because zod is intentionally inlined for global pnpm install resolution (openclaw#78515) and tsdown's external option cannot be scoped to the dts pass only. Filter the warning in the existing onLog suppression list (same pattern as PLUGIN_TIMINGS / UNRESOLVED_IMPORT / EVAL) so other rolldown-plugin-dts warnings remain visible. * docs(changelog): move rolldown-dts entry into 2026.5.20 fixes
…d zod locales (openclaw#84592) * build: suppress rolldown-plugin-dts CommonJS dts warnings from bundled zod locales After bumping rolldown-plugin-dts to 0.25.1 (94ac563), every `pnpm build` emits a 'CommonJS dts' warning per zod `v4/locales/*.d.cts` file because zod is intentionally inlined for global pnpm install resolution (openclaw#78515) and tsdown's external option cannot be scoped to the dts pass only. Filter the warning in the existing onLog suppression list (same pattern as PLUGIN_TIMINGS / UNRESOLVED_IMPORT / EVAL) so other rolldown-plugin-dts warnings remain visible. * docs(changelog): move rolldown-dts entry into 2026.5.20 fixes
…d zod locales (openclaw#84592) * build: suppress rolldown-plugin-dts CommonJS dts warnings from bundled zod locales After bumping rolldown-plugin-dts to 0.25.1 (f9a5384), every `pnpm build` emits a 'CommonJS dts' warning per zod `v4/locales/*.d.cts` file because zod is intentionally inlined for global pnpm install resolution (openclaw#78515) and tsdown's external option cannot be scoped to the dts pass only. Filter the warning in the existing onLog suppression list (same pattern as PLUGIN_TIMINGS / UNRESOLVED_IMPORT / EVAL) so other rolldown-plugin-dts warnings remain visible. * docs(changelog): move rolldown-dts entry into 2026.5.20 fixes
…d zod locales (openclaw#84592) * build: suppress rolldown-plugin-dts CommonJS dts warnings from bundled zod locales After bumping rolldown-plugin-dts to 0.25.1 (94ac563), every `pnpm build` emits a 'CommonJS dts' warning per zod `v4/locales/*.d.cts` file because zod is intentionally inlined for global pnpm install resolution (openclaw#78515) and tsdown's external option cannot be scoped to the dts pass only. Filter the warning in the existing onLog suppression list (same pattern as PLUGIN_TIMINGS / UNRESOLVED_IMPORT / EVAL) so other rolldown-plugin-dts warnings remain visible. * docs(changelog): move rolldown-dts entry into 2026.5.20 fixes
…d zod locales (openclaw#84592) * build: suppress rolldown-plugin-dts CommonJS dts warnings from bundled zod locales After bumping rolldown-plugin-dts to 0.25.1 (94ac563), every `pnpm build` emits a 'CommonJS dts' warning per zod `v4/locales/*.d.cts` file because zod is intentionally inlined for global pnpm install resolution (openclaw#78515) and tsdown's external option cannot be scoped to the dts pass only. Filter the warning in the existing onLog suppression list (same pattern as PLUGIN_TIMINGS / UNRESOLVED_IMPORT / EVAL) so other rolldown-plugin-dts warnings remain visible. * docs(changelog): move rolldown-dts entry into 2026.5.20 fixes
…d zod locales (openclaw#84592) * build: suppress rolldown-plugin-dts CommonJS dts warnings from bundled zod locales After bumping rolldown-plugin-dts to 0.25.1 (94ac563), every `pnpm build` emits a 'CommonJS dts' warning per zod `v4/locales/*.d.cts` file because zod is intentionally inlined for global pnpm install resolution (openclaw#78515) and tsdown's external option cannot be scoped to the dts pass only. Filter the warning in the existing onLog suppression list (same pattern as PLUGIN_TIMINGS / UNRESOLVED_IMPORT / EVAL) so other rolldown-plugin-dts warnings remain visible. * docs(changelog): move rolldown-dts entry into 2026.5.20 fixes
…d zod locales (openclaw#84592) * build: suppress rolldown-plugin-dts CommonJS dts warnings from bundled zod locales After bumping rolldown-plugin-dts to 0.25.1 (94ac563), every `pnpm build` emits a 'CommonJS dts' warning per zod `v4/locales/*.d.cts` file because zod is intentionally inlined for global pnpm install resolution (openclaw#78515) and tsdown's external option cannot be scoped to the dts pass only. Filter the warning in the existing onLog suppression list (same pattern as PLUGIN_TIMINGS / UNRESOLVED_IMPORT / EVAL) so other rolldown-plugin-dts warnings remain visible. * docs(changelog): move rolldown-dts entry into 2026.5.20 fixes
…d zod locales (openclaw#84592) * build: suppress rolldown-plugin-dts CommonJS dts warnings from bundled zod locales After bumping rolldown-plugin-dts to 0.25.1 (642491d), every `pnpm build` emits a 'CommonJS dts' warning per zod `v4/locales/*.d.cts` file because zod is intentionally inlined for global pnpm install resolution (openclaw#78515) and tsdown's external option cannot be scoped to the dts pass only. Filter the warning in the existing onLog suppression list (same pattern as PLUGIN_TIMINGS / UNRESOLVED_IMPORT / EVAL) so other rolldown-plugin-dts warnings remain visible. * docs(changelog): move rolldown-dts entry into 2026.5.20 fixes
…d zod locales (openclaw#84592) * build: suppress rolldown-plugin-dts CommonJS dts warnings from bundled zod locales After bumping rolldown-plugin-dts to 0.25.1 (94ac563), every `pnpm build` emits a 'CommonJS dts' warning per zod `v4/locales/*.d.cts` file because zod is intentionally inlined for global pnpm install resolution (openclaw#78515) and tsdown's external option cannot be scoped to the dts pass only. Filter the warning in the existing onLog suppression list (same pattern as PLUGIN_TIMINGS / UNRESOLVED_IMPORT / EVAL) so other rolldown-plugin-dts warnings remain visible. * docs(changelog): move rolldown-dts entry into 2026.5.20 fixes
…d zod locales (openclaw#84592) * build: suppress rolldown-plugin-dts CommonJS dts warnings from bundled zod locales After bumping rolldown-plugin-dts to 0.25.1 (34835dc), every `pnpm build` emits a 'CommonJS dts' warning per zod `v4/locales/*.d.cts` file because zod is intentionally inlined for global pnpm install resolution (openclaw#78515) and tsdown's external option cannot be scoped to the dts pass only. Filter the warning in the existing onLog suppression list (same pattern as PLUGIN_TIMINGS / UNRESOLVED_IMPORT / EVAL) so other rolldown-plugin-dts warnings remain visible. * docs(changelog): move rolldown-dts entry into 2026.5.20 fixes
Why not the more invasive fixes
Up front, here's why this PR only filters the warning instead of changing the build:
dts: falseon the tsdown node build would removerolldown-plugin-dtsfrom the JS bundle pass entirely (tsdown.config.ts:nodeBuildConfig). It plausibly works becausebuild:plugin-sdk:dts(tsgo) is what actually emits the dts files we ship, but it changes a behavior that's been in place since the tsdown migration. Any downstream step or tooling quietly relying on the tsdown-side dts emission would silently break — and a cleanpnpm buildconfirms tsdown is emitting ~2k*.d.tsfiles intodist/today, several of which are not the plugin-sdk surface, so the blast radius isn't obviously empty.deps.alwaysBundle/deps.neverBundle/inputOptions.externalapply uniformly to JS and dts. The JS path needs zod inlined per fix(build): bundle zod inline to fix pnpm global install resolution #78515 (otherwise globally-installed openclaw fails to resolvezod/*subpaths). There's no per-pass externalization knob onrolldown-plugin-dts, so doing this cleanly would require splitting the build into two graphs.The warning is purely informational from the bundler's perspective — the dts output is still valid; rolldown-plugin-dts is just hedging on edge cases for
export = ...style declarations. Filtering it matches the existingonLogpattern in this file forPLUGIN_TIMINGS, scopedUNRESOLVED_IMPORT, and the bottleneck/protobufjsEVALwarnings.When/why it started
Two upstream changes combined:
0496063264(2026-05-10) bumpedrolldown-plugin-dts0.23.2 → 0.25.0.94ac563399(2026-05-20) bumped 0.25.0 → 0.25.1, which is the version that introduced the newCommonJS dts syntaxwarning inrolldown-plugin-dts:fake-js(seeisCjsDtsInputSyntax— fires onexport = ...andimport x = require(...)).Combined with
ea72414e1c/ #78515, which addedzodandzod/*toshouldAlwaysBundleDependencyso the dts pass walkssrc/plugin-sdk/zod.ts→zod/v4/classic/external.d.cts→../locales/index.cjs→ every per-locale*.d.cts(all of which useexport = _default), every full build now emits one warning per locale file.Summary
isSuppressedLogintsdown.config.tsto dropPLUGIN_WARNINGlogs fromrolldown-plugin-dts:fake-jswhose message containsuses CommonJS dts syntax. Other warnings from the same plugin still pass through.plugin?: stringto the log type and two tests insrc/infra/tsdown-config.test.ts(one that suppresses the zod-locale message, one that forwards an unrelated warning to the default handler).Verification
Both runs in a clean Codex worktree on the rebased branch (post
pnpm install --frozen-lockfile, sorolldown-plugin-dts@0.25.1is on disk):pnpm buildspam of(rolldown-plugin-dts:fake-js plugin) /…/zod/v4/locales/*.d.cts uses CommonJS dts syntax. …rm -rf dist dist-runtime && OPENCLAW_BUILD_VERBOSE=1 node scripts/tsdown-build.mjs 2>&1 | grep -c "CommonJS dts"(verbose mode bypasses ouronLogpatch — reproduces upstream warnings)rm -rf dist dist-runtime && node scripts/tsdown-build.mjs 2>&1 | grep -c "CommonJS dts"(normal build — filter active)node scripts/run-vitest.mjs src/infra/tsdown-config.test.tsnode scripts/run-tsgo.mjs -p tsconfig.core.json --noEmitnode scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.core.test.json --noEmitnode scripts/run-oxlint.mjs tsdown.config.ts src/infra/tsdown-config.test.tsCommonJS dtslines emitted, sample(rolldown-plugin-dts:fake-js plugin) /…/zod/v4/locales/be.d.cts uses CommonJS dts syntax. …CommonJS dtslines; 4931 files indist/— build still succeeds end-to-endsrc/infra/tsdown-config.test.ts(13 existing + 2 new)pnpm build; legitimate other warnings remain reachable through the sameonLogpath.pnpm buildend-to-end past thetsdownstep (postbuild, plugin-sdk:dts, etc.) — only thetsdownstep is touched and only the log path changes; broader CI gates can confirm.Test plan
node scripts/run-vitest.mjs src/infra/tsdown-config.test.ts— passestsgocore + core-test typecheck cleanoxlintclean