@spaceflow/review 0.79.0 → 0.80.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/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.79.0](https://github.com/Lydanne/spaceflow/compare/@spaceflow/review@0.78.0...@spaceflow/review@0.79.0) (2026-04-08)
4
+
5
+ ### 新特性
6
+
7
+ * **review:** 完善 review 命令文档,新增直接文件审查模式说明和配置优先级补充 ([25916c8](https://github.com/Lydanne/spaceflow/commit/25916c8bb7b11b748b6fc5e5ea9a62c954d5c7fc))
8
+
9
+ ### 其他修改
10
+
11
+ * **review-summary:** released version 0.47.0 [no ci] ([7cd6664](https://github.com/Lydanne/spaceflow/commit/7cd66645f528355b3849d49ac3fb563267bd16e9))
12
+
3
13
  ## [0.78.0](https://github.com/Lydanne/spaceflow/compare/@spaceflow/review@0.77.0...@spaceflow/review@0.78.0) (2026-04-07)
4
14
 
5
15
  ### 新特性
package/dist/index.js CHANGED
@@ -5404,7 +5404,11 @@ class ReviewService {
5404
5404
  }
5405
5405
  }
5406
5406
  // 3. 使用 includes 过滤文件和 commits(支持 added|/modified|/deleted| 前缀语法)
5407
- if (includes && includes.length > 0) {
5407
+ if (isDirectFileMode && includes && includes.length > 0) {
5408
+ if (shouldLog(verbose, 1)) {
5409
+ console.log(`ℹ️ 直接文件模式下忽略 includes 过滤`);
5410
+ }
5411
+ } else if (includes && includes.length > 0) {
5408
5412
  const beforeFiles = changedFiles.length;
5409
5413
  if (shouldLog(verbose, 2)) {
5410
5414
  console.log(`[resolveSourceData] filterFilesByIncludes: before=${JSON.stringify(changedFiles.map((f)=>({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spaceflow/review",
3
- "version": "0.79.0",
3
+ "version": "0.80.0",
4
4
  "description": "Spaceflow 代码审查插件,使用 LLM 对 PR 代码进行自动审查",
5
5
  "license": "MIT",
6
6
  "author": "Lydanne",
@@ -1489,6 +1489,26 @@ describe("ReviewService", () => {
1489
1489
  expect(mockGitSdkService.getUncommittedFiles).not.toHaveBeenCalled();
1490
1490
  expect(mockGitSdkService.getStagedFiles).not.toHaveBeenCalled();
1491
1491
  });
1492
+
1493
+ it("should ignore includes filtering in direct file mode", async () => {
1494
+ const context: ReviewContext = {
1495
+ owner: "o",
1496
+ repo: "r",
1497
+ dryRun: true,
1498
+ ci: false,
1499
+ specSources: ["/spec"],
1500
+ files: ["miniprogram/utils/asyncSharedUtilsLoader.js"],
1501
+ includes: ["**/*.ts", "added|**/*.js"],
1502
+ localMode: false,
1503
+ };
1504
+
1505
+ const result = await (service as any).resolveSourceData(context);
1506
+
1507
+ expect(result.isDirectFileMode).toBe(true);
1508
+ expect(result.changedFiles).toEqual([
1509
+ { filename: "miniprogram/utils/asyncSharedUtilsLoader.js", status: "modified" },
1510
+ ]);
1511
+ });
1492
1512
  });
1493
1513
 
1494
1514
  describe("ReviewService.getFilesForCommit", () => {
@@ -412,7 +412,11 @@ export class ReviewService {
412
412
  }
413
413
 
414
414
  // 3. 使用 includes 过滤文件和 commits(支持 added|/modified|/deleted| 前缀语法)
415
- if (includes && includes.length > 0) {
415
+ if (isDirectFileMode && includes && includes.length > 0) {
416
+ if (shouldLog(verbose, 1)) {
417
+ console.log(`ℹ️ 直接文件模式下忽略 includes 过滤`);
418
+ }
419
+ } else if (includes && includes.length > 0) {
416
420
  const beforeFiles = changedFiles.length;
417
421
  if (shouldLog(verbose, 2)) {
418
422
  console.log(