monorepo-next 9.4.7 → 9.4.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "monorepo-next",
3
- "version": "9.4.7",
3
+ "version": "9.4.9",
4
4
  "description": "Detach monorepo packages from normal linking",
5
5
  "bin": {
6
6
  "next": "bin/next.js"
@@ -229,15 +229,26 @@ function thirdPass({
229
229
  return;
230
230
  }
231
231
 
232
- let isDevDep = dag.dependencyType === 'devDependencies';
233
232
  let currentReleaseType = current.releaseType;
234
- let incomingReleaseType = parent?.releaseType ?? currentReleaseType;
235
233
 
236
- if (shouldInheritGreaterReleaseType && !isDevDep && isReleaseTypeLessThan(currentReleaseType, incomingReleaseType)) {
237
- currentReleaseType = incomingReleaseType;
238
- }
234
+ if (parent) {
235
+ let incomingReleaseType = parent.releaseType;
239
236
 
240
- current.releaseType = currentReleaseType;
237
+ if (currentReleaseType === incomingReleaseType) {
238
+ // either already visited at this release type, or already at the lowest
239
+ // either way, no upgrades needed
240
+ return;
241
+ }
242
+
243
+ let isDevDep = dag.dependencyType === 'devDependencies';
244
+
245
+ if (shouldInheritGreaterReleaseType && !isDevDep && isReleaseTypeLessThan(currentReleaseType, incomingReleaseType)) {
246
+ current.releaseType = incomingReleaseType;
247
+ }
248
+ } else if (currentReleaseType === defaultReleaseType) {
249
+ // no upgrades needed
250
+ return;
251
+ }
241
252
 
242
253
  for (let group of dag.node.dependents) {
243
254
  if (group.isCycle) {