File tree Expand file tree Collapse file tree 4 files changed +14
-9
lines changed
node_modules/validate-npm-package-name Expand file tree Collapse file tree 4 files changed +14
-9
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ function validate (name) {
30
30
errors . push ( 'name length must be greater than zero' )
31
31
}
32
32
33
- if ( name . match ( / ^ \. / ) ) {
33
+ if ( name . startsWith ( '.' ) ) {
34
34
errors . push ( 'name cannot start with a period' )
35
35
}
36
36
@@ -75,6 +75,11 @@ function validate (name) {
75
75
if ( nameMatch ) {
76
76
var user = nameMatch [ 1 ]
77
77
var pkg = nameMatch [ 2 ]
78
+
79
+ if ( pkg . startsWith ( '.' ) ) {
80
+ errors . push ( 'name cannot start with a period' )
81
+ }
82
+
78
83
if ( encodeURIComponent ( user ) === user && encodeURIComponent ( pkg ) === pkg ) {
79
84
return done ( warnings , errors )
80
85
}
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " validate-npm-package-name" ,
3
- "version" : " 6.0.0 " ,
3
+ "version" : " 6.0.1 " ,
4
4
"description" : " Give me a string and I'll tell you if it's a valid npm package name" ,
5
5
"main" : " lib/" ,
6
6
"directories" : {
7
7
"test" : " test"
8
8
},
9
9
"devDependencies" : {
10
10
"@npmcli/eslint-config" : " ^5.0.0" ,
11
- "@npmcli/template-oss" : " 4.23 .3" ,
11
+ "@npmcli/template-oss" : " 4.24 .3" ,
12
12
"tap" : " ^16.0.1"
13
13
},
14
14
"scripts" : {
49
49
},
50
50
"templateOSS" : {
51
51
"//@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" ,
53
53
"publish" : true
54
54
},
55
55
"tap" : {
Original file line number Diff line number Diff line change 151
151
"text-table": "~0.2.0",
152
152
"tiny-relative-date": "^1.3.0",
153
153
"treeverse": "^3.0.0",
154
- "validate-npm-package-name": "^6.0.0 ",
154
+ "validate-npm-package-name": "^6.0.1 ",
155
155
"which": "^5.0.0",
156
156
"write-file-atomic": "^6.0.0"
157
157
},
16626
16626
}
16627
16627
},
16628
16628
"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 ==",
16632
16632
"inBundle": true,
16633
16633
"license": "ISC",
16634
16634
"engines": {
Original file line number Diff line number Diff line change 116
116
"text-table" : " ~0.2.0" ,
117
117
"tiny-relative-date" : " ^1.3.0" ,
118
118
"treeverse" : " ^3.0.0" ,
119
- "validate-npm-package-name" : " ^6.0.0 " ,
119
+ "validate-npm-package-name" : " ^6.0.1 " ,
120
120
"which" : " ^5.0.0" ,
121
121
"write-file-atomic" : " ^6.0.0"
122
122
},
You can’t perform that action at this time.
0 commit comments