diff --git a/CHANGES.txt b/CHANGES.txt index a1ee86f5e..9e8d5e4ee 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,6 @@ +11.0.1 (November 8, 2024) + - Bugfixing - Revert removal of TypeScript `SplitIO` namespace at `/types/splitio.d.ts` to allow explicit imports of types from the JavaScript SDK package. E.g., `import type { IBrowserSettings } from '@splitsoftware/splitio/types/splitio';`. + 11.0.0 (November 1, 2024) - Added support for targeting rules based on large segments for browsers (client-side API). - Added `factory.destroy()` method, which invokes the `destroy` method of all clients created by the factory. @@ -7,6 +10,7 @@ - NOTE: Refer to ./MIGRATION-GUIDE.md for instructions on how to migrate your codebase from version 0.x to 1.0.0. - Dropped support for Split Proxy below version 5.9.0, when using in the browser (client-side API). The SDK now requires Split Proxy 5.9.0 or above. - Dropped support for Node.js v6. The SDK now requires Node.js v14 or above. + - Removed TypeScript `SplitIO` namespace from `@splitsoftware/splitio/types/splitio`. Reverted in 11.0.1. - Removed internal ponyfills for the `Map` and `Set` global objects, dropping support for IE and other outdated browsers. The SDK now requires the runtime environment to support these features natively or provide a polyfill. - Removed the deprecated `GOOGLE_ANALYTICS_TO_SPLIT` and `SPLIT_TO_GOOGLE_ANALYTICS` integrations. The `integrations` configuration option has been removed from the SDK factory configuration, along with the associated interfaces in the TypeScript definitions. - Removed the `core.trafficType` configuration option (`SplitIO.IBrowserSettings['core']['trafficType]`) and the `trafficType` parameter from the SDK `client()` method in Browser (`SplitIO.IBrowserSDK['client']`). As a result, traffic types can no longer be bound to SDK clients, and the traffic type must be provided in the `track` method. diff --git a/package-lock.json b/package-lock.json index d5457999a..afd28f867 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@splitsoftware/splitio", - "version": "11.0.0", + "version": "11.0.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@splitsoftware/splitio", - "version": "11.0.0", + "version": "11.0.1", "license": "Apache-2.0", "dependencies": { "@splitsoftware/splitio-commons": "2.0.0", diff --git a/package.json b/package.json index f6083e0b2..2a0cd4390 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@splitsoftware/splitio", - "version": "11.0.0", + "version": "11.0.1", "description": "Split SDK", "files": [ "README.md", diff --git a/src/settings/defaults/version.js b/src/settings/defaults/version.js index 087efdda2..feec3d6b5 100644 --- a/src/settings/defaults/version.js +++ b/src/settings/defaults/version.js @@ -1 +1 @@ -export const packageVersion = '11.0.0'; +export const packageVersion = '11.0.1'; diff --git a/ts-tests/index.ts b/ts-tests/index.ts index f8eaa412d..9e9a2c32a 100644 --- a/ts-tests/index.ts +++ b/ts-tests/index.ts @@ -11,10 +11,17 @@ * @author Nico Zelaya */ +import type * as SplitTypes from '../types/splitio'; + import { SplitFactory } from '../types/index'; import { SplitFactory as SplitFactoryCS } from '../types/client'; import { SplitFactory as SplitFactorySS } from '../types/server'; +// Validate that the SplitIO namespace is available and matches the types when imported explicitly +let ambientType: SplitIO.ISDK; +let importedType: SplitTypes.ISDK; +ambientType = importedType; + let stringPromise: Promise; let splitNamesPromise: Promise; let splitViewPromise: Promise; @@ -468,6 +475,7 @@ let attr: SplitIO.Attributes = { stringArrayAttribute: ['value1', 'value2'], numberArrayAttribute: [1, 2] } +let attr2: SplitTypes.Attributes = attr; stored = browserClient.setAttributes(attr); let storedAttr: SplitIO.Attributes = browserClient.getAttributes(); diff --git a/types/index.d.ts b/types/index.d.ts index 25fe09f88..159df53d3 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -2,7 +2,7 @@ // Project: http://www.split.io/ // Definitions by: Nico Zelaya -import '@splitsoftware/splitio-commons'; +/// export = JsSdk; diff --git a/types/splitio.d.ts b/types/splitio.d.ts new file mode 100644 index 000000000..bac1acf49 --- /dev/null +++ b/types/splitio.d.ts @@ -0,0 +1,6 @@ +// Type definitions for JavaScript and NodeJS Split Software SDK + +import '@splitsoftware/splitio-commons'; + +export as namespace SplitIO; +export = SplitIO;