Repository navigation
Keep npm package name case on parse and validation - #240
Open
akashrajeev wants to merge 1 commit into
Open
akashrajeev wants to merge 1 commit into
akashrajeev wants to merge 1 commit into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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