Skip to content

Compatible with Primus 2.x.x

Latest
Compare
Choose a tag to compare
@cayasso cayasso released this 19 Feb 00:53
· 45 commits to master since this release

As most of you know, primus@2.x.x is out with some great updates and some breaking plugin changes, this release 3.0 address these breaking changes.

No more event blacklist to support.

primus-emitter uses now the reserved method exposed by Primus on the client, spark and server. Before this method, a black list of reserved events was needed, making it difficult to maintain specially when new events were introduced to a plugin (for example primus-rooms) or Primus. Plugins now can add their custom events to the primus.reserved.events object making it easier to check by other plugins using this new reserved method.

Compatibility with Primus initialisation method

Another change introduced in the latest Primus version is that Sparks properties are no longer writable but are readable, this restricts overwriting prototype methods like Spark.prototype.initialise which in this case was used by primus-emitter for initializing the Emitter instance on the Spark, at the moment it was the simplest way I found to do this task however this commit primus/primus@081fc60 allow using the initialisation without overwriting the main private one by Primus.

Note on version 2.1.0

Version 2.1.0 is not fully compatible with previous Primus versions like primus@1.x.x, this version will only work on primus@2.x.x check this issue for a better understanding #20

Thanks

Again to all of you who collaborated on this version, specially @lpinca and @3rd-Eden.

Changelog

  • [release] 3.0.0
  • [doc] Updating readme with version 3.0.0 notice #20
  • [doc] Primus 2.0.0 compatibility notice
  • [release] 2.1.0
  • [minor] Testing against Primus master branch
  • [major] Using Spark.readable and preparing for comming primus-rooms version
  • [minor] Fixing Travis CI build error
  • [test] Adjusting and adding tests to conform to Primus 2.x.x changes
  • [doc] Primus 2.0.0 compatibility notice
  • Merge pull request #18 from lpinca/remove/event-blacklist
  • [minor] Reapplying ondata function name and removing reserved events test
  • Revert "[minor] Adding custom reserved events"
  • [minor] Removing some silly test code
  • [minor] Adding custom reserved events
  • Merge pull request #17 from 3rd-Eden/patch-1
  • [fix] Do the reserved check on the receiving end of the event
  • [minor] removing test argument
  • Removing black list
  • [minor] use new Primus initialise and reserved methods
  • Merge pull request #15 from lpinca/fix/reserved-event
  • [fix] Adding the newly introduced readyStateChange event to the blacklist
  • [test] Updating package.json