diff --git a/CHANGELOG.md b/CHANGELOG.md index dc13bb8b..1416f777 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,36 @@ +# [6.0.0](https://github.com/segmentio/typewriter/compare/5.1.8...6.0.0) (2019-01-30) + + +### Bug Fixes + +* javascript clients accepted context rather than options ([#51](https://github.com/segmentio/typewriter/issues/51)) ([5222145](https://github.com/segmentio/typewriter/commit/5222145)) + + +### BREAKING CHANGES + +* if you previously passed `context` directly as the final + parameter to the `analytics.js` or `analytics-node` clients, then you'll + need to update it, like so: + + If you made a call like: + + ``` + typewriter.thingHappened({ when: 'now' }, { groupId: 123 }) + ``` + + Then you would need to update it to: + + ``` + typewriter.thingHappened({ when: 'now' }, { + context: { groupId: 123 } + }) + ``` + + This allows you to pass `integrations` and other fields in through this + object, and aligns the TypeScript declarations with the underlying library. + + + ## [5.1.8](https://github.com/segmentio/typewriter/compare/5.1.7...5.1.8) (2019-01-29) diff --git a/examples/gen-ios/objectivec/TypewriterExample/Analytics/SEGKicksAppAnalytics.m b/examples/gen-ios/objectivec/TypewriterExample/Analytics/SEGKicksAppAnalytics.m index 156ef64d..766d1cb1 100644 --- a/examples/gen-ios/objectivec/TypewriterExample/Analytics/SEGKicksAppAnalytics.m +++ b/examples/gen-ios/objectivec/TypewriterExample/Analytics/SEGKicksAppAnalytics.m @@ -15,7 +15,7 @@ static id NSNullify(id _Nullable x) { NSDictionary *typewriterContext = @{ @"typewriter": @{ @"name": @"gen-ios", - @"version": @"5.1.8" + @"version": @"6.0.0" } }; NSMutableDictionary *context = [NSMutableDictionary dictionaryWithCapacity:customContext.count + typewriterContext.count]; diff --git a/examples/gen-js/js/analytics/generated/index.js b/examples/gen-js/js/analytics/generated/index.js index fbb0d0d7..67e56ed5 100644 --- a/examples/gen-js/js/analytics/generated/index.js +++ b/examples/gen-js/js/analytics/generated/index.js @@ -14,7 +14,7 @@ export default class Analytics { ...context, typewriter: { name: "gen-js", - version: "5.1.8" + version: "6.0.0" } }; } diff --git a/examples/gen-js/node/analytics/generated/index.js b/examples/gen-js/node/analytics/generated/index.js index a7230f9c..50ec35ed 100644 --- a/examples/gen-js/node/analytics/generated/index.js +++ b/examples/gen-js/node/analytics/generated/index.js @@ -15,7 +15,7 @@ class Analytics { return Object.assign({}, context, { typewriter: { name: "gen-js", - version: "5.1.8" + version: "6.0.0" } }); } diff --git a/examples/gen-js/ts/analytics/generated/index.js b/examples/gen-js/ts/analytics/generated/index.js index fbb0d0d7..67e56ed5 100644 --- a/examples/gen-js/ts/analytics/generated/index.js +++ b/examples/gen-js/ts/analytics/generated/index.js @@ -14,7 +14,7 @@ export default class Analytics { ...context, typewriter: { name: "gen-js", - version: "5.1.8" + version: "6.0.0" } }; } diff --git a/package.json b/package.json index 4bbd141b..2133f0eb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "typewriter", - "version": "5.1.8", + "version": "6.0.0", "description": "A compiler for generating strongly typed analytics clients from JSON Schema", "keywords": [ "analytics", diff --git a/tests/commands/gen-ios/__snapshots__/SEGTestTrackingPlanAnalytics.m b/tests/commands/gen-ios/__snapshots__/SEGTestTrackingPlanAnalytics.m index e925d47c..d21dea25 100644 --- a/tests/commands/gen-ios/__snapshots__/SEGTestTrackingPlanAnalytics.m +++ b/tests/commands/gen-ios/__snapshots__/SEGTestTrackingPlanAnalytics.m @@ -15,7 +15,7 @@ static id NSNullify(id _Nullable x) { NSDictionary *typewriterContext = @{ @"typewriter": @{ @"name": @"gen-ios", - @"version": @"5.1.8" + @"version": @"6.0.0" } }; NSMutableDictionary *context = [NSMutableDictionary dictionaryWithCapacity:customContext.count + typewriterContext.count]; diff --git a/tests/commands/gen-js/__snapshots__/index.amd.js b/tests/commands/gen-js/__snapshots__/index.amd.js index 6f0948ef..72e23148 100644 --- a/tests/commands/gen-js/__snapshots__/index.amd.js +++ b/tests/commands/gen-js/__snapshots__/index.amd.js @@ -17,7 +17,7 @@ define(["require", "exports"], function(require, exports) { ...context, typewriter: { name: "gen-js", - version: "5.1.8" + version: "6.0.0" } }; } diff --git a/tests/commands/gen-js/__snapshots__/index.es5.js b/tests/commands/gen-js/__snapshots__/index.es5.js index 08468445..f3893707 100644 --- a/tests/commands/gen-js/__snapshots__/index.es5.js +++ b/tests/commands/gen-js/__snapshots__/index.es5.js @@ -37,7 +37,7 @@ var Analytics = /** @class */ (function() { return __assign({}, context, { typewriter: { name: "gen-js", - version: "5.1.8" + version: "6.0.0" } }); }; diff --git a/tests/commands/gen-js/__snapshots__/index.es5.node.js b/tests/commands/gen-js/__snapshots__/index.es5.node.js index bc9652be..03b8bbe3 100644 --- a/tests/commands/gen-js/__snapshots__/index.es5.node.js +++ b/tests/commands/gen-js/__snapshots__/index.es5.node.js @@ -37,7 +37,7 @@ var Analytics = /** @class */ (function() { return __assign({}, context, { typewriter: { name: "gen-js", - version: "5.1.8" + version: "6.0.0" } }); }; diff --git a/tests/commands/gen-js/__snapshots__/index.js b/tests/commands/gen-js/__snapshots__/index.js index adebb7bc..8daf5326 100644 --- a/tests/commands/gen-js/__snapshots__/index.js +++ b/tests/commands/gen-js/__snapshots__/index.js @@ -14,7 +14,7 @@ export default class Analytics { ...context, typewriter: { name: "gen-js", - version: "5.1.8" + version: "6.0.0" } }; } diff --git a/tests/commands/gen-js/__snapshots__/index.node.js b/tests/commands/gen-js/__snapshots__/index.node.js index e77e1f7b..71e39ef4 100644 --- a/tests/commands/gen-js/__snapshots__/index.node.js +++ b/tests/commands/gen-js/__snapshots__/index.node.js @@ -15,7 +15,7 @@ class Analytics { return Object.assign({}, context, { typewriter: { name: "gen-js", - version: "5.1.8" + version: "6.0.0" } }); } diff --git a/tests/commands/gen-js/__snapshots__/index.prod.js b/tests/commands/gen-js/__snapshots__/index.prod.js index 73c6f506..a901031b 100644 --- a/tests/commands/gen-js/__snapshots__/index.prod.js +++ b/tests/commands/gen-js/__snapshots__/index.prod.js @@ -11,7 +11,7 @@ export default class Analytics { ...context, typewriter: { name: "gen-js", - version: "5.1.8" + version: "6.0.0" } }; } diff --git a/tests/commands/gen-js/__snapshots__/index.prod.node.js b/tests/commands/gen-js/__snapshots__/index.prod.node.js index 37ad1f2b..a0794415 100644 --- a/tests/commands/gen-js/__snapshots__/index.prod.node.js +++ b/tests/commands/gen-js/__snapshots__/index.prod.node.js @@ -12,7 +12,7 @@ class Analytics { return Object.assign({}, context, { typewriter: { name: "gen-js", - version: "5.1.8" + version: "6.0.0" } }); } diff --git a/tests/commands/gen-js/__snapshots__/index.system.js b/tests/commands/gen-js/__snapshots__/index.system.js index de1f4539..15c8d6d8 100644 --- a/tests/commands/gen-js/__snapshots__/index.system.js +++ b/tests/commands/gen-js/__snapshots__/index.system.js @@ -21,7 +21,7 @@ System.register([], function(exports_1, context_1) { ...context, typewriter: { name: "gen-js", - version: "5.1.8" + version: "6.0.0" } }; } diff --git a/tests/commands/gen-js/__snapshots__/index.umd.js b/tests/commands/gen-js/__snapshots__/index.umd.js index 5c653246..4e4fcd2a 100644 --- a/tests/commands/gen-js/__snapshots__/index.umd.js +++ b/tests/commands/gen-js/__snapshots__/index.umd.js @@ -24,7 +24,7 @@ ...context, typewriter: { name: "gen-js", - version: "5.1.8" + version: "6.0.0" } }; }