-
Notifications
You must be signed in to change notification settings - Fork 295
Upgrade npm #875
Upgrade npm #875
Conversation
7136c5a to
b78683b
Compare
|
Hi, I was looking into migrating I see that this PR currently breaks the tests for this repo, but the built Steps to reproduce:
Explanation/results of steps to reproduce (demonstrates that You can run Note: I can confirm this PR is an improvement over stable/release (In stable See also: My minimal branch with similar results to this PR (working |
|
Yeah, I think the CI on this repo is just haunted at this point 😅 Although the failures on this branch are different from the ones you can get on master, I noticed. |
This comment has been minimized.
This comment has been minimized.
|
Short summary of this comment: I know what's breaking the tests on Python 2, and have patches to fix all but four of the failures (in two very similar/almost identical tests) under Python 2. Many more tests fail on Python 3, and I'm stumped for the moment on how to fix those. I found out what the issues are that are breaking the tests. (At least under Python 2). Variations on "Node isn't sure what package to use, or where to find it."
There's another issue as well (I don't have a patch for this at the moment; I'm not very fluent with JS so it's a lot to pick up at once here):
These fixes are enough to make all the tests pass using Python 2.7, but several more tests fail when using Python 3 (I'm using Python 3.8.2 for my version of python3). So there would be additional work to track those down. Most/all of these seem somehow obscurely related to There's another issue that tends to get fixed automatically by running enough
Could not install from "node_modules/jasmine-focused/jasmine-node@git+https:/github.com/kevinsawicki/jasmine-node.git#81af4f953a2b7dfb5bde8331c05362a4b464c5ef" as it does not contain a package.json file.
|
|
Ooh thanks for taking the time to dig in further, @DeeDeeG 😍 Can you create a new pull request with the commits from this ref and yours? You're a lot closer than I was, and I likely won't have time to do a bunch of cherry-picking to take this one over the edge before you could. |
|
I posted #887 with the minimal-diff/less-adventurous versions of the fixes. |
Requirements
Description of the Change
This upgrades our bundled npm from 6.2.0 to the latest release, npm 6.13.0.
Alternate Designs
Because my primary motivations for doing this are to take advantage of node-gyp improvements, I thought about adding a direct dependency on node-gyp, which would let us control our node-gyp version directly moving forward. However, relying on npm's node-gyp dependency means that we benefit from npm's diligence in vetting compatibility and so on, and makes us less likely to neglect to upgrade node-gyp as well as npm in the future.
Benefits
The newer version of node-gyp introduced by this bump - v5.0.5 - features Python 3 compatibility and support for VS2017 and VS2019. Significantly, this will unblock us from being able to test Atom packages on GitHub Actions, whose Windows runners include (at the oldest) VS2017. This should unblock me on atom/github#2298, although I won't know for sure
The newer node-gyp also includes an upstream fix for the hack we used to #499 forever ago, introduced in #673 and #703. This should address Python-related issues like #818 and #698.
Beyond that, this will also allow us to take advantage of other npm improvements as found in their CHANGELOG.
Possible Drawbacks
This is a minor-version dependency bump and the npm client is used by far more people than those who use apm, so it should be quite safe. There's always a risk that we'll break some package or other though.
Verification Process
We have good unit test coverage for the problem described in #499.
Applicable Issues
#499, #818, #698, likely others.