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

[Gradle] Fixed a problem with scoped NPM packages while resolving modules from NPM #1379

Merged
merged 2 commits into from
Sep 17, 2024

Conversation

malice00
Copy link
Contributor

When resolving the Gradle modules from NPM packages, there was an issue when the package was scoped. Because the package was referenced by its name, which in Gradle gets its scope added, the call to resolve dependencies used the wrong module-name.

@prabhu
Copy link
Contributor

prabhu commented Sep 16, 2024

Interesting. Could we add any tests?

@malice00
Copy link
Contributor Author

Keep forgetting to lint before committing...
I can add some changes to the repo in the repotest, I'm afraid the 'normal' tests just can't be easily adapted to these changes. Making some changes and running a local test now...

@prabhu
Copy link
Contributor

prabhu commented Sep 17, 2024

@malice00 how do we handle the case where the namespace starts with "@"? This must be replaced to %40 for a valid purl

@malice00
Copy link
Contributor Author

malice00 commented Sep 17, 2024

@prabhu This is already handled -- I was already using the code that generates components for NPM. This fix was for then using the NPM-name in the Gradle command instead of the correct Gradle module's name.

@prabhu prabhu merged commit 8f98600 into CycloneDX:master Sep 17, 2024
19 of 20 checks passed
@malice00 malice00 deleted the fix/gradle_scoped_npm branch September 17, 2024 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants