Releases: miniplug/miniplug
v2.0.3
v2.0.2
Docs:
- Document
HistoryEntry#score.skipped. - Update readme example.
v2.0.1
Internal:
- Update dependencies to avoid vulnerability warnings.
v2.0.0
Breaking changes:
- Don't connect on initialisation by default. (#116)
- Switch from
bluebirdtobluebirdish. (#115) - Switch from
gottonode-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#timeproperty alias, useHistoryEntry#timestampinstead. (#115) - Remove
HistoryEntry#dj, useHistoryEntry#userinstead. (#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: '[email protected]', 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
responseproperty 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. UseHistoryEntry#userinstead.HistoryEntry#time- this was renamed toHistoryEntry#timestampfor consistency with other classes.mp.on('waitlistBan')- the 'waitlistBan' event was renamed to 'modWaitlistBan'.
v2.0.0-beta.1
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@nextBreaking changes:
- Remove
'waitlistBan'event alias, use'modWaitlistBan'instead. (#115) - Remove
HistoryEntry#timeproperty alias, useHistoryEntry#timestampinstead. (#115) - Remove
HistoryEntry#dj, useHistoryEntry#userinstead. (#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
v2.0.0-beta.0
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@nextBreaking changes: