Socket
Socket
Sign inDemoInstall

packageurl-js

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

packageurl-js - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

10

CHANGELOG.md

@@ -0,1 +1,9 @@

# 0.0.4
### Bug Fixes
* Properly handle PyPI `purl` values per the purl-spec [#18](https://github.com/package-url/packageurl-js/pull/18)
# 0.0.3
### Bug Fixes
* Properly handle `undefined` or `null` qualifier values [#16](https://github.com/package-url/packageurl-js/issues/16)
# 0.0.2

@@ -32,2 +40,2 @@

* Initial release
* Initial release

2

package.json
{
"name": "packageurl-js",
"version": "0.0.3",
"version": "0.0.4",
"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 @@ "main": "index.js",

@@ -59,5 +59,13 @@ /*

_handlePyPi() {
this.name = this.name.toLowerCase().replace('_', '-');
}
toString() {
var purl = ['pkg:', this.type, '/'];
if (this.type === 'pypi') {
this._handlePyPi();
}
if (this.namespace) {

@@ -64,0 +72,0 @@ purl.push(encodeURIComponent(this.namespace).replace('%3A', ':'));

@@ -70,4 +70,10 @@ /*

});
it('should handle pypi package-urls per the purl-spec', function () {
const purlMixedCasing = PackageURL.fromString('pkg:pypi/PYYaml@5.3.0');
assert.strictEqual(purlMixedCasing.toString(), 'pkg:pypi/pyyaml@5.3.0');
const purlWithUnderscore = PackageURL.fromString('pkg:pypi/typing_extensions@1.0.0');
assert.strictEqual(purlWithUnderscore.toString(), 'pkg:pypi/typing-extensions@1.0.0');
});
}
});
});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc