diff --git a/.changeset/bounded-proxy-ingestion.md b/.changeset/bounded-proxy-ingestion.md deleted file mode 100644 index e419114..0000000 --- a/.changeset/bounded-proxy-ingestion.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"trakoo": minor ---- - -Add bounded proxy request parsing, batch limits, authorization and admission -hooks, and typed HTTP errors for malformed or rejected analytics requests. diff --git a/.changeset/optional-provider-peers.md b/.changeset/optional-provider-peers.md deleted file mode 100644 index 32cb89d..0000000 --- a/.changeset/optional-provider-peers.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"trakoo": major ---- - -Publish provider SDKs as optional peer dependencies and load them only when -their provider initializes. Trakoo no longer auto-installs or bundles unused -PostHog, OpenPanel, Bento, or EmitKit SDKs. diff --git a/.changeset/posthog-client-instance-isolation.md b/.changeset/posthog-client-instance-isolation.md deleted file mode 100644 index dcb5da3..0000000 --- a/.changeset/posthog-client-instance-isolation.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -"trakoo": patch ---- - -Initialize each PostHog browser provider with its own named SDK object, -isolating live configuration and identify, capture, and reset method dispatch -while preserving PostHog's token- and `persistence_name`-based storage -semantics. diff --git a/.changeset/posthog-server-pageview-identity.md b/.changeset/posthog-server-pageview-identity.md deleted file mode 100644 index 83d6ed9..0000000 --- a/.changeset/posthog-server-pageview-identity.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"trakoo": patch ---- - -Attribute PostHog server page views to user identity supplied on the current -call instead of always recording them as anonymous. diff --git a/.changeset/proxy-delivery-semantics.md b/.changeset/proxy-delivery-semantics.md deleted file mode 100644 index 16b5b85..0000000 --- a/.changeset/proxy-delivery-semantics.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"trakoo": patch ---- - -Retain proxy events until transport acceptance, serialize concurrent flushes, -bound batch latency from the first event, and await in-flight delivery during -shutdown. diff --git a/.changeset/proxy-trust-boundary.md b/.changeset/proxy-trust-boundary.md deleted file mode 100644 index 335889c..0000000 --- a/.changeset/proxy-trust-boundary.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"trakoo": major ---- - -Replace the proxy wire format with version 2. Proxy track events now carry raw -registry input for server-side validation, and server identity must be derived -with `resolveIdentity` instead of trusting browser claims. diff --git a/.changeset/race-safe-initialization.md b/.changeset/race-safe-initialization.md deleted file mode 100644 index bbac665..0000000 --- a/.changeset/race-safe-initialization.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"trakoo": patch ---- - -Wait for asynchronous provider initialization before dispatching first-use -client and server analytics operations, and allow initialization retry after a -transient failure. diff --git a/.changeset/safe-event-routing-globs.md b/.changeset/safe-event-routing-globs.md deleted file mode 100644 index 4a10017..0000000 --- a/.changeset/safe-event-routing-globs.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"trakoo": patch ---- - -Treat regex metacharacters literally in provider event patterns while -preserving `*` as the only routing wildcard. diff --git a/.changeset/safe-provider-debug-logging.md b/.changeset/safe-provider-debug-logging.md deleted file mode 100644 index 6c0adec..0000000 --- a/.changeset/safe-provider-debug-logging.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"trakoo": patch ---- - -Stop provider debug logs from serializing configuration, identity, event -properties, context, and external SDK error objects. diff --git a/.changeset/snapshot-client-event-state.md b/.changeset/snapshot-client-event-state.md deleted file mode 100644 index a9ffc8c..0000000 --- a/.changeset/snapshot-client-event-state.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"trakoo": patch ---- - -Snapshot browser identity, session, context, and timestamp when `track()` is -called so asynchronous initialization or validation cannot reattribute an event. diff --git a/.changeset/standard-schema-events.md b/.changeset/standard-schema-events.md deleted file mode 100644 index 6dba10c..0000000 --- a/.changeset/standard-schema-events.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"trakoo": major ---- - -Replace type-asserted event collections with runtime `defineEvents()` registries based on Standard Schema. Add direct validator interoperability, validator-free `typed()` events, propertyless events, inferred client/server factories, normalized validation failures, and validated provider outputs. Server `track()` calls now fail closed with the new `invalid_options` code when the options argument contains an unrecognized key, and Proxy replay no longer re-runs Standard Schema validators against already-validated client output. This removes the legacy event helper types and client singleton convenience API; see the [Standard Schema migration guide](https://trakoo.co/docs/guides/standard-schema-migration). diff --git a/.changeset/stateless-server-providers.md b/.changeset/stateless-server-providers.md deleted file mode 100644 index d62f9df..0000000 --- a/.changeset/stateless-server-providers.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"trakoo": patch ---- - -Prevent Bento and EmitKit server providers from retaining one request's user -identity for later events. Server events now use only identity supplied on the -current call. diff --git a/CHANGELOG.md b/CHANGELOG.md index e524739..cf62a3e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,55 @@ # trakoo +## 1.0.0 + +### Major Changes + +- Publish provider SDKs as optional peer dependencies and load them only when ([`107774a`](https://github.com/multiplehats/trakoo/commit/107774af29a0b7de2d7a6ed7aa6bfa1db3c0cb6b)) + their provider initializes. Trakoo no longer auto-installs or bundles unused + PostHog, OpenPanel, Bento, or EmitKit SDKs. + +- Replace the proxy wire format with version 2. Proxy track events now carry raw ([`1fceb0b`](https://github.com/multiplehats/trakoo/commit/1fceb0b9ef13f30bfd971b0b432a70aa8b461055)) + registry input for server-side validation, and server identity must be derived + with `resolveIdentity` instead of trusting browser claims. + +- Replace type-asserted event collections with runtime `defineEvents()` registries based on Standard Schema. Add direct validator interoperability, validator-free `typed()` events, propertyless events, inferred client/server factories, normalized validation failures, and validated provider outputs. Server `track()` calls now fail closed with the new `invalid_options` code when the options argument contains an unrecognized key, and Proxy replay no longer re-runs Standard Schema validators against already-validated client output. This removes the legacy event helper types and client singleton convenience API; see the [Standard Schema migration guide](https://trakoo.co/docs/guides/standard-schema-migration). ([#32](https://github.com/multiplehats/trakoo/pull/32)) + +### Minor Changes + +- Add bounded proxy request parsing, batch limits, authorization and admission ([`8090859`](https://github.com/multiplehats/trakoo/commit/80908592dda143411a13ffbe929158c2b5245b32)) + hooks, and typed HTTP errors for malformed or rejected analytics requests. + +### Patch Changes + +- Initialize each PostHog browser provider with its own named SDK object, ([`133e341`](https://github.com/multiplehats/trakoo/commit/133e341cbf2cce7426cb53a2aeeef81f905386ee)) + isolating live configuration and identify, capture, and reset method dispatch + while preserving PostHog's token- and `persistence_name`-based storage + semantics. + +- Attribute PostHog server page views to user identity supplied on the current ([`a5b579b`](https://github.com/multiplehats/trakoo/commit/a5b579b5554755fa6fe59c82d311d3c487123689)) + call instead of always recording them as anonymous. + +- Retain proxy events until transport acceptance, serialize concurrent flushes, ([`e4e4a96`](https://github.com/multiplehats/trakoo/commit/e4e4a96f8086ba6d27a259c3f9359e1a0b48cb0f)) + bound batch latency from the first event, and await in-flight delivery during + shutdown. + +- Wait for asynchronous provider initialization before dispatching first-use ([`9504d75`](https://github.com/multiplehats/trakoo/commit/9504d759208e5a83f8ef302937b4caae1916a166)) + client and server analytics operations, and allow initialization retry after a + transient failure. + +- Treat regex metacharacters literally in provider event patterns while ([`5d4af5c`](https://github.com/multiplehats/trakoo/commit/5d4af5c7811080324b8a24c380bc742bc827cc72)) + preserving `*` as the only routing wildcard. + +- Stop provider debug logs from serializing configuration, identity, event ([`b1d124a`](https://github.com/multiplehats/trakoo/commit/b1d124af539ecc96d08ce4c6581061549b402dc3)) + properties, context, and external SDK error objects. + +- Snapshot browser identity, session, context, and timestamp when `track()` is ([`19f1819`](https://github.com/multiplehats/trakoo/commit/19f18197b41a5249a56ee2349977c915747fffc8)) + called so asynchronous initialization or validation cannot reattribute an event. + +- Prevent Bento and EmitKit server providers from retaining one request's user ([`6772c8f`](https://github.com/multiplehats/trakoo/commit/6772c8f0c09e1e69277b2599aa7ef4e97db52965)) + identity for later events. Server events now use only identity supplied on the + current call. + ## 0.1.0 ### Minor Changes diff --git a/package.json b/package.json index fec86f8..6adfd9c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "trakoo", - "version": "0.1.0", + "version": "1.0.0", "description": "A highly typed, provider-agnostic analytics library for TypeScript applications", "type": "module", "exports": { @@ -32,7 +32,11 @@ }, "main": "./dist/index.js", "types": "./dist/index.d.ts", - "files": ["dist", "README.md", "LICENSE"], + "files": [ + "dist", + "README.md", + "LICENSE" + ], "scripts": { "test": "vitest run", "test:watch": "vitest",