Commit 00b2f0a
Address PR review feedback: fix deadlock, unhandled rejection, add comments
- Move flushPendingPromises() from _buildInternal to public build() wrapper
using async closure pattern to prevent deadlock (JamesNK)
- Apply same fix in GenerateTypeClassMethod for type class build() paths
- Add .catch(() => {}) to promise.finally() in trackPromise to prevent
unhandled rejection crashes in Node.js (JamesNK)
- Add console.warn when flushing pending promises to surface implicit flushes
- Add explanatory comment on the while loop in flushPendingPromises (JamesNK)
- Update doc comment to reflect flush location change
- Update snapshots (TwoPassScanning, transport)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 5ffeda9 commit 00b2f0a
4 files changed
Lines changed: 48 additions & 17 deletions
File tree
- src/Aspire.Hosting.CodeGeneration.TypeScript
- Resources
- tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Snapshots
Lines changed: 33 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1412 | 1412 | | |
1413 | 1413 | | |
1414 | 1414 | | |
1415 | | - | |
1416 | 1415 | | |
1417 | 1416 | | |
1418 | 1417 | | |
| |||
1422 | 1421 | | |
1423 | 1422 | | |
1424 | 1423 | | |
| 1424 | + | |
| 1425 | + | |
| 1426 | + | |
| 1427 | + | |
| 1428 | + | |
| 1429 | + | |
1425 | 1430 | | |
1426 | 1431 | | |
1427 | 1432 | | |
| |||
1552 | 1557 | | |
1553 | 1558 | | |
1554 | 1559 | | |
1555 | | - | |
1556 | | - | |
1557 | | - | |
1558 | | - | |
1559 | | - | |
1560 | | - | |
1561 | 1560 | | |
1562 | 1561 | | |
1563 | 1562 | | |
| |||
1597 | 1596 | | |
1598 | 1597 | | |
1599 | 1598 | | |
1600 | | - | |
1601 | | - | |
1602 | | - | |
| 1599 | + | |
| 1600 | + | |
| 1601 | + | |
| 1602 | + | |
| 1603 | + | |
| 1604 | + | |
| 1605 | + | |
| 1606 | + | |
| 1607 | + | |
| 1608 | + | |
| 1609 | + | |
| 1610 | + | |
| 1611 | + | |
| 1612 | + | |
| 1613 | + | |
1603 | 1614 | | |
1604 | 1615 | | |
1605 | 1616 | | |
| |||
3044 | 3055 | | |
3045 | 3056 | | |
3046 | 3057 | | |
3047 | | - | |
3048 | | - | |
3049 | | - | |
| 3058 | + | |
| 3059 | + | |
| 3060 | + | |
| 3061 | + | |
| 3062 | + | |
| 3063 | + | |
| 3064 | + | |
| 3065 | + | |
| 3066 | + | |
| 3067 | + | |
| 3068 | + | |
| 3069 | + | |
3050 | 3070 | | |
3051 | 3071 | | |
3052 | 3072 | | |
| |||
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
761 | 761 | | |
762 | 762 | | |
763 | 763 | | |
764 | | - | |
| 764 | + | |
765 | 765 | | |
766 | 766 | | |
767 | 767 | | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
768 | 773 | | |
769 | 774 | | |
770 | 775 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4055 | 4055 | | |
4056 | 4056 | | |
4057 | 4057 | | |
4058 | | - | |
| 4058 | + | |
| 4059 | + | |
4059 | 4060 | | |
4060 | 4061 | | |
4061 | 4062 | | |
| |||
Lines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
761 | 761 | | |
762 | 762 | | |
763 | 763 | | |
764 | | - | |
| 764 | + | |
765 | 765 | | |
766 | 766 | | |
767 | 767 | | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
768 | 773 | | |
769 | 774 | | |
770 | 775 | | |
| |||
0 commit comments