Skip to content
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

Update apm to remove node-gyp logic #19482

merged 3 commits into from Jun 13, 2019


Copy link

commented Jun 11, 2019

Template does not apply - this is a package version bump.

See atom/apm#845 for the majority of the details. We now delegate to npm to handle Electron header installation rather than trying to do it ourselves through node-gyp.

2.3.0 also contains a Node version bump to 10.2.1, in order to match Electron 3.


This comment has been minimized.

Copy link

commented Jun 12, 2019

Looks like all the CI builds failed to download, however I'm not sure why it was trying to grab that in the first place.


This comment has been minimized.

Copy link
Member Author

commented Jun 12, 2019

Yep! I have a fix locally and will push it tonight.

Background as to why this is happening:

  • node-gyp uses really simple logic to determine the dist URL. Any target version >=1 <4 is assumed to be iojs. That's where the iojs URL is coming from.
  • But wait! apm passes the --dist-url to npm! Yep...except it doesn't seem like npm passes this flag to node-gyp, rendering it effectively useless.
    • (npm's install logic is also extremely convoluted, and I can't for the life for me figure out where npm shells out to node-gyp or how it does the command-line argument -> environment variable fallback, so this is just an educated guess).

I'm confused as to how node-gyp is picking up on the correct Electron version but not the dist URL (is it only picking up a subset of the flags we pass to npm?), but specifying all of these options using environment variables seems to work, so that's my fix.

50Wliu added some commits Jun 13, 2019

@50Wliu 50Wliu merged commit 7faea50 into master Jun 13, 2019

2 checks passed

Atom Pull Requests #20190613.2 succeeded
continuous-integration/appveyor/pr AppVeyor build succeeded

@50Wliu 50Wliu deleted the wl-update-apm branch Jun 13, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.