SonarJS: Support Bun root catalog for catalog: dependencies

SonarJS does not correctly resolve Bun’s default catalog when it is defined at the root of package.json.

Originally reported here:

Oxc traced the warning to SonarJS:

Example:

{
  "dependencies": {
    "effect": "catalog:"
  },
  "catalog": {
    "effect": "4.0.0-rc.112"
  }
}

Bun resolves this correctly, but SonarJS outputs:

Dependency "effect" could not be resolved for catalog "default"

Expected: bare catalog: should resolve against Bun’s top-level "catalog" field without emitting the warning.

Related PR’s and Jira

Hey @mynameistito, welcome to the Community!

It seems like the closed PR you linked saw some activity recently when a user commented that we made mistake in assuming this wasn’t supported. It’s quite great timing that you brought this up at the same time as this happened! (was it you who commented in the PR? :eyes:)

We now have another PR to finally address this, so I recommend you follow the progress there.

Hello @mynameistito,

thanks for the heads up. We are aware and this will be fixed in the coming days.

Cheers!
Victor

Too easy legend!

I saw it on git being re implemented tyty!

  • Tito