@empiricalrun/test-gen 0.21.4 → 0.21.6
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,20 @@
|
|
|
1
1
|
# @empiricalrun/test-gen
|
|
2
2
|
|
|
3
|
+
## 0.21.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [ee7b03e]
|
|
8
|
+
- @empiricalrun/reporter@0.15.0
|
|
9
|
+
|
|
10
|
+
## 0.21.5
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- 83d1382: fix: test code getting empty when using code gen
|
|
15
|
+
- Updated dependencies [83d1382]
|
|
16
|
+
- @empiricalrun/llm@0.4.5
|
|
17
|
+
|
|
3
18
|
## 0.21.4
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/bin/utils/platform/web/index.ts"],"names":[],"mappings":"AAMA,wBAAgB,sBAAsB,CACpC,YAAY,EAAE,MAAM,EACpB,OAAO,EAAE,MAAM,GACd,MAAM,GAAG,SAAS,CAYpB;AAED,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAG5E;AAED,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/bin/utils/platform/web/index.ts"],"names":[],"mappings":"AAMA,wBAAgB,sBAAsB,CACpC,YAAY,EAAE,MAAM,EACpB,OAAO,EAAE,MAAM,GACd,MAAM,GAAG,SAAS,CAYpB;AAED,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAG5E;AAED,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,CAmD7D;AAED,wBAAsB,sBAAsB,CAAC,OAAO,EAAE,MAAM,qBAM3D;AAED,wBAAsB,UAAU,CAAC,QAAQ,EAAE,MAAM,iBAShD;AAED,wBAAsB,UAAU,CAAC,QAAQ,EAAE,MAAM,iBAQhD;AAED,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,UAE5E;AAED,wBAAsB,cAAc,CAAC,QAAQ,EAAE,MAAM,iBAIpD"}
|
|
@@ -25,7 +25,9 @@ function appendToTestBlock(testBlock, content) {
|
|
|
25
25
|
exports.appendToTestBlock = appendToTestBlock;
|
|
26
26
|
function validateTypescript(filePath) {
|
|
27
27
|
// Create a compiler host to read files
|
|
28
|
-
const compilerHost = typescript_1.default.createCompilerHost({
|
|
28
|
+
const compilerHost = typescript_1.default.createCompilerHost({
|
|
29
|
+
esModuleInterop: true,
|
|
30
|
+
});
|
|
29
31
|
compilerHost.readFile = (file) => fs_extra_1.default.readFileSync(file, "utf8");
|
|
30
32
|
// Create a program with a single source file
|
|
31
33
|
const program = typescript_1.default.createProgram([filePath], {}, compilerHost);
|
|
@@ -85,7 +87,9 @@ async function lintErrors(filePath) {
|
|
|
85
87
|
useEslintrc: true,
|
|
86
88
|
});
|
|
87
89
|
const [result] = await eslint.lintFiles(filePath);
|
|
88
|
-
|
|
90
|
+
if (result?.output) {
|
|
91
|
+
fs_extra_1.default.writeFileSync(filePath, result.output);
|
|
92
|
+
}
|
|
89
93
|
}
|
|
90
94
|
exports.lintErrors = lintErrors;
|
|
91
95
|
async function formatCode(filePath) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@empiricalrun/test-gen",
|
|
3
|
-
"version": "0.21.
|
|
3
|
+
"version": "0.21.6",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"registry": "https://registry.npmjs.org/",
|
|
6
6
|
"access": "public"
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
"ts-morph": "^23.0.0",
|
|
42
42
|
"tsx": "^4.16.2",
|
|
43
43
|
"typescript": "^5.3.3",
|
|
44
|
-
"@empiricalrun/llm": "^0.4.
|
|
45
|
-
"@empiricalrun/reporter": "^0.
|
|
44
|
+
"@empiricalrun/llm": "^0.4.5",
|
|
45
|
+
"@empiricalrun/reporter": "^0.15.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@types/detect-port": "^1.3.5",
|