fix(examples): type the settings holders for Handsontable 18.1 (DEV-2727) [backport 18] - #282
Merged
demtario merged 1 commit intoSep 2, 2026
Conversation
…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>
Contributor
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 thenextbucket.Eligible under
runner/docs/backport-policy.mdclass 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
dateFormatformat string from the overlay and still carry the loose pre-18.1ColumnSettings, 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 ofany), why the fix cannot live on thedateFormatline, 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.jsoncarries the annotation, and the overlay rewrote this branch'sdateFormat: 'YYYY-MM-DD'to the Intl object, pinned at 18.1.0. Extracted to a temp dir outside the repo:pnpm install --frozen-lockfileclean,ng buildclean.example1.jsonandjavascript.jsonlikewise 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.jsonandnuxt.jsoncarry their annotations.One pre-existing, unrelated defect surfaced in the extracted
base-webartifact:TS2688: Cannot find type definition file for 'node'(base-web sets"types": ["node"]with no@types/nodedependency; it only passes in-tree because the repo root hoists a copy). Confirmed pre-existing by building the same artifact with this branch's originalApp.tsx. Tracked as DEV-2730; not touched here.