Releases: goldfire/democracy.js
Releases · goldfire/democracy.js
v4.0.0
Updates
FIXED
In the rare case that weights of two peers are the same, there is now a tie-breaker that uses the ID value.FIXED
The for loop to count voters for peer removal was invalid, which could cause unpredictable results and state issues.
Breaking Changes
- Default peer ID's now use
nanoid
instead ofshortid
. - Dropped support for Node.js <16.
v3.1.3
v3.1.2
v3.1.0
FIXED
If extended network issues arise and multiple packets get lost, all servers in the pool could end up losing references to each other and never regain them. This now keeps the peers for an hour after disconnecting and keeps pinging them until they come back.
v3.0.0
Updates
ADDED
MTU size on different systems can cause large messages to silently fail. We now auto chunk these and re-assemble them on the receiving end. The newmaxPacketSize
option controls the chunk size and defaults to 508 bytes.
Breaking Changes
- Messages of greater than 508 bytes are now chunked by default (split into multiple messages and re-assembled on the other end). This setting can be changed with the new
maxPacketSize
option. - Default peer ID's now use
shortid
instead ofuuid
.
v2.1.1
v2.1.0
v2.0.1
v2.0.0
Updates
ADDED
Basic pub/sub is now possible with democracy! This uses the samesend
system as with custom events, but newsubscribe
andpublish
methods have been added as well as achannels
property on init (see README for docs and examples).UPDATED
Refactored all of the code to use ES6.UPDATED
Added ESLint configuration.
Breaking Changes
- Custom events now just return the data that was sent rather than needing to access it in
data.extra
. - Support for Node.js older than 6.4.0 has been dropped.