@nimoxie/dsh-ui-tweaks 0.2.6 → 0.2.8

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/DEVELOPMENT.md CHANGED
@@ -246,6 +246,8 @@
246
246
  - [x] 0.2.4(2026-11-17):修「改动审查行号不对」—— 适配层改成「先请官方、404 才补位」;坐标登记仍留在渲染期(否则官方卡画过的回合在释放后没有兜底数据,Review 显示「内容已不可用」)。补位 diff 新增行号对齐(host `read-text` 反查片段落点,10 项离线单测通过)。另加更新前来源预检(`preflight-source`,问 pnpm 实际使用的 registry):两步法卸载前先验目标版本可下载,失败不卸载、落「更新失败」+ 悬停看技术原因。离线语法检查通过,真机待验。
247
247
  - [x] 0.2.5(2026-11-19):补位 diff 改为**逐段成 hunk**(同一文件多段改动不再串成一次替换,修真机「删二维码代码 / 加 import 配成一对」);锚点改成「连续相同的最长非空区间 ≥3 行」,空行不再把落点带到第 1 行;任一段没锚定就在标题标「(片段内行号)」。10 项离线单测全过(含空行首行、非空不足 3 行、多段各自命中、部分命中)。
248
248
  - [x] 0.2.6(2026-11-25):更新面板标签改等宽排版 —— 文案统一成 **4 个汉字**(`比对中 …`→`正在比对`、`更新中 …`→`正在更新`、`DSH 不符`→`版本不符`、`Git 直装`→`仓库直装`、`未比对`→`尚未比对`),`.tag` 加 `display:inline-flex` + `box-sizing:border-box` + `min-width:calc(4em + 14px)` + `justify-content:center` + `font-variant-numeric:tabular-nums` 兜底;汉字是方块字,等字数即等宽,**不靠补空格**(比例字体里空格本身也不是半格)。另:兼容门禁悬停提示不再把 `≥` 和 `engines.dsh` 自带的 `>=` 叠成「≥ >=0.2.3-alpha.2」(`dshRequirementText()` 先剥比较符)。
249
+ - [x] 0.2.7(2026-11-25):收尾鲁棒性 —— 补位 diff 只在能还原绝对路径时才读文件(相对路径会让 host 按自己的 cwd 读到同名错文件,静默给出错行号);坐标索引加 300 条上限、并在 `connection/reset` 时清空;标签等宽加开发期自检(非 4 个汉字就 `console.warn`);`preflight-source` 加 10 分钟 packument 缓存(tarball 可用性仍每次实测),失败码新增 `registry-invalid`。 另修「合成坐标串轮」:无公告回合改用 `SYNTH_SEQ_BASE(9e8) + 轮号` 作 seq(官方地址正则只认非负整数,负数打不开;旧实现统一用 0,同一会话多个无公告回合会互相覆盖)。
250
+ - [x] 0.2.8(2026-11-25):补位 diff 的锚点加**自适应退化** —— 3 行连续匹配失败时依次尝试「2 行且首行 ≥8 字符」「1 行且 ≥24 字符且全文件唯一」,片段被后续回合改动打散后仍能定位,仍不猜;近似卡片的 `header` 背景改用 `color-mix(currentColor 6%)`(原来是 `--dsw-static-neutral-50`,在暗色主题下是白色,真机表现为卡片头部发白);官方 CSS 类名提取失败不再永久缓存(2 秒后重试),并在 `data-plugin-css` 标签找不到时按 `--changes-fill` 特征回退搜索样式表。
249
251
  - 同版修对话区滚动条的偶发拖不动:宿主 `pointer-events:none`(只有 track 收事件,隐层不再吃掉右缘点击)、document 捕获段补 pointerup/pointercancel 兜底(捕获丢失或宿主重建时收尾)、调宽条不可见时整块隐藏而不是摆到 `left:-14`、thumb 位置改按可滚动行程归一化(28px 下限不再导致拖到底差一截)、拖动态补刷新 `trRect`、`ResizeObserver` 在卸载时 `disconnect`。
250
252
  - [ ] `shell` 模式重启不留日志(`ui-tweaks-restart.log` 只有 `relaunch` 分支写),要硬证据就在 `performRestart` 退出前追加一行;「点按钮 → 宿主退出」目前只有 `crash-*-host.log` 作间接证据。
251
253
  - [ ] 窗口记忆「零闪现」只能靠常驻 watcher 进程(代价:常驻 + 卸载残留),**待与用户确认**。
package/lib/client.js CHANGED
@@ -19,7 +19,7 @@ window.__ModuleLoader__.load({
19
19
  const module = { exports: {} };
20
20
  const exports = module.exports;
21
21
 
22
- const BUILD = "0.2.6";
22
+ const BUILD = "0.2.8";
23
23
 
24
24
  /* 每个模块的注册各套一层 guard:失败只记 warn(座位/模块失败模式是「静默消失」,
25
25
  必须主动吭声;但不能让一个模块的异常打断同文件里其它模块的 apply)。 */
@@ -2586,6 +2586,19 @@ window.__ModuleLoader__.load({
2586
2586
  busy: "正在更新", unchanged: "暂缓更新", unconfirmed: "未能确认", fail: "更新失败",
2587
2587
  cooling: "冷静期中"
2588
2588
  };
2589
+ /* 等宽前提:标签必须是 4 个汉字(汉字是方块字,等字数即等宽)。
2590
+ 改文案时破例就吭声 —— 标签会因此参差,或需要同步调 .tag 的 min-width。 */
2591
+ try {
2592
+ var oddTags = [];
2593
+ for (var tagKey in TAG_TEXT) {
2594
+ if (!/^[\u4e00-\u9fff]{4}$/.test(TAG_TEXT[tagKey])) { oddTags.push(tagKey + "=" + TAG_TEXT[tagKey]); }
2595
+ }
2596
+ if (!/^[\u4e00-\u9fff]{4}$/.test("手动更新")) { oddTags.push("self=手动更新"); }
2597
+ if (oddTags.length > 0) {
2598
+ console.warn("[dsh-ui-tweaks:" + BUILD + "] 标签不是 4 个汉字,等宽排版会受影响:" + oddTags.join("、"));
2599
+ }
2600
+ } catch (e0) {}
2601
+
2589
2602
  /* engines.dsh 原样比较符(如 ">=0.2.3-alpha.2");展示时不要和「≥」重复 */
2590
2603
  function dshRequirementText(req) {
2591
2604
  var s = String(req || "").trim();
@@ -3246,12 +3259,25 @@ window.__ModuleLoader__.load({
3246
3259
  ② 该回合根本没有 workspace/changes 公告。这两处才由本卡补位,外观尽量贴官方:
3247
3260
  类名不硬编码(hash 每版会变),运行时从官方注入的 CSS module <style> 里读出前缀。 */
3248
3261
  var officialClassCache = null;
3262
+ var officialClassFailedAt = 0;
3249
3263
  function officialChangesClasses() {
3250
- if (officialClassCache !== null) { return officialClassCache; }
3264
+ if (officialClassCache) { return officialClassCache; }
3265
+ /* 失败不永久缓存:dev 工具关着时 ChangedFiles 的样式可能晚到(甚至被懒加载),
3266
+ 之前失败即定型,后续所有卡片都退回近似样式。2 秒后允许重试。 */
3267
+ if (officialClassCache === false && Date.now() - officialClassFailedAt < 2000) { return false; }
3251
3268
  officialClassCache = false;
3269
+ officialClassFailedAt = Date.now();
3252
3270
  try {
3253
3271
  var tag = document.querySelector("style[data-plugin-css$=\"ChangedFiles.module.css\"]");
3254
3272
  var text = tag && tag.textContent ? String(tag.textContent) : "";
3273
+ if (!text) {
3274
+ /* 样式标签 id 以后可能改名:退一步在所有插件样式表里找带 --changes-fill 的那份 */
3275
+ var all = document.querySelectorAll("style[data-plugin-css]");
3276
+ for (var ai = 0; ai < all.length; ai++) {
3277
+ var txt = all[ai].textContent ? String(all[ai].textContent) : "";
3278
+ if (txt.indexOf("--changes-fill") >= 0 && txt.indexOf("_card{") >= 0) { text = txt; break; }
3279
+ }
3280
+ }
3255
3281
  var hit = /\.([A-Za-z0-9_-]{4,12})_card\b/.exec(text);
3256
3282
  if (!hit) { return officialClassCache; }
3257
3283
  var k = hit[1];
@@ -3269,7 +3295,7 @@ window.__ModuleLoader__.load({
3269
3295
  /* 读不到官方样式表时的近似样式(只影响观感,不影响结构/交互)。 */
3270
3296
  var CHANGES_FALLBACK_STYLES = {
3271
3297
  card: { marginTop: "4px", border: "0.5px solid var(--dsw-alias-border-l2, rgba(128,128,128,.3))", borderRadius: "var(--dsw-radius-lg, 8px)", background: "var(--dsw-alias-bg-layer-1, transparent)", display: "flex", flexDirection: "column", overflow: "hidden" },
3272
- header: { display: "flex", alignItems: "center", gap: "10px", width: "100%", boxSizing: "border-box", height: "60px", padding: "8px 10px", background: "var(--dsw-static-neutral-50, rgba(128,128,128,.08))", color: "inherit", textAlign: "left", border: "0", cursor: "pointer", font: "inherit" },
3298
+ header: { display: "flex", alignItems: "center", gap: "10px", width: "100%", boxSizing: "border-box", height: "60px", padding: "8px 10px", background: "rgba(128,128,128,.08)", background: "color-mix(in srgb, currentColor 6%, transparent)", color: "inherit", textAlign: "left", border: "0", cursor: "pointer", font: "inherit" },
3273
3299
  tile: { display: "grid", placeItems: "center", width: "40px", height: "40px", flex: "none", borderRadius: "10px", border: "0.5px solid var(--dsw-alias-border-l1, rgba(128,128,128,.25))" },
3274
3300
  titles: { display: "flex", flexDirection: "column", flex: "1", minWidth: "0" },
3275
3301
  title: { fontSize: "13px", fontWeight: 500, lineHeight: "20px", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" },
@@ -3359,9 +3385,12 @@ window.__ModuleLoader__.load({
3359
3385
  if (officialMayRender && probe !== "missing") { return null; }
3360
3386
 
3361
3387
  /* 数据直接复用模块 5b 的入口:保证卡片上的数字/hunk 与喂给官方卡的完全是同一份
3362
- (官方口径 = 回合首末净变化),不另算一套。无公告的回合用合成坐标 0 供 Review 取数。 */
3388
+ (官方口径 = 回合首末净变化),不另算一套。无公告的回合用「偏移 + 轮号」的合成坐标,
3389
+ 每轮唯一(旧实现统一用 0,同一会话里多个无公告回合会互相覆盖,Review 串轮)。 */
3363
3390
  var turnNumber = (owner.turn && typeof owner.turn.turn === "number") ? owner.turn.turn : null;
3364
- var seqForReview = seq != null ? seq : 0;
3391
+ var seqForReview = seq != null
3392
+ ? seq
3393
+ : (turnNumber != null ? SYNTH_SEQ_BASE + turnNumber : 0);
3365
3394
  try { registerChangesCoordinates(sessionId, seqForReview, state, turnNumber); } catch (e) {}
3366
3395
  var entry = changesEntryFor(sessionId, seqForReview);
3367
3396
  if (!entry || entry.files.length === 0) { return null; }
@@ -3568,6 +3597,11 @@ window.__ModuleLoader__.load({
3568
3597
  var ADAPTER_MAX_HUNK_LINES = 2000;
3569
3598
 
3570
3599
  var changesCoordinates = {}; /* "sessionId:seq" -> entry */
3600
+ /* 无 workspace/changes 公告的回合没有真实 seq,但官方 Review 地址要求 seq 是「非负整数」
3601
+ (parseChangesReviewAddress: /^\d+$/),负数会直接打不开。这里用「远高于真实事件序号的
3602
+ 偏移 + 轮号」合成一个唯一 seq:同一会话里每轮各不相同,官方查不到就自然回落到我们。 */
3603
+ var SYNTH_SEQ_BASE = 900000000; /* 真实事件 seq 量级 1e3~1e6,9e8 不可能撞上 */
3604
+ var CHANGES_COORD_MAX = 300; /* 索引上限:超出后按插入序淘汰最早的条目 */
3571
3605
  var adapterInstalled = false;
3572
3606
  var adapterOriginalFetch = null;
3573
3607
  var adapterPatchedFetch = null;
@@ -3693,6 +3727,11 @@ window.__ModuleLoader__.load({
3693
3727
  var current = changesCoordinates[key];
3694
3728
  if (current && current.stateFiles === state.files && current.turn === turnNumber) { return; }
3695
3729
  changesCoordinates[key] = buildChangesEntry(sessionId, seq, turnNumber, state.files, changesCwdOf(sessionId));
3730
+ /* 长会话会把每个渲染过的回合都留在索引里(entry 含 parts/hunks),加个上限按插入序淘汰 */
3731
+ var keys = Object.keys(changesCoordinates);
3732
+ if (keys.length > CHANGES_COORD_MAX) {
3733
+ for (var ki = 0; ki < keys.length - CHANGES_COORD_MAX; ki++) { delete changesCoordinates[keys[ki]]; }
3734
+ }
3696
3735
  }
3697
3736
 
3698
3737
  function changesEntryFor(sessionId, seq) {
@@ -3753,24 +3792,42 @@ window.__ModuleLoader__.load({
3753
3792
  var needle = fragmentLines(fragment);
3754
3793
  if (needle.length === 0 || fileLines.length === 0) { return null; }
3755
3794
  if (fileLines.length > ANCHOR_MAX_FILE_LINES) { return null; }
3756
- var best = null, j, i;
3757
- for (j = 0; j < needle.length; j++) {
3758
- if (String(needle[j]).trim() === "") { continue; }
3759
- for (i = 0; i < fileLines.length; i++) {
3760
- if (fileLines[i] !== needle[j]) { continue; }
3761
- var len = 0, nonBlank = 0;
3762
- while (i + len < fileLines.length && j + len < needle.length && fileLines[i + len] === needle[j + len]) {
3763
- if (String(needle[j + len]).trim() !== "") { nonBlank += 1; }
3764
- len += 1;
3765
- }
3766
- if (nonBlank >= ANCHOR_MIN_LINES &&
3767
- (!best || nonBlank > best.nonBlank || (nonBlank === best.nonBlank && len > best.len))) {
3768
- best = { nonBlank: nonBlank, len: len, j: j, i: i };
3795
+ function bestRun(minLines) {
3796
+ var best = null, j, i;
3797
+ for (j = 0; j < needle.length; j++) {
3798
+ if (String(needle[j]).trim() === "") { continue; }
3799
+ for (i = 0; i < fileLines.length; i++) {
3800
+ if (fileLines[i] !== needle[j]) { continue; }
3801
+ var len = 0, nonBlank = 0;
3802
+ while (i + len < fileLines.length && j + len < needle.length && fileLines[i + len] === needle[j + len]) {
3803
+ if (String(needle[j + len]).trim() !== "") { nonBlank += 1; }
3804
+ len += 1;
3805
+ }
3806
+ if (nonBlank >= minLines &&
3807
+ (!best || nonBlank > best.nonBlank || (nonBlank === best.nonBlank && len > best.len))) {
3808
+ best = { nonBlank: nonBlank, len: len, j: j, i: i };
3809
+ }
3769
3810
  }
3770
3811
  }
3771
- }
3772
- if (!best) { return null; }
3773
- return best.i - best.j + 1; /* 片段首行对应的文件行号(1 基) */
3812
+ return best;
3813
+ }
3814
+ function occurrencesOf(line) {
3815
+ var n = 0;
3816
+ for (var k = 0; k < fileLines.length; k++) { if (fileLines[k] === line) { n += 1; } }
3817
+ return n;
3818
+ }
3819
+ /* 首选 ≥3 行连续匹配;片段被后续改动打散时退化:
3820
+ 2 行匹配且首行够长(≥8 字符),或 1 行「够长且全文件唯一」(≥24 字符)。
3821
+ 都是精确文本匹配,宁可不定位也不猜。 */
3822
+ var hit = bestRun(ANCHOR_MIN_LINES);
3823
+ if (hit) { return hit.i - hit.j + 1; }
3824
+ hit = bestRun(2);
3825
+ if (hit && String(needle[hit.j]).trim().length >= 8) { return hit.i - hit.j + 1; }
3826
+ hit = bestRun(1);
3827
+ if (hit && String(needle[hit.j]).trim().length >= 24 && occurrencesOf(needle[hit.j]) === 1) {
3828
+ return hit.i - hit.j + 1;
3829
+ }
3830
+ return null; /* 片段首行对应的文件行号(1 基);定位不了返回 null */
3774
3831
  }
3775
3832
  /* 逐个 hunk 定位:拿 hunk 的「新侧」(上下文 + 新增行)在文件里找连续落点,
3776
3833
  命中后 hunk 的起点就是文件行号;旧起点按「同段内此前的行差 + 本文件前面各段的行差」反推。
@@ -3828,7 +3885,11 @@ window.__ModuleLoader__.load({
3828
3885
  kind: "text", path: f.path, display: f.display,
3829
3886
  before: f.before, after: f.after, coarse: false, hunks: f.hunks
3830
3887
  };
3831
- return readTextFor(changesAbsPath(entry, f.path) || f.path).then(function (text) {
3888
+ /* 只有绝对路径才交给 host 读:相对路径会让 host 按它自己的 cwd 解析,
3889
+ 可能读到同名但不相干的文件(静默给出错行号,比不显示更糟)。 */
3890
+ var absPath = changesAbsPath(entry, f.path);
3891
+ if (!absPath) { return Promise.resolve({ payload: markUnaligned(base), aligned: false }); }
3892
+ return readTextFor(absPath).then(function (text) {
3832
3893
  if (!text) { return { payload: markUnaligned(base), aligned: false }; }
3833
3894
  var res = alignFileHunks(f, text);
3834
3895
  if (!res.hunks || res.hunks.length === 0) { return { payload: markUnaligned(base), aligned: false }; }
@@ -4053,7 +4114,13 @@ window.__ModuleLoader__.load({
4053
4114
  inject: function (sessionId) { return { sessionId: sessionId }; }
4054
4115
  }, changesCard);
4055
4116
  });
4056
- try { ctx.on("connection/reset", function () { probeCache = {}; rootTurn = {}; }); } catch (e) {}
4117
+ try {
4118
+ ctx.on("connection/reset", function () {
4119
+ probeCache = {};
4120
+ rootTurn = {};
4121
+ changesCoordinates = {}; /* 换连接后旧坐标(含合成 seq)一律作废,避免串轮 */
4122
+ });
4123
+ } catch (e) {}
4057
4124
  }
4058
4125
 
4059
4126
  /* 模块 8:改动审查默认单栏 -------------------------------------------------
package/lib/index.js CHANGED
@@ -744,6 +744,46 @@ function resolveRegistry() {
744
744
  return "https://registry.npmjs.org";
745
745
  }
746
746
 
747
+ /* 预检用的 packument 缓存:同一 registry+包名 10 分钟内复用(两步法更新常被连点)。
748
+ 只缓存元数据,tarball 是否可下载每次仍实测 —— 缓存命中不该掩盖镜像掉包。 */
749
+ const PREFLIGHT_DOC_CACHE = new Map();
750
+ const PREFLIGHT_DOC_TTL_MS = 10 * 60 * 1000;
751
+ const PREFLIGHT_DOC_MAX = 40;
752
+
753
+ async function registryPackument(registry, name) {
754
+ const key = registry + "|" + name;
755
+ const hit = PREFLIGHT_DOC_CACHE.get(key);
756
+ if (hit && Date.now() - hit.at < PREFLIGHT_DOC_TTL_MS) { return hit.doc; }
757
+ const path = String(name).split("/").map(encodeURIComponent).join("/");
758
+ const res = await fetch(registry + "/" + path, {
759
+ headers: { accept: "application/vnd.npm.install-v1+json, application/json" },
760
+ signal: AbortSignal.timeout(15000),
761
+ });
762
+ if (!res.ok) {
763
+ const err = new Error("registry-" + res.status);
764
+ err.code = "registry-" + res.status;
765
+ throw err;
766
+ }
767
+ const txt = await res.text();
768
+ if (txt.length > 16 * 1024 * 1024) {
769
+ const err = new Error("registry-too-large");
770
+ err.code = "registry-too-large";
771
+ throw err;
772
+ }
773
+ let doc;
774
+ try { doc = JSON.parse(txt); } catch {
775
+ const err = new Error("registry-invalid");
776
+ err.code = "registry-invalid";
777
+ throw err;
778
+ }
779
+ if (PREFLIGHT_DOC_CACHE.size >= PREFLIGHT_DOC_MAX) {
780
+ const oldest = PREFLIGHT_DOC_CACHE.keys().next().value;
781
+ if (oldest !== undefined) { PREFLIGHT_DOC_CACHE.delete(oldest); }
782
+ }
783
+ PREFLIGHT_DOC_CACHE.set(key, { at: Date.now(), doc });
784
+ return doc;
785
+ }
786
+
747
787
  /**
748
788
  * 更新前连通性预检:目标版本在 registry 上存在、tarball 能取到首字节。
749
789
  * 用途只有一个 —— 「先卸载再安装」的两步法更新前,先证明装得回来,
@@ -753,23 +793,24 @@ async function preflightSource(name, version) {
753
793
  const out = { ok: false, code: "", detail: "", version: "", tarball: "", registry: "" };
754
794
  const pkg = String(name || "").trim();
755
795
  if (!pkg) { out.code = "name-required"; return out; }
796
+ const registry = resolveRegistry();
797
+ out.registry = registry;
798
+ let doc;
799
+ try {
800
+ doc = await registryPackument(registry, pkg);
801
+ } catch (e) {
802
+ const code = String((e && e.code) || "");
803
+ if (code) { out.code = code; return out; }
804
+ out.code = "network";
805
+ out.detail = String((e && e.name) || (e && e.message) || e).slice(0, 160);
806
+ return out;
807
+ }
808
+ const want = String(version || (doc && doc["dist-tags"] && doc["dist-tags"].latest) || "");
809
+ const item = doc && doc.versions && doc.versions[want];
810
+ if (!item) { out.code = "version-missing"; out.version = want; return out; }
811
+ const tarball = (item.dist && item.dist.tarball) || "";
812
+ if (!tarball) { out.code = "tarball-missing"; out.version = want; return out; }
756
813
  try {
757
- const registry = resolveRegistry();
758
- out.registry = registry;
759
- const path = pkg.split("/").map(encodeURIComponent).join("/");
760
- const res = await fetch(registry + "/" + path, {
761
- headers: { accept: "application/vnd.npm.install-v1+json, application/json" },
762
- signal: AbortSignal.timeout(15000),
763
- });
764
- if (!res.ok) { out.code = "registry-" + res.status; return out; }
765
- const txt = await res.text();
766
- if (txt.length > 16 * 1024 * 1024) { out.code = "registry-too-large"; return out; }
767
- const doc = JSON.parse(txt);
768
- const want = String(version || (doc && doc["dist-tags"] && doc["dist-tags"].latest) || "");
769
- const item = doc && doc.versions && doc.versions[want];
770
- if (!item) { out.code = "version-missing"; out.version = want; return out; }
771
- const tarball = (item.dist && item.dist.tarball) || "";
772
- if (!tarball) { out.code = "tarball-missing"; out.version = want; return out; }
773
814
  const head = await fetch(tarball, {
774
815
  headers: { range: "bytes=0-0" },
775
816
  signal: AbortSignal.timeout(15000),
@@ -780,13 +821,13 @@ async function preflightSource(name, version) {
780
821
  out.tarball = tarball;
781
822
  return out;
782
823
  }
783
- out.ok = true; out.version = want; out.tarball = tarball;
784
- return out;
785
824
  } catch (e) {
786
825
  out.code = "network";
787
826
  out.detail = String((e && e.name) || (e && e.message) || e).slice(0, 160);
788
827
  return out;
789
828
  }
829
+ out.ok = true; out.version = want; out.tarball = tarball;
830
+ return out;
790
831
  }
791
832
 
792
833
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nimoxie/dsh-ui-tweaks",
3
- "version": "0.2.6",
3
+ "version": "0.2.8",
4
4
  "description": "dsh Web UI 微调合集:回合尾「本回合改动」卡在会话释放后仍按官方样式显示(用会话日志重建数据喂给官方卡)、宽表格越界修复、对话区左侧自绘滚动条、动画修复、插件更新检查面板、桌面端窗口记忆(不含 dsh 本体)",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",