dsh-plugin-t-expert 0.4.63 → 0.4.64
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/CHANGELOG.md +8 -1
- package/lib/client.js +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -16,7 +16,14 @@
|
|
|
16
16
|
> 发布时**不要再跑 `npm version`**(那会把已提交好的版本又升一级,发出去的号与 CHANGELOG、tag 就对不上),
|
|
17
17
|
> 只补一个 annotated tag(`git tag -a`,因为 `git push --follow-tags` 只推带注释的 tag)。
|
|
18
18
|
|
|
19
|
-
## [0.4.
|
|
19
|
+
## [0.4.64] — 未发布
|
|
20
|
+
|
|
21
|
+
**修 #6 优化其实没生效的问题** —— `enabledSet` 每次渲染都 `new Set(...)`、引用恒变,
|
|
22
|
+
导致 `visible` 的 `useMemo` 依赖恒变、每次都重算(白加一层 memo)。
|
|
23
|
+
|
|
24
|
+
把 `enabledSet` 也包 `React.useMemo`(依赖 `[snapshot]`),`useMemo` 才真正生效。
|
|
25
|
+
|
|
26
|
+
|
|
20
27
|
|
|
21
28
|
**补 0.4.62 漏写的 `avatarsCache` 声明** —— 上一版只写了「失效」,漏了 `let avatarsCache` 声明与缓存判断,
|
|
22
29
|
导致 `tsc` 报 `Cannot find name 'avatarsCache'`、`npm publish` 的 typecheck 失败。
|
package/lib/client.js
CHANGED
|
@@ -67,7 +67,7 @@ var SectionBoundary = class extends import_react.default.Component {
|
|
|
67
67
|
|
|
68
68
|
// src/client/state.js
|
|
69
69
|
var NS = "t-team";
|
|
70
|
-
var CLIENT_BUILD_VERSION = "0.4.
|
|
70
|
+
var CLIENT_BUILD_VERSION = "0.4.64";
|
|
71
71
|
var PLUGIN_ID = "dsh-plugin-t-expert";
|
|
72
72
|
var DIVISION_FALLBACK = "specialized";
|
|
73
73
|
var NEW_DIVISION = "__new";
|
|
@@ -21779,7 +21779,7 @@ function SettingsPanel({ t, ctx, remote, skillRemote, getActive, initialTab, vie
|
|
|
21779
21779
|
}
|
|
21780
21780
|
}
|
|
21781
21781
|
const experts = snapshot?.experts ?? [];
|
|
21782
|
-
const enabledSet = snapshot != null ? new Set(snapshot.enabled ?? []) : /* @__PURE__ */ new Set();
|
|
21782
|
+
const enabledSet = import_react5.default.useMemo(() => snapshot != null ? new Set(snapshot.enabled ?? []) : /* @__PURE__ */ new Set(), [snapshot]);
|
|
21783
21783
|
const divisions = [];
|
|
21784
21784
|
for (const expert of experts) {
|
|
21785
21785
|
if (!divisions.includes(expert.division)) divisions.push(expert.division);
|
package/package.json
CHANGED