Skip to main content

v2.0.0

cotton-box

🔥 Breaking Changes

  • Minimum node version required is 24.
  • UNPKG link has changed:
    - https://unpkg.com/cotton-box@2.0.0/lib/types/index.d.ts
    + https://unpkg.com/cotton-box@2.0.0/dist/types/index.d.ts

Other Changes

  • options.visibility has been deprecated.
    • It is not a reliable way to hide sensitive values.
    • While this works for React Dev Tools, the built-in memory inspector in most browsers will still be able to show the value anyway.
    • Please consider storing sensitive information on the server and only expose what's absolutely necessary to the client instead.
  • SimpleFiniteStateManager will now show a warning when calling .reset() if there is no valid state transition from the current state to the default state. Starting from v3, an InvalidStateTransitionError will be thrown.
  • SimpleFiniteStateManager now has a new .tryReset() method.
  • Examples have been added to every API via the @example TSDoc tag.
  • Internal performance optimizations.

cotton-box-react

🔥 Breaking Changes

  • Minimum node version required is 24.
  • UNPKG link has changed:
    - https://unpkg.com/cotton-box-react@2.0.0/lib/types/index.d.ts
    + https://unpkg.com/cotton-box-react@2.0.0/dist/types/index.d.ts

Other Changes

  • options.visibility now no longer does anything in React Developer Tools.
  • Examples have been added to every API via the @example TSDoc tag.
  • Internal performance optimizations.