@evolu/common 8.0.0-next.4 → 8.0.0
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/dist/src/Array.d.ts +279 -173
- package/dist/src/Array.d.ts.map +1 -1
- package/dist/src/Array.js +105 -101
- package/dist/src/Assert.d.ts +44 -44
- package/dist/src/Assert.d.ts.map +1 -1
- package/dist/src/Assert.js +44 -32
- package/dist/src/BigInt.d.ts +6 -3
- package/dist/src/BigInt.d.ts.map +1 -1
- package/dist/src/BigInt.js +5 -2
- package/dist/src/Brand.d.ts +27 -40
- package/dist/src/Brand.d.ts.map +1 -1
- package/dist/src/Buffer.d.ts +27 -11
- package/dist/src/Buffer.d.ts.map +1 -1
- package/dist/src/Cache.d.ts +9 -4
- package/dist/src/Cache.d.ts.map +1 -1
- package/dist/src/Cache.js +8 -3
- package/dist/src/Callbacks.d.ts +30 -19
- package/dist/src/Callbacks.d.ts.map +1 -1
- package/dist/src/Console.d.ts +145 -66
- package/dist/src/Console.d.ts.map +1 -1
- package/dist/src/Console.js +91 -43
- package/dist/src/Crypto.d.ts +85 -42
- package/dist/src/Crypto.d.ts.map +1 -1
- package/dist/src/Crypto.js +44 -20
- package/dist/src/Eq.d.ts +87 -21
- package/dist/src/Eq.d.ts.map +1 -1
- package/dist/src/Eq.js +67 -19
- package/dist/src/Error.d.ts +5 -3
- package/dist/src/Error.d.ts.map +1 -1
- package/dist/src/Error.js +16 -0
- package/dist/src/Function.d.ts +119 -58
- package/dist/src/Function.d.ts.map +1 -1
- package/dist/src/Function.js +86 -43
- package/dist/src/Http.d.ts +394 -0
- package/dist/src/Http.d.ts.map +1 -0
- package/dist/src/Http.js +102 -0
- package/dist/src/Identicon.d.ts +16 -7
- package/dist/src/Identicon.d.ts.map +1 -1
- package/dist/src/Identicon.js +14 -5
- package/dist/src/LeakDetector.d.ts +88 -0
- package/dist/src/LeakDetector.d.ts.map +1 -0
- package/dist/src/LeakDetector.js +86 -0
- package/dist/src/LockManager.d.ts +18 -9
- package/dist/src/LockManager.d.ts.map +1 -1
- package/dist/src/LockManager.js +7 -8
- package/dist/src/Lookup.d.ts +43 -13
- package/dist/src/Lookup.d.ts.map +1 -1
- package/dist/src/Lookup.js +28 -8
- package/dist/src/Microtask.d.ts +1 -1
- package/dist/src/Microtask.d.ts.map +1 -1
- package/dist/src/Microtask.js +3 -7
- package/dist/src/Number.d.ts +49 -13
- package/dist/src/Number.d.ts.map +1 -1
- package/dist/src/Number.js +34 -5
- package/dist/src/Object.d.ts +160 -40
- package/dist/src/Object.d.ts.map +1 -1
- package/dist/src/Object.js +92 -46
- package/dist/src/Option.d.ts +10 -7
- package/dist/src/Option.d.ts.map +1 -1
- package/dist/src/Option.js +9 -6
- package/dist/src/Order.d.ts +21 -21
- package/dist/src/Order.d.ts.map +1 -1
- package/dist/src/Order.js +18 -21
- package/dist/src/Platform.d.ts +31 -0
- package/dist/src/Platform.d.ts.map +1 -1
- package/dist/src/Platform.js +98 -0
- package/dist/src/Random.d.ts +32 -17
- package/dist/src/Random.d.ts.map +1 -1
- package/dist/src/Random.js +12 -8
- package/dist/src/Redacted.d.ts +43 -29
- package/dist/src/Redacted.d.ts.map +1 -1
- package/dist/src/Redacted.js +14 -3
- package/dist/src/Ref.d.ts +11 -3
- package/dist/src/Ref.d.ts.map +1 -1
- package/dist/src/Ref.js +2 -2
- package/dist/src/RefCount.d.ts +2 -6
- package/dist/src/RefCount.d.ts.map +1 -1
- package/dist/src/RefCount.js +33 -90
- package/dist/src/Relation.d.ts +70 -5
- package/dist/src/Relation.d.ts.map +1 -1
- package/dist/src/Relation.js +77 -2
- package/dist/src/Resource.d.ts +590 -155
- package/dist/src/Resource.d.ts.map +1 -1
- package/dist/src/Resource.js +592 -343
- package/dist/src/Result.d.ts +838 -191
- package/dist/src/Result.d.ts.map +1 -1
- package/dist/src/Result.js +163 -102
- package/dist/src/Schedule.d.ts +684 -231
- package/dist/src/Schedule.d.ts.map +1 -1
- package/dist/src/Schedule.js +766 -295
- package/dist/src/Set.d.ts +89 -40
- package/dist/src/Set.d.ts.map +1 -1
- package/dist/src/Set.js +50 -29
- package/dist/src/Sqlite.d.ts +29 -72
- package/dist/src/Sqlite.d.ts.map +1 -1
- package/dist/src/Sqlite.js +41 -46
- package/dist/src/StackTrace.d.ts +40 -0
- package/dist/src/StackTrace.d.ts.map +1 -0
- package/dist/src/StackTrace.js +140 -0
- package/dist/src/Store.d.ts +5 -4
- package/dist/src/Store.d.ts.map +1 -1
- package/dist/src/Store.js +5 -4
- package/dist/src/String.d.ts +7 -1
- package/dist/src/String.d.ts.map +1 -1
- package/dist/src/String.js +20 -7
- package/dist/src/Task.d.ts +3572 -1770
- package/dist/src/Task.d.ts.map +1 -1
- package/dist/src/Task.js +1879 -1274
- package/dist/src/Test.d.ts +17 -125
- package/dist/src/Test.d.ts.map +1 -1
- package/dist/src/Test.js +17 -68
- package/dist/src/Time.d.ts +108 -49
- package/dist/src/Time.d.ts.map +1 -1
- package/dist/src/Time.js +172 -73
- package/dist/src/Type.d.ts +3542 -1926
- package/dist/src/Type.d.ts.map +1 -1
- package/dist/src/Type.js +3070 -1784
- package/dist/src/Types.d.ts +200 -108
- package/dist/src/Types.d.ts.map +1 -1
- package/dist/src/Types.js +39 -8
- package/dist/src/WebSocket.d.ts +48 -23
- package/dist/src/WebSocket.d.ts.map +1 -1
- package/dist/src/WebSocket.js +15 -6
- package/dist/src/Worker.d.ts +94 -36
- package/dist/src/Worker.d.ts.map +1 -1
- package/dist/src/Worker.js +58 -24
- package/dist/src/index.d.ts +55 -52
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +3 -1
- package/dist/src/intl/cs.d.ts +94 -0
- package/dist/src/intl/cs.d.ts.map +1 -0
- package/dist/src/intl/cs.js +220 -0
- package/dist/src/intl/index.d.ts +7 -0
- package/dist/src/intl/index.d.ts.map +1 -0
- package/dist/src/intl/index.js +6 -0
- package/dist/src/local-first/Db.d.ts +12 -8
- package/dist/src/local-first/Db.d.ts.map +1 -1
- package/dist/src/local-first/Db.js +109 -132
- package/dist/src/local-first/Error.d.ts +4 -4
- package/dist/src/local-first/Evolu.d.ts +338 -92
- package/dist/src/local-first/Evolu.d.ts.map +1 -1
- package/dist/src/local-first/Evolu.js +47 -55
- package/dist/src/local-first/LocalAuth.d.ts +4 -4
- package/dist/src/local-first/LocalAuth.d.ts.map +1 -1
- package/dist/src/local-first/Owner.d.ts +61 -24
- package/dist/src/local-first/Owner.d.ts.map +1 -1
- package/dist/src/local-first/Owner.js +45 -8
- package/dist/src/local-first/Protocol.d.ts +44 -31
- package/dist/src/local-first/Protocol.d.ts.map +1 -1
- package/dist/src/local-first/Protocol.js +36 -13
- package/dist/src/local-first/Query.d.ts +147 -62
- package/dist/src/local-first/Query.d.ts.map +1 -1
- package/dist/src/local-first/Query.js +112 -58
- package/dist/src/local-first/Relay.d.ts +44 -14
- package/dist/src/local-first/Relay.d.ts.map +1 -1
- package/dist/src/local-first/Schema.d.ts +92 -41
- package/dist/src/local-first/Schema.d.ts.map +1 -1
- package/dist/src/local-first/Schema.js +25 -8
- package/dist/src/local-first/Shared.d.ts +23 -21
- package/dist/src/local-first/Shared.d.ts.map +1 -1
- package/dist/src/local-first/Shared.js +100 -57
- package/dist/src/local-first/Storage.d.ts +53 -32
- package/dist/src/local-first/Storage.d.ts.map +1 -1
- package/dist/src/local-first/Storage.js +194 -234
- package/dist/src/local-first/Timestamp.d.ts +21 -21
- package/dist/src/local-first/Timestamp.d.ts.map +1 -1
- package/dist/src/local-first/Timestamp.js +2 -2
- package/dist/src/local-first/index.d.ts +11 -11
- package/package.json +14 -13
- package/src/Array.ts +306 -205
- package/src/Assert.ts +54 -69
- package/src/BigInt.ts +6 -3
- package/src/Brand.ts +27 -40
- package/src/Buffer.ts +28 -12
- package/src/Cache.ts +9 -4
- package/src/Callbacks.ts +30 -19
- package/src/Console.ts +156 -84
- package/src/Crypto.ts +83 -41
- package/src/Eq.ts +95 -22
- package/src/Error.ts +8 -4
- package/src/Function.ts +167 -59
- package/src/Http.ts +549 -0
- package/src/Identicon.ts +16 -7
- package/src/LeakDetector.ts +182 -0
- package/src/LockManager.ts +43 -39
- package/src/Lookup.ts +62 -28
- package/src/Microtask.ts +19 -23
- package/src/Number.ts +64 -12
- package/src/Object.ts +173 -49
- package/src/Option.ts +10 -7
- package/src/Order.ts +23 -21
- package/src/Platform.ts +136 -0
- package/src/Polyfills.ts +6 -12
- package/src/Random.ts +32 -19
- package/src/Redacted.ts +44 -30
- package/src/Ref.ts +14 -6
- package/src/RefCount.ts +38 -80
- package/src/Relation.ts +202 -10
- package/src/Resource.ts +1199 -591
- package/src/Result.ts +930 -271
- package/src/Schedule.ts +859 -343
- package/src/Set.ts +89 -40
- package/src/Sqlite.ts +144 -138
- package/src/StackTrace.ts +230 -0
- package/src/Store.ts +8 -7
- package/src/String.ts +22 -5
- package/src/Task.ts +5101 -2832
- package/src/Test.ts +20 -168
- package/src/Time.ts +293 -90
- package/src/Type.ts +10034 -4117
- package/src/Types.ts +227 -110
- package/src/WebSocket.ts +64 -36
- package/src/Worker.ts +180 -72
- package/src/index.ts +55 -52
- package/src/intl/cs.ts +388 -0
- package/src/intl/index.ts +7 -0
- package/src/local-first/Db.ts +152 -179
- package/src/local-first/Error.ts +4 -4
- package/src/local-first/Evolu.ts +495 -250
- package/src/local-first/LocalAuth.ts +6 -12
- package/src/local-first/Owner.ts +58 -21
- package/src/local-first/Protocol.ts +49 -31
- package/src/local-first/Query.ts +146 -61
- package/src/local-first/Relay.ts +51 -21
- package/src/local-first/Schema.ts +109 -51
- package/src/local-first/Shared.ts +266 -226
- package/src/local-first/Storage.ts +266 -264
- package/src/local-first/Timestamp.ts +25 -18
- package/src/local-first/index.ts +11 -11
- package/dist/src/Skiplist.d.ts +0 -28
- package/dist/src/Skiplist.d.ts.map +0 -1
- package/dist/src/Skiplist.js +0 -64
- package/dist/src/Tracer.d.ts +0 -48
- package/dist/src/Tracer.d.ts.map +0 -1
- package/dist/src/Tracer.js +0 -6
- package/src/Skiplist.ts +0 -108
- package/src/Tracer.ts +0 -54
package/dist/src/Test.d.ts
CHANGED
|
@@ -1,127 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Cross-module test utilities for deterministic testing.
|
|
3
|
+
*
|
|
4
|
+
* Test helpers are usually colocated with the code they test. Helpers that
|
|
5
|
+
* cannot be colocated because they would create dependency cycles belong here.
|
|
3
6
|
*
|
|
4
7
|
* @module
|
|
5
8
|
*/
|
|
6
|
-
import type { Brand } from "./Brand.
|
|
7
|
-
import { type
|
|
8
|
-
import { type RandomLibDep } from "./Random.js";
|
|
9
|
-
import { type Run, type RunDeps } from "./Task.js";
|
|
10
|
-
import { type Duration, type TestTimeDep } from "./Time.js";
|
|
11
|
-
import { type Id } from "./Type.js";
|
|
9
|
+
import type { Brand } from "./Brand.ts";
|
|
10
|
+
import { type Id } from "./Type.ts";
|
|
12
11
|
export type TestCreateId = <B extends string = never>() => [B] extends [never] ? Id : Id & Brand<B>;
|
|
13
|
-
/**
|
|
14
|
-
* Cheap deterministic baseline deps for tests.
|
|
15
|
-
*
|
|
16
|
-
* `TestDeps` includes test-friendly replacements for {@link RunDeps}, such as
|
|
17
|
-
* {@link TestConsole} and {@link TestTime}, plus extra helpers commonly useful in
|
|
18
|
-
* tests and fixtures, such as `randomLib` (only that for now).
|
|
19
|
-
*
|
|
20
|
-
* Use it directly for synchronous test setup, fixtures, and helpers. It is also
|
|
21
|
-
* intentionally the base deps used by {@link testCreateRun}.
|
|
22
|
-
*/
|
|
23
|
-
export type TestDeps = Omit<RunDeps, "console" | "time"> & TestConsoleDep & TestTimeDep & RandomLibDep;
|
|
24
|
-
/**
|
|
25
|
-
* Creates deterministic {@link TestDeps}.
|
|
26
|
-
*
|
|
27
|
-
* Each call creates fresh instances, so tests don't share state.
|
|
28
|
-
*
|
|
29
|
-
* Includes these deps:
|
|
30
|
-
*
|
|
31
|
-
* - `console`: {@link TestConsole}
|
|
32
|
-
* - `random`: {@link Random}
|
|
33
|
-
* - `randomLib`: seeded `random` package instance
|
|
34
|
-
* - `randomBytes`: {@link RandomBytes}
|
|
35
|
-
* - `time`: {@link TestTime}
|
|
36
|
-
*
|
|
37
|
-
* Use this for synchronous code that accepts deps directly. For tests that run
|
|
38
|
-
* Tasks, use {@link testCreateRun}.
|
|
39
|
-
*
|
|
40
|
-
* ### Example
|
|
41
|
-
*
|
|
42
|
-
* ```ts
|
|
43
|
-
* test("Callbacks with no argument", () => {
|
|
44
|
-
* const deps = testCreateDeps();
|
|
45
|
-
* const callbacks = createCallbacks(deps);
|
|
46
|
-
*
|
|
47
|
-
* let called = false;
|
|
48
|
-
* const id = callbacks.register(() => {
|
|
49
|
-
* called = true;
|
|
50
|
-
* });
|
|
51
|
-
*
|
|
52
|
-
* callbacks.execute(id);
|
|
53
|
-
* expect(called).toBe(true);
|
|
54
|
-
* });
|
|
55
|
-
* ```
|
|
56
|
-
*/
|
|
57
|
-
export declare const testCreateDeps: (options?: {
|
|
58
|
-
readonly seed?: string;
|
|
59
|
-
}) => TestDeps;
|
|
60
|
-
/**
|
|
61
|
-
* Creates a test {@link Run} with deterministic default deps or optional custom
|
|
62
|
-
* deps.
|
|
63
|
-
*
|
|
64
|
-
* Use this as the default composition root in tests. Each call creates fresh
|
|
65
|
-
* {@link TestDeps} via {@link testCreateDeps}, then merges any provided custom
|
|
66
|
-
* deps.
|
|
67
|
-
*
|
|
68
|
-
* ### Example
|
|
69
|
-
*
|
|
70
|
-
* ```ts
|
|
71
|
-
* // Built-in TestTime
|
|
72
|
-
* await using run = testCreateRun();
|
|
73
|
-
* const fiber = run(sleep("1s"));
|
|
74
|
-
* run.deps.time.advance("1s");
|
|
75
|
-
* await fiber;
|
|
76
|
-
*
|
|
77
|
-
* // For a single test, create the dependency using the Run.
|
|
78
|
-
* await using run = testCreateRun();
|
|
79
|
-
* await using foo = await run.orThrow(createFoo());
|
|
80
|
-
* const runWithFoo = run.addDeps({ foo });
|
|
81
|
-
*
|
|
82
|
-
* expect(runWithFoo.deps.foo).toBe(foo);
|
|
83
|
-
*
|
|
84
|
-
* // If multiple tests need the same setup, create a disposable helper.
|
|
85
|
-
* // Then `await using setup` disposes everything the helper owns.
|
|
86
|
-
* const setupFoo = async () => {
|
|
87
|
-
* await using disposer = new AsyncDisposableStack();
|
|
88
|
-
* const run = disposer.use(testCreateRun());
|
|
89
|
-
* const foo = disposer.use(await run.orThrow(createFoo()));
|
|
90
|
-
* const disposables = disposer.move();
|
|
91
|
-
*
|
|
92
|
-
* // Return whatever the tests need: a Run with the dependency,
|
|
93
|
-
* // the dependency itself, or both.
|
|
94
|
-
* return {
|
|
95
|
-
* run: run.addDeps({ foo }),
|
|
96
|
-
* foo,
|
|
97
|
-
* [Symbol.asyncDispose]: () => moved.disposeAsync(),
|
|
98
|
-
* };
|
|
99
|
-
* };
|
|
100
|
-
*
|
|
101
|
-
* await using setup = await setupFoo();
|
|
102
|
-
* const { run, foo } = setup;
|
|
103
|
-
* expect(run.deps.foo).toBe(foo);
|
|
104
|
-
* ```
|
|
105
|
-
*
|
|
106
|
-
* Name reusable setup helpers after what they set up:
|
|
107
|
-
*
|
|
108
|
-
* - `setupFoo` for reusable test setup for `Foo`
|
|
109
|
-
* - `testSetupFoo` when a library module exports the helper as part of its public
|
|
110
|
-
* test API, e.g. `testSetupSqlite`.
|
|
111
|
-
*/
|
|
112
|
-
export declare function testCreateRun(): Run<TestDeps>;
|
|
113
|
-
/** With custom dependencies merged into {@link TestDeps}. */
|
|
114
|
-
export declare function testCreateRun<D>(deps: D): Run<TestDeps & D>;
|
|
115
|
-
/**
|
|
116
|
-
* Returns a Promise that resolves after a macrotask delay.
|
|
117
|
-
*
|
|
118
|
-
* Use this to model a real async boundary in a test double, for example an
|
|
119
|
-
* async disposer that should not complete in the same turn.
|
|
120
|
-
*
|
|
121
|
-
* Avoid using it to coordinate assertions. Waiting for a macrotask tends to
|
|
122
|
-
* make tests indirect and brittle.
|
|
123
|
-
*/
|
|
124
|
-
export declare const testWaitForMacrotask: (duration?: Duration) => Promise<void>;
|
|
125
12
|
/**
|
|
126
13
|
* Creates a deterministic `createId` helper.
|
|
127
14
|
*
|
|
@@ -137,13 +24,18 @@ export declare const testWaitForMacrotask: (duration?: Duration) => Promise<void
|
|
|
137
24
|
* ### Example
|
|
138
25
|
*
|
|
139
26
|
* ```ts
|
|
140
|
-
*
|
|
141
|
-
*
|
|
27
|
+
* import { testCreateId, type Brand, type Id } from "@evolu/common";
|
|
28
|
+
*
|
|
29
|
+
* const createId = testCreateId();
|
|
30
|
+
*
|
|
31
|
+
* const callbackId = createId();
|
|
32
|
+
* const secondCallbackId = createId();
|
|
33
|
+
* const todoId = createId<"Todo">();
|
|
34
|
+
* expect(new Set([callbackId, secondCallbackId, todoId]).size).toBe(3);
|
|
142
35
|
*
|
|
143
|
-
*
|
|
144
|
-
*
|
|
145
|
-
*
|
|
146
|
-
* });
|
|
36
|
+
* const replayCreateId = testCreateId();
|
|
37
|
+
* expect(replayCreateId()).toBe(callbackId);
|
|
38
|
+
* expectTypeOf(todoId).toEqualTypeOf<Id & Brand<"Todo">>();
|
|
147
39
|
* ```
|
|
148
40
|
*/
|
|
149
41
|
export declare const testCreateId: () => TestCreateId;
|
package/dist/src/Test.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Test.d.ts","sourceRoot":"","sources":["../../src/Test.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"Test.d.ts","sourceRoot":"","sources":["../../src/Test.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAGxC,OAAO,EAAY,KAAK,EAAE,EAAE,MAAM,WAAW,CAAC;AAE9C,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,SAAS,MAAM,GAAG,KAAK,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,GAC1E,EAAE,GACF,EAAE,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;AAElB;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,YAAY,QAAO,YAM/B,CAAC"}
|
package/dist/src/Test.js
CHANGED
|
@@ -1,70 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Cross-module test utilities for deterministic testing.
|
|
3
|
+
*
|
|
4
|
+
* Test helpers are usually colocated with the code they test. Helpers that
|
|
5
|
+
* cannot be colocated because they would create dependency cycles belong here.
|
|
3
6
|
*
|
|
4
7
|
* @module
|
|
5
8
|
*/
|
|
6
|
-
import { testCreateConsole, } from "./Console.js";
|
|
7
9
|
import { testCreateRandomBytes } from "./Crypto.js";
|
|
8
|
-
import {
|
|
9
|
-
import { createRun } from "./Task.js";
|
|
10
|
-
import { minMillis, setTimeout, testCreateTime, } from "./Time.js";
|
|
10
|
+
import { testCreateRandomLib } from "./Random.js";
|
|
11
11
|
import { createId } from "./Type.js";
|
|
12
|
-
/**
|
|
13
|
-
* Creates deterministic {@link TestDeps}.
|
|
14
|
-
*
|
|
15
|
-
* Each call creates fresh instances, so tests don't share state.
|
|
16
|
-
*
|
|
17
|
-
* Includes these deps:
|
|
18
|
-
*
|
|
19
|
-
* - `console`: {@link TestConsole}
|
|
20
|
-
* - `random`: {@link Random}
|
|
21
|
-
* - `randomLib`: seeded `random` package instance
|
|
22
|
-
* - `randomBytes`: {@link RandomBytes}
|
|
23
|
-
* - `time`: {@link TestTime}
|
|
24
|
-
*
|
|
25
|
-
* Use this for synchronous code that accepts deps directly. For tests that run
|
|
26
|
-
* Tasks, use {@link testCreateRun}.
|
|
27
|
-
*
|
|
28
|
-
* ### Example
|
|
29
|
-
*
|
|
30
|
-
* ```ts
|
|
31
|
-
* test("Callbacks with no argument", () => {
|
|
32
|
-
* const deps = testCreateDeps();
|
|
33
|
-
* const callbacks = createCallbacks(deps);
|
|
34
|
-
*
|
|
35
|
-
* let called = false;
|
|
36
|
-
* const id = callbacks.register(() => {
|
|
37
|
-
* called = true;
|
|
38
|
-
* });
|
|
39
|
-
*
|
|
40
|
-
* callbacks.execute(id);
|
|
41
|
-
* expect(called).toBe(true);
|
|
42
|
-
* });
|
|
43
|
-
* ```
|
|
44
|
-
*/
|
|
45
|
-
export const testCreateDeps = (options) => {
|
|
46
|
-
const seed = options?.seed ?? "evolu";
|
|
47
|
-
const console = testCreateConsole();
|
|
48
|
-
const random = testCreateRandom(seed);
|
|
49
|
-
const randomLib = testCreateRandomLib(seed);
|
|
50
|
-
const randomBytes = testCreateRandomBytes({ randomLib });
|
|
51
|
-
const time = testCreateTime();
|
|
52
|
-
return { console, randomBytes, random, randomLib, time };
|
|
53
|
-
};
|
|
54
|
-
export function testCreateRun(deps) {
|
|
55
|
-
const defaults = testCreateDeps();
|
|
56
|
-
return createRun({ ...defaults, ...deps });
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Returns a Promise that resolves after a macrotask delay.
|
|
60
|
-
*
|
|
61
|
-
* Use this to model a real async boundary in a test double, for example an
|
|
62
|
-
* async disposer that should not complete in the same turn.
|
|
63
|
-
*
|
|
64
|
-
* Avoid using it to coordinate assertions. Waiting for a macrotask tends to
|
|
65
|
-
* make tests indirect and brittle.
|
|
66
|
-
*/
|
|
67
|
-
export const testWaitForMacrotask = (duration = minMillis) => setTimeout(duration);
|
|
68
12
|
/**
|
|
69
13
|
* Creates a deterministic `createId` helper.
|
|
70
14
|
*
|
|
@@ -80,18 +24,23 @@ export const testWaitForMacrotask = (duration = minMillis) => setTimeout(duratio
|
|
|
80
24
|
* ### Example
|
|
81
25
|
*
|
|
82
26
|
* ```ts
|
|
83
|
-
*
|
|
84
|
-
*
|
|
27
|
+
* import { testCreateId, type Brand, type Id } from "@evolu/common";
|
|
28
|
+
*
|
|
29
|
+
* const createId = testCreateId();
|
|
30
|
+
*
|
|
31
|
+
* const callbackId = createId();
|
|
32
|
+
* const secondCallbackId = createId();
|
|
33
|
+
* const todoId = createId<"Todo">();
|
|
34
|
+
* expect(new Set([callbackId, secondCallbackId, todoId]).size).toBe(3);
|
|
85
35
|
*
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
* });
|
|
36
|
+
* const replayCreateId = testCreateId();
|
|
37
|
+
* expect(replayCreateId()).toBe(callbackId);
|
|
38
|
+
* expectTypeOf(todoId).toEqualTypeOf<Id & Brand<"Todo">>();
|
|
90
39
|
* ```
|
|
91
40
|
*/
|
|
92
41
|
export const testCreateId = () => {
|
|
93
42
|
const randomBytes = testCreateRandomBytes({
|
|
94
43
|
randomLib: testCreateRandomLib(),
|
|
95
44
|
});
|
|
96
|
-
return () => createId({ randomBytes });
|
|
45
|
+
return (() => createId({ randomBytes }));
|
|
97
46
|
};
|
package/dist/src/Time.d.ts
CHANGED
|
@@ -3,18 +3,39 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @module
|
|
5
5
|
*/
|
|
6
|
-
import type { Brand } from "./Brand.
|
|
7
|
-
import { type DateIso } from "./Type.
|
|
8
|
-
import type { Digit, Digit1To23, Digit1To51, Digit1To59, Digit1To6, Digit1To9, Digit1To99 } from "./Types.
|
|
6
|
+
import type { Brand } from "./Brand.ts";
|
|
7
|
+
import { type DateIso, type NonNaNNumber } from "./Type.ts";
|
|
8
|
+
import type { Digit, Digit1To23, Digit1To51, Digit1To59, Digit1To6, Digit1To9, Digit1To99 } from "./Types.ts";
|
|
9
9
|
/** Time and timer operations. */
|
|
10
10
|
export interface Time {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
11
|
+
readonly now: {
|
|
12
|
+
/** Returns current time as Unix epoch milliseconds. */
|
|
13
|
+
(): Millis;
|
|
14
|
+
/** Returns current time as an ISO 8601 UTC string. */
|
|
15
|
+
(type: "DateIso"): DateIso;
|
|
16
|
+
};
|
|
17
|
+
readonly performance: {
|
|
18
|
+
/** Unix epoch timestamp used as the origin for `performance.now()`. */
|
|
19
|
+
readonly timeOrigin: PerformanceTimeOrigin;
|
|
20
|
+
/**
|
|
21
|
+
* Returns a high-resolution timestamp in milliseconds relative to
|
|
22
|
+
* `performance.timeOrigin`.
|
|
23
|
+
*
|
|
24
|
+
* Unlike {@link Time.now}, this value is not Unix epoch time and is
|
|
25
|
+
* unaffected by system clock adjustments. Like Node.js
|
|
26
|
+
* `process.hrtime.bigint()`, it is suitable for measuring elapsed time, but
|
|
27
|
+
* it uses the Web Performance API's number representation rather than
|
|
28
|
+
* nanoseconds as a bigint.
|
|
29
|
+
*/
|
|
30
|
+
readonly now: () => PerformanceTime;
|
|
31
|
+
};
|
|
32
|
+
/** Schedules a callback after the specified positive delay. */
|
|
33
|
+
readonly setTimeout: (fn: () => void, delay: PositiveDuration) => TimeoutId;
|
|
34
|
+
/**
|
|
35
|
+
* Cancels a timeout scheduled with this instance's {@link Time.setTimeout}.
|
|
36
|
+
*
|
|
37
|
+
* Throws if the timeout was scheduled by another {@link Time} instance.
|
|
38
|
+
*/
|
|
18
39
|
readonly clearTimeout: (id: TimeoutId) => void;
|
|
19
40
|
}
|
|
20
41
|
export interface TimeDep {
|
|
@@ -27,7 +48,13 @@ export interface TimeDep {
|
|
|
27
48
|
*/
|
|
28
49
|
export type TimeoutId = Brand<"TimeoutId">;
|
|
29
50
|
/**
|
|
30
|
-
* Creates a {@link Time} using `Date.now()` and
|
|
51
|
+
* Creates a {@link Time} using `Date.now()`, `performance`, and
|
|
52
|
+
* `globalThis.setTimeout`.
|
|
53
|
+
*
|
|
54
|
+
* Long timeouts are split into native timer chunks and tracked against an
|
|
55
|
+
* absolute wall-clock deadline so late callback execution and system suspension
|
|
56
|
+
* do not extend the requested delay. System clock adjustments can therefore
|
|
57
|
+
* shorten or lengthen long timeouts.
|
|
31
58
|
*
|
|
32
59
|
* Throws if the system clock returns an out-of-range value. This is intentional
|
|
33
60
|
* — there's no reasonable fallback for a misconfigured clock.
|
|
@@ -39,7 +66,12 @@ export declare const createTime: () => Time;
|
|
|
39
66
|
* Call `advance(ms)` to move time forward and trigger any pending timeouts.
|
|
40
67
|
*/
|
|
41
68
|
export interface TestTime extends Time {
|
|
42
|
-
/**
|
|
69
|
+
/**
|
|
70
|
+
* Advances time by the specified duration, triggering pending timeouts.
|
|
71
|
+
*
|
|
72
|
+
* Timeout callback errors propagate and leave time at the callback's
|
|
73
|
+
* deadline. Throws if called while another advance is in progress.
|
|
74
|
+
*/
|
|
43
75
|
readonly advance: (duration: Duration) => void;
|
|
44
76
|
}
|
|
45
77
|
export interface TestTimeDep {
|
|
@@ -52,17 +84,17 @@ export interface TestTimeDep {
|
|
|
52
84
|
* called. Timeouts scheduled via `setTimeout` fire when time is advanced past
|
|
53
85
|
* their deadline.
|
|
54
86
|
*
|
|
55
|
-
* Set `autoIncrement` to automatically increment time by 1ms after each
|
|
56
|
-
* call. `"microtask"` increments after the
|
|
57
|
-
* increments immediately after each read. Omit it
|
|
58
|
-
* `advance()` is called.
|
|
87
|
+
* Set `autoIncrement` to automatically increment time by 1ms after each
|
|
88
|
+
* wall-clock or performance `now()` call. `"microtask"` increments after the
|
|
89
|
+
* current turn, while `"sync"` increments immediately after each read. Omit it
|
|
90
|
+
* to keep time fixed until `advance()` is called.
|
|
59
91
|
*/
|
|
60
92
|
export declare const testCreateTime: (options?: {
|
|
61
93
|
readonly startAt?: Millis;
|
|
62
94
|
readonly autoIncrement?: "microtask" | "sync";
|
|
63
95
|
}) => TestTime;
|
|
64
96
|
/**
|
|
65
|
-
*
|
|
97
|
+
* Non-negative integer milliseconds used for timestamps and durations.
|
|
66
98
|
*
|
|
67
99
|
* The maximum value is 281474976710654 (281474976710655 - 1, reserved for
|
|
68
100
|
* infinity). This enables efficient binary serialization, saving 2 bytes
|
|
@@ -73,8 +105,11 @@ export declare const testCreateTime: (options?: {
|
|
|
73
105
|
* If a system clock exceeds this range, operations will throw. This is
|
|
74
106
|
* intentional — there's no reasonable fallback for a misconfigured clock.
|
|
75
107
|
*/
|
|
76
|
-
export declare const Millis: import("./Type.
|
|
77
|
-
export type Millis = typeof Millis.
|
|
108
|
+
export declare const Millis: import("./Type.ts").BrandType<import("./Type.ts").BrandType<import("./Type.ts").BrandType<import("./Type.ts").BrandType<import("./Type.ts").BrandType<import("./Type.ts").BrandType<import("./Type.ts").Type<"Number", number, number, import("./Type.ts").TypeOfError<"Number">, null, import("./Type.ts").TypeOfError<"Number">, never, number, true>, "NonNaN", import("./Type.ts").NonNaNError>, "Finite", import("./Type.ts").FiniteError>, "Int", import("./Type.ts").IntError>, "NonNegative", import("./Type.ts").NonNegativeError>, "LessThan281474976710655", import("./Type.ts").LessThanError<281474976710655>>, "Millis", never>;
|
|
109
|
+
export type Millis = typeof Millis.Output;
|
|
110
|
+
/** Positive {@link Millis} value. */
|
|
111
|
+
export declare const PositiveMillis: import("./Type.ts").BrandType<import("./Type.ts").BrandType<import("./Type.ts").BrandType<import("./Type.ts").BrandType<import("./Type.ts").BrandType<import("./Type.ts").BrandType<import("./Type.ts").BrandType<import("./Type.ts").Type<"Number", number, number, import("./Type.ts").TypeOfError<"Number">, null, import("./Type.ts").TypeOfError<"Number">, never, number, true>, "NonNaN", import("./Type.ts").NonNaNError>, "Finite", import("./Type.ts").FiniteError>, "Int", import("./Type.ts").IntError>, "NonNegative", import("./Type.ts").NonNegativeError>, "LessThan281474976710655", import("./Type.ts").LessThanError<281474976710655>>, "Millis", never>, "Positive", import("./Type.ts").PositiveError>;
|
|
112
|
+
export type PositiveMillis = typeof PositiveMillis.Output;
|
|
78
113
|
/** Minimum {@link Millis} value. */
|
|
79
114
|
export declare const minMillis: Millis;
|
|
80
115
|
/** Maximum {@link Millis} value. */
|
|
@@ -83,7 +118,7 @@ export declare const maxMillis: Millis;
|
|
|
83
118
|
* Converts a number to {@link Millis}, rounding to the nearest millisecond and
|
|
84
119
|
* saturating overflow at {@link maxMillis}.
|
|
85
120
|
*/
|
|
86
|
-
export declare const saturateMillis: (value:
|
|
121
|
+
export declare const saturateMillis: (value: NonNaNNumber) => Millis;
|
|
87
122
|
/**
|
|
88
123
|
* Converts {@link Millis} to {@link DateIso}.
|
|
89
124
|
*
|
|
@@ -91,11 +126,25 @@ export declare const saturateMillis: (value: number) => Millis;
|
|
|
91
126
|
* that always produces a valid ISO string.
|
|
92
127
|
*/
|
|
93
128
|
export declare const millisToDateIso: (value: Millis) => DateIso;
|
|
129
|
+
/** Unix epoch milliseconds used as the origin for {@link PerformanceTime}. */
|
|
130
|
+
export type PerformanceTimeOrigin = number & Brand<"PerformanceTimeOrigin">;
|
|
131
|
+
/** High-resolution milliseconds elapsed since {@link PerformanceTimeOrigin}. */
|
|
132
|
+
export type PerformanceTime = number & Brand<"PerformanceTime">;
|
|
133
|
+
/** Elapsed fractional milliseconds measured using {@link PerformanceTime}. */
|
|
134
|
+
export type PerformanceDuration = number & Brand<"PerformanceDuration">;
|
|
135
|
+
/**
|
|
136
|
+
* Returns the elapsed fractional milliseconds between two performance times.
|
|
137
|
+
*
|
|
138
|
+
* Throws if `end` precedes `start`.
|
|
139
|
+
*/
|
|
140
|
+
export declare const performanceDurationBetween: (start: PerformanceTime, end: PerformanceTime) => PerformanceDuration;
|
|
94
141
|
/**
|
|
95
142
|
* Duration can be either a {@link DurationLiteral} or milliseconds as
|
|
96
143
|
* {@link Millis}.
|
|
97
144
|
*/
|
|
98
145
|
export type Duration = DurationLiteral | Millis;
|
|
146
|
+
/** Positive duration accepted by timer-based APIs. */
|
|
147
|
+
export type PositiveDuration = DurationLiteral | PositiveMillis;
|
|
99
148
|
/**
|
|
100
149
|
* Duration literal with compile-time validation.
|
|
101
150
|
*
|
|
@@ -110,9 +159,9 @@ export type Duration = DurationLiteral | Millis;
|
|
|
110
159
|
* - Months: not supported (variable length)
|
|
111
160
|
* - Years: `1y`, `99y`, `1.5y` (1-99, 1.1-99.9)
|
|
112
161
|
*
|
|
113
|
-
* Each unit
|
|
114
|
-
*
|
|
115
|
-
*
|
|
162
|
+
* Each unit uses a bounded range. Where units convert exactly, this avoids
|
|
163
|
+
* equivalent representations (e.g., 1000ms must be written as `"1s"`, not
|
|
164
|
+
* `"1000ms"`).
|
|
116
165
|
*
|
|
117
166
|
* Decimal values cover cases like 1.5s (1500ms) or 1.5h (90 minutes) without
|
|
118
167
|
* allowing redundant forms. For precise values that don't fit (e.g., 1050ms),
|
|
@@ -166,29 +215,17 @@ export type DurationLiteralYears = `${Digit1To99}y` | `${Digit1To99}.${Digit1To9
|
|
|
166
215
|
* ### Example
|
|
167
216
|
*
|
|
168
217
|
* ```ts
|
|
169
|
-
* durationToMillis
|
|
170
|
-
* durationToMillis("500ms"); // 500
|
|
171
|
-
* durationToMillis("1.5s"); // 1500
|
|
172
|
-
* durationToMillis("30s"); // 30000
|
|
173
|
-
* durationToMillis("5m"); // 300000
|
|
174
|
-
* durationToMillis("12h"); // 43200000
|
|
175
|
-
* durationToMillis("7d"); // 604800000
|
|
176
|
-
* durationToMillis(Millis.orThrow(5000)); // 5000 (already Millis)
|
|
177
|
-
* ```
|
|
178
|
-
*/
|
|
179
|
-
export declare const durationToMillis: (duration: Duration) => Millis;
|
|
180
|
-
/**
|
|
181
|
-
* Returns a Promise that resolves after the specified duration.
|
|
218
|
+
* import { durationToMillis, Millis } from "@evolu/common";
|
|
182
219
|
*
|
|
183
|
-
*
|
|
184
|
-
*
|
|
185
|
-
*
|
|
186
|
-
*
|
|
187
|
-
*
|
|
188
|
-
* await setTimeout("1ms");
|
|
220
|
+
* expect(durationToMillis("1.5s")).toBe(1500);
|
|
221
|
+
* expect(durationToMillis("5m")).toBe(300000);
|
|
222
|
+
* expect(durationToMillis("12h")).toBe(43200000);
|
|
223
|
+
* expect(durationToMillis("1w")).toBe(604800000);
|
|
224
|
+
* expect(durationToMillis(Millis.orThrow(5000))).toBe(5000);
|
|
189
225
|
* ```
|
|
190
226
|
*/
|
|
191
|
-
export declare
|
|
227
|
+
export declare function durationToMillis(duration: DurationLiteral | PositiveMillis): PositiveMillis;
|
|
228
|
+
export declare function durationToMillis(duration: Duration): Millis;
|
|
192
229
|
/**
|
|
193
230
|
* Frame budget at 60fps (16ms).
|
|
194
231
|
*
|
|
@@ -215,24 +252,46 @@ export declare const msLongTask: Millis;
|
|
|
215
252
|
*
|
|
216
253
|
* - Under 1 minute: `1.234s`
|
|
217
254
|
* - Under 1 hour: `1m30.000s`
|
|
218
|
-
* - 1
|
|
255
|
+
* - Under 1 day: `1h30m45.000s`
|
|
256
|
+
* - Under 1 week: `1d2h30m45.000s`
|
|
257
|
+
* - Under 1 year: `1w2d3h30m45.000s`
|
|
258
|
+
* - 1 year or more: `1y2w3d4h30m45.000s`
|
|
259
|
+
*
|
|
260
|
+
* Weeks are 7 days and years are 365 days.
|
|
219
261
|
*
|
|
220
262
|
* ### Example
|
|
221
263
|
*
|
|
222
264
|
* ```ts
|
|
223
|
-
* formatMillisAsDuration
|
|
224
|
-
*
|
|
225
|
-
* formatMillisAsDuration(
|
|
265
|
+
* import { formatMillisAsDuration, Millis } from "@evolu/common";
|
|
266
|
+
*
|
|
267
|
+
* expect(formatMillisAsDuration(Millis.orThrow(1234))).toBe("1.234s");
|
|
268
|
+
* expect(formatMillisAsDuration(Millis.orThrow(90000))).toBe("1m30.000s");
|
|
269
|
+
* expect(formatMillisAsDuration(Millis.orThrow(90061000))).toBe(
|
|
270
|
+
* "1d1h1m1.000s",
|
|
271
|
+
* );
|
|
226
272
|
* ```
|
|
227
273
|
*/
|
|
228
274
|
export declare const formatMillisAsDuration: (millis: Millis) => string;
|
|
229
275
|
/**
|
|
230
|
-
* Formats {@link Millis} as `HH:MM:SS.mmm
|
|
276
|
+
* Formats {@link Millis} as local time in `HH:MM:SS.mmm` format.
|
|
231
277
|
*
|
|
232
278
|
* ### Example
|
|
233
279
|
*
|
|
234
280
|
* ```ts
|
|
235
|
-
* formatMillisAsClockTime
|
|
281
|
+
* import { formatMillisAsClockTime, Millis } from "@evolu/common";
|
|
282
|
+
*
|
|
283
|
+
* const timestamp = new globalThis.Date(
|
|
284
|
+
* 2026,
|
|
285
|
+
* 0,
|
|
286
|
+
* 28,
|
|
287
|
+
* 14,
|
|
288
|
+
* 32,
|
|
289
|
+
* 15,
|
|
290
|
+
* 234,
|
|
291
|
+
* ).getTime();
|
|
292
|
+
* expect(formatMillisAsClockTime(Millis.orThrow(timestamp))).toBe(
|
|
293
|
+
* "14:32:15.234",
|
|
294
|
+
* );
|
|
236
295
|
* ```
|
|
237
296
|
*/
|
|
238
297
|
export declare const formatMillisAsClockTime: (millis: Millis) => string;
|
package/dist/src/Time.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Time.d.ts","sourceRoot":"","sources":["../../src/Time.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAExC,OAAO,
|
|
1
|
+
{"version":3,"file":"Time.d.ts","sourceRoot":"","sources":["../../src/Time.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAExC,OAAO,EAEL,KAAK,OAAO,EAEZ,KAAK,YAAY,EAGlB,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EACV,KAAK,EACL,UAAU,EACV,UAAU,EACV,UAAU,EACV,SAAS,EACT,SAAS,EACT,UAAU,EACX,MAAM,YAAY,CAAC;AAEpB,iCAAiC;AACjC,MAAM,WAAW,IAAI;IACnB,QAAQ,CAAC,GAAG,EAAE;QACZ,uDAAuD;QACvD,IAAI,MAAM,CAAC;QAEX,sDAAsD;QACtD,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC;KAC5B,CAAC;IAEF,QAAQ,CAAC,WAAW,EAAE;QACpB,uEAAuE;QACvE,QAAQ,CAAC,UAAU,EAAE,qBAAqB,CAAC;QAE3C;;;;;;;;;WASG;QACH,QAAQ,CAAC,GAAG,EAAE,MAAM,eAAe,CAAC;KAC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