Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c38ec84

Browse files
committed
1 parent 72564c5 commit c38ec84

File tree

4 files changed

+14
-9
lines changed

4 files changed

+14
-9
lines changed

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ function validate (name) {
3030
errors.push('name length must be greater than zero')
3131
}
3232

33-
if (name.match(/^\./)) {
33+
if (name.startsWith('.')) {
3434
errors.push('name cannot start with a period')
3535
}
3636

@@ -75,6 +75,11 @@ function validate (name) {
7575
if (nameMatch) {
7676
var user = nameMatch[1]
7777
var pkg = nameMatch[2]
78+
79+
if (pkg.startsWith('.')) {
80+
errors.push('name cannot start with a period')
81+
}
82+
7883
if (encodeURIComponent(user) === user && encodeURIComponent(pkg) === pkg) {
7984
return done(warnings, errors)
8085
}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
22
"name": "validate-npm-package-name",
3-
"version": "6.0.0",
3+
"version": "6.0.1",
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": {
1010
"@npmcli/eslint-config": "^5.0.0",
11-
"@npmcli/template-oss": "4.23.3",
11+
"@npmcli/template-oss": "4.24.3",
1212
"tap": "^16.0.1"
1313
},
1414
"scripts": {
@@ -49,7 +49,7 @@
4949
},
5050
"templateOSS": {
5151
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
52-
"version": "4.23.3",
52+
"version": "4.24.3",
5353
"publish": true
5454
},
5555
"tap": {

package-lock.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@
151151
"text-table": "~0.2.0",
152152
"tiny-relative-date": "^1.3.0",
153153
"treeverse": "^3.0.0",
154-
"validate-npm-package-name": "^6.0.0",
154+
"validate-npm-package-name": "^6.0.1",
155155
"which": "^5.0.0",
156156
"write-file-atomic": "^6.0.0"
157157
},
@@ -16626,9 +16626,9 @@
1662616626
}
1662716627
},
1662816628
"node_modules/validate-npm-package-name": {
16629-
"version": "6.0.0",
16630-
"resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-6.0.0.tgz",
16631-
"integrity": "sha512-d7KLgL1LD3U3fgnvWEY1cQXoO/q6EQ1BSz48Sa149V/5zVTAbgmZIpyI8TRi6U9/JNyeYLlTKsEMPtLC27RFUg==",
16629+
"version": "6.0.1",
16630+
"resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-6.0.1.tgz",
16631+
"integrity": "sha512-OaI//3H0J7ZkR1OqlhGA8cA+Cbk/2xFOQpJOt5+s27/ta9eZwpeervh4Mxh4w0im/kdgktowaqVNR7QOrUd7Yg==",
1663216632
"inBundle": true,
1663316633
"license": "ISC",
1663416634
"engines": {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@
116116
"text-table": "~0.2.0",
117117
"tiny-relative-date": "^1.3.0",
118118
"treeverse": "^3.0.0",
119-
"validate-npm-package-name": "^6.0.0",
119+
"validate-npm-package-name": "^6.0.1",
120120
"which": "^5.0.0",
121121
"write-file-atomic": "^6.0.0"
122122
},

0 commit comments

Comments
 (0)