Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
c31dc1d
e2e test for GaToSplit integration auto-require
EmilianoSanchez Jun 6, 2022
0af2df7
Merge branch 'master' into ga_auto_require
EmilianoSanchez Jun 15, 2022
6a6baa7
prepare rc
EmilianoSanchez Jun 15, 2022
3b372d7
build script
EmilianoSanchez Jun 28, 2022
5ca86a9
upgrade js-commons
EmilianoSanchez Jun 28, 2022
dfb185e
Merge branch 'update-commons' into ga_auto_require
EmilianoSanchez Jun 28, 2022
bbc29e5
autoRequire script
EmilianoSanchez Jun 28, 2022
2f45882
prepare rc
EmilianoSanchez Jun 28, 2022
4ad1d17
prepare rc
EmilianoSanchez Jun 28, 2022
1db9f63
fix e2e test
EmilianoSanchez Jun 28, 2022
7c4c31d
polishing
EmilianoSanchez Jun 28, 2022
9d099ee
update E2E tests
EmilianoSanchez Jun 29, 2022
acb9423
Merge branch 'development' into browser_listener_update_
EmilianoSanchez Jul 5, 2022
7891476
update js-commons
EmilianoSanchez Jul 5, 2022
099702d
Merge pull request #690 from splitio/browser_listener_update_
EmilianoSanchez Jul 5, 2022
f535cc8
Merge branch 'development' into ga_auto_require
EmilianoSanchez Jul 5, 2022
9b46d4d
rc
EmilianoSanchez Jul 5, 2022
57a84a8
update tests
EmilianoSanchez Jul 8, 2022
df3ce44
update tests after fixing syncTask in JS-commons
EmilianoSanchez Jul 17, 2022
524e65b
rc
EmilianoSanchez Jul 18, 2022
ec39145
rc
EmilianoSanchez Jul 18, 2022
70c6961
Added changelog entry
EmilianoSanchez Jul 18, 2022
be5610a
reduce tests flakiness due to telemetry sample rate
EmilianoSanchez Jul 19, 2022
0d14fb5
Bump terser from 5.9.0 to 5.14.2
dependabot[bot] Jul 20, 2022
b167d07
Merge pull request #694 from splitio/dependabot/npm_and_yarn/terser-5…
EmilianoSanchez Jul 20, 2022
3791617
rollback ci-cd
EmilianoSanchez Jul 20, 2022
fa29803
Merge branch 'development' into cdn_bypass_tests
EmilianoSanchez Jul 20, 2022
398d818
Merge pull request #693 from splitio/cdn_bypass_tests
EmilianoSanchez Jul 20, 2022
04ecd9a
added js-yaml dep and LocalhostFromFile module
EmilianoSanchez Jul 20, 2022
7895ee6
restore ci-cd
EmilianoSanchez Jul 20, 2022
7c60f5e
Merge pull request #695 from splitio/refactor_localhostfromfile
EmilianoSanchez Jul 21, 2022
a9e2a54
Merge branch 'development' into ga_auto_require
EmilianoSanchez Jul 21, 2022
006d164
stable release version
EmilianoSanchez Jul 21, 2022
6a91d91
update changelog entry
EmilianoSanchez Jul 21, 2022
9653309
Merge pull request #683 from splitio/ga_auto_require
EmilianoSanchez Jul 21, 2022
97b4b70
upgrade js-commons
EmilianoSanchez Jul 22, 2022
3761045
Merge pull request #698 from splitio/release_v10.21.0
EmilianoSanchez Jul 22, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ jobs:
- name: npm Build
run: BUILD_BRANCH=$(echo "${GITHUB_REF#refs/heads/}") BUILD_COMMIT=${{ github.sha }} npm run build

- name: npm Build GaToSplit auto-require script
run: npm run build:ga-to-split-autorequire

- name: Configure AWS credentials (development)
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/development' }}
uses: aws-actions/configure-aws-credentials@v1
Expand Down
7 changes: 7 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
10.21.0 (July 22, 2022)
- 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.
- Bugfixing - Moved js-yaml dependency from @splitsoftware/splitio-commons to avoid resolution to an incompatible version on certain npm versions when installing third-party dependencies that also define js-yaml as transitive dependency (Related to issue https://github.com/splitio/javascript-client/issues/662).

10.20.0 (June 29, 2022)
- 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.
- Updated telemetry logic to track the anonymous config for user consent flag set to declined or unknown.
Expand Down
142 changes: 92 additions & 50 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@splitsoftware/splitio",
"version": "10.20.0",
"version": "10.21.0",
"description": "Split SDK",
"files": [
"README.md",
Expand All @@ -10,7 +10,8 @@
"lib",
"types",
"es",
"src"
"src",
"scripts/ga-to-split-autorequire.js"
],
"repository": "splitio/javascript-client",
"homepage": "https://github.com/splitio/javascript-client#readme",
Expand All @@ -32,11 +33,11 @@
"node": ">=6"
},
"dependencies": {
"@splitsoftware/splitio-commons": "1.5.0",
"@splitsoftware/splitio-commons": "1.6.1",
"@types/google.analytics": "0.0.40",
"@types/ioredis": "^4.28.0",
"ioredis": "^4.28.0",
"js-yaml": "3.13.1",
"js-yaml": "^3.13.1",
"node-fetch": "^2.6.7",
"unfetch": "^4.2.0"
},
Expand Down Expand Up @@ -83,6 +84,7 @@
"postbuild-cjs": "cross-env NODE_ENV=cjs node scripts/copy.packages.json.js && ./scripts/build_cjs_replace_imports.sh",
"build-umd": "webpack --config webpack.dev.js --env branch=$BUILD_BRANCH --env commit_hash=$BUILD_COMMIT && webpack --config webpack.prod.js --env branch=$BUILD_BRANCH --env commit_hash=$BUILD_COMMIT && ./scripts/clean_umd_build.sh",
"build:npm": "rimraf lib es && npm run build-cjs && npm run build-esm",
"build:ga-to-split-autorequire": "terser ./node_modules/@splitsoftware/splitio-commons/src/integrations/ga/autoRequire.js --mangle --output ./scripts/ga-to-split-autorequire.js && cp ./scripts/ga-to-split-autorequire.js umd/ga-to-split-autorequire.js",
"build": "rimraf lib umd es && npm run build-cjs && npm run build-esm && npm run build-umd",
"check": "npm run check:lint && npm run check:version",
"check:lint": "eslint src",
Expand Down
1 change: 1 addition & 0 deletions scripts/ga-to-split-autorequire.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 6 additions & 8 deletions src/__tests__/browser.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ import telemetrySuite from './browserSuites/telemetry.spec';
import impressionsListenerSuite from './browserSuites/impressions-listener.spec';
import readinessSuite from './browserSuites/readiness.spec';
import readyFromCache from './browserSuites/ready-from-cache.spec';
import {
withoutBindingTT,
bindingTT
} from './browserSuites/events.spec';
import { withoutBindingTT, bindingTT } from './browserSuites/events.spec';
import sharedInstantiationSuite from './browserSuites/shared-instantiation.spec';
import managerSuite from './browserSuites/manager.spec';
import ignoreIpAddressesSettingSuite from './browserSuites/ignore-ip-addresses-setting.spec';
Expand Down Expand Up @@ -84,7 +81,7 @@ const configInLocalStorage = {
streamingEnabled: false
};

tape('## E2E CI Tests ##', function(assert) {
tape('## E2E CI Tests ##', function (assert) {
//If we change the mocks, we need to clear localstorage. Cleaning up after testing ensures "fresh data".
localStorage.clear();

Expand All @@ -96,6 +93,7 @@ tape('## E2E CI Tests ##', function(assert) {
fetchMock.get(url(settings, '/mySegments/emmanuel%40split.io'), { status: 200, body: mySegmentsEmmanuel });
fetchMock.post(url(settings, '/testImpressions/bulk'), 200);
fetchMock.post(url(settings, '/testImpressions/count'), 200);
Math.random = () => 0.5; // SDKs without telemetry

/* Check client evaluations. */
assert.test('E2E / In Memory', evaluationsSuite.bind(null, configInMemory, fetchMock));
Expand All @@ -122,9 +120,9 @@ tape('## E2E CI Tests ##', function(assert) {
assert.test('E2E / Readiness', readinessSuite.bind(null, fetchMock));
/* Validate headers for ip and hostname are not sended with requests (ignore setting IPAddressesEnabled) */
assert.test('E2E / Ignore setting IPAddressesEnabled', ignoreIpAddressesSettingSuite.bind(null, fetchMock));
/* Check that impressions and events are sended to backend via Beacon API or Fetch when page unload is triggered. */
assert.test('E2E / Use Beacon API (or Fetch if not available) to send remaining impressions and events when browser page is unload', useBeaconApiSuite.bind(null, fetchMock));
assert.test('E2E / Use Beacon API DEBUG (or Fetch if not available) to send remaining impressions and events when browser page is unload', useBeaconDebugApiSuite.bind(null, fetchMock));
/* Check that impressions and events are sended to backend via Beacon API or Fetch when pagehide/visibilitychange events are triggered. */
assert.test('E2E / Use Beacon API (or Fetch if not available) to send remaining impressions and events when browser page is unload or hidden', useBeaconApiSuite.bind(null, fetchMock));
assert.test('E2E / Use Beacon API DEBUG (or Fetch if not available) to send remaining impressions and events when browser page is unload or hidden', useBeaconDebugApiSuite.bind(null, fetchMock));
/* Validate ready from cache behaviour (might be merged into another suite if we end up having simple behavior around it as expected) */
assert.test('E2E / Readiness from cache', readyFromCache.bind(null, fetchMock));
/* Validate readiness with ready promises */
Expand Down
Loading