monorepo-next 9.3.0 → 9.3.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "monorepo-next",
3
- "version": "9.3.0",
3
+ "version": "9.3.2",
4
4
  "description": "Detach monorepo packages from normal linking",
5
5
  "bin": {
6
6
  "next": "bin/next.js"
@@ -24,11 +24,14 @@ async function getPackageChangedFiles({
24
24
  // Be careful you don't accidentally use `...` instead of `..`.
25
25
  // `...` finds the merge-base and uses that instead of `fromCommit`.
26
26
  // https://stackoverflow.com/a/60496462
27
+ //
28
+ // I tried using ls-tree instead of diff when it is a new package (fromCommit is first commit in repo),
29
+ // but it took the same amount of time.
27
30
  let committedChanges = await git(['diff', '--name-only', `${fromCommit}..${toCommit}`, packageCwd], options);
28
31
 
29
32
  committedChanges = getLinesFromOutput(committedChanges);
30
33
 
31
- let dirtyChanges = await git(['status', '--porcelain', packageCwd, '-u'], options);
34
+ let dirtyChanges = await git(['status', '--porcelain', '--untracked-files', packageCwd], options);
32
35
 
33
36
  dirtyChanges = getLinesFromOutput(dirtyChanges).map(line => line.substr(3));
34
37
 
@@ -25,13 +25,17 @@ async function getPackage({
25
25
  async function getLatestReleaseCommit({
26
26
  cwd,
27
27
  packageName,
28
+ cached,
28
29
  }) {
29
30
  let _package = await getPackage({
30
31
  cwd,
31
32
  packageName,
32
33
  });
33
34
 
34
- let commit = await getCommitSinceLastRelease(_package, { cwd: _package.cwd });
35
+ let commit = await getCommitSinceLastRelease(_package, {
36
+ cwd: _package.cwd,
37
+ cached,
38
+ });
35
39
 
36
40
  return commit;
37
41
  }
package/src/release.js CHANGED
@@ -38,6 +38,7 @@ async function release({
38
38
  pushOverride,
39
39
  prePublishCallback = () => {},
40
40
  publishOverride,
41
+ cached,
41
42
  } = {}) {
42
43
  let currentBranch = await getCurrentBranch(cwd);
43
44
  if (currentBranch !== defaultBranch) {
@@ -51,6 +52,7 @@ async function release({
51
52
  let packagesWithChanges = await buildChangeGraph({
52
53
  workspaceMeta,
53
54
  shouldExcludeDevChanges,
55
+ cached,
54
56
  });
55
57
 
56
58
  packagesWithChanges = packagesWithChanges.filter(({ dag }) => {
package/src/run.js CHANGED
@@ -15,6 +15,7 @@ async function run({
15
15
  shouldExcludeDevChanges = builder['exclude-dev-changes'].default,
16
16
  silent,
17
17
  args,
18
+ cached,
18
19
  }) {
19
20
  let workspaceCwd = await getWorkspaceCwd(cwd);
20
21
 
@@ -24,6 +25,7 @@ async function run({
24
25
  workspaceMeta,
25
26
  shouldOnlyIncludeReleasable,
26
27
  shouldExcludeDevChanges,
28
+ cached,
27
29
  });
28
30
 
29
31
  let stdout = '';