intentpatch 0.6.0 → 0.8.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/README.ko.md +44 -22
- package/README.md +45 -18
- package/dist/application/ports/property-type-compatibility.d.ts +5 -0
- package/dist/application/ports/property-type-compatibility.d.ts.map +1 -0
- package/dist/application/ports/property-type-compatibility.js +2 -0
- package/dist/application/ports/property-type-compatibility.js.map +1 -0
- package/dist/application/ports/yarn-lock-parser.d.ts +19 -0
- package/dist/application/ports/yarn-lock-parser.d.ts.map +1 -0
- package/dist/application/ports/yarn-lock-parser.js +2 -0
- package/dist/application/ports/yarn-lock-parser.js.map +1 -0
- package/dist/application/rules/missing-test-change-rule.d.ts.map +1 -1
- package/dist/application/rules/missing-test-change-rule.js +17 -12
- package/dist/application/rules/missing-test-change-rule.js.map +1 -1
- package/dist/application/rules/public-api-compatibility-rule.d.ts +3 -1
- package/dist/application/rules/public-api-compatibility-rule.d.ts.map +1 -1
- package/dist/application/rules/public-api-compatibility-rule.js +16 -11
- package/dist/application/rules/public-api-compatibility-rule.js.map +1 -1
- package/dist/application/rules/yarn-lockfile-rule.d.ts +12 -0
- package/dist/application/rules/yarn-lockfile-rule.d.ts.map +1 -0
- package/dist/application/rules/yarn-lockfile-rule.js +106 -0
- package/dist/application/rules/yarn-lockfile-rule.js.map +1 -0
- package/dist/application/services/analyze-test-changes.d.ts.map +1 -1
- package/dist/application/services/analyze-test-changes.js +3 -1
- package/dist/application/services/analyze-test-changes.js.map +1 -1
- package/dist/application/use-cases/analyze-agent-turn.d.ts +20 -0
- package/dist/application/use-cases/analyze-agent-turn.d.ts.map +1 -0
- package/dist/application/use-cases/analyze-agent-turn.js +28 -0
- package/dist/application/use-cases/analyze-agent-turn.js.map +1 -0
- package/dist/domain/change-contract.d.ts +3 -0
- package/dist/domain/change-contract.d.ts.map +1 -1
- package/dist/domain/change-contract.js +19 -0
- package/dist/domain/change-contract.js.map +1 -1
- package/dist/infrastructure/config/json-change-contract-loader.js +13 -1
- package/dist/infrastructure/config/json-change-contract-loader.js.map +1 -1
- package/dist/infrastructure/git/git-file-snapshot-source.js +1 -1
- package/dist/infrastructure/git/git-file-snapshot-source.js.map +1 -1
- package/dist/infrastructure/git/git-private-agent-intent-store.js +7 -7
- package/dist/infrastructure/git/git-private-agent-intent-store.js.map +1 -1
- package/dist/infrastructure/git/git-private-agent-report-writer.d.ts +8 -0
- package/dist/infrastructure/git/git-private-agent-report-writer.d.ts.map +1 -0
- package/dist/infrastructure/git/git-private-agent-report-writer.js +45 -0
- package/dist/infrastructure/git/git-private-agent-report-writer.js.map +1 -0
- package/dist/infrastructure/typescript/typescript-function-signature-compatibility.d.ts.map +1 -1
- package/dist/infrastructure/typescript/typescript-function-signature-compatibility.js +47 -3
- package/dist/infrastructure/typescript/typescript-function-signature-compatibility.js.map +1 -1
- package/dist/infrastructure/typescript/typescript-property-type-compatibility.d.ts +6 -0
- package/dist/infrastructure/typescript/typescript-property-type-compatibility.d.ts.map +1 -0
- package/dist/infrastructure/typescript/typescript-property-type-compatibility.js +72 -0
- package/dist/infrastructure/typescript/typescript-property-type-compatibility.js.map +1 -0
- package/dist/infrastructure/yarn/yarn-lock-parser.d.ts +6 -0
- package/dist/infrastructure/yarn/yarn-lock-parser.d.ts.map +1 -0
- package/dist/infrastructure/yarn/yarn-lock-parser.js +77 -0
- package/dist/infrastructure/yarn/yarn-lock-parser.js.map +1 -0
- package/dist/presentation/agent-hook/input.d.ts +3 -0
- package/dist/presentation/agent-hook/input.d.ts.map +1 -0
- package/dist/presentation/agent-hook/input.js +20 -0
- package/dist/presentation/agent-hook/input.js.map +1 -0
- package/dist/presentation/agent-hook/summary.d.ts +4 -0
- package/dist/presentation/agent-hook/summary.d.ts.map +1 -0
- package/dist/presentation/agent-hook/summary.js +8 -0
- package/dist/presentation/agent-hook/summary.js.map +1 -0
- package/dist/presentation/analyze-repository.d.ts.map +1 -1
- package/dist/presentation/analyze-repository.js +5 -1
- package/dist/presentation/analyze-repository.js.map +1 -1
- package/dist/presentation/claude-code/hook.d.ts +2 -7
- package/dist/presentation/claude-code/hook.d.ts.map +1 -1
- package/dist/presentation/claude-code/hook.js +12 -38
- package/dist/presentation/claude-code/hook.js.map +1 -1
- package/dist/presentation/cli/arguments.d.ts +11 -1
- package/dist/presentation/cli/arguments.d.ts.map +1 -1
- package/dist/presentation/cli/arguments.js +17 -0
- package/dist/presentation/cli/arguments.js.map +1 -1
- package/dist/presentation/cli/main.js +25 -0
- package/dist/presentation/cli/main.js.map +1 -1
- package/dist/presentation/cli/text-report.js +3 -0
- package/dist/presentation/cli/text-report.js.map +1 -1
- package/dist/presentation/codex/hook.d.ts +5 -0
- package/dist/presentation/codex/hook.d.ts.map +1 -0
- package/dist/presentation/codex/hook.js +62 -0
- package/dist/presentation/codex/hook.js.map +1 -0
- package/dist/presentation/cursor/hook.d.ts +12 -0
- package/dist/presentation/cursor/hook.d.ts.map +1 -0
- package/dist/presentation/cursor/hook.js +69 -0
- package/dist/presentation/cursor/hook.js.map +1 -0
- package/dist/presentation/html/html-report.d.ts.map +1 -1
- package/dist/presentation/html/html-report.js +84 -14
- package/dist/presentation/html/html-report.js.map +1 -1
- package/package.json +1 -1
package/README.ko.md
CHANGED
|
@@ -21,7 +21,7 @@ LLM 없이도 재현 가능한 분석을 제공하고, AI 설명 기능은 선
|
|
|
21
21
|
|
|
22
22
|
## 빠른 시작
|
|
23
23
|
|
|
24
|
-
Node.js 20 이상과 Git이 설치되어 있어야 합니다. npm에 공개된 v0.
|
|
24
|
+
Node.js 20 이상과 Git이 설치되어 있어야 합니다. npm에 공개된 v0.8.0은 전역 설치 없이
|
|
25
25
|
실행할 수 있습니다.
|
|
26
26
|
|
|
27
27
|
```bash
|
|
@@ -67,7 +67,7 @@ jobs:
|
|
|
67
67
|
|
|
68
68
|
- name: Analyze pull request
|
|
69
69
|
id: intentpatch
|
|
70
|
-
uses: xx2xxjaeil/intent-patch@v0.
|
|
70
|
+
uses: xx2xxjaeil/intent-patch@v0.8.0
|
|
71
71
|
with:
|
|
72
72
|
fail-on: high
|
|
73
73
|
|
|
@@ -79,9 +79,10 @@ jobs:
|
|
|
79
79
|
path: intentpatch-report
|
|
80
80
|
```
|
|
81
81
|
|
|
82
|
-
Action은 릴리스 버전이나 불변 commit SHA로 고정하는 방식을 권장합니다. v0.
|
|
83
|
-
|
|
84
|
-
|
|
82
|
+
Action은 릴리스 버전이나 불변 commit SHA로 고정하는 방식을 권장합니다. v0.8.0에는 Yarn 4
|
|
83
|
+
lockfile 분석, 소스와 테스트의 명시적 연결, 보고서 필터와 영향 그래프 탐색 개선이 포함됩니다.
|
|
84
|
+
패키지 진입점 기준 공개 API 경고, 삭제된 모듈의 이전 import 영향 분석, 선택적 Claude Code·Codex·Cursor
|
|
85
|
+
Hook도 사용할 수 있습니다. 공개 API 규칙의 별도 외부 평가 결과와 한계는
|
|
85
86
|
[평가 보고서](./docs/external-repository-evaluation.md)에 기록했습니다. `@main`은 미릴리스 변경을 따라갑니다.
|
|
86
87
|
Action은 PR·push 이벤트의 commit 범위를 자동으로 선택하고 다음 결과를 남깁니다.
|
|
87
88
|
|
|
@@ -98,6 +99,11 @@ Action은 PR·push 이벤트의 commit 범위를 자동으로 선택하고 다
|
|
|
98
99
|
|
|
99
100
|
선택적으로 Hook을 연결하면 한 턴의 원래 요청과 시작 commit을 보관하고, Claude Code가 응답을 마칠 때 변경 파일·finding 개수를 짧게 보여줍니다. 요청문을 외부 서비스로 보내지 않습니다. 설치 방법, 설정 예시, 로컬 임시 저장의 보안상 주의점은 [설정 문서](https://github.com/xx2xxjaeil/intent-patch/blob/main/docs/claude-code.md)를 참고하세요.
|
|
100
101
|
|
|
102
|
+
## Codex·Cursor Hook
|
|
103
|
+
|
|
104
|
+
v0.7.0부터 선택형 [Codex](./docs/codex.md)·[Cursor](./docs/cursor.md) 턴 분석을 사용할 수 있습니다. 동일한 결정론적 분석기를 사용하며 API 키나 유료 모델은 필요하지 않습니다. Codex는 Hook에 개수만 요약하고, Cursor는 Git 메타데이터에 비공개 HTML 보고서를 저장한 뒤 경로를 로그로 남깁니다. Cursor에 새 AI 요청을 자동 제출하지 않습니다.
|
|
105
|
+
[Hook 스모크 테스트 체크리스트](./docs/hook-smoke-test.md)는 패키지 CLI 테스트와 실제 앱 테스트를 구분합니다.
|
|
106
|
+
|
|
101
107
|
## 프로젝트가 지향하는 결과
|
|
102
108
|
|
|
103
109
|
```text
|
|
@@ -135,7 +141,7 @@ LOW 구현체가 하나뿐인 추상화 추가
|
|
|
135
141
|
|
|
136
142
|
실제 커밋을 분석한 [독립 실행형 HTML 예시](./docs/examples/intent-input-change.html),
|
|
137
143
|
[자체 저장소 변경 3건의 사례 연구](./docs/real-world-evaluation.md),
|
|
138
|
-
[외부 저장소 변경
|
|
144
|
+
[외부 저장소 변경 32건·규칙별 판정 38건의 평가 결과](./docs/external-repository-evaluation.md)를 볼 수 있습니다. 저장소를 clone한
|
|
139
145
|
뒤 HTML 파일을 브라우저에서 열어 주세요. GitHub 파일 화면은 렌더링 대신 소스를 보여줄 수
|
|
140
146
|
있습니다.
|
|
141
147
|
|
|
@@ -153,7 +159,7 @@ LOW 구현체가 하나뿐인 추상화 추가
|
|
|
153
159
|
- working tree 분석 시 untracked 파일 포함
|
|
154
160
|
- 터미널용 텍스트 보고서
|
|
155
161
|
- 후속 도구 연동을 위한 JSON 보고서
|
|
156
|
-
- 요약 카드, finding, 테스트 신호와 영향 그래프를 담은 단일 HTML 보고서
|
|
162
|
+
- 요약 카드, 경로·심각도 필터, finding, 테스트 신호와 탐색 가능한 영향 그래프를 담은 단일 HTML 보고서
|
|
157
163
|
- 외부 CDN이나 JavaScript dependency가 필요 없는 인라인 CSS·SVG 시각화
|
|
158
164
|
- production·development dependency 추가 탐지
|
|
159
165
|
- dependency 삭제, 버전 변경, 섹션 이동 탐지
|
|
@@ -193,7 +199,7 @@ LOW 구현체가 하나뿐인 추상화 추가
|
|
|
193
199
|
- CLI 요청 문서 또는 선택적으로 GitHub PR 본문에서 요청 의도를 입력
|
|
194
200
|
- 예상·허용 패턴을 벗어난 변경 파일을 파일별 `medium` finding으로 탐지
|
|
195
201
|
- 변경 파일 수와 측정 라인 예산 초과를 수치 근거가 있는 `low` finding으로 탐지
|
|
196
|
-
- Contract가 지정한 소스·테스트 경로를 분류하고 파일명
|
|
202
|
+
- Contract가 지정한 소스·테스트 경로를 분류하고 파일명 또는 명시적 매핑으로 관련 변경 연결
|
|
197
203
|
- 테스트 변경 수와 추가·삭제 수를 별도의 분석 사실로 집계
|
|
198
204
|
- 관련 테스트 변경이 없는 소스 파일을 `medium` finding으로 탐지
|
|
199
205
|
- `*`, `**`, `?` 기반의 저장소 상대 경로 패턴 지원
|
|
@@ -283,9 +289,14 @@ intentpatch analyze --intent-file request.md --format html --output report.html
|
|
|
283
289
|
- `tests.requireFor`: 테스트 동반 변경을 확인할 소스 경로
|
|
284
290
|
- `tests.include`: 테스트 파일로 분류할 경로
|
|
285
291
|
- `tests.exclude`: 생성 파일이나 선언 파일처럼 검사에서 제외할 소스 경로
|
|
292
|
+
- `tests.related`: 소스 파일의 정확한 경로와 관련 테스트 경로 패턴의 명시적 연결.
|
|
293
|
+
해당 소스에는 파일명 기반 자동 연결 대신 이 설정을 적용합니다.
|
|
286
294
|
|
|
287
|
-
테스트 연결은 결정적인 결과를 위해 파일명을 사용합니다. 예를 들어 `src/user.ts`는
|
|
295
|
+
명시적 연결이 없으면 테스트 연결은 결정적인 결과를 위해 파일명을 사용합니다. 예를 들어 `src/user.ts`는
|
|
288
296
|
`tests/user.test.ts`, `user.spec.ts`, `user.integration.test.ts` 같은 변경과 연결됩니다.
|
|
297
|
+
이름이 다른 통합 테스트는 `tests` 객체 안에
|
|
298
|
+
`"related": { "src/user.ts": ["tests/account-deletion*.test.ts"] }`처럼 지정할 수 있습니다.
|
|
299
|
+
`tests.include`에 속한 변경 테스트만 인정합니다.
|
|
289
300
|
|
|
290
301
|
기본 파일 대신 별도 계약을 사용하려면 `--config`를 지정합니다. 상대 경로는 `--cwd`를 기준으로
|
|
291
302
|
해석합니다.
|
|
@@ -416,7 +427,7 @@ npm run check
|
|
|
416
427
|
- 생성한 npm tarball을 임시 프로젝트에 설치하고 실행하는 패키지 통합 테스트
|
|
417
428
|
- 계층 간 의존 방향을 검증하는 아키텍처 테스트
|
|
418
429
|
|
|
419
|
-
외부 저장소의 실제 변경
|
|
430
|
+
외부 저장소의 실제 변경 32건에서 공개 API·의존성·범위·테스트 규칙의 경고를 사람이 검토한 기대 결과와 비교하는
|
|
420
431
|
방법은 [외부 저장소 평가 문서](./docs/external-repository-evaluation.md)에 정리했습니다.
|
|
421
432
|
|
|
422
433
|
프로덕션 빌드만 확인하려면 다음 명령을 사용합니다.
|
|
@@ -433,7 +444,7 @@ npm pack --dry-run
|
|
|
433
444
|
|
|
434
445
|
## 릴리스
|
|
435
446
|
|
|
436
|
-
`v0.
|
|
447
|
+
`v0.8.0`처럼 `package.json` 버전과 일치하는 태그를 기본 브랜치의 커밋에 push하면 릴리스
|
|
437
448
|
워크플로가 다음 작업을 순서대로 수행합니다.
|
|
438
449
|
|
|
439
450
|
1. 태그·버전·기본 브랜치 포함 여부 검증
|
|
@@ -460,7 +471,8 @@ npm provenance가 자동 생성됩니다. 아직 npm에 존재하지 않는 신
|
|
|
460
471
|
- ✅ npm workspace manifest의 직접 dependency 변경
|
|
461
472
|
- ✅ pnpm `pnpm-lock.yaml` v9의 레지스트리 패키지 변경
|
|
462
473
|
- ✅ pnpm workspace manifest의 직접 dependency 변경
|
|
463
|
-
- Yarn
|
|
474
|
+
- ✅ Yarn 4 metadata-v8 `yarn.lock` 레지스트리 패키지 변경
|
|
475
|
+
- Yarn workspace manifest 변경은 미구현
|
|
464
476
|
7. ✅ 직접 export된 공개 심볼 삭제와 export 해제 탐지
|
|
465
477
|
- ✅ JavaScript ESM의 이름 있는 export·default export 삭제 탐지
|
|
466
478
|
8. ✅ 단일 HTML 대시보드와 SVG 기반 dependency 영향 그래프
|
|
@@ -470,7 +482,7 @@ npm provenance가 자동 생성됩니다. 아직 npm에 존재하지 않는 신
|
|
|
470
482
|
12. 요청 입력과 에이전트 adapter
|
|
471
483
|
- ✅ CLI 요청 문서와 선택적 GitHub PR 본문 입력
|
|
472
484
|
- ✅ 선택적 Claude Code Hook
|
|
473
|
-
- Codex·Cursor 전용 adapter
|
|
485
|
+
- ✅ 선택적 Codex·Cursor 전용 adapter (v0.7.0)
|
|
474
486
|
13. 근거 기반 결과에 대한 선택적 LLM 설명
|
|
475
487
|
|
|
476
488
|
## 현재 제한사항
|
|
@@ -494,8 +506,12 @@ npm provenance가 자동 생성됩니다. 아직 npm에 존재하지 않는 신
|
|
|
494
506
|
- pnpm workspace는 `pnpm-workspace.yaml`의 `packages`에 명시한 `*`·`**`·`?`와 선행 `!`
|
|
495
507
|
제외 패턴을 지원합니다. npm 설정이 함께 있으면 중복 보고를 막기 위해 pnpm 설정을
|
|
496
508
|
우선합니다. 그 외 glob 문법과 catalog는 해석하지 않습니다.
|
|
497
|
-
- Yarn
|
|
498
|
-
|
|
509
|
+
- Yarn 4 metadata-v8 `yarn.lock`의 레지스트리 패키지 해석 결과와 버전은 비교합니다.
|
|
510
|
+
Yarn Classic·다른 metadata 버전은 미지원으로 보고합니다. workspace·patch·file·Git·virtual
|
|
511
|
+
해석 결과, checksum만 바뀐 경우, 부모 dependency 귀속은 분석하지 않습니다. 런타임에서의 실제
|
|
512
|
+
dependency 사용 여부도 판정하지 않습니다.
|
|
513
|
+
- working tree의 `package-lock.json`·`pnpm-lock.yaml`·`yarn.lock`은 10 MiB,
|
|
514
|
+
그 외 텍스트 snapshot은 1 MiB로 제한합니다.
|
|
499
515
|
- TypeScript 심볼 분석은 `.ts`와 `.tsx`의 이름이 있는 최상위 함수, 클래스, 인터페이스, 타입
|
|
500
516
|
별칭만 지원합니다.
|
|
501
517
|
- JavaScript 심볼 분석은 `.js`·`.jsx`·`.mjs`·`.cjs`의 최상위 함수·클래스·변수 및 식별 가능한
|
|
@@ -512,9 +528,13 @@ npm provenance가 자동 생성됩니다. 아직 npm에 존재하지 않는 신
|
|
|
512
528
|
완전한 타입 할당 가능성은 해석하지 않습니다. 지원하지
|
|
513
529
|
않는 타입 별칭 형태에서는 구성원 삭제 finding을 내지 않습니다.
|
|
514
530
|
- 함수 호환성은 먼저 기록된 시그니처를 비교하고, 외부 참조 없이 해석할 수 있는 명시적 타입은
|
|
515
|
-
TypeScript의 엄격한 할당 가능성 검사로 기존 호출 유지 여부를 확인합니다.
|
|
516
|
-
|
|
517
|
-
타입
|
|
531
|
+
TypeScript의 엄격한 할당 가능성 검사로 기존 호출 유지 여부를 확인합니다. 반환형 표기가
|
|
532
|
+
그대로인 기본형 인자가 합집합 타입으로 확장된 경우는 제한적인 구문 검사로도 확인합니다.
|
|
533
|
+
그 밖의 미해결 타입 이름, 추론된 타입, 파싱할 수 없는 시그니처는 확인 불가로 남겨 검토
|
|
534
|
+
경고를 유지합니다. 전체 프로젝트의 타입 검사나 런타임 호환성 보증은 아닙니다.
|
|
535
|
+
- 인터페이스 속성 타입은 기존 타입이 같거나 지원하는 객체 리터럴 안에 선택 필드만 추가된
|
|
536
|
+
경우(`Readonly` 포함)에만 호환된다고 판단합니다. 다른 중첩 타입 변경은 호환을 단정하지
|
|
537
|
+
않고 검토 경고를 유지합니다.
|
|
518
538
|
- 중복 구현 후보는 새로 추가된 최상위 함수와 기존 최상위 함수의 토큰이 공백·주석을 제외하고
|
|
519
539
|
완전히 같으며 본문이 12토큰 이상일 때만 보고합니다. 식별자 이름이 바뀐 유사 코드, 메서드,
|
|
520
540
|
의미적으로만 같은 구현은 탐지하지 않습니다.
|
|
@@ -543,10 +563,12 @@ npm provenance가 자동 생성됩니다. 아직 npm에 존재하지 않는 신
|
|
|
543
563
|
0줄이라고 간주하지 않지만, 해당 파일의 크기를 라인 예산에 포함하지도 않습니다.
|
|
544
564
|
- 테스트 분석은 실행 결과나 코드 커버리지를 측정하지 않고 Contract에 지정된 변경 파일만
|
|
545
565
|
비교합니다.
|
|
546
|
-
- 관련 테스트는
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
566
|
+
- 관련 테스트는 기본적으로 파일명으로 연결하지만 정확한 소스 경로에 `tests.related`를
|
|
567
|
+
선언하면 이름이 다른 테스트도 지정할 수 있습니다. 이는 테스트 실행이나 실제 커버리지 측정이
|
|
568
|
+
아니라 사용자가 선언한 연결입니다.
|
|
569
|
+
- HTML 영향 그래프는 결정적인 두 열 레이아웃이며 노드를 누르면 보고서의 관련 행으로 이동합니다.
|
|
570
|
+
경로·심각도 필터는 보고서 행만 좁히고 그래프 자체를 필터링하지 않습니다. 노드 이동과 확대·축소는
|
|
571
|
+
아직 구현하지 않았습니다.
|
|
550
572
|
|
|
551
573
|
## 라이선스
|
|
552
574
|
|
package/README.md
CHANGED
|
@@ -18,7 +18,7 @@ IntentPatch combines **Git diff analysis, static analysis, and dependency analys
|
|
|
18
18
|
|
|
19
19
|
## Quick start
|
|
20
20
|
|
|
21
|
-
IntentPatch requires Node.js 20 or later and Git. Run the published v0.
|
|
21
|
+
IntentPatch requires Node.js 20 or later and Git. Run the published v0.8.0 CLI without
|
|
22
22
|
installing it globally:
|
|
23
23
|
|
|
24
24
|
```bash
|
|
@@ -62,7 +62,7 @@ jobs:
|
|
|
62
62
|
|
|
63
63
|
- name: Analyze pull request
|
|
64
64
|
id: intentpatch
|
|
65
|
-
uses: xx2xxjaeil/intent-patch@v0.
|
|
65
|
+
uses: xx2xxjaeil/intent-patch@v0.8.0
|
|
66
66
|
with:
|
|
67
67
|
fail-on: high
|
|
68
68
|
|
|
@@ -74,8 +74,10 @@ jobs:
|
|
|
74
74
|
path: intentpatch-report
|
|
75
75
|
```
|
|
76
76
|
|
|
77
|
-
Pin the action to a released version or an immutable commit SHA. v0.
|
|
78
|
-
|
|
77
|
+
Pin the action to a released version or an immutable commit SHA. v0.8.0 adds Yarn 4
|
|
78
|
+
lockfile analysis, explicit source-to-test mappings, report filters, and improved impact-graph
|
|
79
|
+
navigation. It also includes package-entrypoint-aware public API warnings, historical import
|
|
80
|
+
impact for deleted modules, and opt-in Claude Code, Codex, and Cursor Hooks.
|
|
79
81
|
See [the evaluation report](./docs/external-repository-evaluation.md) for the separately measured
|
|
80
82
|
public-API rules and their limits. `@main` follows unreleased changes.
|
|
81
83
|
|
|
@@ -93,6 +95,11 @@ See the [GitHub Action guide](./docs/github-action.md) for inputs, outputs, and
|
|
|
93
95
|
|
|
94
96
|
An opt-in Hook adapter captures a turn's original prompt and starting commit, then shows a small change/finding summary when Claude Code stops. It does not send the prompt to an external service. See the [setup guide](https://github.com/xx2xxjaeil/intent-patch/blob/main/docs/claude-code.md) for installation, the Hook configuration example, and local-state security notes.
|
|
95
97
|
|
|
98
|
+
## Codex and Cursor Hooks
|
|
99
|
+
|
|
100
|
+
Version 0.7.0 adds opt-in turn analysis for [Codex](./docs/codex.md) and [Cursor](./docs/cursor.md). These adapters use the same deterministic analyzer and require no API key or paid model. Codex returns a count-only Hook message. Cursor writes a private HTML report under Git metadata and logs its path without auto-submitting another AI prompt.
|
|
101
|
+
The [Hook smoke-test checklist](./docs/hook-smoke-test.md) separates packaged CLI checks from live application checks.
|
|
102
|
+
|
|
96
103
|
## What the report looks like
|
|
97
104
|
|
|
98
105
|
```text
|
|
@@ -130,7 +137,7 @@ Every finding includes the relevant file, a stable rule ID, and evidence for the
|
|
|
130
137
|
For reports generated from actual commits, see the
|
|
131
138
|
[standalone HTML example](./docs/examples/intent-input-change.html), the
|
|
132
139
|
[three-case self-repository study](./docs/real-world-evaluation.md), and the
|
|
133
|
-
[external evaluation of
|
|
140
|
+
[external evaluation of 32 changes and 38 rule checks](./docs/external-repository-evaluation.md). After cloning,
|
|
134
141
|
open the HTML file locally in a browser; GitHub may show its source rather than render it.
|
|
135
142
|
|
|
136
143
|
## Implemented capabilities
|
|
@@ -146,7 +153,7 @@ The current source tree analyzes Git changes, direct dependencies in the root `p
|
|
|
146
153
|
- Distinguish binary files.
|
|
147
154
|
- Include untracked files in working-tree analysis.
|
|
148
155
|
- Render terminal-friendly text and machine-readable JSON reports.
|
|
149
|
-
- Generate a standalone HTML report containing summary cards, findings, test signals, and
|
|
156
|
+
- Generate a standalone HTML report containing summary cards, path/severity filters, findings, test signals, and a navigable impact graph.
|
|
150
157
|
- Render the visualization with inline CSS and SVG, without a CDN or runtime JavaScript dependency.
|
|
151
158
|
- Aggregate findings by `high`, `medium`, and `low` severity.
|
|
152
159
|
- Return a CI-friendly exit code through `--fail-on`.
|
|
@@ -193,7 +200,7 @@ The current source tree analyzes Git changes, direct dependencies in the root `p
|
|
|
193
200
|
- Accept a request text/Markdown file through the CLI, or opt in to using the PR body in the GitHub Action.
|
|
194
201
|
- Report each file outside expected and allowed patterns as a medium-severity finding.
|
|
195
202
|
- Report file-count and measurable-line budget overruns with numeric evidence.
|
|
196
|
-
- Classify source and test paths declared by the contract and connect related changes by basename.
|
|
203
|
+
- Classify source and test paths declared by the contract and connect related changes by basename or an explicit mapping.
|
|
197
204
|
- Report test file counts and added or deleted tests as separate facts.
|
|
198
205
|
- Report source files without a related test change as medium-severity findings.
|
|
199
206
|
- Support repository-relative `*`, `**`, and `?` path patterns.
|
|
@@ -275,8 +282,18 @@ Create `.intentpatch.json` in the repository being analyzed and declare the expe
|
|
|
275
282
|
- `tests.requireFor`: source paths that require a related test change;
|
|
276
283
|
- `tests.include`: paths classified as tests;
|
|
277
284
|
- `tests.exclude`: generated or declaration files excluded from the source check.
|
|
285
|
+
- `tests.related`: optional exact source paths mapped to related test path patterns; an explicit
|
|
286
|
+
mapping overrides basename matching for that source.
|
|
287
|
+
|
|
288
|
+
Without an explicit mapping, test matching uses basenames for deterministic results. For example,
|
|
289
|
+
`src/user.ts` can match changed files such as `tests/user.test.ts`, `user.spec.ts`, or
|
|
290
|
+
`user.integration.test.ts`. For a differently named integration test, add a mapping:
|
|
291
|
+
|
|
292
|
+
```json
|
|
293
|
+
"related": { "src/user.ts": ["tests/account-deletion*.test.ts"] }
|
|
294
|
+
```
|
|
278
295
|
|
|
279
|
-
|
|
296
|
+
Place `related` inside the `tests` object. Only changed test files matching `tests.include` count.
|
|
280
297
|
|
|
281
298
|
Use `--config` to select another contract. Relative paths are resolved from `--cwd`:
|
|
282
299
|
|
|
@@ -405,8 +422,8 @@ This command runs:
|
|
|
405
422
|
- architecture tests that enforce dependency direction;
|
|
406
423
|
- a reproducibility check for the bundled GitHub Action.
|
|
407
424
|
|
|
408
|
-
For a reproducible check of
|
|
409
|
-
|
|
425
|
+
For a reproducible check of 38 rule decisions across 32 reviewed changes in external
|
|
426
|
+
repositories, see the [external evaluation](./docs/external-repository-evaluation.md).
|
|
410
427
|
|
|
411
428
|
Run only the production build with:
|
|
412
429
|
|
|
@@ -422,7 +439,7 @@ npm pack --dry-run
|
|
|
422
439
|
|
|
423
440
|
## Release process
|
|
424
441
|
|
|
425
|
-
Pushing a tag such as `v0.
|
|
442
|
+
Pushing a tag such as `v0.8.0`, matching the version in `package.json`, from a commit contained in the default branch triggers the release workflow:
|
|
426
443
|
|
|
427
444
|
1. Validate the tag, package version, and default-branch ancestry.
|
|
428
445
|
2. Run the full quality suite and inspect the npm package with a dry run.
|
|
@@ -445,7 +462,8 @@ No long-lived npm token is stored as a GitHub secret. Public packages published
|
|
|
445
462
|
- ✅ npm workspace manifest dependency changes
|
|
446
463
|
- ✅ pnpm `pnpm-lock.yaml` v9 resolved registry package changes
|
|
447
464
|
- ✅ pnpm workspace manifest dependency changes
|
|
448
|
-
- Yarn
|
|
465
|
+
- ✅ Yarn 4 metadata-v8 `yarn.lock` resolved registry package changes
|
|
466
|
+
- Yarn workspace manifest changes remain open
|
|
449
467
|
7. ✅ Detection of removed public exports
|
|
450
468
|
- ✅ Named and default ESM exports in JavaScript, without inferred type compatibility
|
|
451
469
|
8. ✅ Standalone HTML dashboard and SVG dependency-impact graph
|
|
@@ -455,7 +473,7 @@ No long-lived npm token is stored as a GitHub secret. Public packages published
|
|
|
455
473
|
12. Request capture and agent adapters
|
|
456
474
|
- ✅ CLI request file and opt-in GitHub PR body
|
|
457
475
|
- ✅ Opt-in Claude Code Hook
|
|
458
|
-
- Codex and Cursor-specific adapters
|
|
476
|
+
- ✅ Opt-in Codex and Cursor-specific adapters (v0.7.0)
|
|
459
477
|
13. Optional LLM explanations grounded in deterministic evidence
|
|
460
478
|
|
|
461
479
|
## Current limitations
|
|
@@ -469,11 +487,17 @@ No long-lived npm token is stored as a GitHub secret. Public packages published
|
|
|
469
487
|
- pnpm `pnpm-lock.yaml` v9 analysis compares registry package IDs and versions in the project document. It ignores integrity-only edits, local/Git packages, snapshot peer variants, and dependency provenance. Root-direct evidence comes from the root importer only.
|
|
470
488
|
- Workspace detection supports the root npm `workspaces` array with explicit paths and `*`, `**`, and `?` globs. Negation, brace, and character-class patterns are reported as unsupported.
|
|
471
489
|
- pnpm workspace detection reads `pnpm-workspace.yaml` `packages` patterns with `*`, `**`, `?`, and leading `!` exclusions. When both npm and pnpm workspace settings exist, pnpm settings take precedence to avoid duplicate findings. Other glob features and pnpm catalogs are not interpreted.
|
|
472
|
-
- Yarn
|
|
473
|
-
|
|
490
|
+
- Yarn 4 `yarn.lock` metadata-v8 analysis compares registry package resolutions and versions.
|
|
491
|
+
Yarn Classic and other metadata versions are reported as unsupported. Workspace, patch, file,
|
|
492
|
+
Git, and virtual resolutions, checksum-only changes, and dependency provenance are not analyzed.
|
|
493
|
+
Runtime dependency usage is not established.
|
|
494
|
+
- Working-tree `package-lock.json`, `pnpm-lock.yaml`, and `yarn.lock` files are limited to 10 MiB; other text snapshots retain the 1 MiB limit.
|
|
474
495
|
- TypeScript symbol analysis supports named top-level functions, classes, interfaces, and type aliases in `.ts` and `.tsx` files. JavaScript symbol analysis supports named top-level functions, classes, variables, and identifiable ESM exports in `.js`, `.jsx`, `.mjs`, and `.cjs` files.
|
|
475
496
|
- TypeScript public API analysis supports named top-level functions and interfaces, plus member removal from exported object type aliases composed of type literals and same-file, non-generic aliases/intersections. Local `export { name }`, external `export { name } from`, and `export * from` are tracked as export evidence. JavaScript supports identifiable named and default ESM export removal, but does not infer function signatures. Previous root or nested package `exports` are followed through explicit source targets and relative re-exports. This is a file-level approximation: a named re-export may still expose only some symbols from its module. If an entrypoint is generated, unresolved, or unsupported, IntentPatch retains the earlier conservative warnings instead of claiming a file is private. CommonJS `module.exports`, class contracts, generic alias instantiation, unions, cross-file type references, and full type assignability are not interpreted yet. Unsupported type-alias shapes do not produce member-removal findings.
|
|
476
|
-
- Function compatibility first compares recorded signatures. For self-contained, explicitly typed declarations it then uses strict TypeScript assignability to avoid warning on compatible changes.
|
|
497
|
+
- Function compatibility first compares recorded signatures. For self-contained, explicitly typed declarations it then uses strict TypeScript assignability to avoid warning on compatible changes. A narrow syntactic check also accepts primitive parameters widened by union arms when the return text is unchanged. Other unresolved names, inferred types, malformed or unsupported signature shapes remain unverified and keep the review warning; this is not a whole-project type check or a runtime compatibility guarantee.
|
|
498
|
+
- Interface property compatibility recognizes unchanged types and optional fields added inside
|
|
499
|
+
supported object literals, including `Readonly` wrappers. Other nested type transformations
|
|
500
|
+
remain unverified rather than being treated as compatible.
|
|
477
501
|
- Duplicate candidates require a newly added top-level function and an existing top-level function to have exactly the same normalized tokens after comments and whitespace are removed, with at least 12 body tokens. Renamed identifiers, methods, and semantically equivalent implementations are not detected.
|
|
478
502
|
- A single-implementation abstraction is reported only when exactly one named class explicitly uses `implements` for a new interface. Structural implementation, factory return types, and runtime registration are not calculated.
|
|
479
503
|
- Methods, TypeScript variable declarations, enums, and nested declarations are not included in symbol analysis.
|
|
@@ -489,8 +513,11 @@ No long-lived npm token is stored as a GitHub secret. Public packages published
|
|
|
489
513
|
- Path patterns support only repository-relative `*`, `**`, and `?`; negation and brace expansion are not supported.
|
|
490
514
|
- `maxLines` sums only measurable added and deleted lines in text files. Binary or unmeasurable files are not treated as zero lines, but their size is not included in the budget.
|
|
491
515
|
- Test analysis compares only the changed paths declared in the contract; it does not execute tests or measure coverage.
|
|
492
|
-
- Related tests are matched by basename
|
|
493
|
-
|
|
516
|
+
- Related tests are matched by basename unless an exact source path has a `tests.related`
|
|
517
|
+
mapping. This is a declared relationship, not inferred test coverage; tests are not executed.
|
|
518
|
+
- The HTML impact graph uses a deterministic two-column layout. Nodes link to report rows; path
|
|
519
|
+
search and severity filters narrow report rows, not the graph itself. Node movement and zoom
|
|
520
|
+
are not implemented.
|
|
494
521
|
|
|
495
522
|
## License
|
|
496
523
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"property-type-compatibility.d.ts","sourceRoot":"","sources":["../../../src/application/ports/property-type-compatibility.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,MAAM,WAAW,yBAAyB;IACxC,iCAAiC,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC;CAC/E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"property-type-compatibility.js","sourceRoot":"","sources":["../../../src/application/ports/property-type-compatibility.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/** Yarn 4 lockfile에서 검증된 레지스트리 해석 결과만 전달한다. */
|
|
2
|
+
export interface YarnLockedPackage {
|
|
3
|
+
readonly id: string;
|
|
4
|
+
readonly name: string;
|
|
5
|
+
readonly version: string;
|
|
6
|
+
readonly rootDirect: boolean;
|
|
7
|
+
}
|
|
8
|
+
export type YarnLockParseResult = Readonly<{
|
|
9
|
+
ok: true;
|
|
10
|
+
packages: ReadonlyMap<string, YarnLockedPackage>;
|
|
11
|
+
}> | Readonly<{
|
|
12
|
+
ok: false;
|
|
13
|
+
kind: "invalid" | "unsupported";
|
|
14
|
+
reason: string;
|
|
15
|
+
}>;
|
|
16
|
+
export interface YarnLockParser {
|
|
17
|
+
parse(content: string): YarnLockParseResult;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=yarn-lock-parser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"yarn-lock-parser.d.ts","sourceRoot":"","sources":["../../../src/application/ports/yarn-lock-parser.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;CAC9B;AAED,MAAM,MAAM,mBAAmB,GAC3B,QAAQ,CAAC;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,QAAQ,EAAE,WAAW,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAA;CAAE,CAAC,GACxE,QAAQ,CAAC;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,IAAI,EAAE,SAAS,GAAG,aAAa,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAE7E,MAAM,WAAW,cAAc;IAC7B,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,mBAAmB,CAAC;CAC7C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"yarn-lock-parser.js","sourceRoot":"","sources":["../../../src/application/ports/yarn-lock-parser.ts"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"missing-test-change-rule.d.ts","sourceRoot":"","sources":["../../../src/application/rules/missing-test-change-rule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAE/E,oDAAoD;AACpD,qBAAa,qBAAsB,YAAW,YAAY;IAC3C,OAAO,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,SAAS,OAAO,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"missing-test-change-rule.d.ts","sourceRoot":"","sources":["../../../src/application/rules/missing-test-change-rule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAE/E,oDAAoD;AACpD,qBAAa,qBAAsB,YAAW,YAAY;IAC3C,OAAO,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,SAAS,OAAO,EAAE,CAAC;CA2B5E"}
|
|
@@ -8,18 +8,23 @@ export class MissingTestChangeRule {
|
|
|
8
8
|
const testPatterns = context.contract?.tests?.include.join(", ") ?? "";
|
|
9
9
|
return testChanges.sourceCoverage
|
|
10
10
|
.filter((coverage) => coverage.matchingTests.length === 0)
|
|
11
|
-
.map((coverage) =>
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
11
|
+
.map((coverage) => {
|
|
12
|
+
const explicit = Object.hasOwn(context.contract?.tests?.related ?? {}, coverage.sourcePath);
|
|
13
|
+
return {
|
|
14
|
+
ruleId: "tests/missing-related-change",
|
|
15
|
+
severity: "medium",
|
|
16
|
+
title: "Source change without matching test change",
|
|
17
|
+
description: explicit
|
|
18
|
+
? `${coverage.sourcePath} changed without a changed test from its explicit related-test mapping.`
|
|
19
|
+
: `${coverage.sourcePath} changed without a changed test sharing the same basename.`,
|
|
20
|
+
file: coverage.sourcePath,
|
|
21
|
+
evidence: {
|
|
22
|
+
sourceChangeKind: coverage.sourceChangeKind,
|
|
23
|
+
matchingStrategy: explicit ? "explicit" : "basename",
|
|
24
|
+
testPatterns,
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
});
|
|
23
28
|
}
|
|
24
29
|
}
|
|
25
30
|
//# sourceMappingURL=missing-test-change-rule.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"missing-test-change-rule.js","sourceRoot":"","sources":["../../../src/application/rules/missing-test-change-rule.ts"],"names":[],"mappings":"AAGA,oDAAoD;AACpD,MAAM,OAAO,qBAAqB;IACzB,KAAK,CAAC,OAAO,CAAC,OAAwB;QAC3C,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;QACxC,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;YAC9B,OAAO,EAAE,CAAC;QACZ,CAAC;QAED,MAAM,YAAY,GAAG,OAAO,CAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;QACvE,OAAO,WAAW,CAAC,cAAc;aAC9B,MAAM,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,aAAa,CAAC,MAAM,KAAK,CAAC,CAAC;aACzD,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"missing-test-change-rule.js","sourceRoot":"","sources":["../../../src/application/rules/missing-test-change-rule.ts"],"names":[],"mappings":"AAGA,oDAAoD;AACpD,MAAM,OAAO,qBAAqB;IACzB,KAAK,CAAC,OAAO,CAAC,OAAwB;QAC3C,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;QACxC,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;YAC9B,OAAO,EAAE,CAAC;QACZ,CAAC;QAED,MAAM,YAAY,GAAG,OAAO,CAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;QACvE,OAAO,WAAW,CAAC,cAAc;aAC9B,MAAM,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,aAAa,CAAC,MAAM,KAAK,CAAC,CAAC;aACzD,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE;YAChB,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,IAAI,EAAE,EAAE,QAAQ,CAAC,UAAU,CAAC,CAAC;YAC5F,OAAO;gBACL,MAAM,EAAE,8BAA8B;gBACtC,QAAQ,EAAE,QAAQ;gBAClB,KAAK,EAAE,4CAA4C;gBACnD,WAAW,EAAE,QAAQ;oBACnB,CAAC,CAAC,GAAG,QAAQ,CAAC,UAAU,yEAAyE;oBACjG,CAAC,CAAC,GAAG,QAAQ,CAAC,UAAU,4DAA4D;gBACtF,IAAI,EAAE,QAAQ,CAAC,UAAU;gBACzB,QAAQ,EAAE;oBACR,gBAAgB,EAAE,QAAQ,CAAC,gBAAgB;oBAC3C,gBAAgB,EAAE,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,UAAU;oBACpD,YAAY;iBACb;aACF,CAAC;QACJ,CAAC,CAAC,CAAC;IACP,CAAC;CACF"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import type { Finding } from "../../domain/finding.js";
|
|
2
2
|
import type { AnalysisContext, AnalysisRule } from "../ports/analysis-rule.js";
|
|
3
3
|
import type { FunctionSignatureCompatibility } from "../ports/function-signature-compatibility.js";
|
|
4
|
+
import type { PropertyTypeCompatibility } from "../ports/property-type-compatibility.js";
|
|
4
5
|
/** 공개 함수·인터페이스 계약과 공개 객체 타입의 구성원 삭제를 찾는다. */
|
|
5
6
|
export declare class PublicApiCompatibilityRule implements AnalysisRule {
|
|
6
7
|
private readonly signatureCompatibility;
|
|
7
|
-
|
|
8
|
+
private readonly propertyTypeCompatibility;
|
|
9
|
+
constructor(signatureCompatibility: FunctionSignatureCompatibility, propertyTypeCompatibility: PropertyTypeCompatibility);
|
|
8
10
|
analyze(context: AnalysisContext): Promise<readonly Finding[]>;
|
|
9
11
|
}
|
|
10
12
|
//# sourceMappingURL=public-api-compatibility-rule.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public-api-compatibility-rule.d.ts","sourceRoot":"","sources":["../../../src/application/rules/public-api-compatibility-rule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAQvD,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC/E,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,8CAA8C,CAAC;
|
|
1
|
+
{"version":3,"file":"public-api-compatibility-rule.d.ts","sourceRoot":"","sources":["../../../src/application/rules/public-api-compatibility-rule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAQvD,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC/E,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,8CAA8C,CAAC;AACnG,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AAEzF,6CAA6C;AAC7C,qBAAa,0BAA2B,YAAW,YAAY;IAE3D,OAAO,CAAC,QAAQ,CAAC,sBAAsB;IACvC,OAAO,CAAC,QAAQ,CAAC,yBAAyB;gBADzB,sBAAsB,EAAE,8BAA8B,EACtD,yBAAyB,EAAE,yBAAyB;IAG1D,OAAO,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,SAAS,OAAO,EAAE,CAAC;CAK5E"}
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
/** 공개 함수·인터페이스 계약과 공개 객체 타입의 구성원 삭제를 찾는다. */
|
|
2
2
|
export class PublicApiCompatibilityRule {
|
|
3
3
|
signatureCompatibility;
|
|
4
|
-
|
|
4
|
+
propertyTypeCompatibility;
|
|
5
|
+
constructor(signatureCompatibility, propertyTypeCompatibility) {
|
|
5
6
|
this.signatureCompatibility = signatureCompatibility;
|
|
7
|
+
this.propertyTypeCompatibility = propertyTypeCompatibility;
|
|
6
8
|
}
|
|
7
9
|
async analyze(context) {
|
|
8
|
-
return (context.symbolChanges?.changes ?? []).flatMap((change) => toFinding(change, this.signatureCompatibility));
|
|
10
|
+
return (context.symbolChanges?.changes ?? []).flatMap((change) => toFinding(change, this.signatureCompatibility, this.propertyTypeCompatibility));
|
|
9
11
|
}
|
|
10
12
|
}
|
|
11
|
-
function toFinding(change, signatureCompatibility) {
|
|
13
|
+
function toFinding(change, signatureCompatibility, propertyTypeCompatibility) {
|
|
12
14
|
if (change.changeKind !== "modified" ||
|
|
13
15
|
change.beforePubliclyReachable === false ||
|
|
14
16
|
change.beforeExported !== true ||
|
|
@@ -22,7 +24,7 @@ function toFinding(change, signatureCompatibility) {
|
|
|
22
24
|
return functionFinding(change, change.beforePublicApi, change.afterPublicApi, signatureCompatibility);
|
|
23
25
|
}
|
|
24
26
|
if (change.beforePublicApi.kind === "interface" && change.afterPublicApi.kind === "interface") {
|
|
25
|
-
return interfaceFinding(change, change.beforePublicApi, change.afterPublicApi);
|
|
27
|
+
return interfaceFinding(change, change.beforePublicApi, change.afterPublicApi, propertyTypeCompatibility);
|
|
26
28
|
}
|
|
27
29
|
if (change.beforePublicApi.kind === "type-alias" && change.afterPublicApi.kind === "type-alias") {
|
|
28
30
|
return typeAliasFinding(change, change.beforePublicApi, change.afterPublicApi);
|
|
@@ -77,8 +79,8 @@ function functionFinding(change, before, after, signatureCompatibility) {
|
|
|
77
79
|
},
|
|
78
80
|
];
|
|
79
81
|
}
|
|
80
|
-
function interfaceFinding(change, before, after) {
|
|
81
|
-
const reasons = interfaceBreakingReasons(before, after);
|
|
82
|
+
function interfaceFinding(change, before, after, propertyTypeCompatibility) {
|
|
83
|
+
const reasons = interfaceBreakingReasons(before, after, propertyTypeCompatibility);
|
|
82
84
|
if (reasons.length === 0) {
|
|
83
85
|
return [];
|
|
84
86
|
}
|
|
@@ -97,31 +99,34 @@ function interfaceFinding(change, before, after) {
|
|
|
97
99
|
},
|
|
98
100
|
];
|
|
99
101
|
}
|
|
100
|
-
function interfaceBreakingReasons(before, after) {
|
|
102
|
+
function interfaceBreakingReasons(before, after, propertyTypeCompatibility) {
|
|
101
103
|
const reasons = [];
|
|
102
104
|
if (!sameValues(before.extendsTypes, after.extendsTypes)) {
|
|
103
105
|
reasons.push("extended types changed");
|
|
104
106
|
}
|
|
105
107
|
for (const member of before.members) {
|
|
106
|
-
if (!after.members.some((current) => preservesMember(member, current))) {
|
|
108
|
+
if (!after.members.some((current) => preservesMember(member, current, propertyTypeCompatibility))) {
|
|
107
109
|
reasons.push(`member removed or changed: ${member.name}`);
|
|
108
110
|
}
|
|
109
111
|
}
|
|
110
112
|
for (const member of after.members) {
|
|
111
|
-
if (!member.optional &&
|
|
113
|
+
if (!member.optional &&
|
|
114
|
+
!before.members.some((previous) => preservesMember(previous, member, propertyTypeCompatibility))) {
|
|
112
115
|
reasons.push(`required member added or changed: ${member.name}`);
|
|
113
116
|
}
|
|
114
117
|
}
|
|
115
118
|
return [...new Set(reasons)].sort();
|
|
116
119
|
}
|
|
117
|
-
function preservesMember(previous, current) {
|
|
120
|
+
function preservesMember(previous, current, propertyTypeCompatibility) {
|
|
118
121
|
if (previous.name !== current.name ||
|
|
119
122
|
previous.memberKind !== current.memberKind ||
|
|
120
123
|
previous.optional !== current.optional)
|
|
121
124
|
return false;
|
|
122
125
|
return (previous.signature === current.signature ||
|
|
123
126
|
(previous.memberKind === "method" &&
|
|
124
|
-
preservesMethodCalls(previous.signature, current.signature))
|
|
127
|
+
preservesMethodCalls(previous.signature, current.signature)) ||
|
|
128
|
+
(previous.memberKind === "property" &&
|
|
129
|
+
propertyTypeCompatibility.preservesOptionalObjectExtensions(previous.signature, current.signature)));
|
|
125
130
|
}
|
|
126
131
|
/** 기존 인자·반환형을 그대로 두고 선택적 인자만 끝에 더한 메서드는 이전 호출을 수용한다. */
|
|
127
132
|
function preservesMethodCalls(previous, current) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public-api-compatibility-rule.js","sourceRoot":"","sources":["../../../src/application/rules/public-api-compatibility-rule.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"public-api-compatibility-rule.js","sourceRoot":"","sources":["../../../src/application/rules/public-api-compatibility-rule.ts"],"names":[],"mappings":"AAYA,6CAA6C;AAC7C,MAAM,OAAO,0BAA0B;IAElB;IACA;IAFnB,YACmB,sBAAsD,EACtD,yBAAoD;QADpD,2BAAsB,GAAtB,sBAAsB,CAAgC;QACtD,8BAAyB,GAAzB,yBAAyB,CAA2B;IACpE,CAAC;IAEG,KAAK,CAAC,OAAO,CAAC,OAAwB;QAC3C,OAAO,CAAC,OAAO,CAAC,aAAa,EAAE,OAAO,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE,CAC/D,SAAS,CAAC,MAAM,EAAE,IAAI,CAAC,sBAAsB,EAAE,IAAI,CAAC,yBAAyB,CAAC,CAC/E,CAAC;IACJ,CAAC;CACF;AAED,SAAS,SAAS,CAChB,MAAoB,EACpB,sBAAsD,EACtD,yBAAoD;IAEpD,IACE,MAAM,CAAC,UAAU,KAAK,UAAU;QAChC,MAAM,CAAC,uBAAuB,KAAK,KAAK;QACxC,MAAM,CAAC,cAAc,KAAK,IAAI;QAC9B,MAAM,CAAC,aAAa,KAAK,IAAI;QAC7B,MAAM,CAAC,eAAe,KAAK,SAAS;QACpC,MAAM,CAAC,cAAc,KAAK,SAAS;QACnC,MAAM,CAAC,eAAe,CAAC,IAAI,KAAK,MAAM,CAAC,cAAc,CAAC,IAAI,EAC1D,CAAC;QACD,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,IAAI,MAAM,CAAC,eAAe,CAAC,IAAI,KAAK,UAAU,IAAI,MAAM,CAAC,cAAc,CAAC,IAAI,KAAK,UAAU,EAAE,CAAC;QAC5F,OAAO,eAAe,CACpB,MAAM,EACN,MAAM,CAAC,eAAe,EACtB,MAAM,CAAC,cAAc,EACrB,sBAAsB,CACvB,CAAC;IACJ,CAAC;IACD,IAAI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,CAAC,IAAI,EAAE,CAAC,CAAC;QAC3C,CAAC;aAAM,IAAI,SAAS,KAAK,GAAG,IAAI,SAAS,KAAK,GAAG,IAAI,SAAS,KAAK,GAAG,IAAI,SAAS,KAAK,GAAG,EAAE,CAAC;YAC5F,IAAI,SAAS,KAAK,GAAG,IAAI,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,GAAG;gBAAE,SAAS;YAC5D,IAAI,KAAK,CAAC,GAAG,EAAE,KAAK,SAAS;gBAAE,OAAO,SAAS,CAAC;QAClD,CAAC;IACH,CAAC;IACD,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,SAAS,CAAC;IACvC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;IAC3C,OAAO,UAAU,CAAC;AACpB,CAAC;AAED,SAAS,cAAc,CAAC,MAAuB;IAC7C,OAAO,CAAC,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACrD,CAAC;AAED,SAAS,UAAU,CAAC,IAAuB,EAAE,KAAwB;IACnE,OAAO,IAAI,CAAC,MAAM,KAAK,KAAK,CAAC,MAAM,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;AAC9F,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Finding } from "../../domain/finding.js";
|
|
2
|
+
import type { AnalysisContext, AnalysisRule } from "../ports/analysis-rule.js";
|
|
3
|
+
import type { FileSnapshotSource } from "../ports/file-snapshot-source.js";
|
|
4
|
+
import type { YarnLockParser } from "../ports/yarn-lock-parser.js";
|
|
5
|
+
/** Yarn 4가 고정한 레지스트리 패키지의 추가·제거·단일 버전 교체를 보고한다. */
|
|
6
|
+
export declare class YarnLockfileRule implements AnalysisRule {
|
|
7
|
+
private readonly snapshots;
|
|
8
|
+
private readonly parser;
|
|
9
|
+
constructor(snapshots: FileSnapshotSource, parser: YarnLockParser);
|
|
10
|
+
analyze(context: AnalysisContext): Promise<readonly Finding[]>;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=yarn-lockfile-rule.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"yarn-lockfile-rule.d.ts","sourceRoot":"","sources":["../../../src/application/rules/yarn-lockfile-rule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC/E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAC3E,OAAO,KAAK,EAAqB,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAItF,mDAAmD;AACnD,qBAAa,gBAAiB,YAAW,YAAY;IAEjD,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,MAAM;gBADN,SAAS,EAAE,kBAAkB,EAC7B,MAAM,EAAE,cAAc;IAG5B,OAAO,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,SAAS,OAAO,EAAE,CAAC;CAkD5E"}
|