Skip to content
This repository was archived by the owner on Nov 4, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .changeset/6943-fields-tooling-dirs-out-of-emit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
'@object-ui/fields': patch
---

Stop shipping `dist/__tests__/numberInputBrowserReadings.d.ts` in the published tarball
(objectui#6943). `packages/fields/tsconfig.json` now excludes the tooling DIRECTORIES
(`__tests__`, `__mocks__`, `__benchmarks__`), not just the `*.test.*` NAME.

`numberInputBrowserReadings.ts` holds the measured Chromium/happy-dom readings the number
widget suites share. It is deliberately not a `*.test.ts` — it carries no assertions — so
the name-only exclude list did not catch it, and it was emitted into `dist` and published
while its 79 neighbours in the same directory were kept out. That made
`check:published-dist` red on `main`, and because the same script is the first link in
`changeset:publish`, it also failed the publish command at its first step.

This is the third instance of the same name-versus-directory mismatch (objectui#4006 here,
objectui#4836 in plugin-grid / plugin-view / plugin-designer), so the exclude table is now
the directory convention itself rather than a list of names to extend.

Which program had to be fixed was measured rather than assumed, because this package's
build is `tsc && vite build` and the `tsc` leg inherits the root's `noEmit`: run alone the
`tsc` leg exited 0 and wrote zero files, while `vite build` alone produced the whole
81-file output including the offending declaration. vite-plugin-dts is the emitting
program, and it builds its declaration program from this package's `tsconfig.json`, so
that is where the exclude belongs.

No type coverage moves with the change and no API surface moves: `numberInputBrowserReadings.ts`
is the only file the directory patterns newly remove from the build program, and the
`tsconfig.test.json` chained off `type-check` already reads it as a transitive input of the
three suites that import it. The name patterns stay, because 52 `*.test.ts(x)` files in this
package sit outside any `__tests__/` directory.
39 changes: 38 additions & 1 deletion packages/fields/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,42 @@
// Their type coverage did not go away with them: it moved to the
// `tsconfig.test.json` chained off this package's `type-check` script, which
// is what scripts/check-type-check-coverage.mjs verifies.
"exclude": ["node_modules", "dist", "**/*.test.ts", "**/*.test.tsx"]
//
// The exclusions cover TOOLING DIRECTORIES, not just the `*.test.*` name
// (objectui#6943 — the THIRD instance of that mismatch, after objectui#4006
// here and objectui#4836 in plugin-{grid,view,designer}). Which program the
// directories have to be excluded FROM was measured on 56453410f rather than
// assumed, because the comment above says `tsc` here only checks: run alone,
// the `tsc` leg of `build` exited 0 and wrote ZERO files, while `vite build`
// alone produced the whole 81-file output — including
// `dist/__tests__/numberInputBrowserReadings.d.ts`. So vite-plugin-dts is the
// emitting program, and it builds its declaration program from THIS config
// (`dts()` in `vite.config.ts` passes no `exclude` of its own), which is why
// the fix belongs here and not in the plugin options.
//
// That file is not a `*.test.ts` by NAME, so the name-only list let it ship in
// the tarball while its 79 neighbours in the same directory were caught.
//
// The name patterns stay: 52 `*.test.ts(x)` files in this package sit outside
// any `__tests__/` directory, so the directory patterns do not subsume them.
// `__mocks__` / `__benchmarks__` match nothing here today and are listed so
// the table is the directory convention itself — exactly as `TOOLING_FILE` in
// scripts/check-phantom-dependencies.mjs spells it — rather than a list that
// has to be extended the next time such a directory appears.
//
// No type coverage moves with this change. `numberInputBrowserReadings.ts` is
// the only file the directory patterns newly remove from this program, and the
// `tsconfig.test.json` chained off `type-check` already reads it as a
// transitive input of the three suites that import it (measured with
// `tsc -p tsconfig.test.json --listFiles`, before and after), so it needs no
// entry there — the same reason plugin-grid's `explainDouble.ts` needed none.
"exclude": [
"node_modules",
"dist",
"**/__tests__/**",
"**/__mocks__/**",
"**/__benchmarks__/**",
"**/*.test.ts",
"**/*.test.tsx"
]
}
Loading