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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "npm-workspaces-publish-tool",
3
- "version": "0.0.7",
3
+ "version": "0.0.8",
4
4
  "description": "An unopinionated tool to assist publishing of npm based mono-repo workspaces",
5
5
  "main": "build/src/cli.js",
6
6
  "type": "module",
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 changedFiles = lastTag
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
- if (previousRootVersion) {
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) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "npm-workspaces-publish-tool",
3
- "version": "0.0.7",
3
+ "version": "0.0.8",
4
4
  "description": "An unopinionated tool to assist publishing of npm based mono-repo workspaces",
5
5
  "main": "build/src/cli.js",
6
6
  "type": "module",