@cplieger/sse 1.2.0-dev.1 → 1.2.0-dev.4
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/jsr.json +1 -1
- package/package.json +3 -3
- package/src/stream.ts +2 -3
package/jsr.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cplieger/sse",
|
|
3
|
-
"version": "1.2.0-dev.
|
|
3
|
+
"version": "1.2.0-dev.4",
|
|
4
4
|
"description": "Server-Sent Events hub and client that resume from an exact cursor and reconcile after sleep",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -66,11 +66,11 @@
|
|
|
66
66
|
"eslint": "10.12.0",
|
|
67
67
|
"eventsource-parser": "4.1.1",
|
|
68
68
|
"fast-check": "4.10.2",
|
|
69
|
-
"knip": "6.
|
|
69
|
+
"knip": "6.40.0",
|
|
70
70
|
"playwright": "1.63.0",
|
|
71
71
|
"prettier": "3.9.9",
|
|
72
72
|
"typescript": "npm:@typescript/typescript6@6.0.2",
|
|
73
|
-
"typescript-eslint": "8.71.
|
|
73
|
+
"typescript-eslint": "8.71.1",
|
|
74
74
|
"vitest": "5.0.3"
|
|
75
75
|
},
|
|
76
76
|
"overrides": {
|
package/src/stream.ts
CHANGED
|
@@ -112,7 +112,6 @@ type HeldEntry =
|
|
|
112
112
|
readonly kind: "frame";
|
|
113
113
|
readonly generation: number;
|
|
114
114
|
readonly frame: Frame;
|
|
115
|
-
readonly bytes: number;
|
|
116
115
|
}
|
|
117
116
|
| {
|
|
118
117
|
readonly kind: "adopt";
|
|
@@ -201,7 +200,7 @@ export function createStream(opts: StreamOptions): Stream {
|
|
|
201
200
|
opts.onLifecycle?.(event);
|
|
202
201
|
}
|
|
203
202
|
|
|
204
|
-
bindListener(opts.versions, (epoch
|
|
203
|
+
bindListener(opts.versions, (epoch) => {
|
|
205
204
|
const previous = knownEpoch;
|
|
206
205
|
knownEpoch = epoch;
|
|
207
206
|
if (binding || inflight === null || !queued?.full) {
|
|
@@ -469,7 +468,7 @@ export function createStream(opts: StreamOptions): Stream {
|
|
|
469
468
|
}
|
|
470
469
|
|
|
471
470
|
function hold(frame: Frame, bytes: number): void {
|
|
472
|
-
held.push({ kind: "frame", generation: state.generation, frame
|
|
471
|
+
held.push({ kind: "frame", generation: state.generation, frame });
|
|
473
472
|
heldFrames++;
|
|
474
473
|
heldBytes += bytes;
|
|
475
474
|
if (heldFrames > cfg.heldMaxFrames || heldBytes > cfg.heldMaxBytes) {
|