@evalgate/sdk 2.2.0 → 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/dist/snapshot.d.ts +3 -3
- package/dist/snapshot.js +3 -2
- package/dist/version.d.ts +2 -2
- package/dist/version.js +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,14 @@ All notable changes to the @evalgate/sdk package will be documented in this file
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [2.2.1] - 2026-03-03
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- **`snapshot(name, output)` accepts objects** — passing `{ score: 92 }` no longer throws; non-string values are auto-serialized via `JSON.stringify`. `SnapshotManager.save()` and `update()` widened to `output: unknown` accordingly.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
8
16
|
## [2.2.0] - 2026-03-03
|
|
9
17
|
|
|
10
18
|
### Breaking
|
package/dist/snapshot.d.ts
CHANGED
|
@@ -73,7 +73,7 @@ export declare class SnapshotManager {
|
|
|
73
73
|
* await manager.save('haiku-test', output, { tags: ['poetry'] });
|
|
74
74
|
* ```
|
|
75
75
|
*/
|
|
76
|
-
save(name: string, output:
|
|
76
|
+
save(name: string, output: unknown, options?: {
|
|
77
77
|
tags?: string[];
|
|
78
78
|
metadata?: Record<string, unknown>;
|
|
79
79
|
overwrite?: boolean;
|
|
@@ -127,7 +127,7 @@ export declare class SnapshotManager {
|
|
|
127
127
|
* await manager.update('haiku-test', newOutput);
|
|
128
128
|
* ```
|
|
129
129
|
*/
|
|
130
|
-
update(name: string, output:
|
|
130
|
+
update(name: string, output: unknown): Promise<SnapshotData>;
|
|
131
131
|
}
|
|
132
132
|
/**
|
|
133
133
|
* Save a snapshot (convenience function)
|
|
@@ -138,7 +138,7 @@ export declare class SnapshotManager {
|
|
|
138
138
|
* await snapshot('haiku-test', output);
|
|
139
139
|
* ```
|
|
140
140
|
*/
|
|
141
|
-
export declare function snapshot(name: string, output:
|
|
141
|
+
export declare function snapshot(name: string, output: unknown, options?: {
|
|
142
142
|
tags?: string[];
|
|
143
143
|
metadata?: Record<string, unknown>;
|
|
144
144
|
overwrite?: boolean;
|
package/dist/snapshot.js
CHANGED
|
@@ -130,12 +130,13 @@ class SnapshotManager {
|
|
|
130
130
|
if (!options?.overwrite && fs.existsSync(filePath)) {
|
|
131
131
|
throw new Error(`Snapshot '${name}' already exists. Use overwrite: true to update.`);
|
|
132
132
|
}
|
|
133
|
+
const serialized = typeof output === "string" ? output : JSON.stringify(output);
|
|
133
134
|
const snapshotData = {
|
|
134
|
-
output,
|
|
135
|
+
output: serialized,
|
|
135
136
|
metadata: {
|
|
136
137
|
name,
|
|
137
138
|
createdAt: new Date().toISOString(),
|
|
138
|
-
hash: this.generateHash(
|
|
139
|
+
hash: this.generateHash(serialized),
|
|
139
140
|
tags: options?.tags,
|
|
140
141
|
metadata: options?.metadata,
|
|
141
142
|
},
|
package/dist/version.d.ts
CHANGED
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* X-EvalGate-SDK-Version: SDK package version
|
|
4
4
|
* X-EvalGate-Spec-Version: OpenAPI spec version (docs/openapi.json info.version)
|
|
5
5
|
*/
|
|
6
|
-
export declare const SDK_VERSION = "2.2.
|
|
7
|
-
export declare const SPEC_VERSION = "2.2.
|
|
6
|
+
export declare const SDK_VERSION = "2.2.1";
|
|
7
|
+
export declare const SPEC_VERSION = "2.2.1";
|
package/dist/version.js
CHANGED
|
@@ -6,5 +6,5 @@ exports.SPEC_VERSION = exports.SDK_VERSION = void 0;
|
|
|
6
6
|
* X-EvalGate-SDK-Version: SDK package version
|
|
7
7
|
* X-EvalGate-Spec-Version: OpenAPI spec version (docs/openapi.json info.version)
|
|
8
8
|
*/
|
|
9
|
-
exports.SDK_VERSION = "2.2.
|
|
10
|
-
exports.SPEC_VERSION = "2.2.
|
|
9
|
+
exports.SDK_VERSION = "2.2.1";
|
|
10
|
+
exports.SPEC_VERSION = "2.2.1";
|