intentpatch 0.9.1 → 0.10.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 +51 -35
- package/README.md +40 -29
- package/dist/application/ports/analysis-rule.d.ts +2 -0
- package/dist/application/ports/analysis-rule.d.ts.map +1 -1
- package/dist/application/ports/code-structure-extractor.d.ts +2 -0
- package/dist/application/ports/code-structure-extractor.d.ts.map +1 -1
- package/dist/application/ports/package-lock-parser.d.ts +2 -0
- package/dist/application/ports/package-lock-parser.d.ts.map +1 -1
- package/dist/application/ports/pnpm-lock-parser.d.ts +1 -0
- package/dist/application/ports/pnpm-lock-parser.d.ts.map +1 -1
- package/dist/application/ports/source-symbol-extractor.d.ts +1 -0
- package/dist/application/ports/source-symbol-extractor.d.ts.map +1 -1
- package/dist/application/ports/yarn-lock-parser.d.ts +1 -0
- package/dist/application/ports/yarn-lock-parser.d.ts.map +1 -1
- package/dist/application/rules/duplicate-implementation-rule.d.ts +1 -1
- package/dist/application/rules/duplicate-implementation-rule.d.ts.map +1 -1
- package/dist/application/rules/duplicate-implementation-rule.js +6 -3
- package/dist/application/rules/duplicate-implementation-rule.js.map +1 -1
- package/dist/application/rules/missing-test-change-rule.js +2 -2
- package/dist/application/rules/missing-test-change-rule.js.map +1 -1
- package/dist/application/rules/npm-lockfile-rule.js +1 -0
- package/dist/application/rules/npm-lockfile-rule.js.map +1 -1
- package/dist/application/rules/pnpm-lockfile-rule.js +1 -0
- package/dist/application/rules/pnpm-lockfile-rule.js.map +1 -1
- package/dist/application/rules/public-api-compatibility-rule.d.ts +1 -1
- package/dist/application/rules/public-api-compatibility-rule.d.ts.map +1 -1
- package/dist/application/rules/public-api-compatibility-rule.js +8 -4
- package/dist/application/rules/public-api-compatibility-rule.js.map +1 -1
- package/dist/application/rules/public-api-removal-rule.js +2 -0
- package/dist/application/rules/public-api-removal-rule.js.map +1 -1
- package/dist/application/rules/yarn-lockfile-rule.js +1 -0
- package/dist/application/rules/yarn-lockfile-rule.js.map +1 -1
- package/dist/application/services/analyze-code-structure.d.ts.map +1 -1
- package/dist/application/services/analyze-code-structure.js +18 -4
- package/dist/application/services/analyze-code-structure.js.map +1 -1
- package/dist/application/services/analyze-test-changes.d.ts +1 -1
- package/dist/application/services/analyze-test-changes.d.ts.map +1 -1
- package/dist/application/services/analyze-test-changes.js +28 -2
- package/dist/application/services/analyze-test-changes.js.map +1 -1
- package/dist/application/services/compare-source-symbols.d.ts.map +1 -1
- package/dist/application/services/compare-source-symbols.js +5 -2
- package/dist/application/services/compare-source-symbols.js.map +1 -1
- package/dist/application/services/trace-intent-to-files.d.ts +10 -0
- package/dist/application/services/trace-intent-to-files.d.ts.map +1 -0
- package/dist/application/services/trace-intent-to-files.js +20 -0
- package/dist/application/services/trace-intent-to-files.js.map +1 -0
- package/dist/application/use-cases/analyze-changes.js +6 -6
- package/dist/application/use-cases/analyze-changes.js.map +1 -1
- package/dist/domain/code-structure.d.ts +2 -0
- package/dist/domain/code-structure.d.ts.map +1 -1
- package/dist/domain/code-structure.js +2 -0
- package/dist/domain/code-structure.js.map +1 -1
- package/dist/domain/symbol-change.d.ts +3 -1
- package/dist/domain/symbol-change.d.ts.map +1 -1
- package/dist/domain/symbol-change.js +2 -0
- package/dist/domain/symbol-change.js.map +1 -1
- package/dist/infrastructure/dependencies/trace-direct-origins.d.ts +3 -0
- package/dist/infrastructure/dependencies/trace-direct-origins.d.ts.map +1 -0
- package/dist/infrastructure/dependencies/trace-direct-origins.js +19 -0
- package/dist/infrastructure/dependencies/trace-direct-origins.js.map +1 -0
- package/dist/infrastructure/npm/npm-package-lock-parser.d.ts.map +1 -1
- package/dist/infrastructure/npm/npm-package-lock-parser.js +55 -1
- package/dist/infrastructure/npm/npm-package-lock-parser.js.map +1 -1
- package/dist/infrastructure/pnpm/pnpm-lock-parser.d.ts.map +1 -1
- package/dist/infrastructure/pnpm/pnpm-lock-parser.js +32 -0
- package/dist/infrastructure/pnpm/pnpm-lock-parser.js.map +1 -1
- package/dist/infrastructure/typescript/javascript-symbol-extractor.js +43 -11
- package/dist/infrastructure/typescript/javascript-symbol-extractor.js.map +1 -1
- package/dist/infrastructure/typescript/typescript-code-structure-extractor.d.ts.map +1 -1
- package/dist/infrastructure/typescript/typescript-code-structure-extractor.js +79 -4
- package/dist/infrastructure/typescript/typescript-code-structure-extractor.js.map +1 -1
- package/dist/infrastructure/typescript/typescript-symbol-extractor.d.ts.map +1 -1
- package/dist/infrastructure/typescript/typescript-symbol-extractor.js +62 -1
- package/dist/infrastructure/typescript/typescript-symbol-extractor.js.map +1 -1
- package/dist/infrastructure/yarn/yarn-lock-parser.d.ts.map +1 -1
- package/dist/infrastructure/yarn/yarn-lock-parser.js +51 -0
- package/dist/infrastructure/yarn/yarn-lock-parser.js.map +1 -1
- package/dist/presentation/cli/text-report.d.ts.map +1 -1
- package/dist/presentation/cli/text-report.js +2 -0
- package/dist/presentation/cli/text-report.js.map +1 -1
- package/dist/presentation/html/html-report.d.ts.map +1 -1
- package/dist/presentation/html/html-report.js +147 -10
- package/dist/presentation/html/html-report.js.map +1 -1
- package/package.json +1 -1
package/README.ko.md
CHANGED
|
@@ -26,17 +26,18 @@ LLM 없이도 재현 가능한 분석을 제공하고, AI 설명 기능은 선
|
|
|
26
26
|
```bash
|
|
27
27
|
git clone https://github.com/xx2xxjaeil/intent-patch.git
|
|
28
28
|
cd intent-patch
|
|
29
|
-
npx --yes intentpatch@0.
|
|
29
|
+
npx --yes intentpatch@0.10.0 analyze --base '1cc489b^' --head 1cc489b --format html --output intentpatch-report.html
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
생성된 `intentpatch-report.html`을 로컬 브라우저에서 여세요. 이 변경에서는 나중에 수정된
|
|
33
33
|
공개 API 위험과 중복 코드 후보가 보고됩니다. 판단 근거는 [실제 변경 사례](./docs/real-world-evaluation.md)에
|
|
34
34
|
정리했고, [저장된 HTML 보고서](./docs/examples/intent-input-change.html)도 확인할 수 있습니다.
|
|
35
|
+
[계약 경로를 연결한 예시](./docs/examples/intent-trace.html)에서는 요청-변경 파일 화면을 볼 수 있습니다.
|
|
35
36
|
GitHub에서는 HTML 화면 대신 소스가 보일 수 있습니다.
|
|
36
37
|
|
|
37
38
|
## 빠른 시작
|
|
38
39
|
|
|
39
|
-
Node.js 20 이상과 Git이 설치되어 있어야 합니다. 분석할 저장소에서 npm에 공개된 v0.
|
|
40
|
+
Node.js 20 이상과 Git이 설치되어 있어야 합니다. 분석할 저장소에서 npm에 공개된 v0.10.0을
|
|
40
41
|
전역 설치 없이 실행할 수 있습니다.
|
|
41
42
|
|
|
42
43
|
```bash
|
|
@@ -87,7 +88,7 @@ jobs:
|
|
|
87
88
|
|
|
88
89
|
- name: Analyze pull request
|
|
89
90
|
id: intentpatch
|
|
90
|
-
uses: xx2xxjaeil/intent-patch@v0.
|
|
91
|
+
uses: xx2xxjaeil/intent-patch@v0.10.0
|
|
91
92
|
with:
|
|
92
93
|
fail-on: high
|
|
93
94
|
|
|
@@ -99,7 +100,11 @@ jobs:
|
|
|
99
100
|
path: intentpatch-report
|
|
100
101
|
```
|
|
101
102
|
|
|
102
|
-
Action은 릴리스 버전이나 불변 commit SHA로 고정하는 방식을 권장합니다. v0.
|
|
103
|
+
Action은 릴리스 버전이나 불변 commit SHA로 고정하는 방식을 권장합니다. v0.10.0에는 HTML 보고서의
|
|
104
|
+
요청-변경 파일 연결, 공개 클래스 메서드 호환성 검사, 정적 import로 연결된 변경 테스트 표시,
|
|
105
|
+
메서드와 지역 변수 이름만 다른 중복 구현 탐지가 추가됐습니다. v0.9.2에는 해석 가능한
|
|
106
|
+
lockfile의 루트 의존성 귀속, enum·클래스 메서드 분석, 정적 CommonJS 객체 export 추적,
|
|
107
|
+
그래프 필터·탐색, 외부 평가 사례 확장이 포함됩니다. v0.9.1에는 HTML diff
|
|
103
108
|
미리보기, 확대된 외부 평가와 정적 CommonJS 이름 export 삭제 탐지가 포함됩니다. v0.9.0에는 Yarn
|
|
104
109
|
workspace dependency 분석과 Change Contract를 안전하게 만드는 `init` 명령이 추가되었습니다.
|
|
105
110
|
Yarn 4 lockfile 분석, 소스와 테스트의 명시적 연결, 보고서 필터와 영향 그래프 탐색 개선,
|
|
@@ -163,7 +168,7 @@ LOW 구현체가 하나뿐인 추상화 추가
|
|
|
163
168
|
|
|
164
169
|
실제 커밋을 분석한 [독립 실행형 HTML 예시](./docs/examples/intent-input-change.html),
|
|
165
170
|
[자체 저장소 변경 3건의 사례 연구](./docs/real-world-evaluation.md),
|
|
166
|
-
[외부 저장소 변경
|
|
171
|
+
[외부 저장소 변경 41건·규칙별 판정 50건의 평가 결과](./docs/external-repository-evaluation.md)를 볼 수 있습니다. 저장소를 clone한
|
|
167
172
|
뒤 HTML 파일을 브라우저에서 열어 주세요. GitHub 파일 화면은 렌더링 대신 소스를 보여줄 수
|
|
168
173
|
있습니다.
|
|
169
174
|
|
|
@@ -181,13 +186,14 @@ lockfile 변경, 최상위 TypeScript·JavaScript 심볼과 공개 export, 기
|
|
|
181
186
|
- working tree 분석 시 untracked 파일 포함
|
|
182
187
|
- 터미널용 텍스트 보고서
|
|
183
188
|
- 후속 도구 연동을 위한 JSON 보고서
|
|
184
|
-
- 요약 카드, 경로·심각도 필터, finding, 테스트
|
|
189
|
+
- 요약 카드, 경로·심각도 필터, finding, 테스트 신호, 요청-변경 파일 연결 화면과 탐색 가능한 영향 그래프를 담은 단일 HTML 보고서
|
|
185
190
|
- 외부 CDN이나 JavaScript dependency가 필요 없는 인라인 CSS·SVG 시각화
|
|
186
191
|
- production·development dependency 추가 탐지
|
|
187
192
|
- dependency 삭제, 버전 변경, 섹션 이동 탐지
|
|
188
193
|
- 새 직접 dependency에 정적 JS/TS 참조가 없으면 `low` 심각도의 검토 후보로 표시
|
|
189
194
|
- 잘못된 `package.json`을 예외 대신 근거가 포함된 finding으로 보고
|
|
190
195
|
- npm `package-lock.json` v2/v3의 실제 설치 패키지 추가·삭제·버전 변경 비교
|
|
196
|
+
- npm·pnpm·Yarn lockfile에서 확인 가능한 루트 직접 dependency를 변경 패키지의 원인으로 표시
|
|
191
197
|
- scoped·중첩 설치 경로를 구분하고 로컬 workspace 링크는 제외
|
|
192
198
|
- pnpm `pnpm-lock.yaml` v9의 레지스트리 패키지 추가·삭제·버전 변경 비교(2개 문서 형식 포함)
|
|
193
199
|
- 잘못되었거나 미지원인 lockfile을 누락하지 않고 finding으로 보고
|
|
@@ -198,15 +204,16 @@ lockfile 변경, 최상위 TypeScript·JavaScript 심볼과 공개 export, 기
|
|
|
198
204
|
- finding 심각도(`high`, `medium`, `low`) 집계
|
|
199
205
|
- CI 품질 게이트를 위한 `--fail-on` 종료 코드
|
|
200
206
|
- 설치된 패키지 버전을 확인하는 `--version` 명령
|
|
201
|
-
- `.ts`·`.tsx` 파일의 최상위 함수·클래스·인터페이스·타입
|
|
207
|
+
- `.ts`·`.tsx` 파일의 최상위 함수·클래스·인터페이스·타입 별칭·enum과 이름 있는 클래스 메서드 추출
|
|
202
208
|
- `.js`·`.jsx`·`.mjs`·`.cjs`의 최상위 함수·클래스·변수와 식별 가능한 ESM export 추적
|
|
209
|
+
- 최상위 CommonJS `module.exports = { ... }` 객체의 정적인 이름 추적
|
|
203
210
|
- 심볼 추가·수정·삭제 탐지와 소스 위치 표시
|
|
204
211
|
- 직접 `export`된 선언, 로컬 export 목록과 외부 re-export를 공개 심볼 근거에 보존
|
|
205
212
|
- 공개 심볼 삭제와 `export` 해제를 호환성 위험 `high` finding으로 탐지
|
|
206
|
-
- 공개
|
|
207
|
-
- TypeScript가 현재
|
|
213
|
+
- 공개 함수·클래스 메서드의 기존 호출 시그니처 제거, 공개 인터페이스의 호환성 파괴, 해석 가능한 공개 객체 타입 별칭의 구성원 삭제를 `high` finding으로 탐지
|
|
214
|
+
- TypeScript가 현재 함수·메서드 타입으로 기존 호출을 수용할 수 있다고 확인한 경우 시그니처 변경 경고를 제외
|
|
208
215
|
- 구현이 추가된 기존 overload는 제외하고 기존 overload가 사라진 경우만 함수 계약 변경으로 판정
|
|
209
|
-
-
|
|
216
|
+
- 신규 TypeScript·JavaScript 함수와 TypeScript 클래스 메서드의 동일 구현을 재사용 후보 `medium` finding으로 탐지. 단순 지역 식별자 이름 변경도 비교
|
|
210
217
|
- 신규 인터페이스를 명시적으로 구현하는 클래스가 하나뿐이면 추상화 검토 `low` finding으로 탐지
|
|
211
218
|
- rename 전후 파일 경로를 사용한 심볼 비교
|
|
212
219
|
- 구문 오류가 있는 파일을 누락시키지 않고 분석 불가 근거로 보고
|
|
@@ -219,18 +226,19 @@ lockfile 변경, 최상위 TypeScript·JavaScript 심볼과 공개 export, 기
|
|
|
219
226
|
- 해결하지 못한 상대 import와 읽기·파싱 실패를 분석 근거로 보존
|
|
220
227
|
- working tree의 tracked·untracked 파일 또는 지정한 head ref를 동일한 결과점에서 분석
|
|
221
228
|
- `.intentpatch.json`에 요청 의도, 예상 경로, 허용 경로와 변경량 예산 선언
|
|
229
|
+
- HTML에서 변경 파일을 계약의 예상·허용 경로와 연결하고 범위 밖 파일을 구분
|
|
222
230
|
- CLI 요청 문서 또는 선택적으로 GitHub PR 본문에서 요청 의도를 입력
|
|
223
231
|
- 예상·허용 패턴을 벗어난 변경 파일을 파일별 `medium` finding으로 탐지
|
|
224
232
|
- 변경 파일 수와 측정 라인 예산 초과를 수치 근거가 있는 `low` finding으로 탐지
|
|
225
|
-
- Contract가 지정한 소스·테스트 경로를 분류하고
|
|
233
|
+
- Contract가 지정한 소스·테스트 경로를 분류하고 명시적 매핑, 정적 import 관계 또는 파일명으로 관련 변경 연결
|
|
226
234
|
- 테스트 변경 수와 추가·삭제 수를 별도의 분석 사실로 집계
|
|
227
235
|
- 관련 테스트 변경이 없는 소스 파일을 `medium` finding으로 탐지
|
|
228
236
|
- `*`, `**`, `?` 기반의 저장소 상대 경로 패턴 지원
|
|
229
237
|
- Pull Request·push commit 범위를 자동 판별하는 GitHub Action
|
|
230
238
|
- GitHub Job Summary, workflow annotation, JSON·HTML artifact용 보고서 생성
|
|
231
239
|
|
|
232
|
-
|
|
233
|
-
기능은 구현되지 않았습니다.
|
|
240
|
+
lockfile 귀속은 해석 가능한 루트 dependency 경로로 제한됩니다. 프로젝트 전체 TypeScript
|
|
241
|
+
호환성 검사와 선택형 AI 리뷰 기능은 아직 구현되지 않았습니다.
|
|
234
242
|
|
|
235
243
|
## 상세 사용법
|
|
236
244
|
|
|
@@ -330,11 +338,11 @@ intentpatch init \
|
|
|
330
338
|
- `tests.related`: 소스 파일의 정확한 경로와 관련 테스트 경로 패턴의 명시적 연결.
|
|
331
339
|
해당 소스에는 파일명 기반 자동 연결 대신 이 설정을 적용합니다.
|
|
332
340
|
|
|
333
|
-
명시적 연결이 없으면 테스트
|
|
341
|
+
명시적 연결이 없으면 테스트 연결에 정적 import 관계와 파일명을 사용합니다. 예를 들어 `src/user.ts`는
|
|
334
342
|
`tests/user.test.ts`, `user.spec.ts`, `user.integration.test.ts` 같은 변경과 연결됩니다.
|
|
335
343
|
이름이 다른 통합 테스트는 `tests` 객체 안에
|
|
336
344
|
`"related": { "src/user.ts": ["tests/account-deletion*.test.ts"] }`처럼 지정할 수 있습니다.
|
|
337
|
-
`tests.include`에 속한 변경 테스트만 인정합니다.
|
|
345
|
+
`tests.include`에 속한 변경 테스트만 인정합니다. import 관계는 관련성의 근거이며 실제 테스트 커버리지를 증명하지는 않습니다.
|
|
338
346
|
|
|
339
347
|
기본 파일 대신 별도 계약을 사용하려면 `--config`를 지정합니다. 상대 경로는 `--cwd`를 기준으로
|
|
340
348
|
해석합니다.
|
|
@@ -404,7 +412,7 @@ MEDIUM Change outside expected scope
|
|
|
404
412
|
|
|
405
413
|
MEDIUM Source change without matching test change
|
|
406
414
|
src/payment/billing.ts · tests/missing-related-change
|
|
407
|
-
src/payment/billing.ts changed without a changed test sharing
|
|
415
|
+
src/payment/billing.ts changed without a changed test sharing its basename or statically importing it.
|
|
408
416
|
|
|
409
417
|
MEDIUM New function duplicates existing implementation
|
|
410
418
|
src/user/service.ts · structure/duplicate-implementation
|
|
@@ -465,7 +473,7 @@ npm run check
|
|
|
465
473
|
- 생성한 npm tarball을 임시 프로젝트에 설치하고 실행하는 패키지 통합 테스트
|
|
466
474
|
- 계층 간 의존 방향을 검증하는 아키텍처 테스트
|
|
467
475
|
|
|
468
|
-
외부 저장소의 실제 변경
|
|
476
|
+
외부 저장소의 실제 변경 41건에서 공개 API·의존성·범위·테스트 규칙의 경고를 사람이 검토한 기대 결과와 비교하는
|
|
469
477
|
방법은 [외부 저장소 평가 문서](./docs/external-repository-evaluation.md)에 정리했습니다.
|
|
470
478
|
|
|
471
479
|
프로덕션 빌드만 확인하려면 다음 명령을 사용합니다.
|
|
@@ -482,7 +490,7 @@ npm pack --dry-run
|
|
|
482
490
|
|
|
483
491
|
## 릴리스
|
|
484
492
|
|
|
485
|
-
`v0.
|
|
493
|
+
`v0.10.0`처럼 `package.json` 버전과 일치하는 태그를 기본 브랜치의 커밋에 push하면 릴리스
|
|
486
494
|
워크플로가 다음 작업을 순서대로 수행합니다.
|
|
487
495
|
|
|
488
496
|
1. 태그·버전·기본 브랜치 포함 여부 검증
|
|
@@ -511,6 +519,7 @@ npm provenance가 자동 생성됩니다. 아직 npm에 존재하지 않는 신
|
|
|
511
519
|
- ✅ pnpm workspace manifest의 직접 dependency 변경
|
|
512
520
|
- ✅ Yarn 4 metadata-v8 `yarn.lock` 레지스트리 패키지 변경
|
|
513
521
|
- ✅ Yarn workspace manifest의 직접 dependency 변경
|
|
522
|
+
- ✅ 해석 가능한 npm·pnpm·Yarn lockfile 항목의 루트 직접 dependency 경로 추적
|
|
514
523
|
7. ✅ 직접 export된 공개 심볼 삭제와 export 해제 탐지
|
|
515
524
|
- ✅ JavaScript ESM의 이름 있는 export·default export 삭제 탐지
|
|
516
525
|
8. ✅ 단일 HTML 대시보드와 SVG 기반 dependency 영향 그래프
|
|
@@ -534,10 +543,12 @@ npm provenance가 자동 생성됩니다. 아직 npm에 존재하지 않는 신
|
|
|
534
543
|
소스의 명시적 import·re-export·문자열 `require()`·`import()`를 살펴봅니다. CLI나 설정
|
|
535
544
|
파일에서만 사용하는 경우는 놓칠 수 있습니다. 파일 읽기·파싱이 불완전하거나 계산된 module
|
|
536
545
|
load가 있거나, 스캔한 소스가 없거나, 소스 파일이 5,000개를 넘으면 후보를 보고하지 않습니다.
|
|
537
|
-
- npm `package-lock.json` v2/v3은 설치 경로와 버전을 비교합니다.
|
|
538
|
-
|
|
546
|
+
- npm `package-lock.json` v2/v3은 설치 경로와 버전을 비교합니다. 명시된 dependency와 npm 설치
|
|
547
|
+
경로를 따라 루트 직접 dependency를 추적하지만, 해석할 수 없는 경로나 workspace 링크는 귀속하지
|
|
548
|
+
않습니다. integrity hash와 취약점 정보는 분석하지 않습니다.
|
|
539
549
|
- pnpm `pnpm-lock.yaml` v9은 프로젝트 문서의 레지스트리 패키지 ID와 버전을 비교합니다.
|
|
540
|
-
|
|
550
|
+
정확히 일치하는 snapshot ID와 레지스트리 참조를 따라 루트 원인을 추적합니다. integrity만 바뀐
|
|
551
|
+
경우, 로컬·Git 패키지와 모호한 peer 변형은 추적하지 않습니다.
|
|
541
552
|
루트의 직접 dependency 여부는 루트 importer를 기준으로 표시합니다.
|
|
542
553
|
- npm·Yarn workspace 판별은 루트의 `workspaces` 배열과 명시 경로, `*`·`**`·`?` 패턴을 지원합니다.
|
|
543
554
|
부정·중괄호·문자 클래스 패턴은 미지원 finding으로 보고합니다.
|
|
@@ -548,14 +559,16 @@ npm provenance가 자동 생성됩니다. 아직 npm에 존재하지 않는 신
|
|
|
548
559
|
우선합니다. 그 외 glob 문법과 catalog는 해석하지 않습니다.
|
|
549
560
|
- Yarn 4 metadata-v8 `yarn.lock`의 레지스트리 패키지 해석 결과와 버전은 비교합니다.
|
|
550
561
|
Yarn Classic·다른 metadata 버전은 미지원으로 보고합니다. workspace·patch·file·Git·virtual
|
|
551
|
-
해석
|
|
562
|
+
해석 결과와 checksum만 바뀐 경우는 분석하지 않습니다. 정확히 일치하는 레지스트리 descriptor만
|
|
563
|
+
루트 dependency에 귀속하며, 해석할 수 없는 경로는 원인을 단정하지 않습니다. 런타임에서의 실제
|
|
552
564
|
dependency 사용 여부도 판정하지 않습니다.
|
|
553
565
|
- working tree의 `package-lock.json`·`pnpm-lock.yaml`·`yarn.lock`은 10 MiB,
|
|
554
566
|
그 외 텍스트 snapshot은 1 MiB로 제한합니다.
|
|
555
|
-
- TypeScript 심볼 분석은 `.ts`와 `.tsx`의 이름이 있는 최상위
|
|
556
|
-
|
|
567
|
+
- TypeScript 심볼 분석은 `.ts`와 `.tsx`의 이름이 있는 최상위 함수·클래스·인터페이스·타입
|
|
568
|
+
별칭·enum과 정적 이름의 클래스 메서드를 지원합니다.
|
|
557
569
|
- JavaScript 심볼 분석은 `.js`·`.jsx`·`.mjs`·`.cjs`의 최상위 함수·클래스·변수 및 식별 가능한
|
|
558
|
-
ESM export
|
|
570
|
+
ESM export, 최상위의 정적 `exports.name =`·`module.exports.name =` 할당과 정적
|
|
571
|
+
`module.exports = { ... }` 객체의 이름을 추적합니다.
|
|
559
572
|
- TypeScript 공개 API 분석은 이름이 있는 최상위 함수·인터페이스와 객체 리터럴, 같은 파일의
|
|
560
573
|
비제네릭 별칭·교집합으로 구성된 공개 타입 별칭의 구성원 삭제를 지원합니다. 로컬
|
|
561
574
|
`export { name }`, 외부 `export { name } from`, `export * from`은 export 근거로 추적합니다.
|
|
@@ -564,7 +577,7 @@ npm provenance가 자동 생성됩니다. 아직 npm에 존재하지 않는 신
|
|
|
564
577
|
진입점과 상대 경로 re-export가 도달하는 파일에만 공개 API 경고를 냅니다. 이는 파일 단위
|
|
565
578
|
근사치로, 이름 있는 re-export가 파일의 일부 심볼만 노출하는 경우도 있습니다. 생성된
|
|
566
579
|
진입점이나 해석 불가능한 경로에서는 비공개라고 단정하지 않고 기존 경고를 유지합니다.
|
|
567
|
-
CommonJS 객체 전체 대입·동적 속성·중첩 대입, 클래스 계약, 제네릭 별칭 인스턴스화, 합집합, 파일 간 타입 참조와
|
|
580
|
+
동적으로 계산되는 CommonJS 객체 전체 대입·동적 속성·중첩 대입, 클래스 계약, 제네릭 별칭 인스턴스화, 합집합, 파일 간 타입 참조와
|
|
568
581
|
완전한 타입 할당 가능성은 해석하지 않습니다. 지원하지
|
|
569
582
|
않는 타입 별칭 형태에서는 구성원 삭제 finding을 내지 않습니다.
|
|
570
583
|
- 함수 호환성은 먼저 기록된 시그니처를 비교하고, 외부 참조 없이 해석할 수 있는 명시적 타입은
|
|
@@ -575,12 +588,13 @@ npm provenance가 자동 생성됩니다. 아직 npm에 존재하지 않는 신
|
|
|
575
588
|
- 인터페이스 속성 타입은 기존 타입이 같거나 지원하는 객체 리터럴 안에 선택 필드만 추가된
|
|
576
589
|
경우(`Readonly` 포함)에만 호환된다고 판단합니다. 다른 중첩 타입 변경은 호환을 단정하지
|
|
577
590
|
않고 검토 경고를 유지합니다.
|
|
578
|
-
- 중복 구현 후보는
|
|
579
|
-
|
|
580
|
-
|
|
591
|
+
- 중복 구현 후보는 새 최상위 함수 또는 이름 있는 TypeScript 클래스 메서드와 기존 함수·메서드의
|
|
592
|
+
본문이 12토큰 이상일 때 비교합니다. 공백·주석을 뺀 토큰 일치와 단순 매개변수·지역 변수 이름
|
|
593
|
+
정규화를 지원합니다. 중첩 스코프·구조 분해·다른 외부 호출과 의미만 같은 별도 구현은 추정하지 않습니다.
|
|
581
594
|
- 단일 구현 추상화는 새 인터페이스를 `implements`로 명시한 이름 있는 클래스가 정확히 하나일 때만
|
|
582
595
|
보고합니다. TypeScript의 구조적 구현, factory 반환 타입과 런타임 등록은 계산하지 않습니다.
|
|
583
|
-
- 메서드, TypeScript 변수
|
|
596
|
+
- 계산된 이름의 메서드, TypeScript 변수 선언과 중첩 선언은 아직 심볼 분석 대상이 아닙니다.
|
|
597
|
+
이름 있는 공개 메서드는 공개 함수와 같은 보수적인 시그니처 호환성 검사를 사용합니다.
|
|
584
598
|
- 선언 내부의 포맷이나 주석 변경도 심볼 수정으로 집계될 수 있습니다.
|
|
585
599
|
- 영향 분석은 JS/TS 소스의 정적 `import`, side-effect import, `export ... from`,
|
|
586
600
|
`import = require()` 및 문자열 `require()`·`import()`를 대상으로 합니다. 로컬 별칭은 가장 가까운 `tsconfig.json` 또는
|
|
@@ -603,12 +617,14 @@ npm provenance가 자동 생성됩니다. 아직 npm에 존재하지 않는 신
|
|
|
603
617
|
0줄이라고 간주하지 않지만, 해당 파일의 크기를 라인 예산에 포함하지도 않습니다.
|
|
604
618
|
- 테스트 분석은 실행 결과나 코드 커버리지를 측정하지 않고 Contract에 지정된 변경 파일만
|
|
605
619
|
비교합니다.
|
|
606
|
-
- 관련 테스트는
|
|
607
|
-
선언하면
|
|
608
|
-
|
|
620
|
+
- 관련 변경 테스트는 정적 import 경로 또는 파일명으로 연결하지만 정확한 소스 경로에
|
|
621
|
+
`tests.related`를 선언하면 그 매핑을 우선합니다. 삭제된 소스는 현재 import 그래프에 없으므로
|
|
622
|
+
명시적 매핑이나 파일명을 사용합니다. 이는 테스트 실행이나 실제 커버리지 측정이 아닙니다.
|
|
623
|
+
- HTML 요청-변경 연결 화면은 명시된 Change Contract 경로와 변경 파일의 관계만 보여줍니다.
|
|
624
|
+
자연어 요청만으로 예상 경로나 기능 영역을 추론하지 않습니다.
|
|
609
625
|
- HTML 영향 그래프는 결정적인 두 열 레이아웃이며 노드를 누르면 보고서의 관련 행으로 이동합니다.
|
|
610
|
-
경로·심각도 필터는
|
|
611
|
-
|
|
626
|
+
경로·심각도 필터는 그래프의 노드와 연결선에도 적용됩니다. 버튼·키보드로 확대·이동하고 드래그로
|
|
627
|
+
이동할 수 있습니다. 필터는 노드를 숨길 뿐 레이아웃을 재배치하지 않습니다.
|
|
612
628
|
|
|
613
629
|
## 라이선스
|
|
614
630
|
|
package/README.md
CHANGED
|
@@ -23,18 +23,19 @@ Clone the repository, then run one analysis command against a real change in its
|
|
|
23
23
|
```bash
|
|
24
24
|
git clone https://github.com/xx2xxjaeil/intent-patch.git
|
|
25
25
|
cd intent-patch
|
|
26
|
-
npx --yes intentpatch@0.
|
|
26
|
+
npx --yes intentpatch@0.10.0 analyze --base '1cc489b^' --head 1cc489b --format html --output intentpatch-report.html
|
|
27
27
|
```
|
|
28
28
|
|
|
29
29
|
Open `intentpatch-report.html` locally. This case reports a public-API risk and a duplicate-code
|
|
30
30
|
candidate that were later fixed; [the case study](./docs/real-world-evaluation.md) explains the
|
|
31
31
|
review decisions. The [checked-in HTML report](./docs/examples/intent-input-change.html) is the
|
|
32
|
-
same real-change example, not a mockup.
|
|
32
|
+
same real-change example, not a mockup. A [contract-based example](./docs/examples/intent-trace.html)
|
|
33
|
+
shows the request-to-changed-files map. GitHub may show the HTML source rather than render it.
|
|
33
34
|
|
|
34
35
|
## Quick start
|
|
35
36
|
|
|
36
37
|
IntentPatch requires Node.js 20 or later and Git. From the repository you want to review, run
|
|
37
|
-
the published v0.
|
|
38
|
+
the published v0.10.0 CLI without installing it globally:
|
|
38
39
|
|
|
39
40
|
```bash
|
|
40
41
|
cd /path/to/repository
|
|
@@ -81,7 +82,7 @@ jobs:
|
|
|
81
82
|
|
|
82
83
|
- name: Analyze pull request
|
|
83
84
|
id: intentpatch
|
|
84
|
-
uses: xx2xxjaeil/intent-patch@v0.
|
|
85
|
+
uses: xx2xxjaeil/intent-patch@v0.10.0
|
|
85
86
|
with:
|
|
86
87
|
fail-on: high
|
|
87
88
|
|
|
@@ -93,7 +94,11 @@ jobs:
|
|
|
93
94
|
path: intentpatch-report
|
|
94
95
|
```
|
|
95
96
|
|
|
96
|
-
Pin the action to a released version or an immutable commit SHA. v0.
|
|
97
|
+
Pin the action to a released version or an immutable commit SHA. v0.10.0 adds a request-to-files
|
|
98
|
+
map in HTML reports, exported class method compatibility checks, static import links to changed
|
|
99
|
+
tests, and duplicate detection for methods and renamed local identifiers. v0.9.2 added root dependency
|
|
100
|
+
attribution for resolvable lockfile entries, enum and class-method analysis, static CommonJS
|
|
101
|
+
object exports, graph filtering and navigation, and more external evaluation cases. v0.9.1 added HTML diff previews,
|
|
97
102
|
expanded external evaluation, and static CommonJS named-export removal checks. v0.9.0 added Yarn workspace
|
|
98
103
|
dependency analysis and a safe `init` command for creating a Change Contract. It also includes
|
|
99
104
|
Yarn 4 lockfile analysis, explicit source-to-test mappings, report filters, improved impact-graph
|
|
@@ -158,7 +163,7 @@ Every finding includes the relevant file, a stable rule ID, and evidence for the
|
|
|
158
163
|
For reports generated from actual commits, see the
|
|
159
164
|
[standalone HTML example](./docs/examples/intent-input-change.html), the
|
|
160
165
|
[three-case self-repository study](./docs/real-world-evaluation.md), and the
|
|
161
|
-
[external evaluation of
|
|
166
|
+
[external evaluation of 41 changes and 50 rule checks](./docs/external-repository-evaluation.md). After cloning,
|
|
162
167
|
open the HTML file locally in a browser; GitHub may show its source rather than render it.
|
|
163
168
|
|
|
164
169
|
## Implemented capabilities
|
|
@@ -176,7 +181,7 @@ implementations, single-implementation abstractions, import-graph impact, and re
|
|
|
176
181
|
- Distinguish binary files.
|
|
177
182
|
- Include untracked files in working-tree analysis.
|
|
178
183
|
- Render terminal-friendly text and machine-readable JSON reports.
|
|
179
|
-
- Generate a standalone HTML report containing summary cards, path/severity filters, findings, test signals, and a navigable impact graph.
|
|
184
|
+
- Generate a standalone HTML report containing summary cards, path/severity filters, findings, test signals, a request-to-changed-files map, and a navigable impact graph.
|
|
180
185
|
- Render the visualization with inline CSS and SVG, without a CDN or runtime JavaScript dependency.
|
|
181
186
|
- Aggregate findings by `high`, `medium`, and `low` severity.
|
|
182
187
|
- Return a CI-friendly exit code through `--fail-on`.
|
|
@@ -189,6 +194,7 @@ implementations, single-implementation abstractions, import-graph impact, and re
|
|
|
189
194
|
- Flag a newly added direct dependency with no static JS/TS import as a low-severity review candidate.
|
|
190
195
|
- Report malformed `package.json` files as evidence-backed findings instead of crashing.
|
|
191
196
|
- Compare resolved package additions, removals, and version changes in npm `package-lock.json` v2/v3.
|
|
197
|
+
- Show confirmed root direct dependencies that lead to a changed npm, pnpm, or Yarn lockfile package.
|
|
192
198
|
- Keep scoped and nested installation paths distinct, and exclude local workspace links.
|
|
193
199
|
- Compare resolved registry package changes in pnpm `pnpm-lock.yaml` v9, including two-document lockfiles.
|
|
194
200
|
- Report malformed or unsupported lockfiles as findings rather than silently skipping them.
|
|
@@ -196,16 +202,17 @@ implementations, single-implementation abstractions, import-graph impact, and re
|
|
|
196
202
|
- Attribute changed Yarn workspace manifests using the same root `workspaces` patterns, with Yarn provenance when `packageManager` or `yarn.lock` identifies Yarn.
|
|
197
203
|
- Analyze changed pnpm workspace manifests selected by `pnpm-workspace.yaml`, including exclusion patterns.
|
|
198
204
|
- Report changes to workspace patterns and manifest moves into or out of a configured workspace.
|
|
199
|
-
- Extract top-level named functions, classes, interfaces,
|
|
205
|
+
- Extract top-level named functions, classes, interfaces, type aliases, and enums, plus named class methods from `.ts` and `.tsx` files.
|
|
200
206
|
- Track named top-level JavaScript/JSX functions, classes, variables, ESM export aliases, and default exports without inferring type compatibility.
|
|
207
|
+
- Track static named properties in a top-level CommonJS `module.exports = { ... }` object.
|
|
201
208
|
- Detect symbol additions, modifications, and removals with source locations.
|
|
202
209
|
- Preserve direct exports, local export lists, and external re-exports as public-symbol evidence.
|
|
203
210
|
- When the previous package `exports` resolve to maintained source files, limit public API warnings to those entrypoints and their re-exported modules.
|
|
204
211
|
- Report removed public symbols and removed exports as high-severity compatibility risks.
|
|
205
|
-
- Detect removed public function call signatures, incompatible public interface changes, and removed members of resolvable public object type aliases.
|
|
206
|
-
- Suppress a public function signature warning when TypeScript confirms that the current callable type still accepts the previous calls.
|
|
212
|
+
- Detect removed public function and class-method call signatures, incompatible public interface changes, and removed members of resolvable public object type aliases.
|
|
213
|
+
- Suppress a public function or method signature warning when TypeScript confirms that the current callable type still accepts the previous calls.
|
|
207
214
|
- Exclude overloads that only gain an implementation while reporting previously available overloads that disappear.
|
|
208
|
-
- Find newly added functions whose
|
|
215
|
+
- Find newly added TypeScript/JavaScript functions and TypeScript class methods whose implementation matches an existing callable, including safe local-identifier renames.
|
|
209
216
|
- Report a newly added interface when exactly one class explicitly implements it.
|
|
210
217
|
- Compare symbols correctly across renamed files.
|
|
211
218
|
- Preserve syntax errors as analysis evidence instead of silently dropping a file.
|
|
@@ -221,15 +228,17 @@ implementations, single-implementation abstractions, import-graph impact, and re
|
|
|
221
228
|
- Build the graph at the same result point as the diff: the working tree or the selected head ref.
|
|
222
229
|
- Include importers that depended on a deleted module in the previous revision, with a distinct previous-import marker.
|
|
223
230
|
- Read intent, expected paths, allowed paths, and change budgets from `.intentpatch.json`.
|
|
231
|
+
- Show which changed files match expected or allowed contract patterns, and which fall outside them, in the HTML request map.
|
|
224
232
|
- Accept a request text/Markdown file through the CLI, or opt in to using the PR body in the GitHub Action.
|
|
225
233
|
- Report each file outside expected and allowed patterns as a medium-severity finding.
|
|
226
234
|
- Report file-count and measurable-line budget overruns with numeric evidence.
|
|
227
|
-
- Classify source and test paths declared by the contract and connect related changes by
|
|
235
|
+
- Classify source and test paths declared by the contract and connect related changes by explicit mapping, static import reachability, or basename.
|
|
228
236
|
- Report test file counts and added or deleted tests as separate facts.
|
|
229
237
|
- Report source files without a related test change as medium-severity findings.
|
|
230
238
|
- Support repository-relative `*`, `**`, and `?` path patterns.
|
|
231
239
|
|
|
232
|
-
|
|
240
|
+
Lockfile attribution is limited to resolvable root dependency paths. Full-project TypeScript
|
|
241
|
+
compatibility checking and optional AI review are not implemented yet.
|
|
233
242
|
|
|
234
243
|
## CLI usage
|
|
235
244
|
|
|
@@ -325,7 +334,7 @@ Create `.intentpatch.json` in the repository being analyzed and declare the expe
|
|
|
325
334
|
- `tests.related`: optional exact source paths mapped to related test path patterns; an explicit
|
|
326
335
|
mapping overrides basename matching for that source.
|
|
327
336
|
|
|
328
|
-
Without an explicit mapping, test matching uses basenames for deterministic results. For example,
|
|
337
|
+
Without an explicit mapping, test matching uses the static import graph and basenames for deterministic results. For example,
|
|
329
338
|
`src/user.ts` can match changed files such as `tests/user.test.ts`, `user.spec.ts`, or
|
|
330
339
|
`user.integration.test.ts`. For a differently named integration test, add a mapping:
|
|
331
340
|
|
|
@@ -333,7 +342,7 @@ Without an explicit mapping, test matching uses basenames for deterministic resu
|
|
|
333
342
|
"related": { "src/user.ts": ["tests/account-deletion*.test.ts"] }
|
|
334
343
|
```
|
|
335
344
|
|
|
336
|
-
Place `related` inside the `tests` object. Only changed test files matching `tests.include` count.
|
|
345
|
+
Place `related` inside the `tests` object. Only changed test files matching `tests.include` count. Static import reachability is evidence of a relationship, not proof of test coverage.
|
|
337
346
|
|
|
338
347
|
Use `--config` to select another contract. Relative paths are resolved from `--cwd`:
|
|
339
348
|
|
|
@@ -402,7 +411,7 @@ MEDIUM Change outside expected scope
|
|
|
402
411
|
|
|
403
412
|
MEDIUM Source change without matching test change
|
|
404
413
|
src/payment/billing.ts · tests/missing-related-change
|
|
405
|
-
src/payment/billing.ts changed without a changed test sharing
|
|
414
|
+
src/payment/billing.ts changed without a changed test sharing its basename or statically importing it.
|
|
406
415
|
|
|
407
416
|
MEDIUM New function duplicates existing implementation
|
|
408
417
|
src/user/service.ts · structure/duplicate-implementation
|
|
@@ -462,7 +471,7 @@ This command runs:
|
|
|
462
471
|
- architecture tests that enforce dependency direction;
|
|
463
472
|
- a reproducibility check for the bundled GitHub Action.
|
|
464
473
|
|
|
465
|
-
For a reproducible check of
|
|
474
|
+
For a reproducible check of 50 rule decisions across 41 reviewed changes in external
|
|
466
475
|
repositories, see the [external evaluation](./docs/external-repository-evaluation.md).
|
|
467
476
|
|
|
468
477
|
Run only the production build with:
|
|
@@ -479,7 +488,7 @@ npm pack --dry-run
|
|
|
479
488
|
|
|
480
489
|
## Release process
|
|
481
490
|
|
|
482
|
-
Pushing a tag such as `v0.
|
|
491
|
+
Pushing a tag such as `v0.10.0`, matching the version in `package.json`, from a commit contained in the default branch triggers the release workflow:
|
|
483
492
|
|
|
484
493
|
1. Validate the tag, package version, and default-branch ancestry.
|
|
485
494
|
2. Run the full quality suite and inspect the npm package with a dry run.
|
|
@@ -504,6 +513,7 @@ No long-lived npm token is stored as a GitHub secret. Public packages published
|
|
|
504
513
|
- ✅ pnpm workspace manifest dependency changes
|
|
505
514
|
- ✅ Yarn 4 metadata-v8 `yarn.lock` resolved registry package changes
|
|
506
515
|
- ✅ Yarn workspace manifest dependency changes
|
|
516
|
+
- ✅ Root direct dependency paths for resolvable npm, pnpm, and Yarn lockfile entries
|
|
507
517
|
7. ✅ Detection of removed public exports
|
|
508
518
|
- ✅ Named and default ESM exports in JavaScript, without inferred type compatibility
|
|
509
519
|
8. ✅ Standalone HTML dashboard and SVG dependency-impact graph
|
|
@@ -523,24 +533,25 @@ No long-lived npm token is stored as a GitHub secret. Public packages published
|
|
|
523
533
|
- Line counts are skipped for untracked files larger than 10 MiB.
|
|
524
534
|
- Direct dependency declarations are analyzed from `dependencies` and `devDependencies` in the root `package.json` and changed npm/pnpm/Yarn workspace manifests.
|
|
525
535
|
- The no-static-reference finding is a review candidate, not proof that a package is unused. It checks explicit JS/TS imports, re-exports, literal `require()` and `import()` across maintained source files; CLI-only/configuration usage may not appear. It does not emit a candidate if source reads or parsing are incomplete, a computed module load exists, no source was scanned, or more than 5,000 source files are present.
|
|
526
|
-
- npm `package-lock.json` v2/v3 analysis compares installed package paths and versions
|
|
527
|
-
- pnpm `pnpm-lock.yaml` v9 analysis compares registry package IDs and versions in the project document. It ignores integrity-only edits, local/Git packages,
|
|
536
|
+
- npm `package-lock.json` v2/v3 analysis compares installed package paths and versions. Root attribution follows declared dependencies through npm installation paths; an unresolved or workspace-linked path remains unattributed. Integrity hashes and vulnerability data are not analyzed.
|
|
537
|
+
- pnpm `pnpm-lock.yaml` v9 analysis compares registry package IDs and versions in the project document. Root attribution follows exact snapshot IDs and registry references. It ignores integrity-only edits, local/Git packages, and ambiguous peer variants. Root-direct evidence comes from the root importer only.
|
|
528
538
|
- npm and Yarn workspace detection supports the root `workspaces` array with explicit paths and `*`, `**`, and `?` globs. Negation, brace, and character-class patterns are reported as unsupported. Yarn is identified by the root `packageManager` field or `yarn.lock`; when pnpm config also exists, pnpm takes precedence.
|
|
529
539
|
- 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.
|
|
530
540
|
- Yarn 4 `yarn.lock` metadata-v8 analysis compares registry package resolutions and versions.
|
|
531
541
|
Yarn Classic and other metadata versions are reported as unsupported. Workspace, patch, file,
|
|
532
|
-
Git, and virtual resolutions
|
|
542
|
+
Git, and virtual resolutions and checksum-only changes are not analyzed. Root attribution follows
|
|
543
|
+
exact registry descriptors; unresolved or ambiguous paths remain unattributed.
|
|
533
544
|
Runtime dependency usage is not established.
|
|
534
545
|
- 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.
|
|
535
|
-
- TypeScript symbol analysis supports named top-level functions, classes, interfaces,
|
|
536
|
-
- 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 and static top-level `exports.name =` / `module.exports.name =` 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.
|
|
546
|
+
- TypeScript symbol analysis supports named top-level functions, classes, interfaces, type aliases, enums, and statically named class methods in `.ts` and `.tsx` files. JavaScript symbol analysis supports named top-level functions, classes, variables, and identifiable ESM and CommonJS exports in `.js`, `.jsx`, `.mjs`, and `.cjs` files.
|
|
547
|
+
- 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 and static top-level `exports.name =` / `module.exports.name =` 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. Static CommonJS object literals expose named properties, while dynamic whole-object assignments leave those names uncertain. Computed keys, nested assignments, full 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.
|
|
537
548
|
- 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.
|
|
538
549
|
- Interface property compatibility recognizes unchanged types and optional fields added inside
|
|
539
550
|
supported object literals, including `Readonly` wrappers. Other nested type transformations
|
|
540
551
|
remain unverified rather than being treated as compatible.
|
|
541
|
-
- Duplicate candidates require a newly added top-level function and an existing
|
|
552
|
+
- Duplicate candidates require a newly added top-level function or named TypeScript class method and an existing function or method with at least 12 body tokens. Exact tokens match after comments and whitespace are removed; a second comparison normalizes simple parameter and local-variable names. Nested scopes, destructuring, different external calls or property names, and semantically equivalent but structurally different implementations are not inferred.
|
|
542
553
|
- 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.
|
|
543
|
-
-
|
|
554
|
+
- Computed class methods, TypeScript variable declarations, and nested declarations are not included in symbol analysis. Named public method signatures use the same conservative, self-contained compatibility check as public functions.
|
|
544
555
|
- Formatting or comment changes inside a declaration can be counted as symbol modifications.
|
|
545
556
|
- Impact analysis covers static `import`, side-effect imports, `export ... from`, `import = require()`, and string-literal `require()` and `import()` in JS/TS source files. Local aliases use the nearest `tsconfig.json` or
|
|
546
557
|
`jsconfig.json`, with relative `extends` support.
|
|
@@ -553,11 +564,11 @@ No long-lived npm token is stored as a GitHub secret. Public packages published
|
|
|
553
564
|
- Path patterns support only repository-relative `*`, `**`, and `?`; negation and brace expansion are not supported.
|
|
554
565
|
- `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.
|
|
555
566
|
- Test analysis compares only the changed paths declared in the contract; it does not execute tests or measure coverage.
|
|
556
|
-
- Related tests are matched by basename unless an exact source path has a `tests.related`
|
|
557
|
-
|
|
567
|
+
- Related changed tests are matched by static import reachability or basename unless an exact source path has a `tests.related` mapping. Deleted modules rely on explicit mappings or basenames because the test graph describes the current snapshot. This is a relationship signal, not measured coverage; tests are not executed.
|
|
568
|
+
- The HTML request map connects changed paths to explicit Change Contract patterns. It does not infer feature areas or expected paths from natural-language intent.
|
|
558
569
|
- The HTML impact graph uses a deterministic two-column layout. Nodes link to report rows; path
|
|
559
|
-
search and severity filters narrow
|
|
560
|
-
|
|
570
|
+
search and severity filters also narrow graph nodes and edges. Buttons and keyboard controls zoom
|
|
571
|
+
and pan the view, and pointer dragging pans it. Filtering hides nodes without changing the layout.
|
|
561
572
|
|
|
562
573
|
## License
|
|
563
574
|
|
|
@@ -2,6 +2,7 @@ import type { ChangeSet } from "../../domain/change.js";
|
|
|
2
2
|
import type { ChangeContract } from "../../domain/change-contract.js";
|
|
3
3
|
import type { CodeStructureAnalysis } from "../../domain/code-structure.js";
|
|
4
4
|
import type { Finding } from "../../domain/finding.js";
|
|
5
|
+
import type { ImpactAnalysis } from "../../domain/impact.js";
|
|
5
6
|
import type { AnalysisTarget } from "../../domain/report.js";
|
|
6
7
|
import type { SymbolChangeSet } from "../../domain/symbol-change.js";
|
|
7
8
|
import type { TestChangeAnalysis } from "../../domain/test-change.js";
|
|
@@ -11,6 +12,7 @@ export interface AnalysisContext {
|
|
|
11
12
|
readonly contract?: ChangeContract;
|
|
12
13
|
readonly testChanges?: TestChangeAnalysis;
|
|
13
14
|
readonly symbolChanges?: SymbolChangeSet;
|
|
15
|
+
readonly impact?: ImpactAnalysis;
|
|
14
16
|
readonly codeStructure?: CodeStructureAnalysis;
|
|
15
17
|
}
|
|
16
18
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analysis-rule.d.ts","sourceRoot":"","sources":["../../../src/application/ports/analysis-rule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAC5E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAEtE,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC;IAChC,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAC;IAC5B,QAAQ,CAAC,QAAQ,CAAC,EAAE,cAAc,CAAC;IACnC,QAAQ,CAAC,WAAW,CAAC,EAAE,kBAAkB,CAAC;IAC1C,QAAQ,CAAC,aAAa,CAAC,EAAE,eAAe,CAAC;IACzC,QAAQ,CAAC,aAAa,CAAC,EAAE,qBAAqB,CAAC;CAChD;AAED;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B,OAAO,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,SAAS,OAAO,EAAE,CAAC,CAAC;CAChE"}
|
|
1
|
+
{"version":3,"file":"analysis-rule.d.ts","sourceRoot":"","sources":["../../../src/application/ports/analysis-rule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAC5E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAEtE,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC;IAChC,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAC;IAC5B,QAAQ,CAAC,QAAQ,CAAC,EAAE,cAAc,CAAC;IACnC,QAAQ,CAAC,WAAW,CAAC,EAAE,kBAAkB,CAAC;IAC1C,QAAQ,CAAC,aAAa,CAAC,EAAE,eAAe,CAAC;IACzC,QAAQ,CAAC,MAAM,CAAC,EAAE,cAAc,CAAC;IACjC,QAAQ,CAAC,aAAa,CAAC,EAAE,qBAAqB,CAAC;CAChD;AAED;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B,OAAO,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,SAAS,OAAO,EAAE,CAAC,CAAC;CAChE"}
|
|
@@ -2,7 +2,9 @@ export interface FunctionImplementationFact {
|
|
|
2
2
|
readonly name: string;
|
|
3
3
|
readonly line: number;
|
|
4
4
|
readonly implementationFingerprint: string;
|
|
5
|
+
readonly structuralFingerprint?: string;
|
|
5
6
|
readonly tokenCount: number;
|
|
7
|
+
readonly symbolKind?: "method";
|
|
6
8
|
}
|
|
7
9
|
export interface InterfaceDeclarationFact {
|
|
8
10
|
readonly name: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"code-structure-extractor.d.ts","sourceRoot":"","sources":["../../../src/application/ports/code-structure-extractor.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,yBAAyB,EAAE,MAAM,CAAC;IAC3C,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"code-structure-extractor.d.ts","sourceRoot":"","sources":["../../../src/application/ports/code-structure-extractor.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,yBAAyB,EAAE,MAAM,CAAC;IAC3C,QAAQ,CAAC,qBAAqB,CAAC,EAAE,MAAM,CAAC;IACxC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,UAAU,CAAC,EAAE,QAAQ,CAAC;CAChC;AAED,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,gBAAgB,EAAE,SAAS,MAAM,EAAE,CAAC;CAC9C;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,SAAS,EAAE,SAAS,0BAA0B,EAAE,CAAC;IAC1D,QAAQ,CAAC,UAAU,EAAE,SAAS,wBAAwB,EAAE,CAAC;IACzD,QAAQ,CAAC,OAAO,EAAE,SAAS,uBAAuB,EAAE,CAAC;CACtD;AAED,MAAM,MAAM,6BAA6B,GACrC,QAAQ,CAAC;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,KAAK,EAAE,kBAAkB,CAAA;CAAE,CAAC,GACxD,QAAQ,CAAC;IAAE,IAAI,EAAE,aAAa,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAEtD,8CAA8C;AAC9C,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IAChC,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,6BAA6B,CAAC;CACtE"}
|
|
@@ -4,6 +4,8 @@ export interface LockedPackage {
|
|
|
4
4
|
readonly name: string;
|
|
5
5
|
readonly version: string;
|
|
6
6
|
readonly rootDirect: boolean;
|
|
7
|
+
/** 확인된 루트 직접 의존성에서 이 설치 항목까지 이어지는 경로의 시작점이다. */
|
|
8
|
+
readonly introducedBy?: readonly string[];
|
|
7
9
|
}
|
|
8
10
|
export type PackageLockParseResult = Readonly<{
|
|
9
11
|
ok: true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package-lock-parser.d.ts","sourceRoot":"","sources":["../../../src/application/ports/package-lock-parser.ts"],"names":[],"mappings":"AAAA,kDAAkD;AAClD,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"package-lock-parser.d.ts","sourceRoot":"","sources":["../../../src/application/ports/package-lock-parser.ts"],"names":[],"mappings":"AAAA,kDAAkD;AAClD,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAC7B,gDAAgD;IAChD,QAAQ,CAAC,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC3C;AAED,MAAM,MAAM,sBAAsB,GAC9B,QAAQ,CAAC;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,QAAQ,EAAE,WAAW,CAAC,MAAM,EAAE,aAAa,CAAC,CAAA;CAAE,CAAC,GACpE,QAAQ,CAAC;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,IAAI,EAAE,SAAS,GAAG,aAAa,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAE7E,2CAA2C;AAC3C,MAAM,WAAW,iBAAiB;IAChC,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,sBAAsB,CAAC;CAChD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pnpm-lock-parser.d.ts","sourceRoot":"","sources":["../../../src/application/ports/pnpm-lock-parser.ts"],"names":[],"mappings":"AAAA,gDAAgD;AAChD,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;
|
|
1
|
+
{"version":3,"file":"pnpm-lock-parser.d.ts","sourceRoot":"","sources":["../../../src/application/ports/pnpm-lock-parser.ts"],"names":[],"mappings":"AAAA,gDAAgD;AAChD,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;IAC7B,QAAQ,CAAC,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC3C;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,0CAA0C;AAC1C,MAAM,WAAW,cAAc;IAC7B,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,mBAAmB,CAAC;CAC7C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"source-symbol-extractor.d.ts","sourceRoot":"","sources":["../../../src/application/ports/source-symbol-extractor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAElE,MAAM,MAAM,sBAAsB,GAC9B,QAAQ,CAAC;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,OAAO,EAAE,SAAS,YAAY,EAAE,CAAA;CAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"source-symbol-extractor.d.ts","sourceRoot":"","sources":["../../../src/application/ports/source-symbol-extractor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAElE,MAAM,MAAM,sBAAsB,GAC9B,QAAQ,CAAC;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,OAAO,EAAE,SAAS,YAAY,EAAE,CAAC;IAAC,qBAAqB,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC,GAChG,QAAQ,CAAC;IAAE,IAAI,EAAE,aAAa,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAEtD,uDAAuD;AACvD,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IAChC,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,sBAAsB,CAAC;CAC/D"}
|
|
@@ -1 +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;
|
|
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;IAC7B,QAAQ,CAAC,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC3C;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"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Finding } from "../../domain/finding.js";
|
|
2
2
|
import type { AnalysisContext, AnalysisRule } from "../ports/analysis-rule.js";
|
|
3
|
-
/** 새
|
|
3
|
+
/** 새 함수·메서드의 확인 가능한 동일 구현을 재사용 후보로 보고한다. */
|
|
4
4
|
export declare class DuplicateImplementationRule implements AnalysisRule {
|
|
5
5
|
analyze(context: AnalysisContext): Promise<readonly Finding[]>;
|
|
6
6
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"duplicate-implementation-rule.d.ts","sourceRoot":"","sources":["../../../src/application/rules/duplicate-implementation-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,
|
|
1
|
+
{"version":3,"file":"duplicate-implementation-rule.d.ts","sourceRoot":"","sources":["../../../src/application/rules/duplicate-implementation-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,4CAA4C;AAC5C,qBAAa,2BAA4B,YAAW,YAAY;IACjD,OAAO,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,SAAS,OAAO,EAAE,CAAC;CAoB5E"}
|