Skip to content

Commit 71b5534

Browse files
Merge pull request #8 from splitio/update
update sdk versions
2 parents 709a49b + 69af314 commit 71b5534

File tree

6 files changed

+34
-24
lines changed

6 files changed

+34
-24
lines changed

CHANGES.txt

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
1-
1.0.0
2-
- First release. Up to date with spec 0.4.0, and @openfeature/nodejs-sdk v0.2.0
3-
1.0.1
4-
- Fixes issues with flag details and error codes in negative cases, adds unit tests
5-
- Up to date with spec 0.4.0 and @openfeature/nodejs-sdk v0.3.2
6-
1.0.2
7-
- Changes name from Node-specific implementation to generic JSON
8-
- Up to date with spec 0.4.0 and @openfeature/js-sdk 0.4.0
1+
1.1.0 (June 16, 2025)
2+
- Uses renamed @openfeature/js-sdk to @openfeature/server-sdk
3+
- Up to date with spec 0.8.0 and @openfeature/server-sdk 1.18.0
4+
- Uses split sdk 11.4.0
5+
1.0.4
6+
- Fixes issue with TS build
7+
- Up to date with spec 0.5.0 and @openfeature/js-sdk 0.5.0
98
1.0.3
109
- Adds types definitions for TypeScript
1110
- Up to date with spec 0.4.0 and @openfeature/js-sdk 0.4.0
12-
1.0.4
13-
- Fixes issue with TS build
14-
- Up to date with spec 0.5.0 and @openfeature/js-sdk 0.5.0
11+
1.0.2
12+
- Changes name from Node-specific implementation to generic JSON
13+
- Up to date with spec 0.4.0 and @openfeature/js-sdk 0.4.0
14+
1.0.1
15+
- Fixes issues with flag details and error codes in negative cases, adds unit tests
16+
- Up to date with spec 0.4.0 and @openfeature/nodejs-sdk v0.3.2
17+
1.0.0
18+
- First release. Up to date with spec 0.4.0, and @openfeature/nodejs-sdk v0.2.0

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ npm install @splitsoftware/openfeature-js-split-provider
1919
### Confirm peer dependencies are installed
2020
```sh
2121
npm install @splitsoftware/splitio
22-
npm install @openfeature/js-sdk
22+
npm install @openfeature/server-sdk
2323
```
2424

2525
### Register the Split provider with OpenFeature
2626
```js
27-
const OpenFeature = require('@openfeature/js-sdk').OpenFeature;
27+
const OpenFeature = require('@openfeature/server-sdk').OpenFeature;
2828
const SplitFactory = require('@splitsoftware/splitio').SplitFactory;
2929
const OpenFeatureSplitProvider = require('@splitsoftware/openfeature-js-split-provider').OpenFeatureSplitProvider;
3030

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@splitsoftware/openfeature-js-split-provider",
3-
"version": "1.0.6",
3+
"version": "1.1.0",
44
"description": "Split OpenFeature Provider",
55
"files": [
66
"README.md",
@@ -25,12 +25,12 @@
2525
},
2626
"dependencies": {},
2727
"peerDependencies": {
28-
"@openfeature/js-sdk": "^1.0.0",
29-
"@splitsoftware/splitio": "^10.22.1"
28+
"@openfeature/server-sdk": "^1.18.0",
29+
"@splitsoftware/splitio": "^11.4.0"
3030
},
3131
"devDependencies": {
32-
"@openfeature/js-sdk": "^1.0.0",
33-
"@splitsoftware/splitio": "^10.22.1",
32+
"@openfeature/server-sdk": "^1.18.0",
33+
"@splitsoftware/splitio": "^11.4.0",
3434
"copyfiles": "^2.4.1",
3535
"cross-env": "^7.0.3",
3636
"replace": "^1.2.1",
@@ -39,7 +39,7 @@
3939
"tape": "4.13.2",
4040
"tape-catch": "1.0.6",
4141
"ts-node": "^10.5.0",
42-
"typescript": "4.4.4"
42+
"typescript": "^4.9.5"
4343
},
4444
"scripts": {
4545
"build-esm": "rimraf es && tsc -outDir es",

src/__tests__/nodeSuites/client.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const OpenFeature = require('@openfeature/js-sdk').OpenFeature;
1+
const OpenFeature = require('@openfeature/server-sdk').OpenFeature;
22
const SplitFactory = require('@splitsoftware/splitio').SplitFactory;
33
import { OpenFeatureSplitProvider } from '../..';
44

src/lib/js-split-provider.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
JsonValue,
88
TargetingKeyMissingError,
99
StandardResolutionReasons,
10-
} from "@openfeature/js-sdk";
10+
} from "@openfeature/server-sdk";
1111
import type SplitIO from "@splitsoftware/splitio/types/splitio";
1212

1313
export interface SplitProviderOptions {
@@ -31,10 +31,15 @@ export class OpenFeatureSplitProvider implements Provider {
3131
constructor(options: SplitProviderOptions) {
3232
this.client = options.splitClient;
3333
this.initialized = new Promise((resolve) => {
34-
this.client.on(this.client.Event.SDK_READY, () => {
34+
if ((this.client as any).__getStatus().isReady) {
3535
console.log(`${this.metadata.name} provider initialized`);
3636
resolve();
37-
});
37+
} else {
38+
this.client.on(this.client.Event.SDK_READY, () => {
39+
console.log(`${this.metadata.name} provider initialized`);
40+
resolve();
41+
});
42+
}
3843
});
3944
}
4045

tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@
4848
// "typeRoots": [], /* List of folders to include type definitions from. */
4949
// "types": [], /* Type declaration files to be included in compilation. */
5050
"allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
51-
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
51+
"esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
52+
"skipLibCheck": true /* Skip type checking of declaration files. */
5253
// "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
5354
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
5455

0 commit comments

Comments
 (0)