@cplieger/sse 1.3.0-dev.3 → 1.5.0-dev.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/NOTICE CHANGED
@@ -1,3 +1,3 @@
1
- sse
1
+ go
2
2
  Copyright 2026 cplieger
3
- https://github.com/cplieger/sse
3
+ https://github.com/cplieger/go
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  > A Server-Sent-Events client that resumes exactly where it stopped, notices a dead stream, and reconciles after a sleep.
4
4
 
5
- The TypeScript half of [cplieger/sse](https://github.com/cplieger/sse), speaking the wire the Go `sse` package serves: every frame carries an `epoch:offset` cursor, every connection opens with a hello that says whether that cursor was honoured, and the client turns both into a projection an application can trust across a page hide, a phone lock or a network change. A native `EventSource` cannot set a request header, cannot tell a silent stream from an idle one, and reconnects on its own schedule with whatever `Last-Event-ID` it last saw; this client owns the connection over `fetch` and `ReadableStream` instead, presents the cursor it holds, measures liveness on bytes, closes a hidden tab's stream after a minute and reopens it on return, backs off with full jitter, and holds incoming frames while the application asks the server what changed. It has no runtime dependencies, and the DOM readers (`document.visibilityState`, `navigator.onLine`) are injectable, so the same runtime runs in Node against the Go test fixture.
5
+ The TypeScript half of [github.com/cplieger/go/sse](https://github.com/cplieger/go/tree/main/sse), speaking the wire the Go `sse` package serves: every frame carries an `epoch:offset` cursor, every connection opens with a hello that says whether that cursor was honoured, and the client turns both into a projection an application can trust across a page hide, a phone lock or a network change. A native `EventSource` cannot set a request header, cannot tell a silent stream from an idle one, and reconnects on its own schedule with whatever `Last-Event-ID` it last saw; this client owns the connection over `fetch` and `ReadableStream` instead, presents the cursor it holds, measures liveness on bytes, closes a hidden tab's stream after a minute and reopens it on return, backs off with full jitter, and holds incoming frames while the application asks the server what changed. It has no runtime dependencies, and the DOM readers (`document.visibilityState`, `navigator.onLine`) are injectable, so the same runtime runs in Node against the Go test fixture.
6
6
 
7
7
  ## Install
8
8
 
@@ -64,7 +64,7 @@ The package typechecks under `lib: ["ESNext", "WebWorker"]` as well as under the
64
64
 
65
65
  ## Full documentation
66
66
 
67
- The Go server API is in the [repository README](https://github.com/cplieger/sse#readme). The hub options and the presence hook are in [Running the hub](https://github.com/cplieger/sse/blob/main/docs/hub.md), and the hello's verdicts and the digest are in [The wire contract](https://github.com/cplieger/sse/blob/main/docs/wire.md). The shared timing constants both halves pin are in the repository's `timing.json`.
67
+ The Go server API is in the [repository README](https://github.com/cplieger/go/tree/main/sse#readme). The hub options and the presence hook are in [Running the hub](https://github.com/cplieger/go/blob/main/sse/docs/hub.md), and the hello's verdicts and the digest are in [The wire contract](https://github.com/cplieger/go/blob/main/sse/docs/wire.md). The shared timing constants both halves pin are in [`timing.json`](https://github.com/cplieger/go/blob/main/sse/timing.json).
68
68
 
69
69
  ## Disclaimer
70
70
 
package/jsr.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cplieger/sse",
3
- "version": "1.3.0-dev.3",
3
+ "version": "1.5.0-dev.1",
4
4
  "license": "Apache-2.0",
5
5
  "exports": {
6
6
  ".": "./src/index.ts"
package/package.json CHANGED
@@ -1,18 +1,18 @@
1
1
  {
2
2
  "name": "@cplieger/sse",
3
- "version": "1.3.0-dev.3",
3
+ "version": "1.5.0-dev.1",
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",
7
7
  "sideEffects": false,
8
8
  "repository": {
9
9
  "type": "git",
10
- "url": "git+https://github.com/cplieger/sse.git",
11
- "directory": "web"
10
+ "url": "git+https://github.com/cplieger/go.git",
11
+ "directory": "sse/web"
12
12
  },
13
- "homepage": "https://github.com/cplieger/sse",
13
+ "homepage": "https://github.com/cplieger/go/tree/main/sse",
14
14
  "bugs": {
15
- "url": "https://github.com/cplieger/sse/issues"
15
+ "url": "https://github.com/cplieger/go/issues"
16
16
  },
17
17
  "author": "cplieger <917744+cplieger@users.noreply.github.com>",
18
18
  "keywords": [
@@ -38,11 +38,6 @@
38
38
  "LICENSE",
39
39
  "NOTICE"
40
40
  ],
41
- "sseFixture": "./ssetest/cmd",
42
- "browserEngines": [
43
- "firefox",
44
- "webkit"
45
- ],
46
41
  "scripts": {
47
42
  "typecheck": "tsc -p tsconfig.json && tsc -p tsconfig.worker.json && tsc -p tsconfig.tests.json",
48
43
  "typecheck:tests": "tsc -p tsconfig.tests.json",
@@ -55,25 +50,26 @@
55
50
  },
56
51
  "devDependencies": {
57
52
  "@eslint/js": "10.0.1",
58
- "@stryker-mutator/core": "10.0.0",
59
- "@stryker-mutator/typescript-checker": "10.0.0",
60
- "@stryker-mutator/vitest-runner": "10.0.0",
61
- "@types/node": "26.6.5",
53
+ "@stryker-mutator/core": "10.1.1",
54
+ "@stryker-mutator/typescript-checker": "10.1.1",
55
+ "@stryker-mutator/vitest-runner": "10.1.1",
56
+ "@types/node": "26.6.6",
62
57
  "@typescript/native": "npm:typescript@7.0.2",
63
58
  "@vitest/browser": "5.0.5",
64
59
  "@vitest/browser-playwright": "5.0.5",
65
60
  "@vitest/coverage-v8": "5.0.5",
66
- "eslint": "10.12.0",
67
- "eventsource-parser": "4.1.2",
61
+ "eslint": "10.14.0",
62
+ "eventsource-parser": "4.1.3",
68
63
  "fast-check": "4.10.2",
69
- "knip": "6.41.0",
70
- "playwright": "1.64.0",
64
+ "knip": "6.44.1",
65
+ "playwright": "1.64.1",
71
66
  "prettier": "3.9.10",
72
67
  "typescript": "npm:@typescript/typescript6@6.0.2",
73
- "typescript-eslint": "8.71.2",
68
+ "typescript-eslint": "8.72.1",
74
69
  "vitest": "5.0.5"
75
70
  },
76
71
  "overrides": {
77
- "qs": "^6.15.2"
72
+ "qs": "^6.15.2",
73
+ "minimatch": "^11.0.1"
78
74
  }
79
75
  }
package/src/timing.ts CHANGED
@@ -60,7 +60,7 @@ export interface TimingConfig {
60
60
 
61
61
  /**
62
62
  * The value every field a caller leaves unset takes. Each one is pinned, directly or by derivation,
63
- * to the repository's `timing.json` — the single source both halves of the protocol read — so a
63
+ * to the module's `timing.json` — the single source both halves of the protocol read — so a
64
64
  * client default and the server behaviour it assumes cannot drift apart.
65
65
  */
66
66
  export const DEFAULT_TIMING: TimingConfig = {