@absolutejs/beacon 0.7.0-beta.25 → 0.7.0-beta.26

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 CHANGED
@@ -6,6 +6,12 @@ This file is generated by `absolute-changelog` from the entries in
6
6
  `changelog/`. Edit an entry, not this file — and add new ones under
7
7
  `changelog/unreleased/`.
8
8
 
9
+ ## 0.7.0-beta.26 — 2026-11-22
10
+
11
+ ### Fixed
12
+
13
+ - **Keep rejected background telemetry sends out of application error handlers during normal use and page teardown. Explicit flush and close calls still expose delivery failures to their callers.** (`createBeacon`, `BEACON_SDK_VERSION`)
14
+
9
15
  ## 0.7.0-beta.25 — 2026-11-21
10
16
 
11
17
  ### Fixed
package/changelog.json CHANGED
@@ -2,6 +2,20 @@
2
2
  "contract": 1,
3
3
  "name": "@absolutejs/beacon",
4
4
  "releases": [
5
+ {
6
+ "changes": [
7
+ {
8
+ "kind": "fixed",
9
+ "summary": "Keep rejected background telemetry sends out of application error handlers during normal use and page teardown. Explicit flush and close calls still expose delivery failures to their callers.",
10
+ "symbols": [
11
+ "createBeacon",
12
+ "BEACON_SDK_VERSION"
13
+ ]
14
+ }
15
+ ],
16
+ "date": "2026-11-22",
17
+ "version": "0.7.0-beta.26"
18
+ },
5
19
  {
6
20
  "changes": [
7
21
  {
package/dist/index.d.ts CHANGED
@@ -5,7 +5,7 @@ export type BeaconLevel = "fatal" | "error" | "warning" | "info";
5
5
  /** Response header used to correlate a browser signal with its server request. */
6
6
  export declare const BEACON_TRACE_HEADER = "x-absolute-trace-id";
7
7
  /** Beacon package version retained with every captured event. */
8
- export declare const BEACON_SDK_VERSION = "0.7.0-beta.25";
8
+ export declare const BEACON_SDK_VERSION = "0.7.0-beta.26";
9
9
  /** Arbitrary event tags, with Beacon's reserved `signal` tag type-checked. */
10
10
  export type BeaconTags = Record<string, string> & {
11
11
  signal?: BeaconSignal;
package/dist/index.js CHANGED
@@ -311,7 +311,7 @@ var consumeEarlyLayoutShiftBuffer = () => {
311
311
 
312
312
  // src/index.ts
313
313
  var BEACON_TRACE_HEADER = "x-absolute-trace-id";
314
- var BEACON_SDK_VERSION = "0.7.0-beta.25";
314
+ var BEACON_SDK_VERSION = "0.7.0-beta.26";
315
315
  var inBrowser = () => typeof window !== "undefined";
316
316
  var newId = () => {
317
317
  if (typeof crypto !== "undefined" && typeof crypto.randomUUID === "function") {
@@ -1306,7 +1306,7 @@ var createBeacon = (options) => {
1306
1306
  type
1307
1307
  };
1308
1308
  };
1309
- const flush = async (useBeacon = false) => {
1309
+ const sendBuffered = async (useBeacon) => {
1310
1310
  flushPendingNetworkFailures();
1311
1311
  if (buffer.length === 0)
1312
1312
  return;
@@ -1325,6 +1325,11 @@ var createBeacon = (options) => {
1325
1325
  ...options.key !== undefined ? { key: options.key } : {}
1326
1326
  });
1327
1327
  };
1328
+ const flush = (useBeacon = false) => {
1329
+ const delivery = sendBuffered(useBeacon);
1330
+ delivery.catch(() => {});
1331
+ return delivery;
1332
+ };
1328
1333
  const addBreadcrumb = (crumb) => {
1329
1334
  breadcrumbs.push({
1330
1335
  at: Date.now(),
@@ -5150,11 +5155,11 @@ var createBeacon = (options) => {
5150
5155
  addBreadcrumb,
5151
5156
  captureException,
5152
5157
  captureMessage,
5153
- close: async () => {
5158
+ close: () => {
5154
5159
  closed = true;
5155
5160
  for (const cleanup of cleanups.splice(0, cleanups.length))
5156
5161
  cleanup();
5157
- await flush(true);
5162
+ return flush(true);
5158
5163
  },
5159
5164
  flush: () => flush(false),
5160
5165
  observeCapability,
@@ -5193,5 +5198,5 @@ export {
5193
5198
  redactBeaconEvent
5194
5199
  };
5195
5200
 
5196
- //# debugId=E26A5543E609C9A364756E2164756E21
5201
+ //# debugId=EEBF0BB605B2DB3864756E2164756E21
5197
5202
  //# sourceMappingURL=index.js.map