Skip to content

Commit 6253e7e

Browse files
authored
Merge pull request #223 from Flagsmith/feat/v4
feat: v4
2 parents 68fe0e8 + ba688c3 commit 6253e7e

21 files changed

+600
-525
lines changed

flagsmith-core.ts

Lines changed: 300 additions & 408 deletions
Large diffs are not rendered by default.

index-es.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { IFlagsmith } from './types';
22

33
import fetch from "unfetch"
4-
import AsyncStorage from "./async-storage";
4+
import AsyncStorage from "./utils/async-storage";
55
import core, { LikeFetch } from './flagsmith-core';
66
// @ts-ignore
77
globalThis.FlagsmithEventSource = typeof EventSource!== "undefined"? EventSource: null;

index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { IFlagsmith } from './types';
44
globalThis.FlagsmithEventSource = typeof EventSource!== "undefined"? EventSource: null;
55

66
import fetch from "unfetch"
7-
import AsyncStorage from "./async-storage";
7+
import AsyncStorage from "./utils/async-storage";
88
import core, { LikeFetch } from './flagsmith-core';
99
import _EventSource from 'reconnecting-eventsource'
1010
// @ts-expect-error

isomorphic-es.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import AsyncStorage from "./async-storage";
1+
import AsyncStorage from "./utils/async-storage";
22
import {IFlagsmith} from "./types";
33
// @ts-expect-error
44
globalThis.FlagsmithEventSource = typeof EventSource !== 'undefined' ? EventSource : null;

isomorphic.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import AsyncStorage from "./async-storage";
1+
import AsyncStorage from "./utils/async-storage";
22
import {IFlagsmith} from "./types";
33
import core from './flagsmith-core'
44

lib/flagsmith-es/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "flagsmith-es",
3-
"version": "3.24.0",
3+
"version": "4.0.0",
44
"description": "Feature flagging to support continuous development. This is an esm equivalent of the standard flagsmith npm module.",
55
"main": "./index.js",
66
"type": "module",

lib/flagsmith/package.json

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

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": "3.24.0",
3+
"version": "4.0.0",
44
"description": "Feature flagging to support continuous development",
55
"main": "./index.js",
66
"repository": {

react.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import React, {
88
useRef,
99
useState,
1010
} from 'react';
11-
import Emitter from './emitter';
11+
import Emitter from './utils/emitter';
1212
const events = new Emitter();
1313

1414
import { IFlagsmith, IFlagsmithTrait, IFlagsmithFeature, IState } from './types'
@@ -111,7 +111,7 @@ export function useFlagsmithLoading() {
111111
}
112112

113113
useEffect(() => {
114-
if (!subscribed && flagsmith.initialised) {
114+
if (!subscribed && flagsmith?.initialised) {
115115
events.on('loading_event', eventListener)
116116
setSubscribed(true)
117117
}

0 commit comments

Comments
 (0)