@thi.ng/csp 2.1.111 → 2.1.113

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # Change Log
2
2
 
3
- - **Last updated**: 2024-03-27T09:53:45Z
3
+ - **Last updated**: 2024-04-08T14:59:29Z
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
+ ### [2.1.113](https://github.com/thi-ng/umbrella/tree/@thi.ng/csp@2.1.113) (2024-04-08)
13
+
14
+ #### ♻️ Refactoring
15
+
16
+ - update reducer handling due to updates in [@thi.ng/transducers](https://github.com/thi-ng/umbrella/tree/main/packages/transducers) pkg ([5af4868](https://github.com/thi-ng/umbrella/commit/5af4868))
17
+
12
18
  ### [2.1.99](https://github.com/thi-ng/umbrella/tree/@thi.ng/csp@2.1.99) (2024-02-22)
13
19
 
14
20
  #### ♻️ Refactoring
package/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
  [![Mastodon Follow](https://img.shields.io/mastodon/follow/109331703950160316?domain=https%3A%2F%2Fmastodon.thi.ng&style=social)](https://mastodon.thi.ng/@toxi)
8
8
 
9
9
  > [!NOTE]
10
- > This is one of 190 standalone projects, maintained as part
10
+ > This is one of 191 standalone projects, maintained as part
11
11
  > of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo
12
12
  > and anti-framework.
13
13
  >
@@ -68,7 +68,13 @@ alternatives providing similar functionality:
68
68
  yarn add @thi.ng/csp
69
69
  ```
70
70
 
71
- ES module import:
71
+ ESM import:
72
+
73
+ ```ts
74
+ import * as csp from "@thi.ng/csp";
75
+ ```
76
+
77
+ Browser ESM import:
72
78
 
73
79
  ```html
74
80
  <script type="module" src="https://cdn.skypack.dev/@thi.ng/csp"></script>
package/channel.d.ts CHANGED
@@ -115,7 +115,7 @@ export declare class Channel<T> implements IReadWriteableChannel<T> {
115
115
  onerror: ErrorHandler;
116
116
  protected state: State;
117
117
  protected buf: IBuffer<T>;
118
- protected tx: Reducer<DCons<T>, T>;
118
+ protected tx: Reducer<T, DCons<T>>;
119
119
  protected writes: DCons<ChannelItem<T>>;
120
120
  protected reads: DCons<Fn<T, void>>;
121
121
  protected txbuf: DCons<T>;
@@ -140,8 +140,8 @@ export declare class Channel<T> implements IReadWriteableChannel<T> {
140
140
  consume(fn?: Fn<T, any>): Promise<void>;
141
141
  produce(fn: Fn0<T>, close?: boolean): Promise<void>;
142
142
  consumeWhileReadable(fn?: Fn<T, any>): Promise<void>;
143
- reduce<A>(rfn: Reducer<A, T>, acc?: A): Promise<A>;
144
- transduce<A, B>(tx: Transducer<T, B>, rfn: Reducer<A, B>, acc?: A): Promise<A>;
143
+ reduce<R>(rfn: Reducer<T, R>, acc?: R): Promise<R>;
144
+ transduce<A, B>(tx: Transducer<T, A>, rfn: Reducer<A, B>, acc?: B): Promise<B>;
145
145
  into(src: Iterable<T>, close?: boolean): Promise<void>;
146
146
  pipe<R>(dest: Channel<R> | Transducer<T, R>, close?: boolean): Channel<R>;
147
147
  split<A, B>(pred: Predicate<T>, truthy?: Channel<A>, falsey?: Channel<B>, close?: boolean): (Channel<A> | Channel<B>)[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/csp",
3
- "version": "2.1.111",
3
+ "version": "2.1.113",
4
4
  "description": "ES6 promise based CSP primitives & operations",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -40,12 +40,12 @@
40
40
  "tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
41
41
  },
42
42
  "dependencies": {
43
- "@thi.ng/api": "^8.9.31",
44
- "@thi.ng/arrays": "^2.9.0",
45
- "@thi.ng/checks": "^3.5.5",
46
- "@thi.ng/dcons": "^3.2.106",
47
- "@thi.ng/errors": "^2.5.2",
48
- "@thi.ng/transducers": "^8.9.17"
43
+ "@thi.ng/api": "^8.10.0",
44
+ "@thi.ng/arrays": "^2.9.2",
45
+ "@thi.ng/checks": "^3.6.0",
46
+ "@thi.ng/dcons": "^3.2.108",
47
+ "@thi.ng/errors": "^2.5.3",
48
+ "@thi.ng/transducers": "^9.0.0"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@microsoft/api-extractor": "^7.43.0",
@@ -104,5 +104,5 @@
104
104
  "status": "deprecated",
105
105
  "year": 2016
106
106
  },
107
- "gitHead": "db5f5a5d1b223a8e6b4999d67836678038fd3560\n"
107
+ "gitHead": "85ac4bd4d6d89f8e3689e2863d5bea0cecdb371c\n"
108
108
  }