You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PR #5482 adds scripts/vite-dts-fail-on-type-errors.ts and spreads it into packages/layout/vite.config.ts, so that package's vite build now exits non-zero when the
declaration step reports type errors. That PR's declared file surface was the shared config plus packages/layout, so the other call sites were deliberately left alone. #5370 remains open for
this reason.
Measured, on 478ec54ce
22 packages build their typings through vite-plugin-dts. Each was built with pnpm --filter PACKAGE build after one deliberate TS2322 was appended to its entry file, and
the exit code read from ${PIPESTATUS[0]}:
20 exit 0 with the error printed in the log: components, plugin-ai, plugin-calendar, plugin-charts, plugin-chatbot, plugin-dashboard, plugin-designer, plugin-detail, plugin-editor, plugin-form, plugin-gantt, plugin-grid, plugin-kanban, plugin-list, plugin-map, plugin-markdown, plugin-report, plugin-timeline, plugin-tree, plugin-view.
fields exits 2, but not through the dts leg — its build script is tsc && vite build && node scripts/build-css.mjs, so the leading tsc fails first.
All 22 reported the injected diagnostic, so none of the zeros is the vacuous kind where a
package's dts program never looked at its own src.
Blast radius of finishing the job: measured zero
The same 22 packages were also built unmodified on 478ec54ce: 22/22 exit 0 with zero
TypeScript diagnostics of any category in the log. Wiring the remaining 20 therefore turns
nothing that is green today red.
Suggested disposition
Spread createDtsFailOnTypeErrors({ packageDir: __dirname }) into the remaining 20 vite.config.ts files — one line and one import each, the form pinned by packages/layout/vite.config.ts.
Consider a gate that keeps them wired, so a new vite-plugin-dts package cannot land
unwired. Without it this is a state someone has to remember, which is how the current spread
of 1-of-22 came to exist in the first place. A ratchet over every vite.config.ts that calls dts( is the obvious shape.
fields can either keep its tsc && prefix or move to the shared factory; if it keeps it,
that is worth one comment at the build script, because it reads as redundant next to the
others once they are wired.
Worth scheduling next to #5439 rather than after it: that card wires the OTHER shared dts module
(scripts/vite-dts-explicit-extensions.ts) into a very similar set of vite.config.ts files, so
the two together are one edit per file instead of two rounds of conflict on the same 20 configs.
The defects themselves are unrelated — #5439 is about extensionless specifiers in the emitted
typings, this one is about the exit code.
Found while implementing #5370 (PR #5482). Unassigned, no label — severity is PM's call.
What #5370 left standing
PR #5482 adds
scripts/vite-dts-fail-on-type-errors.tsand spreads it intopackages/layout/vite.config.ts, so that package'svite buildnow exits non-zero when thedeclaration step reports type errors. That PR's declared file surface was the shared config plus
packages/layout, so the other call sites were deliberately left alone. #5370 remains open forthis reason.
Measured, on
478ec54ce22 packages build their typings through
vite-plugin-dts. Each was built withpnpm --filter PACKAGE buildafter one deliberateTS2322was appended to its entry file, andthe exit code read from
${PIPESTATUS[0]}:components,plugin-ai,plugin-calendar,plugin-charts,plugin-chatbot,plugin-dashboard,plugin-designer,plugin-detail,plugin-editor,plugin-form,plugin-gantt,plugin-grid,plugin-kanban,plugin-list,plugin-map,plugin-markdown,plugin-report,plugin-timeline,plugin-tree,plugin-view.fieldsexits 2, but not through the dts leg — its build script istsc && vite build && node scripts/build-css.mjs, so the leadingtscfails first.layoutexits 1, via the factory PR fix(build): make dts type errors fail the build instead of exiting 0 #5482 wires in.All 22 reported the injected diagnostic, so none of the zeros is the vacuous kind where a
package's dts program never looked at its own
src.Blast radius of finishing the job: measured zero
The same 22 packages were also built unmodified on
478ec54ce: 22/22 exit 0 with zeroTypeScript diagnostics of any category in the log. Wiring the remaining 20 therefore turns
nothing that is green today red.
Suggested disposition
createDtsFailOnTypeErrors({ packageDir: __dirname })into the remaining 20vite.config.tsfiles — one line and one import each, the form pinned bypackages/layout/vite.config.ts.vite-plugin-dtspackage cannot landunwired. Without it this is a state someone has to remember, which is how the current spread
of 1-of-22 came to exist in the first place. A ratchet over every
vite.config.tsthat callsdts(is the obvious shape.fieldscan either keep itstsc &&prefix or move to the shared factory; if it keeps it,that is worth one comment at the build script, because it reads as redundant next to the
others once they are wired.
Worth scheduling next to #5439 rather than after it: that card wires the OTHER shared dts module
(
scripts/vite-dts-explicit-extensions.ts) into a very similar set ofvite.config.tsfiles, sothe two together are one edit per file instead of two rounds of conflict on the same 20 configs.
The defects themselves are unrelated — #5439 is about extensionless specifiers in the emitted
typings, this one is about the exit code.
References
scripts/vite-dts-fail-on-type-errors.ts— the factory, added by PR fix(build): make dts type errors fail the build instead of exiting 0 #5482packages/layout/vite.config.ts— the one wired call sitepnpm --filter @object-ui/layout buildprintserror TS2353and still exits 0 — the dts step reports type errors without failing the build #5370 / PR fix(build): make dts type errors fail the build instead of exiting 0 #5482 — where this was foundGenerated by Claude Code