-
-
Notifications
You must be signed in to change notification settings - Fork 545
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2261 from nexB/fix-npm-dist-issue
Fix `dist_mapper()` in packagedcode/npm.py
- Loading branch information
Showing
4 changed files
with
150 additions
and
3 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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{ | ||
"name": "angular-compare-validator", | ||
"version": "0.1.1", | ||
"license": "MIT", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/GeorgDangl/angular-compare-validator.git" | ||
}, | ||
"description": "Angular form validation directive to compare two inputs", | ||
"main": "./dist/index.js", | ||
"typings": "./dist/index", | ||
"dependencies": { | ||
"@angular/core": ">=2.0.0", | ||
"@angular/forms": ">=2.0.0", | ||
"@angular/common": ">=2.0.0", | ||
"rxjs": ">=5.0.0-beta.12", | ||
"zone.js": ">=0.6.21" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/GeorgDangl/angular-compare-validator/issues" | ||
}, | ||
"homepage": "https://github.com/GeorgDangl/angular-compare-validator#readme", | ||
"_id": "[email protected]", | ||
"_npmVersion": "5.2.0", | ||
"_nodeVersion": "7.7.1", | ||
"_npmUser": { | ||
"name": "georgdangl", | ||
"email": "[email protected]" | ||
}, | ||
"dist": { | ||
"integrity": "sha512-j3DtXjUTGFrVj7KjEUdprJPd1og2zokUblhvwD4DrJPc+x8RNUrCb0CLdcDr9RZj1eTo4nw4dSo8Br3edJp8Aw==", | ||
"shasum": "d35a0754c8587b0502874e3636cf0f19565d09b7", | ||
"tarball": "https://registry.npmjs.org/angular-compare-validator/-/angular-compare-validator-0.1.1.tgz" | ||
}, | ||
"maintainers": [ | ||
{ | ||
"name": "georgdangl", | ||
"email": "[email protected]" | ||
} | ||
], | ||
"_npmOperationalInternal": { | ||
"host": "s3://npm-registry-packages", | ||
"tmp": "tmp/angular-compare-validator-0.1.1.tgz_1506372149543_0.2524787310976535" | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,88 @@ | ||
[ | ||
{ | ||
"type": "npm", | ||
"namespace": null, | ||
"name": "angular-compare-validator", | ||
"version": "0.1.1", | ||
"qualifiers": {}, | ||
"subpath": null, | ||
"primary_language": "JavaScript", | ||
"description": "Angular form validation directive to compare two inputs", | ||
"release_date": null, | ||
"parties": [ | ||
{ | ||
"type": "person", | ||
"role": "maintainer", | ||
"name": "georgdangl", | ||
"email": "[email protected]", | ||
"url": null | ||
} | ||
], | ||
"keywords": [], | ||
"homepage_url": "https://github.com/GeorgDangl/angular-compare-validator#readme", | ||
"download_url": "https://registry.npmjs.org/angular-compare-validator/-/angular-compare-validator-0.1.1.tgz", | ||
"size": null, | ||
"sha1": "d35a0754c8587b0502874e3636cf0f19565d09b7", | ||
"md5": null, | ||
"sha256": null, | ||
"sha512": "8f70ed5e3513185ad58fb2a3114769ac93ddd68836ce89146e586fc03e03ac93dcfb1f11354ac26f408b75c0ebf51663d5e4e8e27c38752a3c06bdde749a7c03", | ||
"bug_tracking_url": "https://github.com/GeorgDangl/angular-compare-validator/issues", | ||
"code_view_url": null, | ||
"vcs_url": "git+https://github.com/GeorgDangl/angular-compare-validator.git", | ||
"copyright": null, | ||
"license_expression": "mit", | ||
"declared_license": [ | ||
"MIT" | ||
], | ||
"notice_text": null, | ||
"root_path": null, | ||
"dependencies": [ | ||
{ | ||
"purl": "pkg:npm/%40angular/core", | ||
"requirement": ">=2.0.0", | ||
"scope": "dependencies", | ||
"is_runtime": true, | ||
"is_optional": false, | ||
"is_resolved": false | ||
}, | ||
{ | ||
"purl": "pkg:npm/%40angular/forms", | ||
"requirement": ">=2.0.0", | ||
"scope": "dependencies", | ||
"is_runtime": true, | ||
"is_optional": false, | ||
"is_resolved": false | ||
}, | ||
{ | ||
"purl": "pkg:npm/%40angular/common", | ||
"requirement": ">=2.0.0", | ||
"scope": "dependencies", | ||
"is_runtime": true, | ||
"is_optional": false, | ||
"is_resolved": false | ||
}, | ||
{ | ||
"purl": "pkg:npm/rxjs", | ||
"requirement": ">=5.0.0-beta.12", | ||
"scope": "dependencies", | ||
"is_runtime": true, | ||
"is_optional": false, | ||
"is_resolved": false | ||
}, | ||
{ | ||
"purl": "pkg:npm/zone.js", | ||
"requirement": ">=0.6.21", | ||
"scope": "dependencies", | ||
"is_runtime": true, | ||
"is_optional": false, | ||
"is_resolved": false | ||
} | ||
], | ||
"contains_source_code": null, | ||
"source_packages": [], | ||
"purl": "pkg:npm/[email protected]", | ||
"repository_homepage_url": "https://www.npmjs.com/package/angular-compare-validator", | ||
"repository_download_url": "https://registry.npmjs.org/angular-compare-validator/-/angular-compare-validator-0.1.1.tgz", | ||
"api_data_url": "https://registry.npmjs.org/angular-compare-validator/0.1.1" | ||
} | ||
] |
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 |
---|---|---|
|
@@ -76,6 +76,12 @@ def test_parse_person_dict4(self): | |
'url': 'http://example.com'} | ||
assert ('Isaac Z. Schlueter', '[email protected]' , 'http://example.com') == npm.parse_person(test) | ||
|
||
def test_parse_dist_with_string_values(self): | ||
test_file = self.get_test_loc('npm/dist/package.json') | ||
expected_loc = self.get_test_loc('npm/dist/package.json.expected') | ||
packages = npm.parse(test_file) | ||
self.check_packages(packages, expected_loc, regen=False) | ||
|
||
def test_parse_as_installed(self): | ||
test_file = self.get_test_loc('npm/as_installed/package.json') | ||
expected_loc = self.get_test_loc('npm/as_installed/package.json.expected') | ||
|