mongodash 2.6.0 → 2.7.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/README.md +52 -0
- package/dist/lib/ConcurrentRunner.js +32 -2
- package/dist/lib/ConcurrentRunner.js.map +1 -1
- package/dist/lib/createContinuousLock.js +23 -6
- package/dist/lib/createContinuousLock.js.map +1 -1
- package/dist/lib/cronTasks.js +158 -19
- package/dist/lib/cronTasks.js.map +1 -1
- package/dist/lib/index.js +10 -6
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/reactiveTasks/LeaderElector.js +21 -3
- package/dist/lib/reactiveTasks/LeaderElector.js.map +1 -1
- package/dist/lib/reactiveTasks/MetricsCollector.js +31 -5
- package/dist/lib/reactiveTasks/MetricsCollector.js.map +1 -1
- package/dist/lib/reactiveTasks/ReactiveTaskPlanner.js +66 -31
- package/dist/lib/reactiveTasks/ReactiveTaskPlanner.js.map +1 -1
- package/dist/lib/reactiveTasks/ReactiveTaskRepository.js +19 -1
- package/dist/lib/reactiveTasks/ReactiveTaskRepository.js.map +1 -1
- package/dist/lib/reactiveTasks/ReactiveTaskTypes.js +7 -1
- package/dist/lib/reactiveTasks/ReactiveTaskTypes.js.map +1 -1
- package/dist/lib/reactiveTasks/ReactiveTaskWorker.js +80 -5
- package/dist/lib/reactiveTasks/ReactiveTaskWorker.js.map +1 -1
- package/dist/lib/reactiveTasks/index.js +19 -12
- package/dist/lib/reactiveTasks/index.js.map +1 -1
- package/dist/lib/testing/assertNoReactiveTaskErrors.js +16 -12
- package/dist/lib/testing/assertNoReactiveTaskErrors.js.map +1 -1
- package/dist/lib/testing/index.js +2 -0
- package/dist/lib/testing/index.js.map +1 -1
- package/dist/lib/testing/resolveWhitelistFilter.js +48 -0
- package/dist/lib/testing/resolveWhitelistFilter.js.map +1 -0
- package/dist/lib/testing/waitUntilReactiveTasksIdle.js +17 -46
- package/dist/lib/testing/waitUntilReactiveTasksIdle.js.map +1 -1
- package/dist/types/ConcurrentRunner.d.ts +14 -0
- package/dist/types/createContinuousLock.d.ts +17 -1
- package/dist/types/cronTasks.d.ts +17 -2
- package/dist/types/index.d.ts +1 -1
- package/dist/types/reactiveTasks/LeaderElector.d.ts +15 -1
- package/dist/types/reactiveTasks/MetricsCollector.d.ts +8 -0
- package/dist/types/reactiveTasks/ReactiveTaskPlanner.d.ts +11 -0
- package/dist/types/reactiveTasks/ReactiveTaskRepository.d.ts +10 -1
- package/dist/types/reactiveTasks/ReactiveTaskTypes.d.ts +6 -0
- package/dist/types/reactiveTasks/index.d.ts +8 -2
- package/dist/types/testing/assertNoReactiveTaskErrors.d.ts +4 -4
- package/dist/types/testing/index.d.ts +2 -0
- package/dist/types/testing/resolveWhitelistFilter.d.ts +35 -0
- package/dist/types/testing/waitUntilReactiveTasksIdle.d.ts +7 -13
- package/docs/.vitepress/config.mts +9 -1
- package/docs/cron-tasks.md +130 -1
- package/docs/error-handling.md +156 -0
- package/docs/reactive-tasks/guides.md +1 -1
- package/docs/reactive-tasks/index.md +1 -1
- package/docs/reactive-tasks/monitoring.md +7 -0
- package/docs/reactive-tasks/testing.md +187 -0
- package/docs/testing.md +60 -94
- package/package.json +34 -24
- package/docs/.vitepress/cache/deps/_metadata.json +0 -31
- package/docs/.vitepress/cache/deps/chunk-LE5NDSFD.js +0 -12824
- package/docs/.vitepress/cache/deps/chunk-LE5NDSFD.js.map +0 -7
- package/docs/.vitepress/cache/deps/package.json +0 -3
- package/docs/.vitepress/cache/deps/vitepress___@vue_devtools-api.js +0 -4505
- package/docs/.vitepress/cache/deps/vitepress___@vue_devtools-api.js.map +0 -7
- package/docs/.vitepress/cache/deps/vitepress___@vueuse_core.js +0 -9731
- package/docs/.vitepress/cache/deps/vitepress___@vueuse_core.js.map +0 -7
- package/docs/.vitepress/cache/deps/vue.js +0 -347
- package/docs/.vitepress/cache/deps/vue.js.map +0 -7
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
# Testing Reactive Tasks
|
|
2
|
+
|
|
3
|
+
Testing asynchronous, event-driven workflows is notoriously hard: the "done"
|
|
4
|
+
state is not a return value from the code you called but a quiescent state of
|
|
5
|
+
a background system. Mongodash ships with helpers that address this directly.
|
|
6
|
+
|
|
7
|
+
> [!TIP]
|
|
8
|
+
> For the generic polling helper (not tied to reactive tasks), see
|
|
9
|
+
> [**`waitUntil`**](../testing.md).
|
|
10
|
+
|
|
11
|
+
## `waitUntilReactiveTasksIdle`
|
|
12
|
+
|
|
13
|
+
Blocks until the reactive-task subsystem is completely quiesced. This is
|
|
14
|
+
essential for end-to-end tests where you want to assert the final state after
|
|
15
|
+
a chain of cascading tasks has settled.
|
|
16
|
+
|
|
17
|
+
### What it waits for
|
|
18
|
+
|
|
19
|
+
It resolves only when **all** of the following validation checks pass
|
|
20
|
+
simultaneously (and remain true for `stabilityDurationMs`):
|
|
21
|
+
|
|
22
|
+
1. **Planner empty** — the internal `ReactiveTaskPlanner` has no buffered
|
|
23
|
+
change-stream events waiting to be flushed.
|
|
24
|
+
2. **Workers idle** — no `ReactiveTaskWorker` is currently processing a task
|
|
25
|
+
(active count is 0).
|
|
26
|
+
3. **Database settled** — no tasks in any registered task collection are in
|
|
27
|
+
`pending`, `processing`, or `processing_dirty` state.
|
|
28
|
+
- **Exception**: pending tasks scheduled for the _distant future_
|
|
29
|
+
(beyond the current `timeoutMs + stabilityDurationMs + 100ms`) are
|
|
30
|
+
ignored, so long retries (e.g. "retry in 1 hour") do not block your
|
|
31
|
+
test forever.
|
|
32
|
+
|
|
33
|
+
### Usage
|
|
34
|
+
|
|
35
|
+
```typescript
|
|
36
|
+
import { waitUntilReactiveTasksIdle } from 'mongodash/testing';
|
|
37
|
+
|
|
38
|
+
it('should process user registration workflow', async () => {
|
|
39
|
+
// 1. Trigger the workflow
|
|
40
|
+
await users.insertOne({ email: 'test@example.com', status: 'new' });
|
|
41
|
+
|
|
42
|
+
// 2. Wait for the reactive task to process the insert AND any cascading
|
|
43
|
+
// tasks it may have triggered (welcome email, provisioning, etc.)
|
|
44
|
+
await waitUntilReactiveTasksIdle();
|
|
45
|
+
|
|
46
|
+
// 3. Assert the final state
|
|
47
|
+
const emailTask = await emailTasks.findOne({ email: 'test@example.com' });
|
|
48
|
+
expect(emailTask).toBeDefined();
|
|
49
|
+
expect(emailTask.status).toBe('sent');
|
|
50
|
+
});
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Configuration
|
|
54
|
+
|
|
55
|
+
Defaults are tuned for general use; override as needed:
|
|
56
|
+
|
|
57
|
+
```typescript
|
|
58
|
+
await waitUntilReactiveTasksIdle({
|
|
59
|
+
timeoutMs: 30000,
|
|
60
|
+
stabilityDurationMs: 200, // 200ms of "silence" to catch in-flight cascading tasks
|
|
61
|
+
});
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Isolation with `whitelist`
|
|
65
|
+
|
|
66
|
+
When running tests in parallel against a shared database, use `whitelist` to
|
|
67
|
+
wait only for tasks that belong to this test. In whitelist mode the **active
|
|
68
|
+
workers** check is skipped so another test's worker pool does not block you;
|
|
69
|
+
the planner buffer check is still applied (otherwise we could return idle
|
|
70
|
+
before a change event we care about has even been turned into a task row).
|
|
71
|
+
|
|
72
|
+
```typescript
|
|
73
|
+
await waitUntilReactiveTasksIdle({
|
|
74
|
+
whitelist: [
|
|
75
|
+
{ collection: 'users', filter: { _id: userId } }, // specific user
|
|
76
|
+
{ collection: 'orders', task: 'processOrder' }, // specific task on collection
|
|
77
|
+
],
|
|
78
|
+
});
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
> [!NOTE]
|
|
82
|
+
> The idle check queries task records by `sourceDocId`. If your trigger is
|
|
83
|
+
> very fast (e.g. a write immediately followed by `waitUntilReactiveTasksIdle`)
|
|
84
|
+
> and the default `stabilityDurationMs` is low, you may need to raise
|
|
85
|
+
> `stabilityDurationMs` to ensure the planner has had a chance to flush the
|
|
86
|
+
> event into a task record. Alternatively, poll with `waitUntil` for the
|
|
87
|
+
> task record to exist first, then call `waitUntilReactiveTasksIdle`.
|
|
88
|
+
|
|
89
|
+
## `assertNoReactiveTaskErrors`
|
|
90
|
+
|
|
91
|
+
Catches "silent failures" — tasks that threw and were logged but never
|
|
92
|
+
propagated to the test as an assertion error.
|
|
93
|
+
|
|
94
|
+
### Features
|
|
95
|
+
|
|
96
|
+
- **Time filtering** — only checks for errors that occurred after a given
|
|
97
|
+
`since` timestamp (typically test start).
|
|
98
|
+
- **Scope** — check globally or limit to specific source documents / task
|
|
99
|
+
names via `whitelist`.
|
|
100
|
+
- **Exclusions** — allow known errors (string or regex) without failing the
|
|
101
|
+
test.
|
|
102
|
+
|
|
103
|
+
### Usage
|
|
104
|
+
|
|
105
|
+
```typescript
|
|
106
|
+
import { assertNoReactiveTaskErrors } from 'mongodash/testing';
|
|
107
|
+
|
|
108
|
+
it('should process successfully', async () => {
|
|
109
|
+
const startTime = new Date();
|
|
110
|
+
|
|
111
|
+
// ... run test steps ...
|
|
112
|
+
await waitUntilReactiveTasksIdle();
|
|
113
|
+
|
|
114
|
+
await assertNoReactiveTaskErrors({ since: startTime });
|
|
115
|
+
});
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### Options
|
|
119
|
+
|
|
120
|
+
```typescript
|
|
121
|
+
await assertNoReactiveTaskErrors({
|
|
122
|
+
since: startTime, // required
|
|
123
|
+
whitelist: [{
|
|
124
|
+
collection: 'users',
|
|
125
|
+
filter: { _id: userId },
|
|
126
|
+
}],
|
|
127
|
+
excludeErrors: [
|
|
128
|
+
'Expected Failure',
|
|
129
|
+
/Authorization Error/,
|
|
130
|
+
],
|
|
131
|
+
});
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## `configureForTesting`
|
|
135
|
+
|
|
136
|
+
Production defaults (`debounce: 1000ms`, `minPollMs: 200ms`, etc.) are tuned
|
|
137
|
+
for real workloads but make tests unnecessarily slow. `configureForTesting`
|
|
138
|
+
overrides these globally with minimal values (typically `10ms`).
|
|
139
|
+
|
|
140
|
+
Call it **once** in your test setup (`jest.setup.js`, `beforeAll`, etc.). It
|
|
141
|
+
works whether called before or after task registration.
|
|
142
|
+
|
|
143
|
+
```typescript
|
|
144
|
+
import { configureForTesting } from 'mongodash/testing';
|
|
145
|
+
|
|
146
|
+
beforeAll(() => {
|
|
147
|
+
configureForTesting();
|
|
148
|
+
});
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### Options
|
|
152
|
+
|
|
153
|
+
```typescript
|
|
154
|
+
configureForTesting({
|
|
155
|
+
debounce: 0, // 0ms debounce (immediate planning)
|
|
156
|
+
minPollMs: 50, // polling interval
|
|
157
|
+
minBatchIntervalMs: 50,
|
|
158
|
+
});
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
## Whitelist rules
|
|
162
|
+
|
|
163
|
+
`waitUntilReactiveTasksIdle` and `assertNoReactiveTaskErrors` share a
|
|
164
|
+
`whitelist` option of type `WhitelistRule[]`. The type is exported so test
|
|
165
|
+
suites can share scope definitions:
|
|
166
|
+
|
|
167
|
+
```typescript
|
|
168
|
+
import type { WhitelistRule } from 'mongodash/testing';
|
|
169
|
+
|
|
170
|
+
const scopeToUser = (userId: string): WhitelistRule[] => [
|
|
171
|
+
{ collection: 'users', filter: { _id: userId } },
|
|
172
|
+
{ collection: 'notifications', filter: { userId } },
|
|
173
|
+
];
|
|
174
|
+
|
|
175
|
+
await waitUntilReactiveTasksIdle({ whitelist: scopeToUser(id) });
|
|
176
|
+
await assertNoReactiveTaskErrors({ since, whitelist: scopeToUser(id) });
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
Rule semantics:
|
|
180
|
+
|
|
181
|
+
- **No `filter` and no `task`** — matches every document and every task in
|
|
182
|
+
that collection ("match-all").
|
|
183
|
+
- **`filter` that matches zero documents** — the rule is treated as
|
|
184
|
+
"skip this collection", useful when the rule is built from a variable
|
|
185
|
+
that may be empty.
|
|
186
|
+
- **Multiple rules for the same collection** — OR-merged into a single
|
|
187
|
+
filter. A `match-all` rule wins over others.
|
package/docs/testing.md
CHANGED
|
@@ -1,123 +1,89 @@
|
|
|
1
|
-
# Testing
|
|
1
|
+
# Testing
|
|
2
2
|
|
|
3
|
-
Mongodash
|
|
3
|
+
Mongodash's asynchronous subsystems (reactive tasks, cron, change streams)
|
|
4
|
+
need more than a fixed `setTimeout` in tests. This page lists the testing
|
|
5
|
+
utilities the library provides, grouped by scope.
|
|
4
6
|
|
|
5
|
-
##
|
|
7
|
+
## Generic
|
|
6
8
|
|
|
7
|
-
|
|
9
|
+
### `waitUntil`
|
|
8
10
|
|
|
9
|
-
|
|
11
|
+
A general-purpose polling helper that resolves once a condition function
|
|
12
|
+
returns `true`. Useful when the built-in waits are too broad (e.g. waiting
|
|
13
|
+
for an HTTP side effect or an external queue) or as a building block for
|
|
14
|
+
your own utilities.
|
|
10
15
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
1. **Planner Empty**: The internal `ReactiveTaskPlanner` has no buffered Change Stream events waiting to be flushed.
|
|
16
|
-
2. **Workers Idle**: No `ResponsiveTaskWorker` is currently processing a task (active count is 0).
|
|
17
|
-
3. **Database Settled**: No tasks in any registered task collection are in `pending`, `processing`, or `processing_dirty` state.
|
|
18
|
-
* **Exception**: Pending tasks scheduled for the **distant future** (beyond the current timeout + stability window) are ignored. This ensures that long-term retries (e.g., "retry in 1 hour") do not cause your tests to timeout.
|
|
19
|
-
|
|
20
|
-
### Usage
|
|
16
|
+
It includes a **time-jump detector**: if a breakpoint or a suspended laptop
|
|
17
|
+
pauses the event loop for more than a second, the deadline is extended by
|
|
18
|
+
the observed pause so the wait does not falsely time out.
|
|
21
19
|
|
|
22
20
|
```typescript
|
|
23
|
-
import {
|
|
24
|
-
|
|
25
|
-
it('should process user registration workflow', async () => {
|
|
26
|
-
// 1. Trigger the workflow
|
|
27
|
-
await users.insertOne({ email: 'test@example.com', status: 'new' });
|
|
21
|
+
import { waitUntil } from 'mongodash/testing';
|
|
28
22
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
// 3. Assert the final state
|
|
34
|
-
const emailTask = await emailTasks.findOne({ email: 'test@example.com' });
|
|
35
|
-
expect(emailTask).toBeDefined();
|
|
36
|
-
expect(emailTask.status).toBe('sent');
|
|
37
|
-
});
|
|
23
|
+
await waitUntil(
|
|
24
|
+
async () => (await getBalance(userId)) === 100,
|
|
25
|
+
{ timeoutMs: 5000, pollIntervalMs: 50, stabilityDurationMs: 100 },
|
|
26
|
+
);
|
|
38
27
|
```
|
|
39
28
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
29
|
+
| Option | Default | Description |
|
|
30
|
+
| :--- | :--- | :--- |
|
|
31
|
+
| `timeoutMs` | `10000` | Maximum time before throwing. |
|
|
32
|
+
| `pollIntervalMs` | `50` | How often the condition is evaluated. |
|
|
33
|
+
| `stabilityDurationMs` | `0` | How long the condition must _remain_ true before resolving. Prevents flakiness when a state briefly flips true then false. |
|
|
43
34
|
|
|
44
|
-
|
|
45
|
-
await waitUntilReactiveTasksIdle({
|
|
46
|
-
timeoutMs: 30000,
|
|
47
|
-
stabilityDurationMs: 200, // Wait for 200ms of "silence" to catch in-flight cascading tasks
|
|
48
|
-
});
|
|
49
|
-
```
|
|
35
|
+
## Reactive tasks
|
|
50
36
|
|
|
51
|
-
|
|
37
|
+
See [**Testing Reactive Tasks**](./reactive-tasks/testing.md) for:
|
|
52
38
|
|
|
53
|
-
|
|
39
|
+
- `waitUntilReactiveTasksIdle` — wait for the reactive-task subsystem to
|
|
40
|
+
fully settle (planner empty, workers idle, DB drained).
|
|
41
|
+
- `assertNoReactiveTaskErrors` — catch silent failures a handler logged
|
|
42
|
+
but never threw up the stack.
|
|
43
|
+
- `configureForTesting` — replace production debounce / polling intervals
|
|
44
|
+
with testing-friendly values.
|
|
45
|
+
- `WhitelistRule` — scope the above helpers to specific
|
|
46
|
+
collections / documents / tasks for parallel tests.
|
|
54
47
|
|
|
55
|
-
|
|
48
|
+
## Cron tasks
|
|
56
49
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
50
|
+
Cron tasks expose a few helpers from the main entry point that are primarily
|
|
51
|
+
useful in tests. They live on the main `mongodash` module alongside the
|
|
52
|
+
cron API rather than under `mongodash/testing`:
|
|
60
53
|
|
|
61
|
-
###
|
|
54
|
+
### Run a task synchronously
|
|
62
55
|
|
|
63
56
|
```typescript
|
|
64
|
-
import {
|
|
65
|
-
|
|
66
|
-
it('should process successfully', async () => {
|
|
67
|
-
const startTime = new Date();
|
|
57
|
+
import { runCronTask } from 'mongodash';
|
|
68
58
|
|
|
69
|
-
|
|
70
|
-
await
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
await assertNoReactiveTaskErrors({ since: startTime });
|
|
59
|
+
it('processes pending invoices', async () => {
|
|
60
|
+
await runCronTask('invoice-sweep');
|
|
61
|
+
const processed = await invoices.countDocuments({ status: 'processed' });
|
|
62
|
+
expect(processed).toBeGreaterThan(0);
|
|
74
63
|
});
|
|
75
64
|
```
|
|
76
65
|
|
|
77
|
-
|
|
66
|
+
`runCronTask(taskId)` enqueues the task and awaits its completion. It throws
|
|
67
|
+
if called from inside another running cron task (use
|
|
68
|
+
`scheduleCronTaskImmediately` / `triggerCronTask` there instead).
|
|
78
69
|
|
|
79
|
-
|
|
80
|
-
await assertNoReactiveTaskErrors({
|
|
81
|
-
since: startTime, // Required: Check for errors after this time
|
|
82
|
-
sourceDocIds: [docId], // Optional: Limit check to specific source documents
|
|
83
|
-
excludeErrors: [ // Optional: Allow known errors (strings or RegEx)
|
|
84
|
-
'Expected Failure',
|
|
85
|
-
/Authorization Error/
|
|
86
|
-
]
|
|
87
|
-
});
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
## `configureForTesting`
|
|
91
|
-
|
|
92
|
-
A helper to configure the library for fast, deterministic testing execution.
|
|
93
|
-
|
|
94
|
-
By default, the library is optimized for production scenarios (e.g. `debounce: 1000ms`, `minPollMs: 200ms`). In tests, these delays cause unnecessary slowness.
|
|
95
|
-
|
|
96
|
-
`configureForTesting` overrides these defaults globally to minimal values (e.g. `10ms`).
|
|
97
|
-
|
|
98
|
-
### Usage
|
|
99
|
-
|
|
100
|
-
Call this **once** in your global test setup (e.g. `jest.setup.js` or `beforeAll`).
|
|
70
|
+
### Disable the scheduler
|
|
101
71
|
|
|
102
|
-
|
|
72
|
+
Running background cron jobs in unit tests causes non-determinism. Two
|
|
73
|
+
options:
|
|
103
74
|
|
|
104
75
|
```typescript
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
76
|
+
// Option A: never auto-start.
|
|
77
|
+
await mongodash.init({ ..., runCronTasks: false });
|
|
78
|
+
|
|
79
|
+
// Option B: stop after init.
|
|
80
|
+
import { stopCronTasks, startCronTasks } from 'mongodash';
|
|
81
|
+
stopCronTasks();
|
|
82
|
+
// ...
|
|
83
|
+
startCronTasks(); // if a test needs it back
|
|
111
84
|
```
|
|
112
85
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
You can customize specific values if needed:
|
|
86
|
+
Called before the first `cronTask()` registration, `stopCronTasks()` also
|
|
87
|
+
prevents any task from starting later in the process.
|
|
116
88
|
|
|
117
|
-
|
|
118
|
-
configureForTesting({
|
|
119
|
-
debounce: 0, // Force 0ms debounce (immediate execution)
|
|
120
|
-
minPollMs: 50, // Poll every 50ms
|
|
121
|
-
minBatchIntervalMs: 50
|
|
122
|
-
});
|
|
123
|
-
```
|
|
89
|
+
See [**Cron Tasks**](./cron-tasks.md) for the full cron reference.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mongodash",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.7.0",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"description": "An utility library delivering super-useful and super-simple tools using MongoDB",
|
|
6
6
|
"main": "./dist/lib/index.js",
|
|
@@ -10,6 +10,16 @@
|
|
|
10
10
|
"types": "./dist/types/index.d.ts",
|
|
11
11
|
"import": "./dist/lib/index.js",
|
|
12
12
|
"default": "./dist/lib/index.js"
|
|
13
|
+
},
|
|
14
|
+
"./testing": {
|
|
15
|
+
"types": "./dist/types/testing/index.d.ts",
|
|
16
|
+
"import": "./dist/lib/testing/index.js",
|
|
17
|
+
"default": "./dist/lib/testing/index.js"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"typesVersions": {
|
|
21
|
+
"*": {
|
|
22
|
+
"testing": ["./dist/types/testing/index.d.ts"]
|
|
13
23
|
}
|
|
14
24
|
},
|
|
15
25
|
"files": [
|
|
@@ -49,7 +59,7 @@
|
|
|
49
59
|
},
|
|
50
60
|
"dependencies": {
|
|
51
61
|
"@sapphire/duration": "^1.2.0",
|
|
52
|
-
"cron-parser": "^5.
|
|
62
|
+
"cron-parser": "^5.5.0",
|
|
53
63
|
"debug": "^4.4.3",
|
|
54
64
|
"fast-json-stable-stringify": "^2.1.0"
|
|
55
65
|
},
|
|
@@ -64,41 +74,41 @@
|
|
|
64
74
|
},
|
|
65
75
|
"devDependencies": {
|
|
66
76
|
"@arethetypeswrong/cli": "^0.18.2",
|
|
67
|
-
"@commitlint/cli": "^20.
|
|
77
|
+
"@commitlint/cli": "^20.5.0",
|
|
68
78
|
"@semantic-release/changelog": "^6.0.3",
|
|
69
79
|
"@semantic-release/git": "^10.0.1",
|
|
70
|
-
"@stryker-mutator/core": "^9.
|
|
71
|
-
"@stryker-mutator/jest-runner": "^9.
|
|
72
|
-
"@types/debug": "^4.1.
|
|
80
|
+
"@stryker-mutator/core": "^9.6.1",
|
|
81
|
+
"@stryker-mutator/jest-runner": "^9.6.1",
|
|
82
|
+
"@types/debug": "^4.1.13",
|
|
73
83
|
"@types/jest": "^30.0.0",
|
|
74
|
-
"@types/lodash": "^4.17.
|
|
75
|
-
"@types/node": "^25.0
|
|
76
|
-
"@types/sinon": "^21.0.
|
|
77
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
78
|
-
"@typescript-eslint/parser": "^8.
|
|
84
|
+
"@types/lodash": "^4.17.24",
|
|
85
|
+
"@types/node": "^25.6.0",
|
|
86
|
+
"@types/sinon": "^21.0.1",
|
|
87
|
+
"@typescript-eslint/eslint-plugin": "^8.58.2",
|
|
88
|
+
"@typescript-eslint/parser": "^8.58.2",
|
|
79
89
|
"correlation-id": "^5.2.0",
|
|
80
90
|
"coveralls": "^3.1.1",
|
|
81
91
|
"deepdash": "^5.3.9",
|
|
82
|
-
"eslint": "^9.39.
|
|
92
|
+
"eslint": "^9.39.4",
|
|
83
93
|
"eslint-config-prettier": "^10.1.8",
|
|
84
94
|
"eslint-plugin-no-only-tests": "^3.3.0",
|
|
85
|
-
"eslint-plugin-prettier": "^5.5.
|
|
86
|
-
"globals": "^
|
|
95
|
+
"eslint-plugin-prettier": "^5.5.5",
|
|
96
|
+
"globals": "^17.5.0",
|
|
87
97
|
"husky": "^9.1.7",
|
|
88
|
-
"jest": "^30.
|
|
98
|
+
"jest": "^30.3.0",
|
|
89
99
|
"js-yaml": "4.1.1",
|
|
90
|
-
"lint-staged": "^16.
|
|
91
|
-
"lodash": "^4.
|
|
92
|
-
"mongodb": "^7.
|
|
100
|
+
"lint-staged": "^16.4.0",
|
|
101
|
+
"lodash": "^4.18.1",
|
|
102
|
+
"mongodb": "^7.1.1",
|
|
93
103
|
"npm-run-all": "^4.1.5",
|
|
94
104
|
"organize-imports-cli": "^0.10.0",
|
|
95
|
-
"path-to-regexp": "8.
|
|
96
|
-
"prettier": "^3.
|
|
105
|
+
"path-to-regexp": "8.4.2",
|
|
106
|
+
"prettier": "^3.8.3",
|
|
97
107
|
"prom-client": "^15.1.3",
|
|
98
|
-
"publint": "^0.3.
|
|
99
|
-
"semantic-release": "^25.0.
|
|
100
|
-
"sinon": "^21.
|
|
101
|
-
"ts-jest": "^29.4.
|
|
108
|
+
"publint": "^0.3.18",
|
|
109
|
+
"semantic-release": "^25.0.3",
|
|
110
|
+
"sinon": "^21.1.2",
|
|
111
|
+
"ts-jest": "^29.4.9",
|
|
102
112
|
"ts-node": "^10.9.2",
|
|
103
113
|
"typescript": "^5.9.3",
|
|
104
114
|
"vitepress": "^1.6.4"
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"hash": "65ae190e",
|
|
3
|
-
"configHash": "1734f516",
|
|
4
|
-
"lockfileHash": "68b03582",
|
|
5
|
-
"browserHash": "246dbe54",
|
|
6
|
-
"optimized": {
|
|
7
|
-
"vue": {
|
|
8
|
-
"src": "../../../../node_modules/vue/dist/vue.runtime.esm-bundler.js",
|
|
9
|
-
"file": "vue.js",
|
|
10
|
-
"fileHash": "1ab8f95b",
|
|
11
|
-
"needsInterop": false
|
|
12
|
-
},
|
|
13
|
-
"vitepress > @vue/devtools-api": {
|
|
14
|
-
"src": "../../../../node_modules/@vue/devtools-api/dist/index.js",
|
|
15
|
-
"file": "vitepress___@vue_devtools-api.js",
|
|
16
|
-
"fileHash": "eb38336e",
|
|
17
|
-
"needsInterop": false
|
|
18
|
-
},
|
|
19
|
-
"vitepress > @vueuse/core": {
|
|
20
|
-
"src": "../../../../node_modules/@vueuse/core/index.mjs",
|
|
21
|
-
"file": "vitepress___@vueuse_core.js",
|
|
22
|
-
"fileHash": "d06fa19f",
|
|
23
|
-
"needsInterop": false
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
"chunks": {
|
|
27
|
-
"chunk-LE5NDSFD": {
|
|
28
|
-
"file": "chunk-LE5NDSFD.js"
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|