Skip to content

Commit 521b625

Browse files
hotlongclaude
andcommitted
chore(changeset): the CLI console manifest fallback is a narrowing (minor, migration to box), and the one-producer note reads the file the way the CLI now does
Claude-Session: https://claude.ai/code/session_local_1d2a197c-c20e-4e90-9be8-413d4d432289 Co-authored-by: Claude <noreply@anthropic.com>
1 parent 76284b1 commit 521b625

2 files changed

Lines changed: 48 additions & 5 deletions

File tree

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
'@objectstack/cli': minor
3+
---
4+
5+
fix(cli)!: a project with no `sdui.manifest.json` of its own has its `kind: 'html'` pages checked against the manifest `@objectstack/console` ships, so `div` and every other undeclared tag or prop is refused (#19922)
6+
7+
Clause-②: no (narrowing)
8+
9+
<!-- adr-0087: not-required (no-migration-prescription) Nothing authorable is removed, renamed or reshaped: no spec key, no export, no stored row. The CLI's JSX page gate now reads the component manifest the console package already ships, so an html page's source is judged against a vocabulary it was never judged against. `objectstack migrate meta` does not rewrite page source, and the refusal names the page and the tag; for `div` the repair is `box`. -->
10+
11+
**BREAKING for `kind: 'html'` pages in projects without their own manifest.**
12+
13+
**What changed.** `objectstack validate`, `objectstack compile` / `build` (which
14+
`dev` and `start` run first) and `objectstack lint` check the `source` of a
15+
`kind: 'html'` page against an SDUI component manifest: the `sdui.manifest.json`
16+
in the directory the command runs in, then the copy `@objectstack/console` ships
17+
as `dist/sdui.manifest.json`. The second lookup asked for that file by a subpath
18+
the console package does not export, so it always failed, and a project with no
19+
manifest of its own had its html pages checked at parse level only: syntax and
20+
structure, never which components and props they use. The lookup now reaches the
21+
shipped copy, and those pages get full component and prop validation. A tag or
22+
prop the manifest does not declare is refused (`jsx-forbidden-tag`,
23+
`jsx-unknown-component`, `jsx-unknown-prop`), naming the page and the tag, and
24+
the command exits 1. Nothing refused these before: the parse-level check does
25+
not know the component set, and the html-tier renderer still renders `div`,
26+
deprecated there in favour of `box`.
27+
28+
## FROM → TO
29+
30+
| you wrote | write instead |
31+
|:--|:--|
32+
| `<div>` … `</div>` in a `kind: 'html'` page | `<box>` … `</box>`, which takes the same `className` and children |
33+
| any other tag or prop the command names | a component and prop the manifest declares |
34+
35+
**What is not affected.** A project that keeps its own `sdui.manifest.json` is
36+
checked against that file, as before. `kind: 'react'` pages and pages authored
37+
as regions are not read by this gate. With no manifest reachable at all, the
38+
pages are still checked at parse level, and the notice that says so is
39+
unchanged.
40+
41+
**A damaged install is refused, not skipped.** A shipped copy that is present
42+
but cannot be read or parsed stops the command with exit 1, naming the file,
43+
with the remedy: reinstall `@objectstack/console`.

‎.changeset/sdui-manifest-one-producer.md‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ browser-dumped copy into `dist/`, but the release build replaced `dist/` before
1313
none reached a tarball (17.0.0, 17.3.0 and 17.4.0 each list 0 matches). That browser dump is
1414
retired. It was byte-identical to the tracked file over the same built tree.
1515

16-
For now the file is only present in the tarball. This package's `exports` map exposes
17-
`./package.json` and nothing else, so resolving `@objectstack/console/dist/sdui.manifest.json`
18-
through `exports` fails with `ERR_PACKAGE_PATH_NOT_EXPORTED`. Anything that resolves through
19-
`exports` cannot read the file yet. That includes the CLI's JSX-page manifest fallback, which
20-
catches the error and keeps parse-level validation, as before.
16+
The file is not an `exports` entry. This package's `exports` map exposes `./package.json`
17+
and nothing else, so resolving `@objectstack/console/dist/sdui.manifest.json` through
18+
`exports` fails with `ERR_PACKAGE_PATH_NOT_EXPORTED`. Read it the way the CLI's JSX-page
19+
manifest fallback does: resolve `@objectstack/console/package.json` and join
20+
`dist/sdui.manifest.json` to its directory.

0 commit comments

Comments
 (0)