|
1 | 1 | # Changelog
|
2 | 2 |
|
3 |
| -## Unreleased |
| 3 | +## 3.4.0 |
4 | 4 |
|
5 | 5 | ### Changes
|
6 | 6 |
|
7 |
| -- `sqlite.userVersion(v?: number)` now always returns the user version, also when setting it. This makes more sense from an API perspective and has as good as no performance impact. |
8 |
| -- EventQueue: `.setKnownV()` is now synchronous and no longer returns a Promise. This is only a breaking change if you were using `.then()` instead of `await`. |
| 7 | +Fun new features: |
| 8 | + |
| 9 | +- JsonModel: `.each(attrs, options, fn)` now takes `concurrent` to limit the concurrently running functions. This adds a dependency on the tiny `async-sema` package. |
9 | 10 | - ESDB: Added `transact({event, model, store, dispatch})` phase to the event processing flow. In this callback, you can call `dispatch` to generate and await sub-events, and calling ESModel will work too (any model can use the `dispatch` given via the constructor).
|
10 |
| - This requires the use of `AsyncLocalStorage`, and thus the minimum NodeJS version is now v12.17 |
11 | 11 | - ESDB: `dispatch({type, data, ts})` (passing everything in a single argument) is now also possible, as well as for `addEvent`.
|
12 | 12 | - ESModel: provide event creators for set, update and remove.
|
13 |
| -- JsonModel: `.each(attrs, options, fn)` now takes `concurrent` to limit the concurrently running functions |
| 13 | + |
| 14 | +We also have some tiny API changes that don't warrant a major version: |
| 15 | + |
| 16 | +- `sqlite.userVersion(v?: number)` now always returns the user version, also when setting it. This makes more sense from an API perspective and has as good as no performance impact. |
| 17 | +- EventQueue: `.setKnownV()` is now synchronous and no longer returns a Promise. This is only a breaking change if you were using `.then()` instead of `await`. |
| 18 | + This requires the use of `AsyncLocalStorage`, and thus the minimum NodeJS version is now v12.17 (which is already ancient). |
14 | 19 |
|
15 | 20 | ### Fixes
|
16 | 21 |
|
17 |
| -- ESDB: fix deadlock on queue add in migration (due to version setting) |
| 22 | +- ESDB: fix deadlock on queue add in migration (due to sync version setting) |
18 | 23 | - JM: while paging, if the total == the limit, the cursor is now also null, because there is no next page.
|
19 | 24 |
|
20 | 25 | ## 3.3.2
|
|
0 commit comments