merge #1020: fix: export the plugin icon subpath

# Conflicts:
#	CHANGELOG.md
This commit is contained in:
Menghuan1918 committed 2026-10-26 15:02:36 +08:00
commit 01f126e866
4 files changed
+7 -3

No files matched your search

+1
View File
@@ -21,6 +21,7 @@
### v0.28.0
- **[#1013] 超过 1000 个分支/远程跟踪引用时仍可访问提交历史**:界面显示明确标注的提交列表,保留提交选择与详情。列表读取本地分支、远程分支和当前 HEAD;分页通过 Git 引用、HEAD 与 shallow 边界的状态指纹校验,状态变化时要求刷新。引用输出上限为 8 MiB,引用数量上限为 100,000,shallow 元数据上限为 1 MiB。
- **导出插件图标子路径**:增加 `dsh-better-sidebar/icon` 包入口,方便其他包按 `exports` 规则读取 `icon.svg`。
- **正式版支持线前移到 DSH 0.2.1-rc.1+**:13 条 DSH peer 下限统一为 `^0.2.1-rc.1`,开发依赖、CI 与安装脚本使用精确 RC 基线。不新增运行时兼容层、不改功能实现。
- **沿用已发布 alpha 的功能**:上游 alpha.5 → rc.1 完整源码树差异共 355 项,全部为 `package.json`,源码零变化;本次仅同步版本、依赖声明与文档。伴随依赖调整为 Cordis peer `^4.0.5` / dev `4.0.5`、group `1.0.5`、schemastery `~3.18.5`,include 保持 `1.0.10`。
- **发布渠道切换至 npm `latest`**:插件 v0.28.0 即将接管 `latest`,现有 workflow 按正式版本号自动选择该标签,无需修改。**宿主 npm `latest` 此时仍是 0.2.0-rc.2,不能安装本版**;该宿主必须固定插件 **v0.26.1**。DSH 0.2.1-alpha.5 用户固定 **v0.28.0-alpha.0**;0.2.0-rc.1、0.1.7 及更早支持线保持原指引。用户已明确接受两个包的 `latest` 不对齐风险。
+1
View File
@@ -6,6 +6,7 @@
### v0.28.0
- **Export the plugin icon subpath**: add the `dsh-better-sidebar/icon` package entry so other packages can resolve `icon.svg` through `exports`.
- **Stable plugin support moves to DSH 0.2.1-rc.1+**: all 13 DSH peer floors are `^0.2.1-rc.1`; development dependencies, CI and installers pin the exact RC baseline. No runtime compatibility layer or feature implementation changes are introduced.
- **Retain the published alpha's functionality**: the upstream alpha.5 → rc.1 full source-tree diff contains 355 files, all `package.json`, with no source changes. This release updates versions, dependency declarations and documentation only. Companion versions are Cordis peer `^4.0.5` / dev `4.0.5`, group `1.0.5`, schemastery `~3.18.5`, and unchanged include `1.0.10`.
- **Move to npm `latest`**: v0.28.0 will take over the plugin's `latest` tag through the existing stable-version workflow; no workflow change is needed. **DSH's own `latest` still points to 0.2.0-rc.2 and cannot run this release**: pin plugin **v0.26.1** on that host. DSH 0.2.1-alpha.5 users pin **v0.28.0-alpha.0**; earlier support-line guidance is unchanged. The user explicitly accepted the independent tags' compatibility risk.
+1
View File
@@ -30,6 +30,7 @@
"default": "./lib/client.js"
},
"./src/*": "./src/*",
"./icon": "./icon.svg",
"./package.json": "./package.json",
"./locale/*.json": "./locale/*.json"
},
+4 -3
View File
@@ -63,9 +63,10 @@ describe('DSH plugin presentation metadata', () => {
expect(pkg.files!).toContain(`${LOCALE_DIR}/*.json`)
})
it('exposes the locale documents and the manifest through exports', () => {
// `${name}/locale/<file>` is how readPluginMeta resolves a translation,
// and `${name}/package.json` is how it reads the icon declaration.
it('exposes the icon, locale documents and manifest through exports', () => {
// DSH 通过 `${name}/locale/<file>` 读取翻译,并通过 `${name}/package.json` 读取图标声明。
// 其他消费者可以通过 `${name}/icon` 获取插件图标。
expect(pkg.exports?.['./icon'], 'exports["./icon"]').toBe('./icon.svg')
expect(pkg.exports?.['./locale/*.json'], 'exports["./locale/*.json"]').toBe('./locale/*.json')
expect(pkg.exports?.['./package.json'], 'exports["./package.json"]').toBe('./package.json')
})