|
| 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`. |
0 commit comments