ci(sdk): require changelog entry on version bump + harden TS telemetry (#4900)

This commit is contained in:
Saket Aryan
2026-04-20 18:09:03 +05:30
committed by GitHub
parent 7b6790bafb
commit 00695e3113
6 changed files with 97 additions and 3 deletions
+5 -1
View File
@@ -1,7 +1,11 @@
// @ts-nocheck
import type { TelemetryClient, TelemetryOptions } from "./telemetry.types";
let version = __MEM0_SDK_VERSION__;
// __MEM0_SDK_VERSION__ is inlined by tsup/esbuild's `define` at build time from
// package.json. In unbundled environments (ts-jest, jest globalSetup) the
// identifier is not defined, so guard with typeof to fall back safely.
let version =
typeof __MEM0_SDK_VERSION__ !== "undefined" ? __MEM0_SDK_VERSION__ : "dev";
// Safely check for process.env in different environments
let MEM0_TELEMETRY = true;
+4 -1
View File
@@ -1 +1,4 @@
declare const __MEM0_SDK_VERSION__: string;
// Injected by tsup/esbuild's `define` at build time from package.json.
// May be undefined in unbundled environments (ts-jest, jest globalSetup),
// which is why consumers guard the reference with `typeof`.
declare const __MEM0_SDK_VERSION__: string | undefined;
+5 -1
View File
@@ -4,7 +4,11 @@ import type {
TelemetryEventData,
} from "./telemetry.types";
let version = __MEM0_SDK_VERSION__;
// __MEM0_SDK_VERSION__ is inlined by tsup/esbuild's `define` at build time from
// package.json. In unbundled environments (ts-jest, jest globalSetup) the
// identifier is not defined, so guard with typeof to fall back safely.
let version =
typeof __MEM0_SDK_VERSION__ !== "undefined" ? __MEM0_SDK_VERSION__ : "dev";
// Safely check for process.env in different environments
let MEM0_TELEMETRY = true;