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

Support running npm-audit-resolver with npx #67

Open
jesse-mm opened this issue Apr 21, 2023 · 3 comments
Open

Support running npm-audit-resolver with npx #67

jesse-mm opened this issue Apr 21, 2023 · 3 comments

Comments

@jesse-mm
Copy link

Problem Description

Currently a global installation is required (or local) to run the audit. This is not a issue but it would helpful to run the audit using npx, this way CI/CD instructions can be reduced by calling npx npm-audit-resolver, instead of running npm install -g npm-audit-resolver and afterwards resolve-audit.

Currently running npx npm-audit-resolver results in the following

npx npm-audit-resolver
npm ERR! could not determine executable to run

I think a fairly small change is required to make this happen by adding a entry in the package.json within the bin entry.

  "bin": {
    "check-audit": "check.js",
    "resolve-audit": "resolve.js",
    "npm-audit-resolver": "resolve.js"
  }

Let me know your thoughts about this.

@joebowbeer
Copy link
Contributor

joebowbeer commented Apr 21, 2023

@jesse-mm There are two commands (check-audit and resolve-audit) and either can be invoked with npx.

See #9 (comment)

npx -p npm-audit-resolver check-audit

@jesse-mm
Copy link
Author

Ah I didn't know about that! Is it worth adding it to the README ?

@joebowbeer
Copy link
Contributor

I think it's worth adding to README.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants