Skip to content

Commit bccdf6c

Browse files
committed
refactor(metadata): drop the dead @objectstack/platform-objects dependency
The retired `adr-0030-notification-event` migration runner was the only consumer. Nothing under `packages/metadata/src` carries a `@objectstack/platform-objects` specifier any more, so the manifest declared an edge the package no longer has. Removed together, because all three exist only to serve that one dead edge: - `package.json` — the `dependencies` entry - `vitest.config.ts` — the `@objectstack/platform-objects/system` alias, whose own comment cited the retired migration's receipt cases as its reason - `tsconfig.json` — the matching `paths` mapping `pnpm-lock.yaml` travels in this commit, regenerated with `pnpm install --lockfile-only` rather than hand-edited. Its entire diff is the three lines of the one removed edge under the `packages/metadata` importer; a manifest edit without it fails `ERR_PNPM_OUTDATED_LOCKFILE` at every job's install step. Dropping a published package's dependency is a public-surface change, so it was established rather than assumed that nothing resolves it through this package: - `@objectstack/metadata`'s built `dist/` (30 files, 10 declaration files) contains ZERO occurrences of `platform-objects`, against a positive control in which all nine other declared dependencies appear in 4-12 dist files each. No runtime import and no type reference reaches it. - Of the 23 workspace packages carrying a real `@objectstack/platform-objects` module specifier, all 23 declare it themselves; zero resolve it transitively. `check:undeclared-dep-imports` is the standing gate that keeps that true for non-test `src/**`. - Zero example apps reference it at all. `@objectstack/platform-objects` publishes on its own, so a consumer that wants it declares it directly — the supported spelling, unchanged. Claude-Session: https://claude.ai/code/session_01DvvamiacK328idtBYJBxV3 Co-authored-by: Claude <noreply@anthropic.com>
1 parent 797caf0 commit bccdf6c

5 files changed

Lines changed: 40 additions & 20 deletions

File tree

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
'@objectstack/metadata': patch
3+
---
4+
5+
`@objectstack/metadata` no longer declares `@objectstack/platform-objects`.
6+
7+
The dependency was the retired `adr-0030-notification-event` migration runner's,
8+
and that runner was its only consumer. Nothing under `packages/metadata/src`
9+
carries a `@objectstack/platform-objects` specifier any more, so the declaration
10+
described an edge the package no longer has. The two test-tooling entries that
11+
existed only to serve it go with it: the `@objectstack/platform-objects/system`
12+
alias in `vitest.config.ts` (whose comment still cited the retired migration's
13+
receipt cases as its reason) and the matching `paths` mapping in `tsconfig.json`.
14+
15+
## What an installing consumer should check
16+
17+
⚠️ This is a **published** package dropping a declared dependency, so it changes
18+
what an install tree contains, not just what this repo builds. If you import
19+
`@objectstack/platform-objects` **without declaring it**, and it resolved for you
20+
only because `@objectstack/metadata` hoisted it, that resolution is gone — the
21+
fix is one line, and it is the supported spelling either way:
22+
23+
```
24+
pnpm add @objectstack/platform-objects # or npm/yarn equivalent
25+
```
26+
27+
`@objectstack/platform-objects` is published on its own and is unchanged by this;
28+
nothing is renamed, removed or re-exported.
29+
30+
⛔ Nothing `@objectstack/metadata` itself ships is affected. Measured rather than
31+
asserted: its built `dist/` (30 files, 10 declaration files) carries **zero**
32+
occurrences of `platform-objects`, against a positive control in which all nine
33+
of its other declared dependencies appear in four to twelve dist files each. No
34+
runtime import and no type reference reaches it, so no consumer can arrive at it
35+
through anything this package publishes.
36+
37+
Grade `patch`, measured rather than defaulted: no export moves, no accept-set
38+
widens, no runtime behaviour changes. Not `skip-changeset` either — `package.json`
39+
is shipped by `npm pack`, and a consumer's install tree is what changes.

packages/metadata/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@
8383
"@objectstack/core": "workspace:*",
8484
"@objectstack/metadata-core": "workspace:*",
8585
"@objectstack/metadata-fs": "workspace:*",
86-
"@objectstack/platform-objects": "workspace:*",
8786
"@objectstack/spec": "workspace:*",
8887
"@objectstack/types": "workspace:*",
8988
"chokidar": "^5.0.0",

packages/metadata/tsconfig.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@
1313
"types": [
1414
"node",
1515
"js-yaml"
16-
],
17-
"paths": {
18-
"@objectstack/platform-objects/system": ["../platform-objects/src/system/index.ts"]
19-
}
16+
]
2017
}
2118
}

packages/metadata/vitest.config.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -43,18 +43,6 @@ export default defineConfig({
4343
replacement: path.join(path.resolve(__dirname, '..'), 'spec/src/$1/index.ts'),
4444
},
4545
{ find: /^@objectstack\/spec$/, replacement: path.resolve(__dirname, '../spec/src/index.ts') },
46-
// [#16100] The deployment-ledger writer/reader pair the notification-event
47-
// migration's receipt cases drive (`attestFreshDatastore` seeds the
48-
// fresh-store row, `isDataMigrationVerified` reads the verdict back). The
49-
// entry is ANCHORED on the subpath rather than spelled bare: this package
50-
// publishes a FILE-shaped subpath (`./plugin`), so a bare prefix rule with
51-
// a file replacement would resolve `…/system` to
52-
// `…/platform-objects/src/index.ts/system` — ENOTDIR at run time, from a
53-
// config that reads as correct.
54-
{
55-
find: /^@objectstack\/platform-objects\/system$/,
56-
replacement: path.resolve(__dirname, '../platform-objects/src/system/index.ts'),
57-
},
5846
// Subpath BEFORE the bare package, same prefix-match reason: `./node` is a
5947
// published subpath served by a FILE (`types/src/node.ts` — the node-only slice
6048
// the root export deliberately excludes), so the bare entry would resolve it to

pnpm-lock.yaml

Lines changed: 0 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)