Skip to content

Releases: alexreardon/raf-schd

4.0.3

13 Apr 03:09
Compare
Choose a tag to compare

Fix: Adding missing MIT LICENSE file

This project has always had an MIT license in the package.json. However, there was a missing LICENSE file. An MIT license has now been added. Thanks @mjchang and @PabloJomer!

4.0.2

09 Jul 01:12
Compare
Choose a tag to compare
  • Upgrading to flow@0.102.0 #19
  • Bumping all dev dependencies #19 👍

v4.0.1

04 Jun 00:01
Compare
Choose a tag to compare
  • Upgrade build (#18) Thanks @TrySound!!
  • Upgrade flow (#16) Thanks @TrySound!!
  • Fix typos in Readme’s cancel() example (#15)
  • Add changelog pointing to Github Releases page (#14)

4.0.0

17 Jul 05:30
Compare
Choose a tag to compare

Changes

No longer returning AnimationFrame on WrappedFn calls #12

This is a breaking change 💥

Old

const wrapped = rafSchd(console.log);
const frameId: AnimationFrameId = wrapped('hi');

// and you could do this:
cancelAnimationFrame(frameId);

// or you could have done this
wrapped.cancel();

New

const wrapped = rafSchd(console.log);
wrapped('hi'); // returns undefined

// now the only way to cancel the scheduled frame
wrapped.cancel();

This change brings this library in line with other rate limiting functions out there. The fact that it uses an animation frame internally is an implementation detail and does not need to leak out to the consumer. Rather than having two ways of cancelling a frame, we now just have one.

- type WrapperFn = (...args: any[]) => AnimationFrameID;
+ type WrapperFn = (...args: mixed[]) => void;

Engineering health

  • moved from eslint to prettier #12

v3.0.1

29 Jun 04:25
Compare
Choose a tag to compare

Changes

Bundle of love 🎁

We have added a number of new bundle options for your consumption pleasure!

  • dist/raf-schd.cjs.js CommonJS bundle
  • dist/raf-schd.esm.js ESM bundle
  • dist/raf-schd.js UMD bundle (development)
  • dist/raf-schd.min.js UMD bundle (production)

This has been listed as a breaking change 💥 as the paths to the bundles have changed. There is no code behaviour or api changes

2.1.1

22 Mar 23:33
Compare
Choose a tag to compare

Improvements

  • Upgraded to flow version 0.68 #8
  • Upgraded dependencies #8
  • Now publishing an esm build #8

2.1.0

21 Nov 22:40
Compare
Choose a tag to compare

Features

  • Adding support for a .cancel property on the returned function to allow for simple cancelling of frames without using cancelAnimationFrame directly. #7