use node-gyp correctly in the tests#898
Conversation
This comment has been minimized.
This comment has been minimized.
That's not correct. Using a newer npm (#900) changes the location of node-gyp which results in the test failure. |
This comment has been minimized.
This comment has been minimized.
This is with the old npm. I have already tested this: atom-community#10 (comment)
|
|
I see you are right. Sorry for the misunderstanding. |
This comment has been minimized.
This comment has been minimized.
|
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
|
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 |
|
That works. Thanks for addressing it. This look good to me now. |
|
Thanks 🙇🏾♂️ @aminya |
|
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