@statewalker/webrun-streams 0.2.0 → 0.2.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022-2026 statewalker
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -15,7 +15,7 @@ Every higher-level package in the `webrun-*` family (and its consumers — scann
15
15
  5. **Error (de)serialisation** for passing exceptions across structured-clone / JSON boundaries without losing stacks or extra fields.
16
16
  6. **Line / JSONL / text codecs** so stream-processing code doesn't re-invent split/join/encode/decode in every consumer.
17
17
 
18
- The MessagePack codec that previously rode along here is split out to [`@statewalker/webrun-msgpack`](../webrun-msgpack) so consumers that don't need framing don't pull in `@ygoe/msgpack`.
18
+ The MessagePack codec that previously rode along here is split out to [`@statewalker/webrun-msgpack`](../webrun-msgpack) so consumers that don't need framing don't pull in a MessagePack implementation.
19
19
 
20
20
  ## Install
21
21
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@statewalker/webrun-streams",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Async-iterator / ReadableStream primitives: collect, text/jsonl codecs, lines, backpressure generators, serialisable errors.",
@@ -17,6 +17,7 @@
17
17
  },
18
18
  "exports": {
19
19
  ".": {
20
+ "source": "./src/index.ts",
20
21
  "types": "./dist/index.d.ts",
21
22
  "import": "./dist/index.js"
22
23
  }
@@ -26,11 +27,12 @@
26
27
  "src"
27
28
  ],
28
29
  "devDependencies": {
29
- "@types/node": "^26.2.0",
30
+ "@biomejs/biome": "^2.5.15",
31
+ "@types/node": "^26.6.4",
30
32
  "rimraf": "^6.1.3",
31
- "rolldown": "^1.2.4",
33
+ "rolldown": "^1.2.12",
32
34
  "typescript": "^7.0.2",
33
- "vitest": "^4.1.10"
35
+ "vitest": "^5.0.3"
34
36
  },
35
37
  "sideEffects": false,
36
38
  "publishConfig": {
@@ -533,7 +533,8 @@ function decodeVarint(buf: Uint8Array, start: number): { value: number; offset:
533
533
  let shift = 0;
534
534
  let i = start;
535
535
  while (i < buf.length) {
536
- const b = buf[i++]!; // i < buf.length, checked by the while condition, so this index exists
536
+ // biome-ignore lint/style/noNonNullAssertion: i < buf.length, checked by the while condition, so this index exists.
537
+ const b = buf[i++]!;
537
538
  value |= (b & 0x7f) << shift;
538
539
  if ((b & 0x80) === 0) return { value: value >>> 0, offset: i };
539
540
  shift += 7;