koliveira15 / nx-sonarqube

A Nx plugin that scans projects using SonarQube / SonarCloud.
MIT License
51 stars 21 forks source link

Feature/upgrade to nx 20 #117

Closed gcko closed 2 weeks ago

gcko commented 1 month ago

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

Which package are you modifying?

What is the current behavior?

Currently, nx-sonarqube fails when using NX 20

Closes #116

This also fixes an issue with tsquery and latest typescript. See this bug https://github.com/phenomnomnominal/tsquery/issues/98

What is the new behavior?

Updated the usages of workspace to projectConfigurations

Does this PR introduce a breaking change?

It has been tested to work correctly with NX 20 and NX 19. I have not tested with other versions of NX

Other information

nx-cloud[bot] commented 1 month ago

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 7415607086531b173945b7bb3fe5c2085728232a. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

πŸ“‚ See all runs for this CI Pipeline Execution


βœ… Successfully ran 3 targets - [`nx affected -t build --parallel --exclude koliveira15`](https://cloud.nx.app/runs/RD7It28CUQ?utm_source=pull-request&utm_medium=comment) - [`nx affected -t test --parallel --exclude koliveira15`](https://cloud.nx.app/runs/1kRUOKT06j?utm_source=pull-request&utm_medium=comment) - [`nx affected -t lint --parallel --exclude koliveira15`](https://cloud.nx.app/runs/hIyAbvEWGN?utm_source=pull-request&utm_medium=comment)

Sent with πŸ’Œ from NxCloud.

gcko commented 1 month ago

I went ahead and did some digging in the NX codebase (their documentation is not so good 🀷 ) and found this -> https://github.com/nrwl/nx/blame/d131b0b67709560d816b0df394c762e72a7b51d6/packages/nx/src/config/misc-interfaces.ts#L248-L253C60

{
/**
   * Deprecated. Use projectsConfigurations or nxJsonConfiguration
   * The full workspace configuration
   * @todo(vsavkin): remove after v17
   */
  workspace?: ProjectsConfigurations & NxJsonConfiguration;
}

This was Removed in NX 20, but because of this, it does mean that this PR should be feasible for NX 16 and up

gcko commented 1 month ago

hey @koliveira15 , let me know if there is anything I can do to help out with this PR - πŸ™

jaredterm commented 4 weeks ago

Hey @koliveira15 , please let me know if there is anything else needed for this PR.

As an aside, it might be worthwhile contacting NX and making this an official plugin πŸ€” IMO static analysis is integral to development pipeline and I personally would push strongly for its inclusion to the NX family

gcko commented 3 weeks ago

@koliveira15 Anything I can do to help? This is becoming a blocker in our repository as it precludes us from updating nx and associated dependencies. Please let me know how I can contribute πŸ™

ErickRodrCodes commented 3 weeks ago

since he is busy, I will fork it out and move it to 20. we are having the same blocker as it is critical for us to use nx import to speed up monorepo work on our side.

ErickRodrCodes commented 3 weeks ago

It seems I am unable to create the package as I'm tied to several things at work. If there is no update in 15 days, I will retry to fork it and somehow own it... or worst thing to fork it into work and maintain it ourselves...

sceptre12 commented 2 weeks ago

Hey @koliveira15 Just checking to see if this PR can get merged