fix: complete lint toolchain reuse in worktrees (#111467)

* fix(scripts): complete worktree lint toolchain

* fix(scripts): prepare complete lint pipeline
This commit is contained in:
Peter Steinberger
2026-07-19 08:58:43 -07:00
committed by GitHub
parent f8e35afecc
commit 87fbc19fe3
13 changed files with 226 additions and 13 deletions
@@ -16,6 +16,7 @@ import {
parseMode,
resolveBoundaryEntryShimRequiredOutputs,
resolveBoundaryRootShimsTimeoutMs,
resolveTsxImportSpecifier,
runNodeStep,
runNodeSteps,
runNodeStepsInParallel,
@@ -100,6 +101,33 @@ async function waitForProcessExit(
}
describe("prepare-extension-package-boundary-artifacts", () => {
it("resolves the tsx loader from the selected checkout toolchain", () => {
const tsxBinPath = "/primary/node_modules/.bin/tsx";
const loaderPath = "/primary/node_modules/tsx/dist/loader.mjs";
expect(
resolveTsxImportSpecifier({
resolveTool: (toolName) => {
expect(toolName).toBe("tsx");
return tsxBinPath;
},
ensureToolchain: (toolPath) => {
expect(toolPath).toBe(tsxBinPath);
return "/worktree/node_modules";
},
createRequireFrom: (filename) => {
expect(filename).toBe(tsxBinPath);
return {
resolve(packageName) {
expect(packageName).toBe("tsx");
return loaderPath;
},
};
},
}),
).toBe(pathToFileURL(loaderPath).href);
});
it("prefixes each completed line and flushes the trailing partial line", () => {
let output = "";
const writer = createPrefixedOutputWriter("boundary", {