Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: browserify/resolve
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.22.1
Choose a base ref
...
head repository: browserify/resolve
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.22.2
Choose a head ref
  • 8 commits
  • 3 files changed
  • 1 contributor

Commits on Aug 4, 2022

  1. [Deps] update is-core-module

    ljharb committed Aug 4, 2022
    Copy the full SHA
    94978fe View commit details

Commits on Oct 18, 2022

  1. [Dev Deps] update aud, tape

    ljharb committed Oct 18, 2022
    Copy the full SHA
    6960e34 View commit details
  2. [Deps] update is-core-module

    ljharb committed Oct 18, 2022

    Verified

    This commit was signed with the committer’s verified signature.
    mgaffney Michael Gaffney
    Copy the full SHA
    04ca704 View commit details

Commits on Nov 18, 2022

  1. Verified

    This commit was signed with the committer’s verified signature.
    paskal Dmitry V
    Copy the full SHA
    39c7143 View commit details
  2. Verified

    This commit was signed with the committer’s verified signature.
    paskal Dmitry V
    Copy the full SHA
    531b6f6 View commit details

Commits on Jan 27, 2023

  1. Verified

    This commit was signed with the committer’s verified signature.
    paskal Dmitry V
    Copy the full SHA
    1454fdf View commit details

Commits on Apr 5, 2023

  1. Verified

    This commit was signed with the committer’s verified signature.
    paskal Dmitry V
    Copy the full SHA
    ed8f81b View commit details
  2. v1.22.2

     - [Refactor] deprecated `lib/core.js` now uses `is-core-module`
     - [meta] cp core.json on prepack instead of prepublishOnly
     - [Deps] update `is-core-module`
     - [Dev Deps] update `@ljharb/eslint-config`, `aud`, `tape`, `array.prototype.map`
    ljharb committed Apr 5, 2023

    Verified

    This commit was signed with the committer’s verified signature.
    paskal Dmitry V
    Copy the full SHA
    c2f9ce2 View commit details
Showing with 14 additions and 52 deletions.
  1. +3 −43 lib/core.js
  2. +3 −1 lib/core.json
  3. +8 −8 package.json
46 changes: 3 additions & 43 deletions lib/core.js
Original file line number Diff line number Diff line change
@@ -1,52 +1,12 @@
var current = (process.versions && process.versions.node && process.versions.node.split('.')) || [];

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);
}
'use strict';

var isCoreModule = require('is-core-module');
var data = require('./core.json');

var core = {};
for (var mod in data) { // eslint-disable-line no-restricted-syntax
if (Object.prototype.hasOwnProperty.call(data, mod)) {
core[mod] = versionIncluded(data[mod]);
core[mod] = isCoreModule(mod);
}
}
module.exports = core;
4 changes: 3 additions & 1 deletion lib/core.json
Original file line number Diff line number Diff line change
@@ -57,6 +57,8 @@
"node:https": [">= 14.18 && < 15", ">= 16"],
"inspector": ">= 8",
"node:inspector": [">= 14.18 && < 15", ">= 16"],
"inspector/promises": [">= 19"],
"node:inspector/promises": [">= 19"],
"_linklist": "< 8",
"module": true,
"node:module": [">= 14.18 && < 15", ">= 16"],
@@ -112,7 +114,7 @@
"node:string_decoder": [">= 14.18 && < 15", ">= 16"],
"sys": [">= 0.4 && < 0.7", ">= 0.8"],
"node:sys": [">= 14.18 && < 15", ">= 16"],
"node:test": ">= 18",
"node:test": [">= 16.17 && < 17", ">= 18"],
"timers": true,
"node:timers": [">= 14.18 && < 15", ">= 16"],
"timers/promises": ">= 15",
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "resolve",
"description": "resolve like require.resolve() on behalf of files asynchronously and synchronously",
"version": "1.22.1",
"version": "1.22.2",
"repository": {
"type": "git",
"url": "git://github.com/browserify/resolve.git"
@@ -17,8 +17,8 @@
"module"
],
"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",
"prelint": "eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git')",
"lint": "eslint --ext=js,mjs --no-eslintrc -c .eslintrc . 'bin/**'",
@@ -30,9 +30,9 @@
"test:multirepo": "cd ./test/resolver/multirepo && npm install && npm test"
},
"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",
"eclint": "^2.8.1",
"eslint": "=8.8.0",
@@ -45,7 +45,7 @@
"safe-publish-latest": "^2.0.0",
"semver": "^6.3.0",
"tap": "0.4.13",
"tape": "^5.5.3",
"tape": "^5.6.3",
"tmp": "^0.0.31"
},
"license": "MIT",
@@ -58,7 +58,7 @@
"url": "https://github.com/sponsors/ljharb"
},
"dependencies": {
"is-core-module": "^2.9.0",
"is-core-module": "^2.11.0",
"path-parse": "^1.0.7",
"supports-preserve-symlinks-flag": "^1.0.0"
},