Skip to content

Commit 308358e

Browse files
authored
chore: remove in-memory provider (#612)
Signed-off-by: Todd Baert <[email protected]>
1 parent 2d3f601 commit 308358e

18 files changed

+2
-509
lines changed

.github/component_owners.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@ components:
1818
- thomaspoignant
1919
libs/providers/go-feature-flag-web:
2020
- thomaspoignant
21-
libs/providers/in-memory:
22-
- moredip
23-
- beeme1mr
24-
- toddbaert
2521
libs/providers/launchdarkly-client:
2622
- kinyoklion
2723
- mateoc

.release-please-manifest.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
"libs/providers/flagd": "0.9.0",
55
"libs/providers/flagd-web": "0.4.0",
66
"libs/providers/env-var": "0.2.0",
7-
"libs/providers/in-memory": "0.2.0",
87
"libs/providers/config-cat": "0.4.0",
98
"libs/providers/launchdarkly-client": "0.2.0",
109
"libs/providers/go-feature-flag-web": "0.1.4"

libs/providers/in-memory/.eslintrc.json

Lines changed: 0 additions & 18 deletions
This file was deleted.

libs/providers/in-memory/CHANGELOG.md

Lines changed: 0 additions & 25 deletions
This file was deleted.

libs/providers/in-memory/README.md

Lines changed: 2 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,4 @@
11
# In-Memory Provider
22

3-
An *extremely* simple OpenFeature provider, intended for simple demos and as a test stub.
4-
5-
Flagging decisions are static - evaluation context is ignored. The only way to change a flag value is
6-
to replace the entire configuration (with `replaceConfiguration`), and this is only intended to be used
7-
when the provider is acting as a test stub.
8-
9-
Object values are not currently supported (but a PR implementing them would be gratefully received!)
10-
11-
## Installation
12-
13-
```
14-
$ npm install @openfeature/in-memory-provider
15-
```
16-
17-
## Usage
18-
19-
### set up the provider with some flag values
20-
```
21-
import { InMemoryProvider } from '@openfeature/in-memory-provider'
22-
import { OpenFeature } from '@openfeature/server-sdk'
23-
24-
const flags = {
25-
'a-boolean-flag': true,
26-
'a-string-flag': 'the flag value',
27-
}
28-
const provider = new InMemoryProvider(flags)
29-
OpenFeature.setProvider(provider)
30-
```
31-
32-
### check a flag's value
33-
```
34-
// create a client
35-
const client = OpenFeature.getClient('my-app');
36-
37-
// get that hardcoded boolean flag
38-
const boolValue = await client.getBooleanValue('a-boolean-flag', false);
39-
```
40-
41-
### replace the flag configuration
42-
*a crude facility for when the provider is being used as a test stub*
43-
44-
```
45-
provider.replaceConfiguration({
46-
'a-boolean-flag': false
47-
})
48-
```
49-
50-
Note that this entirely replaces the previous configuration - no merging is
51-
performed and all previous values are lost.
52-
53-
54-
## Development
55-
56-
Run `nx package providers-in-memory` to build the library.
57-
58-
Run `nx test providers-in-memory` to execute the unit tests via [Jest](https://jestjs.io).
3+
This component has been deprecated and removed.
4+
The `@openfeature/server-sdk` now contains its own `InMemoryProvider` implementation.

libs/providers/in-memory/babel.config.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

libs/providers/in-memory/jest.config.ts

Lines changed: 0 additions & 10 deletions
This file was deleted.

libs/providers/in-memory/package.json

Lines changed: 0 additions & 11 deletions
This file was deleted.

libs/providers/in-memory/project.json

Lines changed: 0 additions & 87 deletions
This file was deleted.

libs/providers/in-memory/src/index.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

libs/providers/in-memory/src/lib/flag-configuration.ts

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)