Commit 42e2ece
authored
[CLI] Fix run-cli leak which was revealed by repeated runCLI() calls during test (#2888)
## Motivation for the change, related issues
Prior to this PR, the initial Playground CLI worker was not being
cleaned up when Playground CLI was disposed.
## Implementation details
This PR:
- Adds the initial worker and its Playground handle to the list of items
to be disposed when Playground CLI is disposed.
- Prevents multiple workers from being requested when not running the
`server` command.
## Testing Instructions (or ideally a Blueprint)
- CI1 parent 4f98f16 commit 42e2ece
File tree
4 files changed
+88
-42
lines changed- packages/playground
- cli
- src
- tests
- test-built-npm-packages/es-modules-and-vitest
4 files changed
+88
-42
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
333 | 333 | | |
334 | 334 | | |
335 | 335 | | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
336 | 342 | | |
337 | 343 | | |
338 | 344 | | |
| |||
549 | 555 | | |
550 | 556 | | |
551 | 557 | | |
552 | | - | |
553 | | - | |
554 | | - | |
555 | | - | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
556 | 562 | | |
557 | 563 | | |
558 | 564 | | |
| |||
624 | 630 | | |
625 | 631 | | |
626 | 632 | | |
627 | | - | |
628 | | - | |
629 | | - | |
630 | | - | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
631 | 644 | | |
632 | | - | |
| 645 | + | |
633 | 646 | | |
634 | 647 | | |
635 | 648 | | |
| |||
875 | 888 | | |
876 | 889 | | |
877 | 890 | | |
878 | | - | |
879 | | - | |
880 | | - | |
881 | | - | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
882 | 897 | | |
883 | 898 | | |
884 | 899 | | |
| |||
889 | 904 | | |
890 | 905 | | |
891 | 906 | | |
892 | | - | |
| 907 | + | |
893 | 908 | | |
894 | 909 | | |
895 | 910 | | |
| |||
929 | 944 | | |
930 | 945 | | |
931 | 946 | | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
932 | 951 | | |
933 | 952 | | |
934 | 953 | | |
| |||
968 | 987 | | |
969 | 988 | | |
970 | 989 | | |
971 | | - | |
972 | 990 | | |
973 | 991 | | |
| 992 | + | |
974 | 993 | | |
975 | 994 | | |
976 | 995 | | |
977 | 996 | | |
978 | 997 | | |
979 | 998 | | |
980 | | - | |
| 999 | + | |
981 | 1000 | | |
982 | 1001 | | |
983 | 1002 | | |
| |||
996 | 1015 | | |
997 | 1016 | | |
998 | 1017 | | |
999 | | - | |
1000 | | - | |
1001 | | - | |
1002 | | - | |
1003 | | - | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
1004 | 1022 | | |
1005 | 1023 | | |
1006 | 1024 | | |
| |||
1035 | 1053 | | |
1036 | 1054 | | |
1037 | 1055 | | |
| 1056 | + | |
1038 | 1057 | | |
1039 | 1058 | | |
1040 | 1059 | | |
| |||
Lines changed: 3 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | 50 | | |
61 | 51 | | |
62 | 52 | | |
63 | 53 | | |
64 | 54 | | |
65 | 55 | | |
66 | | - | |
67 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
68 | 59 | | |
69 | | - | |
70 | | - | |
Lines changed: 32 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
50 | | - | |
| 51 | + | |
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
| |||
56 | 57 | | |
57 | 58 | | |
58 | 59 | | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
59 | 76 | | |
60 | 77 | | |
61 | 78 | | |
62 | 79 | | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
68 | 89 | | |
69 | 90 | | |
70 | 91 | | |
71 | | - | |
| 92 | + | |
| 93 | + | |
72 | 94 | | |
73 | 95 | | |
74 | 96 | | |
75 | 97 | | |
76 | 98 | | |
77 | 99 | | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
78 | 103 | | |
79 | 104 | | |
80 | 105 | | |
| |||
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
0 commit comments