From 795ee77f4774d73548c6e794b5c98494f598fa66 Mon Sep 17 00:00:00 2001 From: Jono Yang Date: Tue, 9 May 2023 16:18:48 -0700 Subject: [PATCH 1/3] Do not set version to empty string in npm_api_url #3393 Signed-off-by: Jono Yang --- src/packagedcode/npm.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/packagedcode/npm.py b/src/packagedcode/npm.py index ddb043f0177..c6e7a1ec645 100644 --- a/src/packagedcode/npm.py +++ b/src/packagedcode/npm.py @@ -801,7 +801,7 @@ def npm_api_url(namespace, name, version=None, registry='https://registry.npmjs. For example: >>> result = npm_api_url('@invisionag', 'eslint-config-ivx', '0.1.4', 'https://registry.yarnpkg.com') - >>> assert result == 'https://registry.yarnpkg.com/@invisionag%2feslint-config-ivx' + >>> assert result == 'https://registry.yarnpkg.com/@invisionag%2feslint-config-ivx/0.1.4' >>> assert npm_api_url(None, 'angular', '1.6.6') == 'https://registry.npmjs.org/angular/1.6.6' @@ -812,8 +812,6 @@ def npm_api_url(namespace, name, version=None, registry='https://registry.npmjs. # this is a legacy wart: older registries used to always encode this / # FIXME: do NOT encode and use plain / instead ns_name = '%2f'.join([namespace, name]) - # there is no version-specific URL for scoped packages - version = '' else: ns_name = name From 74c4bf615f19dd2635efe97924e08fcd7f6931b2 Mon Sep 17 00:00:00 2001 From: Jono Yang Date: Fri, 12 May 2023 15:45:05 -0700 Subject: [PATCH 2/3] Update docstring and test for npm_api_url #3393 Signed-off-by: Jono Yang --- src/packagedcode/npm.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/packagedcode/npm.py b/src/packagedcode/npm.py index c6e7a1ec645..e621d2af0cb 100644 --- a/src/packagedcode/npm.py +++ b/src/packagedcode/npm.py @@ -794,16 +794,17 @@ def npm_api_url(namespace, name, version=None, registry='https://registry.npmjs. Return a package API data URL given a namespace, name, version and a base registry URL. - Note that for scoped packages (with a namespace), the URL is not version - specific but contains the data for all versions as the default behvior of - the registries is to return nothing in this case. Special quoting rules are - applied for scoped npms. + Special quoting rules are applied for scoped npms. For example: >>> result = npm_api_url('@invisionag', 'eslint-config-ivx', '0.1.4', 'https://registry.yarnpkg.com') >>> assert result == 'https://registry.yarnpkg.com/@invisionag%2feslint-config-ivx/0.1.4' + >>> result = npm_api_url('@invisionag', 'eslint-config-ivx', 'https://registry.yarnpkg.com') + >>> assert result == 'https://registry.yarnpkg.com/@invisionag%2feslint-config-ivx' + >>> assert npm_api_url(None, 'angular', '1.6.6') == 'https://registry.npmjs.org/angular/1.6.6' + >>> assert npm_api_url(None, 'angular') == 'https://registry.npmjs.org/angular' >>> assert not npm_api_url(None, None, None) """ From 71eb7ba90f75d39bf34fcc4ebb9917cb05658df5 Mon Sep 17 00:00:00 2001 From: Jono Yang Date: Tue, 16 May 2023 14:35:08 -0700 Subject: [PATCH 3/3] Update expected test results #3393 Signed-off-by: Jono Yang --- src/packagedcode/npm.py | 2 +- .../package-lock.json-expected | 2 +- .../package-lock.json-expected | 2 +- .../npm/private-and-yarn/scan.expected.json | 32 +++++++++---------- .../data/npm/scoped1/package.json.expected | 2 +- .../data/npm/scoped2/package.json.expected | 2 +- .../yarn-lock/v1-complex/yarn.lock-expected | 6 ++-- .../data/score/basic-expected.json | 4 +-- ...consistent_licenses_copyleft-expected.json | 4 +-- .../no_license_or_copyright-expected.json | 4 +-- .../data/score/no_license_text-expected.json | 4 +-- .../data/tallies/packages/expected.json | 4 +-- 12 files changed, 34 insertions(+), 34 deletions(-) diff --git a/src/packagedcode/npm.py b/src/packagedcode/npm.py index e621d2af0cb..d6e34c0e406 100644 --- a/src/packagedcode/npm.py +++ b/src/packagedcode/npm.py @@ -800,7 +800,7 @@ def npm_api_url(namespace, name, version=None, registry='https://registry.npmjs. >>> result = npm_api_url('@invisionag', 'eslint-config-ivx', '0.1.4', 'https://registry.yarnpkg.com') >>> assert result == 'https://registry.yarnpkg.com/@invisionag%2feslint-config-ivx/0.1.4' - >>> result = npm_api_url('@invisionag', 'eslint-config-ivx', 'https://registry.yarnpkg.com') + >>> result = npm_api_url('@invisionag', 'eslint-config-ivx', registry='https://registry.yarnpkg.com') >>> assert result == 'https://registry.yarnpkg.com/@invisionag%2feslint-config-ivx' >>> assert npm_api_url(None, 'angular', '1.6.6') == 'https://registry.npmjs.org/angular/1.6.6' diff --git a/tests/packagedcode/data/npm/package-lock-v2-2/package-lock.json-expected b/tests/packagedcode/data/npm/package-lock-v2-2/package-lock.json-expected index 8fa15323bd0..43e71ef0efd 100644 --- a/tests/packagedcode/data/npm/package-lock-v2-2/package-lock.json-expected +++ b/tests/packagedcode/data/npm/package-lock-v2-2/package-lock.json-expected @@ -176,7 +176,7 @@ ], "repository_homepage_url": "https://www.npmjs.com/package/@szmarczak/http-timer", "repository_download_url": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz", - "api_data_url": "https://registry.npmjs.org/@szmarczak%2fhttp-timer", + "api_data_url": "https://registry.npmjs.org/@szmarczak%2fhttp-timer/1.1.2", "datasource_id": "npm_package_lock_json", "purl": "pkg:npm/%40szmarczak/http-timer@1.1.2" }, diff --git a/tests/packagedcode/data/npm/package-lock-v2/package-lock.json-expected b/tests/packagedcode/data/npm/package-lock-v2/package-lock.json-expected index aabdfa17f77..154ce619943 100644 --- a/tests/packagedcode/data/npm/package-lock-v2/package-lock.json-expected +++ b/tests/packagedcode/data/npm/package-lock-v2/package-lock.json-expected @@ -165,7 +165,7 @@ "dependencies": [], "repository_homepage_url": "https://www.npmjs.com/package/@sindresorhus/is", "repository_download_url": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", - "api_data_url": "https://registry.npmjs.org/@sindresorhus%2fis", + "api_data_url": "https://registry.npmjs.org/@sindresorhus%2fis/0.14.0", "datasource_id": "npm_package_lock_json", "purl": "pkg:npm/%40sindresorhus/is@0.14.0" }, diff --git a/tests/packagedcode/data/npm/private-and-yarn/scan.expected.json b/tests/packagedcode/data/npm/private-and-yarn/scan.expected.json index 8b138fb6c15..ce9f856f219 100644 --- a/tests/packagedcode/data/npm/private-and-yarn/scan.expected.json +++ b/tests/packagedcode/data/npm/private-and-yarn/scan.expected.json @@ -71,7 +71,7 @@ ], "repository_homepage_url": "https://www.npmjs.com/package/@babel/runtime", "repository_download_url": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.2.0.tgz", - "api_data_url": "https://registry.npmjs.org/@babel%2fruntime", + "api_data_url": "https://registry.npmjs.org/@babel%2fruntime/7.2.0", "datasource_id": "yarn_lock_v1", "purl": "pkg:npm/%40babel/runtime@7.2.0" }, @@ -197,7 +197,7 @@ ], "repository_homepage_url": "https://www.npmjs.com/package/@ballerina/api-designer", "repository_download_url": "https://registry.npmjs.org/@ballerina/api-designer/-/api-designer-0.99.0-RC3.tgz", - "api_data_url": "https://registry.npmjs.org/@ballerina%2fapi-designer", + "api_data_url": "https://registry.npmjs.org/@ballerina%2fapi-designer/0.99.0-RC3", "datasource_id": "yarn_lock_v1", "purl": "pkg:npm/%40ballerina/api-designer@0.99.0-RC3" }, @@ -313,7 +313,7 @@ ], "repository_homepage_url": "https://www.npmjs.com/package/@ballerina/ast-model", "repository_download_url": "https://registry.npmjs.org/@ballerina/ast-model/-/ast-model-0.99.0-RC3.tgz", - "api_data_url": "https://registry.npmjs.org/@ballerina%2fast-model", + "api_data_url": "https://registry.npmjs.org/@ballerina%2fast-model/0.99.0-RC3", "datasource_id": "yarn_lock_v1", "purl": "pkg:npm/%40ballerina/ast-model@0.99.0-RC3" }, @@ -379,7 +379,7 @@ ], "repository_homepage_url": "https://www.npmjs.com/package/@ballerina/ballerina-by-examples", "repository_download_url": "https://registry.npmjs.org/@ballerina/ballerina-by-examples/-/ballerina-by-examples-0.99.0-RC3.tgz", - "api_data_url": "https://registry.npmjs.org/@ballerina%2fballerina-by-examples", + "api_data_url": "https://registry.npmjs.org/@ballerina%2fballerina-by-examples/0.99.0-RC3", "datasource_id": "yarn_lock_v1", "purl": "pkg:npm/%40ballerina/ballerina-by-examples@0.99.0-RC3" }, @@ -505,7 +505,7 @@ ], "repository_homepage_url": "https://www.npmjs.com/package/@ballerina/diagram", "repository_download_url": "https://registry.npmjs.org/@ballerina/diagram/-/diagram-0.99.0-RC3.tgz", - "api_data_url": "https://registry.npmjs.org/@ballerina%2fdiagram", + "api_data_url": "https://registry.npmjs.org/@ballerina%2fdiagram/0.99.0-RC3", "datasource_id": "yarn_lock_v1", "purl": "pkg:npm/%40ballerina/diagram@0.99.0-RC3" }, @@ -621,7 +621,7 @@ ], "repository_homepage_url": "https://www.npmjs.com/package/@ballerina/distribution", "repository_download_url": "https://registry.npmjs.org/@ballerina/distribution/-/distribution-0.99.0-RC3.tgz", - "api_data_url": "https://registry.npmjs.org/@ballerina%2fdistribution", + "api_data_url": "https://registry.npmjs.org/@ballerina%2fdistribution/0.99.0-RC3", "datasource_id": "yarn_lock_v1", "purl": "pkg:npm/%40ballerina/distribution@0.99.0-RC3" }, @@ -717,7 +717,7 @@ ], "repository_homepage_url": "https://www.npmjs.com/package/@ballerina/documentation", "repository_download_url": "https://registry.npmjs.org/@ballerina/documentation/-/documentation-0.99.0-RC3.tgz", - "api_data_url": "https://registry.npmjs.org/@ballerina%2fdocumentation", + "api_data_url": "https://registry.npmjs.org/@ballerina%2fdocumentation/0.99.0-RC3", "datasource_id": "yarn_lock_v1", "purl": "pkg:npm/%40ballerina/documentation@0.99.0-RC3" }, @@ -772,7 +772,7 @@ "dependencies": [], "repository_homepage_url": "https://www.npmjs.com/package/@ballerina/font", "repository_download_url": "https://registry.npmjs.org/@ballerina/font/-/font-0.99.0-RC3.tgz", - "api_data_url": "https://registry.npmjs.org/@ballerina%2ffont", + "api_data_url": "https://registry.npmjs.org/@ballerina%2ffont/0.99.0-RC3", "datasource_id": "yarn_lock_v1", "purl": "pkg:npm/%40ballerina/font@0.99.0-RC3" }, @@ -1024,7 +1024,7 @@ ], "repository_homepage_url": "https://www.npmjs.com/package/@babel/runtime", "repository_download_url": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.2.0.tgz", - "api_data_url": "https://registry.npmjs.org/@babel%2fruntime", + "api_data_url": "https://registry.npmjs.org/@babel%2fruntime/7.2.0", "datasource_id": "yarn_lock_v1", "purl": "pkg:npm/%40babel/runtime@7.2.0" }, @@ -1146,7 +1146,7 @@ ], "repository_homepage_url": "https://www.npmjs.com/package/@ballerina/api-designer", "repository_download_url": "https://registry.npmjs.org/@ballerina/api-designer/-/api-designer-0.99.0-RC3.tgz", - "api_data_url": "https://registry.npmjs.org/@ballerina%2fapi-designer", + "api_data_url": "https://registry.npmjs.org/@ballerina%2fapi-designer/0.99.0-RC3", "datasource_id": "yarn_lock_v1", "purl": "pkg:npm/%40ballerina/api-designer@0.99.0-RC3" }, @@ -1258,7 +1258,7 @@ ], "repository_homepage_url": "https://www.npmjs.com/package/@ballerina/ast-model", "repository_download_url": "https://registry.npmjs.org/@ballerina/ast-model/-/ast-model-0.99.0-RC3.tgz", - "api_data_url": "https://registry.npmjs.org/@ballerina%2fast-model", + "api_data_url": "https://registry.npmjs.org/@ballerina%2fast-model/0.99.0-RC3", "datasource_id": "yarn_lock_v1", "purl": "pkg:npm/%40ballerina/ast-model@0.99.0-RC3" }, @@ -1320,7 +1320,7 @@ ], "repository_homepage_url": "https://www.npmjs.com/package/@ballerina/ballerina-by-examples", "repository_download_url": "https://registry.npmjs.org/@ballerina/ballerina-by-examples/-/ballerina-by-examples-0.99.0-RC3.tgz", - "api_data_url": "https://registry.npmjs.org/@ballerina%2fballerina-by-examples", + "api_data_url": "https://registry.npmjs.org/@ballerina%2fballerina-by-examples/0.99.0-RC3", "datasource_id": "yarn_lock_v1", "purl": "pkg:npm/%40ballerina/ballerina-by-examples@0.99.0-RC3" }, @@ -1442,7 +1442,7 @@ ], "repository_homepage_url": "https://www.npmjs.com/package/@ballerina/diagram", "repository_download_url": "https://registry.npmjs.org/@ballerina/diagram/-/diagram-0.99.0-RC3.tgz", - "api_data_url": "https://registry.npmjs.org/@ballerina%2fdiagram", + "api_data_url": "https://registry.npmjs.org/@ballerina%2fdiagram/0.99.0-RC3", "datasource_id": "yarn_lock_v1", "purl": "pkg:npm/%40ballerina/diagram@0.99.0-RC3" }, @@ -1554,7 +1554,7 @@ ], "repository_homepage_url": "https://www.npmjs.com/package/@ballerina/distribution", "repository_download_url": "https://registry.npmjs.org/@ballerina/distribution/-/distribution-0.99.0-RC3.tgz", - "api_data_url": "https://registry.npmjs.org/@ballerina%2fdistribution", + "api_data_url": "https://registry.npmjs.org/@ballerina%2fdistribution/0.99.0-RC3", "datasource_id": "yarn_lock_v1", "purl": "pkg:npm/%40ballerina/distribution@0.99.0-RC3" }, @@ -1646,7 +1646,7 @@ ], "repository_homepage_url": "https://www.npmjs.com/package/@ballerina/documentation", "repository_download_url": "https://registry.npmjs.org/@ballerina/documentation/-/documentation-0.99.0-RC3.tgz", - "api_data_url": "https://registry.npmjs.org/@ballerina%2fdocumentation", + "api_data_url": "https://registry.npmjs.org/@ballerina%2fdocumentation/0.99.0-RC3", "datasource_id": "yarn_lock_v1", "purl": "pkg:npm/%40ballerina/documentation@0.99.0-RC3" }, @@ -1697,7 +1697,7 @@ "dependencies": [], "repository_homepage_url": "https://www.npmjs.com/package/@ballerina/font", "repository_download_url": "https://registry.npmjs.org/@ballerina/font/-/font-0.99.0-RC3.tgz", - "api_data_url": "https://registry.npmjs.org/@ballerina%2ffont", + "api_data_url": "https://registry.npmjs.org/@ballerina%2ffont/0.99.0-RC3", "datasource_id": "yarn_lock_v1", "purl": "pkg:npm/%40ballerina/font@0.99.0-RC3" }, diff --git a/tests/packagedcode/data/npm/scoped1/package.json.expected b/tests/packagedcode/data/npm/scoped1/package.json.expected index 5890fb92cd5..b0efeafc76d 100644 --- a/tests/packagedcode/data/npm/scoped1/package.json.expected +++ b/tests/packagedcode/data/npm/scoped1/package.json.expected @@ -676,7 +676,7 @@ ], "repository_homepage_url": "https://www.npmjs.com/package/@ionic/app-scripts", "repository_download_url": "https://registry.npmjs.org/@ionic/app-scripts/-/app-scripts-3.0.1-201710301651.tgz", - "api_data_url": "https://registry.npmjs.org/@ionic%2fapp-scripts", + "api_data_url": "https://registry.npmjs.org/@ionic%2fapp-scripts/3.0.1-201710301651", "datasource_id": "npm_package_json", "purl": "pkg:npm/%40ionic/app-scripts@3.0.1-201710301651" } diff --git a/tests/packagedcode/data/npm/scoped2/package.json.expected b/tests/packagedcode/data/npm/scoped2/package.json.expected index 1e8a692202e..0b02fbc7d7f 100644 --- a/tests/packagedcode/data/npm/scoped2/package.json.expected +++ b/tests/packagedcode/data/npm/scoped2/package.json.expected @@ -186,7 +186,7 @@ ], "repository_homepage_url": "https://www.npmjs.com/package/@invisionag/eslint-config-ivx", "repository_download_url": "https://registry.npmjs.org/@invisionag/eslint-config-ivx/-/eslint-config-ivx-0.0.2.tgz", - "api_data_url": "https://registry.npmjs.org/@invisionag%2feslint-config-ivx", + "api_data_url": "https://registry.npmjs.org/@invisionag%2feslint-config-ivx/0.0.2", "datasource_id": "npm_package_json", "purl": "pkg:npm/%40invisionag/eslint-config-ivx@0.0.2" } diff --git a/tests/packagedcode/data/npm/yarn-lock/v1-complex/yarn.lock-expected b/tests/packagedcode/data/npm/yarn-lock/v1-complex/yarn.lock-expected index 0bbc4de1fec..240319304a7 100644 --- a/tests/packagedcode/data/npm/yarn-lock/v1-complex/yarn.lock-expected +++ b/tests/packagedcode/data/npm/yarn-lock/v1-complex/yarn.lock-expected @@ -91,7 +91,7 @@ ], "repository_homepage_url": "https://www.npmjs.com/package/@babel/code-frame", "repository_download_url": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0.tgz", - "api_data_url": "https://registry.npmjs.org/@babel%2fcode-frame", + "api_data_url": "https://registry.npmjs.org/@babel%2fcode-frame/7.0.0", "datasource_id": "yarn_lock_v1", "purl": "pkg:npm/%40babel/code-frame@7.0.0" }, @@ -183,7 +183,7 @@ ], "repository_homepage_url": "https://www.npmjs.com/package/@babel/core", "repository_download_url": "https://registry.npmjs.org/@babel/core/-/core-7.3.4.tgz", - "api_data_url": "https://registry.npmjs.org/@babel%2fcore", + "api_data_url": "https://registry.npmjs.org/@babel%2fcore/7.3.4", "datasource_id": "yarn_lock_v1", "purl": "pkg:npm/%40babel/core@7.3.4" }, @@ -245,7 +245,7 @@ ], "repository_homepage_url": "https://www.npmjs.com/package/@babel/helper-annotate-as-pure", "repository_download_url": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.0.0.tgz", - "api_data_url": "https://registry.npmjs.org/@babel%2fhelper-annotate-as-pure", + "api_data_url": "https://registry.npmjs.org/@babel%2fhelper-annotate-as-pure/7.0.0", "datasource_id": "yarn_lock_v1", "purl": "pkg:npm/%40babel/helper-annotate-as-pure@7.0.0" }, diff --git a/tests/summarycode/data/score/basic-expected.json b/tests/summarycode/data/score/basic-expected.json index efee8ee65e8..81d4d79d34e 100644 --- a/tests/summarycode/data/score/basic-expected.json +++ b/tests/summarycode/data/score/basic-expected.json @@ -76,7 +76,7 @@ "extra_data": {}, "repository_homepage_url": "https://www.npmjs.com/package/@invisionag/eslint-config-ivx", "repository_download_url": "https://registry.npmjs.org/@invisionag/eslint-config-ivx/-/eslint-config-ivx-0.0.10.tgz", - "api_data_url": "https://registry.npmjs.org/@invisionag%2feslint-config-ivx", + "api_data_url": "https://registry.npmjs.org/@invisionag%2feslint-config-ivx/0.0.10", "package_uid": "pkg:npm/%40invisionag/eslint-config-ivx@0.0.10?uuid=fixed-uid-done-for-testing-5642512d1758", "datafile_paths": [ "basic/package.json" @@ -684,7 +684,7 @@ ], "repository_homepage_url": "https://www.npmjs.com/package/@invisionag/eslint-config-ivx", "repository_download_url": "https://registry.npmjs.org/@invisionag/eslint-config-ivx/-/eslint-config-ivx-0.0.10.tgz", - "api_data_url": "https://registry.npmjs.org/@invisionag%2feslint-config-ivx", + "api_data_url": "https://registry.npmjs.org/@invisionag%2feslint-config-ivx/0.0.10", "datasource_id": "npm_package_json", "purl": "pkg:npm/%40invisionag/eslint-config-ivx@0.0.10" } diff --git a/tests/summarycode/data/score/inconsistent_licenses_copyleft-expected.json b/tests/summarycode/data/score/inconsistent_licenses_copyleft-expected.json index bb8df1acc14..47d4190329d 100644 --- a/tests/summarycode/data/score/inconsistent_licenses_copyleft-expected.json +++ b/tests/summarycode/data/score/inconsistent_licenses_copyleft-expected.json @@ -76,7 +76,7 @@ "extra_data": {}, "repository_homepage_url": "https://www.npmjs.com/package/@invisionag/eslint-config-ivx", "repository_download_url": "https://registry.npmjs.org/@invisionag/eslint-config-ivx/-/eslint-config-ivx-0.0.10.tgz", - "api_data_url": "https://registry.npmjs.org/@invisionag%2feslint-config-ivx", + "api_data_url": "https://registry.npmjs.org/@invisionag%2feslint-config-ivx/0.0.10", "package_uid": "pkg:npm/%40invisionag/eslint-config-ivx@0.0.10?uuid=fixed-uid-done-for-testing-5642512d1758", "datafile_paths": [ "inconsistent_licenses_copyleft/package.json" @@ -689,7 +689,7 @@ ], "repository_homepage_url": "https://www.npmjs.com/package/@invisionag/eslint-config-ivx", "repository_download_url": "https://registry.npmjs.org/@invisionag/eslint-config-ivx/-/eslint-config-ivx-0.0.10.tgz", - "api_data_url": "https://registry.npmjs.org/@invisionag%2feslint-config-ivx", + "api_data_url": "https://registry.npmjs.org/@invisionag%2feslint-config-ivx/0.0.10", "datasource_id": "npm_package_json", "purl": "pkg:npm/%40invisionag/eslint-config-ivx@0.0.10" } diff --git a/tests/summarycode/data/score/no_license_or_copyright-expected.json b/tests/summarycode/data/score/no_license_or_copyright-expected.json index 3ea44500afb..5a65ded4de9 100644 --- a/tests/summarycode/data/score/no_license_or_copyright-expected.json +++ b/tests/summarycode/data/score/no_license_or_copyright-expected.json @@ -56,7 +56,7 @@ "extra_data": {}, "repository_homepage_url": "https://www.npmjs.com/package/@invisionag/eslint-config-ivx", "repository_download_url": "https://registry.npmjs.org/@invisionag/eslint-config-ivx/-/eslint-config-ivx-0.0.10.tgz", - "api_data_url": "https://registry.npmjs.org/@invisionag%2feslint-config-ivx", + "api_data_url": "https://registry.npmjs.org/@invisionag%2feslint-config-ivx/0.0.10", "package_uid": "pkg:npm/%40invisionag/eslint-config-ivx@0.0.10?uuid=fixed-uid-done-for-testing-5642512d1758", "datafile_paths": [ "no_license_or_copyright/package.json" @@ -571,7 +571,7 @@ ], "repository_homepage_url": "https://www.npmjs.com/package/@invisionag/eslint-config-ivx", "repository_download_url": "https://registry.npmjs.org/@invisionag/eslint-config-ivx/-/eslint-config-ivx-0.0.10.tgz", - "api_data_url": "https://registry.npmjs.org/@invisionag%2feslint-config-ivx", + "api_data_url": "https://registry.npmjs.org/@invisionag%2feslint-config-ivx/0.0.10", "datasource_id": "npm_package_json", "purl": "pkg:npm/%40invisionag/eslint-config-ivx@0.0.10" } diff --git a/tests/summarycode/data/score/no_license_text-expected.json b/tests/summarycode/data/score/no_license_text-expected.json index 40274c8afe4..cd08916a0f1 100644 --- a/tests/summarycode/data/score/no_license_text-expected.json +++ b/tests/summarycode/data/score/no_license_text-expected.json @@ -76,7 +76,7 @@ "extra_data": {}, "repository_homepage_url": "https://www.npmjs.com/package/@invisionag/eslint-config-ivx", "repository_download_url": "https://registry.npmjs.org/@invisionag/eslint-config-ivx/-/eslint-config-ivx-0.0.10.tgz", - "api_data_url": "https://registry.npmjs.org/@invisionag%2feslint-config-ivx", + "api_data_url": "https://registry.npmjs.org/@invisionag%2feslint-config-ivx/0.0.10", "package_uid": "pkg:npm/%40invisionag/eslint-config-ivx@0.0.10?uuid=fixed-uid-done-for-testing-5642512d1758", "datafile_paths": [ "no_license_text/package.json" @@ -629,7 +629,7 @@ ], "repository_homepage_url": "https://www.npmjs.com/package/@invisionag/eslint-config-ivx", "repository_download_url": "https://registry.npmjs.org/@invisionag/eslint-config-ivx/-/eslint-config-ivx-0.0.10.tgz", - "api_data_url": "https://registry.npmjs.org/@invisionag%2feslint-config-ivx", + "api_data_url": "https://registry.npmjs.org/@invisionag%2feslint-config-ivx/0.0.10", "datasource_id": "npm_package_json", "purl": "pkg:npm/%40invisionag/eslint-config-ivx@0.0.10" } diff --git a/tests/summarycode/data/tallies/packages/expected.json b/tests/summarycode/data/tallies/packages/expected.json index 1b98ec526f8..03f10fd5bc2 100644 --- a/tests/summarycode/data/tallies/packages/expected.json +++ b/tests/summarycode/data/tallies/packages/expected.json @@ -211,7 +211,7 @@ "extra_data": {}, "repository_homepage_url": "https://www.npmjs.com/package/@ionic/app-scripts", "repository_download_url": "https://registry.npmjs.org/@ionic/app-scripts/-/app-scripts-3.0.1-201710301651.tgz", - "api_data_url": "https://registry.npmjs.org/@ionic%2fapp-scripts", + "api_data_url": "https://registry.npmjs.org/@ionic%2fapp-scripts/3.0.1-201710301651", "package_uid": "pkg:npm/%40ionic/app-scripts@3.0.1-201710301651?uuid=fixed-uid-done-for-testing-5642512d1758", "datafile_paths": [ "scan/scoped1/package.json" @@ -1971,7 +1971,7 @@ ], "repository_homepage_url": "https://www.npmjs.com/package/@ionic/app-scripts", "repository_download_url": "https://registry.npmjs.org/@ionic/app-scripts/-/app-scripts-3.0.1-201710301651.tgz", - "api_data_url": "https://registry.npmjs.org/@ionic%2fapp-scripts", + "api_data_url": "https://registry.npmjs.org/@ionic%2fapp-scripts/3.0.1-201710301651", "datasource_id": "npm_package_json", "purl": "pkg:npm/%40ionic/app-scripts@3.0.1-201710301651" }