@thi.ng/rstream 9.2.42 β†’ 9.3.3

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/object.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { IObjectOf, Keys, NumOrString, Predicate2 } from "@thi.ng/api";
1
+ import type { Keys, NumOrString, Predicate2 } from "@thi.ng/api";
2
2
  import type { CommonOpts, ISubscription } from "./api.js";
3
3
  import { Subscription } from "./subscription.js";
4
4
  export type KeyStreams<T, K extends Keys<T>> = {
@@ -144,7 +144,9 @@ export declare class StreamObj<T extends object, K extends Keys<T>> extends Subs
144
144
  * Object of managed & typed streams for registered keys.
145
145
  */
146
146
  keys: NumOrString[];
147
- streams: IObjectOf<Subscription<any, any>>;
147
+ streams: {
148
+ [id in K]-?: ISubscription<T[id], T[id]>;
149
+ };
148
150
  defaults?: Partial<T>;
149
151
  constructor(src: T, opts?: Partial<StreamObjOpts<T, K>>);
150
152
  /**
package/object.js CHANGED
@@ -50,7 +50,7 @@ class StreamObj extends Subscription {
50
50
  }
51
51
  done() {
52
52
  for (let k of this.keys) {
53
- this.streams[k].done();
53
+ this.streams[k].done?.();
54
54
  }
55
55
  super.done();
56
56
  }
package/package.json CHANGED
@@ -1,226 +1,226 @@
1
1
  {
2
- "name": "@thi.ng/rstream",
3
- "version": "9.2.42",
4
- "description": "Reactive streams & subscription primitives for constructing dataflow graphs / pipelines",
5
- "type": "module",
6
- "module": "./index.js",
7
- "typings": "./index.d.ts",
8
- "sideEffects": false,
9
- "repository": {
10
- "type": "git",
11
- "url": "https://github.com/thi-ng/umbrella.git"
12
- },
13
- "homepage": "https://thi.ng/rstream",
14
- "funding": [
15
- {
16
- "type": "github",
17
- "url": "https://github.com/sponsors/postspectacular"
18
- },
19
- {
20
- "type": "patreon",
21
- "url": "https://patreon.com/thing_umbrella"
22
- },
23
- {
24
- "type": "liberapay",
25
- "url": "https://liberapay.com/thi.ng"
26
- }
27
- ],
28
- "author": "Karsten Schmidt (https://thi.ng)",
29
- "contributors": [
30
- "AndrΓ© Wachter (https://github.com/andrew8er)",
31
- "Gavin Cannizzaro (https://github.com/gavinpc-mindgrub)"
32
- ],
33
- "license": "Apache-2.0",
34
- "scripts": {
35
- "build": "yarn build:esbuild && yarn build:decl",
36
- "build:decl": "tsc --declaration --emitDeclarationOnly",
37
- "build:esbuild": "esbuild --format=esm --platform=neutral --target=es2022 --tsconfig=tsconfig.json --outdir=. src/**/*.ts",
38
- "clean": "bun ../../tools/src/clean-package.ts",
39
- "doc": "typedoc --options ../../typedoc.json --out doc src/index.ts",
40
- "doc:readme": "bun ../../tools/src/module-stats.ts && bun ../../tools/src/readme.ts",
41
- "pub": "yarn npm publish --access public",
42
- "test": "bun test",
43
- "tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
44
- },
45
- "dependencies": {
46
- "@thi.ng/api": "^8.12.2",
47
- "@thi.ng/arrays": "^2.13.11",
48
- "@thi.ng/associative": "^7.1.12",
49
- "@thi.ng/atom": "^5.3.43",
50
- "@thi.ng/checks": "^3.7.18",
51
- "@thi.ng/errors": "^2.5.42",
52
- "@thi.ng/logger": "^3.2.0",
53
- "@thi.ng/transducers": "^9.6.10"
54
- },
55
- "devDependencies": {
56
- "@types/node": "^24.3.0",
57
- "esbuild": "^0.25.9",
58
- "typedoc": "^0.28.12",
59
- "typescript": "^5.9.2"
60
- },
61
- "keywords": [
62
- "async",
63
- "datastructure",
64
- "event",
65
- "fork-join",
66
- "graph",
67
- "pipeline",
68
- "pubsub",
69
- "reactive",
70
- "rstream",
71
- "state",
72
- "stream",
73
- "subscription",
74
- "transducer",
75
- "transformation",
76
- "typescript",
77
- "worker"
78
- ],
79
- "publishConfig": {
80
- "access": "public"
81
- },
82
- "engines": {
83
- "node": ">=18"
84
- },
85
- "files": [
86
- "./*.js",
87
- "./*.d.ts",
88
- "internal"
89
- ],
90
- "exports": {
91
- ".": {
92
- "default": "./index.js"
93
- },
94
- "./api": {
95
- "default": "./api.js"
96
- },
97
- "./asidechain": {
98
- "default": "./asidechain.js"
99
- },
100
- "./async": {
101
- "default": "./async.js"
102
- },
103
- "./atom": {
104
- "default": "./atom.js"
105
- },
106
- "./bisect": {
107
- "default": "./bisect.js"
108
- },
109
- "./checks": {
110
- "default": "./checks.js"
111
- },
112
- "./debounce": {
113
- "default": "./debounce.js"
114
- },
115
- "./defworker": {
116
- "default": "./defworker.js"
117
- },
118
- "./event": {
119
- "default": "./event.js"
120
- },
121
- "./forkjoin": {
122
- "default": "./forkjoin.js"
123
- },
124
- "./idgen": {
125
- "default": "./idgen.js"
126
- },
127
- "./interval": {
128
- "default": "./interval.js"
129
- },
130
- "./iterable": {
131
- "default": "./iterable.js"
132
- },
133
- "./logger": {
134
- "default": "./logger.js"
135
- },
136
- "./merge": {
137
- "default": "./merge.js"
138
- },
139
- "./metastream": {
140
- "default": "./metastream.js"
141
- },
142
- "./nodejs": {
143
- "default": "./nodejs.js"
144
- },
145
- "./object": {
146
- "default": "./object.js"
147
- },
148
- "./post-worker": {
149
- "default": "./post-worker.js"
150
- },
151
- "./promise": {
152
- "default": "./promise.js"
153
- },
154
- "./promises": {
155
- "default": "./promises.js"
156
- },
157
- "./pubsub": {
158
- "default": "./pubsub.js"
159
- },
160
- "./raf": {
161
- "default": "./raf.js"
162
- },
163
- "./resolve": {
164
- "default": "./resolve.js"
165
- },
166
- "./sidechain-partition": {
167
- "default": "./sidechain-partition.js"
168
- },
169
- "./sidechain-toggle": {
170
- "default": "./sidechain-toggle.js"
171
- },
172
- "./sidechain-trigger": {
173
- "default": "./sidechain-trigger.js"
174
- },
175
- "./stream": {
176
- "default": "./stream.js"
177
- },
178
- "./subscription": {
179
- "default": "./subscription.js"
180
- },
181
- "./sync-raf": {
182
- "default": "./sync-raf.js"
183
- },
184
- "./sync": {
185
- "default": "./sync.js"
186
- },
187
- "./timeout": {
188
- "default": "./timeout.js"
189
- },
190
- "./toggle": {
191
- "default": "./toggle.js"
192
- },
193
- "./trace": {
194
- "default": "./trace.js"
195
- },
196
- "./transduce": {
197
- "default": "./transduce.js"
198
- },
199
- "./trigger": {
200
- "default": "./trigger.js"
201
- },
202
- "./tunnel": {
203
- "default": "./tunnel.js"
204
- },
205
- "./tween": {
206
- "default": "./tween.js"
207
- },
208
- "./view": {
209
- "default": "./view.js"
210
- },
211
- "./worker": {
212
- "default": "./worker.js"
213
- }
214
- },
215
- "thi.ng": {
216
- "alias": "rs",
217
- "related": [
218
- "atom",
219
- "hdom",
220
- "rdom",
221
- "transducers"
222
- ],
223
- "year": 2017
224
- },
225
- "gitHead": "3c3531350eec56011982583c694aeb1a2e0d0ff4\n"
226
- }
2
+ "name": "@thi.ng/rstream",
3
+ "version": "9.3.3",
4
+ "description": "Reactive streams & subscription primitives for constructing dataflow graphs / pipelines",
5
+ "type": "module",
6
+ "module": "./index.js",
7
+ "typings": "./index.d.ts",
8
+ "sideEffects": false,
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "https://github.com/thi-ng/umbrella.git"
12
+ },
13
+ "homepage": "https://thi.ng/rstream",
14
+ "funding": [
15
+ {
16
+ "type": "github",
17
+ "url": "https://github.com/sponsors/postspectacular"
18
+ },
19
+ {
20
+ "type": "patreon",
21
+ "url": "https://patreon.com/thing_umbrella"
22
+ },
23
+ {
24
+ "type": "liberapay",
25
+ "url": "https://liberapay.com/thi.ng"
26
+ }
27
+ ],
28
+ "author": "Karsten Schmidt (https://thi.ng)",
29
+ "contributors": [
30
+ "AndrΓ© Wachter (https://github.com/andrew8er)",
31
+ "Gavin Cannizzaro (https://github.com/gavinpc-mindgrub)"
32
+ ],
33
+ "license": "Apache-2.0",
34
+ "scripts": {
35
+ "build": "yarn build:esbuild && yarn build:decl",
36
+ "build:decl": "tsc --declaration --emitDeclarationOnly",
37
+ "build:esbuild": "esbuild --format=esm --platform=neutral --target=es2022 --tsconfig=tsconfig.json --outdir=. src/**/*.ts",
38
+ "clean": "bun ../../tools/src/clean-package.ts",
39
+ "doc": "typedoc --options ../../typedoc.json --out doc src/index.ts",
40
+ "doc:readme": "bun ../../tools/src/module-stats.ts && bun ../../tools/src/readme.ts",
41
+ "pub": "npm publish --access public",
42
+ "test": "bun test",
43
+ "tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
44
+ },
45
+ "dependencies": {
46
+ "@thi.ng/api": "^8.12.6",
47
+ "@thi.ng/arrays": "^2.13.15",
48
+ "@thi.ng/associative": "^7.1.16",
49
+ "@thi.ng/atom": "^5.3.47",
50
+ "@thi.ng/checks": "^3.7.22",
51
+ "@thi.ng/errors": "^2.5.46",
52
+ "@thi.ng/logger": "^3.2.5",
53
+ "@thi.ng/transducers": "^9.6.14"
54
+ },
55
+ "devDependencies": {
56
+ "@types/node": "^24.9.1",
57
+ "esbuild": "^0.25.11",
58
+ "typedoc": "^0.28.14",
59
+ "typescript": "^5.9.3"
60
+ },
61
+ "keywords": [
62
+ "async",
63
+ "datastructure",
64
+ "event",
65
+ "fork-join",
66
+ "graph",
67
+ "pipeline",
68
+ "pubsub",
69
+ "reactive",
70
+ "rstream",
71
+ "state",
72
+ "stream",
73
+ "subscription",
74
+ "transducer",
75
+ "transformation",
76
+ "typescript",
77
+ "worker"
78
+ ],
79
+ "publishConfig": {
80
+ "access": "public"
81
+ },
82
+ "engines": {
83
+ "node": ">=18"
84
+ },
85
+ "files": [
86
+ "./*.js",
87
+ "./*.d.ts",
88
+ "internal"
89
+ ],
90
+ "exports": {
91
+ ".": {
92
+ "default": "./index.js"
93
+ },
94
+ "./api": {
95
+ "default": "./api.js"
96
+ },
97
+ "./asidechain": {
98
+ "default": "./asidechain.js"
99
+ },
100
+ "./async": {
101
+ "default": "./async.js"
102
+ },
103
+ "./atom": {
104
+ "default": "./atom.js"
105
+ },
106
+ "./bisect": {
107
+ "default": "./bisect.js"
108
+ },
109
+ "./checks": {
110
+ "default": "./checks.js"
111
+ },
112
+ "./debounce": {
113
+ "default": "./debounce.js"
114
+ },
115
+ "./defworker": {
116
+ "default": "./defworker.js"
117
+ },
118
+ "./event": {
119
+ "default": "./event.js"
120
+ },
121
+ "./forkjoin": {
122
+ "default": "./forkjoin.js"
123
+ },
124
+ "./idgen": {
125
+ "default": "./idgen.js"
126
+ },
127
+ "./interval": {
128
+ "default": "./interval.js"
129
+ },
130
+ "./iterable": {
131
+ "default": "./iterable.js"
132
+ },
133
+ "./logger": {
134
+ "default": "./logger.js"
135
+ },
136
+ "./merge": {
137
+ "default": "./merge.js"
138
+ },
139
+ "./metastream": {
140
+ "default": "./metastream.js"
141
+ },
142
+ "./nodejs": {
143
+ "default": "./nodejs.js"
144
+ },
145
+ "./object": {
146
+ "default": "./object.js"
147
+ },
148
+ "./post-worker": {
149
+ "default": "./post-worker.js"
150
+ },
151
+ "./promise": {
152
+ "default": "./promise.js"
153
+ },
154
+ "./promises": {
155
+ "default": "./promises.js"
156
+ },
157
+ "./pubsub": {
158
+ "default": "./pubsub.js"
159
+ },
160
+ "./raf": {
161
+ "default": "./raf.js"
162
+ },
163
+ "./resolve": {
164
+ "default": "./resolve.js"
165
+ },
166
+ "./sidechain-partition": {
167
+ "default": "./sidechain-partition.js"
168
+ },
169
+ "./sidechain-toggle": {
170
+ "default": "./sidechain-toggle.js"
171
+ },
172
+ "./sidechain-trigger": {
173
+ "default": "./sidechain-trigger.js"
174
+ },
175
+ "./stream": {
176
+ "default": "./stream.js"
177
+ },
178
+ "./subscription": {
179
+ "default": "./subscription.js"
180
+ },
181
+ "./sync-raf": {
182
+ "default": "./sync-raf.js"
183
+ },
184
+ "./sync": {
185
+ "default": "./sync.js"
186
+ },
187
+ "./timeout": {
188
+ "default": "./timeout.js"
189
+ },
190
+ "./toggle": {
191
+ "default": "./toggle.js"
192
+ },
193
+ "./trace": {
194
+ "default": "./trace.js"
195
+ },
196
+ "./transduce": {
197
+ "default": "./transduce.js"
198
+ },
199
+ "./trigger": {
200
+ "default": "./trigger.js"
201
+ },
202
+ "./tunnel": {
203
+ "default": "./tunnel.js"
204
+ },
205
+ "./tween": {
206
+ "default": "./tween.js"
207
+ },
208
+ "./view": {
209
+ "default": "./view.js"
210
+ },
211
+ "./worker": {
212
+ "default": "./worker.js"
213
+ }
214
+ },
215
+ "thi.ng": {
216
+ "alias": "rs",
217
+ "related": [
218
+ "atom",
219
+ "hdom",
220
+ "rdom",
221
+ "transducers"
222
+ ],
223
+ "year": 2017
224
+ },
225
+ "gitHead": "136a5e5ef0b69e82329db00d806c3c4e8f1aa063\n"
226
+ }
package/CHANGELOG.md DELETED
@@ -1,165 +0,0 @@
1
- # Change Log
2
-
3
- - **Last updated**: 2025-09-01T16:38:35Z
4
- - **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
5
-
6
- All notable changes to this project will be documented in this file.
7
- Only versions published since **2022-01-01** are listed here.
8
- Please consult the Git history for older version information.
9
- See [Conventional Commits](https://conventionalcommits.org/) for commit guidelines.
10
-
11
- **Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
12
- and/or version bumps of transitive dependencies.
13
-
14
- ### [9.2.33](https://github.com/thi-ng/umbrella/tree/@thi.ng/rstream@9.2.33) (2025-07-20)
15
-
16
- #### 🩹 Bug fixes
17
-
18
- - fix [#531](https://github.com/thi-ng/umbrella/issues/531), update resolve() done() handling ([2dec309](https://github.com/thi-ng/umbrella/commit/2dec309))
19
- - update done() handling to also dispatch if parent already unsubbed
20
- - fix code example in docs
21
-
22
- ### [9.2.4](https://github.com/thi-ng/umbrella/tree/@thi.ng/rstream@9.2.4) (2025-01-14)
23
-
24
- #### ♻️ Refactoring
25
-
26
- - use optional chaining & nullish coalescing ([c5a0a13](https://github.com/thi-ng/umbrella/commit/c5a0a13))
27
-
28
- ## [9.2.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/rstream@9.2.0) (2024-12-05)
29
-
30
- #### πŸš€ Features
31
-
32
- - add fromTuple(), update StreamObj impl ([ef691cc](https://github.com/thi-ng/umbrella/commit/ef691cc))
33
- - update docs
34
- - add tests
35
-
36
- ## [9.1.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/rstream@9.1.0) (2024-12-04)
37
-
38
- #### πŸš€ Features
39
-
40
- - update fromObject(), re-implement as full subscription ([6903507](https://github.com/thi-ng/umbrella/commit/6903507))
41
-
42
- # [9.0.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/rstream@9.0.0) (2024-08-20)
43
-
44
- #### πŸ›‘ Breaking changes
45
-
46
- - replace `CloseMode` enum w/ string union type ([33b1d16](https://github.com/thi-ng/umbrella/commit/33b1d16))
47
- - BREAKING CHANGE: replace `CloseMode` enum w/ string union type
48
- - this simplifies all usage sites, now only using (and removing obsolete enum import):
49
- - `CloseMode.FIRST` => `"first"`
50
- - `CloseMode.LAST` => `"last"`
51
- - `CloseMode.NEVER` => `"never"`
52
- - update docs & all sites
53
-
54
- ## [8.5.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/rstream@8.5.0) (2024-05-08)
55
-
56
- #### πŸš€ Features
57
-
58
- - add rdom-klist example project, update readmes ([cd458ac](https://github.com/thi-ng/umbrella/commit/cd458ac))
59
- - add rdom-klist example project, update readmes ([531437f](https://github.com/thi-ng/umbrella/commit/531437f))
60
-
61
- ### [8.4.1](https://github.com/thi-ng/umbrella/tree/@thi.ng/rstream@8.4.1) (2024-04-20)
62
-
63
- #### ♻️ Refactoring
64
-
65
- - update type usage ([86be8b7](https://github.com/thi-ng/umbrella/commit/86be8b7))
66
-
67
- ## [8.4.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/rstream@8.4.0) (2024-04-11)
68
-
69
- #### πŸš€ Features
70
-
71
- - add fromAsync() / asAsync() converters & tests ([df57056](https://github.com/thi-ng/umbrella/commit/df57056))
72
-
73
- ### [8.3.20](https://github.com/thi-ng/umbrella/tree/@thi.ng/rstream@8.3.20) (2024-04-08)
74
-
75
- #### ♻️ Refactoring
76
-
77
- - update reducer handling due to updates in [@thi.ng/transducers](https://github.com/thi-ng/umbrella/tree/main/packages/transducers) pkg ([e0e5654](https://github.com/thi-ng/umbrella/commit/e0e5654))
78
-
79
- ### [8.3.6](https://github.com/thi-ng/umbrella/tree/@thi.ng/rstream@8.3.6) (2024-02-22)
80
-
81
- #### ♻️ Refactoring
82
-
83
- - update all `node:*` imports ([c71a526](https://github.com/thi-ng/umbrella/commit/c71a526))
84
-
85
- ### [8.3.3](https://github.com/thi-ng/umbrella/tree/@thi.ng/rstream@8.3.3) (2024-02-16)
86
-
87
- #### ♻️ Refactoring
88
-
89
- - update LOGGER handling ([e3e18ab](https://github.com/thi-ng/umbrella/commit/e3e18ab))
90
-
91
- ## [8.3.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/rstream@8.3.0) (2024-02-06)
92
-
93
- #### πŸš€ Features
94
-
95
- - update fromRAF() & opts ([27f4cde](https://github.com/thi-ng/umbrella/commit/27f4cde))
96
- - update timestamp handling/opts
97
-
98
- ### [8.2.8](https://github.com/thi-ng/umbrella/tree/@thi.ng/rstream@8.2.8) (2023-11-09)
99
-
100
- #### ♻️ Refactoring
101
-
102
- - update all tests (packages A-S) ([e3085e4](https://github.com/thi-ng/umbrella/commit/e3085e4))
103
-
104
- ## [8.2.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/rstream@8.2.0) (2023-10-18)
105
-
106
- #### πŸš€ Features
107
-
108
- - add EventOpts, update fromEvent()/fromDOMEvent() ([49e5143](https://github.com/thi-ng/umbrella/commit/49e5143))
109
-
110
- ## [8.1.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/rstream@8.1.0) (2023-08-22)
111
-
112
- #### πŸš€ Features
113
-
114
- - add toggle(), update readme ([1d6d661](https://github.com/thi-ng/umbrella/commit/1d6d661))
115
-
116
- # [8.0.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/rstream@8.0.0) (2023-04-08)
117
-
118
- #### πŸ›‘ Breaking changes
119
-
120
- - simplify/unify sidechain API ([5e90431](https://github.com/thi-ng/umbrella/commit/5e90431))
121
- - BREAKING CHANGE: simplify/unify sidechain subscription API
122
- - update sidechainPartition/Toggle/Trigger() to take src sub as 1st arg
123
- - old: `src.subscribe(sidechainXXX(side))`...
124
- - new: `sidechainXXX(src, side)`
125
- - update docs
126
- - update tests
127
-
128
- #### πŸš€ Features
129
-
130
- - add syncRAF() ([3c17520](https://github.com/thi-ng/umbrella/commit/3c17520))
131
- - add SyncRAF class and syncRAF() factory
132
- - deprecate sidechainPartitionRAF()
133
- - add tests
134
- - add sidechainTrigger() ([3d2b56d](https://github.com/thi-ng/umbrella/commit/3d2b56d))
135
- - add timestamp support for fromRAF() ([a2b8629](https://github.com/thi-ng/umbrella/commit/a2b8629))
136
- - add FromRAFOpts
137
- - update docs
138
-
139
- #### 🩹 Bug fixes
140
-
141
- - fix opts handling in syncRAF() & fromView() ([baa8878](https://github.com/thi-ng/umbrella/commit/baa8878))
142
-
143
- #### ♻️ Refactoring
144
-
145
- - update KeyStreams type ([1dd60e9](https://github.com/thi-ng/umbrella/commit/1dd60e9))
146
- - switch value types Subscription => ISubscription
147
- - minor update sidechainPartition/Toggle() ([c3ffd38](https://github.com/thi-ng/umbrella/commit/c3ffd38))
148
-
149
- ### [7.2.46](https://github.com/thi-ng/umbrella/tree/@thi.ng/rstream@7.2.46) (2023-03-27)
150
-
151
- #### ♻️ Refactoring
152
-
153
- - update imports (TS5.0) ([562e1af](https://github.com/thi-ng/umbrella/commit/562e1af))
154
-
155
- ### [7.2.31](https://github.com/thi-ng/umbrella/tree/@thi.ng/rstream@7.2.31) (2022-12-16)
156
-
157
- #### 🩹 Bug fixes
158
-
159
- - (TS4.9 regression) update defWorker(), add explicit typehint ([bce5df7](https://github.com/thi-ng/umbrella/commit/bce5df7))
160
-
161
- ### [7.2.7](https://github.com/thi-ng/umbrella/tree/@thi.ng/rstream@7.2.7) (2022-06-09)
162
-
163
- #### ♻️ Refactoring
164
-
165
- - various (minor) TS4.7 related updates/fixes ([9d9ecae](https://github.com/thi-ng/umbrella/commit/9d9ecae))