Skip to content

Commit 791f55a

Browse files
committed
fix: publish updated deps
closes #1
1 parent 84804e0 commit 791f55a

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

lib/createInlinePluginCreator.js

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,9 @@ function createInlinePluginCreator(packages, multiContext) {
3232
* @internal
3333
*/
3434
const updateManifestDeps = (pkg, path) => {
35-
const dbg = console.log;
36-
3735
// Get and parse manifest file contents.
3836
const manifest = getManifest(path);
3937

40-
dbg("name=", manifest.name);
41-
dbg("path=", path);
4238
// Loop through localDeps to update dependencies/devDependencies/peerDependencies in manifest.
4339
pkg._localDeps.forEach(d => {
4440
// Get version of dependency.
@@ -52,8 +48,6 @@ function createInlinePluginCreator(packages, multiContext) {
5248
if (manifest.dependencies.hasOwnProperty(d.name)) manifest.dependencies[d.name] = release.version;
5349
if (manifest.devDependencies.hasOwnProperty(d.name)) manifest.devDependencies[d.name] = release.version;
5450
if (manifest.peerDependencies.hasOwnProperty(d.name)) manifest.peerDependencies[d.name] = release.version;
55-
56-
dbg("dep.name=", d.name, "dep.version=", release.version);
5751
});
5852

5953
// Write package.json back out.
@@ -151,6 +145,11 @@ function createInlinePluginCreator(packages, multiContext) {
151145
// Wait until all todo packages are ready to generate notes.
152146
await wait(() => todo().every(p => p.hasOwnProperty("_nextRelease")));
153147

148+
// Update pkg deps.
149+
updateManifestDeps(pkg, path);
150+
pkg._depsUpdated = true;
151+
await wait(() => todo().every(p => p.hasOwnProperty("_depsUpdated")));
152+
154153
// Vars.
155154
const notes = [];
156155

@@ -189,9 +188,6 @@ function createInlinePluginCreator(packages, multiContext) {
189188
* @internal
190189
*/
191190
async function prepare(pluginOptions, context) {
192-
// Update pkg deps.
193-
updateManifestDeps(pkg, path);
194-
195191
// Call other plugins.
196192
await plugins.prepare(context);
197193

0 commit comments

Comments
 (0)