From 18e53129f0f3a19725e377b336336aa85ade3ba5 Mon Sep 17 00:00:00 2001 From: Luke Karrys Date: Mon, 6 May 2024 15:19:03 -0700 Subject: [PATCH] deps: validate-npm-package-name@5.0.1 --- DEPENDENCIES.md | 2 - node_modules/.gitignore | 1 - node_modules/builtins/License | 20 ----- node_modules/builtins/index.js | 80 ------------------- node_modules/builtins/package.json | 19 ----- .../validate-npm-package-name/lib/index.js | 10 +-- .../validate-npm-package-name/package.json | 19 ++--- package-lock.json | 21 ++--- package.json | 2 +- 9 files changed, 17 insertions(+), 157 deletions(-) delete mode 100644 node_modules/builtins/License delete mode 100644 node_modules/builtins/index.js delete mode 100644 node_modules/builtins/package.json diff --git a/DEPENDENCIES.md b/DEPENDENCIES.md index 88128ab1ad9ec..89b2792ac512a 100644 --- a/DEPENDENCIES.md +++ b/DEPENDENCIES.md @@ -266,7 +266,6 @@ graph LR; bin-links-->read-cmd-shim; bin-links-->write-file-atomic; brace-expansion-->balanced-match; - builtins-->semver; cacache-->fs-minipass; cacache-->glob; cacache-->lru-cache; @@ -777,7 +776,6 @@ graph LR; unique-slug-->imurmurhash; validate-npm-package-license-->spdx-correct; validate-npm-package-license-->spdx-expression-parse; - validate-npm-package-name-->builtins; which-->isexe; wrap-ansi-->ansi-styles; wrap-ansi-->string-width; diff --git a/node_modules/.gitignore b/node_modules/.gitignore index 2075e41dc40b5..c5e8e1f8c9db7 100644 --- a/node_modules/.gitignore +++ b/node_modules/.gitignore @@ -54,7 +54,6 @@ !/bin-links !/binary-extensions !/brace-expansion -!/builtins !/cacache !/chalk !/chownr diff --git a/node_modules/builtins/License b/node_modules/builtins/License deleted file mode 100644 index b142e5dc08133..0000000000000 --- a/node_modules/builtins/License +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2015 Julian Gruber - -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/builtins/index.js b/node_modules/builtins/index.js deleted file mode 100644 index 01d23876aae32..0000000000000 --- a/node_modules/builtins/index.js +++ /dev/null @@ -1,80 +0,0 @@ -'use strict' - -const satisfies = require('semver/functions/satisfies') - -const permanentModules = [ - 'assert', - 'buffer', - 'child_process', - 'cluster', - 'console', - 'constants', - 'crypto', - 'dgram', - 'dns', - 'domain', - 'events', - 'fs', - 'http', - 'https', - 'module', - 'net', - 'os', - 'path', - 'punycode', - 'querystring', - 'readline', - 'repl', - 'stream', - 'string_decoder', - 'sys', - 'timers', - 'tls', - 'tty', - 'url', - 'util', - 'vm', - 'zlib' -] - -const versionLockedModules = { - freelist: '<6.0.0', - v8: '>=1.0.0', - process: '>=1.1.0', - inspector: '>=8.0.0', - async_hooks: '>=8.1.0', - http2: '>=8.4.0', - perf_hooks: '>=8.5.0', - trace_events: '>=10.0.0', - worker_threads: '>=12.0.0', - 'node:test': '>=18.0.0' -} - -const experimentalModules = { - worker_threads: '>=10.5.0', - wasi: '>=12.16.0', - diagnostics_channel: '^14.17.0 || >=15.1.0' -} - -module.exports = ({ version = process.version, experimental = false } = {}) => { - const builtins = [...permanentModules] - - for (const [name, semverRange] of Object.entries(versionLockedModules)) { - if (version === '*' || satisfies(version, semverRange)) { - builtins.push(name) - } - } - - if (experimental) { - for (const [name, semverRange] of Object.entries(experimentalModules)) { - if ( - !builtins.includes(name) && - (version === '*' || satisfies(version, semverRange)) - ) { - builtins.push(name) - } - } - } - - return builtins -} diff --git a/node_modules/builtins/package.json b/node_modules/builtins/package.json deleted file mode 100644 index d37e02e076818..0000000000000 --- a/node_modules/builtins/package.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "builtins", - "version": "5.1.0", - "description": "List of node.js builtin modules", - "repository": "juliangruber/builtins", - "license": "MIT", - "main": "index.js", - "files": [], - "scripts": { - "test": "standard --fix && node--test" - }, - "dependencies": { - "semver": "^7.0.0" - }, - "devDependencies": { - "standard": "^17.0.0", - "test": "^3.0.0" - } -} diff --git a/node_modules/validate-npm-package-name/lib/index.js b/node_modules/validate-npm-package-name/lib/index.js index e7e612bfbdf4d..fd800d5a5eae1 100644 --- a/node_modules/validate-npm-package-name/lib/index.js +++ b/node_modules/validate-npm-package-name/lib/index.js @@ -1,7 +1,7 @@ 'use strict' +const { builtinModules: builtins } = require('module') var scopedPackagePattern = new RegExp('^(?:@([^/]+?)[/])?([^/]+?)$') -var builtins = require('builtins') var blacklist = [ 'node_modules', 'favicon.ico', @@ -52,11 +52,9 @@ function validate (name) { // Generate warnings for stuff that used to be allowed // core module names like http, events, util, etc - builtins({ version: '*' }).forEach(function (builtin) { - if (name.toLowerCase() === builtin) { - warnings.push(builtin + ' is a core module name') - } - }) + if (builtins.includes(name.toLowerCase())) { + warnings.push(name + ' is a core module name') + } if (name.length > 214) { warnings.push('name can no longer contain more than 214 characters') diff --git a/node_modules/validate-npm-package-name/package.json b/node_modules/validate-npm-package-name/package.json index 5579a5c33a76b..8a38b66e1d3e4 100644 --- a/node_modules/validate-npm-package-name/package.json +++ b/node_modules/validate-npm-package-name/package.json @@ -1,17 +1,14 @@ { "name": "validate-npm-package-name", - "version": "5.0.0", + "version": "5.0.1", "description": "Give me a string and I'll tell you if it's a valid npm package name", "main": "lib/", "directories": { "test": "test" }, - "dependencies": { - "builtins": "^5.0.0" - }, "devDependencies": { - "@npmcli/eslint-config": "^3.0.1", - "@npmcli/template-oss": "4.5.1", + "@npmcli/eslint-config": "^4.0.0", + "@npmcli/template-oss": "4.22.0", "tap": "^16.0.1" }, "scripts": { @@ -19,7 +16,7 @@ "test:code": "tap ${TAP_FLAGS:-'--'} test/*.js", "test:style": "standard", "test": "tap", - "lint": "eslint \"**/*.js\"", + "lint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"", "postlint": "template-oss-check", "template-oss-apply": "template-oss-apply --force", "lintfix": "npm run lint -- --fix", @@ -28,7 +25,7 @@ }, "repository": { "type": "git", - "url": "https://github.com/npm/validate-npm-package-name.git" + "url": "git+https://github.com/npm/validate-npm-package-name.git" }, "keywords": [ "npm", @@ -51,12 +48,10 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.5.1" + "version": "4.22.0", + "publish": true }, "tap": { - "statements": 88, - "branches": 92, - "lines": 88, "nyc-arg": [ "--exclude", "tap-snapshots/**" diff --git a/package-lock.json b/package-lock.json index 7d02f427b2e65..037b4fede40f9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -151,7 +151,7 @@ "text-table": "~0.2.0", "tiny-relative-date": "^1.3.0", "treeverse": "^3.0.0", - "validate-npm-package-name": "^5.0.0", + "validate-npm-package-name": "^5.0.1", "which": "^4.0.0", "write-file-atomic": "^5.0.1" }, @@ -2803,15 +2803,6 @@ "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", "dev": true }, - "node_modules/builtins": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/builtins/-/builtins-5.1.0.tgz", - "integrity": "sha512-SW9lzGTLvWTP1AY8xeAMZimqDrIaSdLQUcVr9DMef51niJ022Ri87SwRRKYm4A6iHfkPaiVUu/Duw2Wc4J7kKg==", - "inBundle": true, - "dependencies": { - "semver": "^7.0.0" - } - }, "node_modules/cacache": { "version": "18.0.3", "resolved": "https://registry.npmjs.org/cacache/-/cacache-18.0.3.tgz", @@ -14328,13 +14319,11 @@ } }, "node_modules/validate-npm-package-name": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-5.0.0.tgz", - "integrity": "sha512-YuKoXDAhBYxY7SfOKxHBDoSyENFeW5VvIIQp2TGQuit8gpK6MnWaQelBKxso72DoxTZfZdcP3W90LqpSkgPzLQ==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-5.0.1.tgz", + "integrity": "sha512-OljLrQ9SQdOUqTaQxqL5dEfZWrXExyyWsozYlAWFawPVNuD83igl7uJD2RTkNMbniIYgt8l81eCJGIdQF7avLQ==", "inBundle": true, - "dependencies": { - "builtins": "^5.0.0" - }, + "license": "ISC", "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } diff --git a/package.json b/package.json index d050b128c10ec..99c0b9b13a73e 100644 --- a/package.json +++ b/package.json @@ -116,7 +116,7 @@ "text-table": "~0.2.0", "tiny-relative-date": "^1.3.0", "treeverse": "^3.0.0", - "validate-npm-package-name": "^5.0.0", + "validate-npm-package-name": "^5.0.1", "which": "^4.0.0", "write-file-atomic": "^5.0.1" },