@aigne/test-utils 0.5.34 → 0.5.35

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 CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.5.35](https://github.com/AIGNE-io/aigne-framework/compare/test-utils-v0.5.34...test-utils-v0.5.35) (2025-08-25)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * **cli:** prefer variables from process.env when loadChatModel ([#407](https://github.com/AIGNE-io/aigne-framework/issues/407)) ([d32b2db](https://github.com/AIGNE-io/aigne-framework/commit/d32b2db20435a022d944a674e90333899d881daf))
9
+
3
10
  ## [0.5.34](https://github.com/AIGNE-io/aigne-framework/compare/test-utils-v0.5.33...test-utils-v0.5.34) (2025-08-21)
4
11
 
5
12
 
@@ -0,0 +1,3 @@
1
+ export declare function withEnv(env: Record<string, string>): {
2
+ [Symbol.dispose]: () => void;
3
+ };
@@ -0,0 +1,9 @@
1
+ export function withEnv(env) {
2
+ const originalEnv = { ...process.env };
3
+ process.env = { ...process.env, ...env };
4
+ return {
5
+ [Symbol.dispose]: () => {
6
+ process.env = originalEnv;
7
+ },
8
+ };
9
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aigne/test-utils",
3
- "version": "0.5.34",
3
+ "version": "0.5.35",
4
4
  "description": "Test utils for AIGNE framework",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -0,0 +1,12 @@
1
+ export function withEnv(env: Record<string, string>): {
2
+ [Symbol.dispose]: () => void;
3
+ } {
4
+ const originalEnv = { ...process.env };
5
+ process.env = { ...process.env, ...env };
6
+
7
+ return {
8
+ [Symbol.dispose]: () => {
9
+ process.env = originalEnv;
10
+ },
11
+ };
12
+ }
@@ -1 +1 @@
1
- {"root":["./src/run-example-test.ts","./src/utils/agent-response.ts","./src/utils/event-stream.ts","./src/utils/openai-like-utils.ts"],"version":"5.8.3"}
1
+ {"root":["./src/run-example-test.ts","./src/utils/agent-response.ts","./src/utils/event-stream.ts","./src/utils/openai-like-utils.ts","./src/utils/with-env.ts"],"version":"5.8.3"}