npm-workspaces-publish-tool 0.0.8 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/package.json +1 -1
- package/build/src/cli.js +10 -1
- package/package.json +1 -1
package/build/package.json
CHANGED
package/build/src/cli.js
CHANGED
|
@@ -357,9 +357,18 @@ function validatePublish() {
|
|
|
357
357
|
const packageInfos = getPackageInfos(cwd);
|
|
358
358
|
const { dependencies } = createDependencyMap(packageInfos);
|
|
359
359
|
const inDegree = calculateWorkspaceInDegree(workspaces, dependencies);
|
|
360
|
-
const
|
|
360
|
+
const releaseOrderOriginal = getReleaseOrderFromInDegree(inDegree, dependencies);
|
|
361
361
|
const dirtyMap = getDirtyMap(workspaces, lastMonoRepoTag, cwd);
|
|
362
362
|
const dirtyVersionChanges = getDirtyPackagesVersionChanges(workspaces, dirtyMap, lastMonoRepoTag, cwd);
|
|
363
|
+
const releaseOrder = releaseOrderOriginal.filter((pkgName) => {
|
|
364
|
+
const ws = packageInfos[pkgName];
|
|
365
|
+
const isRoot = workspaces.some((w) => w.path === '.' && w.name === pkgName); // root detection
|
|
366
|
+
const isPrivate = ws?.private;
|
|
367
|
+
if (!isRoot && isPrivate) {
|
|
368
|
+
console.log(`⚠️ Wont publish private workspace: ${pkgName}`);
|
|
369
|
+
}
|
|
370
|
+
return isRoot || !isPrivate; // Keep root, skip other private packages
|
|
371
|
+
});
|
|
363
372
|
console.log('🏗️ Building packages...');
|
|
364
373
|
for (const pkgName of releaseOrder) {
|
|
365
374
|
const pkgInfo = packageInfos[pkgName];
|