monorepo-next 8.0.4 → 8.2.0

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": "8.0.4",
3
+ "version": "8.2.0",
4
4
  "description": "Detach monorepo packages from normal linking",
5
5
  "bin": {
6
6
  "next": "bin/next.js"
@@ -122,6 +122,8 @@ async function secondPass({
122
122
  shouldInheritGreaterReleaseType,
123
123
  shouldExcludeDevChanges,
124
124
  }) {
125
+ let visitedNodes = new Set();
126
+
125
127
  for (let { dag, changedReleasableFiles } of packagesWithChanges) {
126
128
  if (!changedReleasableFiles.length) {
127
129
  continue;
@@ -131,6 +133,12 @@ async function secondPass({
131
133
  dag,
132
134
  parent,
133
135
  }) {
136
+ if (visitedNodes.has(dag.node.packageName)) {
137
+ return;
138
+ }
139
+
140
+ visitedNodes.add(dag.node.packageName);
141
+
134
142
  let doesPackageHaveChanges = !!releaseTrees[dag.node.packageName];
135
143
  if (!doesPackageHaveChanges) {
136
144
  let isDevDep = dag.dependencyType === 'devDependencies';