feat: scoped npm support (@angular/core style paths) in extract_npm_info
This commit is contained in:
@@ -56,8 +56,16 @@ class TestNpmExtractor:
|
||||
)
|
||||
|
||||
def test_scoped_package(self):
|
||||
# Note: scoped packages have a different path in Nexus
|
||||
assert extract_npm_info("packages/@scope/name/-/name-1.0.0.tgz") is None
|
||||
assert extract_npm_info("packages/@scope/name/-/name-1.0.0.tgz") == (
|
||||
"@scope/name",
|
||||
"1.0.0",
|
||||
)
|
||||
|
||||
def test_scoped_angular_core(self):
|
||||
assert extract_npm_info("packages/@angular/core/-/core-18.0.0.tgz") == (
|
||||
"@angular/core",
|
||||
"18.0.0",
|
||||
)
|
||||
|
||||
def test_not_packages(self):
|
||||
assert extract_npm_info("/other/lodash/-/lodash-4.17.21.tgz") is None
|
||||
|
||||
Reference in New Issue
Block a user