gestalt-mobile 0.52.0 → 0.52.1
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.
|
@@ -280,14 +280,12 @@ function descriptionFor(heading) {
|
|
|
280
280
|
doneWhen: description.get('Done when'),
|
|
281
281
|
};
|
|
282
282
|
}
|
|
283
|
-
/** Match the helper's
|
|
283
|
+
/** Match the helper's ordered nested-suspension-v1 lifecycle dialect. */
|
|
284
284
|
function hasValidSuspension(headings) {
|
|
285
285
|
const parents = headings.filter((heading) => heading.level === 1);
|
|
286
286
|
const suspended = parents.filter((heading) => heading.state === 'SUSPENDED');
|
|
287
|
-
if (suspended.length > 1 ||
|
|
288
|
-
headings.filter((heading) => heading.level === 2 && heading.state === 'SUSPENDED').length > 1)
|
|
289
|
-
return false;
|
|
290
287
|
let parent;
|
|
288
|
+
const pausedChildren = new Set();
|
|
291
289
|
for (const heading of headings) {
|
|
292
290
|
if (heading.level === 1)
|
|
293
291
|
parent = heading;
|
|
@@ -306,6 +304,11 @@ function hasValidSuspension(headings) {
|
|
|
306
304
|
return false;
|
|
307
305
|
if (heading.state === 'SUSPENDED' && parent.state !== 'SUSPENDED')
|
|
308
306
|
return false;
|
|
307
|
+
if (heading.state === 'SUSPENDED') {
|
|
308
|
+
if (pausedChildren.has(parent))
|
|
309
|
+
return false;
|
|
310
|
+
pausedChildren.add(parent);
|
|
311
|
+
}
|
|
309
312
|
if (parent.state === 'SUSPENDED' && heading.state === 'WIP')
|
|
310
313
|
return false;
|
|
311
314
|
if (parent.state === 'DONE' && heading.state !== 'DONE')
|
|
@@ -314,6 +317,11 @@ function hasValidSuspension(headings) {
|
|
|
314
317
|
return false;
|
|
315
318
|
}
|
|
316
319
|
}
|
|
320
|
+
// Earlier-only targets exclude cycles; immediate-inner linkage excludes
|
|
321
|
+
// forks and disconnected stacks while dependency review/unwind is pending.
|
|
322
|
+
for (let index = 1; index < suspended.length; index += 1)
|
|
323
|
+
if (suspended[index].properties.get('SUSPENDED_FOR') !== suspended[index - 1].id)
|
|
324
|
+
return false;
|
|
317
325
|
return (!suspended.length ||
|
|
318
326
|
!parents.some((heading) => heading.state === 'WIP' && parents.indexOf(heading) >= parents.indexOf(suspended[0])));
|
|
319
327
|
}
|