Skip to content

Commit

Permalink
fix: re-run npm ci for more accurate diff list (#406)
Browse files Browse the repository at this point in the history
  • Loading branch information
ybiquitous committed May 10, 2021
1 parent 13ae315 commit 1f9a52c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7402,6 +7402,7 @@ module.exports.Collection = Hook.Collection

const core = __webpack_require__(470);
const { exec } = __webpack_require__(986);

const { NPM_VERSION } = __webpack_require__(32);
const audit = __webpack_require__(50);
const auditFix = __webpack_require__(905);
Expand Down Expand Up @@ -7456,6 +7457,10 @@ async function run() {

await core.group("Fix vulnerabilities", () => auditFix());

await core.group("Re-install user packages", async () => {
await exec("npm", npmArgs("ci"));
});

const afterPackages = await core.group("List packages after", () => listPackages());

const report = await core.group("Aggregate report", () =>
Expand Down
5 changes: 5 additions & 0 deletions lib/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const core = require("@actions/core");
const { exec } = require("@actions/exec");

const { NPM_VERSION } = require("./constants");
const audit = require("./audit");
const auditFix = require("./auditFix");
Expand Down Expand Up @@ -54,6 +55,10 @@ async function run() {

await core.group("Fix vulnerabilities", () => auditFix());

await core.group("Re-install user packages", async () => {
await exec("npm", npmArgs("ci"));
});

const afterPackages = await core.group("List packages after", () => listPackages());

const report = await core.group("Aggregate report", () =>
Expand Down

0 comments on commit 1f9a52c

Please sign in to comment.