Skip to content

Commit c6fc9a7

Browse files
committed
updated to ignore console.log and console.errors
1 parent 7b12142 commit c6fc9a7

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,4 @@
5555
"lib/*"
5656
]
5757
}
58-
}
58+
}

scripts/guard-publish.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ function setPrivate(value) {
88
}
99

1010
if (process.env.SAFE_PUBLISH !== '1') {
11+
// eslint-disable-next-line no-console
1112
console.error('Direct publish blocked. Use "npm run safe:publish" instead.');
1213
process.exit(1);
1314
}
@@ -20,8 +21,10 @@ function restorePrivate() {
2021
cleanedUp = true;
2122
try {
2223
setPrivate(true);
24+
// eslint-disable-next-line no-console
2325
console.log('Restored package.json private:true');
2426
} catch (e) {
27+
// eslint-disable-next-line no-console
2528
console.error('Failed to restore package.json private:true', e);
2629
}
2730
}
@@ -36,6 +39,7 @@ process.on('SIGTERM', () => {
3639
process.exit(1);
3740
});
3841
process.on('uncaughtException', (err) => {
42+
// eslint-disable-next-line no-console
3943
console.error(err);
4044
restorePrivate();
4145
process.exit(1);
@@ -45,6 +49,7 @@ try {
4549
setPrivate(false);
4650
execSync('npm run verify:release', { stdio: 'inherit' });
4751
execSync('npm publish --ignore-scripts=false', { stdio: 'inherit' });
52+
// eslint-disable-next-line no-console
4853
console.log('Safe publish complete.');
4954
} catch (err) {
5055
process.exit(err.status || 1);

0 commit comments

Comments
 (0)