packageurl-js
Advanced tools
Comparing version 1.1.1 to 1.2.0
@@ -0,1 +1,5 @@ | ||
# 1.2.0 | ||
## Features | ||
* Add `pub` parsing for Dart and Flutter packages (contributed by @topaztee) | ||
# 1.1.1 | ||
@@ -2,0 +6,0 @@ ### Bug Fix |
{ | ||
"name": "packageurl-js", | ||
"version": "1.1.1", | ||
"version": "1.2.0", | ||
"description": "JavaScript library to parse and build \"purl\" aka. package URLs. This is a microlibrary implementing the purl spec at https://github.com/package-url", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -77,2 +77,8 @@ /*! | ||
} | ||
_handlePub() { | ||
this.name = this.name.toLowerCase(); | ||
if (!/^[a-z0-9_]+$/i.test(this.name)) { | ||
throw new Error('Invalid purl: contains an illegal character.'); | ||
} | ||
} | ||
@@ -85,2 +91,5 @@ toString() { | ||
} | ||
if (this.type === 'pub') { | ||
this._handlePub(); | ||
} | ||
@@ -87,0 +96,0 @@ if (this.namespace) { |
@@ -327,2 +327,26 @@ [ | ||
{ | ||
"description": "checks for invalid characters", | ||
"purl": "pkg:pub/flutter_downloader@1.0.0", | ||
"canonical_purl": "pkg:pub/flutter_downloader@1.0.0", | ||
"type": "pub", | ||
"namespace": null, | ||
"name": "flutter_downloader", | ||
"version": "1.0.0", | ||
"qualifiers": null, | ||
"subpath": null, | ||
"is_invalid": false | ||
}, | ||
{ | ||
"description": "checks for invalid characters", | ||
"purl": "pkg:pub/flutter--downloader@1.0.0", | ||
"canonical_purl": "pkg:pub/flutter--downloader@1.0.0", | ||
"type": "pub", | ||
"namespace": null, | ||
"name": null, | ||
"version": null, | ||
"qualifiers": null, | ||
"subpath": null, | ||
"is_invalid": true | ||
}, | ||
{ | ||
"description": "namespace can contain special characters", | ||
@@ -329,0 +353,0 @@ "purl": "pkg:npm/%40foo%40%3F%23/bar@1.0.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
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
40877
882