-
Notifications
You must be signed in to change notification settings - Fork 444
test: skip yarn install tests on Node 20.12.2 due to transitive dep c… #7880
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
Conversation
…onstraints Since Node 20 reaches EOL in April 2026, skip these tests rather than doing an override
📊 Benchmark results
|
|
@jaredm563 an additional note for the PR description: the reason this is a problem at all is that despite the fact that the netlify-cli package includes an |
serhalp
left a comment
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, thanks!
e2e/install.e2e.ts
Outdated
| // TODO: Figure out why this flow is failing on Windows. | ||
| const npxOnWindows = platform() === 'win32' && 'run' in config |
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.
while you're here... am I reading this wrong or is this dead code? There's never 'run' in config in this describe. I think this might be leftover from splitting out the run tests into a separate describe below?
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.
Nope, you're totally right.
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.
poor cli needs some love
…all run tests on Windows
|
Removed the dead |
| // TODO: Figure out why this flow is failing on Windows. | ||
| const npxOnWindows = platform() === 'win32' && 'run' in config | ||
| const skipOnWindows = platform() === 'win32' | ||
|
|
||
| itWithMockNpmRegistry.skipIf(npxOnWindows)('runs commands without errors', async ({ registry }) => { | ||
| itWithMockNpmRegistry.skipIf(skipOnWindows)('runs commands without errors', async ({ registry }) => { |
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.
🤔 but I think this is the case where the 'run' thing was relevant. Now that we've removed the condition, it—oh I see 🤦🏼. In this case it was always true and in the other case it was always false So they were both dead code in different ways. 👍🏼
Problem: Yarn v1 enforces engine constraints strictly. A transitive dep (chokidar@5) requires node >=20.19.0
Since Node 20 reaches EOL in April 2026, skip these tests rather than doing an override
The reason this is a problem at all is that despite the fact that the netlify-cli package includes an npm-shrinkwrap.json file, which enforces strict dependency tree resolution for netlify-cli consumers, this is only respected by npm and pnpm, not yarn v1. In other words, npm i -g [email protected] and pnpm add -g [email protected] are deterministic but yarn global add [email protected] is not.
The alternatives would be
-Pinning Chokidar to an older version
-Bumping the node version
But considering these can introduce breaking changes, and the fact the Node 20 is EOL in ~3 months, we can just skip this and leave a comment for maintainers to understand why we have to make this workaround.
🎉 Thanks for submitting a pull request! 🎉
Summary
Fixes #<replace_with_issue_number>
For us to review and ship your PR efficiently, please perform the following steps:
passes our tests.
A picture of a cute animal (not mandatory, but encouraged)