@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.
- package/CHANGELOG.md +11 -0
- package/package.json +5 -12
- package/rescript.json +0 -1
- package/bin/reventless-dev.mjs +0 -21
- package/src/Bind.res +0 -29
- package/src/Bind.res.mjs +0 -22
- package/src/BuildClassifier.res +0 -147
- package/src/BuildClassifier.res.mjs +0 -136
- package/src/Cancellation.res +0 -37
- package/src/Cancellation.res.mjs +0 -46
- package/src/ChildProcess.res +0 -102
- package/src/ChildProcess.res.mjs +0 -107
- package/src/Cli.res +0 -889
- package/src/Cli.res.mjs +0 -944
- package/src/Collector.res +0 -222
- package/src/Collector.res.mjs +0 -228
- package/src/ComponentMeta.res +0 -77
- package/src/ComponentMeta.res.mjs +0 -91
- package/src/ComponentScan.res +0 -101
- package/src/ComponentScan.res.mjs +0 -92
- package/src/Discovery.res +0 -102
- package/src/Discovery.res.mjs +0 -86
- package/src/DomainDeadCode.res +0 -98
- package/src/DomainDeadCode.res.mjs +0 -72
- package/src/DomainGraph.res +0 -0
- package/src/DomainGraph.res.mjs +0 -0
- package/src/ExnMessage.res +0 -14
- package/src/ExnMessage.res.mjs +0 -17
- package/src/ExnReflect.mjs +0 -24
- package/src/Filter.res +0 -45
- package/src/Filter.res.mjs +0 -47
- package/src/FormatterHuman.res +0 -109
- package/src/FormatterHuman.res.mjs +0 -115
- package/src/FormatterJson.res +0 -264
- package/src/FormatterJson.res.mjs +0 -322
- package/src/FormatterJunit.res +0 -93
- package/src/FormatterJunit.res.mjs +0 -90
- package/src/FormatterTap.res +0 -100
- package/src/FormatterTap.res.mjs +0 -131
- package/src/FormatterVsCode.res +0 -352
- package/src/FormatterVsCode.res.mjs +0 -546
- package/src/Loader.res +0 -24
- package/src/Loader.res.mjs +0 -23
- package/src/PackageScan.res +0 -80
- package/src/PackageScan.res.mjs +0 -81
- package/src/PlatformRunner.res +0 -191
- package/src/PlatformRunner.res.mjs +0 -178
- package/src/PlatformScan.res +0 -141
- package/src/PlatformScan.res.mjs +0 -124
- package/src/ProcessManager.res +0 -135
- package/src/ProcessManager.res.mjs +0 -119
- package/src/RunWorker.res +0 -24
- package/src/RunWorker.res.mjs +0 -16
- package/src/RunnerTypes.res +0 -68
- package/src/RunnerTypes.res.mjs +0 -60
- package/src/ScanIgnore.res +0 -11
- package/src/ScanIgnore.res.mjs +0 -23
- package/src/Watch.res +0 -102
- package/src/Watch.res.mjs +0 -80
- package/src/WatcherProbe.res +0 -56
- package/src/WatcherProbe.res.mjs +0 -59
- package/src/Worker.res +0 -24
- package/src/Worker.res.mjs +0 -9
- package/tests/BuildClassifierTest.res +0 -133
- package/tests/BuildClassifierTest.res.mjs +0 -176
- package/tests/CliRunEntryTest.res +0 -57
- package/tests/CliRunEntryTest.res.mjs +0 -65
- package/tests/CliWatchScopeTest.res +0 -62
- package/tests/CliWatchScopeTest.res.mjs +0 -95
- package/tests/ComponentMetaTest.res +0 -67
- package/tests/ComponentMetaTest.res.mjs +0 -71
- package/tests/DiscoveryTest.res +0 -42
- package/tests/DiscoveryTest.res.mjs +0 -43
- package/tests/DomainDeadCodeTest.res +0 -119
- package/tests/DomainDeadCodeTest.res.mjs +0 -158
- package/tests/DomainGraphTest.res +0 -448
- package/tests/DomainGraphTest.res.mjs +0 -505
- package/tests/ExnMessageTest.res +0 -42
- package/tests/ExnMessageTest.res.mjs +0 -64
- package/tests/FormatterGoldenTest.res +0 -125
- package/tests/FormatterGoldenTest.res.mjs +0 -162
- package/tests/FormatterVsCodeMessageTest.res +0 -41
- package/tests/FormatterVsCodeMessageTest.res.mjs +0 -42
- package/tests/PlatformRunnerTest.res +0 -66
- package/tests/PlatformRunnerTest.res.mjs +0 -85
- package/tests/PlatformScanTest.res +0 -61
- package/tests/PlatformScanTest.res.mjs +0 -56
- package/tests/RunnerUnitTest.res +0 -219
- package/tests/RunnerUnitTest.res.mjs +0 -244
- package/tests/WatchDebounceTest.res +0 -106
- 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 */
|