Skip to content
This repository has been archived by the owner on May 11, 2022. It is now read-only.

Releases: miniplug/miniplug

v2.0.3

30 Sep 15:20
d73cb86
Compare
Choose a tag to compare

Internal:

  • Update debug to v4.0.0.

v2.0.2

21 Jul 10:58
ec05c86
Compare
Choose a tag to compare

Docs:

  • Document HistoryEntry#score.skipped.
  • Update readme example.

v2.0.1

01 Jul 09:09
09e4e62
Compare
Choose a tag to compare

Internal:

  • Update dependencies to avoid vulnerability warnings.

v2.0.0

30 Jun 19:44
e2bb386
Compare
Choose a tag to compare

Breaking changes:

  • Don't connect on initialisation by default. (#116)
  • Switch from bluebird to bluebirdish. (#115)
  • Switch from got to node-fetch. (#115)

See below for upgrade instructions.

Features:

  • Return Room instance from .join(). (#115)

Removed:

  • Remove 'waitlistBan' event alias, use 'modWaitlistBan' instead. (#115)
  • Remove HistoryEntry#time property alias, use HistoryEntry#timestamp instead. (#115)
  • Remove HistoryEntry#dj, use HistoryEntry#user instead. (#115)

Don't connect on initialisation

This change affects everyone.

v1.x accepted email and password options in the miniplug() constructor, and immediately connected to the plug.dj API and socket. This was handy but there was no clear way to handle login or connection failures. Now, this functionality has been split up, and the .connect() method must be used. .connect() returns a Promise, which you can attach .catch() handlers to. See its documentation for more.

const mp = miniplug()
mp.connect({ email: 'test@miniplug.com', password: 'hunter2' }).catch((err) => {
  console.error('connection failed:', err.message)
  process.exit(1)
})

// Then just use it as normal.
mp.join('radiant')

Switch to node-fetch

This change only affects you if you use the response property on Errors thrown by miniplug.

node-fetch is significantly smaller than got, and implements the web standard Fetch API.

Previously, error.response would contain a Got response object, now it contains the Response object from the Fetch API.

Switch to bluebirdish

This change only affects you if you use Bluebird timeouts, cancellation, or disposers.

bluebirdish provides a similar API to Bluebird, but is built on native Promises. It is compatible in all features it implements, but it doesn't support a few things. In most situations, you should not have to change any code. If you were using .timeout(), .cancel(), or resource management with Promise.using() and .disposer(), that will no longer work by default. You can use Bluebird.resolve(p) to convert a bluebirdish Promise p from the miniplug API to a Bluebird Promise.

Removed deprecated names

These properties and events were removed and will now throw an error:

  • HistoryEntry#dj - this was never supposed to exist, and did not exist consistently. Use HistoryEntry#user instead.
  • HistoryEntry#time - this was renamed to HistoryEntry#timestamp for consistency with other classes.
  • mp.on('waitlistBan') - the 'waitlistBan' event was renamed to 'modWaitlistBan'.

v2.0.0-beta.1

26 Jun 12:19
a4be9be
Compare
Choose a tag to compare
v2.0.0-beta.1 Pre-release
Pre-release

This is a prerelease. More breaking changes are unlikely but possible. Please try it out and report any issues you find!

Install it using:

npm install miniplug@next

Breaking changes:

  • Remove 'waitlistBan' event alias, use 'modWaitlistBan' instead. (#115)
  • Remove HistoryEntry#time property alias, use HistoryEntry#timestamp instead. (#115)
  • Remove HistoryEntry#dj, use HistoryEntry#user instead. (#115)
  • Return Room instance from .join(). (#115)

Features:

  • Restore Node 4 support. (#115)

Bugfixes:

  • Connect as guest when connect() is called without argument. (#115)

v1.14.1

26 Jun 12:06
13dc457
Compare
Choose a tag to compare

Bugfixes:

  • Fix documentation of join() and getRoomState() methods. (45cd71d)
  • Add API header to readme so it is easier to spot. (20dfad6)

v2.0.0-beta.0

22 Jun 20:42
7ee1f27
Compare
Choose a tag to compare
v2.0.0-beta.0 Pre-release
Pre-release

This is a prerelease. More breaking changes are unlikely but possible. Please try it out and report any issues you find!

Install it using:

npm install miniplug@next

Breaking changes:

  • Don't connect on initialisation by default. (#116)
  • Switch from bluebird to bluebirdish. (#115)
  • Switch from got to node-fetch. (#115)
  • Remove Node 4 from CI tests. (#115)

v1.14.0

26 Apr 08:23
a11b7fb
Compare
Choose a tag to compare

Features:

  • Add getChatHistory(). (#113)
  • Add isLocked() and isCycling() functions. (#114)

v1.13.4

17 Apr 19:30
adb8100
Compare
Choose a tag to compare

Bugfixes:

  • Remove unnecessary dependencies (async-to-gen, proxyquire). (ffb9d3f)

v1.13.3

26 Feb 21:09
Compare
Choose a tag to compare

Bugfixes:

  • roomState event would throw an error when trying to mp.wrapUser with an "undefined" user param.