Skip to content

Commit a24f6ea

Browse files
hotlongclaude
andcommitted
test(plugin-dev): alias @objectstack/setup and @objectstack/account to source in the vitest config
check:test-source-alias reds on the literal specifiers: dev-plugin.ts now names both packages statically, and unaliased they resolve through exports to dist/, so a test verdict would depend on build state. Two anchored entries, exactly as the gate prescribes; both packages' own imports (platform-objects/apps, spec/system) are already aliased. Every suite mocks both packages, and the mocks resolve through the same entries: the full suite stays green and the six-init probe still shows zero main-process requests in the test phase. Claude-Session: https://claude.ai/code/session_local_1d2a197c-c20e-4e90-9be8-413d4d432289 Co-authored-by: Claude <noreply@anthropic.com>
1 parent 35833d2 commit a24f6ea

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

‎packages/plugins/plugin-dev/vitest.config.ts‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,14 @@ export default defineConfig({
6262
},
6363
{ find: /^@objectstack\/platform-objects$/, replacement: path.resolve(__dirname, '../../platform-objects/src/index.ts') },
6464
{ find: /^@objectstack\/plugin-security$/, replacement: path.resolve(__dirname, '../plugin-security/src/index.ts') },
65+
// [#20376] The setup / account app packages. `dev-plugin.ts` names them with
66+
// literal `import('…')` specifiers now, so `check:test-source-alias` sees
67+
// both and, unaliased, both resolve through `exports` to `dist/`. Every
68+
// suite here mocks them; the mocks and the imports resolve through these
69+
// same entries. Their own imports (`@objectstack/platform-objects/apps`,
70+
// `@objectstack/spec/system`) are already aliased above and below.
71+
{ find: /^@objectstack\/setup$/, replacement: path.resolve(__dirname, '../../apps/setup/src/index.ts') },
72+
{ find: /^@objectstack\/account$/, replacement: path.resolve(__dirname, '../../apps/account/src/index.ts') },
6573
{ find: /^@objectstack\/formula$/, replacement: path.resolve(__dirname, '../../formula/src/index.ts') },
6674
{ find: /^@objectstack\/metadata-core$/, replacement: path.resolve(__dirname, '../../metadata-core/src/index.ts') },
6775
// Subpath BEFORE the bare package: `@objectstack/core` is a PREFIX match with a

0 commit comments

Comments
 (0)