Update aragon CLI to latest version #140

Closed
bumi wants to merge 10 commits from chore/update-dependencies-1 into master
Showing only changes of commit 42ef48b34d - Show all commits

View File

@ -5,6 +5,7 @@
// https://github.com/aragon/aragon-cli/blob/master/docs-internal/Dependencies.md#regenerate-the-lockfiles // https://github.com/aragon/aragon-cli/blob/master/docs-internal/Dependencies.md#regenerate-the-lockfiles
const fs = require('fs') const fs = require('fs')
const path = require('path')
function replaceAll(string, mapObject) { function replaceAll(string, mapObject) {
const regex = new RegExp(Object.keys(mapObject).join('|'), 'gi') const regex = new RegExp(Object.keys(mapObject).join('|'), 'gi')
@ -21,11 +22,12 @@ async function fixLockfile(path, replacementMap) {
const originalText = JSON.stringify(originalJson, null, 2) const originalText = JSON.stringify(originalJson, null, 2)
const fixedText = replaceAll(originalText, replacementMap) const fixedText = replaceAll(originalText, replacementMap)
const fixedJson = JSON.parse(fixedText) const fixedJson = JSON.parse(fixedText)
console.log('writing file', path);
await fs.writeFileSync(path, JSON.stringify(fixedJson, null, 2)) await fs.writeFileSync(path, JSON.stringify(fixedJson, null, 2))
} }
// //
const LOCKFILE_PATH = '../package-lock.json' const LOCKFILE_PATH = path.join(__dirname, '..', 'package-lock.json')
const replacementMap = { const replacementMap = {
// //