Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sonarqube-scanner

Package Overview
Dependencies
Maintainers
17
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sonarqube-scanner - npm Package Compare versions

Comparing version 3.5.0 to 4.0.0

bin/sonar-scanner

41

package.json
{
"name": "sonarqube-scanner",
"description": "SonarQube/SonarCloud Scanner for the JavaScript world",
"version": "3.5.0",
"version": "4.0.0",
"homepage": "https://github.com/SonarSource/sonar-scanner-npm",

@@ -18,22 +18,34 @@ "author": {

"license": "LGPL-3.0-only",
"main": "src/index.js",
"main": "build/src/index.js",
"types": "build/src/index.d.ts",
"bin": {
"sonar-scanner": "src/bin/sonar-scanner"
"sonar-scanner": "bin/sonar-scanner"
},
"engines": {
"node": ">= 16"
"node": ">= 18"
},
"dependencies": {
"adm-zip": "0.5.12",
"fancy-log": "2.0.0",
"https-proxy-agent": "7.0.4",
"axios": "1.6.8",
"commander": "12.0.0",
"fs-extra": "11.2.0",
"hpagent": "1.2.0",
"jest-sonar-reporter": "2.0.0",
"mkdirp": "3.0.1",
"node-downloader-helper": "2.1.9",
"progress": "2.0.3",
"slugify": "1.6.6"
"node-forge": "^1.3.1",
"proxy-from-env": "^1.1.0",
"semver": "7.6.0",
"slugify": "1.6.6",
"tar-stream": "3.1.7"
},
"devDependencies": {
"@types/adm-zip": "0.5.5",
"@types/fs-extra": "11.0.4",
"@types/jest": "29.5.12",
"@types/node-forge": "^1.3.11",
"@types/proxy-from-env": "1.0.4",
"@types/semver": "7.5.8",
"@types/sinon": "17.0.3",
"@types/tar-stream": "3.1.3",
"@typescript-eslint/parser": "7.4.0",
"axios-mock-adapter": "1.22.0",
"chai": "4.4.1",

@@ -48,2 +60,3 @@ "eslint": "8.57.0",

"sinon": "17.0.1",
"ts-jest": "29.1.2",
"typescript": "5.4.3"

@@ -60,4 +73,5 @@ },

"scripts": {
"build": "npm ci && npm run check-format && npm run license && npm test && cd tools/orchestrator && npm run build",
"test": "npx jest --coverage",
"build": "npm ci && npm run ts-build && npm run check-format && npm run license && npm test && cd tools/orchestrator && npm run build",
"ts-build": "tsc && node scripts/fix-comments.js",
"test": "jest --coverage",
"test-integration": "cd test/integration && npm test",

@@ -78,4 +92,5 @@ "format": "prettier --write .",

"files": [
"src/**"
"build/**",
"bin/**"
]
}

@@ -11,6 +11,10 @@ # NPM module to run SonarQube/SonarCloud analyses

This is the documentation for v4. If you are using v3, refer to [the v3 documentation](https://github.com/SonarSource/sonar-scanner-npm/tree/37797347a30635647da5a45ed912a9ae77405b85).
## Installation
_Prerequisite: Node v16+ (otherwise use sonarqube-scanner v2.9.1)_
_Prerequisite: Node v18+ (for v4 and above)_
_Prerequisite: Node v16+ (for v3, otherwise use sonarqube-scanner v2.9.1)_
This package is available on npm as: `sonarqube-scanner`

@@ -38,3 +42,3 @@

```javascript
const scanner = require('sonarqube-scanner');
const scanner = require('sonarqube-scanner').default;

@@ -44,3 +48,3 @@ scanner(

serverUrl: 'https://sonarqube.mycompany.com',
token: '019d1e2e04eefdcd0caee1468f39a45e69d33d3f', // use "login" for SQ up to version 9
token: '019d1e2e04eefdcd0caee1468f39a45e69d33d3f',
options: {

@@ -53,3 +57,8 @@ 'sonar.projectName': 'My App',

},
() => process.exit(),
error => {
if (error) {
console.error(error);
}
process.exit();
},
);

@@ -63,6 +72,4 @@ ```

- `parameters` _Map_
- `serverUrl` _String_ (optional) The URL of the SonarQube server. Defaults to http://localhost:9000
- `login` _String_ (optional) The login used to connect to the SonarQube server up to version 9. Empty by default.
- `serverUrl` _String_ (optional) The URL of the SonarQube server. Defaults to https://sonarcloud.io
- `token` _String_ (optional) The token used to connect to the SonarQube server v10+ or SonarCloud. Empty by default.
- `caPath` _String_ (optional) the path to a CA to pass as `https.request()` [options](https://nodejs.org/api/https.html#https_https_request_options_callback).
- `options` _Map_ (optional) Used to pass extra parameters for the analysis. See the [official documentation](http://redirect.sonarsource.com/doc/analysis-parameters.html) for more details.

@@ -108,3 +115,3 @@ - `callback` _Function_ (optional)

You can install manually the [standard SonarScanner](https://redirect.sonarsource.com/doc/install-configure-scanner.html),
You can install manually the [standard SonarScanner](https://docs.sonarsource.com/sonarqube/latest/analyzing-source-code/scanners/sonarscanner/),
which requires to have a Java Runtime Environment available too (Java 8+).

@@ -134,3 +141,3 @@

## Download From Mirrors
## Download From Mirrors (SQ < 10.6 only)

@@ -166,3 +173,3 @@ By default, the scanner binaries are downloaded from `https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/`.

By default, the scanner binaries are cached into `$HOME/.sonar/native-sonar-scanner` folder.
To use a custom cache fodler instead of `$HOME`, set `$SONAR_BINARY_CACHE`.
To use a custom cache folder instead of `$HOME`, set `$SONAR_BINARY_CACHE`.

@@ -169,0 +176,0 @@ **Example:**

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc