ci: prepare extension lint artifacts

This commit is contained in:
Peter Steinberger
2026-04-08 03:53:57 +01:00
parent 5f6ea077af
commit f180474c2d
2 changed files with 46 additions and 7 deletions

View File

@@ -20,6 +20,8 @@ export function runExtensionOxlint(params) {
const tempConfigPath = path.join(tempDir, "oxlint.json");
try {
prepareExtensionPackageBoundaryArtifacts(repoRoot);
const extensionFiles = params.roots.flatMap((root) =>
collectTypeScriptFiles(path.resolve(repoRoot, root)),
);
@@ -50,6 +52,37 @@ export function runExtensionOxlint(params) {
}
}
function prepareExtensionPackageBoundaryArtifacts(repoRoot) {
const releaseLock = acquireLocalHeavyCheckLockSync({
cwd: repoRoot,
env: process.env,
toolName: "extension-package-boundary-artifacts",
lockName: "extension-package-boundary-artifacts",
});
try {
const result = spawnSync(
process.execPath,
[path.resolve(repoRoot, "scripts", "prepare-extension-package-boundary-artifacts.mjs")],
{
cwd: repoRoot,
stdio: "inherit",
env: process.env,
},
);
if (result.error) {
throw result.error;
}
if ((result.status ?? 1) !== 0) {
process.exit(result.status ?? 1);
}
} finally {
releaseLock();
}
}
function writeTempOxlintConfig(repoRoot, configPath) {
const config = JSON.parse(fs.readFileSync(path.resolve(repoRoot, ".oxlintrc.json"), "utf8"));