Financial-Times/dotcom-page-kit

Make Page Kit compatible with the latest version of handlebars

Closed this issue · 1 comments

Handlebars released a new version, v4.3.0, today which throws type errors in Page Kit.

 src/PageKitHandlebars.ts(123,36): error TS2345: Argument of type '{ helpers: { [key: string]: HelperDelegate; }; partials: { [x: string]: TemplateDelegate<any>; }; }' is not assignable to parameter of type 'RuntimeOptions'.
- 
    Property 'allowCallsToHelperMissing' is missing in type '{ helpers: { [key: string]: HelperDelegate; }; partials: { [x: string]: TemplateDelegate<any>; }; }' but required in type 'RuntimeOptions'.
- 
  npm ERR! code ELIFECYCLE

As a temporary fix, the dotcom-server-handlebars package will be pinned to "handlebars": "4.2.1" but a more permanent solution is needed.

Fixed in #597.

It seems there may be multiple issues with v4.3.0 so it's probably best we stick to v4.2.x anyway.