fix: keep lazy editor build portable

Issue: #337
User-Visible: no
This commit is contained in:
Matysh
2026-08-28 08:29:44 +03:00
parent 59be9c8565
commit df450c9c5e
18 changed files with 142 additions and 113 deletions
+17
View File
@@ -103,3 +103,20 @@ test('lazy runtime boundary keeps the eager entry independent and does not grow
);
assert.ok(anyCount <= 1123, `src any count grew from 1123 to ${anyCount}`);
});
test('source type references stay portable across build hosts', () => {
const sources = [];
const visit = (directory) => {
for (const name of readdirSync(directory)) {
const path = join(directory, name);
if (statSync(path).isDirectory()) visit(path);
else if (/\.ts$/.test(name)) sources.push(readFileSync(path, 'utf8'));
}
};
visit(join(repoRoot, 'src'));
assert.doesNotMatch(
sources.join('\n'),
/import\(["'][A-Za-z]:[\\/]/,
'type imports must not capture an absolute Windows workspace path',
);
});