Skip to content

Commit 9ae3746

Browse files
committed
fix: fix publish private package
1 parent 8a2f277 commit 9ae3746

2 files changed

Lines changed: 7 additions & 12 deletions

File tree

lib/package.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -427,15 +427,15 @@ export default class Package {
427427
if ( !res.ok ) return res;
428428
}
429429

430-
// XXX subpackages
431430
// update npm package tags
432431
if ( updateNpm ) {
433-
const packages = [ this, ...this.subPackages ];
432+
for ( const pkg of [ this, ...this.subPackages ] ) {
433+
if ( pkg.isPrivate ) continue;
434434

435-
for ( const pkg of packages ) {
436435
res = await pkg.npm.setTags( {
437436
logger,
438437
} );
438+
439439
if ( !res.ok ) return res;
440440
}
441441
}

lib/package/release.js

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -331,20 +331,15 @@ export default class Publish {
331331
}
332332
}
333333

334-
// publish
334+
// publish packages
335335
if ( this.#publish ) {
336+
for ( const pkg of [ this.#pkg, ...subPackages ] ) {
337+
if ( pkg.isPrivate ) continue;
336338

337-
// publish root package
338-
res = await this.#pkg.npm.publish( {
339-
"repeatOnError": this.#repeatOnError,
340-
} );
341-
if ( !res.ok ) return res;
342-
343-
// publish sub-packages
344-
for ( const pkg of subPackages ) {
345339
res = await pkg.npm.publish( {
346340
"repeatOnError": this.#repeatOnError,
347341
} );
342+
348343
if ( !res.ok ) return res;
349344
}
350345
}

0 commit comments

Comments
 (0)