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

Resolve node_modules relative to package.json #380

Merged
merged 6 commits into from
Oct 29, 2023

Conversation

fvclaus
Copy link
Contributor

@fvclaus fvclaus commented Sep 11, 2023

We have the following project structure:

pom.xml
  src/main/resources/static
     package.json
     node_modules

I can add the package.json to sonar.sources, but nothing is ever found, because node_modules folder is expected to reside in moduleBaseDir (which is root in this example).

I thought about supporting the old & and new behavior and searching for the node_modules in two locations, but I don't think I have ever come across a project where node_modules is not located next to package.json .

I also had to restructure the test sources, because I could not easily add the a new test case.

@derkoe can you please take a look?

@fvclaus fvclaus changed the title Better package json support Resolve node_modules relative to package.json Sep 11, 2023
@derkoe derkoe merged commit 2671581 into porscheinformatik:master Oct 29, 2023
3 checks passed
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.

2 participants