Skip to content

Commit 61d33bc

Browse files
Rename occurrences to Node.js
1 parent f384cb8 commit 61d33bc

File tree

11 files changed

+35
-35
lines changed

11 files changed

+35
-35
lines changed

CHANGES.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
- Updated some transitive dependencies for vulnerability fixes.
2121

2222
1.16.0 (June 13, 2024)
23-
- Added the `getOptions` method to the `IPlatform` interface to allow the SDK to pass request options to the `fetch` function and `EventSource` constructor when fetching data from the Split servers. The method is optional and, if provided, it is called twice: first for the `fetch` options and then for the `EventSource` options. Useful for advanced use cases like configuring a proxy or validating HTTPS certificates in NodeJS.
23+
- Added the `getOptions` method to the `IPlatform` interface to allow the SDK to pass request options to the `fetch` function and `EventSource` constructor when fetching data from the Split servers. The method is optional and, if provided, it is called twice: first for the `fetch` options and then for the `EventSource` options. Useful for advanced use cases like configuring a proxy or validating HTTPS certificates in Node.js.
2424
- Updated the Redis storage to lazily import the `ioredis` dependency when the storage is created. This prevents errors when the SDK is imported or bundled in a .mjs file, as `ioredis` is a CommonJS module.
2525
- Bugfixing - Restored some input validation error logs that were removed in version 1.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.
2626
- 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).
@@ -57,7 +57,7 @@
5757
- Added a new optional Split Filter configuration option. This allows the SDK and Split services to only synchronize the flags in the specified flag sets, avoiding unused or unwanted flags from being synced on the SDK instance, bringing all the benefits from a reduced payload.
5858
- Note: Only applicable when the SDK is in charge of the rollout data synchronization. When not applicable, the SDK will log a warning on init.
5959
- Added `sets` property to the `SplitView` object returned by the `split` and `splits` methods of the SDK manager to expose flag sets on flag views.
60-
- Bugfixing - Fixed SDK key validation in NodeJS to ensure the SDK_READY_TIMED_OUT event is emitted when a client-side type SDK key is provided instead of a server-side one (Related to issue https://github.com/splitio/javascript-client/issues/768).
60+
- Bugfixing - Fixed SDK key validation in Node.js to ensure the SDK_READY_TIMED_OUT event is emitted when a client-side type SDK key is provided instead of a server-side one (Related to issue https://github.com/splitio/javascript-client/issues/768).
6161

6262
1.10.0 (October 20, 2023)
6363
- Added `defaultTreatment` property to the `SplitView` object returned by the `split` and `splits` methods of the SDK manager (Related to issue https://github.com/splitio/javascript-commons/issues/225).
@@ -135,7 +135,7 @@
135135
1.3.0 (April 6, 2022)
136136
- Added user consent feature to allow delaying or disabling the data tracking from SDK until user consent is explicitly granted or declined. Read more in our docs.
137137
- Added `scheduler.impressionsQueueSize` property to SDK configuration to limit the amount of impressions tracked in memory. Read more in our docs.
138-
- Added support to accept TLS configuration options to the Redis storage in NodeJS. Read more in our docs.
138+
- Added support to accept TLS configuration options to the Redis storage in Node.js. Read more in our docs.
139139
- Updated format for MySegments keys in LocalStorage, keeping backwards compatibility (issue https://github.com/splitio/javascript-client/issues/638).
140140
- Updated some modules due to general polishing and refactors, including updates in some log messages.
141141
- Updated some dependencies for vulnerability fixes.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Split has built and maintains SDKs for:
3333
* Java [Github](https://github.com/splitio/java-client) [Docs](https://help.split.io/hc/en-us/articles/360020405151-Java-SDK)
3434
* JavaScript [Github](https://github.com/splitio/javascript-client) [Docs](https://help.split.io/hc/en-us/articles/360020448791-JavaScript-SDK)
3535
* JavaScript for Browser [Github](https://github.com/splitio/javascript-browser-client) [Docs](https://help.split.io/hc/en-us/articles/360058730852-Browser-SDK)
36-
* Node [Github](https://github.com/splitio/javascript-client) [Docs](https://help.split.io/hc/en-us/articles/360020564931-Node-js-SDK)
36+
* Node.js [Github](https://github.com/splitio/javascript-client) [Docs](https://help.split.io/hc/en-us/articles/360020564931-Node-js-SDK)
3737
* PHP [Github](https://github.com/splitio/php-client) [Docs](https://help.split.io/hc/en-us/articles/360020350372-PHP-SDK)
3838
* 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)
3939
* Python [Github](https://github.com/splitio/python-client) [Docs](https://help.split.io/hc/en-us/articles/360020359652-Python-SDK)

src/listeners/__tests__/node.spec.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const processOnSpy = jest.spyOn(process, 'on');
55
const processRemoveListenerSpy = jest.spyOn(process, 'removeListener');
66
const processKillSpy = jest.spyOn(process, 'kill').mockImplementation(() => true);
77

8-
test('Node JS listener / Signal Listener class methods and start/stop functionality', () => {
8+
test('NodeSignalListener / Signal Listener class methods and start/stop functionality', () => {
99

1010
const syncManagerMock = { flush: jest.fn() }; // @ts-expect-error
1111
const listener = new NodeSignalListener(syncManagerMock, fullSettings);
@@ -25,7 +25,7 @@ test('Node JS listener / Signal Listener class methods and start/stop functional
2525
expect(processRemoveListenerSpy.mock.calls).toEqual([['SIGTERM', listener._sigtermHandler]]);
2626
});
2727

28-
test('Node JS listener / Signal Listener SIGTERM callback with sync handler', () => {
28+
test('NodeSignalListener / Signal Listener SIGTERM callback with sync handler', () => {
2929

3030
const syncManagerMock = { flush: jest.fn() }; // @ts-expect-error
3131
const listener = new NodeSignalListener(syncManagerMock, fullSettings);
@@ -55,7 +55,7 @@ test('Node JS listener / Signal Listener SIGTERM callback with sync handler', ()
5555
processKillSpy.mockClear();
5656
});
5757

58-
test('Node JS listener / Signal Listener SIGTERM callback with sync handler that throws an error', () => {
58+
test('NodeSignalListener / Signal Listener SIGTERM callback with sync handler that throws an error', () => {
5959
const syncManagerMock = { flush: jest.fn(() => { throw 'some error'; }) }; // @ts-expect-error
6060
const listener = new NodeSignalListener(syncManagerMock, fullSettings);
6161

@@ -85,7 +85,7 @@ test('Node JS listener / Signal Listener SIGTERM callback with sync handler that
8585
processKillSpy.mockClear();
8686
});
8787

88-
test('Node JS listener / Signal Listener SIGTERM callback with async handler', async () => {
88+
test('NodeSignalListener / Signal Listener SIGTERM callback with async handler', async () => {
8989

9090
const fakePromise = new Promise<void>(res => {
9191
setTimeout(() => {
@@ -125,7 +125,7 @@ test('Node JS listener / Signal Listener SIGTERM callback with async handler', a
125125
});
126126
});
127127

128-
test('Node JS listener / Signal Listener SIGTERM callback with async handler that throws an error', async () => {
128+
test('NodeSignalListener / Signal Listener SIGTERM callback with async handler that throws an error', async () => {
129129

130130
const fakePromise = new Promise<void>((res, rej) => {
131131
setTimeout(() => {

src/listeners/node.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// @TODO eventually migrate to JS-Node-SDK package.
1+
// @TODO eventually migrate to Node.js SDK package.
22
import { ISignalListener } from './types';
33
import { thenable } from '../utils/promise/thenable';
44
import { MaybeThenable } from '../dtos/types';
@@ -25,7 +25,7 @@ export class NodeSignalListener implements ISignalListener {
2525
syncManager: ISyncManager | undefined, // private handler: () => MaybeThenable<void>,
2626
settings: ISettings
2727
) {
28-
// @TODO review handler logic when implementing Node SDK
28+
// @TODO review handler logic when implementing Node.js SDK
2929
this.handler = function () {
3030
if (syncManager) {
3131
// syncManager.stop();

src/sdkFactory/types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export interface IPlatform {
2828
*/
2929
getEventSource?: (settings: ISettings) => (IEventSourceConstructor | undefined)
3030
/**
31-
* EventEmitter constructor, like NodeJS.EventEmitter or a polyfill.
31+
* EventEmitter constructor, like Node.js EventEmitter or a polyfill.
3232
*/
3333
EventEmitter: new () => SplitIO.IEventEmitter,
3434
/**
@@ -104,7 +104,7 @@ export interface ISdkFactoryParams {
104104
filterAdapterFactory?: () => IFilterAdapter
105105

106106
// Optional signal listener constructor. Used to handle special app states, like shutdown, app paused or resumed.
107-
// Pass only if `syncManager` (used by Node listener) and `splitApi` (used by Browser listener) are passed.
107+
// Pass only if `syncManager` (used by NodeSignalListener) and `splitApi` (used by Browser listener) are passed.
108108
SignalListener?: new (
109109
syncManager: ISyncManager | undefined, // Used by NodeSignalListener to flush data, and by BrowserSignalListener to close streaming connection.
110110
settings: ISettings, // Used by BrowserSignalListener

src/storages/inRedis/SplitsCacheInRedis.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ function processPipelineAnswer(results: Array<[Error | null, string]>): string[]
1919

2020
/**
2121
* ISplitsCacheAsync implementation that stores split definitions in Redis.
22-
* Supported by Node.
22+
* Supported by Node.js
2323
*/
2424
export class SplitsCacheInRedis extends AbstractSplitsCacheAsync {
2525

src/storages/inRedis/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export interface InRedisStorageOptions {
1818
}
1919

2020
/**
21-
* InRedis storage factory for consumer server-side SplitFactory, that uses `Ioredis` Redis client for Node.
21+
* InRedis storage factory for consumer server-side SplitFactory, that uses `Ioredis` Redis client for Node.js
2222
* @see {@link https://www.npmjs.com/package/ioredis}
2323
*/
2424
export function InRedisStorage(options: InRedisStorageOptions = {}): IStorageAsyncFactory {

src/trackers/impressionObserver/__tests__/serverSideObserver.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ test('Hasher 128 / Impression Hasher Does Not Crash', () => {
7474
expect(hashImpression128(imp1)).not.toBe(null);
7575
});
7676

77-
test('Server-side (Node JS) / Impression Observer Basic Functionality', () => {
77+
test('Server-side (Node.js) / Impression Observer Basic Functionality', () => {
7878
const observer = impressionObserverSSFactory();
7979

8080
const imp = {

src/utils/settingsValidation/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export const base = {
6464
// Defines if the logs are enabled, SDK wide.
6565
debug: undefined,
6666

67-
// Defines the impression listener, but will only be used on NodeJS.
67+
// Defines the impression listener.
6868
impressionListener: undefined,
6969

7070
// Instance version.

src/utils/settingsValidation/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { ISettings } from '../../types';
22

33
/**
44
* Parameters used to specialize the settings validation for each API variant
5-
* (client-side, server-side) and environment (Node server, Browser, etc)
5+
* (client-side, server-side) and environment (Node.js, Browser, etc)
66
*/
77
export interface ISettingsValidationParams {
88
/**

0 commit comments

Comments
 (0)