Blog

Jul
01
2015

Cylon.js 1.1.0 - The Big Cleanup

by Andrew Stewart

Cylon.js 1.1.0 has just been released, and from the external interfaces it appears only a few small changes and additions. However, the internals have had a fairly sizable refactoring, meriting a release. There is a small potential for backwards compatability issues for users making use of undocumented properties on the main Cylon.js exports object.

Here's a overview of the changes, but if you want to see more check out the compare view on GitHub.

  • ESLint - we've switched to using ESLint for linting, over JSHint. ESLint's better support for validating coding styles and conventions has been a great asset to us. This has also resulted in a number of fixes to prevent potential minor issues in core.

  • async - we've removed Cylon's last remaining core dependency, async. This has the benefit of reducing Cylon install sizes across projects.

  • MCP refactor - we've split apart the existing lib/cylon.js exports module into three new files, for better separation of responsibilities. This may result in some backwards compatability concerns if you were previously using undocumented properties on the main Cylon object, such as Cylon.robots, the Cylon.toJSON method, or Cylon.apiInstances. For more details, see the pull request diff.

  • Robot Naming - previously, robot names were generated pseudo-randomly if the user didn't explicitly supply one. While this helped avoid collisions, it led to confusion when Cylon programs were restarted, as Robots couldn't be found under the same name. In Cylon 1.1.0, un-named robots are now assigned an incremental name, e.g. "Robot 1", "Robot 2", etc.

  • Better validation - we've improved validation of Robot options, to provide better clues as to what's preventing your robot from working. We now better check for invalid syntax that would possibly result in an obscure error, ensuring that a better response is generated. Also, we now provide a useful warning message when multiple connections exist, and devices are specified without an explicit connection.

  • Contribution Guidelines and CoC - We've added a more explicit set of contribution guidelines, based on the iojs guidelines. Additionally, we've outlined a Code of Conduct, adapted from Rust's CoC guidelines.

Even More Hardware Support

Of course, it wouldn't be a Cylon.js release without new or enhanced platform support, and we've got a bunch!

We've now added improved flight and video support for the Parrot Bebop drone.

We've also updated our support for Nest, to fully cover the Nest Protect, Nest Home, and Nest Thermostat.

Additionally, we've fixed compilation issues for a few of our modules that had issues on newer versions of V8. cylon-joystick and cylon-digispark should now work fully on Node v0.12 and iojs. All the future nodes belong to us!

And last, but certainly not least, we've also updated cylon-sphero to use the new Sphero.js library from Orbotix.

For the latest updates, be sure to follow us on Twitter at @CylonJS.