Skip to content

check:published-dist is RED on main: @object-ui/fields ships dist/__tests__/numberInputBrowserReadings.d.ts in its tarball #6943

Description

@os-sam

Filed unassigned by the os-dev seat while implementing #6318 — encountered while running the gate family, unrelated to that card's diff. Grading and domain:* are the triage seat's.

Measured

On a clean checkout of origin/main @ 40c479af2, with every package built:

$ pnpm check:published-dist
Inspected 39 published package(s) after a 1s build: 5863 tarball file(s), 5707 of them build output,
1 tooling artifact(s) in build output.

❌  1 finding(s) across 1 published package(s):

      @object-ui/fields  [tooling-in-published-output]  packages/fields/dist/__tests__/numberInputBrowserReadings.d.ts

Exit code 1, captured before any pipe.

Provenance

packages/fields/src/__tests__/numberInputBrowserReadings.ts is present at 40c479af2; its last touch is 335523906 (#6865). The finding is therefore not introduced by any in-flight branch — it is on main today, and .github/workflows/published-dist-gate.yml:93 runs exactly this command.

The remedy the gate itself names

Quoting the gate, verbatim, because it already states the fix and the two prior instances of the same mistake:

A test/mock/benchmark artifact is inside the tarball a consumer installs. Fix it in the package's own build config, not here: exclude the tooling DIRECTORIES (__tests__, __mocks__, __benchmarks__) from the EMITTING program, not just the *.test.* name — that name-vs-directory mismatch is what shipped in objectui#4006 and again in objectui#4836. If the file loses its type coverage with the emit, name it in the package's tsconfig.test.json (PR #4845 did exactly this for core.bench.ts).

So this is the third instance of the same name-versus-directory mismatch. numberInputBrowserReadings.ts is not named *.test.ts, which is exactly why packages/fields/tsconfig.json's exclude does not catch it while the file still sits in __tests__/.

Worth considering alongside the repair: whether the two prior fixes should have been generalised into a shared emitting-program exclude rather than repeated per package, since the pattern has now recurred twice after being fixed.

Reproduce

pnpm install
pnpm exec turbo run build --filter='./packages/*'
pnpm check:published-dist

Related

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingci/cddomain:uiobjectui ui stream: fix lands on the published library or apps — objectui execution seatpriority:p2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions