resolve
Advanced tools
Comparing version 1.22.1 to 1.22.2
@@ -1,44 +0,4 @@ | ||
var current = (process.versions && process.versions.node && process.versions.node.split('.')) || []; | ||
'use strict'; | ||
function specifierIncluded(specifier) { | ||
var parts = specifier.split(' '); | ||
var op = parts.length > 1 ? parts[0] : '='; | ||
var versionParts = (parts.length > 1 ? parts[1] : parts[0]).split('.'); | ||
for (var i = 0; i < 3; ++i) { | ||
var cur = parseInt(current[i] || 0, 10); | ||
var ver = parseInt(versionParts[i] || 0, 10); | ||
if (cur === ver) { | ||
continue; // eslint-disable-line no-restricted-syntax, no-continue | ||
} | ||
if (op === '<') { | ||
return cur < ver; | ||
} else if (op === '>=') { | ||
return cur >= ver; | ||
} | ||
return false; | ||
} | ||
return op === '>='; | ||
} | ||
function matchesRange(range) { | ||
var specifiers = range.split(/ ?&& ?/); | ||
if (specifiers.length === 0) { return false; } | ||
for (var i = 0; i < specifiers.length; ++i) { | ||
if (!specifierIncluded(specifiers[i])) { return false; } | ||
} | ||
return true; | ||
} | ||
function versionIncluded(specifierValue) { | ||
if (typeof specifierValue === 'boolean') { return specifierValue; } | ||
if (specifierValue && typeof specifierValue === 'object') { | ||
for (var i = 0; i < specifierValue.length; ++i) { | ||
if (matchesRange(specifierValue[i])) { return true; } | ||
} | ||
return false; | ||
} | ||
return matchesRange(specifierValue); | ||
} | ||
var isCoreModule = require('is-core-module'); | ||
var data = require('./core.json'); | ||
@@ -49,5 +9,5 @@ | ||
if (Object.prototype.hasOwnProperty.call(data, mod)) { | ||
core[mod] = versionIncluded(data[mod]); | ||
core[mod] = isCoreModule(mod); | ||
} | ||
} | ||
module.exports = core; |
@@ -60,2 +60,4 @@ { | ||
"node:inspector": [">= 14.18 && < 15", ">= 16"], | ||
"inspector/promises": [">= 19"], | ||
"node:inspector/promises": [">= 19"], | ||
"_linklist": "< 8", | ||
@@ -116,3 +118,3 @@ "module": true, | ||
"node:sys": [">= 14.18 && < 15", ">= 16"], | ||
"node:test": ">= 18", | ||
"node:test": [">= 16.17 && < 17", ">= 18"], | ||
"timers": true, | ||
@@ -119,0 +121,0 @@ "node:timers": [">= 14.18 && < 15", ">= 16"], |
{ | ||
"name": "resolve", | ||
"description": "resolve like require.resolve() on behalf of files asynchronously and synchronously", | ||
"version": "1.22.1", | ||
"version": "1.22.2", | ||
"repository": { | ||
@@ -20,4 +20,4 @@ "type": "git", | ||
"scripts": { | ||
"prepack": "npmignore --auto --commentLines=autogenerated", | ||
"prepublishOnly": "safe-publish-latest && cp node_modules/is-core-module/core.json ./lib/ ||:", | ||
"prepack": "npmignore --auto --commentLines=autogenerated && cp node_modules/is-core-module/core.json ./lib/ ||:", | ||
"prepublishOnly": "safe-publish-latest", | ||
"prepublish": "not-in-publish || npm run prepublishOnly", | ||
@@ -34,5 +34,5 @@ "prelint": "eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git')", | ||
"devDependencies": { | ||
"@ljharb/eslint-config": "^21.0.0", | ||
"array.prototype.map": "^1.0.4", | ||
"aud": "^2.0.0", | ||
"@ljharb/eslint-config": "^21.0.1", | ||
"array.prototype.map": "^1.0.5", | ||
"aud": "^2.0.2", | ||
"copy-dir": "^1.3.0", | ||
@@ -50,3 +50,3 @@ "eclint": "^2.8.1", | ||
"tap": "0.4.13", | ||
"tape": "^5.5.3", | ||
"tape": "^5.6.3", | ||
"tmp": "^0.0.31" | ||
@@ -64,3 +64,3 @@ }, | ||
"dependencies": { | ||
"is-core-module": "^2.9.0", | ||
"is-core-module": "^2.11.0", | ||
"path-parse": "^1.0.7", | ||
@@ -67,0 +67,0 @@ "supports-preserve-symlinks-flag": "^1.0.0" |
144631
3279
Updatedis-core-module@^2.11.0