Repository navigation
chore: publish under the @dsh-labs scope - #3
Merged
Merged
Conversation
Pin devDependencies to the 0.2.2-rc.2 release (npm `next`), add it to the contract matrix in front of 0.2.2-rc.1 and 0.2.1-rc.5, and record pnpm 11's version-pinned minimumReleaseAge exemptions so --frozen-lockfile installs resolve those packages locally and in CI. No source change: the keyed `tool.call.toolview` slot declaration, its ToolCallOwnerProps/ToolCallCommonProps fields, ToolResultNode, useCodeHighlighter and languageForPath are identical in rc.1 and rc.2. peerDependencies and engines.dsh keep `>=0.2.1-rc.5 <0.3.0-0` so the plugin still installs on either release. Bump to 0.1.1 and add release notes for the tag-driven publish.
The unscoped `dsh-code-highlight` name on npm belongs to an unrelated project, so `npm publish` of v0.1.1 was rejected with 403 after provenance signing. Publish as `@dsh-labs/dsh-code-highlight` instead; the version stays 0.1.1 because 0.1.1 never reached the registry. - package.json: name -> @dsh-labs/dsh-code-highlight (repository URLs keep the dsh-labs/dsh-code-highlight GitHub name). - tsdown.config.ts: the client bundle's `__ModuleLoader__` id is the module-table key, which equals the package name, so it carries the scope. - cordis.patch.yml: `name` is the module specifier and takes the scoped package name; the entry `id` stays `dsh-code-highlight` so existing profile rows keep resolving. - README + v0.1.1 release notes: scoped install command and rename note. No `src/` change. Verified: install --frozen-lockfile, typecheck, build, 35/35 tests, contract 180 checks over three DSH releases, reproducible build, `npm pack --dry-run` yields @dsh-labs/dsh-code-highlight 0.1.1 with the same 14 files.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
dsh-code-highlight这个 npm 包名已被别人的项目占用(v1.1.0,维护者 kxfz,仓库 scientificmaniac/dsh-code-highlight,内容是报告用代码高亮)。推送v0.1.1tag 后npm publish在 provenance 签名成功之后返回 403(无发布权限)。因此改为 scoped 包@dsh-labs/dsh-code-highlight后重新发布;GitHub 仓库名不变。改了什么(5 个文件,
src/一行未改,版本仍是 0.1.1)0.1.1从未进入 registry,所以不需要再抬版本。package.jsonname→@dsh-labs/dsh-code-highlightrepository/homepage/bugs仍指向dsh-labs/dsh-code-highlight仓库(仓库名不变),publishConfig.access: public已满足 scoped 包的公开发布要求tsdown.config.ts__ModuleLoader__.load({ id })→ scoped 名id是模块表 key,DSH 的 boot graph 里「Entry name == package name」(@deepseek-ai/dsh-client-modules的WebBootEntry.id/BootModuleRow.id文档原文),id 与包名不一致会导致 factory 注册 key 对不上、插件无法 materialize。现网 scoped 插件同此约定:@xmanrui/dsh-im的 bundle 里id: "@xmanrui/dsh-im",kivotos里id: "kivotos"cordis.patch.ymlname→ scoped 名name是解析插件的模块 specifier,必须等于包名;id保持dsh-code-highlight(它是配置树行标识,不是包名,保持稳定可让已有 profile 里的行/覆盖继续命中)README.mddsh plugin --profile desktop add @dsh-labs/dsh-code-highlight.github/release-notes/v0.1.1.mdscripts/contract.mjs里的/tmp/dsh-code-highlight-contract只是本机临时缓存目录名,不是包引用,未改。pnpm-lock.yaml不含包名(单包 workspace,importer 只有.),确认无需改动:pnpm install --frozen-lockfile直接通过。验证(全部真跑)
发布流程校验(改 scope 后仍然成立)
按
release.yml逐步模拟:node -p 'require("./package.json").version'=0.1.1,与 tagv0.1.1比对 OK(逻辑只比版本号,与包名无关)。node scripts/check-release-notes.mjs v0.1.1OK(四标题顺序不变)。npm pack --silent | tail -n 1→dsh-labs-dsh-code-highlight-0.1.1.tgz,后续npm publish "$file"与gh release create ... "$file"都用这个文件名,不受 scope 影响(npm 会把 scope 压成dsh-labs-前缀)。publishConfig: {access: public, provenance: true}已就位;0.1.1非预发布 → 发布到latest。本次未推 tag、未执行 npm publish,合并后由你处理。
合并后需要人工确认的两点
dsh-labs组织是否存在、NPM_TOKEN对应账号是否对其有发布权限(本地无法验证)。file:.../dsh-code-highlight-0.1.0.tgz换成@dsh-labs/dsh-code-highlight@0.1.1(发布之后;在那之前只能继续用本地 tgz)。