You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CI inference: yarn install, pnpm install and flags inside a package.json script are read as script names #197
infer.ts reads a top-level run: line with packageManagerCommand, so npm ci and yarn install are installs, not script references (the SEMANTIC_REPAIR_01 fix described near the top of infer.ts). Nested references inside a package.json script are found differently. resolveScript (src/ci-inference/resolve.ts) still uses
That takes the next word after bare yarn/pnpm as a script name, even when the word is an install verb, a builtin, or a flag.
Repro
resolveScript(dir, "ci", …) on main (40aa308), with build: "tsc" declared:
ci script
Result on main
yarn install && yarn run build
install: UNRESOLVED — package.json declares no script named "install"
pnpm install --frozen-lockfile && pnpm build
install: UNRESOLVED
yarn --frozen-lockfile && yarn build
--frozen-lockfile: UNRESOLVED
pnpm -r build
-r: UNRESOLVED — no script named "-r"
npm run -s build
-s: UNRESOLVED
Each one leaves ci UNRESOLVED, so a step running npm run ci fails SCRIPTS_RESOLVED and is not executable.
Impact
False refusals for very common script bodies ("ci": "yarn install && yarn test", pnpm -r build). The receipt also blames a missing script named install or -r, which misleads anyone reading it.
Failing test
tests/ci-inference/script-pm-verbs.test.ts in the linked PR. Output on main:
✖ an install or builtin verb inside a script is not a script reference
AssertionError [ERR_ASSERTION]: yarn install && yarn run build
+ [ 'install' ]
- []
✖ a flag before the script name is not a script name
+ [ '-r' ]
- []
✖ a missing nested script is still unresolved
+ 'install',
Activity
fix(ci-inference): read nested package-manager calls like top-level o…