From 8da3e946fefa09d21bcb1e1022d03fadd4cf36ef Mon Sep 17 00:00:00 2001 From: Emiliano Sanchez Date: Mon, 27 May 2024 18:29:53 -0300 Subject: [PATCH 1/4] Update JS-commons --- CHANGES.txt | 5 ++++- package-lock.json | 14 +++++++------- package.json | 2 +- .../browserSuites/ready-from-cache.spec.js | 8 ++++---- src/__tests__/errorCatching/browser.spec.js | 2 +- 5 files changed, 17 insertions(+), 14 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 2ebf867..04532fb 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,6 @@ +0.14.1 (June XX, 2024) + - Updated @splitsoftware/splitio-commons package to version 1.15.1 that includes updates on input validation logs. + 0.14.0 (May 6, 2024) - Updated @splitsoftware/splitio-commons package to version 1.14.0 that includes minor updates: - Added support for targeting rules based on semantic versions (https://semver.org/). @@ -77,7 +80,7 @@ - Updated some dependencies for vulnerability fixes. 0.7.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. + - 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. - Updated submitters logic, to avoid duplicating the post of impressions to Split cloud when the SDK is destroyed while its periodic post of impressions is running. - Bugfixing - Updated submitters logic, to avoid dropping impressions and events that are being tracked while POST request is pending. diff --git a/package-lock.json b/package-lock.json index 42b12b8..1c8a1b2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "0.14.0", "license": "Apache-2.0", "dependencies": { - "@splitsoftware/splitio-commons": "1.14.0", + "@splitsoftware/splitio-commons": "1.15.1-rc.0", "@types/google.analytics": "0.0.40", "tslib": "^2.3.1", "unfetch": "^4.2.0" @@ -1500,9 +1500,9 @@ "dev": true }, "node_modules/@splitsoftware/splitio-commons": { - "version": "1.14.0", - "resolved": "https://registry.npmjs.org/@splitsoftware/splitio-commons/-/splitio-commons-1.14.0.tgz", - "integrity": "sha512-ANP0NRPAMehi4bUQsb19kP5W5NVuCYUKRsDC5Nl78xHIu6cskAej1rXkjsocLnWerz2rO0H9kMjRKZj9lVsvKA==", + "version": "1.15.1-rc.0", + "resolved": "https://registry.npmjs.org/@splitsoftware/splitio-commons/-/splitio-commons-1.15.1-rc.0.tgz", + "integrity": "sha512-lWMU+lwsNG3rT3QlgzjBDDNNuD/RPvwa3RT0bJjHN7nERL9Z8rnRaI2zW0tdgwGUykW6kcsDNcCSFCErsSRkSw==", "dependencies": { "tslib": "^2.3.1" }, @@ -10590,9 +10590,9 @@ "dev": true }, "@splitsoftware/splitio-commons": { - "version": "1.14.0", - "resolved": "https://registry.npmjs.org/@splitsoftware/splitio-commons/-/splitio-commons-1.14.0.tgz", - "integrity": "sha512-ANP0NRPAMehi4bUQsb19kP5W5NVuCYUKRsDC5Nl78xHIu6cskAej1rXkjsocLnWerz2rO0H9kMjRKZj9lVsvKA==", + "version": "1.15.1-rc.0", + "resolved": "https://registry.npmjs.org/@splitsoftware/splitio-commons/-/splitio-commons-1.15.1-rc.0.tgz", + "integrity": "sha512-lWMU+lwsNG3rT3QlgzjBDDNNuD/RPvwa3RT0bJjHN7nERL9Z8rnRaI2zW0tdgwGUykW6kcsDNcCSFCErsSRkSw==", "requires": { "tslib": "^2.3.1" } diff --git a/package.json b/package.json index e2fa30c..1057d6e 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,7 @@ "bugs": "https://github.com/splitio/javascript-browser-client/issues", "homepage": "https://github.com/splitio/javascript-browser-client#readme", "dependencies": { - "@splitsoftware/splitio-commons": "1.14.0", + "@splitsoftware/splitio-commons": "1.15.1-rc.0", "@types/google.analytics": "0.0.40", "tslib": "^2.3.1", "unfetch": "^4.2.0" diff --git a/src/__tests__/browserSuites/ready-from-cache.spec.js b/src/__tests__/browserSuites/ready-from-cache.spec.js index 28af1af..8326136 100644 --- a/src/__tests__/browserSuites/ready-from-cache.spec.js +++ b/src/__tests__/browserSuites/ready-from-cache.spec.js @@ -582,7 +582,7 @@ export default function (fetchMock, assert) { fetchMock.getOnce(testUrls.sdk + '/splitChanges?s=1.1&since=25&names=p2__split&prefixes=p1', { status: 200, body: { splits: [splitDeclarations.p1__split, splitDeclarations.p2__split], since: 25, till: 1457552620999 } }, { delay: 10 }); // short delay to let emit SDK_READY_FROM_CACHE fetchMock.getOnce(testUrls.sdk + '/mySegments/nicolas%40split.io', { status: 200, body: { mySegments: [] } }); - const expectedHash = getStorageHash({ ...baseConfig, sync: { __splitFiltersValidation: { queryString: '&names=p2__split&prefixes=p1' } } }); + const expectedHash = getStorageHash({ ...baseConfig, sync: { __splitFiltersValidation: { queryString: '&names=p2__split&prefixes=p1' }, flagSpecVersion: '1.1' } }); localStorage.setItem('some_user_item', 'user_item'); localStorage.setItem('readyFromCache_6.SPLITIO.splits.till', 25); localStorage.setItem('readyFromCache_6.SPLITIO.split.p1__split', JSON.stringify(splitDeclarations.p1__split)); @@ -633,7 +633,7 @@ export default function (fetchMock, assert) { fetchMock.getOnce(testUrls.sdk + '/splitChanges?s=1.1&since=-1&prefixes=p1,p2', { status: 200, body: { splits: [splitDeclarations.p1__split, splitDeclarations.p2__split], since: -1, till: 1457552620999 } }, { delay: 10 }); // short delay to let emit SDK_READY_FROM_CACHE fetchMock.getOnce(testUrls.sdk + '/mySegments/nicolas%40split.io', { status: 200, body: { mySegments: [] } }); - const expectedHash = getStorageHash({ ...baseConfig, sync: { __splitFiltersValidation: { queryString: '&prefixes=p1,p2' } } }); + const expectedHash = getStorageHash({ ...baseConfig, sync: { __splitFiltersValidation: { queryString: '&prefixes=p1,p2' }, flagSpecVersion: '1.1' } }); localStorage.setItem('some_user_item', 'user_item'); localStorage.setItem('readyFromCache_7.SPLITIO.splits.till', 25); localStorage.setItem('readyFromCache_7.SPLITIO.split.p1__split', JSON.stringify(splitDeclarations.p1__split)); @@ -755,7 +755,7 @@ export default function (fetchMock, assert) { localStorage.setItem('readyFromCache_9.SPLITIO.splits.till', 25); localStorage.setItem('readyFromCache_9.SPLITIO.split.p1__split', JSON.stringify(splitDeclarations.p1__split)); localStorage.setItem('readyFromCache_9.SPLITIO.split.p2__split', JSON.stringify(splitDeclarations.p2__split)); - localStorage.setItem('readyFromCache_9.SPLITIO.hash', getStorageHash({ ...baseConfig, sync: { __splitFiltersValidation: { queryString: '&names=p2__split&prefixes=p1' } } })); + localStorage.setItem('readyFromCache_9.SPLITIO.hash', getStorageHash({ ...baseConfig, sync: { __splitFiltersValidation: { queryString: '&names=p2__split&prefixes=p1' }, flagSpecVersion: '1.1' } })); const splitio = SplitFactory({ ...baseConfig, @@ -784,7 +784,7 @@ export default function (fetchMock, assert) { t.equal(localStorage.getItem('readyFromCache_9.SPLITIO.splits.till'), '1457552620999', 'splits.till must correspond to the till of the last successfully fetched Splits'); t.equal(localStorage.getItem('readyFromCache_9.SPLITIO.split.p2__split'), JSON.stringify(splitDeclarations.p2__split), 'feature flag declarations must be cached'); t.equal(localStorage.getItem('readyFromCache_9.SPLITIO.split.p3__split'), JSON.stringify(splitDeclarations.p3__split), 'feature flag declarations must be cached'); - t.equal(localStorage.getItem('readyFromCache_9.SPLITIO.hash'), getStorageHash({ ...baseConfig, sync: { __splitFiltersValidation: { queryString: '&names=no%20exist%20trim,no_exist,p3__split&prefixes=no%20exist%20trim,p2' } } }), 'Storage hash must correspond to the split filter query and SDK key'); + t.equal(localStorage.getItem('readyFromCache_9.SPLITIO.hash'), getStorageHash({ ...baseConfig, sync: { __splitFiltersValidation: { queryString: '&names=no%20exist%20trim,no_exist,p3__split&prefixes=no%20exist%20trim,p2' }, flagSpecVersion: '1.1' } }), 'Storage hash must correspond to the split filter query and SDK key'); t.end(); }); }); diff --git a/src/__tests__/errorCatching/browser.spec.js b/src/__tests__/errorCatching/browser.spec.js index b13cb7f..6016001 100644 --- a/src/__tests__/errorCatching/browser.spec.js +++ b/src/__tests__/errorCatching/browser.spec.js @@ -21,7 +21,7 @@ const settings = settingsFactory({ // prepare localstorage to emit SDK_READY_FROM_CACHE localStorage.clear(); localStorage.setItem('SPLITIO.splits.till', 25); -localStorage.setItem('SPLITIO.hash', getStorageHash({ core: { authorizationKey: '' }, sync: { __splitFiltersValidation: { queryString: null } } })); +localStorage.setItem('SPLITIO.hash', getStorageHash({ core: { authorizationKey: '' }, sync: { __splitFiltersValidation: { queryString: null }, flagSpecVersion: '1.1' } })); fetchMock.get(url(settings, '/splitChanges?s=1.1&since=25'), function () { return new Promise((res) => { setTimeout(() => res({ status: 200, body: splitChangesMock1 }), 1000); }); From 97a8fc59a5248ce479d1a1a3c1b8e7df96f72df0 Mon Sep 17 00:00:00 2001 From: Emiliano Sanchez Date: Thu, 13 Jun 2024 20:26:55 -0300 Subject: [PATCH 2/4] Test localhost mode updates --- .github/workflows/ci-cd.yml | 4 +-- CHANGES.txt | 6 ++-- package-lock.json | 46 +++++++++++++-------------- package.json | 4 +-- src/__tests__/offline/browser.spec.js | 34 ++++++++++++++------ src/settings/defaults.ts | 2 +- 6 files changed, 57 insertions(+), 39 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index f55585a..9c5f49e 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -47,7 +47,7 @@ jobs: run: BUILD_BRANCH=$(echo "${GITHUB_REF#refs/heads/}") npm run build - name: Store assets - if: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/development' || github.ref == 'refs/heads/main') }} + if: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/update_js_commons' || github.ref == 'refs/heads/main') }} uses: actions/upload-artifact@v3 with: name: assets @@ -58,7 +58,7 @@ jobs: name: Upload assets runs-on: ubuntu-20.04 needs: build - if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/development' }} + if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/update_js_commons' }} strategy: matrix: environment: diff --git a/CHANGES.txt b/CHANGES.txt index 04532fb..59a2f18 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,5 +1,7 @@ -0.14.1 (June XX, 2024) - - Updated @splitsoftware/splitio-commons package to version 1.15.1 that includes updates on input validation logs. +0.14.1 (June 14, 2024) + - Updated @splitsoftware/splitio-commons package to version 1.16.0 that includes some vulnerability and bug fixes. + - Bugfixing - Restored some input validation error logs that were removed in version 10.24.0. The logs inform the user when the `getTreatment(s)` methods are called with an invalid value as feature flag name or flag set name. + - Bugfixing - Fixed localhost mode to emit SDK_UPDATE when mocked feature flags are updated in the `features` object map of the config object (Related to issue https://github.com/splitio/javascript-browser-client/issues/119). 0.14.0 (May 6, 2024) - Updated @splitsoftware/splitio-commons package to version 1.14.0 that includes minor updates: diff --git a/package-lock.json b/package-lock.json index 1c8a1b2..f9fcf27 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,15 +1,15 @@ { "name": "@splitsoftware/splitio-browserjs", - "version": "0.14.0", + "version": "0.14.1-rc.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@splitsoftware/splitio-browserjs", - "version": "0.14.0", + "version": "0.14.1-rc.0", "license": "Apache-2.0", "dependencies": { - "@splitsoftware/splitio-commons": "1.15.1-rc.0", + "@splitsoftware/splitio-commons": "1.16.0", "@types/google.analytics": "0.0.40", "tslib": "^2.3.1", "unfetch": "^4.2.0" @@ -1500,9 +1500,9 @@ "dev": true }, "node_modules/@splitsoftware/splitio-commons": { - "version": "1.15.1-rc.0", - "resolved": "https://registry.npmjs.org/@splitsoftware/splitio-commons/-/splitio-commons-1.15.1-rc.0.tgz", - "integrity": "sha512-lWMU+lwsNG3rT3QlgzjBDDNNuD/RPvwa3RT0bJjHN7nERL9Z8rnRaI2zW0tdgwGUykW6kcsDNcCSFCErsSRkSw==", + "version": "1.16.0", + "resolved": "https://registry.npmjs.org/@splitsoftware/splitio-commons/-/splitio-commons-1.16.0.tgz", + "integrity": "sha512-k16cCWJOWut/NB5W1d9hQEYPxFrZXO66manp+8d6RjZYH4r+Q6lu82NYjDcfh5E93H9v+TVKcQLAmpVofbjcvg==", "dependencies": { "tslib": "^2.3.1" }, @@ -2501,12 +2501,12 @@ } }, "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, "dependencies": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" @@ -4122,9 +4122,9 @@ } }, "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, "dependencies": { "to-regex-range": "^5.0.1" @@ -10590,9 +10590,9 @@ "dev": true }, "@splitsoftware/splitio-commons": { - "version": "1.15.1-rc.0", - "resolved": "https://registry.npmjs.org/@splitsoftware/splitio-commons/-/splitio-commons-1.15.1-rc.0.tgz", - "integrity": "sha512-lWMU+lwsNG3rT3QlgzjBDDNNuD/RPvwa3RT0bJjHN7nERL9Z8rnRaI2zW0tdgwGUykW6kcsDNcCSFCErsSRkSw==", + "version": "1.16.0", + "resolved": "https://registry.npmjs.org/@splitsoftware/splitio-commons/-/splitio-commons-1.16.0.tgz", + "integrity": "sha512-k16cCWJOWut/NB5W1d9hQEYPxFrZXO66manp+8d6RjZYH4r+Q6lu82NYjDcfh5E93H9v+TVKcQLAmpVofbjcvg==", "requires": { "tslib": "^2.3.1" } @@ -11353,12 +11353,12 @@ } }, "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, "requires": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" } }, "browser-process-hrtime": { @@ -12562,9 +12562,9 @@ } }, "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, "requires": { "to-regex-range": "^5.0.1" diff --git a/package.json b/package.json index 1057d6e..44d2c8a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@splitsoftware/splitio-browserjs", - "version": "0.14.0", + "version": "0.14.1-rc.0", "description": "Split SDK for JavaScript on Browser", "main": "cjs/index.js", "module": "esm/index.js", @@ -64,7 +64,7 @@ "bugs": "https://github.com/splitio/javascript-browser-client/issues", "homepage": "https://github.com/splitio/javascript-browser-client#readme", "dependencies": { - "@splitsoftware/splitio-commons": "1.15.1-rc.0", + "@splitsoftware/splitio-commons": "1.16.0", "@types/google.analytics": "0.0.40", "tslib": "^2.3.1", "unfetch": "^4.2.0" diff --git a/src/__tests__/offline/browser.spec.js b/src/__tests__/offline/browser.spec.js index 96add52..a7f7f08 100644 --- a/src/__tests__/offline/browser.spec.js +++ b/src/__tests__/offline/browser.spec.js @@ -92,10 +92,13 @@ tape('Browser offline mode', function (assert) { SplitFactory({ ...config, storage: InLocalStorage() }), SplitFactorySlim({ ...config, storage: InLocalStorage(), sync: { localhostMode: LocalhostFromObject() } }) // slim factory requires localhostFromObject module ]; - const factoriesReady = [ // Multiple factories must handle their own `features` mock, even if instantiated with the same config. - SplitFactory(config), - SplitFactory({ ...config }), - SplitFactory({ ...config, features: { ...config.features }, storage: InLocalStorage /* invalid */, sync: { localhostMode: LocalhostFromObject /* invalid */ } }), + const configs = [ + { ...config, features: { ...config.features }, storage: InLocalStorage /* invalid */, sync: { localhostMode: LocalhostFromObject /* invalid */ } }, + { ...config }, + config, + ]; + const factoriesReady = [ + ...configs.map(config => SplitFactory(config)), ...factoriesReadyFromCache ]; const factoriesTimeout = [ // slim factory without a valid localhostFromObject module will timeout @@ -115,7 +118,7 @@ tape('Browser offline mode', function (assert) { readyCount++; }); client.on(client.Event.SDK_UPDATE, () => { - assert.deepEqual(manager.names(), ['testing_split', 'testing_split_2', 'testing_split_3', 'testing_split_with_config']); + assert.deepEqual(manager.names().sort(), ['testing_split', 'testing_split_2', 'testing_split_3', 'testing_split_with_config']); assert.equal(client.getTreatment('testing_split_with_config'), 'nope'); updateCount++; }); @@ -225,7 +228,7 @@ tape('Browser offline mode', function (assert) { }); setTimeout(() => { - // Update the features + // Update features reference in settings factory.settings.features = { testing_split: 'on', testing_split_2: 'off', @@ -235,10 +238,23 @@ tape('Browser offline mode', function (assert) { config: null } }; - // Update the features in all factories except one - for (let i = 1; i < factories.length; i++) { - factories[i].settings.features = factory.settings.features; + + // Update features properties in config + configs[0].features['testing_split'] = 'on'; + configs[0].features['testing_split_2'] = 'off'; + configs[0].features['testing_split_3'] = 'custom_treatment'; + configs[0].features['testing_split_with_config'] = { + treatment: 'nope', + config: null + }; + + // Update the features in all remaining factories except the last one + for (let i = 1; i < factoriesReady.length - 1; i++) { + factoriesReady[i].settings.features = factory.settings.features; } + + // Assigning a new object to the features property in the config object doesn't trigger an update + configs[configs.length - 1].features = { ...factory.settings.features }; }, 1000); setTimeout(() => { factory.settings.features = originalFeaturesMap; }, 200); diff --git a/src/settings/defaults.ts b/src/settings/defaults.ts index 47f253f..2208eb6 100644 --- a/src/settings/defaults.ts +++ b/src/settings/defaults.ts @@ -2,7 +2,7 @@ import { LogLevels, isLogLevelString } from '@splitsoftware/splitio-commons/src/ import { ConsentStatus, LogLevel } from '@splitsoftware/splitio-commons/src/types'; import { CONSENT_GRANTED } from '@splitsoftware/splitio-commons/src/utils/constants'; -const packageVersion = '0.14.0'; +const packageVersion = '0.14.1-rc.0'; /** * In browser, the default debug level, can be set via the `localStorage.splitio_debug` item. From d815c1473e3c90f7735eca869bfb60b00ced2c42 Mon Sep 17 00:00:00 2001 From: Emiliano Sanchez Date: Thu, 13 Jun 2024 20:46:08 -0300 Subject: [PATCH 3/4] stable version --- .github/workflows/ci-cd.yml | 4 ++-- package-lock.json | 4 ++-- package.json | 2 +- src/settings/defaults.ts | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 9c5f49e..f55585a 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -47,7 +47,7 @@ jobs: run: BUILD_BRANCH=$(echo "${GITHUB_REF#refs/heads/}") npm run build - name: Store assets - if: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/update_js_commons' || github.ref == 'refs/heads/main') }} + if: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/development' || github.ref == 'refs/heads/main') }} uses: actions/upload-artifact@v3 with: name: assets @@ -58,7 +58,7 @@ jobs: name: Upload assets runs-on: ubuntu-20.04 needs: build - if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/update_js_commons' }} + if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/development' }} strategy: matrix: environment: diff --git a/package-lock.json b/package-lock.json index f9fcf27..be625db 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@splitsoftware/splitio-browserjs", - "version": "0.14.1-rc.0", + "version": "0.14.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@splitsoftware/splitio-browserjs", - "version": "0.14.1-rc.0", + "version": "0.14.1", "license": "Apache-2.0", "dependencies": { "@splitsoftware/splitio-commons": "1.16.0", diff --git a/package.json b/package.json index 44d2c8a..df53d37 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@splitsoftware/splitio-browserjs", - "version": "0.14.1-rc.0", + "version": "0.14.1", "description": "Split SDK for JavaScript on Browser", "main": "cjs/index.js", "module": "esm/index.js", diff --git a/src/settings/defaults.ts b/src/settings/defaults.ts index 2208eb6..a2ea678 100644 --- a/src/settings/defaults.ts +++ b/src/settings/defaults.ts @@ -2,7 +2,7 @@ import { LogLevels, isLogLevelString } from '@splitsoftware/splitio-commons/src/ import { ConsentStatus, LogLevel } from '@splitsoftware/splitio-commons/src/types'; import { CONSENT_GRANTED } from '@splitsoftware/splitio-commons/src/utils/constants'; -const packageVersion = '0.14.1-rc.0'; +const packageVersion = '0.14.1'; /** * In browser, the default debug level, can be set via the `localStorage.splitio_debug` item. From 20befbf0f7af7a82289bbd8ab737756d5cde5d99 Mon Sep 17 00:00:00 2001 From: Emiliano Sanchez Date: Thu, 13 Jun 2024 20:52:56 -0300 Subject: [PATCH 4/4] Update changelog entry --- CHANGES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 59a2f18..f1d5b97 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,6 +1,6 @@ 0.14.1 (June 14, 2024) - Updated @splitsoftware/splitio-commons package to version 1.16.0 that includes some vulnerability and bug fixes. - - Bugfixing - Restored some input validation error logs that were removed in version 10.24.0. The logs inform the user when the `getTreatment(s)` methods are called with an invalid value as feature flag name or flag set name. + - Bugfixing - Restored some input validation error logs that were removed in version 0.12.0. The logs inform the user when the `getTreatment(s)` methods are called with an invalid value as feature flag name or flag set name. - Bugfixing - Fixed localhost mode to emit SDK_UPDATE when mocked feature flags are updated in the `features` object map of the config object (Related to issue https://github.com/splitio/javascript-browser-client/issues/119). 0.14.0 (May 6, 2024)