Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to return the version if dependencies are specified #120

Open
ajmalab opened this issue May 11, 2023 · 1 comment
Open

Fails to return the version if dependencies are specified #120

ajmalab opened this issue May 11, 2023 · 1 comment

Comments

@ajmalab
Copy link

ajmalab commented May 11, 2023

The from_string() method does not parse purls with dependencies specified properly.

Steps to recreate:

The name is parsed as[email protected]([email protected])(typescript and the version as '4.9.4).
Ideally the name should be express, version 7.0.6.

@pombredanne
Copy link
Member

@ajmalab Sorry for the late reply!
I have never seen dependencies specified this way and this is not part of the PURL spec so far. Can you tell me where you got these from?

Now if you want to encode this the PURL would end up this way:

>>> from packageurl import *
>>> a="pkg:npm/@promster/express"; b="7.0.6([email protected])([email protected])"
>>> purl = PackageURL(type="npm", namespace="@promster", name="express", version="7.0.6([email protected])([email protected])")
>>> purl.to_string()
'pkg:npm/%40promster/[email protected]%28prom-client%4014.1.1%29%28typescript%404.9.4%29'

This would be rather odd to do. Can you tell me what you trying to achieve and which tool you may use?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants