This repository was archived by the owner on Mar 3, 2023. It is now read-only.
deps: "downgrade" node-fetch to ^v2.6.7 in script/ (fix "Bump dependencies" job in Nightly CI) #23647
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Requirements for Contributing a Bug Fix (from template, click to expand...)
Identify the Bug
The "Bump dependencies" job of the Nightly CI pipeline has been broken since #23506 landed.
See my comment here: #23506 (comment) for details.
Description of the Change
In the script/ dir, downgrade node-fetch from 3.x to ^2.6.7.
Alternate Designs
Could properly import node-fetch 3.x as an ESM module.
I personally don't see why to go through that trouble when the 2.x branch is what we were using before, still supported, still works, even recommended for CommonJS projects such as Atom's build and CI scripts. See: https://github.com/node-fetch/node-fetch/blob/v3.2.0/docs/v3-UPGRADE-GUIDE.md#converted-to-es-module
(Link documents ESM import instructions/considerations for node-fetch v3, as part of a general node-fetch v2 to v3 migration guide.)
Possible Drawbacks
I guess the 2.x branch of node-fetch could theoretically go out of support at some point, at which time we might wish to have done a proper migration to v3 already to overcome the breaking changes and have smoother upgrade to v3/v4/...? Unclear if this will ever be necessary. Just speculating so I have something to write under this heading.
Verification Process
Read some docs and interpreted error messages from Atom's CI, did some detective work... See #23506 (comment) again for details/background that led me to this solution.
Also, this makes the "Bump dependencies" job in Nightly CI pass at my fork: https://dev.azure.com/DeeDeeG/b/_build/results?buildId=1232&view=logs&j=6f0e81e9-e86f-5543-732c-a45afe53d8f1
Release Notes
N/A