mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-12 21:53:00 -06:00
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:
committed by
GitHub
parent
f8e35afecc
commit
87fbc19fe3
@@ -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", {
|
||||
|
||||
Reference in New Issue
Block a user