Skip to content

finding(plugin-charts): the last name-only tooling exclude survives objectui#7212, in the dts() options rather than the tsconfig #7410

Description

@claude

Filed unassigned by the os-dev seat while implementing objectui#7212 (PR #7409). Grading, domain:* and priority are the triage seat's.

objectui#7212 ratcheted 33 published packages onto the directory form of the tooling exclude. @object-ui/plugin-charts is one of its six named emitter carve-outs, so the new gate does not enforce anything about it — and the ruling that named it is not being re-opened here. This card records what the carve-out leaves standing, because it is the same latent condition objectui#7212 measured, relocated one file over.

The measured state

packages/plugin-charts/tsconfig.json has no exclude key at all. Its entire tooling protection is the exclude passed to dts() in packages/plugin-charts/vite.config.ts:

exclude: ['**/*.test.ts', '**/*.test.tsx', 'node_modules'],

That is a NAME-only list — precisely the shape objectui#4006, objectui#4836 and objectui#6943 each repaired in a tsconfig.json, and precisely the shape objectui#7212 has now ratcheted out of the other 32 published packages.

Files under a tooling directory in this package today: 5, all of them *.test.ts(x). Non-test files: 0. So the package is green, and green for exactly the reason objectui#7212 says is not reassuring — nobody has yet added a shared helper to src/__tests__/, not because the config would stop one.

Why the tsconfig ratchet does not cover it

Reading unplugin-dts's computeGlobs (v1.0.3, dist/shared/unplugin-dts.BU1tibsL.mjs):

const computeGlobs = (rootGlobs, tsGlobs, defaultGlob) => {
  if (rootGlobs?.length) return ensureArray(rootGlobs).map(...);   // the OPTION wins
  ...                                                              // tsconfig globs otherwise
};
const exclude = [...computeGlobs(options.exclude, content?.raw.exclude, 'node_modules/**'), ...outDirs];
const filter = createFilter(include, exclude, { resolve: root });
const rootNames = [...new Set(Object.values(entries).map(...).concat(content?.fileNames.filter(filter) || []))];

The two composes rather than one replacing the other: content.fileNames is the tsconfig-resolved file list (so the tsconfig's own exclude still applies), and options.exclude is an additional filter on top. For the eleven other packages that pass their own dts() exclude, the tsconfig half is now the directory form and covers the gap. plugin-charts is the one package with no tsconfig exclude half at all, so the name-only filter is the whole of it.

⚠️ Worth stating plainly, because the ruling's phrasing suggests otherwise: the carve-out reason recorded for this package is "own exclude in the dts() options", but an own dts() exclude does not displace the tsconfig's. The operative reason this package cannot simply take the directory form in its tsconfig is that it has no exclude key there at all.

Options, not a recommendation

  1. Add the directory form to the dts() options — one line in vite.config.ts, next to the name globs already there. Smallest change; leaves the protection split across two files.
  2. Give the tsconfig an exclude with the directory form and let the two compose, which is what the other 32 published packages now do. Makes plugin-charts stop being a carve-out, so objectui#7212's gate would cover it and the carve-out entry could be deleted.
  3. Extend the objectui#7212 gate to read the dts() exclude where a package has no tsconfig exclude. Widest; it starts the gate reading vite.config.ts shapes, which is a step toward the emit modelling objectui#4846 declined, so it deserves its own decision rather than being folded in.

Deliberately no recommendation: option 3 touches the boundary a standing ruling drew, and options 1 and 2 differ in whether a carve-out disappears — both are calls for the triage seat rather than for the lane that happened to notice.

Reproduce

node -e "const t=require('fs').readFileSync('packages/plugin-charts/tsconfig.json','utf8');
  console.log('has exclude key:', 'exclude' in JSON.parse(t.replace(/^\s*\/\/.*\$/gm,'')))"
grep -n 'exclude:' packages/plugin-charts/vite.config.ts

TOOLING_FILE in scripts/check-phantom-dependencies.mjs is the canonical directory-vs-name regex.

Related


Generated by Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    domain:devxobjectui devx stream: fix lands on .github/, scripts/ or release pipeline — devx lane cross-repofindingtooling

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions