Skip to content

Commit 2e836de

Browse files
os-zhuangclaude
andauthored
chore(packaging): CHANGELOG.md ships in every npm tarball (#4261) (#4297)
AGENTS.md's post-task checklist requires breaking changesets to carry their FROM -> TO migration because "this text ships to consumers as CHANGELOG.md inside the npm package and is what an upgrading agent greps after the tombstone error." That delivery path was severed for 68 of the 69 publishable packages: npm packs package.json / README* / LICENSE* unconditionally but -- unlike older npm versions -- not CHANGELOG.md, and the canonical ["dist", "README.md"] whitelist never named it. Measured on npm 10.9.7: npm pack --dry-run on @objectstack/types shipped 3 files while its 70KB CHANGELOG.md stayed behind. Only @objectstack/spec listed it explicitly. The tombstone scenario is precisely the one where the repo is out of reach -- the upgrading agent has node_modules and nothing else -- so the migration text has to ride in the tarball (#4261's direction 1: make the convention true rather than rewrite it). Every publishable package now declares CHANGELOG.md in `files`, and check:published-files gains a fifth invariant, COMPLETE: a whitelist that fails to cover CHANGELOG.md fails the always-required lint job, so the next package cannot silently sever the path again. CHANGELOG.md joins the canonical set (["dist", "README.md", "CHANGELOG.md"]), which dissolves @objectstack/spec's per-package EXTRA_ENTRIES exemption for it. Verified: --self-test (21 pattern + 11 classification cases, three new pinning the shapes COMPLETE resolves through); the full check green over 69 packages; removing the entry from one package fails the gate with the #4261 story and the one-line fix; npm pack --dry-run on @objectstack/types now lists the 70.8KB CHANGELOG.md. Closes #4261. Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
1 parent 820eff9 commit 2e836de

70 files changed

Lines changed: 287 additions & 84 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
---
2+
"@objectstack/account": patch
3+
"@objectstack/cli": patch
4+
"@objectstack/client": patch
5+
"@objectstack/client-react": patch
6+
"@objectstack/cloud-connection": patch
7+
"@objectstack/connector-mcp": patch
8+
"@objectstack/connector-openapi": patch
9+
"@objectstack/connector-rest": patch
10+
"@objectstack/connector-slack": patch
11+
"@objectstack/console": patch
12+
"@objectstack/core": patch
13+
"@objectstack/driver-memory": patch
14+
"@objectstack/driver-mongodb": patch
15+
"@objectstack/driver-sql": patch
16+
"@objectstack/driver-sqlite-wasm": patch
17+
"@objectstack/embedder-openai": patch
18+
"@objectstack/formula": patch
19+
"@objectstack/hono": patch
20+
"@objectstack/knowledge-memory": patch
21+
"@objectstack/knowledge-ragflow": patch
22+
"@objectstack/lint": patch
23+
"@objectstack/mcp": patch
24+
"@objectstack/metadata": patch
25+
"@objectstack/metadata-core": patch
26+
"@objectstack/metadata-fs": patch
27+
"@objectstack/metadata-protocol": patch
28+
"@objectstack/objectql": patch
29+
"@objectstack/observability": patch
30+
"@objectstack/platform-objects": patch
31+
"@objectstack/plugin-approvals": patch
32+
"@objectstack/plugin-audit": patch
33+
"@objectstack/plugin-auth": patch
34+
"@objectstack/plugin-dev": patch
35+
"@objectstack/plugin-email": patch
36+
"@objectstack/plugin-hono-server": patch
37+
"@objectstack/plugin-pinyin-search": patch
38+
"@objectstack/plugin-reports": patch
39+
"@objectstack/plugin-security": patch
40+
"@objectstack/plugin-sharing": patch
41+
"@objectstack/plugin-webhooks": patch
42+
"@objectstack/rest": patch
43+
"@objectstack/runtime": patch
44+
"@objectstack/sdui-parser": patch
45+
"@objectstack/service-analytics": patch
46+
"@objectstack/service-automation": patch
47+
"@objectstack/service-cache": patch
48+
"@objectstack/service-cluster": patch
49+
"@objectstack/service-cluster-redis": patch
50+
"@objectstack/service-datasource": patch
51+
"@objectstack/service-i18n": patch
52+
"@objectstack/service-job": patch
53+
"@objectstack/service-knowledge": patch
54+
"@objectstack/service-messaging": patch
55+
"@objectstack/service-package": patch
56+
"@objectstack/service-queue": patch
57+
"@objectstack/service-realtime": patch
58+
"@objectstack/service-settings": patch
59+
"@objectstack/service-sms": patch
60+
"@objectstack/service-storage": patch
61+
"@objectstack/setup": patch
62+
"@objectstack/studio": patch
63+
"@objectstack/trigger-api": patch
64+
"@objectstack/trigger-record-change": patch
65+
"@objectstack/trigger-schedule": patch
66+
"@objectstack/types": patch
67+
"@objectstack/verify": patch
68+
"create-objectstack": patch
69+
"objectstack-vscode": patch
70+
---
71+
72+
chore(packaging): CHANGELOG.md ships in every npm tarball (#4261)
73+
74+
The AGENTS.md post-task checklist requires breaking changesets to carry their
75+
FROM → TO migration because "this text ships to consumers as `CHANGELOG.md`
76+
inside the npm package and is what an upgrading agent greps after the tombstone
77+
error." That delivery path was severed for 68 of the 69 publishable packages:
78+
npm packs `package.json` / `README*` / `LICENSE*` unconditionally but — unlike
79+
older npm versions — not `CHANGELOG.md`, and the canonical
80+
`"files": ["dist", "README.md"]` whitelist never named it. Measured on npm
81+
10.9.7: `npm pack --dry-run` on `@objectstack/types` shipped 3 files while its
82+
70KB `CHANGELOG.md` stayed behind. Only `@objectstack/spec` listed it
83+
explicitly.
84+
85+
The tombstone-error scenario is precisely the one where the repo is out of
86+
reach — the upgrading agent has `node_modules` and nothing else — so the
87+
migration text has to ride in the tarball. Every publishable package now
88+
declares `CHANGELOG.md` in `files`, and the canonical whitelist is
89+
`["dist", "README.md", "CHANGELOG.md"]`.
90+
91+
The other half is the gate: `check:published-files` gains a fifth invariant,
92+
COMPLETE — a whitelist that fails to cover `CHANGELOG.md` fails the
93+
always-required lint job, so the next package cannot silently sever the path
94+
again. `@objectstack/spec`'s per-package EXTRA_ENTRIES exemption dissolves
95+
into the canonical set.
96+
97+
Consumer-visible change: one more file per install (the package's changelog,
98+
e.g. 70.8KB for `@objectstack/types`), and `grep -r "removed key"
99+
node_modules/@objectstack/*/CHANGELOG.md` now finds the migration it was
100+
promised.

packages/adapters/hono/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@
5151
},
5252
"files": [
5353
"dist",
54-
"README.md"
54+
"README.md",
55+
"CHANGELOG.md"
5556
],
5657
"engines": {
5758
"node": ">=22.0.0"

packages/apps/account/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@
4343
},
4444
"files": [
4545
"dist",
46-
"README.md"
46+
"README.md",
47+
"CHANGELOG.md"
4748
],
4849
"engines": {
4950
"node": ">=22.0.0"

packages/apps/setup/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@
4343
},
4444
"files": [
4545
"dist",
46-
"README.md"
46+
"README.md",
47+
"CHANGELOG.md"
4748
],
4849
"engines": {
4950
"node": ">=22.0.0"

packages/apps/studio/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@
4343
},
4444
"files": [
4545
"dist",
46-
"README.md"
46+
"README.md",
47+
"CHANGELOG.md"
4748
],
4849
"engines": {
4950
"node": ">=22.0.0"

packages/cli/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,8 @@
124124
},
125125
"files": [
126126
"dist",
127-
"README.md"
127+
"README.md",
128+
"CHANGELOG.md"
128129
],
129130
"engines": {
130131
"node": ">=22.0.0"

packages/client-react/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@
4747
},
4848
"files": [
4949
"dist",
50-
"README.md"
50+
"README.md",
51+
"CHANGELOG.md"
5152
],
5253
"engines": {
5354
"node": ">=22.0.0"

packages/client/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@
5151
},
5252
"files": [
5353
"dist",
54-
"README.md"
54+
"README.md",
55+
"CHANGELOG.md"
5556
],
5657
"engines": {
5758
"node": ">=22.0.0"

packages/cloud-connection/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@
4949
},
5050
"files": [
5151
"dist",
52-
"README.md"
52+
"README.md",
53+
"CHANGELOG.md"
5354
],
5455
"engines": {
5556
"node": ">=22.0.0"

packages/connectors/connector-mcp/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
],
3939
"files": [
4040
"dist",
41-
"README.md"
41+
"README.md",
42+
"CHANGELOG.md"
4243
]
4344
}

0 commit comments

Comments
 (0)