Skip to content

Conversation

MylesBorins
Copy link
Contributor

npm 7 and higher now have an exit code for failed fetches. This introduces a subtle behavior change in testing as the error cases are slightly different. This tiny change to grab-module-data.js adds a regex to ensure a consistent code path is followed across all maintained versions of npm.

TBH there is likely a cleaner way to fix this, but it would involve a lot more refactoring which could create other unexpected bugs.

This should fix the broken CITGM test suite

npm 7 and higher now have an exit code for failed fetches. This
introduces a subtle behavior change in testing as the error cases are
slightly different. This tiny change to `grab-module-data.js` adds a
regex to ensure a consistent code path is followed across all
maintained versions of npm.

TBH there is likely a cleaner way to fix this, but it would involve
a lot more refactoring which could create other unexpected bugs.
@MylesBorins
Copy link
Contributor Author

It looks like windows CI on 16 is still failing, but it is unrelated to the test that has currently been broken on all platforms. So I think we should consider landing this as an iterative change to fix broken CI while we figure out what is going on with windows

@targos targos merged commit 468452d into nodejs:main Sep 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants