@reventlessdev/reventless-gwt 1.0.0-alpha.115 → 1.0.0-alpha.116

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.
Files changed (91) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/package.json +5 -12
  3. package/rescript.json +0 -1
  4. package/bin/reventless-dev.mjs +0 -21
  5. package/src/Bind.res +0 -29
  6. package/src/Bind.res.mjs +0 -22
  7. package/src/BuildClassifier.res +0 -147
  8. package/src/BuildClassifier.res.mjs +0 -136
  9. package/src/Cancellation.res +0 -37
  10. package/src/Cancellation.res.mjs +0 -46
  11. package/src/ChildProcess.res +0 -102
  12. package/src/ChildProcess.res.mjs +0 -107
  13. package/src/Cli.res +0 -889
  14. package/src/Cli.res.mjs +0 -944
  15. package/src/Collector.res +0 -222
  16. package/src/Collector.res.mjs +0 -228
  17. package/src/ComponentMeta.res +0 -77
  18. package/src/ComponentMeta.res.mjs +0 -91
  19. package/src/ComponentScan.res +0 -101
  20. package/src/ComponentScan.res.mjs +0 -92
  21. package/src/Discovery.res +0 -102
  22. package/src/Discovery.res.mjs +0 -86
  23. package/src/DomainDeadCode.res +0 -98
  24. package/src/DomainDeadCode.res.mjs +0 -72
  25. package/src/DomainGraph.res +0 -0
  26. package/src/DomainGraph.res.mjs +0 -0
  27. package/src/ExnMessage.res +0 -14
  28. package/src/ExnMessage.res.mjs +0 -17
  29. package/src/ExnReflect.mjs +0 -24
  30. package/src/Filter.res +0 -45
  31. package/src/Filter.res.mjs +0 -47
  32. package/src/FormatterHuman.res +0 -109
  33. package/src/FormatterHuman.res.mjs +0 -115
  34. package/src/FormatterJson.res +0 -264
  35. package/src/FormatterJson.res.mjs +0 -322
  36. package/src/FormatterJunit.res +0 -93
  37. package/src/FormatterJunit.res.mjs +0 -90
  38. package/src/FormatterTap.res +0 -100
  39. package/src/FormatterTap.res.mjs +0 -131
  40. package/src/FormatterVsCode.res +0 -352
  41. package/src/FormatterVsCode.res.mjs +0 -546
  42. package/src/Loader.res +0 -24
  43. package/src/Loader.res.mjs +0 -23
  44. package/src/PackageScan.res +0 -80
  45. package/src/PackageScan.res.mjs +0 -81
  46. package/src/PlatformRunner.res +0 -191
  47. package/src/PlatformRunner.res.mjs +0 -178
  48. package/src/PlatformScan.res +0 -141
  49. package/src/PlatformScan.res.mjs +0 -124
  50. package/src/ProcessManager.res +0 -135
  51. package/src/ProcessManager.res.mjs +0 -119
  52. package/src/RunWorker.res +0 -24
  53. package/src/RunWorker.res.mjs +0 -16
  54. package/src/RunnerTypes.res +0 -68
  55. package/src/RunnerTypes.res.mjs +0 -60
  56. package/src/ScanIgnore.res +0 -11
  57. package/src/ScanIgnore.res.mjs +0 -23
  58. package/src/Watch.res +0 -102
  59. package/src/Watch.res.mjs +0 -80
  60. package/src/WatcherProbe.res +0 -56
  61. package/src/WatcherProbe.res.mjs +0 -59
  62. package/src/Worker.res +0 -24
  63. package/src/Worker.res.mjs +0 -9
  64. package/tests/BuildClassifierTest.res +0 -133
  65. package/tests/BuildClassifierTest.res.mjs +0 -176
  66. package/tests/CliRunEntryTest.res +0 -57
  67. package/tests/CliRunEntryTest.res.mjs +0 -65
  68. package/tests/CliWatchScopeTest.res +0 -62
  69. package/tests/CliWatchScopeTest.res.mjs +0 -95
  70. package/tests/ComponentMetaTest.res +0 -67
  71. package/tests/ComponentMetaTest.res.mjs +0 -71
  72. package/tests/DiscoveryTest.res +0 -42
  73. package/tests/DiscoveryTest.res.mjs +0 -43
  74. package/tests/DomainDeadCodeTest.res +0 -119
  75. package/tests/DomainDeadCodeTest.res.mjs +0 -158
  76. package/tests/DomainGraphTest.res +0 -448
  77. package/tests/DomainGraphTest.res.mjs +0 -505
  78. package/tests/ExnMessageTest.res +0 -42
  79. package/tests/ExnMessageTest.res.mjs +0 -64
  80. package/tests/FormatterGoldenTest.res +0 -125
  81. package/tests/FormatterGoldenTest.res.mjs +0 -162
  82. package/tests/FormatterVsCodeMessageTest.res +0 -41
  83. package/tests/FormatterVsCodeMessageTest.res.mjs +0 -42
  84. package/tests/PlatformRunnerTest.res +0 -66
  85. package/tests/PlatformRunnerTest.res.mjs +0 -85
  86. package/tests/PlatformScanTest.res +0 -61
  87. package/tests/PlatformScanTest.res.mjs +0 -56
  88. package/tests/RunnerUnitTest.res +0 -219
  89. package/tests/RunnerUnitTest.res.mjs +0 -244
  90. package/tests/WatchDebounceTest.res +0 -106
  91. package/tests/WatchDebounceTest.res.mjs +0 -128
@@ -1,128 +0,0 @@
1
- // Generated by ReScript, PLEASE EDIT WITH CARE
2
-
3
- import * as Watch$ReventlessGwt from "../src/Watch.res.mjs";
4
-
5
- function delay(ms) {
6
- return new Promise((resolve, _reject) => {
7
- setTimeout(() => resolve(), ms);
8
- });
9
- }
10
-
11
- globalThis.describe("Watch.isStructuralSource", () => {
12
- globalThis.test("an unlink of a .res source is structural", async () => {
13
- globalThis.expect(Watch$ReventlessGwt.isStructuralSource("Unlink", "/p/src/Foo/Bar.res")).toEqual(true);
14
- });
15
- globalThis.test("a generated .res.mjs unlink is NOT structural (ends in .mjs)", async () => {
16
- globalThis.expect(Watch$ReventlessGwt.isStructuralSource("Unlink", "/p/src/Foo/Bar.res.mjs")).toEqual(false);
17
- });
18
- globalThis.test("an add of a .res source is not structural (incremental handles it)", async () => {
19
- globalThis.expect(Watch$ReventlessGwt.isStructuralSource("Add", "/p/src/Foo/Bar.res")).toEqual(false);
20
- });
21
- globalThis.test("a change of a .res source is not structural", async () => {
22
- globalThis.expect(Watch$ReventlessGwt.isStructuralSource("Change", "/p/src/Foo/Bar.res")).toEqual(false);
23
- });
24
- });
25
-
26
- globalThis.describe("Watch.debounce coalescing", () => {
27
- globalThis.test("a burst collapses to one call carrying the strongest event", async () => {
28
- let calls = {
29
- contents: []
30
- };
31
- let fire = Watch$ReventlessGwt.debounce(40, (e, p) => {
32
- calls.contents = calls.contents.concat([[
33
- e,
34
- p
35
- ]]);
36
- });
37
- fire("Change", "/p/src/A.res");
38
- fire("Add", "/p/src/new/A.res");
39
- fire("Unlink", "/p/src/old/A.res");
40
- await delay(120);
41
- globalThis.expect(calls.contents.length).toEqual(1);
42
- let match = calls.contents[0];
43
- globalThis.expect(match[0]).toEqual("Unlink");
44
- globalThis.expect(match[1]).toEqual("/p/src/old/A.res");
45
- });
46
- globalThis.test("a later weaker event does not mask an earlier unlink", async () => {
47
- let calls = {
48
- contents: []
49
- };
50
- let fire = Watch$ReventlessGwt.debounce(40, (e, _p) => {
51
- calls.contents = calls.contents.concat([e]);
52
- });
53
- fire("Unlink", "/p/src/old/A.res");
54
- fire("Change", "/p/src/A.res");
55
- await delay(120);
56
- globalThis.expect(calls.contents).toEqual(["Unlink"]);
57
- });
58
- globalThis.test("interleaved .res.mjs unlinks never surface; each distinct .res source does", async () => {
59
- let calls = {
60
- contents: []
61
- };
62
- let fire = Watch$ReventlessGwt.debounce(40, (e, p) => {
63
- calls.contents = calls.contents.concat([[
64
- e,
65
- p
66
- ]]);
67
- });
68
- fire("Unlink", "/p/src/old/A.res");
69
- fire("Unlink", "/p/src/old/A.res.mjs");
70
- fire("Unlink", "/p/src/old/A_Behavior.res");
71
- fire("Unlink", "/p/src/old/A_Behavior.res.mjs");
72
- fire("Add", "/p/src/new/A.res");
73
- fire("Add", "/p/src/new/A.res.mjs");
74
- await delay(120);
75
- let paths = calls.contents.map(param => param[1]);
76
- globalThis.expect(calls.contents.every(param => Watch$ReventlessGwt.isStructuralSource(param[0], param[1]))).toEqual(true);
77
- globalThis.expect(paths.includes("/p/src/old/A.res")).toEqual(true);
78
- globalThis.expect(paths.includes("/p/src/old/A_Behavior.res")).toEqual(true);
79
- globalThis.expect(paths.some(p => p.endsWith(".mjs"))).toEqual(false);
80
- globalThis.expect(calls.contents.length).toEqual(2);
81
- });
82
- globalThis.test("a burst spanning two packages emits an unlink per package (A4.1)", async () => {
83
- let calls = {
84
- contents: []
85
- };
86
- let fire = Watch$ReventlessGwt.debounce(40, (e, p) => {
87
- calls.contents = calls.contents.concat([[
88
- e,
89
- p
90
- ]]);
91
- });
92
- fire("Unlink", "/pkgA/src/Foo.res");
93
- fire("Unlink", "/pkgB/src/Bar.res");
94
- await delay(120);
95
- let paths = calls.contents.map(param => param[1]);
96
- globalThis.expect(paths.includes("/pkgA/src/Foo.res")).toEqual(true);
97
- globalThis.expect(paths.includes("/pkgB/src/Bar.res")).toEqual(true);
98
- globalThis.expect(calls.contents.length).toEqual(2);
99
- });
100
- globalThis.test("a structural signal suppresses a co-occurring plain change", async () => {
101
- let calls = {
102
- contents: []
103
- };
104
- let fire = Watch$ReventlessGwt.debounce(40, (e, _p) => {
105
- calls.contents = calls.contents.concat([e]);
106
- });
107
- fire("Change", "/p/src/Edited.res");
108
- fire("Unlink", "/p/src/old/Moved.res");
109
- await delay(120);
110
- globalThis.expect(calls.contents).toEqual(["Unlink"]);
111
- });
112
- globalThis.test("a lone change stays a change (incremental re-run)", async () => {
113
- let calls = {
114
- contents: []
115
- };
116
- let fire = Watch$ReventlessGwt.debounce(40, (e, _p) => {
117
- calls.contents = calls.contents.concat([e]);
118
- });
119
- fire("Change", "/p/src/A.res");
120
- await delay(120);
121
- globalThis.expect(calls.contents).toEqual(["Change"]);
122
- });
123
- });
124
-
125
- export {
126
- delay,
127
- }
128
- /* Not a pure module */