npm-workspaces-publish-tool 0.0.7 ā 0.0.8
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 +7 -8
- package/package.json +1 -1
package/build/package.json
CHANGED
package/build/src/cli.js
CHANGED
|
@@ -58,9 +58,14 @@ function getReleaseOrderFromInDegree(inDegree, dependencies) {
|
|
|
58
58
|
}
|
|
59
59
|
function getDirtyMap(workspaces, lastTag, cwd) {
|
|
60
60
|
const dirtyMap = new Map();
|
|
61
|
-
const
|
|
61
|
+
const changedFilesFromTag = lastTag
|
|
62
62
|
? getChangesBetweenRefs(lastTag, 'HEAD', [], '', cwd)
|
|
63
63
|
: [];
|
|
64
|
+
const changedFilesLocal = git(['diff', '--name-only', 'HEAD'], { cwd })
|
|
65
|
+
.stdout.trim()
|
|
66
|
+
.split('\n')
|
|
67
|
+
.filter(Boolean);
|
|
68
|
+
const changedFiles = [...changedFilesFromTag, ...changedFilesLocal];
|
|
64
69
|
for (const ws of workspaces) {
|
|
65
70
|
const isNew = !lastTag;
|
|
66
71
|
const isDirty = changedFiles.some((f) => resolve(cwd, f).includes(ws.path));
|
|
@@ -451,18 +456,12 @@ function validatePublish() {
|
|
|
451
456
|
console.error('\nFix the above issues before publishing.\n');
|
|
452
457
|
process.exit(1);
|
|
453
458
|
}
|
|
454
|
-
console.log(rootPackageSuccessMessage);
|
|
455
459
|
console.log('\nšļø Validating git status...\n');
|
|
456
460
|
if (!verifyCleanGitStatus(workspaces, dirtyMap, cwd)) {
|
|
457
461
|
process.exit(1);
|
|
458
462
|
}
|
|
459
463
|
console.log('š Publish summary:\n');
|
|
460
|
-
|
|
461
|
-
console.log(`š³ Root: ${previousRootVersion} ā ${currentRootVersion}`);
|
|
462
|
-
}
|
|
463
|
-
else {
|
|
464
|
-
console.log(`š³ Root: ${currentRootVersion} (first release)`);
|
|
465
|
-
}
|
|
464
|
+
console.log(rootPackageSuccessMessage);
|
|
466
465
|
console.log('');
|
|
467
466
|
const packagesToRelease = [];
|
|
468
467
|
for (const pkgName of releaseOrder) {
|