Uh oh!
There was an error while loading. Please reload this page.
use node-gyp correctly in the tests - #898
Conversation
This comment has been minimized.
This comment has been minimized.
aminya
commented
Sep 4, 2020
That's not correct. Using a newer npm (#900) changes the location of node-gyp which results in the test failure. |
Uh oh!
There was an error while loading. Please reload this page.
This comment has been minimized.
This comment has been minimized.
aminya
commented
Sep 4, 2020
This is with the old npm. I have already tested this: atom-community#10 (comment)
|
DeeDeeG
commented
Sep 4, 2020
I see you are right. Sorry for the misunderstanding. |
This comment has been minimized.
This comment has been minimized.
aminya
commented
Sep 5, 2020
I don't understand what you are trying to achieve. I just added a devDependency which is only used in the tests. This does not affect Atom or anything. This machine-generated package-lock.json does not change by running |
This comment has been minimized.
This comment has been minimized.
in sync with npm 6
aminya
commented
Sep 5, 2020
The point of this PR is to not rely on npm's hoisting algorithm and package-lock.json which are susceptible to change. Updating package-lock.json with a different command is not sustainable and is a very fragile approach. If a certain version of |
DeeDeeG
commented
Sep 5, 2020
That works. Thanks for addressing it. This look good to me now. |
darangi
commented
Oct 15, 2020
Thanks 🙇🏾♂️ @aminya |
aminya
commented
Oct 15, 2020
You're welcome! |
Description of the change
This uses npm's built-in node-gyp which is used in the tests. The tests assume that node-gyp should exist in node_modules, but this is an assumption about the test environment which may not be true. npm does not hoist
node-gypwhich is a dependency of thenpmto the top-levelnode-modulesin the newer versions. It addsnode-gypto devDependencies just forinstall-spectest.apm/spec/install-spec.coffee
Lines 536 to 541 in 475d35f
Verification
The tests now pass correctly. This is tested on Atom too: atom-community/atom#103
Drawbacks
none
Release Notes
N/A
Closes#10