Skip to content

Commit 266b9f7

Browse files
Merge pull request #290 from splitio/update_node_version
Update NodeJS version for scripts
2 parents eed03d3 + 39a7390 commit 266b9f7

File tree

6 files changed

+14
-11
lines changed

6 files changed

+14
-11
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ jobs:
1919
- 6379:6379
2020
steps:
2121
- name: Checkout code
22-
uses: actions/checkout@v2
22+
uses: actions/checkout@v4
2323

2424
- name: Set up nodejs
2525
uses: actions/setup-node@v2
2626
with:
27-
node-version: '16.16.0'
27+
node-version: 'lts/*'
2828
cache: 'npm'
2929

3030
- name: npm CI

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v16.16.0
1+
lts/*

CHANGES.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
1.13.1 (January 11, 2024)
2+
- Updated client `destroy` method to release SDK key immediately and avoid unexpected warning logs when a factory is created with the same SDK key after the previous one was destroyed.
3+
14
1.13.0 (January 4, 2024)
25
- Removed the `getOptions` method from the `IPlatform` interface to simplify implementation. Request options can be handled within the `getFetch` method.
36

package-lock.json

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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@splitsoftware/splitio-commons",
3-
"version": "1.13.0",
3+
"version": "1.13.1",
44
"description": "Split Javascript SDK common components",
55
"main": "cjs/index.js",
66
"module": "esm/index.js",

src/sdkClient/sdkClient.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,11 @@ export function sdkClientFactory(params: ISdkFactoryContext, isSharedClient?: bo
5656
// Mark the SDK as destroyed immediately
5757
sdkReadinessManager.readinessManager.destroy();
5858

59-
// record stat before flushing data
60-
if (!isSharedClient) telemetryTracker.sessionLength();
59+
// For main client, release the SDK Key and record stat before flushing data
60+
if (!isSharedClient) {
61+
releaseApiKey(settings.core.authorizationKey);
62+
telemetryTracker.sessionLength();
63+
}
6164

6265
// Stop background jobs
6366
syncManager && syncManager.stop();
@@ -66,9 +69,6 @@ export function sdkClientFactory(params: ISdkFactoryContext, isSharedClient?: bo
6669
// Cleanup event listeners
6770
signalListener && signalListener.stop();
6871

69-
// Release the SDK Key if it is the main client
70-
if (!isSharedClient) releaseApiKey(settings.core.authorizationKey);
71-
7272
// @TODO stop only if last client is destroyed
7373
if (uniqueKeysTracker) uniqueKeysTracker.stop();
7474

0 commit comments

Comments
 (0)