diff --git a/CHANGES.txt b/CHANGES.txt index 109ea3a..0903473 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,10 @@ +1.7.0 (July 25, 2022) + - Updated @splitsoftware/splitio dependency to version 10.21.1, which includes: + - Added `autoRequire` configuration option to the Google Analytics to Split integration, which takes care of requiring the splitTracker plugin on trackers dynamically created by Google tag managers (See https://help.split.io/hc/en-us/articles/360040838752#set-up-with-gtm-and-gtag.js). + - Updated browser listener to push remaining impressions and events on 'visibilitychange' and 'pagehide' DOM events, instead of 'unload', which is not reliable in modern mobile and desktop Web browsers. + - Updated the synchronization flow to be more reliable in the event of an edge case generating delay in cache purge propagation, keeping the SDK cache properly synced. + - Updated some dependencies for vulnerability fixes. + 1.6.0 (June 30, 2022) - Updated @splitsoftware/splitio dependency to version 10.20.0, which includes: - Added a new config option to control the tasks that listen or poll for updates on feature flags and segments, via the new config sync.enabled . Running online Split will always pull the most recent updates upon initialization, this only affects updates fetching on a running instance. Useful when a consistent session experience is a must or to save resources when updates are not being used. diff --git a/package-lock.json b/package-lock.json index 6deedf4..9b7e032 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@splitsoftware/splitio-react", - "version": "1.6.0", + "version": "1.7.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -1302,19 +1302,30 @@ } }, "@splitsoftware/splitio": { - "version": "10.20.0", - "resolved": "https://registry.npmjs.org/@splitsoftware/splitio/-/splitio-10.20.0.tgz", - "integrity": "sha512-nQR2clHvxDu7xUtp6otHHLAGmZXv3d483uWLIsZRxpjYJ7TFYpomiU+xPqOZCrwzV2uVq4E9+gX0eNQl7mV+Qw==", + "version": "10.21.1", + "resolved": "https://registry.npmjs.org/@splitsoftware/splitio/-/splitio-10.21.1.tgz", + "integrity": "sha512-rV5zGsaZrwNuSjTbWmT1fLLi6adqCFUwDqAPPapjLTi/hxKOtS3a0TWOOv+bwMmdHJy1wT5bysOxtzTaibcnhw==", "dev": true, "requires": { - "@splitsoftware/splitio-commons": "1.5.0", + "@splitsoftware/splitio-commons": "1.6.1", "@types/google.analytics": "0.0.40", "@types/ioredis": "^4.28.0", "eventsource": "^1.1.2", "ioredis": "^4.28.0", - "js-yaml": "3.13.1", + "js-yaml": "^3.13.1", "node-fetch": "^2.6.7", "unfetch": "^4.2.0" + }, + "dependencies": { + "@splitsoftware/splitio-commons": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/@splitsoftware/splitio-commons/-/splitio-commons-1.6.1.tgz", + "integrity": "sha512-lijSMpX5a7HiphPnzr7fKlicGSd5TeBWX5URLPWfL87SPlO+8iF7S7PNFPg8GMu+44CdRrp4REHPJo97ht6ePQ==", + "dev": true, + "requires": { + "tslib": "^2.3.1" + } + } } }, "@splitsoftware/splitio-commons": { diff --git a/package.json b/package.json index 25fbc35..ba814b4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@splitsoftware/splitio-react", - "version": "1.6.0", + "version": "1.7.0", "description": "A React library to easily integrate and use Split JS SDK", "main": "lib/index.js", "module": "es/index.js", @@ -69,7 +69,7 @@ "unfetch": "^4.2.0" }, "devDependencies": { - "@splitsoftware/splitio": "10.20.0", + "@splitsoftware/splitio": "10.21.1", "@types/enzyme": "^3.10.4", "@types/enzyme-adapter-react-16": "^1.0.5", "@types/events": "^3.0.0", diff --git a/types/splitio/splitio.d.ts b/types/splitio/splitio.d.ts index 7942a94..bba9086 100644 --- a/types/splitio/splitio.d.ts +++ b/types/splitio/splitio.d.ts @@ -236,8 +236,13 @@ interface ISharedSettings { */ impressionsMode?: SplitIO.ImpressionsMode, /** - * Enables synchronization of rollout plan or segment updates while the SDK instance is running. Does not affect initialization fetches. + * Controls the SDK continuous synchronization flags. + * + * When `true` a running SDK will process rollout plan updates performed on the UI (default). + * When false it'll just fetch all data upon init + * * @property {boolean} enabled + * @default true */ enabled?: boolean } @@ -722,7 +727,7 @@ declare namespace SplitIO { /** * Enable 'Google Analytics to Split' integration, to track Google Analytics hits as Split events. * - * @see {@link https://help.split.io/hc/en-us/articles/360020448791-JavaScript-SDK#integrations} + * @see {@link https://help.split.io/hc/en-us/articles/360040838752#google-analytics-to-split} */ interface IGoogleAnalyticsToSplitConfig { type: 'GOOGLE_ANALYTICS_TO_SPLIT', @@ -764,6 +769,17 @@ declare namespace SplitIO { * If not provided, events are sent using the key and traffic type provided at SDK config */ identities?: Identity[], + /** + * Optional flag to log an error if the `auto-require` script is not detected. + * The auto-require script automatically requires the `splitTracker` plugin for created trackers, + * and should be placed right after your Google Analytics, Google Tag Manager or gtag.js script tag. + * + * @see {@link https://help.split.io/hc/en-us/articles/360040838752#set-up-with-gtm-and-gtag.js} + * + * @property {boolean} autoRequire + * @default false + */ + autoRequire?: boolean, } /** * Object representing the data sent by Split (events and impressions). @@ -775,7 +791,7 @@ declare namespace SplitIO { /** * Enable 'Split to Google Analytics' integration, to track Split impressions and events as Google Analytics hits. * - * @see {@link https://help.split.io/hc/en-us/articles/360020448791-JavaScript-SDK#integrations} + * @see {@link https://help.split.io/hc/en-us/articles/360040838752#split-to-google-analytics} */ interface ISplitToGoogleAnalyticsConfig { type: 'SPLIT_TO_GOOGLE_ANALYTICS',