Skip to content

Commit

Permalink
Rename Node.js
Browse files Browse the repository at this point in the history
  • Loading branch information
EmilianoSanchez committed Nov 11, 2024
1 parent d752428 commit 91e268c
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
- Updated linter dependencies and rules. The deprecated TSLint package was replaced by ESLint.
- Updated some transitive dependencies for vulnerability fixes.
- Updated @splitsoftware/splitio package to version 10.22.4 that includes minor improvements.
- Bugfixing - Fixed error when using the SDK in localhost mode for testing with NodeJS test runners such as Jest (See https://help.split.io/hc/en-us/articles/360038851551-Redux-SDK#localhost-mode).
- Bugfixing - Fixed error when using the SDK in localhost mode for testing with Node.js test runners such as Jest (See https://help.split.io/hc/en-us/articles/360038851551-Redux-SDK#localhost-mode).

1.7.1 (November 15, 2022)
- Updated React Redux peer dependency range to include [email protected] and [email protected].
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ Split has built and maintains SDKs for:
* Java [Github](https://github.com/splitio/java-client) [Docs](https://help.split.io/hc/en-us/articles/360020405151-Java-SDK)
* JavaScript [Github](https://github.com/splitio/javascript-client) [Docs](https://help.split.io/hc/en-us/articles/360020448791-JavaScript-SDK)
* JavaScript for Browser [Github](https://github.com/splitio/javascript-browser-client) [Docs](https://help.split.io/hc/en-us/articles/360058730852-Browser-SDK)
* Node [Github](https://github.com/splitio/javascript-client) [Docs](https://help.split.io/hc/en-us/articles/360020564931-Node-js-SDK)
* Node.js [Github](https://github.com/splitio/javascript-client) [Docs](https://help.split.io/hc/en-us/articles/360020564931-Node-js-SDK)
* PHP [Github](https://github.com/splitio/php-client) [Docs](https://help.split.io/hc/en-us/articles/360020350372-PHP-SDK)
* PHP thin-client [Github](https://github.com/splitio/php-thin-client) [Docs](https://help.split.io/hc/en-us/articles/18305128673933-PHP-Thin-Client-SDK)
* Python [Github](https://github.com/splitio/python-client) [Docs](https://help.split.io/hc/en-us/articles/360020359652-Python-SDK)
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/utils/mockNodeSplitSdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export function mockSdk() {
const splits: jest.Mock = jest.fn().mockReturnValue([]);
const manager: jest.Mock = jest.fn().mockReturnValue({ names, split, splits });

// Client (only one client on Node SDK)
// Client (only one client on Node.js)
const __client__ = mockClient();
const client = jest.fn(() => {
return __client__;
Expand Down
4 changes: 2 additions & 2 deletions src/asyncActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export function initSplitSdk(params: IInitSplitSdkParams): (dispatch: Dispatch<A
splitSdk.config = params.config;

splitSdk.splitio = params.splitio ||
// For client-side localhost mode, we need to use the client-side SDK, to support test runners that execute in NodeJS
// For client-side localhost mode, we need to use the client-side SDK, to support test runners that execute in Node.js
(splitSdk.config?.core?.authorizationKey === 'localhost' && typeof splitSdk.config?.features === 'object' ?
SplitFactoryForLocalhost :
SplitFactory) as ISplitFactoryBuilder;
Expand Down Expand Up @@ -170,7 +170,7 @@ export function getTreatments(params: IGetTreatmentsParams): Action | (() => voi
return addTreatments(params.key || (splitSdk.config as SplitIO.IBrowserSettings).core.key, splitNames ? getControlTreatmentsWithConfig(splitNames) : {});
}

} else { // Split SDK running in Node
} else { // Split SDK running in Node.js

// Evaluate Split and return redux action.
const client = splitSdk.factory.client() as unknown as SplitIO.IClient;
Expand Down
4 changes: 2 additions & 2 deletions src/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ export function track(params: ITrackParams): boolean {

const { key, trafficType, eventType, value, properties } = params;

if (splitSdk.isDetached) { // Node
// In node, user must always provide key and TT as params
if (splitSdk.isDetached) { // Node.js
// In Node.js, user must always provide key and TT as params
const client = splitSdk.factory.client() as SplitIO.IClient;

return client.track(key, trafficType, eventType, value, properties);
Expand Down

0 comments on commit 91e268c

Please sign in to comment.