Skip to content

fix(examples): type the settings holders for Handsontable 18.1 (DEV-2727) [backport 18] - #282

Merged
demtario merged 1 commit into
prod-examples/18from
fix/DEV-2727-angular-18-1-column-settings-p18
Sep 2, 2026
Merged

fix(examples): type the settings holders for Handsontable 18.1 (DEV-2727) [backport 18]#282
demtario merged 1 commit into
prod-examples/18from
fix/DEV-2727-angular-18-1-column-settings-p18

Conversation

@demtario

@demtario demtario commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Backport of #281 onto the frozen bucket-18 branch. Single cherry-pick, applied clean, identical 19 files. This is the half that actually fixes https://demos.handsontable.com/?example=angular&v=18.1.0 — bucket 18 generates from prod-examples/18 (.github/workflows/import-starters.yml, starter-examples/18/manifest.json "sourceRef"), so the master PR alone only reaches the next bucket.

Eligible under runner/docs/backport-policy.md class 1 (compatibility fix — the starter no longer builds at the bucket's pinned Handsontable, which re-pinned itself to 18.1.0) and class 2 (lockfile breakage). No dependency is added, so the boot-delta table is unchanged.

Not backported to 15/16/17: those buckets receive a dateFormat format string from the overlay and still carry the loose pre-18.1 ColumnSettings, so the fix is not relevant there — newest → oldest, stopping where it stops mattering.

See #281 for the root cause (18.1.0's Omit<RemoveIndexSignature<GridSettings>, 'data'> making every named column option a real type instead of any), why the fix cannot live on the dateFormat line, and the full verification log.

Verified on this branch specifically

Generated bucket 18 exactly the way CI will — node pipeline/import.mjs --bucket=18 --source=<this worktree>/examples --ref=prod-examples/18 — and confirmed on the resulting artifacts:

  • angular.json carries the annotation, and the overlay rewrote this branch's dateFormat: 'YYYY-MM-DD' to the Intl object, pinned at 18.1.0. Extracted to a temp dir outside the repo: pnpm install --frozen-lockfile clean, ng build clean.
  • example1.json and javascript.json likewise carry the Intl object — this branch's format strings are rewritten by set semantics, so its source text disagreeing with master is by design, not drift.
  • base-web.json and nuxt.json carry their annotations.

One pre-existing, unrelated defect surfaced in the extracted base-web artifact: TS2688: Cannot find type definition file for 'node' (base-web sets "types": ["node"] with no @types/node dependency; it only passes in-tree because the repo root hoists a copy). Confirmed pre-existing by building the same artifact with this branch's original App.tsx. Tracked as DEV-2730; not touched here.

…727)

18.1.0 rewrote `ColumnSettings` from `Omit<GridSettings, 'data'>` to
`Omit<RemoveIndexSignature<GridSettings>, 'data'>`. Under 18.0.0 that
`Omit` collapsed against `GridSettings`'s `[key: string]: any` index
signature, so every named column option resolved to `any`. Stripping the
signature first makes the declared option types real, and two starters had
been relying on the collapse:

- angular: `gridSettings` was an unannotated object literal, so
  `dateFormat: { year: 'numeric', ... }` widened to `{ year: string }` and
  failed against `Intl.DateTimeFormatOptions` at the `[settings]` binding.
  `ng build` is the only starter dev server that type-checks, so this
  surfaced as a demo that never renders while the browser console stayed
  clean and the dev server kept serving the last good bundle.
- base-web: `colorRenderer` declared `value: string` and an instance
  parameter of `Handsontable` rather than `HotInstance`; a column
  `renderer` was `any` before.

nuxt gets the same annotation preventively: `hotSettings` is the identical
unannotated-holder shape and only escapes today because it carries no
strictly-typed option and `nuxt build` does not type-check.

The angular fix cannot live on the `dateFormat` line itself.
`pipeline/starter-overrides.mjs` (`angular:dateFormat`) replaces that whole
line per bucket at import time, so a cast written there would be
regenerated away and never ship.

Also re-resolves `handsontable` and the wrapper packages in all 16 starter
lockfiles, which still pinned 18.0.0 while every package.json says
"latest" - the ERR_PNPM_OUTDATED_LOCKFILE drift 822d082 fixed last time.
`@handsontable/pikaday` is left at 1.0.0 (NEVER_REWRITE).

Verified at 18.1.0: `ng build` red before / green after; the generated
bucket-18 angular artifact installs with --frozen-lockfile and builds
clean; base-web, example1, fluent-ui, mui, next.js, next-shadcn.js, react,
remix, typescript and vue all build; runner `pnpm test` 940 pass / 0 fail
and `pnpm typecheck` clean.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@qunabu

qunabu commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

@qunabu

qunabu commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

@demtario
demtario merged commit 199282c into prod-examples/18 Sep 2, 2026
1 check passed
@demtario
demtario deleted the fix/DEV-2727-angular-18-1-column-settings-p18 branch September 2, 2026 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants