Commit e09d833
fix(pm): resolve a module-relative watch-hint literal against the script that wrote it
`extractWatchHints` stripped a leading `./`/`../` run, which assumed the writer
sits at the depth its own prefix climbs to. That holds for `scripts/*.mjs` and
fails for a gate inside a package: `packages/spec/scripts/*` writing
`'./lib/dist-freshness'` produced the top-level `lib/dist-freshness`, a string
this tree has no `lib/` for, while the file it names is on disk. The residue
then asserted "never was a repo path" about files that exist.
The literal is now resolved against `dirname(scriptPath)` through the same
`relative(root, resolve(...))` idiom `firstPartyImportTargets` already uses.
Admission is unchanged — it still reads the literal as the author wrote it —
so only the hint's VALUE moves.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UjM2ia8Av1v5NqfqQEQmC61 parent 68c5dba commit e09d833
1 file changed
Lines changed: 211 additions & 32 deletions
0 commit comments