From 42ef48b34d24831e492a41a5f2a6715f6a789dc8 Mon Sep 17 00:00:00 2001 From: Michael Bumann Date: Mon, 17 Jun 2019 09:38:47 +0200 Subject: [PATCH] Make sure fix lockfile uses the correct file path --- scripts/fix-package-lock.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/fix-package-lock.js b/scripts/fix-package-lock.js index aa9d57c..bc0fd87 100644 --- a/scripts/fix-package-lock.js +++ b/scripts/fix-package-lock.js @@ -5,6 +5,7 @@ // https://github.com/aragon/aragon-cli/blob/master/docs-internal/Dependencies.md#regenerate-the-lockfiles const fs = require('fs') +const path = require('path') function replaceAll(string, mapObject) { 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 fixedText = replaceAll(originalText, replacementMap) const fixedJson = JSON.parse(fixedText) + console.log('writing file', path); 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 = { //