Skip to content

Conversation

@AlexandrHoroshih
Copy link
Member

@AlexandrHoroshih AlexandrHoroshih commented May 6, 2023

Changelog

effector-logger is re-written to use brand new Inspect API of effector. Root domain setups, custom babel-plugins and etc are no longer needed.

Simple attachLogger() call somewhere in your app entrypoint is enough now.

Also effector-logger now only does console logs and Redux DevTools support and effector-inspector integrations are removed. Use @effector/redux-devtools-adapter and effector-inspector instead.

BREAKING CHANGES

  • Redux DevTools support and effector-inspector integrations are removed. Use @effector/redux-devtools-adapter and effector-inspector instead.
  • effector-logger/attach is removed. Use main attachLogger export instead. Notice, that config shape is different and does not require root domain now.
  • effector-logger/babel-plugin is removed. It is no longer needed, just use effector/babel-plugin or @effector/swc-plugin normally.
  • import { createEvent, ... } from "effector-logger" support is removed. Use patronum/debug from patronum.effector.dev instead if you need to log only some units.
  • Babel Macro support is removed. Create-React-App is basically deprecated at this point. Use something else (e.g. Vite) instead.

New features

  • configure now supports log: 'enabled' option to forcefully log some unit that is usually omitted. It is useful to log updates of derived units which are omitted by effector-logger by default.
  • effector Scope logs are fully supported now, domain is not required
  • You can provide name prefix to your logs if needed. It can be useful in case if there are few instances of your app which are using different scopes.

Maintenance

Old integration tests are removed. Now there is a single suit of vitest-based tests which is run against dist output of the library bundler.

@bolt-new-by-stackblitz
Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

Deleted babel-plugin, macros, redux-devtools and effector-inspector integrations

BREAKING CHANGE: Deleted a bunch of irrelevant to inspect-api features. Logger will be simplified
from one-for-all adapter to specifically console adapter
logger internals are transferred to Inspect API, public api also changes

BREAKING CHANGE: Public API now requires explicit `attachLogger` call
BREAKING CHANGE: effector 22.8.3 now minimal requried version of effector for effector-logger to
work
CRA is deprecated

BREAKING CHANGE: There is no CRA support via babel-macros anymore
There are now tests that are run against dist. Dist also updated to not include incorrect files
@AlexandrHoroshih AlexandrHoroshih marked this pull request as ready for review May 6, 2023 09:52
@AlexandrHoroshih AlexandrHoroshih added documentation Improvements or additions to documentation enhancement New feature or request refactor labels May 6, 2023
Copy link
Member

@zerobias zerobias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing! Thanks 👍👍👍

@AlexandrHoroshih AlexandrHoroshih merged commit f6e2d24 into master May 6, 2023
@AlexandrHoroshih AlexandrHoroshih deleted the feat-inspect-api branch May 6, 2023 10:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request refactor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants