Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: support for --save flag and others that are supported by npm cli #301

Merged
merged 1 commit into from
Feb 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions lib/cliCommons.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
handler: (argv) => {
if (argv && argv.package) {
for (let i = 0; i < argv.package.length; i++) {
const parsedPackage = npa(argv.package[i])

Check warning on line 23 in lib/cliCommons.js

View workflow job for this annotation

GitHub Actions / Node 18 (ubuntu-latest)

Function Call Object Injection Sink

Check warning on line 23 in lib/cliCommons.js

View workflow job for this annotation

GitHub Actions / Node 20 (ubuntu-latest)

Function Call Object Injection Sink

Check warning on line 23 in lib/cliCommons.js

View workflow job for this annotation

GitHub Actions / Node 18 (ubuntu-latest)

Function Call Object Injection Sink

Check warning on line 23 in lib/cliCommons.js

View workflow job for this annotation

GitHub Actions / Node 20 (ubuntu-latest)

Function Call Object Injection Sink
const versionModifier =
parsedPackage.fetchSpec === '*' ? 'latest' : parsedPackage.fetchSpec
// eslint-disable-next-line security/detect-object-injection
Expand All @@ -33,6 +33,14 @@

static getOptions() {
return {
S: {
alias: ['save', 'save-prod', 'save-optional', 'save-bundle'],
type: 'boolean'
},
g: {
alias: 'global',
type: 'boolean'
},
P: {
alias: ['save-prod', 'peer'],
type: 'boolean'
Expand Down
Loading