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

Account for NPM being case-sensitive #38

Merged
merged 1 commit into from
Sep 29, 2021

Conversation

mealingr
Copy link
Contributor

@mealingr mealingr commented Sep 28, 2021

Although for NPM according to https://docs.npmjs.com/cli/v7/configuring-npm/package-json#name

New packages must not have uppercase letters in the name.

some old NPM packages exist that do have uppercase letters in their names

For example

This package
https://www.npmjs.com/package/Base64/v/1.0.0

Is different to this package
https://www.npmjs.com/package/base64/v/1.0.0

However at the moment they have the same Package URL i.e.
pkg:npm/[email protected]

This PR stops the NPM namespace and name validations from lower-casing so that instead we end up with the Package URLs
pkg:npm/[email protected]
pkg:npm/[email protected]

@jdillon
Copy link

jdillon commented Sep 28, 2021

Just for reference this is exactly why I think PURL should not have these sorts of transformations; package-url/purl-spec#38 and that case or char translations should not be part of the PURL specification types.

Copy link
Member

@stevespringett stevespringett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for identifying the issue and submitting a PR. Much appreciated.

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

Successfully merging this pull request may close these issues.

3 participants