This release fixes an issue that was preventing the
reconnect failed event from being emitted.
In addition to this we've also reduced the length of the cache-busting id which is now generated using the
This release removes the JSONH parser as we have recently found that it can't handle the internal protocol messages used by Primus.
In addition to this, we've also updated our bundled SockJS client-side library to its latest stable version (1.0.1).
3.1.0 we changed the way the client was build for Node.js. Unfortunately this does not work well with some plugins as reported by @ckir.
This release restores the old build system to make sure plugins will keep working as expected.
This release brings a change that was orinally planned for the
3.0.0 version but somehow wasn't shipped with that release. We are no longer using a DOM based approach to parse the connection URL. See the old release notes for more details about this.
A new event called
heartbeat is emitted on the spark instance every time the heartbeat timeout is reset.
end()method was called right after creating the client instance.
pingoption on the client is now automatically set to
falseif the heartbeats are disabled.
The previous release of Primus seemed to have shipped with a corrupted
dist file that contained our Browserify compiled client source code. This prevented vital information to be introduced in the client file before it was saved or served on your specified location, for example:
And many more. After this issue has been brought to our attention we immediately rebuild the client code and added a
prepublish hook to ensure that it will always be rebuild before being published to
npm. Apologies for the inconvenience that this might have caused and big thanks to @trygve-lie for reporting the issue!
That moment when you publish a new release and realize you forgot to merge a pull request... That's why this tag exists. I forgot things again. Please see the
3.0.0 release for all the important changes ;-)
This change spans over more than 145 commits and it's took us months to get here, but it's out.
The 3.0.0 release features a completely refactored client code base which is now compiled using Browserify. Most of the internals are released as stand alone open source projects which are shared between this Primus project and the Unshift real-time transport library that I'm currently developing. The best thing here is that all these tiny libraries are fully tested most of them have 100% test coverage! Here are some highlights from the new release:
We've upgraded the SockJS client to the its latest beta release. This client allows things such a query strings to be used to connect to the server, allowing it to have the same features and functionality as the rest of the transformers.
If you are using Socket.IO as tranformer, this might be interesting for you. We're now using and advising people to use our fork of the Socket.IO 0.9 called
primus-socket.io-client. This allows us to fix bugs deeper and allows these same bug fixes to also be applied to our node.js client.
There are transformers that allow for the compression of messages when they are communicating. We introduced a
compression option to turn this on and off. The default value is false as there is quite a hefty performance hit when you need to zip all incoming requests/messages.
We're now using the
recovery module under the hood for our reconnection purposes. This library also includes support for reconnection timeouts for when it takes to long to reconnect. So there are new options available for configuring this as well as a new
reconnect timeout event.
primus.destroy method has been introduced which allows you to completely destroy the
Primus instance so it will free all resources and clear all running timers.
In our old version we were using DOM nodes to parse the URL and get all the properties. The problem with this approach is that it doesn't work in environments without a DOM, like servers. We originally solved this by using a fallback for Node.js but we completely forgot about WebWorkers. Instead of including a 1000 LOC URL parser from Node we rolled our own version, which is a bit slower than before but it's only used once for parsing so the overhead is minimal while the benefits are huge, as this should allow Primus to be used in WebWorkers!
We've added a [SECURITY.md] document which contains ways of securely disclosing vulnerabilities in this project. as well as [CONTRIBUTING.md] to give you some information about the contribution process in Primus.
reconnectinghas been renamed to
Primus.prototypewith your custom global name but only export our Primus instance as your set global.
Last but certainly not least, I would like to thank all contributors who helped made this release possible. @lpinca specifically, who has been fixing all the things that I broke (sorry about that). This project wouldn't be possible without you guys! <3
We've updated our internal library in order to support Engine.IO 1.4.3 which has some critical older browser fixes. And that's all folks. Gotta love a good and frequent release <3!
This releases comes with a lot of minor changes and patches.
We've deprecated the
end option when you destroy a server. In future versions the
destroy method will always close the connections that are left open.
We've done some work on the server and client to only remove the event listeners that we have assigned. We are no longer doing a
removeAllListeners as this can potentially remove clean-up listeners that leave memory or file descriptor leaks behind.
The client code have been updated to the latest EventEmitter3 version. It comes with a minor speed up so that's always a more than welcome addition. It also fixes an internal memory leak as the internal
_events object still contained keys of events that were removed.
We're now actively canceling any reconnect attempt that we receive when we go in the
offline mode. This prevents pointless reconnection attempts.
We've upgraded the Engine.IO client to the latest version so expect bugs to be fixed there as well. In addition to that we ship a new patch for the Engine.IO client which will remove the
ActiveXObject word from the source code and replaces it with an obfuscated version so the code is not blocked by certain cough bluecoat cough proxies. (same patch is also applied to SockJS who suffers from the same bug)
Once again, thanks all contributors, developers and users for reporting and fixing these bugs. <3!