Snowplow JS Analytics SDK 0.3.0 released


We are pleased to announce a new release of the Snowplow Javascript and Typescript Analytics SDK. Version 0.3.0 brings some major improvements to the build process, support for ECMAScript Modules and a couple of bug fixes!
The Snowplow Analytics SDKs provide the ability to work with Snowplow Enriched events. They are particularly well suited to use in AWS Lambdas or with Apache Spark. We currently offer the JavaScript and TypeScript SDK as well as Scala, Python and .NET Analytics SDKs. You can read more about the Analytics SDKs along with more use cases for them here on our Wiki.
We have to thank Michael Dokolin for this huge contribution! All of the changes you see below have been done by Michael and we’re extremely grateful for his hard work.
Read on below for:
- Support for ECMAScript Modules
- Build Improvements
- Updates and bug fixes
- Upgrading
- Documentation and help
1. Support for ECMAScript Modules
Due to the build improvements made in this release, we are now able to offer this SDK in both UMD and ES module formats. When installing the SDKs via NPM, you will now be able to utilise either version depending on your applications configuration. The two options are defined in package.json so this will work automatically in your application after upgrading.
2. Build Improvements
To achieve support for ECMAScript Modules as well as improving the general development experience within this SDK, a number of updates have been made. This SDK has been migrated to rollupjs for module bundling as well as having eslint and prettier added. The full list of new improvements are:
- Upgrade development dependencies (#23).
- Migrate to rollup (#22).
- Migrate to the Airbnb style guide (#21).
- Add code linting as a build step (#27).
- Migrate to the automated builds (#20).
- Refactor unit-tests (#28).
- Remove non-LTS Node.js versions from Travis CI configuration (#19).
- Enable TypeScript strict mode (#15).
- Migrate to eslint (#18).
- Migrate to prettier (#17).
3. Updates and bug fixes
In addition to the build updates, two outstanding issues have been solved:
- Add dashes support in the schema organization name (#12).
- Rename refr_device_tstamp to refr_dvce_tstamp (#13).
4. Upgrading
The Snowplow JavaScript and TypeScript Analytics SDK is available on NPM. Snowplow BDP and Open Source users can install it with NPM:
npm install --save snowplow-analytics-sdk
If you think you might be using an earlier version, you can check with:
npm outdated
If you are already using an earlier version, you can update your package.json to the latest version with:
npm install --save snowplow-analytics-sdk@latest
5. Documentation and help
Check out the JavaScript and TypeScript Analytics SDK’s documentation:
- The setup guide
- The API
- The Snowplow Analytics SDK documentation
The v0.3.0 release page on GitHub has the full list of changes made in this version.
Finally, if you run into any issues or have any questions, please raise an issue or get in touch with us via our Discourse forums.