Skip to content

Commit

Permalink
chore: Added last set-value and mixed-deep advisories to the nsprc ig…
Browse files Browse the repository at this point in the history
…nore list (#1655)
  • Loading branch information
rpl authored Jul 12, 2019
1 parent 739aa52 commit 626a180
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .nsprc
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{
"exceptions": [
// Temporarily ignore set-value and mixin-deep advisories,
// related to watchpak and webpack dependencies
// (https://github.com/mozilla/web-ext/issues/1656).
"https://npmjs.com/advisories/1012",
"https://npmjs.com/advisories/1013"
]
}
4 changes: 3 additions & 1 deletion scripts/audit-deps
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
// (See https://github.com/npm/npm/issues/20565).

const shell = require('shelljs');
const stripJsonComments = require('strip-json-comments');

const npmVersion = parseInt(shell.exec('npm --version', {silent: true}).stdout.split('.')[0], 10);
const npmCmd = npmVersion >= 6 ? 'npm' : 'npx npm@latest';
Expand Down Expand Up @@ -42,7 +43,8 @@ const ignoredIssues = [];
let auditReport = getNpmAuditJSON();

if (auditReport) {
const exceptions = JSON.parse(shell.cat('.nsprc')).exceptions;
const {exceptions} = JSON.parse(stripJsonComments(shell.cat('.nsprc')));

if (auditReport.error) {
if (auditReport.error.code === 'ENETUNREACH') {
console.log('npm was not able to reach the api endpoint:', auditReport.error.summary);
Expand Down

0 comments on commit 626a180

Please sign in to comment.