Skip to content

Release v2.5.0

Choose a tag to compare

@github-actions github-actions released this 08 Jul 16:31
d797af6

Summary

Closes three ways the library lets consumers write code that silently misbehaves: string icons that render nothing, onBeforeExecute callbacks that wipe command values, and view models that call hooks.

Added

  • onBeforeExecute on CommandDialog, StepperCommandDialog, and CommandStepper now accepts an async callback returning Promise<T>.
  • @cratis/eslint-plugin-components rule onbeforeexecute-must-return, flagging an onBeforeExecute callback that can complete without returning the command values.
  • @cratis/eslint-plugin-components rule no-hooks-in-view-model, flagging React hooks and Arc proxy .use() calls inside a view model class.

Changed

  • IconDisplay now repairs a lone PrimeIcons class missing its base class (pi-homepi pi-home) so it renders, and warns in development when given a bare icon name (e.g. plus) that is not a CSS class.

Fixed

  • onBeforeExecute no longer executes the command with undefined values when a callback returns nothing — the current values are kept and a warning is logged.