Skip to content

Commit

Permalink
fix: try to prevent deps update rollback
Browse files Browse the repository at this point in the history
  • Loading branch information
antongolub committed Mar 5, 2020
1 parent 7aaf313 commit 9108350
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/createInlinePluginCreator.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 9108350

Please sign in to comment.