Skip to content

Commit 49e0ce2

Browse files
Update JS-commons
1 parent 3f666a6 commit 49e0ce2

28 files changed

Lines changed: 165 additions & 160 deletions

.github/workflows/ci-cd.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
run: BUILD_BRANCH=$(echo "${GITHUB_REF#refs/heads/}") npm run build
4848

4949
- name: Store assets
50-
if: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/development' || github.ref == 'refs/heads/main') }}
50+
if: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/semver_matchers' || github.ref == 'refs/heads/main') }}
5151
uses: actions/upload-artifact@v3
5252
with:
5353
name: assets
@@ -58,7 +58,7 @@ jobs:
5858
name: Upload assets
5959
runs-on: ubuntu-20.04
6060
needs: build
61-
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/development' }}
61+
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/semver_matchers' }}
6262
strategy:
6363
matrix:
6464
environment:

CHANGES.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
0.14.0 (April XX, 2024)
2+
- Updated @splitsoftware/splitio-commons package to version 1.14.0 that includes minor updates:
3+
- Added support for Semver matchers.
4+
- Updated Split API client to include the flags spec version query parameter for the `splitChanges` and `auth` endpoints.
5+
16
0.13.2 (March 26, 2024)
27
- Updated some transitive dependencies for vulnerability fixes.
38
- Bugfixing - Added tslib as an explicit dependency to avoid issues with some package managers that don't resolve it automatically as a transitive dependency from @splitsoftware/splitio-commons (Related to issue https://github.com/splitio/javascript-client/issues/795).

package-lock.json

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@splitsoftware/splitio-browserjs",
3-
"version": "0.13.2",
3+
"version": "0.13.3-rc.0",
44
"description": "Split SDK for JavaScript on Browser",
55
"main": "cjs/index.js",
66
"module": "esm/index.js",
@@ -64,7 +64,7 @@
6464
"bugs": "https://github.com/splitio/javascript-browser-client/issues",
6565
"homepage": "https://github.com/splitio/javascript-browser-client#readme",
6666
"dependencies": {
67-
"@splitsoftware/splitio-commons": "1.13.1",
67+
"@splitsoftware/splitio-commons": "1.13.2-rc.7",
6868
"@types/google.analytics": "0.0.40",
6969
"tslib": "^2.3.1",
7070
"unfetch": "^4.2.0"

src/__tests__/browserSuites/fetch-specific-splits.spec.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ export default function fetchSpecificSplits(fetchMock, assert) {
2424
const queryString = queryStrings[i] || '';
2525
let factory;
2626

27-
fetchMock.getOnce(urls.sdk + '/splitChanges?since=-1' + queryString, { status: 200, body: { splits: [], since: -1, till: 1457552620999 } });
28-
fetchMock.getOnce(urls.sdk + '/splitChanges?since=1457552620999' + queryString, { status: 200, body: { splits: [], since: 1457552620999, till: 1457552620999 } });
29-
fetchMock.getOnce(urls.sdk + '/splitChanges?since=1457552620999' + queryString, function () {
27+
fetchMock.getOnce(urls.sdk + '/splitChanges?s=1.1&since=-1' + queryString, { status: 200, body: { splits: [], since: -1, till: 1457552620999 } });
28+
fetchMock.getOnce(urls.sdk + '/splitChanges?s=1.1&since=1457552620999' + queryString, { status: 200, body: { splits: [], since: 1457552620999, till: 1457552620999 } });
29+
fetchMock.getOnce(urls.sdk + '/splitChanges?s=1.1&since=1457552620999' + queryString, function () {
3030
factory.client().destroy().then(() => {
3131
assert.pass(`splitFilters #${i}`);
3232
});

src/__tests__/browserSuites/ignore-ip-addresses-setting.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ export default function (fetchMock, assert) {
101101

102102
// Mock GET endpoints before creating the client
103103
const settings = settingsFactory(config);
104-
fetchMock.getOnce(url(settings, '/splitChanges?since=-1'), { status: 200, body: splitChangesMock1 });
105-
fetchMock.getOnce(url(settings, '/splitChanges?since=1457552620999'), { status: 200, body: { splits: [], since: 1457552620999, till: 1457552620999 } });
104+
fetchMock.getOnce(url(settings, '/splitChanges?s=1.1&since=-1'), { status: 200, body: splitChangesMock1 });
105+
fetchMock.getOnce(url(settings, '/splitChanges?s=1.1&since=1457552620999'), { status: 200, body: { splits: [], since: 1457552620999, till: 1457552620999 } });
106106
fetchMock.getOnce(url(settings, `/mySegments/${encodeURIComponent(config.core.key)}`), { status: 200, body: { mySegments: [] } });
107107

108108
// Init Split client

src/__tests__/browserSuites/impressions.debug.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ const settings = settingsFactory({
2121

2222
export default function (fetchMock, assert) {
2323
// Mocking this specific route to make sure we only get the items we want to test from the handlers.
24-
fetchMock.getOnce(url(settings, '/splitChanges?since=-1'), { status: 200, body: splitChangesMock1 });
25-
fetchMock.get(url(settings, '/splitChanges?since=1457552620999'), { status: 200, body: splitChangesMock2 });
24+
fetchMock.getOnce(url(settings, '/splitChanges?s=1.1&since=-1'), { status: 200, body: splitChangesMock1 });
25+
fetchMock.get(url(settings, '/splitChanges?s=1.1&since=1457552620999'), { status: 200, body: splitChangesMock2 });
2626
fetchMock.get(url(settings, '/mySegments/facundo%40split.io'), { status: 200, body: mySegmentsFacundo });
2727

2828
const splitio = SplitFactory({

src/__tests__/browserSuites/impressions.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ let truncatedTimeFrame;
2424

2525
export default function (fetchMock, assert) {
2626
// Mocking this specific route to make sure we only get the items we want to test from the handlers.
27-
fetchMock.getOnce(url(settings, '/splitChanges?since=-1'), { status: 200, body: splitChangesMock1 });
28-
fetchMock.get(url(settings, '/splitChanges?since=1457552620999'), { status: 200, body: splitChangesMock2 });
27+
fetchMock.getOnce(url(settings, '/splitChanges?s=1.1&since=-1'), { status: 200, body: splitChangesMock1 });
28+
fetchMock.get(url(settings, '/splitChanges?s=1.1&since=1457552620999'), { status: 200, body: splitChangesMock2 });
2929
fetchMock.get(url(settings, '/mySegments/facundo%40split.io'), { status: 200, body: mySegmentsFacundo });
3030

3131
const splitio = SplitFactory({

src/__tests__/browserSuites/manager.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import map from 'lodash/map';
44
import { url } from '../testUtils';
55

66
export default async function (settings, fetchMock, assert) {
7-
fetchMock.getOnce({ url: url(settings, '/splitChanges?since=-1'), overwriteRoutes: true }, { status: 200, body: splitChangesMockReal });
7+
fetchMock.getOnce({ url: url(settings, '/splitChanges?s=1.1&since=-1'), overwriteRoutes: true }, { status: 200, body: splitChangesMockReal });
88

99
const mockSplits = splitChangesMockReal;
1010

src/__tests__/browserSuites/push-corner-cases.spec.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,13 @@ export function testSplitKillOnReadyFromCache(fetchMock, assert) {
7070
});
7171

7272
// 1 auth request
73-
fetchMock.getOnce(url(settings, `/v2/auth?users=${encodeURIComponent(userKey)}`), { status: 200, body: authPushEnabledNicolas });
73+
fetchMock.getOnce(url(settings, `/v2/auth?s=1.1&users=${encodeURIComponent(userKey)}`), { status: 200, body: authPushEnabledNicolas });
7474
// 2 mySegments requests: initial sync and after SSE opened
7575
fetchMock.get({ url: url(settings, '/mySegments/nicolas%40split.io'), repeat: 2 }, { status: 200, body: { mySegments: [] } });
7676

7777
// 2 splitChanges request: initial sync and after SSE opened. Sync after SPLIT_KILL is not performed because SplitsSyncTask is "executing"
78-
fetchMock.getOnce(url(settings, '/splitChanges?since=25'), { status: 200, body: splitChangesMock1 }, { delay: MILLIS_SPLIT_CHANGES_RESPONSE, /* delay response */ });
79-
fetchMock.getOnce(url(settings, `/splitChanges?since=${splitChangesMock1.till}`), { status: 200, body: { splits: [], since: splitChangesMock1.till, till: splitChangesMock1.till } }, { delay: MILLIS_SPLIT_CHANGES_RESPONSE - 100, /* delay response */ });
78+
fetchMock.getOnce(url(settings, '/splitChanges?s=1.1&since=25'), { status: 200, body: splitChangesMock1 }, { delay: MILLIS_SPLIT_CHANGES_RESPONSE, /* delay response */ });
79+
fetchMock.getOnce(url(settings, `/splitChanges?s=1.1&since=${splitChangesMock1.till}`), { status: 200, body: { splits: [], since: splitChangesMock1.till, till: splitChangesMock1.till } }, { delay: MILLIS_SPLIT_CHANGES_RESPONSE - 100, /* delay response */ });
8080

8181
fetchMock.get(new RegExp('.*'), function (url) {
8282
assert.fail('unexpected GET request with url: ' + url);

0 commit comments

Comments
 (0)