@kongyo2/ts-comment-scanner 1.3.0 → 1.5.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.en.md +23 -8
- package/README.md +21 -6
- package/dist/directives.d.ts +31 -1
- package/dist/directives.d.ts.map +1 -1
- package/dist/directives.js +127 -34
- package/dist/directives.js.map +1 -1
- package/dist/files.d.ts +43 -1
- package/dist/files.d.ts.map +1 -1
- package/dist/files.js +215 -26
- package/dist/files.js.map +1 -1
- package/dist/git.js +6 -6
- package/dist/git.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/remove.d.ts +11 -2
- package/dist/remove.d.ts.map +1 -1
- package/dist/remove.js +226 -45
- package/dist/remove.js.map +1 -1
- package/dist/report.d.ts.map +1 -1
- package/dist/report.js +24 -2
- package/dist/report.js.map +1 -1
- package/dist/run.d.ts.map +1 -1
- package/dist/run.js +86 -16
- package/dist/run.js.map +1 -1
- package/dist/scanner.d.ts.map +1 -1
- package/dist/scanner.js +43 -43
- package/dist/scanner.js.map +1 -1
- package/package.json +11 -5
- package/src/args.ts +198 -0
- package/src/cli.ts +12 -0
- package/src/directives.ts +516 -0
- package/src/files.ts +370 -0
- package/src/git.ts +72 -0
- package/src/index.ts +19 -0
- package/src/remove.ts +515 -0
- package/src/report.ts +106 -0
- package/src/run.ts +317 -0
- package/src/scanner.ts +104 -0
- package/src/types.ts +19 -0
- package/src/version.ts +7 -0
package/README.en.md
CHANGED
|
@@ -1,24 +1,30 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<a href="https://kongyo2.github.io/ts-comment-scanner/"><img src="https://raw.githubusercontent.com/kongyo2/ts-comment-scanner/main/assets/logo.svg" width="96" height="96" alt="ts-comment-scanner logo"></a>
|
|
3
|
+
</p>
|
|
4
|
+
|
|
1
5
|
# ts-comment-scanner
|
|
2
6
|
|
|
3
7
|
[](https://www.npmjs.com/package/@kongyo2/ts-comment-scanner)
|
|
4
8
|
[](https://www.npmjs.com/package/@kongyo2/ts-comment-scanner)
|
|
5
9
|
[](https://github.com/kongyo2/ts-comment-scanner/actions/workflows/ci.yml)
|
|
10
|
+
[](https://kongyo2.github.io/ts-comment-scanner/)
|
|
6
11
|

|
|
7
12
|
[](https://nodejs.org)
|
|
8
13
|
[](./LICENSE)
|
|
9
14
|
[](https://deepwiki.com/kongyo2/ts-comment-scanner)
|
|
10
15
|
|
|
11
|
-
[日本語](./README.md) | **English**
|
|
16
|
+
[日本語](./README.md) | **English** | 📘 [Project site](https://kongyo2.github.io/ts-comment-scanner/?lang=en)
|
|
12
17
|
|
|
13
18
|
A CLI / library that detects, lists, and summarizes comments in a TypeScript project — and can also remove them safely. It analyzes code through the TypeScript AST, so it never mistakes strings, template literals, regular expressions, or JSX text for comments.
|
|
14
19
|
|
|
15
20
|
## Features
|
|
16
21
|
|
|
17
|
-
- Recursively scans `.ts` `.tsx` `.mts` `.cts` (excluding `node_modules` and `.git`)
|
|
22
|
+
- Recursively scans `.ts` `.tsx` `.mts` `.cts` (excluding `node_modules` and `.git`); symlinks are followed during the walk just like explicit inputs, with cycles detected automatically
|
|
18
23
|
- Reports line comments (`//`) and block comments (`/* */`) with position information
|
|
19
24
|
- Outputs in three formats: text / JSON / **GitHub Actions annotations**
|
|
20
25
|
- **Automatically identifies compiler and linter directives** such as `@ts-ignore` and `eslint-disable`, so you can filter them in or out
|
|
21
26
|
- **Safe comment removal** (code cleanup): directives and license headers are kept by default
|
|
27
|
+
- Handles UTF-8 (with or without BOM) and BOM-marked UTF-16 (LE/BE); removal preserves the encoding and BOM, and files with a broken encoding are reported as errors **without being modified**
|
|
22
28
|
- **Custom ignore patterns** via glob (`--ignore`) and configurable target extensions (`--ext`)
|
|
23
29
|
- **git integration (`--diff`)**: narrow the scan to files touched between specific commits or in uncommitted work
|
|
24
30
|
- `--fail-on-comment` for CI (exit code 1 when comments are detected)
|
|
@@ -95,11 +101,11 @@ $ ts-comment-scanner --json src
|
|
|
95
101
|
"kind": "line",
|
|
96
102
|
"text": "// entry point",
|
|
97
103
|
"start": 0,
|
|
98
|
-
"end":
|
|
104
|
+
"end": 14,
|
|
99
105
|
"line": 1,
|
|
100
106
|
"column": 1,
|
|
101
107
|
"endLine": 1,
|
|
102
|
-
"endColumn":
|
|
108
|
+
"endColumn": 15
|
|
103
109
|
}
|
|
104
110
|
]
|
|
105
111
|
}
|
|
@@ -119,9 +125,11 @@ Comments identified as directives get a name attached, such as `"directive": "@t
|
|
|
119
125
|
```
|
|
120
126
|
|
|
121
127
|
```
|
|
122
|
-
::notice file=src/index.ts,line=1,endLine=1,col=1,endColumn=
|
|
128
|
+
::notice file=src/index.ts,line=1,endLine=1,col=1,endColumn=14,title=line comment::// entry point
|
|
123
129
|
```
|
|
124
130
|
|
|
131
|
+
While the JSON output's `endColumn` is exclusive (the column after the comment), GitHub annotation columns are inclusive, so the annotation reports the column of the last character (14 in this example). Comments larger than GitHub's 64 KiB annotation limit are truncated safely.
|
|
132
|
+
|
|
125
133
|
### Bulk comment removal (code cleanup)
|
|
126
134
|
|
|
127
135
|
```bash
|
|
@@ -139,9 +147,14 @@ Removal is driven by the AST's comment ranges, so it never touches strings or co
|
|
|
139
147
|
|
|
140
148
|
- Directives such as `@ts-expect-error` / `eslint-disable` are **kept by default**, because removing them would break the build or the linter
|
|
141
149
|
- Legal comments — `/*! ... */` or those containing `@license` / `@preserve` / `@copyright` or the `SPDX-License-Identifier:` / `SPDX-FileCopyrightText:` tags — are also **kept by default**
|
|
150
|
+
- **The line structure below next-line directives** (`@ts-expect-error`, `eslint-disable-next-line`, ...) **is preserved**: when removing comments would delete a line and shift the directive's target (e.g. a comment-only line), those comments are kept instead
|
|
151
|
+
- **Position-dependent directives are never activated by a removal**: when deleting a leading comment would make prettier's `@format`/`@prettier` pragma (honoured only in the file's first comment) or Bun's `// @bun` marker (honoured only at the very start of the file) newly take effect in a kept comment, the leading comment is kept as well
|
|
142
152
|
- Whitespace is inserted where removing a block comment would otherwise join tokens together (`a/* x */b` → `a b`)
|
|
143
153
|
- Comment-only lines are removed entirely, and trailing comments are removed together with the preceding whitespace
|
|
144
|
-
- The result is re-scanned to verify
|
|
154
|
+
- The result is re-scanned to verify that the surviving comments match the protected set, directive meaning included; if the outcome is unexpected the file is left unchanged and an error is reported
|
|
155
|
+
- Writes go through a temporary file and an atomic rename, so a failed write or a full disk can never truncate the original
|
|
156
|
+
|
|
157
|
+
With `--remove --json`, `summary.files` counts the entries of the `files` array (every file with removed, kept or skipped comments) and `summary.changedFiles` counts the files that actually had comments removed.
|
|
145
158
|
|
|
146
159
|
### Scanning only changed files (`--diff`)
|
|
147
160
|
|
|
@@ -202,11 +215,13 @@ const changed = await changedFiles("main..HEAD");
|
|
|
202
215
|
| `collectFiles(inputs, options?)` | Collect the list of target file paths |
|
|
203
216
|
| `changedFiles(range, cwd?)` | Absolute paths of working-tree files changed in a git revision range |
|
|
204
217
|
| `removeComments(source, options?)` | Remove comments safely (`removeDirectives` / `removeLegal` / `shouldRemove`) |
|
|
205
|
-
| `detectDirective(kind, text)` | Return a normalized name if the comment is a directive |
|
|
218
|
+
| `detectDirective(kind, text, placement?)` | Return a normalized name if the comment is a directive (`placement` enables position-sensitive rules) |
|
|
206
219
|
| `isLegalComment(text)` | Determine whether a comment is a license/legal comment |
|
|
207
220
|
| `formatText(results)` / `formatJson(results)` / `formatGitHub(results)` | Format scan results |
|
|
221
|
+
| `readFileText(file)` / `decodeFileText(data)` / `encodeFileText(text, target)` | Read/decode/encode helpers that preserve UTF-8 / UTF-16 and BOMs |
|
|
222
|
+
| `writeFileAtomic(file, data)` | Replace a file atomically through a temporary sibling |
|
|
208
223
|
|
|
209
|
-
Types: `Comment` / `CommentKind` / `FileScanResult` / `ScanOptions` / `CollectOptions` / `RemoveOptions` / `RemoveResult`
|
|
224
|
+
Types: `Comment` / `CommentKind` / `FileScanResult` / `ScanOptions` / `CollectOptions` / `RemoveOptions` / `RemoveResult` / `FileText` / `FileEncoding` / `DirectivePlacement`
|
|
210
225
|
|
|
211
226
|
## Requirements
|
|
212
227
|
|
package/README.md
CHANGED
|
@@ -1,24 +1,30 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<a href="https://kongyo2.github.io/ts-comment-scanner/"><img src="https://raw.githubusercontent.com/kongyo2/ts-comment-scanner/main/assets/logo.svg" width="96" height="96" alt="ts-comment-scanner ロゴ"></a>
|
|
3
|
+
</p>
|
|
4
|
+
|
|
1
5
|
# ts-comment-scanner
|
|
2
6
|
|
|
3
7
|
[](https://www.npmjs.com/package/@kongyo2/ts-comment-scanner)
|
|
4
8
|
[](https://www.npmjs.com/package/@kongyo2/ts-comment-scanner)
|
|
5
9
|
[](https://github.com/kongyo2/ts-comment-scanner/actions/workflows/ci.yml)
|
|
10
|
+
[](https://kongyo2.github.io/ts-comment-scanner/)
|
|
6
11
|

|
|
7
12
|
[](https://nodejs.org)
|
|
8
13
|
[](./LICENSE)
|
|
9
14
|
[](https://deepwiki.com/kongyo2/ts-comment-scanner)
|
|
10
15
|
|
|
11
|
-
**日本語** | [English](./README.en.md)
|
|
16
|
+
**日本語** | [English](./README.en.md) | 📘 [プロジェクトサイト](https://kongyo2.github.io/ts-comment-scanner/)
|
|
12
17
|
|
|
13
18
|
TypeScript プロジェクト内のコメントを検出・一覧・集計し、安全に削除もできる CLI / ライブラリです。TypeScript の AST を使って解析するため、文字列・テンプレートリテラル・正規表現・JSX テキストを誤検出しません。
|
|
14
19
|
|
|
15
20
|
## 特徴
|
|
16
21
|
|
|
17
|
-
- `.ts` `.tsx` `.mts` `.cts` を再帰的にスキャン(`node_modules` と `.git` は除外)
|
|
22
|
+
- `.ts` `.tsx` `.mts` `.cts` を再帰的にスキャン(`node_modules` と `.git` は除外)。シンボリックリンクは明示指定時と同様に走査中も追跡し、循環は自動検知して停止
|
|
18
23
|
- 行コメント (`//`) とブロックコメント (`/* */`) を位置情報つきで報告
|
|
19
24
|
- テキスト / JSON / **GitHub Actions アノテーション**の 3 形式で出力
|
|
20
25
|
- `@ts-ignore` や `eslint-disable` などの**コンパイラ・リンター指示子(ディレクティブ)を自動判別**し、絞り込み・除外が可能
|
|
21
26
|
- **安全なコメント削除**(コードクリーンアップ): ディレクティブとライセンスヘッダーはデフォルトで保持
|
|
27
|
+
- UTF-8(BOM 付き可)と BOM 付き UTF-16(LE/BE)に対応。削除時もエンコーディングと BOM を保持し、不正なエンコーディングのファイルは**変更せずに**エラー報告
|
|
22
28
|
- Glob による**カスタム無視パターン** (`--ignore`)、対象拡張子の変更 (`--ext`)
|
|
23
29
|
- **git 連携 (`--diff`)**: 特定コミット間や未コミットの変更で触れられたファイルだけに対象を絞り込み
|
|
24
30
|
- CI 向けの `--fail-on-comment`(コメント検出時に終了コード 1)
|
|
@@ -119,9 +125,11 @@ $ ts-comment-scanner --json src
|
|
|
119
125
|
```
|
|
120
126
|
|
|
121
127
|
```
|
|
122
|
-
::notice file=src/index.ts,line=1,endLine=1,col=1,endColumn=
|
|
128
|
+
::notice file=src/index.ts,line=1,endLine=1,col=1,endColumn=12,title=line comment::// エントリーポイント
|
|
123
129
|
```
|
|
124
130
|
|
|
131
|
+
JSON 出力の `endColumn` が排他的(コメント末尾の次の桁)なのに対し、GitHub アノテーションの列は両端含みのため、ここでは最後の文字の桁(この例では 12)が出力されます。64 KiB を超える巨大なコメントは、GitHub の上限に収まるよう安全に切り詰められます。
|
|
132
|
+
|
|
125
133
|
### コメントの一括削除(コードクリーンアップ)
|
|
126
134
|
|
|
127
135
|
```bash
|
|
@@ -139,9 +147,14 @@ ts-comment-scanner --remove --remove-directives --remove-legal src
|
|
|
139
147
|
|
|
140
148
|
- `@ts-expect-error` / `eslint-disable` などの指示子は、削除するとビルドやリントが壊れるため**デフォルトで保持**
|
|
141
149
|
- `/*! ... */` や `@license` / `@preserve` / `@copyright`、`SPDX-License-Identifier:` / `SPDX-FileCopyrightText:` タグを含む法的コメントも**デフォルトで保持**
|
|
150
|
+
- `@ts-expect-error` や `eslint-disable-next-line` など**次行を対象にする指示子の直下の行構造を保持**: 削除すると行が消えて指示子の適用先がずれる場合(コメントだけの行など)、その行のコメントは削除せずに保持
|
|
151
|
+
- **位置依存ディレクティブを削除で有効化しない**: prettier の `@format`/`@prettier` pragma(ファイル最初のコメントでのみ有効)や Bun の `// @bun`(ファイル先頭でのみ有効)が、手前のコメント削除によって保持コメント内で新たに効き始める場合は、その手前のコメントも保持
|
|
142
152
|
- ブロックコメント除去でトークンが結合してしまう位置には空白を挿入(`a/* x */b` → `a b`)
|
|
143
153
|
- コメントだけの行は行ごと削除、行末コメントは手前の空白ごと削除
|
|
144
|
-
-
|
|
154
|
+
- 削除後のソースを再スキャンし、残ったコメントが保持対象とディレクティブの意味ごと一致することを検証。想定外の結果になる場合はファイルを変更せずエラー報告
|
|
155
|
+
- 書き込みは一時ファイル経由のアトミック置換(書き込み失敗やディスクフルで元ファイルが壊れない)
|
|
156
|
+
|
|
157
|
+
`--remove --json` の `summary.files` は `files` 配列の件数(削除・保持・スキップのいずれかがあったファイル数)、`summary.changedFiles` は実際にコメントを削除したファイル数です。
|
|
145
158
|
|
|
146
159
|
### 変更されたファイルだけを対象にする(`--diff`)
|
|
147
160
|
|
|
@@ -202,11 +215,13 @@ const changed = await changedFiles("main..HEAD");
|
|
|
202
215
|
| `collectFiles(inputs, options?)` | 対象ファイルのパス一覧を収集 |
|
|
203
216
|
| `changedFiles(range, cwd?)` | git のリビジョン範囲で変更された作業ツリーのファイルを絶対パスで返す |
|
|
204
217
|
| `removeComments(source, options?)` | コメントを安全に削除(`removeDirectives` / `removeLegal` / `shouldRemove`) |
|
|
205
|
-
| `detectDirective(kind, text)` | コメントがディレクティブなら正規化した名前を返す |
|
|
218
|
+
| `detectDirective(kind, text, placement?)` | コメントがディレクティブなら正規化した名前を返す(`placement` で位置依存の判定が可能) |
|
|
206
219
|
| `isLegalComment(text)` | ライセンス・法的コメントかどうかを判定 |
|
|
207
220
|
| `formatText(results)` / `formatJson(results)` / `formatGitHub(results)` | スキャン結果を整形 |
|
|
221
|
+
| `readFileText(file)` / `decodeFileText(data)` / `encodeFileText(text, target)` | UTF-8 / UTF-16 と BOM を保持するファイル読み書きヘルパー |
|
|
222
|
+
| `writeFileAtomic(file, data)` | 一時ファイル経由でファイルをアトミックに置換 |
|
|
208
223
|
|
|
209
|
-
型: `Comment` / `CommentKind` / `FileScanResult` / `ScanOptions` / `CollectOptions` / `RemoveOptions` / `RemoveResult`
|
|
224
|
+
型: `Comment` / `CommentKind` / `FileScanResult` / `ScanOptions` / `CollectOptions` / `RemoveOptions` / `RemoveResult` / `FileText` / `FileEncoding` / `DirectivePlacement`
|
|
210
225
|
|
|
211
226
|
## 必要環境
|
|
212
227
|
|
package/dist/directives.d.ts
CHANGED
|
@@ -1,9 +1,39 @@
|
|
|
1
1
|
import type { CommentKind } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Where a comment sits in its file, for directives that are only honoured in
|
|
4
|
+
* particular positions. Omitting the placement treats every position as
|
|
5
|
+
* valid, which matches how a lone comment string is best interpreted.
|
|
6
|
+
*/
|
|
7
|
+
export interface DirectivePlacement {
|
|
8
|
+
/** The comment starts before the file's first token. */
|
|
9
|
+
header: boolean;
|
|
10
|
+
/** The comment is the file's first comment, preceded only by whitespace (or a shebang). */
|
|
11
|
+
firstComment: boolean;
|
|
12
|
+
/** The comment starts at the very first character of the file. */
|
|
13
|
+
fileStart: boolean;
|
|
14
|
+
}
|
|
2
15
|
/**
|
|
3
16
|
* Returns the canonical name of the compiler/linter/tooling directive the
|
|
4
17
|
* comment represents, or `undefined` when the comment is an ordinary comment.
|
|
18
|
+
*
|
|
19
|
+
* When a placement is given, directives that the corresponding tool only
|
|
20
|
+
* honours in certain positions (header pragmas, prettier's docblock pragma,
|
|
21
|
+
* `// @bun`) are skipped elsewhere — and the remaining rules still run, so a
|
|
22
|
+
* live directive later in the same comment (`// deno-lint-ignore-file
|
|
23
|
+
* nosemgrep` in mid-file) is not masked by a positionally dead one.
|
|
24
|
+
*/
|
|
25
|
+
export declare function detectDirective(kind: CommentKind, text: string, placement?: DirectivePlacement): string | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* The position-dependent directives (prettier's first-comment pragmas, Bun's
|
|
28
|
+
* file-start marker) the comment carries that are active at the given
|
|
29
|
+
* placement, sorted. Unlike detectDirective — which reports one canonical
|
|
30
|
+
* name — this sees through masking: an eslint config block can also hold a
|
|
31
|
+
* `@format` pragma, and whether that pragma is live must not hide behind the
|
|
32
|
+
* name an earlier rule already claimed. Only first-comment and file-start
|
|
33
|
+
* gates are consulted; header-gated directives cannot change activation when
|
|
34
|
+
* the comments around them change.
|
|
5
35
|
*/
|
|
6
|
-
export declare function
|
|
36
|
+
export declare function activePositionalDirectives(kind: CommentKind, text: string, placement: DirectivePlacement): string[];
|
|
7
37
|
/**
|
|
8
38
|
* True for license/legal comments (`/*!`, `@license`, `@preserve`,
|
|
9
39
|
* `@copyright`, and the machine-readable `SPDX-License-Identifier:` /
|
package/dist/directives.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"directives.d.ts","sourceRoot":"","sources":["../src/directives.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"directives.d.ts","sourceRoot":"","sources":["../src/directives.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAuT9C;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC,wDAAwD;IACxD,MAAM,EAAE,OAAO,CAAC;IAChB,2FAA2F;IAC3F,YAAY,EAAE,OAAO,CAAC;IACtB,kEAAkE;IAClE,SAAS,EAAE,OAAO,CAAC;CACpB;AA8DD;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,kBAAkB,GAAG,MAAM,GAAG,SAAS,CA4BnH;AA2BD;;;;;;;;;GASG;AACH,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,kBAAkB,GAAG,MAAM,EAAE,CAOnH;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAIpD"}
|
package/dist/directives.js
CHANGED
|
@@ -5,7 +5,7 @@ const RULES = [
|
|
|
5
5
|
{ pattern: /^eslint\s+\S/, name: "eslint", blockOnly: true, joinLines: true },
|
|
6
6
|
{
|
|
7
7
|
pattern: /^(globals?|exported)\s+\S/,
|
|
8
|
-
name: (match) => match[1]
|
|
8
|
+
name: (match) => match[1],
|
|
9
9
|
blockOnly: true,
|
|
10
10
|
joinLines: true,
|
|
11
11
|
},
|
|
@@ -22,7 +22,7 @@ const RULES = [
|
|
|
22
22
|
// comment marker with no space (`/*jslint devel*/` works, `/* jslint */`
|
|
23
23
|
// does not) and needs a body, so these match the raw text. The whole-line
|
|
24
24
|
// pragmas (`/*jslint-disable*/`, `//jslint-ignore-line`) are exact strings.
|
|
25
|
-
{ pattern: /^\/[/*](jslint|property)\s+\S/, rawText: true, name: (match) => match[1]
|
|
25
|
+
{ pattern: /^\/[/*](jslint|property)\s+\S/, rawText: true, name: (match) => match[1] },
|
|
26
26
|
{ pattern: /^\/\*jslint-(disable|enable)\*\/$/, rawText: true, name: (match) => `jslint-${match[1]}` },
|
|
27
27
|
{ pattern: /^\/\/jslint-(ignore-line|quiet)$/, rawText: true, name: (match) => `jslint-${match[1]}` },
|
|
28
28
|
// oxlint
|
|
@@ -48,9 +48,12 @@ const RULES = [
|
|
|
48
48
|
// Formatter suppressions (prettier, and oxfmt which mirrors it). Both
|
|
49
49
|
// parsers compare the exact trimmed comment body, so the marker must be the
|
|
50
50
|
// whole comment (joinLines makes `$` span every line): hyphenated
|
|
51
|
-
// lookalikes (`oxfmt-ignore-more`) and prose stay ordinary.
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
// lookalikes (`oxfmt-ignore-more`) and prose stay ordinary. keepStars,
|
|
52
|
+
// because the literal comparison also means a JSDoc `*` before the marker
|
|
53
|
+
// (`/** prettier-ignore */`) leaves the comment ordinary — verified against
|
|
54
|
+
// prettier 3.8.
|
|
55
|
+
{ pattern: /^prettier-ignore(?:-start|-end)?$/, joinLines: true, keepStars: true },
|
|
56
|
+
{ pattern: /^oxfmt-ignore$/, joinLines: true, keepStars: true },
|
|
54
57
|
// dprint. The file pragma is a starts-with check (trailing text allowed) on
|
|
55
58
|
// the file's leading comments, skipping only whitespace — a `/**` docblock
|
|
56
59
|
// star defeats it. The node pragma is a substring bounded by
|
|
@@ -141,7 +144,10 @@ const RULES = [
|
|
|
141
144
|
// stars break — turbopack magic comments mirror the same `key: value` form.
|
|
142
145
|
{ pattern: /^webpack[A-Z][A-Za-z]+:/, name: "webpack-magic-comment", notDocblock: true },
|
|
143
146
|
{ pattern: /^turbopack[A-Z][A-Za-z]+:/, name: "turbopack-magic-comment", notDocblock: true },
|
|
144
|
-
|
|
147
|
+
// Vite matches the literal block comment (`/\/\*\s*@vite-ignore\s*\*\//` in
|
|
148
|
+
// importAnalysis), so line comments, suffixes and trailing words stay
|
|
149
|
+
// ordinary.
|
|
150
|
+
{ pattern: /^\/\*\s*@vite-ignore\s*\*\/$/, rawText: true, blockOnly: true, name: "@vite-ignore" },
|
|
145
151
|
// Terser/Rollup annotations: a bare substring search over any comment kind,
|
|
146
152
|
// so leading or trailing words keep the annotation active.
|
|
147
153
|
{ pattern: /[#@]__(?:PURE|NO_SIDE_EFFECTS|INLINE|NOINLINE|KEY|MANGLE_PROP)__/, anyLine: true },
|
|
@@ -176,7 +182,7 @@ const RULES = [
|
|
|
176
182
|
{ pattern: /^graphql$/i, joinLines: true, name: "GraphQL" },
|
|
177
183
|
{ pattern: /^\/\* HTML \*\/$/, rawText: true, blockOnly: true, name: "HTML" },
|
|
178
184
|
// Source maps (`//# sourceMappingURL=`, legacy `//@`, and the block form)
|
|
179
|
-
{ pattern: /^[#@]\s*(source(?:Mapping)?URL)=/, name: (match) => match[1]
|
|
185
|
+
{ pattern: /^[#@]\s*(source(?:Mapping)?URL)=/, name: (match) => match[1] },
|
|
180
186
|
// JSX pragmas (docblock pragmas: block comments only, honoured on any line)
|
|
181
187
|
{ pattern: /^@jsx(?:Runtime|ImportSource|Frag)?\b/, blockOnly: true, anyLine: true },
|
|
182
188
|
// Test runners. Jest reads these from the file's leading docblock, but
|
|
@@ -204,12 +210,13 @@ const RULES = [
|
|
|
204
210
|
// no trailing boundary; the lookahead just keeps words like `nosemantic`
|
|
205
211
|
// ordinary.
|
|
206
212
|
{ pattern: /(?:^|\s)nosem(?:grep)?(?![\w-])/i, name: "nosemgrep", anyLine: true },
|
|
207
|
-
// CodeQL / LGTM alert suppressions:
|
|
208
|
-
//
|
|
209
|
-
//
|
|
210
|
-
|
|
211
|
-
{ pattern:
|
|
212
|
-
{ pattern:
|
|
213
|
+
// CodeQL / LGTM alert suppressions: the AlertSuppression queries only read
|
|
214
|
+
// `//` comments, so block comments — even single-line ones — stay ordinary.
|
|
215
|
+
// `lgtm[...]` matches anywhere in the comment; bare `lgtm` only at the
|
|
216
|
+
// start or after a `;`; `codeql[...]` requires the bracketed query id.
|
|
217
|
+
{ pattern: /\blgtm\s*\[[^\]]*\]/i, lineOnly: true, name: "lgtm" },
|
|
218
|
+
{ pattern: /(?:^|;)\s*lgtm(?!\w)(?!\s*\[)/i, lineOnly: true, name: "lgtm" },
|
|
219
|
+
{ pattern: /\bcodeql\s*\[[^\]]*\]/i, lineOnly: true, name: "codeql" },
|
|
213
220
|
// DeepSource: bare `skipcq` or `skipcq: CODE1, CODE2`, on the flagged line
|
|
214
221
|
// or standalone above it (it may trail other comment text).
|
|
215
222
|
{ pattern: /\bskipcq(?![\w-])/, name: "skipcq", anyLine: true },
|
|
@@ -219,7 +226,7 @@ const RULES = [
|
|
|
219
226
|
// Datadog static analysis: the keyword must directly follow the comment
|
|
220
227
|
// opener (whitespace aside); a `/**` star defeats it. Applies to the next
|
|
221
228
|
// line, or the whole file from line 1.
|
|
222
|
-
{ pattern: /^(no-dd-sa|datadog-disable)/, notDocblock: true, name: (match) => match[1]
|
|
229
|
+
{ pattern: /^(no-dd-sa|datadog-disable)/, notDocblock: true, name: (match) => match[1] },
|
|
223
230
|
// Secret scanners: raw substring checks on the finding line.
|
|
224
231
|
{ pattern: /gitleaks:allow/, name: "gitleaks:allow", anyLine: true },
|
|
225
232
|
{ pattern: /trufflehog:ignore/, name: "trufflehog:ignore", anyLine: true },
|
|
@@ -232,7 +239,7 @@ const RULES = [
|
|
|
232
239
|
// one of the known directive verbs. Names are normalised to `cspell:<verb>`.
|
|
233
240
|
{
|
|
234
241
|
pattern: /\b(?:c?spell|spell-?checker)::?\s*(disable(?:-line|-next(?:-line)?)?|enable|ignore(?:-?words?)?|words?|(?:flag|forbid)(?:-?words?)?|ignore_?reg_?exp|include_?reg_?exp|dictionar(?:y|ies)|locale?|language|(?:enable|disable)(?:allow)?compoundwords|(?:enable|disable)casesensitive)\b(?!-)/i,
|
|
235
|
-
name: (match) => `cspell:${
|
|
242
|
+
name: (match) => `cspell:${match[1].toLowerCase()}`,
|
|
236
243
|
anyLine: true,
|
|
237
244
|
},
|
|
238
245
|
// cspell's legacy emacs-style word list (case-sensitive, colon optional).
|
|
@@ -261,6 +268,49 @@ const RULES = [
|
|
|
261
268
|
{ pattern: /^#(?:region|endregion)\b/ },
|
|
262
269
|
];
|
|
263
270
|
const TRIPLE_SLASH = /^\/\/\/\s*<(reference|amd-dependency|amd-module)\b/;
|
|
271
|
+
const ANY_PLACEMENT = { header: true, firstComment: true, fileStart: true };
|
|
272
|
+
// File-wide pragmas (check pragmas, triple-slash directives, Flow/JSLint
|
|
273
|
+
// header pragmas, Deno's *-ignore-file and @ts-self-types forms) only count
|
|
274
|
+
// before the first token; anywhere later the tools treat them as ordinary
|
|
275
|
+
// text. dprint-ignore-file is deliberately absent: a stray one below the
|
|
276
|
+
// header no longer skips the file, but dprint's node pragma still matches
|
|
277
|
+
// inside it, so the comment stays an active `dprint-ignore` and must keep its
|
|
278
|
+
// tag. Coverage file pragmas (`istanbul ignore file`, `c8/v8 ignore file`)
|
|
279
|
+
// are NOT gated: istanbul-lib-instrument and Vitest's v8 provider
|
|
280
|
+
// (ast-v8-to-istanbul) honour them on any comment in the file. Test
|
|
281
|
+
// environment pragmas are not gated either: Vitest matches them (including
|
|
282
|
+
// the @jest- spellings) with a regex over the whole file, and neither are
|
|
283
|
+
// @ts-strict pragmas (typescript-strict-plugin scans every line). @jsx
|
|
284
|
+
// pragmas stay ungated too: tsc only reads leading ones, but Babel's JSX
|
|
285
|
+
// transform scans every comment in the file.
|
|
286
|
+
const HEADER_ONLY_DIRECTIVES = new Set([
|
|
287
|
+
"@ts-nocheck",
|
|
288
|
+
"@ts-check",
|
|
289
|
+
"@flow",
|
|
290
|
+
"@noflow",
|
|
291
|
+
"@ts-self-types",
|
|
292
|
+
"jslint",
|
|
293
|
+
"property",
|
|
294
|
+
]);
|
|
295
|
+
// Prettier's pragma mode reads the pragma through jest-docblock, which only
|
|
296
|
+
// ever extracts the file's FIRST comment (a shebang may precede it) — a
|
|
297
|
+
// docblock behind any other comment is ignored. Verified against prettier 3.8.
|
|
298
|
+
const FIRST_COMMENT_ONLY_DIRECTIVES = new Set(["@format", "@noformat", "@prettier", "@noprettier"]);
|
|
299
|
+
// Bun treats a file as pre-transpiled only when it literally STARTS with
|
|
300
|
+
// `// @bun`; after a shebang or any other leading content the marker is inert.
|
|
301
|
+
const FILE_START_ONLY_DIRECTIVES = new Set(["@bun"]);
|
|
302
|
+
function isActiveAt(name, placement) {
|
|
303
|
+
if (FILE_START_ONLY_DIRECTIVES.has(name))
|
|
304
|
+
return placement.fileStart;
|
|
305
|
+
if (FIRST_COMMENT_ONLY_DIRECTIVES.has(name))
|
|
306
|
+
return placement.firstComment;
|
|
307
|
+
if (HEADER_ONLY_DIRECTIVES.has(name) ||
|
|
308
|
+
(name.startsWith("deno-") && name.endsWith("-ignore-file")) ||
|
|
309
|
+
name.startsWith("triple-slash-")) {
|
|
310
|
+
return placement.header;
|
|
311
|
+
}
|
|
312
|
+
return true;
|
|
313
|
+
}
|
|
264
314
|
// Mirrors the TypeScript compiler's own comment-directive matching, verified
|
|
265
315
|
// against tsc: the suppression directives are case-sensitive PREFIX matches
|
|
266
316
|
// (`@ts-ignoreTODO` is active), while the file-wide check pragmas are
|
|
@@ -275,12 +325,21 @@ const TS_BLOCK_SUPPRESSION = /^\s*[/*]*\s*@ts-(ignore|expect-error)/;
|
|
|
275
325
|
/**
|
|
276
326
|
* Returns the canonical name of the compiler/linter/tooling directive the
|
|
277
327
|
* comment represents, or `undefined` when the comment is an ordinary comment.
|
|
328
|
+
*
|
|
329
|
+
* When a placement is given, directives that the corresponding tool only
|
|
330
|
+
* honours in certain positions (header pragmas, prettier's docblock pragma,
|
|
331
|
+
* `// @bun`) are skipped elsewhere — and the remaining rules still run, so a
|
|
332
|
+
* live directive later in the same comment (`// deno-lint-ignore-file
|
|
333
|
+
* nosemgrep` in mid-file) is not masked by a positionally dead one.
|
|
278
334
|
*/
|
|
279
|
-
export function detectDirective(kind, text) {
|
|
335
|
+
export function detectDirective(kind, text, placement) {
|
|
336
|
+
const at = placement ?? ANY_PLACEMENT;
|
|
280
337
|
if (kind === "line") {
|
|
281
338
|
const tripleSlash = TRIPLE_SLASH.exec(text);
|
|
282
339
|
if (tripleSlash) {
|
|
283
|
-
|
|
340
|
+
const name = `triple-slash-${tripleSlash[1]}`;
|
|
341
|
+
if (isActiveAt(name, at))
|
|
342
|
+
return name;
|
|
284
343
|
}
|
|
285
344
|
const suppression = TS_LINE_SUPPRESSION.exec(text);
|
|
286
345
|
if (suppression) {
|
|
@@ -288,7 +347,9 @@ export function detectDirective(kind, text) {
|
|
|
288
347
|
}
|
|
289
348
|
const checkPragma = TS_LINE_CHECK_PRAGMA.exec(text);
|
|
290
349
|
if (checkPragma) {
|
|
291
|
-
|
|
350
|
+
const name = `@ts-${checkPragma[1]?.toLowerCase()}`;
|
|
351
|
+
if (isActiveAt(name, at))
|
|
352
|
+
return name;
|
|
292
353
|
}
|
|
293
354
|
}
|
|
294
355
|
else {
|
|
@@ -297,35 +358,58 @@ export function detectDirective(kind, text) {
|
|
|
297
358
|
return `@ts-${suppression[1]}`;
|
|
298
359
|
}
|
|
299
360
|
}
|
|
300
|
-
const
|
|
361
|
+
for (const name of ruleMatches(kind, text)) {
|
|
362
|
+
if (isActiveAt(name, at))
|
|
363
|
+
return name;
|
|
364
|
+
}
|
|
365
|
+
return undefined;
|
|
366
|
+
}
|
|
367
|
+
/** Directive names of every rule the comment matches, in rule order. */
|
|
368
|
+
function* ruleMatches(kind, text) {
|
|
369
|
+
const lines = contentLines(kind, text, false);
|
|
370
|
+
const literalLines = kind === "block" ? contentLines(kind, text, true) : lines;
|
|
301
371
|
for (const rule of RULES) {
|
|
302
372
|
if (rule.blockOnly === true && kind !== "block")
|
|
303
373
|
continue;
|
|
304
374
|
if (rule.lineOnly === true && kind !== "line")
|
|
305
375
|
continue;
|
|
306
|
-
if (rule.singleLine === true && LINE_BREAK.test(text))
|
|
307
|
-
continue;
|
|
308
376
|
if (rule.notDocblock === true && kind === "block" && text.startsWith("/**"))
|
|
309
377
|
continue;
|
|
378
|
+
const ruleLines = rule.keepStars === true ? literalLines : lines;
|
|
310
379
|
const candidates = rule.rawText === true
|
|
311
380
|
? [text]
|
|
312
381
|
: rule.anyLine === true
|
|
313
|
-
?
|
|
382
|
+
? ruleLines
|
|
314
383
|
: rule.joinLines === true
|
|
315
|
-
? [
|
|
316
|
-
:
|
|
384
|
+
? [ruleLines.join(" ")]
|
|
385
|
+
: ruleLines.slice(0, 1);
|
|
317
386
|
for (const line of candidates) {
|
|
318
387
|
const match = rule.pattern.exec(line);
|
|
319
388
|
if (!match)
|
|
320
389
|
continue;
|
|
321
|
-
|
|
322
|
-
return rule.name;
|
|
323
|
-
if (typeof rule.name === "function")
|
|
324
|
-
return rule.name(match);
|
|
325
|
-
return match[0];
|
|
390
|
+
yield typeof rule.name === "string" ? rule.name : typeof rule.name === "function" ? rule.name(match) : match[0];
|
|
326
391
|
}
|
|
327
392
|
}
|
|
328
|
-
|
|
393
|
+
}
|
|
394
|
+
/**
|
|
395
|
+
* The position-dependent directives (prettier's first-comment pragmas, Bun's
|
|
396
|
+
* file-start marker) the comment carries that are active at the given
|
|
397
|
+
* placement, sorted. Unlike detectDirective — which reports one canonical
|
|
398
|
+
* name — this sees through masking: an eslint config block can also hold a
|
|
399
|
+
* `@format` pragma, and whether that pragma is live must not hide behind the
|
|
400
|
+
* name an earlier rule already claimed. Only first-comment and file-start
|
|
401
|
+
* gates are consulted; header-gated directives cannot change activation when
|
|
402
|
+
* the comments around them change.
|
|
403
|
+
*/
|
|
404
|
+
export function activePositionalDirectives(kind, text, placement) {
|
|
405
|
+
const names = new Set();
|
|
406
|
+
for (const name of ruleMatches(kind, text)) {
|
|
407
|
+
if (!FIRST_COMMENT_ONLY_DIRECTIVES.has(name) && !FILE_START_ONLY_DIRECTIVES.has(name))
|
|
408
|
+
continue;
|
|
409
|
+
if (isActiveAt(name, placement))
|
|
410
|
+
names.add(name);
|
|
411
|
+
}
|
|
412
|
+
return [...names].sort();
|
|
329
413
|
}
|
|
330
414
|
/**
|
|
331
415
|
* True for license/legal comments (`/*!`, `@license`, `@preserve`,
|
|
@@ -347,13 +431,22 @@ const LINE_BREAK = /\r\n|[\n\r\u2028\u2029]/;
|
|
|
347
431
|
* Non-empty content lines of the comment, with comment markers stripped.
|
|
348
432
|
* For line comments only the `//` marker itself is removed: extra slashes or
|
|
349
433
|
* stars are content, so `//// @ts-ignore` and `// * prettier-ignore` stay
|
|
350
|
-
* ordinary. JSDoc-style `*` prefixes are stripped for block comments
|
|
434
|
+
* ordinary. JSDoc-style `*` prefixes are stripped for block comments unless
|
|
435
|
+
* `keepStars` asks for the literal lines (for tools that compare the raw
|
|
436
|
+
* comment value, where a leading `*` defeats the directive).
|
|
351
437
|
*/
|
|
352
|
-
function contentLines(kind, text) {
|
|
353
|
-
|
|
438
|
+
function contentLines(kind, text, keepStars) {
|
|
439
|
+
// In keepStars mode only the literal `/*` and `*/` markers go, matching how
|
|
440
|
+
// prettier/oxfmt read the comment value: the second star of a `/**` opener
|
|
441
|
+
// is content and defeats their exact comparison.
|
|
442
|
+
const inner = kind === "line"
|
|
443
|
+
? text.replace(/^\/\//, "")
|
|
444
|
+
: keepStars
|
|
445
|
+
? text.replace(/^\/\*/, "").replace(/\*\/\s*$/, "")
|
|
446
|
+
: text.replace(/^\/\*+/, "").replace(/\*+\/\s*$/, "");
|
|
354
447
|
const lines = [];
|
|
355
448
|
for (const line of inner.split(LINE_BREAK)) {
|
|
356
|
-
const stripped = (kind === "block" ? line.replace(/^\s*\*+\s*/, "") : line).trim();
|
|
449
|
+
const stripped = (kind === "block" && !keepStars ? line.replace(/^\s*\*+\s*/, "") : line).trim();
|
|
357
450
|
if (stripped !== "")
|
|
358
451
|
lines.push(stripped);
|
|
359
452
|
}
|
package/dist/directives.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"directives.js","sourceRoot":"","sources":["../src/directives.ts"],"names":[],"mappings":"AAkCA,MAAM,KAAK,GAAoB;IAC7B,SAAS;IACT,EAAE,OAAO,EAAE,mDAAmD,EAAE;IAChE,EAAE,OAAO,EAAE,eAAe,EAAE;IAC5B,EAAE,OAAO,EAAE,cAAc,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE;IAC7E;QACE,OAAO,EAAE,2BAA2B;QACpC,IAAI,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,QAAQ;QACrC,SAAS,EAAE,IAAI;QACf,SAAS,EAAE,IAAI;KAChB;IACD,kBAAkB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|
3
3
|
/** File extensions to include (with or without a leading dot, case-insensitive). */
|
|
4
4
|
extensions?: string[];
|
|
5
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* Directory names that are never traversed, input directories included
|
|
7
|
+
* (case-insensitively on Windows). Default: node_modules, .git
|
|
8
|
+
*/
|
|
6
9
|
ignoreDirs?: string[];
|
|
7
10
|
/**
|
|
8
11
|
* Glob patterns for files and directories to skip (picomatch syntax).
|
|
@@ -13,6 +16,45 @@ export interface CollectOptions {
|
|
|
13
16
|
}
|
|
14
17
|
export declare function collectFiles(inputs: string[], options?: CollectOptions): Promise<string[]>;
|
|
15
18
|
export declare function isJsxFile(file: string): boolean;
|
|
19
|
+
export type FileEncoding = "utf8" | "utf16le" | "utf16be";
|
|
20
|
+
export interface FileText {
|
|
21
|
+
/** Decoded content with any byte-order mark stripped. */
|
|
22
|
+
text: string;
|
|
23
|
+
encoding: FileEncoding;
|
|
24
|
+
/** Whether the file carried a byte-order mark. */
|
|
25
|
+
bom: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Whether re-encoding `text` reproduces the original bytes exactly. False
|
|
28
|
+
* for invalid UTF-8 (decoded with replacement characters), truncated
|
|
29
|
+
* UTF-16 and other undecodable input; such files must not be rewritten.
|
|
30
|
+
*/
|
|
31
|
+
lossless: boolean;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Decodes a source file. UTF-16 (either endianness) is recognised by its
|
|
35
|
+
* byte-order mark; everything else is treated as UTF-8. Positions reported by
|
|
36
|
+
* the scanner are relative to the decoded, BOM-stripped text, matching
|
|
37
|
+
* editors, GitHub annotations and the removal report.
|
|
38
|
+
*/
|
|
39
|
+
export declare function decodeFileText(data: Buffer): FileText;
|
|
40
|
+
/**
|
|
41
|
+
* Re-encodes decoded text in the encoding (and BOM) it was read with. Note
|
|
42
|
+
* that `bom: false` UTF-16 output cannot be recognised by decodeFileText,
|
|
43
|
+
* which identifies UTF-16 by its byte-order mark — request it only for
|
|
44
|
+
* consumers that expect mark-less UTF-16.
|
|
45
|
+
*/
|
|
46
|
+
export declare function encodeFileText(text: string, target: {
|
|
47
|
+
encoding: FileEncoding;
|
|
48
|
+
bom: boolean;
|
|
49
|
+
}): Buffer;
|
|
50
|
+
export declare function readFileText(file: string): Promise<FileText>;
|
|
51
|
+
/**
|
|
52
|
+
* Replaces a file's content atomically: the data is written to a temporary
|
|
53
|
+
* sibling, flushed, and renamed into place, so a crash, full disk or write
|
|
54
|
+
* error can never leave the target truncated. Symlinks are followed (the
|
|
55
|
+
* link's target is replaced, not the link) and the file mode is preserved.
|
|
56
|
+
*/
|
|
57
|
+
export declare function writeFileAtomic(file: string, data: Buffer): Promise<void>;
|
|
16
58
|
export declare function scanFile(file: string): Promise<FileScanResult>;
|
|
17
59
|
export declare function scanPaths(inputs: string[], options?: CollectOptions): Promise<FileScanResult[]>;
|
|
18
60
|
export declare const FILE_CONCURRENCY = 16;
|
package/dist/files.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../src/files.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../src/files.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAKjD,MAAM,WAAW,cAAc;IAC7B,oFAAoF;IACpF,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB;AAID,wBAAsB,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,OAAO,GAAE,cAAmB,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CA2CpG;AAiKD,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAG/C;AAED,MAAM,MAAM,YAAY,GAAG,MA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