@aigne/test-utils 0.5.34 → 0.5.36

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,21 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.5.36](https://github.com/AIGNE-io/aigne-framework/compare/test-utils-v0.5.35...test-utils-v0.5.36) (2025-08-26)
4
+
5
+
6
+ ### Dependencies
7
+
8
+ * The following workspace dependencies were updated
9
+ * dependencies
10
+ * @aigne/core bumped to 1.55.1
11
+
12
+ ## [0.5.35](https://github.com/AIGNE-io/aigne-framework/compare/test-utils-v0.5.34...test-utils-v0.5.35) (2025-08-25)
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * **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))
18
+
3
19
  ## [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
20
 
5
21
 
@@ -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.36",
4
4
  "description": "Test utils for AIGNE framework",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -27,7 +27,7 @@
27
27
  }
28
28
  },
29
29
  "dependencies": {
30
- "@aigne/core": "^1.55.0"
30
+ "@aigne/core": "^1.55.1"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@types/bun": "^1.2.18",
@@ -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"}