File tree Expand file tree Collapse file tree 6 files changed +34
-24
lines changed
Expand file tree Collapse file tree 6 files changed +34
-24
lines changed Original file line number Diff line number Diff line change 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
981.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
Original file line number Diff line number Diff line change @@ -19,12 +19,12 @@ npm install @splitsoftware/openfeature-js-split-provider
1919### Confirm peer dependencies are installed
2020``` sh
2121npm 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 ;
2828const SplitFactory = require (' @splitsoftware/splitio' ).SplitFactory ;
2929const OpenFeatureSplitProvider = require (' @splitsoftware/openfeature-js-split-provider' ).OpenFeatureSplitProvider ;
3030
Original file line number Diff line number Diff line change 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" ,
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" ,
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" ,
Original file line number Diff line number Diff line change 1- const OpenFeature = require ( '@openfeature/js -sdk' ) . OpenFeature ;
1+ const OpenFeature = require ( '@openfeature/server -sdk' ) . OpenFeature ;
22const SplitFactory = require ( '@splitsoftware/splitio' ) . SplitFactory ;
33import { OpenFeatureSplitProvider } from '../..' ;
44
Original file line number Diff line number Diff line change 77 JsonValue ,
88 TargetingKeyMissingError ,
99 StandardResolutionReasons ,
10- } from "@openfeature/js -sdk" ;
10+ } from "@openfeature/server -sdk" ;
1111import type SplitIO from "@splitsoftware/splitio/types/splitio" ;
1212
1313export 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
Original file line number Diff line number Diff line change 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
You can’t perform that action at this time.
0 commit comments