@flopflip/launchdarkly-adapter 13.3.1 → 13.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,5 +6,5 @@ declare function getCache(cacheIdentifier: TCacheIdentifiers, cacheKey: LDContex
6
6
  get(): any;
7
7
  unset(): any;
8
8
  }>;
9
- declare function getCachedFlags(cacheIdentifier: TCacheIdentifiers): any;
9
+ declare function getCachedFlags(cacheIdentifier: TCacheIdentifiers): TFlags;
10
10
  export { CACHE_PREFIX, getCache, getCachedFlags };
@@ -88,17 +88,17 @@ async function getCache(cacheIdentifier, cacheKey) {
88
88
  }
89
89
  function getCachedFlags(cacheIdentifier) {
90
90
  const cacheModule = cacheIdentifier === types.cacheIdentifiers.local ? localStorage : sessionStorage;
91
- const referenceToCachedFlags = cacheModule.get(FLAGS_REFERENCE_KEY);
91
+ const referenceToCachedFlags = cacheModule.getItem(FLAGS_REFERENCE_KEY);
92
92
  if (referenceToCachedFlags) {
93
93
  try {
94
94
  const cacheKey = JSON.parse(referenceToCachedFlags);
95
- const cachedFlags = cacheModule.get(cacheKey);
95
+ const cachedFlags = cacheModule.getItem(cacheKey);
96
96
  if (cacheKey && cachedFlags) {
97
97
  return JSON.parse(cachedFlags);
98
98
  }
99
- return {};
100
99
  } catch (error) {}
101
100
  }
101
+ return {};
102
102
  }
103
103
 
104
104
  var _adapterState = /*#__PURE__*/_classPrivateFieldLooseKey("adapterState");
@@ -418,7 +418,7 @@ class LaunchDarklyAdapter {
418
418
  const adapter = new LaunchDarklyAdapter();
419
419
  adapterUtilities.exposeGlobally(adapter);
420
420
 
421
- const version = "13.3.1";
421
+ const version = "13.3.3";
422
422
 
423
423
  exports["default"] = adapter;
424
424
  exports.getCachedFlags = getCachedFlags;
@@ -88,17 +88,17 @@ async function getCache(cacheIdentifier, cacheKey) {
88
88
  }
89
89
  function getCachedFlags(cacheIdentifier) {
90
90
  const cacheModule = cacheIdentifier === types.cacheIdentifiers.local ? localStorage : sessionStorage;
91
- const referenceToCachedFlags = cacheModule.get(FLAGS_REFERENCE_KEY);
91
+ const referenceToCachedFlags = cacheModule.getItem(FLAGS_REFERENCE_KEY);
92
92
  if (referenceToCachedFlags) {
93
93
  try {
94
94
  const cacheKey = JSON.parse(referenceToCachedFlags);
95
- const cachedFlags = cacheModule.get(cacheKey);
95
+ const cachedFlags = cacheModule.getItem(cacheKey);
96
96
  if (cacheKey && cachedFlags) {
97
97
  return JSON.parse(cachedFlags);
98
98
  }
99
- return {};
100
99
  } catch (error) {}
101
100
  }
101
+ return {};
102
102
  }
103
103
 
104
104
  var _adapterState = /*#__PURE__*/_classPrivateFieldLooseKey("adapterState");
@@ -418,7 +418,7 @@ class LaunchDarklyAdapter {
418
418
  const adapter = new LaunchDarklyAdapter();
419
419
  adapterUtilities.exposeGlobally(adapter);
420
420
 
421
- const version = "13.3.1";
421
+ const version = "13.3.3";
422
422
 
423
423
  exports["default"] = adapter;
424
424
  exports.getCachedFlags = getCachedFlags;
@@ -59,17 +59,17 @@ async function getCache(cacheIdentifier, cacheKey) {
59
59
  }
60
60
  function getCachedFlags(cacheIdentifier) {
61
61
  const cacheModule = cacheIdentifier === cacheIdentifiers.local ? localStorage : sessionStorage;
62
- const referenceToCachedFlags = cacheModule.get(FLAGS_REFERENCE_KEY);
62
+ const referenceToCachedFlags = cacheModule.getItem(FLAGS_REFERENCE_KEY);
63
63
  if (referenceToCachedFlags) {
64
64
  try {
65
65
  const cacheKey = JSON.parse(referenceToCachedFlags);
66
- const cachedFlags = cacheModule.get(cacheKey);
66
+ const cachedFlags = cacheModule.getItem(cacheKey);
67
67
  if (cacheKey && cachedFlags) {
68
68
  return JSON.parse(cachedFlags);
69
69
  }
70
- return {};
71
70
  } catch (error) {}
72
71
  }
72
+ return {};
73
73
  }
74
74
 
75
75
  var _adapterState = /*#__PURE__*/_classPrivateFieldLooseKey("adapterState");
@@ -389,6 +389,6 @@ class LaunchDarklyAdapter {
389
389
  const adapter = new LaunchDarklyAdapter();
390
390
  exposeGlobally(adapter);
391
391
 
392
- const version = "13.3.1";
392
+ const version = "13.3.3";
393
393
 
394
394
  export { adapter as default, getCachedFlags, version };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flopflip/launchdarkly-adapter",
3
- "version": "13.3.1",
3
+ "version": "13.3.3",
4
4
  "description": "A adapter around the LaunchDarkly client for flipflop",
5
5
  "main": "dist/flopflip-launchdarkly-adapter.cjs.js",
6
6
  "module": "dist/flopflip-launchdarkly-adapter.esm.js",
@@ -27,10 +27,10 @@
27
27
  },
28
28
  "dependencies": {
29
29
  "@babel/runtime": "7.24.0",
30
- "@flopflip/adapter-utilities": "13.3.1",
31
- "@flopflip/localstorage-cache": "13.3.1",
32
- "@flopflip/sessionstorage-cache": "13.3.1",
33
- "@flopflip/types": "13.3.1",
30
+ "@flopflip/adapter-utilities": "13.3.3",
31
+ "@flopflip/localstorage-cache": "13.3.3",
32
+ "@flopflip/sessionstorage-cache": "13.3.3",
33
+ "@flopflip/types": "13.3.3",
34
34
  "debounce-fn": "4.0.0",
35
35
  "launchdarkly-js-client-sdk": "3.1.4",
36
36
  "lodash": "4.17.21",