mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-03 07:54:40 +08:00
pnpm node-compat fetched Node's docs on every run, even though only the classification changes between pins. pnpm node-compat --local now reclassifies the committed ledger rows from the current sources and rewrites the ledger and the public artifact, the same files a fetching run writes while the pin is unchanged. scripts/regen-generated.mjs uses it after a merge: for each generated file still in conflict it takes the merged-in branch's version, regenerates the surface manifest and the compatibility files from the merged sources, and stages them, so these files never need a hand merge.
12 lines
403 B
JavaScript
12 lines
403 B
JavaScript
#!/usr/bin/env node
|
|
|
|
import { spawnSync } from "node:child_process";
|
|
|
|
const args = process.argv.slice(2).filter((arg) => arg === "--check" || arg === "--local");
|
|
|
|
for (const script of ["generate.mjs"]) {
|
|
const result = spawnSync(process.execPath, [`src/${script}`, ...args], { stdio: "inherit" });
|
|
if (result.error) throw result.error;
|
|
if (result.status !== 0) process.exit(result.status ?? 1);
|
|
}
|