Skip to content

Commit 9978a11

Browse files
authored
Merge pull request #286 from Flagsmith/fix/types-and-context-deprecation
fix: evalation-context import, remove deprecation, add types import to…
2 parents ad4a206 + 824ce22 commit 9978a11

File tree

4 files changed

+13
-15
lines changed

4 files changed

+13
-15
lines changed

lib/flagsmith/package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
{
22
"name": "flagsmith",
3-
"version": "9.0.1",
3+
"version": "9.0.2",
44
"description": "Feature flagging to support continuous development",
55
"main": "./index.js",
66
"module": "./index.mjs",
77
"browser": "./index.js",
88
"types": "./index.d.ts",
99
"exports": {
10+
"./types": {
11+
"import": "./types.d.ts",
12+
"require": "./types.d.ts",
13+
"browser": "./types.d.ts"
14+
},
1015
".": {
1116
"import": "./index.mjs",
1217
"require": "./index.js",

lib/react-native-flagsmith/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-flagsmith",
3-
"version": "9.0.1",
3+
"version": "9.0.2",
44
"description": "Feature flagging to support continuous development",
55
"main": "./index.js",
66
"repository": {

move-react.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,14 @@ files.forEach((fileName)=>{
2626
}
2727
})
2828

29-
// copy types.d
29+
// copy types and evaluation-context
3030
fs.copyFileSync(path.join(__dirname,"types.d.ts"),path.join(__dirname,"lib/flagsmith/src/types.d.ts"))
3131
fs.copyFileSync(path.join(__dirname,"types.d.ts"),path.join(__dirname,"lib/react-native-flagsmith/src/types.d.ts"))
32-
3332
fs.copyFileSync(path.join(__dirname,"types.d.ts"),path.join(__dirname,"lib/flagsmith/types.d.ts"))
3433
fs.copyFileSync(path.join(__dirname,"types.d.ts"),path.join(__dirname,"lib/react-native-flagsmith/types.d.ts"))
34+
fs.copyFileSync(path.join(__dirname,"evaluation-context.ts"),path.join(__dirname,"lib/flagsmith/evaluation-context.ts"))
35+
fs.copyFileSync(path.join(__dirname,"evaluation-context.ts"),path.join(__dirname,"lib/react-native-flagsmith/evaluation-context.ts"))
36+
3537

3638
try {
3739
fs.rmdirSync(path.join(__dirname,"lib/flagsmith/lib"), {recursive:true})

types.d.ts

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -104,18 +104,9 @@ export interface IInitConfig<F extends string = string, T extends string = strin
104104
enableDynatrace?: boolean;
105105
enableLogs?: boolean;
106106
angularHttpClient?: any;
107-
/**
108-
* * @deprecated Please consider using evaluationContext.identity: {@link IInitConfig.evaluationContext}.
109-
* */
110107
environmentID?: string;
111108
headers?: object;
112-
/**
113-
* * @deprecated Please consider using evaluationContext.identity: {@link IInitConfig.evaluationContext}.
114-
* */
115109
identity?: IIdentity;
116-
/**
117-
* * @deprecated Please consider using evaluationContext.identity: {@link IInitConfig.evaluationContext}.
118-
* */
119110
traits?: ITraits<T>;
120111
onChange?: OnChange<F>;
121112
onError?: (err: Error) => void;
@@ -240,8 +231,8 @@ export interface IFlagsmith<F extends string = string, T extends string = string
240231
*/
241232
setTraits: (traits: ITraits) => Promise<void>;
242233
/**
243-
* * @deprecated Please consider using evaluationContext.identity: {@link IFlagsmith.getContext}.
244-
* */
234+
* The stored identity of the user
235+
*/
245236
identity?: IIdentity;
246237
/**
247238
* Whether the flagsmith SDK is initialised

0 commit comments

Comments
 (0)