Skip to content

Commit be221ea

Browse files
committed
deps: validate-npm-package-name@7.0.2
1 parent 149823d commit be221ea

File tree

5 files changed

+24
-21
lines changed

5 files changed

+24
-21
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
["_http_agent","_http_client","_http_common","_http_incoming","_http_outgoing","_http_server","_stream_duplex","_stream_passthrough","_stream_readable","_stream_transform","_stream_wrap","_stream_writable","_tls_common","_tls_wrap","assert","assert/strict","async_hooks","buffer","child_process","cluster","console","constants","crypto","dgram","diagnostics_channel","dns","dns/promises","domain","events","fs","fs/promises","http","http2","https","inspector","inspector/promises","module","net","os","path","path/posix","path/win32","perf_hooks","process","punycode","querystring","readline","readline/promises","repl","stream","stream/consumers","stream/promises","stream/web","string_decoder","sys","timers","timers/promises","tls","trace_events","tty","url","util","util/types","v8","vm","wasi","worker_threads","zlib","node:sea","node:sqlite","node:test","node:test/reporters"]

node_modules/validate-npm-package-name/lib/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
'use strict'
2-
const { builtinModules: builtins } = require('module')
2+
const builtins = require('./builtin-modules.json')
33

44
var scopedPackagePattern = new RegExp('^(?:@([^/]+?)[/])?([^/]+?)$')
55
var exclusionList = [
@@ -34,6 +34,10 @@ function validate (name) {
3434
errors.push('name cannot start with a period')
3535
}
3636

37+
if (name.startsWith('-')) {
38+
errors.push('name cannot start with a hyphen')
39+
}
40+
3741
if (name.match(/^_/)) {
3842
errors.push('name cannot start with an underscore')
3943
}

node_modules/validate-npm-package-name/package.json

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,30 @@
11
{
22
"name": "validate-npm-package-name",
3-
"version": "7.0.0",
3+
"version": "7.0.2",
44
"description": "Give me a string and I'll tell you if it's a valid npm package name",
55
"main": "lib/",
66
"directories": {
77
"test": "test"
88
},
99
"devDependencies": {
10-
"@npmcli/eslint-config": "^5.0.0",
11-
"@npmcli/template-oss": "4.27.1",
12-
"tap": "^16.0.1"
10+
"@npmcli/eslint-config": "^6.0.0",
11+
"@npmcli/template-oss": "4.28.1"
1312
},
1413
"scripts": {
14+
"builtin-fixture": "node -e \"console.log(JSON.stringify(require('node:module').builtinModules))\" > ./lib/builtin-modules.json",
1515
"cov:test": "TAP_FLAGS='--cov' npm run test:code",
1616
"test:code": "tap ${TAP_FLAGS:-'--'} test/*.js",
1717
"test:style": "standard",
18-
"test": "tap",
18+
"test": "node --test './test/**/*.js'",
1919
"lint": "npm run eslint",
2020
"postlint": "template-oss-check",
2121
"template-oss-apply": "template-oss-apply --force",
2222
"lintfix": "npm run eslint -- --fix",
23-
"snap": "tap",
23+
"snap": "node --test --test-update-snapshots './test/**/*.js'",
2424
"posttest": "npm run lint",
25-
"eslint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\""
25+
"eslint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"",
26+
"test:node20": "node --test test",
27+
"test:cover": "node --test --experimental-test-coverage --test-timeout=3000 --test-coverage-lines=100 --test-coverage-functions=100 --test-coverage-branches=100 './test/**/*.js'"
2628
},
2729
"repository": {
2830
"type": "git",
@@ -49,13 +51,9 @@
4951
},
5052
"templateOSS": {
5153
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
52-
"version": "4.27.1",
53-
"publish": true
54-
},
55-
"tap": {
56-
"nyc-arg": [
57-
"--exclude",
58-
"tap-snapshots/**"
59-
]
54+
"version": "4.28.1",
55+
"publish": true,
56+
"testRunner": "node:test",
57+
"latestCiVersion": 24
6058
}
6159
}

package-lock.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@
148148
"text-table": "~0.2.0",
149149
"tiny-relative-date": "^2.0.2",
150150
"treeverse": "^3.0.0",
151-
"validate-npm-package-name": "^7.0.0",
151+
"validate-npm-package-name": "^7.0.2",
152152
"which": "^6.0.0"
153153
},
154154
"bin": {
@@ -14033,9 +14033,9 @@
1403314033
}
1403414034
},
1403514035
"node_modules/validate-npm-package-name": {
14036-
"version": "7.0.0",
14037-
"resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-7.0.0.tgz",
14038-
"integrity": "sha512-bwVk/OK+Qu108aJcMAEiU4yavHUI7aN20TgZNBj9MR2iU1zPUl1Z1Otr7771ExfYTPTvfN8ZJ1pbr5Iklgt4xg==",
14036+
"version": "7.0.2",
14037+
"resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-7.0.2.tgz",
14038+
"integrity": "sha512-hVDIBwsRruT73PbK7uP5ebUt+ezEtCmzZz3F59BSr2F6OVFnJ/6h8liuvdLrQ88Xmnk6/+xGGuq+pG9WwTuy3A==",
1403914039
"inBundle": true,
1404014040
"license": "ISC",
1404114041
"engines": {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@
115115
"text-table": "~0.2.0",
116116
"tiny-relative-date": "^2.0.2",
117117
"treeverse": "^3.0.0",
118-
"validate-npm-package-name": "^7.0.0",
118+
"validate-npm-package-name": "^7.0.2",
119119
"which": "^6.0.0"
120120
},
121121
"bundleDependencies": [

0 commit comments

Comments
 (0)