ci(sdk): require changelog entry on version bump + harden TS telemetry (#4900)
This commit is contained in:
@@ -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;
|
||||
|
||||
Vendored
+4
-1
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user