From 910835046bc6dc5e63d637d83276d945df6f1943 Mon Sep 17 00:00:00 2001 From: Anton Golub Date: Thu, 5 Mar 2020 10:53:15 +0300 Subject: [PATCH] fix: try to prevent deps update rollback --- lib/createInlinePluginCreator.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/createInlinePluginCreator.js b/lib/createInlinePluginCreator.js index 0b89e34..422e291 100644 --- a/lib/createInlinePluginCreator.js +++ b/lib/createInlinePluginCreator.js @@ -176,6 +176,13 @@ function createInlinePluginCreator(packages, multiContext) { // Call other plugins. await plugins.prepare(context); + // Prevent deps change rollback. + const _manifest = getManifest(path); + Object.assign(_manifest.dependencies, manifest.dependencies); + Object.assign(_manifest.devDependencies, manifest.devDependencies); + Object.assign(_manifest.peerDependencies, manifest.peerDependencies); + writeFileSync(path, JSON.stringify(_manifest)); + // Package is prepared. pkg._prepared = true;