fix(scripts): resolve remaining repo tools through the worktree-aware helper (#111417)

Follow-up to #111393: run-tsgo, check-tsgo-core-boundary, profile-tsgo,
and the format-docs oxfmt shim still resolved node_modules/.bin from the
current checkout only, so dependency-less linked worktrees died with
ENOENT before oxlint's boundary prep could run. All four now use
resolveRepoToolBinPath, completing local lint/typecheck tooling for
linked worktrees.
This commit is contained in:
Peter Steinberger
2026-07-19 06:47:32 -07:00
committed by GitHub
parent d0f37bd843
commit 29ef6f8637
4 changed files with 8 additions and 4 deletions
+2 -1
View File
@@ -3,10 +3,11 @@
// Enforces core tsgo project boundaries and sparse-checkout safety.
import { spawnSync } from "node:child_process";
import path from "node:path";
import { resolveRepoToolBinPath } from "./lib/local-heavy-check-runtime.mjs";
import { createManagedCommandInvocation } from "./lib/managed-child-process.mjs";
const repoRoot = path.resolve(import.meta.dirname, "..");
const tsgoPath = path.join(repoRoot, "node_modules", ".bin", "tsgo");
const tsgoPath = resolveRepoToolBinPath("tsgo", { cwd: repoRoot });
const coreGraphs = [
{ name: "core", config: "tsconfig.core.json" },
+2 -1
View File
@@ -6,6 +6,7 @@ import fs from "node:fs";
import os from "node:os";
import path from "node:path";
import { pathToFileURL } from "node:url";
import { resolveRepoToolBinPath } from "./lib/local-heavy-check-runtime.mjs";
import { repairMintlifyAccordionIndentation } from "./lib/mintlify-accordion.mjs";
import { buildCmdExeCommandLine, resolveWindowsCmdExePath } from "./windows-cmd-helpers.mjs";
@@ -124,7 +125,7 @@ export function resolveOxfmtInvocation(args, params = {}) {
const platform = params.platform ?? process.platform;
const existsSync = params.existsSync ?? fs.existsSync;
const shimName = platform === "win32" ? "oxfmt.cmd" : "oxfmt";
const shimPath = path.join(repoRoot, "node_modules", ".bin", shimName);
const shimPath = resolveRepoToolBinPath(shimName, { cwd: repoRoot, fileExists: existsSync });
if (existsSync(shimPath)) {
if (platform === "win32") {
+2 -1
View File
@@ -8,13 +8,14 @@ import path from "node:path";
import {
acquireLocalHeavyCheckLockSync,
applyLocalTsgoPolicy,
resolveRepoToolBinPath,
shouldAcquireLocalHeavyCheckLockForTsgo,
} from "./lib/local-heavy-check-runtime.mjs";
import { createManagedCommandInvocation } from "./lib/managed-child-process.mjs";
const repoRoot = path.resolve(import.meta.dirname, "..");
const artifactRoot = path.resolve(repoRoot, ".artifacts/tsgo-profile");
const tsgoPath = path.resolve(repoRoot, "node_modules", ".bin", "tsgo");
const tsgoPath = resolveRepoToolBinPath("tsgo", { cwd: repoRoot });
const GRAPH_DEFINITIONS = {
core: {
+2 -1
View File
@@ -7,6 +7,7 @@ import {
acquireLocalHeavyCheckLockSync,
applyLocalTsgoPolicy,
resolveLocalHeavyCheckEnv,
resolveRepoToolBinPath,
shouldAcquireLocalHeavyCheckLockForTsgo,
} from "./lib/local-heavy-check-runtime.mjs";
import { createManagedCommandInvocation } from "./lib/managed-child-process.mjs";
@@ -20,7 +21,7 @@ const { args: finalArgs, env } = applyLocalTsgoPolicy(
resolveLocalHeavyCheckEnv(process.env),
);
const tsgoPath = path.resolve("node_modules", ".bin", "tsgo");
const tsgoPath = resolveRepoToolBinPath("tsgo");
const tsBuildInfoFile = readFlagValue(finalArgs, "--tsBuildInfoFile");
if (tsBuildInfoFile) {
fs.mkdirSync(path.dirname(path.resolve(tsBuildInfoFile)), { recursive: true });