Problem
When running the test suite (bun run test) on Windows, packages/leadtype/src/internal/package-surface.test.ts fails during the framework boundary check (does not let framework runtimes leak into core modules):
AssertionError: expected [ ... ] to deeply equal []
+ [
+ { "file": "search\\react.ts", "specifier": "react" },
+ { "file": "search\\svelte.ts", "specifier": "svelte/store" },
+ { "file": "search\\vue.ts", "specifier": "vue" },
+ { "file": "webmcp\\react.ts", "specifier": "react" },
+ { "file": "webmcp\\svelte.ts", "specifier": "svelte" },
+ { "file": "webmcp\\vue.ts", "specifier": "vue" }
+ ]
Root Cause
path.relative() returns platform-native path separators. On Windows, this results in relative paths containing backslashes (e.g. search\react.ts). The exclusion rules in package-surface.test.ts compare these values against hardcoded POSIX-style paths (e.g. search/react.ts, webmcp/react.ts).
Because the path separators differ, the exclusion checks fail to match the intended files, causing legitimate framework adapter modules to be incorrectly reported as framework boundary violations.
Solution
Normalize relative file paths to POSIX format before applying the boundary exclusion rules:
const relativePath = path
.relative(rootDir, file)
.replaceAll("\\", "/");
This ensures the boundary checks behave consistently across Windows and POSIX platforms, preventing false-positive framework leak detections during the test suite.
Problem
When running the test suite (
bun run test) on Windows,packages/leadtype/src/internal/package-surface.test.tsfails during the framework boundary check (does not let framework runtimes leak into core modules):Root Cause
path.relative()returns platform-native path separators. On Windows, this results in relative paths containing backslashes (e.g.search\react.ts). The exclusion rules inpackage-surface.test.tscompare these values against hardcoded POSIX-style paths (e.g.search/react.ts,webmcp/react.ts).Because the path separators differ, the exclusion checks fail to match the intended files, causing legitimate framework adapter modules to be incorrectly reported as framework boundary violations.
Solution
Normalize relative file paths to POSIX format before applying the boundary exclusion rules:
This ensures the boundary checks behave consistently across Windows and POSIX platforms, preventing false-positive framework leak detections during the test suite.