Repository navigation
XRAY-171777 - Improve npm debug parser in npm debug jf ca flow - #958
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
373fdc3 to
3c487e3
Compare
|
Question (non-blocking, likely a follow-up): while verifying this fix against npm 11.20, a parent that has no Is that shape intentionally out of scope here? If so, a separate ticket may be worthwhile. Mapping the bare location to the root would misattribute Review generated by xray-pr-review |
3c487e3 to
f801bb4
Compare

devbranch.Summary
Fixes XRAY-171777:
jf curation-auditreturned the raw npmETARGETerror, with no blocked table, when a CVS-hidden version is exact-pinned andpackage.jsonhas noname or version.
Cause
npm logs a parent (
OK for: <name>@<version>) in itsplaceDepdebug line only whenpackage.jsonhas both aname and a version. Otherwise it logs a blank parent (
OK for: want: <spec>).npmPlaceDepRegexrequired aparent, so the npm debug-log fallback parsed no entries, sent no probe, and returned the original error.
Change
npmPlaceDepRegex: the parent is optional, and its version may be blank ((\S*)).buildGraphFromLogEntries: a blank parent can only be the root, so it maps to the root id. Without this, aname-only or version-only
package.jsonleaves the graph with no children.Tests
package.json).Before
After