securemark 0.280.8 → 0.280.9

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "securemark",
3
- "version": "0.280.8",
3
+ "version": "0.280.9",
4
4
  "description": "Secure markdown renderer working on browsers for user input data.",
5
5
  "private": false,
6
6
  "homepage": "https://github.com/falsandtru/securemark",
@@ -28,20 +28,20 @@
28
28
  "LICENSE"
29
29
  ],
30
30
  "dependencies": {
31
- "spica": "0.0.761"
31
+ "spica": "0.0.781"
32
32
  },
33
33
  "devDependencies": {
34
- "@types/dompurify": "3.0.4",
35
- "@types/jquery": "3.5.26",
36
- "@types/mathjax": "0.0.39",
37
- "@types/mocha": "10.0.3",
38
- "@types/power-assert": "1.5.10",
39
- "@types/prismjs": "1.26.2",
40
- "@typescript-eslint/parser": "^6.10.0",
34
+ "@types/dompurify": "3.0.5",
35
+ "@types/jquery": "3.5.29",
36
+ "@types/mathjax": "0.0.40",
37
+ "@types/mocha": "10.0.6",
38
+ "@types/power-assert": "1.5.12",
39
+ "@types/prismjs": "1.26.3",
40
+ "@typescript-eslint/parser": "^6.21.0",
41
41
  "babel-loader": "^9.1.3",
42
42
  "babel-plugin-unassert": "^3.2.0",
43
43
  "concurrently": "^8.2.2",
44
- "eslint": "^8.53.0",
44
+ "eslint": "^8.56.0",
45
45
  "eslint-plugin-redos": "^4.4.5",
46
46
  "eslint-webpack-plugin": "^4.0.1",
47
47
  "glob": "^10.3.10",
@@ -51,13 +51,13 @@
51
51
  "karma-firefox-launcher": "^2.1.2",
52
52
  "karma-mocha": "^2.0.1",
53
53
  "karma-power-assert": "^1.0.0",
54
- "mocha": "^10.2.0",
55
- "npm-check-updates": "^16.14.6",
56
- "semver": "^7.5.4",
57
- "ts-loader": "^9.5.0",
54
+ "mocha": "^10.3.0",
55
+ "npm-check-updates": "^16.14.15",
56
+ "semver": "^7.6.0",
57
+ "ts-loader": "^9.5.1",
58
58
  "typed-dom": "0.0.348",
59
- "typescript": "5.2.2",
60
- "webpack": "^5.89.0",
59
+ "typescript": "5.3.3",
60
+ "webpack": "^5.90.1",
61
61
  "webpack-cli": "^5.1.4",
62
62
  "webpack-merge": "^5.10.0"
63
63
  },
@@ -1,11 +1,28 @@
1
1
  import { Caches } from '../../..';
2
- import { Cache } from 'spica/cache';
3
2
  import { Clock } from 'spica/clock';
3
+ import { TLRU } from 'spica/tlru';
4
4
 
5
5
  // For rerendering in editing.
6
6
 
7
+ /*
8
+ 同一文書内で複数回使用される可能性が低いデータ: Clock
9
+ 同一文書内で複数回使用される可能性が高いデータ: TLRU
10
+
11
+ 編集時の再描画高速化が主目的であるためブロックを周期とするループおよび
12
+ 異なるブロックへのジャンプに適したアルゴリズムを使用。
13
+ キャッシュサイズはブロック内の全データをキャッシュできなければならない。
14
+ キャッシュサイズは100あれば足りるが10,000までは速度低下しないようなので
15
+ データサイズを加味して100から1,000とする。
16
+ 遠くで少数の同じデータを高速描画してもあまり意味はない。
17
+ タイムラインとスレッドのmediaにおいても多数の同一データが長周期で複数回表示
18
+ される適切な状況はないと思われる。
19
+ 同一投稿は頻繁に再送されてはならずスパムは削除されなければならず
20
+ ジャーゴンは考慮に値しない。
21
+
22
+ */
23
+
7
24
  export const caches: Caches = {
8
25
  code: new Clock<string, HTMLElement>(1000),
9
- math: new Cache<string, HTMLElement>(1000),
26
+ math: new TLRU<string, HTMLElement>(1000),
10
27
  media: new Clock<string, HTMLElement>(100),
11
28
  } as const;