Skip to content

Commit cf8cc8c

Browse files
claude[bot]claude
andauthored
docs(platform-objects): make the vitest alias rationale independent of a suite count (#16188)
The alias comment named `managed-api-method-affordance-sweep.test.ts` (#7934) as "the only suite here that imports a sibling package as a VALUE". That licensed a removal it no longer justified: four suites in this package import `@objectstack/lint` as a value, and on the sentence's literal reading (any sibling package) the count is far higher still. Replace the enumeration with the mechanism — the entry is keyed on the SPECIFIER, so it governs whatever set imports it, and `check:test-source-alias` is the thing that decides whether the entry may go. A rationale with no count in it cannot go stale the way this one did. The alias entry itself is unchanged. Claude-Session: https://claude.ai/code/session_01ARYe3yQTQCUFm5qPYNgKaJ Co-authored-by: Claude <noreply@anthropic.com>
1 parent f5aec38 commit cf8cc8c

1 file changed

Lines changed: 17 additions & 4 deletions

File tree

packages/platform-objects/vitest.config.ts

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,23 @@ export default defineConfig({
1414
disableConsoleIntercept: true,
1515
},
1616
resolve: {
17-
// One entry, for `managed-api-method-affordance-sweep.test.ts` (#7934) —
18-
// the only suite here that imports a sibling package as a VALUE. It calls
19-
// `validateManagedApiMethods` from `@objectstack/lint` over every
20-
// code-shipped managed object in the checkout.
17+
// One entry, for `@objectstack/lint`, keyed on the SPECIFIER — so it
18+
// governs every suite in this package that imports that package as a
19+
// VALUE, not one named suite. `managed-api-method-affordance-sweep.test.ts`
20+
// (#7934) is the suite that first needed it — it calls
21+
// `validateManagedApiMethods` over every code-shipped managed object in
22+
// the checkout — but deleting or rewriting THAT suite does not free this
23+
// entry, and a count of the suites written here goes stale silently: this
24+
// comment carried one ("the only suite") that was already wrong.
25+
//
26+
// The dependent set is whatever
27+
// `git grep "from '@objectstack/lint'" -- packages/platform-objects/src`
28+
// returns, and `pnpm check:test-source-alias` is what decides whether the
29+
// entry may go at all: it recomputes the workspace packages this package's
30+
// tests import as VALUES, keeps the ones whose entry point resolves under
31+
// `dist/`, replays this file's alias entries the way Vite does, and reddens
32+
// on anything left unaliased and unregistered. Remove the entry and it is
33+
// that gate, not a reading of one test file, that answers.
2134
//
2235
// Unaliased, that specifier resolves through `exports` to `lint/dist` — a
2336
// BUILD ARTIFACT — which would make this sweep a verdict about build state

0 commit comments

Comments
 (0)