Uh oh!
There was an error while loading. Please reload this page.
fix(plugin-tree): 补上 package.json files 已声明、但仓库里不存在的 LICENSE (#3647) - #3662
Merged
Conversation
…lready declares (#3647) `@object-ui/plugin-tree` lists "LICENSE" in package.json `files`, but packages/plugin-tree/LICENSE did not exist. npm silently skips missing `files` entries, so publish and CI both stayed green while every released tarball shipped without the MIT text its own manifest promised — the only one of 36 publishable packages in that state. The added file is a byte-identical copy of the repository root LICENSE (git blob cf2ca28), which is the exact same blob all 35 sibling packages already carry. Verified with `npm pack --dry-run` in packages/plugin-tree: before 3 files (no LICENSE), after 4 files including 1.1kB LICENSE. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GTRjn8xBqp75dk7kFupVRt
The latest updates on your projects. Learn more about Vercel for GitHub. |
This was referenced Aug 7, 2026
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
yinlianghui
marked this pull request as ready for review
August 7, 2026 17:44
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Aug 7, 2026
Closed
Merged
Closed
Merged
akarma-synetal pushed a commit
to akarma-synetal/objectui
that referenced
this pull request
Aug 10, 2026
…d READMEs carry (objectstack-ai#3664) (objectstack-ai#3695) `packages/plugin-tree/README.md` was the only one of the 38 published packages that had a README but no `## License` section. Census over origin/main: - 38 published (non-private) packages - 37 have a README (`sdui-parser` has none — out of scope, see objectstack-ai#3647) - 36 of those 37 carry `## License`; plugin-tree was the sole omission The section is copied verbatim from the dominant form, 32 of the 36: ## License MIT — see [LICENSE](./LICENSE). The four minority spellings are `MIT` (types, react-runtime) and `MIT © ObjectStack Inc.` (plugin-timeline, plugin-chatbot). The issue suggested plugin-timeline as the exemplar, but that form is 1-of-36 and carries no `./LICENSE` link at all — the majority form is both the convention and the one that gives the link gate something to check. Position matches too: final section, as in 34 of the 36 (plugin-view and types continue past it). This also closes the gap objectstack-ai#3664 identified: `check-doc-links.mjs` scan root 7 (`packages/*/README.md`, `disk` rule) resolves relative hrefs as repository paths, so the new `./LICENSE` link is now mechanically checked against the file PR objectstack-ai#3662 landed. Previously the README linked nothing, which is exactly why the objectstack-ai#3622/objectstack-ai#3649 dead-link sweep could not detect the missing LICENSE — no link, no dead link. Verified the new link is load-bearing rather than vacuously green: temporarily removing `packages/plugin-tree/LICENSE` turns the gate red with `packages/plugin-tree/README.md:50 -> ./LICENSE` (exit 1); restoring it returns `Links are valid across 7 scan roots` (exit 0). No changeset: documentation-only, matching the precedent of PR objectstack-ai#3662 (which added this same package's LICENSE, likewise shipped in the tarball) and PR objectstack-ai#3688 (36 package READMEs), neither of which carried one. Fixesobjectstack-ai#3664 Claude-Session: https://claude.ai/code/session_01GTRjn8xBqp75dk7kFupVRt Co-authored-by: Claude <noreply@anthropic.com>
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 freeto 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.
Fixes#3647
问题
@object-ui/plugin-tree的package.json在files里点名要打包LICENSE,但packages/plugin-tree/LICENSE根本不存在。npm 对files里缺失的条目是静默跳过的 —— 不报错、不警告,于是npm publish与 CI 一路绿灯,而每一个已发布的 tarball 都没有它自己 manifest 承诺要带的 MIT 许可证文本。在 origin/main 上实测 39 个包(38 个可发布 + 1 个 private),plugin-tree 是唯一「声明了 LICENSE 却没有该文件」的包:
privatefiles是否含 LICENSEplugin-treereact-runtime/sdui-parserfiles只有dist)vscode-extensionfilesreact-runtime/sdui-parser属于打包策略问题(要不要给所有已发布包补 LICENSE),issue 正文已把它与本单分开,本 PR 不碰。改动
只新增一个文件:
packages/plugin-tree/LICENSE。内容是仓根
LICENSE的逐字节副本。先实测过一致性 —— 根 LICENSE 与 35 个兄弟包的 LICENSE 共 36 份,在 git 里是同一个 blob:即连 copyright 行(
Copyright (c) 2024 ObjectQL)在内完全一致,不存在「多数形态 / 少数形态」的分歧。新增文件的 blob 哈希同为cf2ca28574caca42deafdee0ea935fc2e2823427。验收:
npm pack --dry-run前后对照验收标准不是「文件存在」,而是它确实进入 tarball 清单。在
packages/plugin-tree/下实测:修改前(预测:清单无 LICENSE — 命中):
修改后(预测:LICENSE 进入清单 — 命中):
total files3 → 4,unpacked size25.5 kB → 26.5 kB。两点说明,免得清单读起来有歧义:
dist/,是因为这是一棵全新 worktree、该包尚未构建。这不影响本次验收 —— npm 对 LICENSE 的收录与dist是否存在互相独立。plugin-timeline跑同一条命令,清单里是有1.1kB LICENSE的 —— 证明差异来自文件本身的有无,而不是命令或环境。补充一条 npm 语义:
LICENSE属于 npm 无视files也总是收录的文件之一,所以files里那条"LICENSE"声明本身是冗余但无害的;真正的修复就是把文件补上,不需要动package.json(本 PR 也确实没动)。关于 changeset:判定为不加,依据如下
README.md,README 同样在各包files里、同样改变 tarball 内容,该 PR 未加 changeset。.changeset/config.json把 39 个包放在同一个fixed组,任何一个 changeset 都会带着 plugin-tree 一起 bump 并重新发布。当前已有 16 个待发 changeset,下一次发版本就会把这份 LICENSE 带上 npm —— 不需要本 PR 自带 changeset 来触发。历史上唯一一个新增
packages/*/LICENSE的提交是仓库初始导入(30ac2e1,一次性加入全部文件),不构成单包补 LICENSE 的先例。顺带发现(未在本 PR 处理,已另行开单)
README.md是 38 个已发布包里唯一没有## License小节的 —— 也正因如此,check-doc-links 扫描面第四扩 packages/*/README.md:入场价是另外 11 条死链(实测),不是 #3603 正文的 9 条 #3622/feat(scripts): check-doc-links 扫描面第四扩 packages/*/README.md,并付清入场价的 11 条死链 (#3622) #3649 那轮针对packages/*/README.md的死链扫描发现不了这个缺失(它连指向./LICENSE的链接都没有,自然没有死链可查)。files里声明的条目在磁盘上真实存在」或「已发布包都带 LICENSE」。这正是本缺陷能长期静默存在的原因。🤖 Generated with Claude Code
https://claude.ai/code/session_01GTRjn8xBqp75dk7kFupVRt
Generated by Claude Code