Skip to content

v0.5.0 – Febreze (the big cleanup)

Compare
Choose a tag to compare
@Ayc0 Ayc0 released this 16 Oct 00:21
· 79 commits to ocean since this release

manatea

  • All names changed: BREAKING CHANGE
    • createCup -> orderCup,
    • Change -> Order (only in TS),
    • (and other internal names, please check the readme for the lexicon,
  • when ordering a new cup with orderCup, you can now pass a flavoring function,
  • Cup was updated to receive 2 generics instead of one: FlavoredTea and UnflavoredTea (minor breaking change)
  • Remove namedStores BREAKING CHANGE,
  • Don't call Object.freeze() on the teas anymore (as it can mutate the provided value) (minor breaking change)
  • add context to servers and orders to avoid infinite loops when a cup's listener is used to update another cup
const cup1 = orderCup(0);
const cup2 = orderCup(0);

cup1.on((newTea, context) => cup2(newTea, context));
cup2.on((newTea, context) => cup1(newTea, context));

// Here updating cup1 will update cup2, and vice versa.
// But thanks to the `context`, we don't create an infinite loop,
// and the updates are dropped when they re-reached an already updated cup
  • use Object.is instead of === for comparing the previous and the new teas (handle NaN OOTB + differentiate -0 from +0) (minor breaking change),

  • add sideEffects: false in package.json to enable tree shaking

react-manatea

  • update peerDependency to [email protected]
  • fix type in useInfuser
  • useInfuser exposes the context (used to avoid infinite loops)
  • add sideEffects: false in package.json to enable tree shaking

internal changes

  • update to yarn 3
  • remove lerna and instead use custom scripts

Full Changelog: v0.3.6...v0.5.0