Skip to content

Commit 60d6146

Browse files
authored
feat!: update to js-sdk (#108)
* feat!: update to js-sdk Signed-off-by: Todd Baert <[email protected]> * update provider template with JsonValue Signed-off-by: Todd Baert <[email protected]> Signed-off-by: Todd Baert <[email protected]>
1 parent fd9ad53 commit 60d6146

25 files changed

+82
-74
lines changed
+16-16
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Changelog
22

3-
## [2.0.0](https://github.com/open-feature/node-sdk-contrib/compare/open-telemetry-hook-v1.2.3...open-telemetry-hook-v2.0.0) (2022-08-15)
3+
## [2.0.0](https://github.com/open-feature/js-sdk-contrib/compare/open-telemetry-hook-v1.2.3...open-telemetry-hook-v2.0.0) (2022-08-15)
44

55

66
### ⚠ BREAKING CHANGES
@@ -9,47 +9,47 @@
99

1010
### Features
1111

12-
* Update OTel hook to latest semantic convention ([#65](https://github.com/open-feature/node-sdk-contrib/issues/65)) ([0dd7802](https://github.com/open-feature/node-sdk-contrib/commit/0dd780271fabd7aa7c503a48bff75bebb63b46b9))
12+
* Update OTel hook to latest semantic convention ([#65](https://github.com/open-feature/js-sdk-contrib/issues/65)) ([0dd7802](https://github.com/open-feature/js-sdk-contrib/commit/0dd780271fabd7aa7c503a48bff75bebb63b46b9))
1313

1414

1515
### Bug Fixes
1616

17-
* add test ([#71](https://github.com/open-feature/node-sdk-contrib/issues/71)) ([080fc4b](https://github.com/open-feature/node-sdk-contrib/commit/080fc4b3c926728361ad34d6763df7bc2d5ab023))
18-
* change test name ([#75](https://github.com/open-feature/node-sdk-contrib/issues/75)) ([abac20d](https://github.com/open-feature/node-sdk-contrib/commit/abac20d29f54865a18662baacaeb60fb5d8c8175))
19-
* set openfeature sdk min version to 0.2.0 ([#93](https://github.com/open-feature/node-sdk-contrib/issues/93)) ([a733102](https://github.com/open-feature/node-sdk-contrib/commit/a733102f523f9289fdce356a342828cc2e020f48))
20-
* shell scripts in templates ([#73](https://github.com/open-feature/node-sdk-contrib/issues/73)) ([89c8cfe](https://github.com/open-feature/node-sdk-contrib/commit/89c8cfe981348376995f50ca757299077249544e))
17+
* add test ([#71](https://github.com/open-feature/js-sdk-contrib/issues/71)) ([080fc4b](https://github.com/open-feature/js-sdk-contrib/commit/080fc4b3c926728361ad34d6763df7bc2d5ab023))
18+
* change test name ([#75](https://github.com/open-feature/js-sdk-contrib/issues/75)) ([abac20d](https://github.com/open-feature/js-sdk-contrib/commit/abac20d29f54865a18662baacaeb60fb5d8c8175))
19+
* set openfeature sdk min version to 0.2.0 ([#93](https://github.com/open-feature/js-sdk-contrib/issues/93)) ([a733102](https://github.com/open-feature/js-sdk-contrib/commit/a733102f523f9289fdce356a342828cc2e020f48))
20+
* shell scripts in templates ([#73](https://github.com/open-feature/js-sdk-contrib/issues/73)) ([89c8cfe](https://github.com/open-feature/js-sdk-contrib/commit/89c8cfe981348376995f50ca757299077249544e))
2121

22-
## [1.2.3-alpha](https://github.com/open-feature/node-sdk-contrib/compare/open-telemetry-hook-v1.2.2-alpha...open-telemetry-hook-v1.2.3-alpha) (2022-07-21)
22+
## [1.2.3-alpha](https://github.com/open-feature/js-sdk-contrib/compare/open-telemetry-hook-v1.2.2-alpha...open-telemetry-hook-v1.2.3-alpha) (2022-07-21)
2323

2424

2525
### Bug Fixes
2626

27-
* change test name ([#75](https://github.com/open-feature/node-sdk-contrib/issues/75)) ([abac20d](https://github.com/open-feature/node-sdk-contrib/commit/abac20d29f54865a18662baacaeb60fb5d8c8175))
27+
* change test name ([#75](https://github.com/open-feature/js-sdk-contrib/issues/75)) ([abac20d](https://github.com/open-feature/js-sdk-contrib/commit/abac20d29f54865a18662baacaeb60fb5d8c8175))
2828

29-
## [1.2.2-alpha](https://github.com/open-feature/node-sdk-contrib/compare/open-telemetry-hook-v1.2.1-alpha...open-telemetry-hook-v1.2.2-alpha) (2022-07-21)
29+
## [1.2.2-alpha](https://github.com/open-feature/js-sdk-contrib/compare/open-telemetry-hook-v1.2.1-alpha...open-telemetry-hook-v1.2.2-alpha) (2022-07-21)
3030

3131

3232
### Bug Fixes
3333

34-
* shell scripts in templates ([#73](https://github.com/open-feature/node-sdk-contrib/issues/73)) ([89c8cfe](https://github.com/open-feature/node-sdk-contrib/commit/89c8cfe981348376995f50ca757299077249544e))
34+
* shell scripts in templates ([#73](https://github.com/open-feature/js-sdk-contrib/issues/73)) ([89c8cfe](https://github.com/open-feature/js-sdk-contrib/commit/89c8cfe981348376995f50ca757299077249544e))
3535

36-
## [1.2.1-alpha](https://github.com/open-feature/node-sdk-contrib/compare/open-telemetry-hook-v1.2.0-alpha...open-telemetry-hook-v1.2.1-alpha) (2022-07-21)
36+
## [1.2.1-alpha](https://github.com/open-feature/js-sdk-contrib/compare/open-telemetry-hook-v1.2.0-alpha...open-telemetry-hook-v1.2.1-alpha) (2022-07-21)
3737

3838

3939
### Bug Fixes
4040

41-
* add test ([#71](https://github.com/open-feature/node-sdk-contrib/issues/71)) ([080fc4b](https://github.com/open-feature/node-sdk-contrib/commit/080fc4b3c926728361ad34d6763df7bc2d5ab023))
41+
* add test ([#71](https://github.com/open-feature/js-sdk-contrib/issues/71)) ([080fc4b](https://github.com/open-feature/js-sdk-contrib/commit/080fc4b3c926728361ad34d6763df7bc2d5ab023))
4242

43-
## [1.2.0-alpha](https://github.com/open-feature/node-sdk-contrib/compare/open-telemetry-hook-v1.1.0-alpha...open-telemetry-hook-v1.2.0-alpha) (2022-07-21)
43+
## [1.2.0-alpha](https://github.com/open-feature/js-sdk-contrib/compare/open-telemetry-hook-v1.1.0-alpha...open-telemetry-hook-v1.2.0-alpha) (2022-07-21)
4444

4545

4646
### Features
4747

48-
* Update OTel hook to latest semantic convention ([#65](https://github.com/open-feature/node-sdk-contrib/issues/65)) ([0dd7802](https://github.com/open-feature/node-sdk-contrib/commit/0dd780271fabd7aa7c503a48bff75bebb63b46b9))
48+
* Update OTel hook to latest semantic convention ([#65](https://github.com/open-feature/js-sdk-contrib/issues/65)) ([0dd7802](https://github.com/open-feature/js-sdk-contrib/commit/0dd780271fabd7aa7c503a48bff75bebb63b46b9))
4949

50-
## [1.1.0-alpha](https://github.com/open-feature/node-sdk-contrib/compare/open-telemetry-hook-v1.0.6-alpha...open-telemetry-hook-v1.1.0-alpha) (2022-07-21)
50+
## [1.1.0-alpha](https://github.com/open-feature/js-sdk-contrib/compare/open-telemetry-hook-v1.0.6-alpha...open-telemetry-hook-v1.1.0-alpha) (2022-07-21)
5151

5252

5353
### Features
5454

55-
* Update OTel hook to latest semantic convention ([#65](https://github.com/open-feature/node-sdk-contrib/issues/65)) ([0dd7802](https://github.com/open-feature/node-sdk-contrib/commit/0dd780271fabd7aa7c503a48bff75bebb63b46b9))
55+
* Update OTel hook to latest semantic convention ([#65](https://github.com/open-feature/js-sdk-contrib/issues/65)) ([0dd7802](https://github.com/open-feature/js-sdk-contrib/commit/0dd780271fabd7aa7c503a48bff75bebb63b46b9))

libs/hooks/open-telemetry/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"type": "commonjs",
55
"repository": {
66
"type": "git",
7-
"url": "https://github.com/open-feature/node-sdk-contrib.git",
7+
"url": "https://github.com/open-feature/js-sdk-contrib.git",
88
"directory": "libs/hooks/open-telemetry"
99
},
1010
"publishConfig": {
@@ -15,7 +15,7 @@
1515
"current-version": "echo $npm_package_version"
1616
},
1717
"peerDependencies": {
18-
"@openfeature/nodejs-sdk": "^0.2.0"
18+
"@openfeature/js-sdk": "^0.4.0"
1919
},
2020
"license": "Apache-2.0"
2121
}

libs/hooks/open-telemetry/src/lib/open-telemetry-hook.spec.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { EvaluationDetails, HookContext } from '@openfeature/nodejs-sdk';
1+
import { EvaluationDetails, HookContext } from '@openfeature/js-sdk';
22

33
const setAttributes = jest.fn();
44
const setAttribute = jest.fn();
@@ -33,6 +33,7 @@ describe('OpenTelemetry Hooks', () => {
3333
context: {},
3434
defaultValue: true,
3535
flagValueType: 'boolean',
36+
logger: console
3637
};
3738

3839
let otelHook: OpenTelemetryHook;

libs/hooks/open-telemetry/src/lib/open-telemetry-hook.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {
33
HookContext,
44
EvaluationDetails,
55
FlagValue,
6-
} from '@openfeature/nodejs-sdk';
6+
} from '@openfeature/js-sdk';
77
import { Span, Tracer, trace } from '@opentelemetry/api';
88

99
const SpanProperties = Object.freeze({

libs/providers/flagd/CHANGELOG.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Changelog
22

3-
## [0.4.0](https://github.com/open-feature/node-sdk-contrib/compare/flagd-provider-v0.3.0...flagd-provider-v0.4.0) (2022-08-15)
3+
## [0.4.0](https://github.com/open-feature/js-sdk-contrib/compare/flagd-provider-v0.3.0...flagd-provider-v0.4.0) (2022-08-15)
44

55

66
### ⚠ BREAKING CHANGES
@@ -9,26 +9,26 @@
99

1010
### Bug Fixes
1111

12-
* set openfeature sdk min version to 0.2.0 ([#93](https://github.com/open-feature/node-sdk-contrib/issues/93)) ([a733102](https://github.com/open-feature/node-sdk-contrib/commit/a733102f523f9289fdce356a342828cc2e020f48))
12+
* set openfeature sdk min version to 0.2.0 ([#93](https://github.com/open-feature/js-sdk-contrib/issues/93)) ([a733102](https://github.com/open-feature/js-sdk-contrib/commit/a733102f523f9289fdce356a342828cc2e020f48))
1313

14-
## [0.3.0](https://github.com/open-feature/node-sdk-contrib/compare/flagd-provider-v0.2.1...flagd-provider-v0.3.0) (2022-08-09)
14+
## [0.3.0](https://github.com/open-feature/js-sdk-contrib/compare/flagd-provider-v0.2.1...flagd-provider-v0.3.0) (2022-08-09)
1515

1616

1717
### Features
1818

19-
* change flagD default port to 8013 ([#85](https://github.com/open-feature/node-sdk-contrib/issues/85)) ([9e26840](https://github.com/open-feature/node-sdk-contrib/commit/9e268406509a072b7561910fff6b8ab8bb0265c8))
20-
* update flagd provider to use float api ([#87](https://github.com/open-feature/node-sdk-contrib/issues/87)) ([9f871f1](https://github.com/open-feature/node-sdk-contrib/commit/9f871f1880022297b28601d472da2b4200325127))
19+
* change flagD default port to 8013 ([#85](https://github.com/open-feature/js-sdk-contrib/issues/85)) ([9e26840](https://github.com/open-feature/js-sdk-contrib/commit/9e268406509a072b7561910fff6b8ab8bb0265c8))
20+
* update flagd provider to use float api ([#87](https://github.com/open-feature/js-sdk-contrib/issues/87)) ([9f871f1](https://github.com/open-feature/js-sdk-contrib/commit/9f871f1880022297b28601d472da2b4200325127))
2121

22-
## [0.2.1](https://github.com/open-feature/node-sdk-contrib/compare/flagd-provider-v0.2.0...flagd-provider-v0.2.1) (2022-07-29)
22+
## [0.2.1](https://github.com/open-feature/js-sdk-contrib/compare/flagd-provider-v0.2.0...flagd-provider-v0.2.1) (2022-07-29)
2323

2424

2525
### Bug Fixes
2626

27-
* Add buf dependency to release process ([#80](https://github.com/open-feature/node-sdk-contrib/issues/80)) ([f55bc20](https://github.com/open-feature/node-sdk-contrib/commit/f55bc20362c55441dc0a1d562b95957c8ab8c810))
27+
* Add buf dependency to release process ([#80](https://github.com/open-feature/js-sdk-contrib/issues/80)) ([f55bc20](https://github.com/open-feature/js-sdk-contrib/commit/f55bc20362c55441dc0a1d562b95957c8ab8c810))
2828

29-
## [0.2.0](https://github.com/open-feature/node-sdk-contrib/compare/flagd-provider-v0.1.0...flagd-provider-v0.2.0) (2022-07-27)
29+
## [0.2.0](https://github.com/open-feature/js-sdk-contrib/compare/flagd-provider-v0.1.0...flagd-provider-v0.2.0) (2022-07-27)
3030

3131

3232
### Features
3333

34-
* flagd provider ([#66](https://github.com/open-feature/node-sdk-contrib/issues/66)) ([9d6cb86](https://github.com/open-feature/node-sdk-contrib/commit/9d6cb868908264b8661ed95a207397ae67693527))
34+
* flagd provider ([#66](https://github.com/open-feature/js-sdk-contrib/issues/66)) ([9d6cb86](https://github.com/open-feature/js-sdk-contrib/commit/9d6cb868908264b8661ed95a207397ae67693527))

libs/providers/flagd/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
"current-version": "echo $npm_package_version"
88
},
99
"peerDependencies": {
10-
"@openfeature/nodejs-sdk": "^0.2.0"
10+
"@openfeature/js-sdk": "^0.4.0"
1111
}
1212
}

libs/providers/flagd/src/lib/flagd-provider.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
jest.mock('@protobuf-ts/grpc-transport');
22

3-
import { Client, ErrorCode, OpenFeature } from '@openfeature/nodejs-sdk';
3+
import { Client, ErrorCode, OpenFeature } from '@openfeature/js-sdk';
44
import { GrpcTransport } from '@protobuf-ts/grpc-transport';
55
import type { UnaryCall } from '@protobuf-ts/runtime-rpc';
66
import { Struct } from '../proto/ts/google/protobuf/struct';

libs/providers/flagd/src/lib/flagd-provider.ts

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import {
22
EvaluationContext,
3+
JsonValue,
34
Provider,
45
ResolutionDetails,
5-
} from '@openfeature/nodejs-sdk';
6+
} from '@openfeature/js-sdk';
67
import { Service } from './service/service';
78
import { GRPCService } from './service/grpc/service';
89
import { Protocol } from './service/grpc/protocol';
@@ -69,11 +70,11 @@ export class FlagdProvider implements Provider {
6970
return this.service.resolveNumber(flagKey, transformedContext);
7071
}
7172

72-
resolveObjectEvaluation<U extends object>(
73+
resolveObjectEvaluation<T extends JsonValue>(
7374
flagKey: string,
74-
_: U,
75+
_: T,
7576
transformedContext: EvaluationContext
76-
): Promise<ResolutionDetails<U>> {
77+
): Promise<ResolutionDetails<T>> {
7778
return this.service.resolveObject(flagKey, transformedContext);
7879
}
7980
}

libs/providers/flagd/src/lib/service/grpc/service.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import * as grpc from '@grpc/grpc-js';
22
import {
33
EvaluationContext,
4+
JsonValue,
45
ParseError,
56
ResolutionDetails,
6-
} from '@openfeature/nodejs-sdk';
7+
} from '@openfeature/js-sdk';
78
import { GrpcTransport } from '@protobuf-ts/grpc-transport';
89
import { JsonObject } from '@protobuf-ts/runtime';
910
import { Struct } from '../../../proto/ts/google/protobuf/struct';
@@ -81,7 +82,7 @@ export class GRPCService implements Service {
8182
};
8283
}
8384

84-
async resolveObject<T extends object>(
85+
async resolveObject<T extends JsonValue>(
8586
flagKey: string,
8687
context: EvaluationContext
8788
): Promise<ResolutionDetails<T>> {
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
import {
22
EvaluationContext,
3+
JsonValue,
34
ResolutionDetails
4-
} from '@openfeature/nodejs-sdk'
5+
} from '@openfeature/js-sdk'
56

67
export interface Service {
78
resolveBoolean(flagKey: string, context: EvaluationContext): Promise<ResolutionDetails<boolean>>
89
resolveString(flagKey: string, context: EvaluationContext): Promise<ResolutionDetails<string>>
910
resolveNumber(flagKey: string, context: EvaluationContext): Promise<ResolutionDetails<number>>
10-
resolveObject<T extends object>(flagKey: string, context: EvaluationContext): Promise<ResolutionDetails<T>>
11+
resolveObject<T extends JsonValue>(flagKey: string, context: EvaluationContext): Promise<ResolutionDetails<T>>
1112
}
+10-10
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Changelog
22

3-
## [0.2.0](https://github.com/open-feature/node-sdk-contrib/compare/go-feature-flag-provider-v0.1.3...go-feature-flag-provider-v0.2.0) (2022-08-15)
3+
## [0.2.0](https://github.com/open-feature/js-sdk-contrib/compare/go-feature-flag-provider-v0.1.3...go-feature-flag-provider-v0.2.0) (2022-08-15)
44

55

66
### ⚠ BREAKING CHANGES
@@ -9,32 +9,32 @@
99

1010
### Bug Fixes
1111

12-
* set openfeature sdk min version to 0.2.0 ([#93](https://github.com/open-feature/node-sdk-contrib/issues/93)) ([a733102](https://github.com/open-feature/node-sdk-contrib/commit/a733102f523f9289fdce356a342828cc2e020f48))
12+
* set openfeature sdk min version to 0.2.0 ([#93](https://github.com/open-feature/js-sdk-contrib/issues/93)) ([a733102](https://github.com/open-feature/js-sdk-contrib/commit/a733102f523f9289fdce356a342828cc2e020f48))
1313

14-
## [0.1.3](https://github.com/open-feature/node-sdk-contrib/compare/go-feature-flag-provider-v0.1.2...go-feature-flag-provider-v0.1.3) (2022-07-23)
14+
## [0.1.3](https://github.com/open-feature/js-sdk-contrib/compare/go-feature-flag-provider-v0.1.2...go-feature-flag-provider-v0.1.3) (2022-07-23)
1515

1616

1717
### Bug Fixes
1818

19-
* Peer dependencies error ([#77](https://github.com/open-feature/node-sdk-contrib/issues/77)) ([3e4ab86](https://github.com/open-feature/node-sdk-contrib/commit/3e4ab861c1a8d94be50bf2e2445044d820d9164b))
19+
* Peer dependencies error ([#77](https://github.com/open-feature/js-sdk-contrib/issues/77)) ([3e4ab86](https://github.com/open-feature/js-sdk-contrib/commit/3e4ab861c1a8d94be50bf2e2445044d820d9164b))
2020

21-
## [0.1.2](https://github.com/open-feature/node-sdk-contrib/compare/go-feature-flag-provider-v0.1.1...go-feature-flag-provider-v0.1.2) (2022-07-21)
21+
## [0.1.2](https://github.com/open-feature/js-sdk-contrib/compare/go-feature-flag-provider-v0.1.1...go-feature-flag-provider-v0.1.2) (2022-07-21)
2222

2323

2424
### Bug Fixes
2525

26-
* shell scripts in templates ([#73](https://github.com/open-feature/node-sdk-contrib/issues/73)) ([89c8cfe](https://github.com/open-feature/node-sdk-contrib/commit/89c8cfe981348376995f50ca757299077249544e))
26+
* shell scripts in templates ([#73](https://github.com/open-feature/js-sdk-contrib/issues/73)) ([89c8cfe](https://github.com/open-feature/js-sdk-contrib/commit/89c8cfe981348376995f50ca757299077249544e))
2727

28-
## [0.1.1](https://github.com/open-feature/node-sdk-contrib/compare/go-feature-flag-provider-v0.1.0...go-feature-flag-provider-v0.1.1) (2022-07-21)
28+
## [0.1.1](https://github.com/open-feature/js-sdk-contrib/compare/go-feature-flag-provider-v0.1.0...go-feature-flag-provider-v0.1.1) (2022-07-21)
2929

3030

3131
### Bug Fixes
3232

33-
* add test ([#71](https://github.com/open-feature/node-sdk-contrib/issues/71)) ([080fc4b](https://github.com/open-feature/node-sdk-contrib/commit/080fc4b3c926728361ad34d6763df7bc2d5ab023))
33+
* add test ([#71](https://github.com/open-feature/js-sdk-contrib/issues/71)) ([080fc4b](https://github.com/open-feature/js-sdk-contrib/commit/080fc4b3c926728361ad34d6763df7bc2d5ab023))
3434

35-
## [0.1.0](https://github.com/open-feature/node-sdk-contrib/compare/go-feature-flag-provider-v0.0.1...go-feature-flag-provider-v0.1.0) (2022-07-21)
35+
## [0.1.0](https://github.com/open-feature/js-sdk-contrib/compare/go-feature-flag-provider-v0.0.1...go-feature-flag-provider-v0.1.0) (2022-07-21)
3636

3737

3838
### Features
3939

40-
* Go feature flag provider ([#64](https://github.com/open-feature/node-sdk-contrib/issues/64)) ([f32d3b0](https://github.com/open-feature/node-sdk-contrib/commit/f32d3b0d8ae9203c6922cb8c6a6a2a291f5f9068))
40+
* Go feature flag provider ([#64](https://github.com/open-feature/js-sdk-contrib/issues/64)) ([f32d3b0](https://github.com/open-feature/js-sdk-contrib/commit/f32d3b0d8ae9203c6922cb8c6a6a2a291f5f9068))

libs/providers/go-feature-flag/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "0.2.0",
44
"type": "commonjs",
55
"peerDependencies": {
6-
"@openfeature/nodejs-sdk": "^0.2.0"
6+
"@openfeature/js-sdk": "^0.4.0"
77
},
88
"scripts": {
99
"publish-if-not-exists": "cp $NPM_CONFIG_USERCONFIG .npmrc && if [ \"$(npm show $npm_package_name@$npm_package_version version)\" = \"$(npm run current-version -s)\" ]; then echo 'already published, skipping'; else npm publish --access public; fi",

libs/providers/go-feature-flag/src/lib/context-transfomer.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { EvaluationContext } from '@openfeature/nodejs-sdk';
1+
import { EvaluationContext } from '@openfeature/js-sdk';
22
import { GoFeatureFlagUser } from './model';
33
import { transformContext } from './context-transformer';
44

libs/providers/go-feature-flag/src/lib/context-transformer.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { EvaluationContext } from '@openfeature/nodejs-sdk';
1+
import { EvaluationContext } from '@openfeature/js-sdk';
22
import { sha1 } from 'object-hash';
33
import { GoFeatureFlagUser } from './model';
44

libs/providers/go-feature-flag/src/lib/errors/proxyNotReady.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ErrorCode, OpenFeatureError } from '@openfeature/nodejs-sdk'
1+
import { ErrorCode, OpenFeatureError } from '@openfeature/js-sdk'
22

33
// ProxyNotReady is an error send when we try to call the relay proxy and he is not ready
44
// to return a valid response.

libs/providers/go-feature-flag/src/lib/errors/proxyTimeout.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ErrorCode, OpenFeatureError } from '@openfeature/nodejs-sdk'
1+
import { ErrorCode, OpenFeatureError } from '@openfeature/js-sdk'
22

33
// ProxyTimeout is an error send when we try to call the relay proxy and he his not responding
44
// in the appropriate time.

libs/providers/go-feature-flag/src/lib/errors/unknownError.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ErrorCode, OpenFeatureError } from '@openfeature/nodejs-sdk'
1+
import { ErrorCode, OpenFeatureError } from '@openfeature/js-sdk'
22

33
// UnknownError is an error send when something unexpected happened.
44
export class UnknownError extends OpenFeatureError {

libs/providers/go-feature-flag/src/lib/go-feature-flag-provider.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
ResolutionDetails,
88
StandardResolutionReasons,
99
TypeMismatchError,
10-
} from '@openfeature/nodejs-sdk';
10+
} from '@openfeature/js-sdk';
1111
import axios from 'axios';
1212
import MockAdapter from 'axios-mock-adapter';
1313
import { ProxyNotReady } from './errors/proxyNotReady';

libs/providers/go-feature-flag/src/lib/go-feature-flag-provider.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@ import {
22
ErrorCode,
33
EvaluationContext,
44
FlagNotFoundError,
5+
JsonValue,
56
Provider,
67
ResolutionDetails,
78
StandardResolutionReasons,
89
TypeMismatchError,
9-
} from '@openfeature/nodejs-sdk';
10+
} from '@openfeature/js-sdk';
1011
import axios from 'axios';
1112
import { transformContext } from './context-transformer';
1213
import { ProxyNotReady } from './errors/proxyNotReady';
@@ -122,7 +123,7 @@ export class GoFeatureFlagProvider implements Provider {
122123
* @throws {TypeMismatchError} When the type of the variation is not the one expected
123124
* @throws {FlagNotFoundError} When the flag does not exists
124125
*/
125-
async resolveObjectEvaluation<U extends object>(
126+
async resolveObjectEvaluation<U extends JsonValue>(
126127
flagKey: string,
127128
defaultValue: U,
128129
context: EvaluationContext

libs/providers/go-feature-flag/src/lib/model.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import {
22
ErrorCode,
33
JSONValue,
44
StandardResolutionReasons,
5-
} from '@openfeature/nodejs-sdk';
5+
} from '@openfeature/js-sdk';
66

77
/**
88
* GoFeatureFlagUser is the representation of a user for GO Feature Flag

nx.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"$schema": "./node_modules/nx/schemas/nx-schema.json",
3-
"npmScope": "node-sdk-contrib",
3+
"npmScope": "js-sdk-contrib",
44
"affected": {
55
"defaultBase": "main"
66
},

0 commit comments

Comments
 (0)