Releases: kleinfreund/poll
v3.2.1
v3.2.0
v3.1.0
v3.0.0
v2.0.0
2.0.0 (2021-03-21)
docs
- Updates the README.md file with regards to this release’s breaking changes and fixes a few issues in the usage examples.
BREAKING CHANGES
- Removes the separate ESM and CJS bundles in favour of one UMD bundle that can be used more easily in most scenarios while keeping the bundle size down. The bundle in the
distdirectory is now also minified.
v1.0.0
poll
I’ve ported the poll function to TypeScript to give me a comfortable way of creating both a CommonJS and an ES module out of a single source. This comes with the downside of not being able to produce a CommonJS module which uses module.exports = poll. I can only get the TypeScript compiler to produce exports.default = poll or exports.poll = poll. What this means is that you can’t have a CommonJS module compiled from a TypeScript source which you can import with require('poll').
Breaking changes:
-
Importing the CommonJS module with
require('poll')no longer resolves to thepollfunction. Userequire('poll').defaultinstead.const poll = require('poll').default;
Non-breaking changes:
-
The package is now available as an ES module. If you use
pollas animport poll from 'poll/dist/esm/poll.mjs'; dependency, import it like this:import poll from 'poll/dist/esm/poll.mjs';
-
Tests now use Jest instead of Ava.
-
Tests are now based on fake timers instead of calling
setTimeoutin the tests directly. Unfortunately, tests still require a lot of trickery to manually clear out the promise queue. If you know how to test this without sprinklingawait Promise.resolve()all over my tests, I’m all ears!