launchdarkly-js-sdk-common 4.3.0 → 4.3.1
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.
- package/CHANGELOG.md +4 -0
- package/package.json +1 -1
- package/src/InspectorManager.js +0 -1
- package/src/index.js +7 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to the `launchdarkly-js-sdk-common` package will be documented in this file. Changes that affect the dependent SDKs such as `launchdarkly-js-client-sdk` should also be logged in those projects, in the next release that uses the updated version of this package. This project adheres to [Semantic Versioning](http://semver.org).
|
|
4
4
|
|
|
5
|
+
## [4.3.0] - 2022-10-17
|
|
6
|
+
### Added:
|
|
7
|
+
- Added support for `Inspectors` that can be used for collecting information for monitoring, analytics, and debugging.
|
|
8
|
+
|
|
5
9
|
## [4.2.0] - 2022-10-03
|
|
6
10
|
### Removed:
|
|
7
11
|
- Removed `seenRequests` cache. This cache was used to de-duplicate events, but it has been supplanted with summary events.
|
package/package.json
CHANGED
package/src/InspectorManager.js
CHANGED
|
@@ -93,7 +93,6 @@ function InspectorManager(inspectors, logger) {
|
|
|
93
93
|
manager.onFlagChanged = (flagKey, flag) => {
|
|
94
94
|
if (inspectorsByType[InspectorTypes.flagDetailChanged].length) {
|
|
95
95
|
onNextTick(() => {
|
|
96
|
-
console.log('what?');
|
|
97
96
|
inspectorsByType[InspectorTypes.flagDetailChanged].forEach(inspector => inspector.method(flagKey, flag));
|
|
98
97
|
});
|
|
99
98
|
}
|
package/src/index.js
CHANGED
|
@@ -156,6 +156,12 @@ function initialize(env, user, specifiedOptions, platform, extraOptionDefs) {
|
|
|
156
156
|
}
|
|
157
157
|
}
|
|
158
158
|
|
|
159
|
+
function notifyInspectionFlagUsed(key, detail) {
|
|
160
|
+
if (inspectorManager.hasListeners(InspectorTypes.flagUsed)) {
|
|
161
|
+
inspectorManager.onFlagUsed(key, detail, ident.getUser());
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
159
165
|
function notifyInspectionIdentityChanged() {
|
|
160
166
|
if (inspectorManager.hasListeners(InspectorTypes.clientIdentityChanged)) {
|
|
161
167
|
inspectorManager.onIdentityChanged(ident.getUser());
|
|
@@ -312,7 +318,7 @@ function initialize(env, user, specifiedOptions, platform, extraOptionDefs) {
|
|
|
312
318
|
|
|
313
319
|
// For the all flags case `onFlags` will be called instead.
|
|
314
320
|
if (!isAllFlags) {
|
|
315
|
-
|
|
321
|
+
notifyInspectionFlagUsed(key, detail);
|
|
316
322
|
}
|
|
317
323
|
|
|
318
324
|
return detail;
|