Comparing version 1.17.0 to 1.18.0
@@ -6,3 +6,3 @@ var fs = require('fs'); | ||
var normalizeOptions = require('./normalize-options.js'); | ||
var isCore = require('./is-core'); | ||
var isCore = require('is-core-module'); | ||
@@ -9,0 +9,0 @@ var realpathFS = fs.realpath && typeof fs.realpath.native === 'function' ? fs.realpath.native : fs.realpath; |
@@ -0,1 +1,3 @@ | ||
console.warn('`resolve/lib/core` is deprecated; please use `is-core-module` directly'); | ||
var current = (process.versions && process.versions.node && process.versions.node.split('.')) || []; | ||
@@ -9,4 +11,4 @@ | ||
for (var i = 0; i < 3; ++i) { | ||
var cur = Number(current[i] || 0); | ||
var ver = Number(versionParts[i] || 0); | ||
var cur = parseInt(current[i] || 0, 10); | ||
var ver = parseInt(versionParts[i] || 0, 10); | ||
if (cur === ver) { | ||
@@ -13,0 +15,0 @@ continue; // eslint-disable-line no-restricted-syntax, no-continue |
{ | ||
"assert": true, | ||
"assert/strict": ">= 15", | ||
"async_hooks": ">= 8", | ||
@@ -15,3 +16,4 @@ "buffer_ieee754": "< 0.9.7", | ||
"dns": true, | ||
"domain": true, | ||
"dns/promises": ">= 15", | ||
"domain": ">= 0.7.12", | ||
"events": true, | ||
@@ -53,5 +55,7 @@ "freelist": "< 6", | ||
"stream": true, | ||
"stream/promises": ">= 15", | ||
"string_decoder": true, | ||
"sys": true, | ||
"sys": [">= 0.6 && < 0.7", ">= 0.8"], | ||
"timers": true, | ||
"timers/promises": ">= 15", | ||
"_tls_common": ">= 0.11.13", | ||
@@ -58,0 +62,0 @@ "_tls_legacy": ">= 0.11.3 && < 10", |
@@ -1,5 +0,5 @@ | ||
var core = require('./core'); | ||
var isCoreModule = require('is-core-module'); | ||
module.exports = function isCore(x) { | ||
return Object.prototype.hasOwnProperty.call(core, x); | ||
return isCoreModule(x); | ||
}; |
@@ -1,2 +0,2 @@ | ||
var isCore = require('./is-core'); | ||
var isCore = require('is-core-module'); | ||
var fs = require('fs'); | ||
@@ -3,0 +3,0 @@ var path = require('path'); |
{ | ||
"name": "resolve", | ||
"description": "resolve like require.resolve() on behalf of files asynchronously and synchronously", | ||
"version": "1.17.0", | ||
"version": "1.18.0", | ||
"repository": { | ||
@@ -17,4 +17,4 @@ "type": "git", | ||
"scripts": { | ||
"prepublish": "safe-publish-latest", | ||
"lint": "eslint .", | ||
"prepublish": "safe-publish-latest && cp node_modules/is-core-module/core.json ./lib/", | ||
"lint": "eslint --ext=js,mjs .", | ||
"pretests-only": "cd ./test/resolver/nested_symlinks && node mylib/sync && node mylib/async", | ||
@@ -28,9 +28,9 @@ "tests-only": "tape test/*.js", | ||
"devDependencies": { | ||
"@ljharb/eslint-config": "^16.0.0", | ||
"@ljharb/eslint-config": "^17.2.0", | ||
"array.prototype.map": "^1.0.2", | ||
"eslint": "^6.8.0", | ||
"eslint": "^7.10.0", | ||
"object-keys": "^1.1.1", | ||
"safe-publish-latest": "^1.1.4", | ||
"tap": "0.4.13", | ||
"tape": "^5.0.0-next.5" | ||
"tape": "^5.0.1" | ||
}, | ||
@@ -47,4 +47,5 @@ "license": "MIT", | ||
"dependencies": { | ||
"is-core-module": "^2.0.0", | ||
"path-parse": "^1.0.6" | ||
} | ||
} |
@@ -25,12 +25,8 @@ var test = require('tape'); | ||
var mod = cores[i]; | ||
var requireFunc = function () { require(mod); }; // eslint-disable-line no-loop-func | ||
console.log(mod, resolve.core, resolve.core[mod]); | ||
if (resolve.core[mod]) { | ||
st.doesNotThrow( | ||
function () { require(mod); }, // eslint-disable-line no-loop-func | ||
mod + ' supported; requiring does not throw' | ||
); | ||
st.doesNotThrow(requireFunc, mod + ' supported; requiring does not throw'); | ||
} else { | ||
st.throws( | ||
function () { require(mod); }, // eslint-disable-line no-loop-func | ||
mod + ' not supported; requiring throws' | ||
); | ||
st.throws(requireFunc, mod + ' not supported; requiring throws'); | ||
} | ||
@@ -37,0 +33,0 @@ } |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
703141
1243
19165
2
2
80
2
239
4
15
3
+ Addedis-core-module@^2.0.0
+ Addedfunction-bind@1.1.2(transitive)
+ Addedhasown@2.0.2(transitive)
+ Addedis-core-module@2.15.1(transitive)