-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Follow XDG OS conventions for storing data #1570
Conversation
if (prog.devDir) { | ||
prog.devDir = prog.devDir.replace(/^~/, homeDir) | ||
} else if (homeDir) { | ||
prog.devDir = path.resolve(homeDir, '.node-gyp') | ||
prog.devDir = envPaths('node-gyp', { suffix: '' }).cache |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The suffix is 'nodejs' by default, another option is: envPaths('gyp')
which will result in gyp-nodejs
.
I opted for .cache
because I think it fits the type of data more than .data
since it is data being cached to prevent unneeded requests.
Could you take out |
@refack yes, consider it done. 👍 |
"request": "^2.87.0", | ||
"rimraf": "2", | ||
"semver": "~5.3.0", | ||
"tar": "^3.1.3", | ||
"which": "1" | ||
}, | ||
"engines": { | ||
"node": ">= 4.0.0" | ||
"node": ">= 6.0.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is tricky. We need more buy-in from other contributors.
@nodejs/node-gyp
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So far there have been no objections to dropping support for Node.js <6 for node-gyp v4 (#1519). I also suggested dropping support for Node.js 6 which will be EOL in April.
@Siilwyn thank you. |
Good to hear, looking forward to the merge. :) |
CI: https://ci.nodejs.org/job/nodegyp-test-pull-request/98/ |
After running CI I found this:
(version 6 was tested on a different worker) |
Breaking change: needs Node.js version 6 or higher #1570 Reviewed-By: Refael Ackermann <[email protected]>
PR-URL: #1570 Fixes: #175 Fixes: #1124 Reviewed-By: Refael Ackermann <[email protected]>
Breaking change: needs Node.js version 6 or higher #1570 Reviewed-By: Refael Ackermann <[email protected]>
PR-URL: #1570 Fixes: #175 Fixes: #1124 Reviewed-By: Refael Ackermann <[email protected]>
npm install && npm test
passesDescription of change
Closes #175 and #1124. Besides changes to follow the XDG standard I took the liberty to:
osenv
dependency with nativeos
to decrease the amount of dependencies.Since
os.userInfo()
requires Node.js 6 or higher and the default data location is changed this would be a major version bump. I did not go for moving the old locations or falling back because it adds unneeded complexity not worth the trouble.