-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Bump which
to v4
#139
Bump which
to v4
#139
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,10 @@ var sandbox = require('sandboxed-module'); | |
var binary = utils.normalizeBinary; | ||
|
||
sandbox.configure({ | ||
requires: { | ||
// sandboxed-module is unable to find this module directly | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ... because it is not listed at https://github.com/felixge/node-sandboxed-module/blob/v2.0.4/lib/builtin_modules.json and would therefore result in the module being resolved as a relative file path? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I opened a PR upstream. This PR can be merged in the meanwhile because that package hasn't seen updates in 4 years. |
||
"fs/promises": require("fs/promises"), | ||
}, | ||
globals: { | ||
// As of Node 12.x, the process global is no longer an enumerable property of the global. | ||
// https://github.com/nodejs/node/pull/26882 | ||
|
@@ -160,9 +164,7 @@ describe("lib/utils", function () { | |
|
||
var binary = sandbox.require("../../lib/utils", { | ||
requires: { | ||
which: function(bin, callback) { | ||
callback(null, "/usr/bin/" + bin); | ||
} | ||
which: async (bin) => "/usr/bin/" + bin | ||
} | ||
}).normalizeBinary; | ||
|
||
|
@@ -247,9 +249,7 @@ describe("lib/utils", function () { | |
|
||
var binary = sandbox.require("../../lib/utils", { | ||
requires: { | ||
which: function(bin, callback) { | ||
callback(null, "/usr/bin/" + bin); | ||
} | ||
which: async (bin) => "/usr/bin/" + bin | ||
} | ||
}).normalizeBinary; | ||
|
||
|
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.
Version 4.0.0 drops Node 14 support, and does not have other significant changes, per https://github.com/npm/node-which/blob/main/CHANGELOG.md#400-2023-08-29
If we are planning to release a major version then this lgtm. Otherwise we should use 3.0.1 instead.
Considering that we are indeed preparing for a major version in #89, 4.0.0 here is acceptable.