-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: add npm name validation and make lower casing names adaptive
- Loading branch information
Showing
2 changed files
with
157 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
[ | ||
{ | ||
"description": "scheme is lowercased", | ||
"purl": "PkG:npm/foo/[email protected]", | ||
"canonical_purl": "pkg:npm/foo/[email protected]", | ||
"type": "npm", | ||
"purl": "PkG:type/foo/[email protected]", | ||
"canonical_purl": "pkg:type/foo/[email protected]", | ||
"type": "type", | ||
"namespace": "foo", | ||
"name": "bar", | ||
"version": "1.0.0", | ||
|
@@ -61,22 +61,22 @@ | |
}, | ||
{ | ||
"description": "namespace can contain special characters", | ||
"purl": "pkg:npm/%40foo%40%3F%23/bar@1.0.0", | ||
"canonical_purl": "pkg:npm/%40foo%40%3F%23/bar@1.0.0", | ||
"type": "npm", | ||
"namespace": "@foo@?#", | ||
"name": "bar", | ||
"purl": "pkg:type/%40namespace%40%3F%23/name@1.0.0", | ||
"canonical_purl": "pkg:type/%40namespace%40%3F%23/name@1.0.0", | ||
"type": "type", | ||
"namespace": "@namespace@?#", | ||
"name": "name", | ||
"version": "1.0.0", | ||
"qualifiers": null, | ||
"subpath": null, | ||
"is_invalid": false | ||
}, | ||
{ | ||
"description": "name can contain special characters (with namespace)", | ||
"purl": "pkg:npm/%40foo/bar%40%3F%[email protected]", | ||
"canonical_purl": "pkg:npm/%40foo/bar%40%3F%[email protected]", | ||
"type": "npm", | ||
"namespace": "@foo", | ||
"purl": "pkg:type/foo/bar%40%3F%[email protected]", | ||
"canonical_purl": "pkg:type/foo/bar%40%3F%[email protected]", | ||
"type": "type", | ||
"namespace": "foo", | ||
"name": "bar@?#", | ||
"version": "1.0.0", | ||
"qualifiers": null, | ||
|
@@ -85,9 +85,9 @@ | |
}, | ||
{ | ||
"description": "name can contain special characters (without namespace)", | ||
"purl": "pkg:npm/bar%40%3F%[email protected]", | ||
"canonical_purl": "pkg:npm/bar%40%3F%[email protected]", | ||
"type": "npm", | ||
"purl": "pkg:type/bar%40%3F%[email protected]", | ||
"canonical_purl": "pkg:type/bar%40%3F%[email protected]", | ||
"type": "type", | ||
"namespace": null, | ||
"name": "bar@?#", | ||
"version": "1.0.0", | ||
|
@@ -97,10 +97,10 @@ | |
}, | ||
{ | ||
"description": "version can contain special characters", | ||
"purl": "pkg:npm/%40foo/[email protected]%40%3F%23", | ||
"canonical_purl": "pkg:npm/%40foo/[email protected]%40%3F%23", | ||
"type": "npm", | ||
"namespace": "@foo", | ||
"purl": "pkg:type/foo/[email protected]%40%3F%23", | ||
"canonical_purl": "pkg:type/foo/[email protected]%40%3F%23", | ||
"type": "type", | ||
"namespace": "foo", | ||
"name": "bar", | ||
"version": "1.0.0-@?#", | ||
"qualifiers": null, | ||
|