Skip to content

Releases: tdeekens/flopflip

Introducing adapters making `flopflip` backend agnostic

Choose a tag to compare

@tdeekens tdeekens released this 27 Oct 18:41

Version 3.0.0 is here with quite a bunch of nice little improvements and one major change in direction for flopflip.

🎱 Breaking changes (for the good)

  • flopflip is now "backend" agnostic and introduces the notion of adapters which you need to setup within ConfigureFlopFlip (more in the readme)
    • We can therefore now integrate with any feature flag provider not only LaunchDarkly
    • This also allows us to build other adapters such as localstorage, WebSocket or HTTP based ones later
    • An adapter only needs to implement a configure and reconfigure function returning a Promise the library does the rest for you (setup and state management)
import adapter from '@flopflip/launchdarkly-adapter';

<ConfigureFlopflip adapter={adapter} adapterArgs={{ user, clientSideId }}>
  <App />
<ConfigureFlopflip>
  • shouldConfigure is now called shouldDeferAdapterConfiguration and defaults to false
  • HoCs now receive { flag: String, variate?: String | Boolean } and are not backwards compatible any more to just flag: String

🍭 Features

  • FeatureToggled not accepts both a render-prop and children (what ever you prefer)
    • <FeatureToggled flag="bar" render={( { isFeatureEnabled } ) => <div />} /> equals <FeatureToggled flag="bar"><div /></FeatureToggled>
    • <FeatureToggled flag="bar" toggledComponent={ToggledComponent} untoggledComponent={UntoggledComponent} /> is also possible

❤️ Tooling

  • We moved to have a .eslintrc while integratin with eslint-plugin-xo instead of xo directly
  • We setup enzyme-matchers differently to use their nice reporters better
  • We moved our Jest configuration into an .jestrc.json
  • We homogenised into one rollup.config.js for all packages

Introducing adapters making `flopflip` backend agnostic

Choose a tag to compare

Version 3.0.0 is here with quite a bunch of nice little improvements and one major change in direction for flopflip.

🎱 Breaking changes (for the good)

  • flopflip is now "backend" agnostic and introduces the notion of adapters which you need to setup within ConfigureFlopFlip (more in the readme)
    • We can therefore now integrate with any feature flag provider not only LaunchDarkly
    • This also allows us to build other adapters such as localstorage, WebSocket or HTTP based ones later
    • An adapter only needs to implement a configure and reconfigure function returning a Promise the library does the rest for you (setup and state management)
import adapter from '@flopflip/launchdarkly-adapter';

<ConfigureFlopflip adapter={adapter} adapterArgs={{ user, clientSideId }}>
  <App />
<ConfigureFlopflip>
  • shouldConfigure is now called shouldDeferAdapterConfiguration and defaults to false
  • HoCs now receive { flag: String, variate?: String | Boolean } and are not backwards compatible any more to just flag: String

🍭 Features

  • FeatureToggled not accepts both a render-prop and children (what ever you prefer)
    • <FeatureToggled flag="bar" render={( { isFeatureEnabled } ) => <div />} /> equals <FeatureToggled flag="bar"><div /></FeatureToggled>
    • <FeatureToggled flag="bar" toggledComponent={ToggledComponent} untoggledComponent={UntoggledComponent} /> is also possible

❤️ Tooling

  • We moved to have a .eslintrc while integratin with eslint-plugin-xo instead of xo directly
  • We setup enzyme-matchers differently to use their nice reporters better
  • We moved our Jest configuration into an .jestrc.json
  • We homogenised into one rollup.config.js for all packages

Introducing adapters making `flopflip` backend agnostic

Choose a tag to compare

Version 3.0.0 is here with quite a bunch of nice little improvements and one major change in direction for flopflip.

🎱 Breaking changes (for the good)

  • flopflip is now "backend" agnostic and introduces the notion of adapters which you need to setup within ConfigureFlopFlip (more in the readme)
    • We can therefore now integrate with any feature flag provider not only LaunchDarkly
    • This also allows us to build other adapters such as localstorage, WebSocket or HTTP based ones later
    • An adapter only needs to implement a configure and reconfigure function returning a Promise the library does the rest for you (setup and state management)
import adapter from '@flopflip/launchdarkly-adapter';

<ConfigureFlopflip adapter={adapter} adapterArgs={{ user, clientSideId }}>
  <App />
<ConfigureFlopflip>
  • shouldConfigure is now called shouldDeferAdapterConfiguration and defaults to false
  • HoCs now receive { flag: String, variate?: String | Boolean } and are not backwards compatible any more to just flag: String

🍭 Features

  • FeatureToggled not accepts both a render-prop and children (what ever you prefer)
    • <FeatureToggled flag="bar" render={( { isFeatureEnabled } ) => <div />} /> equals <FeatureToggled flag="bar"><div /></FeatureToggled>
    • <FeatureToggled flag="bar" toggledComponent={ToggledComponent} untoggledComponent={UntoggledComponent} /> is also possible

❤️ Tooling

  • We moved to have a .eslintrc while integratin with eslint-plugin-xo instead of xo directly
  • We setup enzyme-matchers differently to use their nice reporters better
  • We moved our Jest configuration into an .jestrc.json
  • We homogenised into one rollup.config.js for all packages

Add in memory adapter for flopflip

Choose a tag to compare

This is the initial version of the in memory adapter compatible with the backend agnostic version of the library.

Add in localstorage adapter for flopflip

Choose a tag to compare

This is the initial version of the localstorage adapter compatible with the backend agnostic version of the library.

Add in launchdarkly adapter for flopflip

Choose a tag to compare

This is the a rewrite of the launchdarkly-wrapper to be compatible with the backend agnostic version of the library.

Improvements of display names for components

Choose a tag to compare

@tdeekens tdeekens released this 14 Oct 14:36

🍭 Gifts

  • Display names for components are made more expressive
  • Dependencies have been updated

Improvements of display names for components

Choose a tag to compare

🍭 Gifts

  • Display names for components are made more expressive
  • Dependencies have been updated

Improvements of display names for components

Choose a tag to compare

🍭 Gifts

  • Display names for components are made more expressive
  • Dependencies have been updated

Fix usage of `.babelrc` and speed up build times

Choose a tag to compare

@tdeekens tdeekens released this 08 Oct 18:14

😲 Bug fixes

  • Use a "global" .babelrc for all packages
  • We use envs in the .babelrc to adjust transpilation for dev/prod and test
  • We don't use an BABEL_ENV anymore (which was a duplicate)
  • ⚠️ We now support the last two versions of each browser
    • This was differently before but with the current usage of the library we don't expect this to cause anyone trouble

🐱 Dependencies

  • Update all dependencies

🍭 Gifts

  • Using Lerna's --parallel speeds up the built of all packages by about 30%