From 608249bff0b2291ed9ff9a8d2f68fa93cddaa95f Mon Sep 17 00:00:00 2001 From: czy Date: Mon, 23 Nov 2026 21:14:01 -0600 Subject: [PATCH] Release 1.4.0: version bump and changelog (no code change) Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 6 +++--- package-lock.json | 4 ++-- package.json | 2 +- src/index.ts | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 154ee81..12252c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,9 +2,9 @@ All notable changes to this project will be documented in this file. -## [Unreleased] +## [1.4.0] -Release as **1.4.0**, not a patch: `flush()` and `close()` now resolve with `{ unsent }` +Minor version, not a patch: `flush()` and `close()` now resolve with `{ unsent }` instead of `void` (see Changed). ### Fixed @@ -20,7 +20,7 @@ instead of `void` (see Changed). - **`flush()` had no time bound** and could wait through every retry of every event. It now waits at most `flushTimeout` (new, default 30 s). - **`import Datalyr from '@datalyr/api'` threw "Datalyr is not a constructor" in Node ESM.** With no `exports` map, Node loaded the CommonJS build for `import`, so the default import was the whole module object. An `exports` map now sends `import` to `dist/index.mjs` (types `dist/index.d.mts`) and `require` to `dist/index.js` (types `dist/index.d.ts`). `main`, `module` and `types` are unchanged, and deep imports under `dist/` still work. -- **Release as a minor version (1.4.0).** Two narrow cases change: an ESM workaround for the old bug (`new Datalyr.default()`, `Datalyr.Datalyr`, `(await import('@datalyr/api')).default.default`) no longer works, because the default import is now the class; use `import Datalyr from '@datalyr/api'` or `import { Datalyr } from '@datalyr/api'`. A deep import without a file extension (`@datalyr/api/dist/index`) no longer resolves; add `.js` or `.mjs`. +- **Minor version.** Two narrow cases change: an ESM workaround for the old bug (`new Datalyr.default()`, `Datalyr.Datalyr`, `(await import('@datalyr/api')).default.default`) no longer works, because the default import is now the class; use `import Datalyr from '@datalyr/api'` or `import { Datalyr } from '@datalyr/api'`. A deep import without a file extension (`@datalyr/api/dist/index`) no longer resolves; add `.js` or `.mjs`. ### Changed - **Breaking for typed code:** `flush()` and `close()` return `Promise` diff --git a/package-lock.json b/package-lock.json index c50ec25..71a01fe 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@datalyr/api", - "version": "1.3.4", + "version": "1.4.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@datalyr/api", - "version": "1.3.4", + "version": "1.4.0", "license": "MIT", "devDependencies": { "@types/node": "^20.0.0", diff --git a/package.json b/package.json index 02f1cab..5401e35 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@datalyr/api", - "version": "1.3.4", + "version": "1.4.0", "description": "DATALYR Node SDK for server-side event, identity and revenue tracking", "main": "dist/index.js", "module": "dist/index.mjs", diff --git a/src/index.ts b/src/index.ts index 7970c99..f1a4f30 100644 --- a/src/index.ts +++ b/src/index.ts @@ -116,7 +116,7 @@ function generateAnonymousId(): string { return 'anon_' + randomUUID(); } -const SDK_VERSION = '1.3.4'; // keep in sync with package.json +const SDK_VERSION = '1.4.0'; // keep in sync with package.json // Hard cap on drain passes per flush (a producer that keeps enqueuing during a drain must // not keep one flush running forever).