Skip to content

Commit 867f477

Browse files
committed
test(runtime): alias the @objectstack/lint package root to source (#29603)
check:test-source-alias reds a test that imports a workspace dep through dist/. The module-top preload of @objectstack/lint is one, so the bare specifier gets its anchored entry beside the /runtime one; the protocol's lazy view-read import resolves through the same entry, so the read judges the lint rule in the checkout. Claude-Session: https://claude.ai/code/session_01ADHkmRczGnhouFCUs9DfQ2 Co-authored-by: Claude <noreply@anthropic.com>
1 parent da6bf16 commit 867f477

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎packages/runtime/vitest.config.ts‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,11 @@ export default defineConfig({
152152
// dependency closure with `resolvePackageClosure`, the one walk the save
153153
// door's publish gate uses; its tests judge the source, never `dist/`.
154154
{ find: /^@objectstack\/lint\/runtime$/, replacement: path.resolve(__dirname, '../lint/src/runtime.ts') },
155+
// [#29603] The package root: a served view read imports it lazily for the
156+
// form-layout warnings (metadata-protocol's `loadFormLayoutLint`), and
157+
// `meta-write-org-scope.test.ts` pays that load at module top. Both
158+
// resolve here, so the read judges the lint rule in the checkout, never `dist/`.
159+
{ find: /^@objectstack\/lint$/, replacement: path.resolve(__dirname, '../lint/src/index.ts') },
155160
// The MCP bridge (`domains/mcp.ts`) reads "this field declares options"
156161
// through `@objectstack/formula`'s `declaresOptions`; its tests judge the
157162
// predicate in the checkout, never `dist/`.

0 commit comments

Comments
 (0)