vitest-evals 0.6.0 → 0.7.0
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/dist/reporter.js.map +1 -1
- package/dist/reporter.mjs.map +1 -1
- package/package.json +14 -13
package/dist/reporter.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/reporter.ts"],"sourcesContent":["// import type { RunnerTask, RunnerTestFile } from \"vitest\";\nimport { DefaultReporter } from \"vitest/reporters\";\nimport c from \"tinyrainbow\";\n\nexport default class DefaultEvalReporter extends DefaultReporter {\n protected override printTestCase(moduleState: any, test: any): void {\n const meta = test.meta();\n const testResult = test.result();\n\n if (!meta.eval) {\n super.printTestCase(moduleState, test);\n return;\n }\n\n const padding = this.getTestIndentation(test.task);\n const icon = testResult.state === \"failed\" ? c.red(\"✗ \") : \" \";\n const colorFn =\n meta.eval.avgScore < 0.5\n ? c.red\n : meta.eval.avgScore < 0.75\n ? c.yellow\n : c.green;\n this.log(\n `${padding}${icon}${this.getTestName(test.task, c.dim(\" > \"))} [${colorFn(meta.eval.avgScore.toFixed(2))}]`,\n );\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;
|
|
1
|
+
{"version":3,"sources":["../src/reporter.ts"],"sourcesContent":["// import type { RunnerTask, RunnerTestFile } from \"vitest\";\n// TODO: Switch to \"vitest/node\" when we drop Vitest 3 support.\nimport { DefaultReporter } from \"vitest/reporters\";\nimport c from \"tinyrainbow\";\n\nexport default class DefaultEvalReporter extends DefaultReporter {\n protected override printTestCase(moduleState: any, test: any): void {\n const meta = test.meta();\n const testResult = test.result();\n\n if (!meta.eval) {\n super.printTestCase(moduleState, test);\n return;\n }\n\n const padding = this.getTestIndentation(test.task);\n const icon = testResult.state === \"failed\" ? c.red(\"✗ \") : \" \";\n const colorFn =\n meta.eval.avgScore < 0.5\n ? c.red\n : meta.eval.avgScore < 0.75\n ? c.yellow\n : c.green;\n this.log(\n `${padding}${icon}${this.getTestName(test.task, c.dim(\" > \"))} [${colorFn(meta.eval.avgScore.toFixed(2))}]`,\n );\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,uBAAgC;AAChC,yBAAc;AAEd,IAAqB,sBAArB,cAAiD,iCAAgB;AAAA,EAC5C,cAAc,aAAkB,MAAiB;AAClE,UAAM,OAAO,KAAK,KAAK;AACvB,UAAM,aAAa,KAAK,OAAO;AAE/B,QAAI,CAAC,KAAK,MAAM;AACd,YAAM,cAAc,aAAa,IAAI;AACrC;AAAA,IACF;AAEA,UAAM,UAAU,KAAK,mBAAmB,KAAK,IAAI;AACjD,UAAM,OAAO,WAAW,UAAU,WAAW,mBAAAA,QAAE,IAAI,SAAI,IAAI;AAC3D,UAAM,UACJ,KAAK,KAAK,WAAW,MACjB,mBAAAA,QAAE,MACF,KAAK,KAAK,WAAW,OACnB,mBAAAA,QAAE,SACF,mBAAAA,QAAE;AACV,SAAK;AAAA,MACH,GAAG,OAAO,GAAG,IAAI,GAAG,KAAK,YAAY,KAAK,MAAM,mBAAAA,QAAE,IAAI,KAAK,CAAC,CAAC,KAAK,QAAQ,KAAK,KAAK,SAAS,QAAQ,CAAC,CAAC,CAAC;AAAA,IAC1G;AAAA,EACF;AACF;","names":["c"]}
|
package/dist/reporter.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/reporter.ts"],"sourcesContent":["// import type { RunnerTask, RunnerTestFile } from \"vitest\";\nimport { DefaultReporter } from \"vitest/reporters\";\nimport c from \"tinyrainbow\";\n\nexport default class DefaultEvalReporter extends DefaultReporter {\n protected override printTestCase(moduleState: any, test: any): void {\n const meta = test.meta();\n const testResult = test.result();\n\n if (!meta.eval) {\n super.printTestCase(moduleState, test);\n return;\n }\n\n const padding = this.getTestIndentation(test.task);\n const icon = testResult.state === \"failed\" ? c.red(\"✗ \") : \" \";\n const colorFn =\n meta.eval.avgScore < 0.5\n ? c.red\n : meta.eval.avgScore < 0.75\n ? c.yellow\n : c.green;\n this.log(\n `${padding}${icon}${this.getTestName(test.task, c.dim(\" > \"))} [${colorFn(meta.eval.avgScore.toFixed(2))}]`,\n );\n }\n}\n"],"mappings":";
|
|
1
|
+
{"version":3,"sources":["../src/reporter.ts"],"sourcesContent":["// import type { RunnerTask, RunnerTestFile } from \"vitest\";\n// TODO: Switch to \"vitest/node\" when we drop Vitest 3 support.\nimport { DefaultReporter } from \"vitest/reporters\";\nimport c from \"tinyrainbow\";\n\nexport default class DefaultEvalReporter extends DefaultReporter {\n protected override printTestCase(moduleState: any, test: any): void {\n const meta = test.meta();\n const testResult = test.result();\n\n if (!meta.eval) {\n super.printTestCase(moduleState, test);\n return;\n }\n\n const padding = this.getTestIndentation(test.task);\n const icon = testResult.state === \"failed\" ? c.red(\"✗ \") : \" \";\n const colorFn =\n meta.eval.avgScore < 0.5\n ? c.red\n : meta.eval.avgScore < 0.75\n ? c.yellow\n : c.green;\n this.log(\n `${padding}${icon}${this.getTestName(test.task, c.dim(\" > \"))} [${colorFn(meta.eval.avgScore.toFixed(2))}]`,\n );\n }\n}\n"],"mappings":";AAEA,SAAS,uBAAuB;AAChC,OAAO,OAAO;AAEd,IAAqB,sBAArB,cAAiD,gBAAgB;AAAA,EAC5C,cAAc,aAAkB,MAAiB;AAClE,UAAM,OAAO,KAAK,KAAK;AACvB,UAAM,aAAa,KAAK,OAAO;AAE/B,QAAI,CAAC,KAAK,MAAM;AACd,YAAM,cAAc,aAAa,IAAI;AACrC;AAAA,IACF;AAEA,UAAM,UAAU,KAAK,mBAAmB,KAAK,IAAI;AACjD,UAAM,OAAO,WAAW,UAAU,WAAW,EAAE,IAAI,SAAI,IAAI;AAC3D,UAAM,UACJ,KAAK,KAAK,WAAW,MACjB,EAAE,MACF,KAAK,KAAK,WAAW,OACnB,EAAE,SACF,EAAE;AACV,SAAK;AAAA,MACH,GAAG,OAAO,GAAG,IAAI,GAAG,KAAK,YAAY,KAAK,MAAM,EAAE,IAAI,KAAK,CAAC,CAAC,KAAK,QAAQ,KAAK,KAAK,SAAS,QAAQ,CAAC,CAAC,CAAC;AAAA,IAC1G;AAAA,EACF;AACF;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vitest-evals",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -47,10 +47,10 @@
|
|
|
47
47
|
"homepage": "https://github.com/getsentry/vitest-evals#readme",
|
|
48
48
|
"description": "",
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"zod": "
|
|
50
|
+
"ai": ">=4 <7",
|
|
51
|
+
"tinyrainbow": ">=2 <4",
|
|
52
|
+
"vitest": ">=3 <5",
|
|
53
|
+
"zod": ">=3 <5"
|
|
54
54
|
},
|
|
55
55
|
"peerDependenciesMeta": {
|
|
56
56
|
"ai": {
|
|
@@ -61,20 +61,21 @@
|
|
|
61
61
|
}
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
|
-
"@ai-sdk/openai": "^
|
|
64
|
+
"@ai-sdk/openai": "^3.0.48",
|
|
65
65
|
"@biomejs/biome": "^1.9.4",
|
|
66
|
-
"@
|
|
67
|
-
"
|
|
68
|
-
"
|
|
66
|
+
"@types/node": "^25.5.0",
|
|
67
|
+
"@vitest/coverage-v8": "^4.1.2",
|
|
68
|
+
"ai": "^6.0.141",
|
|
69
|
+
"autoevals": "^0.0.132",
|
|
69
70
|
"dotenv-cli": "^8.0.0",
|
|
70
71
|
"lint-staged": "^15.5.2",
|
|
71
|
-
"openai": "^
|
|
72
|
+
"openai": "^6.33.0",
|
|
72
73
|
"simple-git-hooks": "^2.13.0",
|
|
73
|
-
"tinyrainbow": "^
|
|
74
|
+
"tinyrainbow": "^3.1.0",
|
|
74
75
|
"tsup": "^8.5.0",
|
|
75
76
|
"typescript": "^5.8.3",
|
|
76
|
-
"vitest": "^
|
|
77
|
-
"zod": "^3.
|
|
77
|
+
"vitest": "^4.1.2",
|
|
78
|
+
"zod": "^4.3.6"
|
|
78
79
|
},
|
|
79
80
|
"simple-git-hooks": {
|
|
80
81
|
"pre-commit": "npm exec lint-staged --concurrent false"
|