From 76dab917eb22f5079cbb8bc052ec7c5bb07e9389 Mon Sep 17 00:00:00 2001 From: Gar Date: Tue, 9 Jul 2024 08:15:02 -0700 Subject: [PATCH] deps: normalize-package-data@6.0.2 --- DEPENDENCIES.md | 3 - node_modules/.gitignore | 3 - node_modules/function-bind/LICENSE | 20 -- node_modules/function-bind/implementation.js | 84 ------ node_modules/function-bind/index.js | 5 - node_modules/function-bind/package.json | 87 ------ node_modules/function-bind/test/index.js | 252 ------------------ node_modules/hasown/LICENSE | 21 -- node_modules/hasown/index.js | 8 - node_modules/hasown/package.json | 92 ------- node_modules/hasown/tsconfig.json | 6 - node_modules/is-core-module/LICENSE | 20 -- node_modules/is-core-module/core.json | 158 ----------- node_modules/is-core-module/index.js | 69 ----- node_modules/is-core-module/package.json | 73 ----- node_modules/is-core-module/test/index.js | 133 --------- .../normalize-package-data/lib/fixer.js | 4 +- .../normalize-package-data/package.json | 3 +- package-lock.json | 15 +- package.json | 2 +- 20 files changed, 11 insertions(+), 1047 deletions(-) delete mode 100644 node_modules/function-bind/LICENSE delete mode 100644 node_modules/function-bind/implementation.js delete mode 100644 node_modules/function-bind/index.js delete mode 100644 node_modules/function-bind/package.json delete mode 100644 node_modules/function-bind/test/index.js delete mode 100644 node_modules/hasown/LICENSE delete mode 100644 node_modules/hasown/index.js delete mode 100644 node_modules/hasown/package.json delete mode 100644 node_modules/hasown/tsconfig.json delete mode 100644 node_modules/is-core-module/LICENSE delete mode 100644 node_modules/is-core-module/core.json delete mode 100644 node_modules/is-core-module/index.js delete mode 100644 node_modules/is-core-module/package.json delete mode 100644 node_modules/is-core-module/test/index.js diff --git a/DEPENDENCIES.md b/DEPENDENCIES.md index 6a2747bda1c1e..f612fd4a3834e 100644 --- a/DEPENDENCIES.md +++ b/DEPENDENCIES.md @@ -296,7 +296,6 @@ graph LR; glob-->minipass; glob-->package-json-from-dist; glob-->path-scurry; - hasown-->function-bind; hosted-git-info-->lru-cache; http-proxy-agent-->agent-base; http-proxy-agent-->debug; @@ -314,7 +313,6 @@ graph LR; ip-address-->jsbn; ip-address-->sprintf-js; is-cidr-->cidr-regex; - is-core-module-->hasown; isaacs-cliui-->string-width-cjs; isaacs-cliui-->string-width; isaacs-cliui-->strip-ansi-cjs; @@ -455,7 +453,6 @@ graph LR; node-gyp-->which; nopt-->abbrev; normalize-package-data-->hosted-git-info; - normalize-package-data-->is-core-module; normalize-package-data-->semver; normalize-package-data-->validate-npm-package-license; npm-->abbrev; diff --git a/node_modules/.gitignore b/node_modules/.gitignore index 0fac962be9c75..7940f660b3aa4 100644 --- a/node_modules/.gitignore +++ b/node_modules/.gitignore @@ -84,10 +84,8 @@ !/fastest-levenshtein !/foreground-child !/fs-minipass -!/function-bind !/glob !/graceful-fs -!/hasown !/hosted-git-info !/http-cache-semantics !/http-proxy-agent @@ -101,7 +99,6 @@ !/ip-address !/ip-regex !/is-cidr -!/is-core-module !/is-fullwidth-code-point !/is-lambda !/isexe diff --git a/node_modules/function-bind/LICENSE b/node_modules/function-bind/LICENSE deleted file mode 100644 index 62d6d237ff179..0000000000000 --- a/node_modules/function-bind/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2013 Raynos. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - diff --git a/node_modules/function-bind/implementation.js b/node_modules/function-bind/implementation.js deleted file mode 100644 index fd4384cc0c34c..0000000000000 --- a/node_modules/function-bind/implementation.js +++ /dev/null @@ -1,84 +0,0 @@ -'use strict'; - -/* eslint no-invalid-this: 1 */ - -var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; -var toStr = Object.prototype.toString; -var max = Math.max; -var funcType = '[object Function]'; - -var concatty = function concatty(a, b) { - var arr = []; - - for (var i = 0; i < a.length; i += 1) { - arr[i] = a[i]; - } - for (var j = 0; j < b.length; j += 1) { - arr[j + a.length] = b[j]; - } - - return arr; -}; - -var slicy = function slicy(arrLike, offset) { - var arr = []; - for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { - arr[j] = arrLike[i]; - } - return arr; -}; - -var joiny = function (arr, joiner) { - var str = ''; - for (var i = 0; i < arr.length; i += 1) { - str += arr[i]; - if (i + 1 < arr.length) { - str += joiner; - } - } - return str; -}; - -module.exports = function bind(that) { - var target = this; - if (typeof target !== 'function' || toStr.apply(target) !== funcType) { - throw new TypeError(ERROR_MESSAGE + target); - } - var args = slicy(arguments, 1); - - var bound; - var binder = function () { - if (this instanceof bound) { - var result = target.apply( - this, - concatty(args, arguments) - ); - if (Object(result) === result) { - return result; - } - return this; - } - return target.apply( - that, - concatty(args, arguments) - ); - - }; - - var boundLength = max(0, target.length - args.length); - var boundArgs = []; - for (var i = 0; i < boundLength; i++) { - boundArgs[i] = '$' + i; - } - - bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder); - - if (target.prototype) { - var Empty = function Empty() {}; - Empty.prototype = target.prototype; - bound.prototype = new Empty(); - Empty.prototype = null; - } - - return bound; -}; diff --git a/node_modules/function-bind/index.js b/node_modules/function-bind/index.js deleted file mode 100644 index 3bb6b9609889f..0000000000000 --- a/node_modules/function-bind/index.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict'; - -var implementation = require('./implementation'); - -module.exports = Function.prototype.bind || implementation; diff --git a/node_modules/function-bind/package.json b/node_modules/function-bind/package.json deleted file mode 100644 index 6185963897790..0000000000000 --- a/node_modules/function-bind/package.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "name": "function-bind", - "version": "1.1.2", - "description": "Implementation of Function.prototype.bind", - "keywords": [ - "function", - "bind", - "shim", - "es5" - ], - "author": "Raynos ", - "repository": { - "type": "git", - "url": "https://github.com/Raynos/function-bind.git" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - }, - "main": "index", - "homepage": "https://github.com/Raynos/function-bind", - "contributors": [ - { - "name": "Raynos" - }, - { - "name": "Jordan Harband", - "url": "https://github.com/ljharb" - } - ], - "bugs": { - "url": "https://github.com/Raynos/function-bind/issues", - "email": "raynos2@gmail.com" - }, - "devDependencies": { - "@ljharb/eslint-config": "^21.1.0", - "aud": "^2.0.3", - "auto-changelog": "^2.4.0", - "eslint": "=8.8.0", - "in-publish": "^2.0.1", - "npmignore": "^0.3.0", - "nyc": "^10.3.2", - "safe-publish-latest": "^2.0.0", - "tape": "^5.7.1" - }, - "license": "MIT", - "scripts": { - "prepublishOnly": "safe-publish-latest", - "prepublish": "not-in-publish || npm run prepublishOnly", - "prepack": "npmignore --auto --commentLines=autogenerated", - "pretest": "npm run lint", - "test": "npm run tests-only", - "posttest": "aud --production", - "tests-only": "nyc tape 'test/**/*.js'", - "lint": "eslint --ext=js,mjs .", - "version": "auto-changelog && git add CHANGELOG.md", - "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" - }, - "testling": { - "files": "test/index.js", - "browsers": [ - "ie/8..latest", - "firefox/16..latest", - "firefox/nightly", - "chrome/22..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2..latest" - ] - }, - "auto-changelog": { - "output": "CHANGELOG.md", - "template": "keepachangelog", - "unreleased": false, - "commitLimit": false, - "backfillLimit": false, - "hideCredit": true - }, - "publishConfig": { - "ignore": [ - ".github/workflows" - ] - } -} diff --git a/node_modules/function-bind/test/index.js b/node_modules/function-bind/test/index.js deleted file mode 100644 index 2edecce2f0fa5..0000000000000 --- a/node_modules/function-bind/test/index.js +++ /dev/null @@ -1,252 +0,0 @@ -// jscs:disable requireUseStrict - -var test = require('tape'); - -var functionBind = require('../implementation'); -var getCurrentContext = function () { return this; }; - -test('functionBind is a function', function (t) { - t.equal(typeof functionBind, 'function'); - t.end(); -}); - -test('non-functions', function (t) { - var nonFunctions = [true, false, [], {}, 42, 'foo', NaN, /a/g]; - t.plan(nonFunctions.length); - for (var i = 0; i < nonFunctions.length; ++i) { - try { functionBind.call(nonFunctions[i]); } catch (ex) { - t.ok(ex instanceof TypeError, 'throws when given ' + String(nonFunctions[i])); - } - } - t.end(); -}); - -test('without a context', function (t) { - t.test('binds properly', function (st) { - var args, context; - var namespace = { - func: functionBind.call(function () { - args = Array.prototype.slice.call(arguments); - context = this; - }) - }; - namespace.func(1, 2, 3); - st.deepEqual(args, [1, 2, 3]); - st.equal(context, getCurrentContext.call()); - st.end(); - }); - - t.test('binds properly, and still supplies bound arguments', function (st) { - var args, context; - var namespace = { - func: functionBind.call(function () { - args = Array.prototype.slice.call(arguments); - context = this; - }, undefined, 1, 2, 3) - }; - namespace.func(4, 5, 6); - st.deepEqual(args, [1, 2, 3, 4, 5, 6]); - st.equal(context, getCurrentContext.call()); - st.end(); - }); - - t.test('returns properly', function (st) { - var args; - var namespace = { - func: functionBind.call(function () { - args = Array.prototype.slice.call(arguments); - return this; - }, null) - }; - var context = namespace.func(1, 2, 3); - st.equal(context, getCurrentContext.call(), 'returned context is namespaced context'); - st.deepEqual(args, [1, 2, 3], 'passed arguments are correct'); - st.end(); - }); - - t.test('returns properly with bound arguments', function (st) { - var args; - var namespace = { - func: functionBind.call(function () { - args = Array.prototype.slice.call(arguments); - return this; - }, null, 1, 2, 3) - }; - var context = namespace.func(4, 5, 6); - st.equal(context, getCurrentContext.call(), 'returned context is namespaced context'); - st.deepEqual(args, [1, 2, 3, 4, 5, 6], 'passed arguments are correct'); - st.end(); - }); - - t.test('called as a constructor', function (st) { - var thunkify = function (value) { - return function () { return value; }; - }; - st.test('returns object value', function (sst) { - var expectedReturnValue = [1, 2, 3]; - var Constructor = functionBind.call(thunkify(expectedReturnValue), null); - var result = new Constructor(); - sst.equal(result, expectedReturnValue); - sst.end(); - }); - - st.test('does not return primitive value', function (sst) { - var Constructor = functionBind.call(thunkify(42), null); - var result = new Constructor(); - sst.notEqual(result, 42); - sst.end(); - }); - - st.test('object from bound constructor is instance of original and bound constructor', function (sst) { - var A = function (x) { - this.name = x || 'A'; - }; - var B = functionBind.call(A, null, 'B'); - - var result = new B(); - sst.ok(result instanceof B, 'result is instance of bound constructor'); - sst.ok(result instanceof A, 'result is instance of original constructor'); - sst.end(); - }); - - st.end(); - }); - - t.end(); -}); - -test('with a context', function (t) { - t.test('with no bound arguments', function (st) { - var args, context; - var boundContext = {}; - var namespace = { - func: functionBind.call(function () { - args = Array.prototype.slice.call(arguments); - context = this; - }, boundContext) - }; - namespace.func(1, 2, 3); - st.equal(context, boundContext, 'binds a context properly'); - st.deepEqual(args, [1, 2, 3], 'supplies passed arguments'); - st.end(); - }); - - t.test('with bound arguments', function (st) { - var args, context; - var boundContext = {}; - var namespace = { - func: functionBind.call(function () { - args = Array.prototype.slice.call(arguments); - context = this; - }, boundContext, 1, 2, 3) - }; - namespace.func(4, 5, 6); - st.equal(context, boundContext, 'binds a context properly'); - st.deepEqual(args, [1, 2, 3, 4, 5, 6], 'supplies bound and passed arguments'); - st.end(); - }); - - t.test('returns properly', function (st) { - var boundContext = {}; - var args; - var namespace = { - func: functionBind.call(function () { - args = Array.prototype.slice.call(arguments); - return this; - }, boundContext) - }; - var context = namespace.func(1, 2, 3); - st.equal(context, boundContext, 'returned context is bound context'); - st.notEqual(context, getCurrentContext.call(), 'returned context is not lexical context'); - st.deepEqual(args, [1, 2, 3], 'passed arguments are correct'); - st.end(); - }); - - t.test('returns properly with bound arguments', function (st) { - var boundContext = {}; - var args; - var namespace = { - func: functionBind.call(function () { - args = Array.prototype.slice.call(arguments); - return this; - }, boundContext, 1, 2, 3) - }; - var context = namespace.func(4, 5, 6); - st.equal(context, boundContext, 'returned context is bound context'); - st.notEqual(context, getCurrentContext.call(), 'returned context is not lexical context'); - st.deepEqual(args, [1, 2, 3, 4, 5, 6], 'passed arguments are correct'); - st.end(); - }); - - t.test('passes the correct arguments when called as a constructor', function (st) { - var expected = { name: 'Correct' }; - var namespace = { - Func: functionBind.call(function (arg) { - return arg; - }, { name: 'Incorrect' }) - }; - var returned = new namespace.Func(expected); - st.equal(returned, expected, 'returns the right arg when called as a constructor'); - st.end(); - }); - - t.test('has the new instance\'s context when called as a constructor', function (st) { - var actualContext; - var expectedContext = { foo: 'bar' }; - var namespace = { - Func: functionBind.call(function () { - actualContext = this; - }, expectedContext) - }; - var result = new namespace.Func(); - st.equal(result instanceof namespace.Func, true); - st.notEqual(actualContext, expectedContext); - st.end(); - }); - - t.end(); -}); - -test('bound function length', function (t) { - t.test('sets a correct length without thisArg', function (st) { - var subject = functionBind.call(function (a, b, c) { return a + b + c; }); - st.equal(subject.length, 3); - st.equal(subject(1, 2, 3), 6); - st.end(); - }); - - t.test('sets a correct length with thisArg', function (st) { - var subject = functionBind.call(function (a, b, c) { return a + b + c; }, {}); - st.equal(subject.length, 3); - st.equal(subject(1, 2, 3), 6); - st.end(); - }); - - t.test('sets a correct length without thisArg and first argument', function (st) { - var subject = functionBind.call(function (a, b, c) { return a + b + c; }, undefined, 1); - st.equal(subject.length, 2); - st.equal(subject(2, 3), 6); - st.end(); - }); - - t.test('sets a correct length with thisArg and first argument', function (st) { - var subject = functionBind.call(function (a, b, c) { return a + b + c; }, {}, 1); - st.equal(subject.length, 2); - st.equal(subject(2, 3), 6); - st.end(); - }); - - t.test('sets a correct length without thisArg and too many arguments', function (st) { - var subject = functionBind.call(function (a, b, c) { return a + b + c; }, undefined, 1, 2, 3, 4); - st.equal(subject.length, 0); - st.equal(subject(), 6); - st.end(); - }); - - t.test('sets a correct length with thisArg and too many arguments', function (st) { - var subject = functionBind.call(function (a, b, c) { return a + b + c; }, {}, 1, 2, 3, 4); - st.equal(subject.length, 0); - st.equal(subject(), 6); - st.end(); - }); -}); diff --git a/node_modules/hasown/LICENSE b/node_modules/hasown/LICENSE deleted file mode 100644 index 0314929078de8..0000000000000 --- a/node_modules/hasown/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) Jordan Harband and contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/hasown/index.js b/node_modules/hasown/index.js deleted file mode 100644 index 34e6059134967..0000000000000 --- a/node_modules/hasown/index.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict'; - -var call = Function.prototype.call; -var $hasOwn = Object.prototype.hasOwnProperty; -var bind = require('function-bind'); - -/** @type {import('.')} */ -module.exports = bind.call(call, $hasOwn); diff --git a/node_modules/hasown/package.json b/node_modules/hasown/package.json deleted file mode 100644 index 8502e13dd5c83..0000000000000 --- a/node_modules/hasown/package.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "name": "hasown", - "version": "2.0.2", - "description": "A robust, ES3 compatible, \"has own property\" predicate.", - "main": "index.js", - "exports": { - ".": "./index.js", - "./package.json": "./package.json" - }, - "types": "index.d.ts", - "sideEffects": false, - "scripts": { - "prepack": "npmignore --auto --commentLines=autogenerated", - "prepublish": "not-in-publish || npm run prepublishOnly", - "prepublishOnly": "safe-publish-latest", - "prelint": "evalmd README.md", - "lint": "eslint --ext=js,mjs .", - "postlint": "npm run tsc", - "pretest": "npm run lint", - "tsc": "tsc -p .", - "posttsc": "attw -P", - "tests-only": "nyc tape 'test/**/*.js'", - "test": "npm run tests-only", - "posttest": "aud --production", - "version": "auto-changelog && git add CHANGELOG.md", - "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/inspect-js/hasOwn.git" - }, - "keywords": [ - "has", - "hasOwnProperty", - "hasOwn", - "has-own", - "own", - "has", - "property", - "in", - "javascript", - "ecmascript" - ], - "author": "Jordan Harband ", - "license": "MIT", - "bugs": { - "url": "https://github.com/inspect-js/hasOwn/issues" - }, - "homepage": "https://github.com/inspect-js/hasOwn#readme", - "dependencies": { - "function-bind": "^1.1.2" - }, - "devDependencies": { - "@arethetypeswrong/cli": "^0.15.1", - "@ljharb/eslint-config": "^21.1.0", - "@ljharb/tsconfig": "^0.2.0", - "@types/function-bind": "^1.1.10", - "@types/mock-property": "^1.0.2", - "@types/tape": "^5.6.4", - "aud": "^2.0.4", - "auto-changelog": "^2.4.0", - "eslint": "=8.8.0", - "evalmd": "^0.0.19", - "in-publish": "^2.0.1", - "mock-property": "^1.0.3", - "npmignore": "^0.3.1", - "nyc": "^10.3.2", - "safe-publish-latest": "^2.0.0", - "tape": "^5.7.5", - "typescript": "next" - }, - "engines": { - "node": ">= 0.4" - }, - "testling": { - "files": "test/index.js" - }, - "auto-changelog": { - "output": "CHANGELOG.md", - "template": "keepachangelog", - "unreleased": false, - "commitLimit": false, - "backfillLimit": false, - "hideCredit": true - }, - "publishConfig": { - "ignore": [ - ".github/workflows", - "test" - ] - } -} diff --git a/node_modules/hasown/tsconfig.json b/node_modules/hasown/tsconfig.json deleted file mode 100644 index 0930c56585032..0000000000000 --- a/node_modules/hasown/tsconfig.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "extends": "@ljharb/tsconfig", - "exclude": [ - "coverage", - ], -} diff --git a/node_modules/is-core-module/LICENSE b/node_modules/is-core-module/LICENSE deleted file mode 100644 index 2e502872a7423..0000000000000 --- a/node_modules/is-core-module/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Dave Justice - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/is-core-module/core.json b/node_modules/is-core-module/core.json deleted file mode 100644 index 3cda693d7d0fd..0000000000000 --- a/node_modules/is-core-module/core.json +++ /dev/null @@ -1,158 +0,0 @@ -{ - "assert": true, - "node:assert": [">= 14.18 && < 15", ">= 16"], - "assert/strict": ">= 15", - "node:assert/strict": ">= 16", - "async_hooks": ">= 8", - "node:async_hooks": [">= 14.18 && < 15", ">= 16"], - "buffer_ieee754": ">= 0.5 && < 0.9.7", - "buffer": true, - "node:buffer": [">= 14.18 && < 15", ">= 16"], - "child_process": true, - "node:child_process": [">= 14.18 && < 15", ">= 16"], - "cluster": ">= 0.5", - "node:cluster": [">= 14.18 && < 15", ">= 16"], - "console": true, - "node:console": [">= 14.18 && < 15", ">= 16"], - "constants": true, - "node:constants": [">= 14.18 && < 15", ">= 16"], - "crypto": true, - "node:crypto": [">= 14.18 && < 15", ">= 16"], - "_debug_agent": ">= 1 && < 8", - "_debugger": "< 8", - "dgram": true, - "node:dgram": [">= 14.18 && < 15", ">= 16"], - "diagnostics_channel": [">= 14.17 && < 15", ">= 15.1"], - "node:diagnostics_channel": [">= 14.18 && < 15", ">= 16"], - "dns": true, - "node:dns": [">= 14.18 && < 15", ">= 16"], - "dns/promises": ">= 15", - "node:dns/promises": ">= 16", - "domain": ">= 0.7.12", - "node:domain": [">= 14.18 && < 15", ">= 16"], - "events": true, - "node:events": [">= 14.18 && < 15", ">= 16"], - "freelist": "< 6", - "fs": true, - "node:fs": [">= 14.18 && < 15", ">= 16"], - "fs/promises": [">= 10 && < 10.1", ">= 14"], - "node:fs/promises": [">= 14.18 && < 15", ">= 16"], - "_http_agent": ">= 0.11.1", - "node:_http_agent": [">= 14.18 && < 15", ">= 16"], - "_http_client": ">= 0.11.1", - "node:_http_client": [">= 14.18 && < 15", ">= 16"], - "_http_common": ">= 0.11.1", - "node:_http_common": [">= 14.18 && < 15", ">= 16"], - "_http_incoming": ">= 0.11.1", - "node:_http_incoming": [">= 14.18 && < 15", ">= 16"], - "_http_outgoing": ">= 0.11.1", - "node:_http_outgoing": [">= 14.18 && < 15", ">= 16"], - "_http_server": ">= 0.11.1", - "node:_http_server": [">= 14.18 && < 15", ">= 16"], - "http": true, - "node:http": [">= 14.18 && < 15", ">= 16"], - "http2": ">= 8.8", - "node:http2": [">= 14.18 && < 15", ">= 16"], - "https": true, - "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"], - "net": true, - "node:net": [">= 14.18 && < 15", ">= 16"], - "node-inspect/lib/_inspect": ">= 7.6 && < 12", - "node-inspect/lib/internal/inspect_client": ">= 7.6 && < 12", - "node-inspect/lib/internal/inspect_repl": ">= 7.6 && < 12", - "os": true, - "node:os": [">= 14.18 && < 15", ">= 16"], - "path": true, - "node:path": [">= 14.18 && < 15", ">= 16"], - "path/posix": ">= 15.3", - "node:path/posix": ">= 16", - "path/win32": ">= 15.3", - "node:path/win32": ">= 16", - "perf_hooks": ">= 8.5", - "node:perf_hooks": [">= 14.18 && < 15", ">= 16"], - "process": ">= 1", - "node:process": [">= 14.18 && < 15", ">= 16"], - "punycode": ">= 0.5", - "node:punycode": [">= 14.18 && < 15", ">= 16"], - "querystring": true, - "node:querystring": [">= 14.18 && < 15", ">= 16"], - "readline": true, - "node:readline": [">= 14.18 && < 15", ">= 16"], - "readline/promises": ">= 17", - "node:readline/promises": ">= 17", - "repl": true, - "node:repl": [">= 14.18 && < 15", ">= 16"], - "smalloc": ">= 0.11.5 && < 3", - "_stream_duplex": ">= 0.9.4", - "node:_stream_duplex": [">= 14.18 && < 15", ">= 16"], - "_stream_transform": ">= 0.9.4", - "node:_stream_transform": [">= 14.18 && < 15", ">= 16"], - "_stream_wrap": ">= 1.4.1", - "node:_stream_wrap": [">= 14.18 && < 15", ">= 16"], - "_stream_passthrough": ">= 0.9.4", - "node:_stream_passthrough": [">= 14.18 && < 15", ">= 16"], - "_stream_readable": ">= 0.9.4", - "node:_stream_readable": [">= 14.18 && < 15", ">= 16"], - "_stream_writable": ">= 0.9.4", - "node:_stream_writable": [">= 14.18 && < 15", ">= 16"], - "stream": true, - "node:stream": [">= 14.18 && < 15", ">= 16"], - "stream/consumers": ">= 16.7", - "node:stream/consumers": ">= 16.7", - "stream/promises": ">= 15", - "node:stream/promises": ">= 16", - "stream/web": ">= 16.5", - "node:stream/web": ">= 16.5", - "string_decoder": true, - "node:string_decoder": [">= 14.18 && < 15", ">= 16"], - "sys": [">= 0.4 && < 0.7", ">= 0.8"], - "node:sys": [">= 14.18 && < 15", ">= 16"], - "test/reporters": ">= 19.9 && < 20.2", - "node:test/reporters": [">= 18.17 && < 19", ">= 19.9", ">= 20"], - "node:test": [">= 16.17 && < 17", ">= 18"], - "timers": true, - "node:timers": [">= 14.18 && < 15", ">= 16"], - "timers/promises": ">= 15", - "node:timers/promises": ">= 16", - "_tls_common": ">= 0.11.13", - "node:_tls_common": [">= 14.18 && < 15", ">= 16"], - "_tls_legacy": ">= 0.11.3 && < 10", - "_tls_wrap": ">= 0.11.3", - "node:_tls_wrap": [">= 14.18 && < 15", ">= 16"], - "tls": true, - "node:tls": [">= 14.18 && < 15", ">= 16"], - "trace_events": ">= 10", - "node:trace_events": [">= 14.18 && < 15", ">= 16"], - "tty": true, - "node:tty": [">= 14.18 && < 15", ">= 16"], - "url": true, - "node:url": [">= 14.18 && < 15", ">= 16"], - "util": true, - "node:util": [">= 14.18 && < 15", ">= 16"], - "util/types": ">= 15.3", - "node:util/types": ">= 16", - "v8/tools/arguments": ">= 10 && < 12", - "v8/tools/codemap": [">= 4.4 && < 5", ">= 5.2 && < 12"], - "v8/tools/consarray": [">= 4.4 && < 5", ">= 5.2 && < 12"], - "v8/tools/csvparser": [">= 4.4 && < 5", ">= 5.2 && < 12"], - "v8/tools/logreader": [">= 4.4 && < 5", ">= 5.2 && < 12"], - "v8/tools/profile_view": [">= 4.4 && < 5", ">= 5.2 && < 12"], - "v8/tools/splaytree": [">= 4.4 && < 5", ">= 5.2 && < 12"], - "v8": ">= 1", - "node:v8": [">= 14.18 && < 15", ">= 16"], - "vm": true, - "node:vm": [">= 14.18 && < 15", ">= 16"], - "wasi": [">= 13.4 && < 13.5", ">= 18.17 && < 19", ">= 20"], - "node:wasi": [">= 18.17 && < 19", ">= 20"], - "worker_threads": ">= 11.7", - "node:worker_threads": [">= 14.18 && < 15", ">= 16"], - "zlib": ">= 0.5", - "node:zlib": [">= 14.18 && < 15", ">= 16"] -} diff --git a/node_modules/is-core-module/index.js b/node_modules/is-core-module/index.js deleted file mode 100644 index 423e20c0d99db..0000000000000 --- a/node_modules/is-core-module/index.js +++ /dev/null @@ -1,69 +0,0 @@ -'use strict'; - -var hasOwn = require('hasown'); - -function specifierIncluded(current, specifier) { - var nodeParts = current.split('.'); - 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(nodeParts[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; - } - if (op === '>=') { - return cur >= ver; - } - return false; - } - return op === '>='; -} - -function matchesRange(current, range) { - var specifiers = range.split(/ ?&& ?/); - if (specifiers.length === 0) { - return false; - } - for (var i = 0; i < specifiers.length; ++i) { - if (!specifierIncluded(current, specifiers[i])) { - return false; - } - } - return true; -} - -function versionIncluded(nodeVersion, specifierValue) { - if (typeof specifierValue === 'boolean') { - return specifierValue; - } - - var current = typeof nodeVersion === 'undefined' - ? process.versions && process.versions.node - : nodeVersion; - - if (typeof current !== 'string') { - throw new TypeError(typeof nodeVersion === 'undefined' ? 'Unable to determine current node version' : 'If provided, a valid node version is required'); - } - - if (specifierValue && typeof specifierValue === 'object') { - for (var i = 0; i < specifierValue.length; ++i) { - if (matchesRange(current, specifierValue[i])) { - return true; - } - } - return false; - } - return matchesRange(current, specifierValue); -} - -var data = require('./core.json'); - -module.exports = function isCore(x, nodeVersion) { - return hasOwn(data, x) && versionIncluded(nodeVersion, data[x]); -}; diff --git a/node_modules/is-core-module/package.json b/node_modules/is-core-module/package.json deleted file mode 100644 index 1bac5851fd637..0000000000000 --- a/node_modules/is-core-module/package.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "name": "is-core-module", - "version": "2.13.1", - "description": "Is this specifier a node.js core module?", - "main": "index.js", - "sideEffects": false, - "exports": { - ".": "./index.js", - "./package.json": "./package.json" - }, - "scripts": { - "prepack": "npmignore --auto --commentLines=autogenerated", - "prepublish": "not-in-publish || npm run prepublishOnly", - "prepublishOnly": "safe-publish-latest", - "lint": "eslint .", - "pretest": "npm run lint", - "tests-only": "nyc tape 'test/**/*.js'", - "test": "npm run tests-only", - "posttest": "aud --production", - "version": "auto-changelog && git add CHANGELOG.md", - "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/inspect-js/is-core-module.git" - }, - "keywords": [ - "core", - "modules", - "module", - "npm", - "node", - "dependencies" - ], - "author": "Jordan Harband ", - "funding": { - "url": "https://github.com/sponsors/ljharb" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/inspect-js/is-core-module/issues" - }, - "homepage": "https://github.com/inspect-js/is-core-module", - "dependencies": { - "hasown": "^2.0.0" - }, - "devDependencies": { - "@ljharb/eslint-config": "^21.1.0", - "aud": "^2.0.3", - "auto-changelog": "^2.4.0", - "eslint": "=8.8.0", - "in-publish": "^2.0.1", - "mock-property": "^1.0.2", - "npmignore": "^0.3.0", - "nyc": "^10.3.2", - "safe-publish-latest": "^2.0.0", - "semver": "^6.3.1", - "tape": "^5.7.1" - }, - "auto-changelog": { - "output": "CHANGELOG.md", - "template": "keepachangelog", - "unreleased": false, - "commitLimit": false, - "backfillLimit": false, - "hideCredit": true - }, - "publishConfig": { - "ignore": [ - ".github" - ] - } -} diff --git a/node_modules/is-core-module/test/index.js b/node_modules/is-core-module/test/index.js deleted file mode 100644 index 912808b9d0000..0000000000000 --- a/node_modules/is-core-module/test/index.js +++ /dev/null @@ -1,133 +0,0 @@ -'use strict'; - -var test = require('tape'); -var keys = require('object-keys'); -var semver = require('semver'); -var mockProperty = require('mock-property'); - -var isCore = require('../'); -var data = require('../core.json'); - -var supportsNodePrefix = semver.satisfies(process.versions.node, '^14.18 || >= 16', { includePrerelease: true }); - -test('core modules', function (t) { - t.test('isCore()', function (st) { - st.ok(isCore('fs')); - st.ok(isCore('net')); - st.ok(isCore('http')); - - st.ok(!isCore('seq')); - st.ok(!isCore('../')); - - st.ok(!isCore('toString')); - - st.end(); - }); - - t.test('core list', function (st) { - var cores = keys(data); - st.plan(cores.length); - - for (var i = 0; i < cores.length; ++i) { - var mod = cores[i]; - var requireFunc = function () { require(mod); }; // eslint-disable-line no-loop-func - if (isCore(mod)) { - st.doesNotThrow(requireFunc, mod + ' supported; requiring does not throw'); - } else { - st['throws'](requireFunc, mod + ' not supported; requiring throws'); - } - } - - st.end(); - }); - - t.test('core via repl module', { skip: !data.repl }, function (st) { - var libs = require('repl')._builtinLibs; // eslint-disable-line no-underscore-dangle - if (!libs) { - st.skip('repl._builtinLibs does not exist'); - } else { - for (var i = 0; i < libs.length; ++i) { - var mod = libs[i]; - st.ok(data[mod], mod + ' is a core module'); - st.doesNotThrow( - function () { require(mod); }, // eslint-disable-line no-loop-func - 'requiring ' + mod + ' does not throw' - ); - if (mod.slice(0, 5) !== 'node:') { - if (supportsNodePrefix) { - st.doesNotThrow( - function () { require('node:' + mod); }, // eslint-disable-line no-loop-func - 'requiring node:' + mod + ' does not throw' - ); - } else { - st['throws']( - function () { require('node:' + mod); }, // eslint-disable-line no-loop-func - 'requiring node:' + mod + ' throws' - ); - } - } - } - } - st.end(); - }); - - t.test('core via builtinModules list', { skip: !data.module }, function (st) { - var libs = require('module').builtinModules; - if (!libs) { - st.skip('module.builtinModules does not exist'); - } else { - var excludeList = [ - '_debug_agent', - 'v8/tools/tickprocessor-driver', - 'v8/tools/SourceMap', - 'v8/tools/tickprocessor', - 'v8/tools/profile' - ]; - // see https://github.com/nodejs/node/issues/42785 - if (semver.satisfies(process.version, '>= 18')) { - libs = libs.concat('node:test'); - } - for (var i = 0; i < libs.length; ++i) { - var mod = libs[i]; - if (excludeList.indexOf(mod) === -1) { - st.ok(data[mod], mod + ' is a core module'); - st.doesNotThrow( - function () { require(mod); }, // eslint-disable-line no-loop-func - 'requiring ' + mod + ' does not throw' - ); - if (mod.slice(0, 5) !== 'node:') { - if (supportsNodePrefix) { - st.doesNotThrow( - function () { require('node:' + mod); }, // eslint-disable-line no-loop-func - 'requiring node:' + mod + ' does not throw' - ); - } else { - st['throws']( - function () { require('node:' + mod); }, // eslint-disable-line no-loop-func - 'requiring node:' + mod + ' throws' - ); - } - } - } - } - } - st.end(); - }); - - t.test('Object.prototype pollution', function (st) { - var nonKey = 'not a core module'; - st.teardown(mockProperty(Object.prototype, 'fs', { value: false })); - st.teardown(mockProperty(Object.prototype, 'path', { value: '>= 999999999' })); - st.teardown(mockProperty(Object.prototype, 'http', { value: data.http })); - st.teardown(mockProperty(Object.prototype, nonKey, { value: true })); - - st.equal(isCore('fs'), true, 'fs is a core module even if Object.prototype lies'); - st.equal(isCore('path'), true, 'path is a core module even if Object.prototype lies'); - st.equal(isCore('http'), true, 'path is a core module even if Object.prototype matches data'); - st.equal(isCore(nonKey), false, '"' + nonKey + '" is not a core module even if Object.prototype lies'); - - st.end(); - }); - - t.end(); -}); diff --git a/node_modules/normalize-package-data/lib/fixer.js b/node_modules/normalize-package-data/lib/fixer.js index 9a1ccc906aee3..1c30cad65e6cb 100644 --- a/node_modules/normalize-package-data/lib/fixer.js +++ b/node_modules/normalize-package-data/lib/fixer.js @@ -2,7 +2,7 @@ var isValidSemver = require('semver/functions/valid') var cleanSemver = require('semver/functions/clean') var validateLicense = require('validate-npm-package-license') var hostedGitInfo = require('hosted-git-info') -var isBuiltinModule = require('is-core-module') +var moduleBuiltin = require('node:module') var depTypes = ['dependencies', 'devDependencies', 'optionalDependencies'] var extractDescription = require('./extract_description') var url = require('url') @@ -231,7 +231,7 @@ module.exports = { data.name = data.name.trim() } ensureValidName(data.name, strict, options.allowLegacyCase) - if (isBuiltinModule(data.name)) { + if (moduleBuiltin.builtinModules.includes(data.name)) { this.warn('conflictingName', data.name) } }, diff --git a/node_modules/normalize-package-data/package.json b/node_modules/normalize-package-data/package.json index 7fc803fb5dbb5..04a7647abe65c 100644 --- a/node_modules/normalize-package-data/package.json +++ b/node_modules/normalize-package-data/package.json @@ -1,6 +1,6 @@ { "name": "normalize-package-data", - "version": "6.0.1", + "version": "6.0.2", "author": "GitHub Inc.", "description": "Normalizes data that can be found in package.json files.", "license": "BSD-2-Clause", @@ -22,7 +22,6 @@ }, "dependencies": { "hosted-git-info": "^7.0.0", - "is-core-module": "^2.8.1", "semver": "^7.3.5", "validate-npm-package-license": "^3.0.4" }, diff --git a/package-lock.json b/package-lock.json index f8e0a7fe2378c..cc7ea0e4cc671 100644 --- a/package-lock.json +++ b/package-lock.json @@ -129,7 +129,7 @@ "ms": "^2.1.2", "node-gyp": "^10.1.0", "nopt": "^7.2.1", - "normalize-package-data": "^6.0.1", + "normalize-package-data": "^6.0.2", "npm-audit-report": "^5.0.0", "npm-install-checks": "^6.3.0", "npm-package-arg": "^11.0.2", @@ -5753,7 +5753,7 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "inBundle": true, + "dev": true, "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" @@ -6200,7 +6200,7 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", - "inBundle": true, + "dev": true, "license": "MIT", "dependencies": { "function-bind": "^1.1.2" @@ -6788,7 +6788,7 @@ "version": "2.13.1", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", - "inBundle": true, + "dev": true, "license": "MIT", "dependencies": { "hasown": "^2.0.0" @@ -9445,14 +9445,13 @@ } }, "node_modules/normalize-package-data": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-6.0.1.tgz", - "integrity": "sha512-6rvCfeRW+OEZagAB4lMLSNuTNYZWLVtKccK79VSTf//yTY5VOCgcpH80O+bZK8Neps7pUnd5G+QlMg1yV/2iZQ==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-6.0.2.tgz", + "integrity": "sha512-V6gygoYb/5EmNI+MEGrWkC+e6+Rr7mTmfHrxDbLzxQogBkgzo76rkok0Am6thgSF7Mv2nLOajAJj5vDJZEFn7g==", "inBundle": true, "license": "BSD-2-Clause", "dependencies": { "hosted-git-info": "^7.0.0", - "is-core-module": "^2.8.1", "semver": "^7.3.5", "validate-npm-package-license": "^3.0.4" }, diff --git a/package.json b/package.json index fd9ed14d9d110..36a18ad335f74 100644 --- a/package.json +++ b/package.json @@ -94,7 +94,7 @@ "ms": "^2.1.2", "node-gyp": "^10.1.0", "nopt": "^7.2.1", - "normalize-package-data": "^6.0.1", + "normalize-package-data": "^6.0.2", "npm-audit-report": "^5.0.0", "npm-install-checks": "^6.3.0", "npm-package-arg": "^11.0.2",