Skip to content

Moving to lock file + adding package audit action config #8

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

Merged
merged 5 commits into from
Nov 2, 2022

Conversation

minond
Copy link

@minond minond commented Nov 2, 2022

Fixes failing build in downstream projects. I'm not sure why a dev dependency is causing npm audit --omit dev to fail in the Web Widget SDK (the dependency that is causing the failure is a dev dependency), but I think it may have something to do with the fact that this project uses a shrinkwrap instead of a lock file. I'll look into this in the future, for now I'm just upgrading the dependency.

In addition, a new Action is added to run an npm audit on every PR and every month on a schedule.

EDIT: this is because of the shrinkwrap, here's an issue detailing the bug: npm/cli#4323, no solution is mentioned so I'm going to switch back to a regular lock file.

@minond minond changed the title Running npm audit fix Running npm audit fix + adding package audit action config Nov 2, 2022
@minond minond requested a review from sambev November 2, 2022 04:46
@minond minond changed the title Running npm audit fix + adding package audit action config Moving to lock file + adding package audit action config Nov 2, 2022
node-version: 16
cache: npm

- run: npm audit --omit dev
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious, why --omit dev vs --production? Is there even a difference?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess reading it may just be shorthand:

either via the --omit config, or one of the shorthands such as --production, --only=dev

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe they're equivalent in this case.

@minond minond merged commit d46126f into master Nov 2, 2022
@minond minond deleted the mm/npm-audit-fix branch November 2, 2022 20:58
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

Successfully merging this pull request may close these issues.

2 participants