-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ci: Work around npm behavior changes to fix CI on main #206
Conversation
A change between npm 8.9 and 8.10 started running the main package's `prepare` script as part of the examples' installs. This broke CI when the install step launched a fork bomb and got killed after several minutes. This change should fix builds on `main`.
Looks like there are two behavior changes in npm since 8.5 that are breaking our CI. I'm not yet confident enough that our usage is intended to be supported to call them regressions or breaking changes, so I'm sticking with behavior changes for now. I have a workaround for the second change that is still causing CI to fail on this branch. (Spoiler alert: peer deps, or course.) I needed to step away for a bit but will push the fix later. |
Something about peer dependencies changed between npm 8.5.5 and 8.6.0 that is causing CI to fail on `main` with ESLint 6 on the test matrix. This works around the issue.
@@ -82,7 +82,7 @@ describe("recommended config", () => { | |||
// eslint-disable-next-line no-invalid-this | |||
this.timeout(30000); | |||
|
|||
execSync("npm link && npm link eslint-plugin-markdown"); | |||
execSync("npm link && npm link eslint-plugin-markdown --legacy-peer-deps"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have to use --legacy-peer-deps
because there is no version of eslint-plugin-jsdoc
that supports ESLint 6, 7, and 8. --legacy-peer-deps
disables additional peer dependency checks that were added in npm 8.6.0 and caused our CI to begin failing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
These commits address two behavior changes in npm that changed between Node 16.15.0, which bundles npm 8.5.5, and Node 16.15.1, which bundles npm 8.11.0:
prepare
script recursively as part of the examples' sub-installs. This broke CI when the install step launched a fork bomb and got killed after several minutes on recent versions of Node that ship npm >= 8.10.0. I've left a comment on [BUG] npm install on Mac - Out of Memory npm/cli#4895, which appears to be related.These changes should fix builds on
main
.