From d56e8575a657d80d9d3eb994e516a678740dfcd1 Mon Sep 17 00:00:00 2001 From: Rhys Arkins <rhys@arkins.net> Date: Tue, 2 Jun 2020 09:09:09 +0200 Subject: [PATCH] =?UTF-8?q?fix(npm):=20don=E2=80=99t=20massage=20engines?= =?UTF-8?q?=20and=20scripts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/manager/npm/post-update/index.ts | 5 ----- lib/workers/branch/lock-files/index.spec.ts | 1 - 2 files changed, 6 deletions(-) diff --git a/lib/manager/npm/post-update/index.ts b/lib/manager/npm/post-update/index.ts index 9e4948d944..c092c8ad1f 100644 --- a/lib/manager/npm/post-update/index.ts +++ b/lib/manager/npm/post-update/index.ts @@ -221,11 +221,6 @@ export async function writeUpdatedPackageFiles( } logger.debug(`Writing ${packageFile.name}`); const massagedFile = JSON.parse(packageFile.contents); - if (massagedFile.name) { - massagedFile.name = massagedFile.name.replace(/[{}]/g, ''); - } - delete massagedFile.engines; - delete massagedFile.scripts; try { const { token } = hostRules.find({ hostType: config.platform, diff --git a/lib/workers/branch/lock-files/index.spec.ts b/lib/workers/branch/lock-files/index.spec.ts index 992a6dbf75..7f2db89b45 100644 --- a/lib/workers/branch/lock-files/index.spec.ts +++ b/lib/workers/branch/lock-files/index.spec.ts @@ -67,7 +67,6 @@ describe('manager/npm/post-update', () => { config.upgrades = []; await writeUpdatedPackageFiles(config); expect(fs.outputFile).toHaveBeenCalledTimes(2); - expect(fs.outputFile.mock.calls[1][1]).not.toContain('"engines"'); }); }); describe('getAdditionalFiles', () => { -- GitLab