@empiricalrun/test-gen 0.24.0 → 0.24.3

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,24 @@
1
1
  # @empiricalrun/test-gen
2
2
 
3
+ ## 0.24.3
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [be30850]
8
+ - @empiricalrun/llm@0.9.1
9
+
10
+ ## 0.24.2
11
+
12
+ ### Patch Changes
13
+
14
+ - ce74ef8: fix: local mock github flow
15
+
16
+ ## 0.24.1
17
+
18
+ ### Patch Changes
19
+
20
+ - b403cf9: fix: max token for llm generation
21
+
3
22
  ## 0.24.0
4
23
 
5
24
  ### Minor Changes
@@ -1 +1 @@
1
- {"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../../src/agent/codegen/run.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,QAAQ,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAG7D,wBAAsB,YAAY,CAChC,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,QAAQ,EAAE,CAAC,CA+IrB"}
1
+ {"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../../src/agent/codegen/run.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAE,QAAQ,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAG7D,wBAAsB,YAAY,CAChC,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,QAAQ,EAAE,CAAC,CAmJrB"}
@@ -21,7 +21,8 @@ async function generateTest(testCase, file, options) {
21
21
  }
22
22
  const context = await (0, context_1.contextForGeneration)(file);
23
23
  const { codePrompt, pomPrompt, testFileContent } = context;
24
- const isUpdate = testFileContent.includes(`test("${testCase?.name}"`);
24
+ const { testBlock } = (0, web_1.getTypescriptTestBlock)(testCase?.name, testFileContent);
25
+ const isUpdate = !!testBlock;
25
26
  if (isUpdate) {
26
27
  return await (0, update_flow_1.updateTest)(testCase, file, options);
27
28
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAE3E,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,WAAW,EAAE,MAAM,CAItD,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,WAAsB,CAAC;AAE5D,eAAO,MAAM,aAAa,EAAE,QAA8B,CAAC;AAE3D,eAAO,MAAM,wBAAwB,EAAE,eAEtC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAE3E,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,WAAW,EAAE,MAAM,CAItD,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,WAAsB,CAAC;AAE5D,eAAO,MAAM,aAAa,EAAE,QAA8B,CAAC;AAE3D,eAAO,MAAM,wBAAwB,EAAE,eAGtC,CAAC"}
@@ -10,4 +10,5 @@ exports.DEFAULT_MODEL_PROVIDER = "openai";
10
10
  exports.DEFAULT_MODEL = "gpt-4o-2024-08-06";
11
11
  exports.DEFAULT_MODEL_PARAMETERS = {
12
12
  temperature: 0.5,
13
+ max_tokens: 4000,
13
14
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@empiricalrun/test-gen",
3
- "version": "0.24.0",
3
+ "version": "0.24.3",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/",
6
6
  "access": "public"
@@ -41,7 +41,7 @@
41
41
  "ts-morph": "^23.0.0",
42
42
  "tsx": "^4.16.2",
43
43
  "typescript": "^5.3.3",
44
- "@empiricalrun/llm": "^0.9.0",
44
+ "@empiricalrun/llm": "^0.9.1",
45
45
  "@empiricalrun/r2-uploader": "^0.1.1",
46
46
  "@empiricalrun/reporter": "^0.17.10"
47
47
  },