validate-npm-package-name
Advanced tools
Comparing version 2.1.0 to 2.2.0
@@ -61,4 +61,5 @@ var scopedPackagePattern = new RegExp("^(?:@([^/]+?)[/])?([^/]+?)$"); | ||
// really-long-package-names-------------------------------such--length-----many---wow | ||
if (name.length > 128) { | ||
warnings.push("name can no longer contain more than 128 characters") | ||
// the thisisareallyreallylongpackagenameitshouldpublishdowenowhavealimittothelengthofpackagenames-poch. | ||
if (name.length > 214) { | ||
warnings.push("name can no longer contain more than 214 characters") | ||
} | ||
@@ -65,0 +66,0 @@ |
{ | ||
"name": "validate-npm-package-name", | ||
"version": "2.1.0", | ||
"version": "2.2.0", | ||
"description": "Give me a string and I'll tell you if it's a valid npm package name", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -61,3 +61,3 @@ # validate-npm-package-name | ||
```js | ||
validate("cRaZY-paCkAgE-with-mixed-case-and-more-than-128-characters----------------------------------------------------------------------") | ||
validate("cRaZY-paCkAgE-with-mixed-case-and-more-than-214-characters-----------------------------------------------------------------------------------------------------------------------------------------------------------") | ||
``` | ||
@@ -73,3 +73,3 @@ | ||
"name can no longer contain capital letters", | ||
"name can no longer contain more than 128 characters" | ||
"name can no longer contain more than 214 characters" | ||
] | ||
@@ -76,0 +76,0 @@ } |
@@ -83,8 +83,13 @@ var validate = require("..") | ||
t.deepEqual(validate("1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"), { | ||
t.deepEqual(validate("ifyouwanttogetthesumoftwonumberswherethosetwonumbersarechosenbyfindingthelargestoftwooutofthreenumbersandsquaringthemwhichismultiplyingthembyitselfthenyoushouldinputthreenumbersintothisfunctionanditwilldothatforyou-"), { | ||
validForNewPackages: false, | ||
validForOldPackages: true, | ||
warnings: ["name can no longer contain more than 128 characters"] | ||
warnings: ["name can no longer contain more than 214 characters"] | ||
}) | ||
t.deepEqual(validate("ifyouwanttogetthesumoftwonumberswherethosetwonumbersarechosenbyfindingthelargestoftwooutofthreenumbersandsquaringthemwhichismultiplyingthembyitselfthenyoushouldinputthreenumbersintothisfunctionanditwilldothatforyou"), { | ||
validForNewPackages: true, | ||
validForOldPackages: true | ||
}) | ||
// Legacy Mixed-Case | ||
@@ -91,0 +96,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9044
159
1