Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Bug fix

@lpinca lpinca released this · 6 commits to master since this release

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 yeast module.

Downloads

3... 2... 1... Go!

@lpinca lpinca released this · 16 commits to master since this release

This patch release updates the SockJS client-side library shipped with Primus to its latest version (1.0.2).

Downloads

Broken parser

@lpinca lpinca released this · 20 commits to master since this release

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).

Downloads

Restore the functionality of the plugins

@lpinca lpinca released this · 31 commits to master since this release

In Primus 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.

Downloads

DOM free URL parsing

@lpinca lpinca released this · 34 commits to master since this release

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.

New features

A new event called heartbeat is emitted on the spark instance every time the heartbeat timeout is reset.

Bug fixes

  • Fixed a bug that was preventing the client from being closed if the end() method was called right after creating the client instance.
  • Fixed a race condition that could make the server crash when using the websockets transformer.

Other notable changes

  • The ping option on the client is now automatically set to false if the heartbeats are disabled.
  • Added missing documentation for the Primus.prototype.id() method.
  • Updated the SockJS client-side library to version 1.0.0.
  • Updated dependencies.

Downloads

Corrupted dist file

@3rd-Eden 3rd-Eden released this · 76 commits to master since this release

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:

  • Version number
  • Transformer library
  • Parser library
  • Pathname
  • Timeouts

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!

Downloads

Premature push

@3rd-Eden 3rd-Eden released this · 77 commits to master since this release

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 ;-)

Downloads

Massive client refactor

@3rd-Eden 3rd-Eden released this · 80 commits to master since this release

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:

SockJS

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.

Socket.IO

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.

Compression

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.

Reconnection

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.

Destruction

A new 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.

URL Parsing

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!

Documentation

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.

Breaking changes

  • The reconnect options have been renamed as we are now using the recovery module.
  • Reconnect events have been renamed and receive slightly different data structures when emitted. E.g. reconnecting has been renamed to reconnect scheduled.
  • We no longer override Primus.prototype with your custom global name but only export our Primus instance as your set global.
  • Complete internal refactor of the client, so if you've been secretly using our internals, you might need to fix something ;p

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

Downloads

New Engine.IO-client

@3rd-Eden 3rd-Eden released this · 220 commits to master since this release

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!

Downloads

House keeping

@3rd-Eden 3rd-Eden released this · 223 commits to master since this release

This releases comes with a lot of minor changes and patches.

Deprecation

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.

Event Listener Maid

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.

EventEmitter3

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.

Reconnection

We're now actively canceling any reconnect attempt that we receive when we go in the offline mode. This prevents pointless reconnection attempts.

Engine.IO

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!

Downloads

Something went wrong with that request. Please try again.