fix(guard): assert the notes toolchain PAIR, and stop using require.resolve #12
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/notes-toolchain-pair-guard"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Replaces #11, which should not be merged (reasons at the bottom).
The guard was wrong twice over
It shipped as a floor —
generator >= 15. That rejects the all-stable pair (generator 14 + preset 9), which renders fine, and says nothing about the preset, which is half of what decides whether notes render at all.It also looked at the wrong thing.
require.resolvethrowsERR_PACKAGE_PATH_NOT_EXPORTEDon preset v10 and generator 15 (both ESM-only) under CJS, and thetry/catcharound it turned that into a silentreturn null→ "compatible". On exactly the combination the guard exists to catch. Version lookup now walksnode_moduleson disk.The matrix, measured
Rendered real commits through
generateNotes()against real installs of each pair:requires conventional-changelog-writer@9 or newerheaderPartial is not a functionRow one is the original bug reproduced exactly. Upstream only added the loud error by preset 10.4.0, so the months-long silent window was real, and a pair guard is the only thing that closes it.
Scope
Dependencies are unchanged. The generator 15 + preset 10 pairing is deliberate (#10) and stays. Both pairs are legal for consumers; a consumer's own manifest decides which it gets.
The error message now states the sanctioned state explicitly, and warns that
npm install <pkg>cannot correct a bad pair — the beta doesn't satisfy semantic-release's own^14, so npm nests the incompatible copy exactly where semantic-release loads it from. That misunderstanding already produced one wrong fix on the infrastructure side (e57b6f2, reverted in webgrip/infrastructure#133).The matrix is a test now, not a comment, via an exported pure predicate. 31/31 pass.
Why #11 is being closed rather than merged
Its guard rewrite is good and is preserved here. The rest of it is not:
184967d, an ancestor of main, from PR #10. My clone was 17 days stale and agit fetchhad failed silently.enginesdowngrade, same origin.{ type: 'chore', release: false }and five siblings.compareReleaseTypesranksfalseat -1, abovemajor, so one matchingfalserule vetoes every positive rule — which is whychore(deps)bumps never released from 1.0.0 until 1.2.3 removed them. #11 restores that bug, justified by "1.2.3's rationale is unrecoverable: its release commit never landed" — the same false premise.