@thi.ng/rstream 8.4.0 → 8.4.1
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 +2 -2
- package/api.d.ts +3 -3
- package/package.json +10 -10
- package/stream.d.ts +2 -1
- package/subscription.d.ts +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
-
- **Last updated**: 2024-04-
|
|
3
|
+
- **Last updated**: 2024-04-20T14:42:45Z
|
|
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
|
+
### [8.4.1](https://github.com/thi-ng/umbrella/tree/@thi.ng/rstream@8.4.1) (2024-04-20)
|
|
13
|
+
|
|
14
|
+
#### ♻️ Refactoring
|
|
15
|
+
|
|
16
|
+
- update type usage ([86be8b7](https://github.com/thi-ng/umbrella/commit/86be8b7))
|
|
17
|
+
|
|
12
18
|
## [8.4.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/rstream@8.4.0) (2024-04-11)
|
|
13
19
|
|
|
14
20
|
#### 🚀 Features
|
package/README.md
CHANGED
|
@@ -203,10 +203,10 @@ import * as rs from "@thi.ng/rstream";
|
|
|
203
203
|
Browser ESM import:
|
|
204
204
|
|
|
205
205
|
```html
|
|
206
|
-
<script type="module" src="https://
|
|
206
|
+
<script type="module" src="https://esm.run/@thi.ng/rstream"></script>
|
|
207
207
|
```
|
|
208
208
|
|
|
209
|
-
[
|
|
209
|
+
[JSDelivr documentation](https://www.jsdelivr.com/)
|
|
210
210
|
|
|
211
211
|
For Node.js REPL:
|
|
212
212
|
|
package/api.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Fn, Fn0, IDeref, IID } from "@thi.ng/api";
|
|
1
|
+
import type { Fn, Fn0, IDeref, IID, Maybe } from "@thi.ng/api";
|
|
2
2
|
import type { Transducer } from "@thi.ng/transducers";
|
|
3
3
|
import type { Stream } from "./stream.js";
|
|
4
4
|
export declare enum State {
|
|
@@ -127,7 +127,7 @@ export interface ISubscriber<T> {
|
|
|
127
127
|
__owner?: ISubscription<any, any>;
|
|
128
128
|
[id: string]: any;
|
|
129
129
|
}
|
|
130
|
-
export interface ISubscribable<A> extends IDeref<A
|
|
130
|
+
export interface ISubscribable<A> extends IDeref<Maybe<A>>, IID<string> {
|
|
131
131
|
/**
|
|
132
132
|
* Adds given `sub` as child subscription.
|
|
133
133
|
*
|
|
@@ -174,7 +174,7 @@ export interface ITransformable<B> {
|
|
|
174
174
|
transform<C>(opts: WithTransform<B, C> & Partial<WithErrorHandlerOpts>): ISubscription<B, C>;
|
|
175
175
|
map<C>(fn: Fn<B, C>, opts?: Partial<WithErrorHandlerOpts>): ISubscription<B, C>;
|
|
176
176
|
}
|
|
177
|
-
export interface ISubscription<A, B> extends IDeref<B
|
|
177
|
+
export interface ISubscription<A, B> extends IDeref<Maybe<B>>, ISubscriber<A>, ISubscribable<B>, ITransformable<B> {
|
|
178
178
|
parent?: ISubscription<any, A>;
|
|
179
179
|
getState(): State;
|
|
180
180
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/rstream",
|
|
3
|
-
"version": "8.4.
|
|
3
|
+
"version": "8.4.1",
|
|
4
4
|
"description": "Reactive streams & subscription primitives for constructing dataflow graphs / pipelines",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -40,14 +40,14 @@
|
|
|
40
40
|
"tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@thi.ng/api": "^8.
|
|
44
|
-
"@thi.ng/arrays": "^2.9.
|
|
45
|
-
"@thi.ng/associative": "^6.3.
|
|
46
|
-
"@thi.ng/atom": "^5.2.
|
|
47
|
-
"@thi.ng/checks": "^3.6.
|
|
48
|
-
"@thi.ng/errors": "^2.5.
|
|
49
|
-
"@thi.ng/logger": "^3.0.
|
|
50
|
-
"@thi.ng/transducers": "^9.0.
|
|
43
|
+
"@thi.ng/api": "^8.11.0",
|
|
44
|
+
"@thi.ng/arrays": "^2.9.4",
|
|
45
|
+
"@thi.ng/associative": "^6.3.57",
|
|
46
|
+
"@thi.ng/atom": "^5.2.44",
|
|
47
|
+
"@thi.ng/checks": "^3.6.2",
|
|
48
|
+
"@thi.ng/errors": "^2.5.5",
|
|
49
|
+
"@thi.ng/logger": "^3.0.10",
|
|
50
|
+
"@thi.ng/transducers": "^9.0.2"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@microsoft/api-extractor": "^7.43.0",
|
|
@@ -219,5 +219,5 @@
|
|
|
219
219
|
],
|
|
220
220
|
"year": 2017
|
|
221
221
|
},
|
|
222
|
-
"gitHead": "
|
|
222
|
+
"gitHead": "8339d05ecc857e529c7325a9839c0063b89e728d\n"
|
|
223
223
|
}
|
package/stream.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Maybe } from "@thi.ng/api";
|
|
1
2
|
import { type CommonOpts, type IStream, type ISubscriber, type ISubscription, type StreamCancel, type StreamSource, type TransformableOpts, type WithErrorHandlerOpts } from "./api.js";
|
|
2
3
|
import { Subscription } from "./subscription.js";
|
|
3
4
|
/**
|
|
@@ -71,7 +72,7 @@ export declare const reactive: <T>(val: T, opts?: Partial<CommonOpts>) => Stream
|
|
|
71
72
|
*/
|
|
72
73
|
export declare class Stream<T> extends Subscription<T, T> implements IStream<T> {
|
|
73
74
|
src?: StreamSource<T>;
|
|
74
|
-
protected _cancel: StreamCancel
|
|
75
|
+
protected _cancel: Maybe<StreamCancel>;
|
|
75
76
|
protected _inited: boolean;
|
|
76
77
|
constructor(opts?: Partial<WithErrorHandlerOpts>);
|
|
77
78
|
constructor(src: StreamSource<T>, opts?: Partial<WithErrorHandlerOpts>);
|
package/subscription.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Fn } from "@thi.ng/api";
|
|
1
|
+
import type { Fn, Maybe } from "@thi.ng/api";
|
|
2
2
|
import type { Reduced, Reducer, Transducer } from "@thi.ng/transducers";
|
|
3
3
|
import { CloseMode, State, type CommonOpts, type ISubscriber, type ISubscription, type SubscriptionOpts, type TransformableOpts, type WithErrorHandlerOpts, type WithTransform } from "./api.js";
|
|
4
4
|
/**
|
|
@@ -66,7 +66,7 @@ export declare class Subscription<A, B> implements ISubscription<A, B> {
|
|
|
66
66
|
protected state: State;
|
|
67
67
|
protected subs: Partial<ISubscriber<B>>[];
|
|
68
68
|
constructor(wrapped?: Partial<ISubscriber<B>> | undefined, opts?: Partial<SubscriptionOpts<A, B>>);
|
|
69
|
-
deref(): B
|
|
69
|
+
deref(): Maybe<B>;
|
|
70
70
|
getState(): State;
|
|
71
71
|
protected setState(state: State): void;
|
|
72
72
|
/**
|