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

Adds a node-gyp plugin #44

Merged
merged 4 commits into from
Mar 27, 2019
Merged

Adds a node-gyp plugin #44

merged 4 commits into from
Mar 27, 2019

Conversation

arcanis
Copy link
Member

@arcanis arcanis commented Mar 27, 2019

The node-gyp package is a bit magic in both Yarn and npm in that it is downloaded on-demand if the package requests it. It's a horrible thing to do because you have no way to guarantee which version of node-gyp will be used. Still, that's how the ecosystem currently works and there's some friction to change it so I'll have to live with it for now (lovell/sharp#924).

This PR implements a plugin that causes node-gyp to be installed when called, unless overridden by an explicit dependency. There's one improvement over Yarn 1 and npm, though: you can enforce the version of node-gyp that gets used by using the new node-gyp-magic-locator settings:

node-gyp-magic-locator: "[email protected]"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant