|
| 1 | +--- |
| 2 | +"@objectstack/formula": patch |
| 3 | +"@objectstack/sdui-parser": patch |
| 4 | +"@objectstack/connector-mcp": patch |
| 5 | +"@objectstack/connector-openapi": patch |
| 6 | +"@objectstack/connector-rest": patch |
| 7 | +"@objectstack/connector-slack": patch |
| 8 | +"@objectstack/embedder-openai": patch |
| 9 | +"@objectstack/knowledge-memory": patch |
| 10 | +"@objectstack/knowledge-ragflow": patch |
| 11 | +"@objectstack/plugin-approvals": patch |
| 12 | +"@objectstack/plugin-email": patch |
| 13 | +"@objectstack/plugin-pinyin-search": patch |
| 14 | +"@objectstack/plugin-reports": patch |
| 15 | +"@objectstack/plugin-sharing": patch |
| 16 | +"@objectstack/plugin-webhooks": patch |
| 17 | +"@objectstack/service-cluster": patch |
| 18 | +"@objectstack/service-cluster-redis": patch |
| 19 | +"@objectstack/service-datasource": patch |
| 20 | +"@objectstack/service-sms": patch |
| 21 | +"@objectstack/trigger-api": patch |
| 22 | +--- |
| 23 | + |
| 24 | +chore(packaging): 20 packages stop publishing their sources, tests and build tooling (#4248) |
| 25 | + |
| 26 | +These 20 packages declared no `files` field, so npm fell back to packing the |
| 27 | +whole package directory. `npm pack --dry-run` on `@objectstack/plugin-webhooks` |
| 28 | +listed **21 files** — 15 under `src/`, three of them unit tests |
| 29 | +(`auto-enqueuer.test.ts`, `bootstrap-declared-webhooks.test.ts`, …), plus the |
| 30 | +build-time `scripts/i18n-extract.config.ts`. `dist/` lands on top of that at |
| 31 | +publish time rather than instead of it, so consumers were installing the |
| 32 | +TypeScript sources and the test suite alongside the artifact they asked for. |
| 33 | + |
| 34 | +Each now declares `"files": ["dist", "README.md"]`, matching the 29 packages |
| 35 | +that already did. Nothing a consumer imports moves: every `main` / `types` / |
| 36 | +`exports` target in all 20 already resolved inside `dist/`, which the new |
| 37 | +`check:published-files` guard verifies rather than assumes. The visible change |
| 38 | +is a smaller install and a smaller dependency-scanning surface — `npm pack` on |
| 39 | +`@objectstack/plugin-webhooks` now yields 2 files plus `dist/`. |
| 40 | + |
| 41 | +The other half of the fix is the gate. Half the packages declaring `files` and |
| 42 | +half not was the #3786 shape — a hand-copied convention with nothing enforcing |
| 43 | +it, where whoever forgets the line gets no signal at all. `check:published-files` |
| 44 | +(new, wired into the always-required `lint` job) holds every non-private |
| 45 | +workspace package to four invariants: `files` is **declared**; it is |
| 46 | +**sufficient** (covers every entry point, so tightening a whitelist cannot ship |
| 47 | +a package that fails to resolve); it is **minimal** (admits no test, test-harness |
| 48 | +config or build script); and anything beyond `dist` + `README.md` is |
| 49 | +**registered** with a reason, reconciled in both directions so a stale exemption |
| 50 | +is an error rather than dead text. `@objectstack/spec` is the one package with |
| 51 | +registered extras — its `.zod.ts` sources, JSON Schemas, liveness ledgers and |
| 52 | +`CHANGELOG.md` are product, not build input. |
| 53 | + |
| 54 | +This also closes an assumption #4206 was resting on. Excluding `<pkg>/scripts/**` |
| 55 | +from the docs-drift implementation test is sound only while no package publishes |
| 56 | +`scripts/` as runtime code; that held, but it held because someone read all three |
| 57 | +offenders by hand. It is now checked on every PR. |
0 commit comments