@itssky/nx-sonar 1.0.0 → 22.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -22,6 +22,13 @@ emits LCOV (jest, vitest, …).
22
22
  npm install --save-dev @itssky/nx-sonar
23
23
  ```
24
24
 
25
+ ## Versioning
26
+
27
+ The plugin's **major** version tracks the **Nx major** it supports:
28
+ `@itssky/nx-sonar` 22.x targets Nx 22 (`@nx/devkit ^22`). When Nx 23 is
29
+ supported, the plugin releases 23.0.0. Minor and patch versions follow
30
+ semantic-release within that major.
31
+
25
32
  ## Quickstart
26
33
 
27
34
  ```bash
@@ -138,6 +145,14 @@ your test runner:
138
145
  **`A "token" was found in nx.json`** — remove it. Tokens belong in
139
146
  `SONAR_TOKEN` only.
140
147
 
148
+ **`Not authorized. ... please provide a user token in sonar.login`** — this
149
+ wording comes from SonarQube <= 9.x, whose scanner engine ignores
150
+ `sonar.token`. The plugin sends the token as both `sonar.token`
151
+ (SonarQube 10+, SonarCloud) and `sonar.login` (legacy servers), so make sure
152
+ `SONAR_TOKEN` holds a token generated on *that* server and that your plugin
153
+ version is >= 22.0.0. Recent scanners may log a deprecation warning about
154
+ `sonar.login`; it is expected and harmless.
155
+
141
156
  **Quality Gate failed but I don't want to block the build** — set
142
157
  `qualityGateWait: false` in the target options.
143
158
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itssky/nx-sonar",
3
- "version": "1.0.0",
3
+ "version": "22.0.0",
4
4
  "description": "Turnkey nx plugin that runs SonarQube/SonarCloud scans on nx projects.",
5
5
  "keywords": [
6
6
  "nx",
@@ -29,7 +29,7 @@
29
29
  "node": ">=20.0.0"
30
30
  },
31
31
  "peerDependencies": {
32
- "@nx/devkit": ">=22.0.0"
32
+ "@nx/devkit": "^22.0.0"
33
33
  },
34
34
  "dependencies": {
35
35
  "sonarqube-scanner": "^4.3.6",
@@ -12,6 +12,9 @@ function buildScannerProperties({ options, paths, ciContext, }) {
12
12
  if (options.organization)
13
13
  props['sonar.organization'] = options.organization;
14
14
  props['sonar.token'] = options.token;
15
+ // SonarQube <= 9.x scanner engines ignore sonar.token and only read
16
+ // sonar.login; recent scanners prefer sonar.token and just warn on this.
17
+ props['sonar.login'] = options.token;
15
18
  props['sonar.sources'] = joinList(paths.sources);
16
19
  if (paths.tests)
17
20
  props['sonar.tests'] = joinList(paths.tests);
@@ -1 +1 @@
1
- {"version":3,"file":"build-scanner-properties.js","sourceRoot":"","sources":["../../../../nx-sonar/src/utils/build-scanner-properties.ts"],"names":[],"mappings":";;AAWA,wDAwCC;AAxCD,SAAgB,sBAAsB,CAAC,EACrC,OAAO,EACP,KAAK,EACL,SAAS,GACO;IAChB,MAAM,KAAK,GAAsB,EAAE,CAAC;IAEpC,KAAK,CAAC,kBAAkB,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC;IAC/C,IAAI,OAAO,CAAC,WAAW;QAAE,KAAK,CAAC,mBAAmB,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC;IAC1E,IAAI,OAAO,CAAC,cAAc;QACxB,KAAK,CAAC,sBAAsB,CAAC,GAAG,OAAO,CAAC,cAAc,CAAC;IAEzD,KAAK,CAAC,gBAAgB,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC;IAC1C,IAAI,OAAO,CAAC,YAAY;QAAE,KAAK,CAAC,oBAAoB,CAAC,GAAG,OAAO,CAAC,YAAY,CAAC;IAC7E,KAAK,CAAC,aAAa,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC;IAErC,KAAK,CAAC,eAAe,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACjD,IAAI,KAAK,CAAC,KAAK;QAAE,KAAK,CAAC,aAAa,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAE9D,KAAK,CAAC,mCAAmC,CAAC,GAAG,KAAK,CAAC,YAAY,CAAC;IAChE,KAAK,CAAC,mCAAmC,CAAC,GAAG,KAAK,CAAC,YAAY,CAAC;IAChE,IAAI,KAAK,CAAC,uBAAuB;QAC/B,KAAK,CAAC,gCAAgC,CAAC,GAAG,KAAK,CAAC,uBAAuB,CAAC;IAE1E,KAAK,CAAC,kBAAkB,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACzD,KAAK,CAAC,wBAAwB,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;IAClE,IAAI,OAAO,CAAC,OAAO;QAAE,KAAK,CAAC,eAAe,CAAC,GAAG,MAAM,CAAC;IAErD,IAAI,OAAO,CAAC,eAAe,IAAI,SAAS,EAAE,CAAC;QACzC,IAAI,SAAS,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;YAChC,KAAK,CAAC,mBAAmB,CAAC,GAAG,SAAS,CAAC,IAAI,CAAC;QAC9C,CAAC;aAAM,CAAC;YACN,KAAK,CAAC,uBAAuB,CAAC,GAAG,SAAS,CAAC,GAAG,CAAC;YAC/C,KAAK,CAAC,0BAA0B,CAAC,GAAG,SAAS,CAAC,MAAM,CAAC;YACrD,KAAK,CAAC,wBAAwB,CAAC,GAAG,SAAS,CAAC,IAAI,CAAC;QACnD,CAAC;IACH,CAAC;IAED,6DAA6D;IAC7D,uCAAY,KAAK,GAAK,OAAO,CAAC,eAAe,EAAG;AAClD,CAAC;AAED,SAAS,QAAQ,CAAC,KAAwB;IACxC,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;AACxD,CAAC"}
1
+ {"version":3,"file":"build-scanner-properties.js","sourceRoot":"","sources":["../../../../nx-sonar/src/utils/build-scanner-properties.ts"],"names":[],"mappings":";;AAWA,wDA2CC;AA3CD,SAAgB,sBAAsB,CAAC,EACrC,OAAO,EACP,KA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