Version 6.0.0 of the JavaScript driver arangojs is now available (Find it on GitHub).

This is a major release that introduces a small number of breaking changes so make sure to check out the arangojs changelog before upgrading. The most significant additions in this release are support for load balancing and automated failover as well as improved browser and TypeScript support.

In order to use the new load balancing and failover features, you can pass an array of URLs instead of a single URL when creating a new arangojs instance. The driver will automatically cycle between the URLs when the active server becomes unreachable. To cycle between servers for every request you can additionally provide the loadBalancingStrategy option:

When using ArangoDB in a cluster it’s also possible to auto-populate the URL list using the new acquireHostList method:

When using ArangoDB in standalone mode, leader/follower failover is handled automatically for each request.

New to multi-model and graphs? Check out our free ArangoDB Graph Course.

Support for bower has been officially removed in this release. A precompiled browser build is now included with the npm release. When working with arangojs in client-side projects the browser build can now also be used from the unpkg CDN for development:

Finally, the arangojs project has been completely ported to TypeScript. The typings included in arangojs releases are now generated at build time from the TypeScript source, making them more reliable and useful than the community-provided typings included in previous releases.

Don’t want to use TypeScript? Don’t worry, arangojs still works with regular JavaScript. If you are using IDEs or editors like Visual Studio Code you should also see improvements in code intelligence when using arangojs in JavaScript.

Find more information about arangojs on GitHub or the yarn package details.