Snowtype v0.6.0 released!

Snowtype v0.6.0 released! :bullettrain_side:

  • Allow for client-side validations in JavaScript for @snowplow/browser-tracker.
  • Fix validation object pruning on large array elements, preventing ‘…N more items’ on the validation file.
  • Allow adding custom schema and cardinality rules violations handler using the snowtype.
  • Add a new export object snowtype on trackers that provide the violations handler. Currently available only on the @snowplow/browser-tracker.
  • The snowtype object has a method setOptions that allows for setting options, for now it only supports violationsHandler.
  • Introduce the capability to add a custom violationsHandler that gets called on schema and entity rules validation errors.
  • Each violation error has its own code so that it can be easily discerned and debugged.
  • Detects process.env.NODE_ENV=test and throws by default. This will help out during automated testing.
  • Fix TypeScript issue on React Native Argument of type 'SelfDescribing<T>[] | null | undefined' is not assignable to parameter of type 'EventContext[] | undefined'.
  • Fix TypeScript issue for @snowplow/browser-tracker @snowplow/node-tracker and @snowplow/react-native-tracker with mixed-typed arrays on context type argument.
  • Deduplicate event specification IDs on generation.

Documentation for the custom violation handler is here!

https://www.npmjs.com/package/@snowplow/snowtype

2 Likes