Skip to content

Commit afd45c5

Browse files
committed
merge in main, resolve merge conflicts with growthbook
Signed-off-by: jarebudev <[email protected]>
2 parents 443f3df + 5b2ac49 commit afd45c5

26 files changed

+668
-37
lines changed

.github/workflows/release-please.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
fetch-depth: 0
2525
submodules: recursive
2626

27-
- uses: bufbuild/buf-setup-action@1115d0acd3d2a120b30023fac52abc46807c8fd6 # v1.48.0
27+
- uses: bufbuild/buf-setup-action@480b44ac64eb7784931d42dcddaf762c626186a6 # v1.49.0
2828
with:
2929
github_token: ${{ github.token }}
3030
- name: Setup Node

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
[submodule "libs/shared/flagd-core/test-harness"]
1414
path = libs/shared/flagd-core/test-harness
1515
url = https://github.com/open-feature/flagd-testbed
16-
branch = v0.5.20
16+
branch = v0.5.21
1717
[submodule "libs/shared/flagd-core/spec"]
1818
path = libs/shared/flagd-core/spec
1919
url = https://github.com/open-feature/spec

.release-please-manifest.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,6 @@
1919
"libs/providers/growthbook-client": "0.1.2",
2020
"libs/providers/config-cat-web": "0.1.3",
2121
"libs/shared/config-cat-core": "0.1.0",
22-
"libs/providers/unleash-web": "0.1.0"
22+
"libs/providers/unleash-web": "0.1.0",
23+
"libs/providers/growthbook": "0.1.1"
2324
}

libs/providers/flagd/docker-compose.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
services:
22
flagd:
3-
image: ghcr.io/open-feature/flagd-testbed:v0.5.20
3+
image: ghcr.io/open-feature/flagd-testbed:v0.5.21
44
ports:
55
- 8013:8013
66
flagd-unstable:
7-
image: ghcr.io/open-feature/flagd-testbed-unstable:v0.5.20
7+
image: ghcr.io/open-feature/flagd-testbed-unstable:v0.5.21
88
ports:
99
- 8014:8013
1010
flagd-sync:
11-
image: ghcr.io/open-feature/sync-testbed:v0.5.20
11+
image: ghcr.io/open-feature/sync-testbed:v0.5.21
1212
ports:
1313
- 9090:9090
1414
flagd-sync-unstable:
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"extends": ["../../../.eslintrc.json"],
3+
"ignorePatterns": ["!**/*"],
4+
"overrides": [
5+
{
6+
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
7+
"rules": {}
8+
},
9+
{
10+
"files": ["*.ts", "*.tsx"],
11+
"rules": {}
12+
},
13+
{
14+
"files": ["*.js", "*.jsx"],
15+
"rules": {}
16+
},
17+
{
18+
"files": ["*.json"],
19+
"parser": "jsonc-eslint-parser",
20+
"rules": {
21+
"@nx/dependency-checks": "error"
22+
}
23+
}
24+
]
25+
}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# growthbook Provider
2+
3+
## Installation
4+
5+
```
6+
$ npm install @openfeature/growthbook-provider
7+
```
8+
9+
## Example Setup
10+
11+
```typescript
12+
import { GrowthBookClient, ClientOptions, InitOptions } from '@growthbook/growthbook';
13+
import { GrowthbookProvider } from '@openfeature/growthbook-provider';
14+
import { OpenFeature } from '@openfeature/server-sdk';
15+
16+
/*
17+
* Configure your GrowthBook instance with GrowthBook context
18+
* @see https://docs.growthbook.io/lib/js#step-1-configure-your-app
19+
*/
20+
const gbClientOptions: ClientOptions = {
21+
apiHost: 'https://cdn.growthbook.io',
22+
clientKey: 'sdk-abc123',
23+
// Only required if you have feature encryption enabled in GrowthBook
24+
decryptionKey: 'key_abc123',
25+
};
26+
27+
/*
28+
* optional init options
29+
* @see https://docs.growthbook.io/lib/js#switching-to-init
30+
*/
31+
const initOptions: InitOptions = {
32+
timeout: 2000,
33+
streaming: true,
34+
};
35+
36+
OpenFeature.setProvider(new GrowthbookProvider(gbClientOptions, initOptions));
37+
```
38+
39+
## Building
40+
41+
Run `nx package providers-growthbook` to build the library.
42+
43+
## Running unit tests
44+
45+
Run `nx test providers-growthbook` to execute the unit tests via [Jest](https://jestjs.io).
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"presets": [["minify", { "builtIns": false }]]
3+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/* eslint-disable */
2+
export default {
3+
displayName: 'providers-growthbook',
4+
preset: '../../../jest.preset.js',
5+
transform: {
6+
'^.+\\.[tj]s$': ['ts-jest', { tsconfig: '<rootDir>/tsconfig.spec.json' }],
7+
},
8+
moduleFileExtensions: ['ts', 'js', 'html'],
9+
coverageDirectory: '../../../coverage/libs/providers/growthbook',
10+
};

0 commit comments

Comments
 (0)