From 7432cdc04f96761874b585761e57805f3cbd5d2f Mon Sep 17 00:00:00 2001 From: Rauno Viskus Date: Mon, 13 Sep 2021 18:25:55 +0300 Subject: [PATCH] fix: unofficial support of node v8 (#24) --- package.json | 2 +- src/update-ts-references.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 54e7aa9..5fe69da 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "update-ts-references", - "version": "2.4.0", + "version": "2.4.1", "bin": "src/index.js", "scripts": { "lint": "eslint src tests", diff --git a/src/update-ts-references.js b/src/update-ts-references.js index daad7df..36c3a35 100644 --- a/src/update-ts-references.js +++ b/src/update-ts-references.js @@ -105,7 +105,7 @@ const getReferencesFromDependencies = ( if (Object.keys(mergedDependencies).includes(packageName)) { throw new Error( - `This package ${packageName} references itself, please check dependencies in package.json` + `This package ${packageName} references itself, please check dependencies in package.json` ); } @@ -146,7 +146,7 @@ const updateTsConfig = ( let pureJson = true; try { require(tsconfigFilePath); - } catch { + } catch (e) { pureJson = false; } @@ -178,7 +178,7 @@ Do you want to discard them and proceed ? ` try { assert.deepEqual(currentReferences, mergedReferences); isEqual = true; - } catch { + } catch (e) { // ignore me } if (!isEqual) {