jovotech / jovo-framework

🔈 The React for Voice and Chat: Build Apps for Alexa, Messenger, Instagram, the Web, and more
https://www.jovo.tech
Apache License 2.0
1.68k stars 309 forks source link

♻️ Use includedProperties instead of ignoredProperties #1522

Closed aswetlow closed 1 year ago

aswetlow commented 1 year ago

Proposed Changes

Extending the Jovo class with additional properties caused Maximum call stack size exceeded exceptions in the JovoDebugger if they contained a reference to the jovo object.

This PR proposes to change the approach to includedProperties instead of ignoring these properties via ignoredProperties.

ignoredProperties is still available to prevent a breaking change.

Best practice if you want to extend the includedProperties array

import { DEFAULT_INCLUDED_PROPERTIES, JovoDebugger } from '@jovotech/plugin-debugger';

...
 new JovoDebugger({
    includedProperties: [...DEFAULT_INCLUDED_PROPERTIES, '$foobar'],
  }),
...

Types of Changes

Checklist