Skip to content

Commit 40cd7fd

Browse files
authored
prepare 3.1.4 release (#290)
## [3.1.4] - 2023-09-06 ### Fixed: - #283 Catch xhr errors on page close and ignore them to reduce noise.
2 parents e301e08 + c125971 commit 40cd7fd

File tree

5 files changed

+17
-11
lines changed

5 files changed

+17
-11
lines changed

CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Repository Maintainers
2+
* @launchdarkly/team-sdk

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
## LaunchDarkly overview
66

7-
[LaunchDarkly](https://www.launchdarkly.com) is a feature management platform that serves over 100 billion feature flags daily to help teams build better software, faster. [Get started](https://docs.launchdarkly.com/home/getting-started) using LaunchDarkly today!
7+
[LaunchDarkly](https://www.launchdarkly.com) is a feature management platform that serves trillions of feature flags daily to help teams build better software, faster. [Get started](https://docs.launchdarkly.com/home/getting-started) using LaunchDarkly today!
88

99
[![Twitter Follow](https://img.shields.io/twitter/follow/launchdarkly.svg?style=social&label=Follow&maxAge=2592000)](https://twitter.com/intent/follow?screen_name=launchdarkly)
1010

@@ -30,7 +30,7 @@ By default, the SDK sends log output to the browser console. There are four logg
3030

3131
## Learn more
3232

33-
Check out our [documentation](https://docs.launchdarkly.com) for in-depth instructions on configuring and using LaunchDarkly. You can also head straight to the [complete reference guide for this SDK](https://docs.launchdarkly.com/sdk/client-side/javascript). Additionally, the authoritative full description of all properties, types, and methods is the [online TypeScript documentation](https://launchdarkly.github.io/js-client-sdk/). If you are not using TypeScript, then the types are only for your information and are not enforced, although the properties and methods are still the same as described in the documentation.
33+
Read our [documentation](https://docs.launchdarkly.com) for in-depth instructions on configuring and using LaunchDarkly. You can also head straight to the [complete reference guide for this SDK](https://docs.launchdarkly.com/sdk/client-side/javascript). Additionally, the authoritative full description of all properties, types, and methods is the [online TypeScript documentation](https://launchdarkly.github.io/js-client-sdk/). If you are not using TypeScript, then the types are only for your information and are not enforced, although the properties and methods are still the same as described in the documentation.
3434

3535
For examples of using the SDK in a simple JavaScript application, see [`hello-js`](https://github.com/launchdarkly/hello-js) and [`hello-bootstrap`](https://github.com/launchdarkly/hello-bootstrap).
3636

example/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ <h4>
228228
<div class="card">
229229
<div class="card-body">
230230
<p>
231-
These actions are for testing LaunchDarkly's analytics events and A/B testing features.
231+
These actions are for testing LaunchDarkly's analytics events and Experimentation features.
232232
</p>
233233
<form class="form-inline mb-2">
234234
<button id="pushUrlButton" class="btn btn-secondary btn-sm mr-2" type="button">

src/httpRequest.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,11 @@ export default function newHttpRequest(method, url, headers, body, pageIsClosing
3232
}
3333
}
3434
if (pageIsClosing) {
35-
xhr.send(body); // We specified synchronous mode when we called xhr.open
35+
try {
36+
xhr.send(body); // We specified synchronous mode when we called xhr.open
37+
} catch (e) {
38+
// do nothing intentionally to suppress noise for now
39+
}
3640
return emptyResult; // Again, we never want a request to be retried in this case, so we must say it succeeded.
3741
} else {
3842
let cancelled;

typings.d.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,10 @@ declare module 'launchdarkly-js-client-sdk' {
6565
hash?: string;
6666

6767
/**
68-
* Whether the client should make a request to LaunchDarkly for A/B testing goals.
68+
* Whether the client should make a request to LaunchDarkly for Experimentation metrics (goals).
6969
*
7070
* This is true by default, meaning that this request will be made on every page load.
71-
* Set it to false if you are not using A/B testing and want to skip the request.
71+
* Set it to false if you are not using Experimentation and want to skip the request.
7272
*/
7373
fetchGoals?: boolean;
7474

@@ -99,15 +99,15 @@ declare module 'launchdarkly-js-client-sdk' {
9999
*/
100100
export interface LDClient extends LDClientBase {
101101
/**
102-
* Allows you to wait until the client has received goals data from LaunchDarkly.
102+
* Allows you to wait until the client has received metrics (goals) data from LaunchDarkly.
103103
*
104-
* This is only relevant if you are using A/B testing features like click events and
105-
* pageview events; until the client has received the configuration for these (which
106-
* happens immediately after the initial request for feature flags), click events and
104+
* This is only relevant if you are using Experimentation features like click events and
105+
* pageview events. Until the client has received the configuration for these, which
106+
* happens immediately after the initial request for feature flags, click events and
107107
* pageview events will not work, so you may wish to wait using this method before
108108
* doing anything that you expect to generate those events.
109109
*
110-
* The returned Promise will be resolved once the client has received goals data. If
110+
* The returned Promise will be resolved once the client has received metrics data. If
111111
* you prefer to use event handlers rather than Promises, you can listen on the client
112112
* for a `"goalsReady"` event instead.
113113
*

0 commit comments

Comments
 (0)