From ec1f9846d25a3b9715cf8a6a8b9c79088b78d40d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 3 Jul 2026 18:59:48 +0000 Subject: [PATCH] chore: release --- .changeset/nervous-pandas-refactor.md | 13 ------------- CHANGELOG.md | 14 ++++++++++++++ package.json | 2 +- 3 files changed, 15 insertions(+), 14 deletions(-) delete mode 100644 .changeset/nervous-pandas-refactor.md diff --git a/.changeset/nervous-pandas-refactor.md b/.changeset/nervous-pandas-refactor.md deleted file mode 100644 index e5cddde..0000000 --- a/.changeset/nervous-pandas-refactor.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -"trashlytics": minor ---- - -Redesign the SDK: scoped Effect core, non-blocking track, Standard Schema support. Breaking changes: - -- Delivery moved to a background fiber; `track()` only validates and enqueues, never waits on the sink -- `trashlytics/effect`: `make` replaces `createTracker` and returns a scoped Effect; closing the scope stops the worker and flushes remaining events (replaces `shutdown`) -- Root entry: `close()` replaces `shutdown()`, trackers support `await using` (`Symbol.asyncDispose`), and pending events auto-flush on page hide/unload in browsers (`flushOnHide`) -- `event()` accepts Effect schemas, `Schema.Struct` fields, any Standard Schema v1 validator (zod/valibot/arktype), or no schema for payload-less events -- Unified tagged errors: `EventValidationError`, `UnknownEventError`, `TrackerClosedError`, `QueueFullError`, `SinkError` (replaces `SinkDeliveryError`) -- New options: `context` (meta enrichment), `retry.jitter`, `deliveryTimeout` (bounds each sink call, default 30s), `maxQueueSize` (renamed from `bufferSize`); `retries` renamed to `retry` -- `httpSink` defaults to `keepalive: true`; new `beaconSink` for browsers diff --git a/CHANGELOG.md b/CHANGELOG.md index ab8da25..b6ecd25 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ # trashlytics +## 0.4.0 + +### Minor Changes + +- 1d00282: Redesign the SDK: scoped Effect core, non-blocking track, Standard Schema support. Breaking changes: + + - Delivery moved to a background fiber; `track()` only validates and enqueues, never waits on the sink + - `trashlytics/effect`: `make` replaces `createTracker` and returns a scoped Effect; closing the scope stops the worker and flushes remaining events (replaces `shutdown`) + - Root entry: `close()` replaces `shutdown()`, trackers support `await using` (`Symbol.asyncDispose`), and pending events auto-flush on page hide/unload in browsers (`flushOnHide`) + - `event()` accepts Effect schemas, `Schema.Struct` fields, any Standard Schema v1 validator (zod/valibot/arktype), or no schema for payload-less events + - Unified tagged errors: `EventValidationError`, `UnknownEventError`, `TrackerClosedError`, `QueueFullError`, `SinkError` (replaces `SinkDeliveryError`) + - New options: `context` (meta enrichment), `retry.jitter`, `deliveryTimeout` (bounds each sink call, default 30s), `maxQueueSize` (renamed from `bufferSize`); `retries` renamed to `retry` + - `httpSink` defaults to `keepalive: true`; new `beaconSink` for browsers + ## 0.3.1 ### Patch Changes diff --git a/package.json b/package.json index c050fd1..04603cb 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "trashlytics", "type": "module", - "version": "0.3.1", + "version": "0.4.0", "description": "A lightweight event tracking library", "main": "./dist/index.cjs", "module": "./dist/index.mjs",