ai-worktool 1.0.75 → 1.0.76

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,4 +1,4 @@
1
- ## 1.0.75 (2025-08-21)
1
+ ## 1.0.76 (2025-08-21)
2
2
 
3
3
 
4
4
  ### Bug Fixes
@@ -126,6 +126,7 @@
126
126
  * **test/demo:** 添加用户成绩 API 路由 ([6f838c7](https://codeup.aliyun.com/666cf9ed29ecbe23053513a3/JianGuoKe/ai-worktools/commits/6f838c7fda9924b1e5a7556d0a429427a652b985))
127
127
  * **testAgent:** 使测试环境设置可配置 ([53e0760](https://codeup.aliyun.com/666cf9ed29ecbe23053513a3/JianGuoKe/ai-worktools/commits/53e07602c1d65882ffedb5340d971fe4c3f76cef))
128
128
  * **testAgent:** 增加代码覆盖率类型选择功能 ([5c4b919](https://codeup.aliyun.com/666cf9ed29ecbe23053513a3/JianGuoKe/ai-worktools/commits/5c4b919274689cd47319c5803a6c2dd1ab558acc))
129
+ * **testAgent:** 实现自动提交功能并创建测试分支 ([c363f7d](https://codeup.aliyun.com/666cf9ed29ecbe23053513a3/JianGuoKe/ai-worktools/commits/c363f7da378b12589244e346428efab001963aa2))
129
130
  * **testAgent:** 添加onReady回调并移动覆盖率显示逻辑 ([746dfa3](https://codeup.aliyun.com/666cf9ed29ecbe23053513a3/JianGuoKe/ai-worktools/commits/746dfa39da2c010bf61e916a669b4fc77bc4661c))
130
131
  * **testAgent:** 补充无测试文件的覆盖率 ([4ec9f17](https://codeup.aliyun.com/666cf9ed29ecbe23053513a3/JianGuoKe/ai-worktools/commits/4ec9f1787c5f427ef813a7aeb851997cca192c33))
131
132
  * **test:** 添加 demo ([403c8fe](https://codeup.aliyun.com/666cf9ed29ecbe23053513a3/JianGuoKe/ai-worktools/commits/403c8fe37d39a21936561e743087d6b25ab6ad56))
@@ -113,9 +113,7 @@ async function callWithObject(name, argsObj, projectDir) {
113
113
  // 从对象中提取参数值
114
114
  const args = paramNames.map((name) => {
115
115
  // 转成决定路径
116
- if ((name === 'filePath' || name === 'oldPath' || name === 'newPath' || name === 'directory') &&
117
- projectDir &&
118
- !path_1.default.isAbsolute(argsObj[name])) {
116
+ if ((name.endsWith('Path') || name === 'directory') && projectDir && !path_1.default.isAbsolute(argsObj[name])) {
119
117
  return path_1.default.resolve(projectDir, argsObj[name]);
120
118
  }
121
119
  return argsObj[name];
package/dist/testAgent.js CHANGED
@@ -90,6 +90,7 @@ async function startTestAgent(options) {
90
90
  }
91
91
  // 4、要是单测都成功并且有代码修改提交本次修改
92
92
  if (options.autoCommit) {
93
+ await (0, tools_1.commit)(projectConfig.projectRoot, 'auto commit by ai-worktools test agent');
93
94
  }
94
95
  // 5、要是有未覆盖的代码生成新的单测用例代码,重复第2步
95
96
  const { total, files } = await (0, tools_1.generateUncoveredLinesReport)(projectConfig.projectRoot, projectConfig.coverageDir);
@@ -221,8 +221,8 @@ async function parseTsFile(filePath) {
221
221
  * 创建tsconfig.json文件
222
222
  * @param outputPath tsconfig.json文件的输出路径(包含文件名)
223
223
  * @param compilerOptions TypeScript编译器选项
224
- * @param include 需要包含的文件路径数组,默认为空数组,多个路径逗号分隔,例如 src/**\/*.ts,tests/**\/*.spec.ts
225
- * @param exclude 需要排除的文件路径数组,默认为空数组,多个路径逗号分隔,例如 src/**\/*.js,tests/**\/*.spec.js
224
+ * @param include 需要包含的文件路径,多个路径逗号分隔,例如 src/**\/*.ts,tests/**\/*.spec.ts
225
+ * @param exclude 需要排除的文件路径,多个路径逗号分隔,例如 src/**\/*.js,tests/**\/*.spec.js
226
226
  * @returns 当文件创建成功时解析的Promise
227
227
  * @throws {Error} 如果文件写入过程中发生错误则抛出异常
228
228
  */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ai-worktool",
3
3
  "displayName": "吃豆豆:单测智能体",
4
- "version": "1.0.75",
4
+ "version": "1.0.76",
5
5
  "description": "单元测试智能体,帮你开发单元测试用例代码直到100%单测覆盖通过。",
6
6
  "author": "jianguoke.cn",
7
7
  "license": "MIT",
@@ -28,11 +28,11 @@
28
28
  "createup": "node ./uposs.js create-local-folder",
29
29
  "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0",
30
30
  "puball": "yarn ver && yarn exepack && yarn vspack && yarn pubvs && yarn pubovsx && yarn puboss && yarn pubnpm",
31
- "exepack": "yarn createup && cross-env PKG_CACHE_PATH=./binaries pkg -o packages/aicoder-1.0.75 . && yarn upicon",
31
+ "exepack": "yarn createup && cross-env PKG_CACHE_PATH=./binaries pkg -o packages/aicoder-1.0.76 . && yarn upicon",
32
32
  "pubvs": "yarn remove-deps && yarn changelog && vsce publish --yarn --baseContentUrl https://aicoder.jianguoke.cn/assets && yarn restore-deps",
33
33
  "pubovsx": "yarn remove-deps && ovsx publish -p 47621ff6-be56-4814-865e-d2a8e8a76f86 --yarn --baseContentUrl https://aicoder.jianguoke.cn/assets && yarn restore-deps",
34
34
  "patch": "yarn remove-deps && vsce publish patch --yarn && yarn restore-deps",
35
- "vspack": "yarn createup && yarn remove-deps && vsce package -o packages/aicoder-1.0.75.vsix --yarn --baseContentUrl https://aicoder.jianguoke.cn/assets && yarn restore-deps",
35
+ "vspack": "yarn createup && yarn remove-deps && vsce package -o packages/aicoder-1.0.76.vsix --yarn --baseContentUrl https://aicoder.jianguoke.cn/assets && yarn restore-deps",
36
36
  "puboss": "node ./uposs.js upload",
37
37
  "pubnpm": "npm publish --registry=https://registry.npmjs.org",
38
38
  "prepare": "husky"