Skip to content

Commit 795ee77

Browse files
committed
Do not set version to empty string in npm_api_url #3393
Signed-off-by: Jono Yang <[email protected]>
1 parent fef2408 commit 795ee77

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/packagedcode/npm.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -801,7 +801,7 @@ def npm_api_url(namespace, name, version=None, registry='https://registry.npmjs.
801801
802802
For example:
803803
>>> result = npm_api_url('@invisionag', 'eslint-config-ivx', '0.1.4', 'https://registry.yarnpkg.com')
804-
>>> assert result == 'https://registry.yarnpkg.com/@invisionag%2feslint-config-ivx'
804+
>>> assert result == 'https://registry.yarnpkg.com/@invisionag%2feslint-config-ivx/0.1.4'
805805
806806
>>> assert npm_api_url(None, 'angular', '1.6.6') == 'https://registry.npmjs.org/angular/1.6.6'
807807
@@ -812,8 +812,6 @@ def npm_api_url(namespace, name, version=None, registry='https://registry.npmjs.
812812
# this is a legacy wart: older registries used to always encode this /
813813
# FIXME: do NOT encode and use plain / instead
814814
ns_name = '%2f'.join([namespace, name])
815-
# there is no version-specific URL for scoped packages
816-
version = ''
817815
else:
818816
ns_name = name
819817

0 commit comments

Comments
 (0)