Skip to content

Commit 0c14597

Browse files
authored
fix: use --prefix instead of --dir for npm provider (#187)
1 parent ae0daba commit 0c14597

File tree

3 files changed

+22
-3
lines changed

3 files changed

+22
-3
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@
5353
"fast-toml": "^0.5.4",
5454
"fast-xml-parser": "^4.2.4",
5555
"help": "^3.0.2",
56+
"node-fetch": "^2.6.7",
5657
"packageurl-js": "^1.0.2",
57-
"yargs": "^17.7.2",
58-
"node-fetch": "^2.6.7"
58+
"yargs": "^17.7.2"
5959
},
6060
"devDependencies": {
6161
"@babel/core": "^7.23.2",

src/index.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,27 @@ export function testSelectExhortBackend(opts) {
8989
*/
9090
let theUrl
9191

92+
/**
93+
* @overload
94+
* @param {string} manifest
95+
* @param {true} html
96+
* @param {object} [opts={}]
97+
* @returns {Promise<string>}
98+
* @throws {Error}
99+
*/
100+
101+
/**
102+
* @overload
103+
* @param {string} manifest
104+
* @param {false} html
105+
* @param {object} [opts={}]
106+
* @returns {Promise<AnalysisReport>}
107+
* @throws {Error}
108+
*/
109+
92110
/**
93111
* Get stack analysis report for a manifest file.
112+
* @overload
94113
* @param {string} manifest - path for the manifest
95114
* @param {boolean} [html=false] - true will return a html string, false will return AnalysisReport
96115
* @param {{}} [opts={}] - optional various options to pass along the application

src/providers/javascript_npm.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export default class Javascript_npm extends Base_javascript {
2121
_updateLockFileCmdArgs(manifestDir) {
2222
const args = ['install', '--package-lock-only']
2323
if (manifestDir) {
24-
args.push('--dir', manifestDir)
24+
args.push('--prefix', manifestDir)
2525
}
2626
return args;
2727
}

0 commit comments

Comments
 (0)