launchdarkly-js-sdk-common 3.5.1 → 3.7.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "launchdarkly-js-sdk-common",
3
- "version": "3.5.1",
3
+ "version": "3.7.0",
4
4
  "description": "LaunchDarkly SDK for JavaScript - common code",
5
5
  "author": "LaunchDarkly <team@launchdarkly.com>",
6
6
  "license": "Apache-2.0",
package/typings.d.ts CHANGED
@@ -133,10 +133,14 @@ declare module 'launchdarkly-js-sdk-common' {
133
133
  /**
134
134
  * Whether or not to include custom HTTP headers when requesting flags from LaunchDarkly.
135
135
  *
136
- * Currently these are used to track what version of the SDK is active. This defaults to true
137
- * (custom headers will be sent). One reason you might want to set it to false is that the presence
138
- * of custom headers causes browsers to make an extra OPTIONS request (a CORS preflight check)
139
- * before each flag request, which could affect performance.
136
+ * These are used to send metadata about the SDK (such as the version). They
137
+ * are also used to send the application.id and application.version set in
138
+ * the options.
139
+ *
140
+ * This defaults to true (custom headers will be sent). One reason you might
141
+ * want to set it to false is that the presence of custom headers causes
142
+ * browsers to make an extra OPTIONS request (a CORS preflight check) before
143
+ * each flag request, which could affect performance.
140
144
  */
141
145
  sendLDHeaders?: boolean;
142
146
 
@@ -187,10 +191,13 @@ declare module 'launchdarkly-js-sdk-common' {
187
191
  inlineUsersInEvents?: boolean;
188
192
 
189
193
  /**
190
- * Whether or not to send an analytics event for a flag evaluation even if the same flag was
191
- * evaluated with the same value within the last five minutes.
194
+ * This option is deprecated, and setting it has no effect.
192
195
  *
193
- * By default, this is false (duplicate events within five minutes will be dropped).
196
+ * The behavior is now to allow frequent duplicate events.
197
+ *
198
+ * This is not a problem because most events will be summarized, and
199
+ * events which are not summarized are important to the operation of features such as
200
+ * experimentation.
194
201
  */
195
202
  allowFrequentDuplicateEvents?: boolean;
196
203
 
@@ -284,6 +291,31 @@ declare module 'launchdarkly-js-sdk-common' {
284
291
  * The default value is `false`.
285
292
  */
286
293
  autoAliasingOptOut?: boolean;
294
+
295
+ /**
296
+ * Information about the application where the LaunchDarkly SDK is running.
297
+ */
298
+ application?: {
299
+ /**
300
+ * A unique identifier representing the application where the LaunchDarkly SDK is running.
301
+ *
302
+ * This can be specified as any string value as long as it only uses the following characters: ASCII letters,
303
+ * ASCII digits, period, hyphen, underscore. A string containing any other characters will be ignored.
304
+ *
305
+ * Example: `authentication-service`
306
+ */
307
+ id?: string;
308
+
309
+ /**
310
+ * A unique identifier representing the version of the application where the LaunchDarkly SDK is running.
311
+ *
312
+ * This can be specified as any string value as long as it only uses the following characters: ASCII letters,
313
+ * ASCII digits, period, hyphen, underscore. A string containing any other characters will be ignored.
314
+ *
315
+ * Example: `1.0.0` (standard version string) or `abcdef` (sha prefix)
316
+ */
317
+ version?: string;
318
+ }
287
319
  }
288
320
 
289
321
  /**