Skip to content

Commit

Permalink
Disable npm audit in all exercises (#852)
Browse files Browse the repository at this point in the history
Closes #848
  • Loading branch information
tejasbubane authored Apr 30, 2020
1 parent 874e748 commit 7ab90b0
Show file tree
Hide file tree
Showing 112 changed files with 117 additions and 6 deletions.
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/accumulate/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/acronym/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/all-your-base/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/allergies/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/alphametics/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/anagram/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/armstrong-numbers/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/atbash-cipher/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/beer-song/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/binary-search-tree/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/binary-search/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/binary/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/bob/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/bowling/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/change/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/circular-buffer/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/clock/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/collatz-conjecture/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/complex-numbers/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/connect/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/crypto-square/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/custom-set/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/darts/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/diamond/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/difference-of-squares/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/diffie-hellman/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/dnd-character/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/etl/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/flatten-array/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/food-chain/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/forth/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/gigasecond/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/grade-school/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/grains/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/grep/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/hamming/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/hello-world/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/hexadecimal/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/high-scores/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/house/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/isbn-verifier/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/isogram/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/kindergarten-garden/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/largest-series-product/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/leap/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/linked-list/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/list-ops/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/luhn/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/matching-brackets/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/matrix/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/meetup/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/minesweeper/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/nth-prime/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/nucleotide-count/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/ocr-numbers/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/octal/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/palindrome-products/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/pangram/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/pascals-triangle/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/perfect-numbers/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/phone-number/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/pig-latin/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/point-mutations/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/prime-factors/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/protein-translation/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/proverb/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/pythagorean-triplet/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/queen-attack/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/raindrops/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/rational-numbers/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/react/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/rectangles/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/resistor-color-duo/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/resistor-color-trio/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/resistor-color/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/reverse-string/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/rna-transcription/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/robot-name/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/robot-simulator/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/roman-numerals/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/rotational-cipher/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/run-length-encoding/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/saddle-points/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/say/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/scale-generator/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/scrabble-score/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/secret-handshake/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/series/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/sieve/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/simple-cipher/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/simple-linked-list/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/space-age/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/spiral-matrix/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/strain/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/sublist/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/sum-of-multiples/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/transpose/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/triangle/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/trinary/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/twelve-days/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/two-bucket/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/two-fer/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/variable-length-quantity/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/word-count/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/word-search/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/wordy/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/yacht/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
1 change: 1 addition & 0 deletions exercises/zipper/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audit=false
3 changes: 2 additions & 1 deletion scripts/checksum
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,6 @@ helpers.createExercisePackageJson();
checkSumAll('package.json', 'exercise-package.json');
shell.rm('exercise-package.json');

checkSumAll('.eslintrc');
checkSumAll('babel.config.js');
checkSumAll('.eslintrc');
checkSumAll('.npmrc');
2 changes: 0 additions & 2 deletions scripts/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@
*/

const shell = require('shelljs');
const fs = require('fs');

const exerciseDirs = shell.ls('-d', 'exercises/*');

const config = JSON.parse(fs.readFileSync('config.json'))['exercises'];
const assignments = exerciseDirs.map(dir => dir.split('/')[1])
.filter(exercise => !exercise.deprecated);

Expand Down
9 changes: 6 additions & 3 deletions scripts/sync
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@
/**
* Run this script (from root directory): npx @babel/node scripts/sync
*
* This script is used to propagate any change to root package.json to
* all exercises and keep them in sync.
* This script is used to copy following files to all exercises & keep them in sync:
* 1. package.json
* 2. babel.config.js
* 3. .eslintrc
* 4. .npmrc
* There is a CI step which checks that package.json in root & exercises match
* (see checksum script for more info).
*/
Expand All @@ -23,12 +26,12 @@ function copyConfigForAssignment(assignment) {

shell.cp('babel.config.js', destination);
shell.cp('.eslintrc', destination);
shell.cp('.npmrc', destination);
}

function getAssignmentVersion(assignmentPackageFilename) {
const packageFile = shell.cat(assignmentPackageFilename).toString();
const packageJson = JSON.parse(packageFile);
console.debug(packageJson)
return packageJson['version'];
}

Expand Down

0 comments on commit 7ab90b0

Please sign in to comment.