@cplieger/web-terminal-engine 6.0.1 → 6.0.2

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/README.md CHANGED
@@ -203,3 +203,5 @@ This package depends on `document`, `HTMLElement`, `MessageChannel`, and other D
203
203
  ## License
204
204
 
205
205
  MPL-2.0. See [LICENSE](LICENSE).
206
+
207
+ Third-party attributions are in [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md).
package/jsr.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cplieger/web-terminal-engine",
3
- "version": "6.0.1",
3
+ "version": "6.0.2",
4
4
  "license": "MPL-2.0",
5
5
  "exports": {
6
6
  ".": "./src/index.ts"
package/package.json CHANGED
@@ -1,12 +1,16 @@
1
1
  {
2
2
  "name": "@cplieger/web-terminal-engine",
3
- "version": "6.0.1",
3
+ "version": "6.0.2",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "typecheck": "tsc -p tsconfig.json",
7
7
  "typecheck:tests": "tsc -p tsconfig.test.json",
8
8
  "test": "vitest --run",
9
- "test:e2e": "playwright test"
9
+ "test:e2e": "playwright test",
10
+ "lint:eslint": "eslint .",
11
+ "lint:prettier": "prettier --check .",
12
+ "lint:knip": "knip",
13
+ "lint:fix": "eslint . --fix && prettier --write ."
10
14
  },
11
15
  "devDependencies": {
12
16
  "@cplieger/web-terminal-engine-v3": "npm:@cplieger/web-terminal-engine@2.8.0",
@@ -17,18 +21,19 @@
17
21
  "@stryker-mutator/vitest-runner": "10.0.0",
18
22
  "@types/pngjs": "6.0.5",
19
23
  "@typescript/native": "npm:typescript@7.0.2",
20
- "@vitest/browser": "5.0.1",
21
- "@vitest/browser-playwright": "5.0.1",
22
- "@vitest/coverage-v8": "5.0.1",
24
+ "@vitest/browser": "5.0.2",
25
+ "@vitest/browser-playwright": "5.0.2",
26
+ "@vitest/coverage-v8": "5.0.2",
23
27
  "esbuild": "0.28.2",
24
- "eslint": "10.10.0",
25
- "fast-check": "4.10.1",
28
+ "eslint": "10.11.0",
29
+ "fast-check": "4.10.2",
30
+ "knip": "6.38.0",
26
31
  "playwright": "1.63.0",
27
32
  "pngjs": "7.0.0",
28
- "prettier": "3.9.7",
33
+ "prettier": "3.9.9",
29
34
  "typescript": "npm:@typescript/typescript6@6.0.2",
30
- "typescript-eslint": "8.70.0",
31
- "vitest": "5.0.1"
35
+ "typescript-eslint": "8.71.0",
36
+ "vitest": "5.0.2"
32
37
  },
33
38
  "overrides": {
34
39
  "qs": "^6.15.2"
package/src/store.ts CHANGED
@@ -1666,10 +1666,14 @@ export class LineStore {
1666
1666
  // is validated first, so a corrupt head still rejects the restore rather
1667
1667
  // than being silently sliced off.
1668
1668
  const kept = pairs.length > bound ? pairs.slice(pairs.length - bound) : pairs;
1669
- const oldest = kept[0]?.[0] ?? -1;
1670
- if (oldest < 0) {
1671
- return null;
1672
- }
1669
+ // Non-empty, and its first index is a validated non-negative integer: the
1670
+ // empty-payload return above leaves at least one pair, `bound` is at least
1671
+ // 1, and every entry's index was checked on the way into `pairs`.
1672
+ const first = kept[0];
1673
+ if (first === undefined) {
1674
+ throw new Error("restore: no line pairs left after validation");
1675
+ }
1676
+ const oldest = first[0];
1673
1677
  for (const [abs, runs] of kept) {
1674
1678
  store.lines.set(abs, runs);
1675
1679
  }