Skip to content

Keep npm package name case on parse and validation - #240

Open
akashrajeev wants to merge 1 commit into
package-url:mainfrom
akashrajeev:npm-case-sensitive-name
Open

akashrajeev wants to merge 1 commit into
package-url:mainfrom
akashrajeev:npm-case-sensitive-name

Conversation

@akashrajeev

Copy link
Copy Markdown

npm package names are case-sensitive (orchestrator and Orchestrator are two different packages on npmjs.com), but the parser lowercases them today, so both end up as pkg:npm/orchestrator and collide. Reported in #230.

This stops lowercasing npm names on parse and marks the npm type as case-sensitive for name and namespace so validation no longer warns on uppercase npm names. One pinned spec test case still expects the old lowercase warning, so it's xfailed until the spec submodule gets bumped.

Fixes #230

npm package names are case-sensitive, so lowercasing them during
normalization can collide two different packages (for example
orchestrator and Orchestrator on npmjs.com).

Stop lowercasing npm names in normalize_name and mark the npm type
definition as case-sensitive for name and namespace so validation no
longer warns on uppercase npm names.

The pinned spec test data still expects the old lowercase warning in
one base-group validation case, so that case is xfailed until the
spec submodule is bumped.

Fixes: package-url#230
Signed-off-by: Akash Rajeev <akashrajeev.313@gmail.com>
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.

npm case collision due to lower

1 participant