@thi.ng/interceptors 3.2.22 → 3.2.25
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 +7 -1
- package/README.md +3 -5
- package/event-bus.js +8 -0
- package/package.json +13 -14
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
-
- **Last updated**: 2023-
|
|
3
|
+
- **Last updated**: 2023-11-09T10:28:19Z
|
|
4
4
|
- **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
|
|
5
5
|
|
|
6
6
|
All notable changes to this project will be documented in this file.
|
|
@@ -9,6 +9,12 @@ See [Conventional Commits](https://conventionalcommits.org/) for commit guidelin
|
|
|
9
9
|
**Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
|
|
10
10
|
and/or version bumps of transitive dependencies.
|
|
11
11
|
|
|
12
|
+
### [3.2.24](https://github.com/thi-ng/umbrella/tree/@thi.ng/interceptors@3.2.24) (2023-11-09)
|
|
13
|
+
|
|
14
|
+
#### ♻️ Refactoring
|
|
15
|
+
|
|
16
|
+
- update all tests (packages A-S) ([e3085e4](https://github.com/thi-ng/umbrella/commit/e3085e4))
|
|
17
|
+
|
|
12
18
|
## [3.2.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/interceptors@3.2.0) (2022-12-16)
|
|
13
19
|
|
|
14
20
|
#### 🚀 Features
|
package/README.md
CHANGED
|
@@ -151,7 +151,7 @@ For Node.js REPL:
|
|
|
151
151
|
const interceptors = await import("@thi.ng/interceptors");
|
|
152
152
|
```
|
|
153
153
|
|
|
154
|
-
Package sizes (brotli'd, pre-treeshake): ESM: 2.
|
|
154
|
+
Package sizes (brotli'd, pre-treeshake): ESM: 2.15 KB
|
|
155
155
|
|
|
156
156
|
## Dependencies
|
|
157
157
|
|
|
@@ -164,11 +164,9 @@ Package sizes (brotli'd, pre-treeshake): ESM: 2.03 KB
|
|
|
164
164
|
|
|
165
165
|
## Usage examples
|
|
166
166
|
|
|
167
|
-
Several
|
|
167
|
+
Several projects in this repo's
|
|
168
168
|
[/examples](https://github.com/thi-ng/umbrella/tree/develop/examples)
|
|
169
|
-
directory are using this package
|
|
170
|
-
|
|
171
|
-
A selection:
|
|
169
|
+
directory are using this package:
|
|
172
170
|
|
|
173
171
|
| Screenshot | Description | Live demo | Source |
|
|
174
172
|
|:---------------------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------|:----------------------------------------------------------|:---------------------------------------------------------------------------------------|
|
package/event-bus.js
CHANGED
|
@@ -62,6 +62,13 @@ import { EV_REDO, EV_SET_VALUE, EV_TOGGLE_VALUE, EV_UNDO, EV_UPDATE_VALUE, FX_CA
|
|
|
62
62
|
* - dynamic addition/removal of handlers & effects
|
|
63
63
|
*/
|
|
64
64
|
export class StatelessEventBus {
|
|
65
|
+
state;
|
|
66
|
+
eventQueue;
|
|
67
|
+
currQueue;
|
|
68
|
+
currCtx;
|
|
69
|
+
handlers;
|
|
70
|
+
effects;
|
|
71
|
+
priorities;
|
|
65
72
|
/**
|
|
66
73
|
* Creates a new event bus instance with given handler and effect
|
|
67
74
|
* definitions (all optional).
|
|
@@ -526,6 +533,7 @@ export class StatelessEventBus {
|
|
|
526
533
|
* Prefer this as the default implementation for most use cases.
|
|
527
534
|
*/
|
|
528
535
|
export class EventBus extends StatelessEventBus {
|
|
536
|
+
state;
|
|
529
537
|
/**
|
|
530
538
|
* Creates a new event bus instance with given parent state, handler and
|
|
531
539
|
* effect definitions (all optional).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/interceptors",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.25",
|
|
4
4
|
"description": "Interceptor based event bus, side effect & immutable state handling",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -31,25 +31,24 @@
|
|
|
31
31
|
"clean": "rimraf --glob '*.js' '*.d.ts' '*.map' doc",
|
|
32
32
|
"doc": "typedoc --excludePrivate --excludeInternal --out doc src/index.ts",
|
|
33
33
|
"doc:ae": "mkdir -p .ae/doc .ae/temp && api-extractor run --local --verbose",
|
|
34
|
-
"doc:readme": "
|
|
35
|
-
"doc:stats": "tools:module-stats",
|
|
34
|
+
"doc:readme": "bun ../../tools/src/module-stats.ts && bun ../../tools/src/readme.ts",
|
|
36
35
|
"pub": "yarn npm publish --access public",
|
|
37
|
-
"test": "
|
|
36
|
+
"test": "bun test"
|
|
38
37
|
},
|
|
39
38
|
"dependencies": {
|
|
40
|
-
"@thi.ng/api": "^8.9.
|
|
41
|
-
"@thi.ng/atom": "^5.2.
|
|
42
|
-
"@thi.ng/checks": "^3.4.
|
|
43
|
-
"@thi.ng/errors": "^2.4.
|
|
44
|
-
"@thi.ng/logger": "^1.4.
|
|
45
|
-
"@thi.ng/paths": "^5.1.
|
|
39
|
+
"@thi.ng/api": "^8.9.8",
|
|
40
|
+
"@thi.ng/atom": "^5.2.14",
|
|
41
|
+
"@thi.ng/checks": "^3.4.8",
|
|
42
|
+
"@thi.ng/errors": "^2.4.2",
|
|
43
|
+
"@thi.ng/logger": "^1.4.24",
|
|
44
|
+
"@thi.ng/paths": "^5.1.49"
|
|
46
45
|
},
|
|
47
46
|
"devDependencies": {
|
|
48
|
-
"@microsoft/api-extractor": "^7.38.
|
|
49
|
-
"@thi.ng/testament": "^0.
|
|
47
|
+
"@microsoft/api-extractor": "^7.38.2",
|
|
48
|
+
"@thi.ng/testament": "^0.4.1",
|
|
50
49
|
"rimraf": "^5.0.5",
|
|
51
50
|
"tools": "^0.0.1",
|
|
52
|
-
"typedoc": "^0.25.
|
|
51
|
+
"typedoc": "^0.25.3",
|
|
53
52
|
"typescript": "^5.2.2"
|
|
54
53
|
},
|
|
55
54
|
"keywords": [
|
|
@@ -94,5 +93,5 @@
|
|
|
94
93
|
"status": "completed",
|
|
95
94
|
"year": 2016
|
|
96
95
|
},
|
|
97
|
-
"gitHead": "
|
|
96
|
+
"gitHead": "669a3151e4302480244fe3e60eff5e732ea5b7a7\n"
|
|
98
97
|
}
|