From bb39d564b82bb4bf457dc87430f9a87afa94bd58 Mon Sep 17 00:00:00 2001 From: Guilherme Pimenta Date: Wed, 15 Apr 2026 17:47:11 -0300 Subject: [PATCH 1/3] chore: bump version to 2.8.0 Co-Authored-By: Claude Opus 4.6 (1M context) --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 93532a7..6d6928d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@topsort/analytics.js", - "version": "2.7.0", + "version": "2.8.0", "description": "JS library to automatically report events to Topsort's Analytics", "main": "dist/ts.js", "type": "module", From ab96a63e14b81bf47d5bb2979aba829f45fe8a8a Mon Sep 17 00:00:00 2001 From: Guilherme Pimenta Date: Wed, 15 Apr 2026 17:58:38 -0300 Subject: [PATCH 2/3] fix: configure jsdom for Node 25 localStorage compatibility Node.js 25 ships built-in localStorage via --experimental-webstorage, but without --localstorage-file it provides a non-functional stub. Vitest's populateGlobal() skips overriding it with jsdom's working version when it already exists on globalThis, breaking all localStorage tests locally. - Add --no-experimental-webstorage to vitest execArgv to disable the Node built-in so jsdom's localStorage is used instead - Set jsdom url to http://localhost (required by jsdom 27 for non-opaque origin localStorage) Co-Authored-By: Claude Opus 4.6 (1M context) --- vite.config.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/vite.config.ts b/vite.config.ts index 40d63a1..fd5989a 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -35,6 +35,12 @@ export default defineConfig(({ mode }) => { ], test: { environment: "jsdom", + environmentOptions: { + jsdom: { + url: "http://localhost", + }, + }, + execArgv: ["--no-experimental-webstorage"], }, }; }); From ca0ad719456e94ad38b48abc47f014b3e655663e Mon Sep 17 00:00:00 2001 From: Guilherme Pimenta Date: Wed, 15 Apr 2026 18:03:12 -0300 Subject: [PATCH 3/3] docs: add v2.8.0 changelog entry Co-Authored-By: Claude Opus 4.6 (1M context) --- CHANGELOG.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1199d6a..1fd1d30 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,22 @@ We follow the format used by [Open Telemetry](https://github.com/open-telemetry/ ## Unreleased +## Version 2.8.0 (2026-04-15) + +### Added + +- Lazy token loading: events queue when no API token is set and drain automatically when `window.TS.token` is assigned later ([#360](https://github.com/Topsort/analytics.js/pull/360)) +- Interactive playground for testing the analytics library ([#359](https://github.com/Topsort/analytics.js/pull/359)) + +### Fixed + +- Add `lang` attribute to HTML elements for a11y compliance ([#355](https://github.com/Topsort/analytics.js/pull/355)) +- Configure jsdom for Node.js 25+ localStorage compatibility + +### Tests + +- New queue tests for memory store fallback and error handling ([#358](https://github.com/Topsort/analytics.js/pull/358)) + ## Version 2.7.0 (2025-01-23) ### Added