@danielsimonjr/repo-tools 2.3.0 → 2.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/CHANGELOG.md +96 -0
- package/README.md +26 -3
- package/dist/cli.js +1331 -1174
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,102 @@ All notable changes to this project are recorded in this file. The format follow
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [2.5.0] - 2026-11-05
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- `repo-tools map` writes the values of the Verification tables in the Markdown documents of its
|
|
14
|
+
output folder. Map replaces each mismatched value with the measured value and logs an `Updated:`
|
|
15
|
+
line for each change. Map keeps an unknown claim, a truncated count, a tainted metric and an
|
|
16
|
+
opted-out document unchanged, so `repo-tools check` still reports them. A stale count no longer
|
|
17
|
+
needs a hand edit.
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
|
|
21
|
+
- CI runs the macOS jobs on `macos-15`. GitHub no longer supports the `macos-14` image, so
|
|
22
|
+
those jobs were cancelled before any step ran.
|
|
23
|
+
- `check` and `map` share one claim judge (`src/check/verify.ts`) and one reader of the metric
|
|
24
|
+
reports (`src/check/measure.ts`). The messages of `check` are unchanged.
|
|
25
|
+
|
|
26
|
+
## [2.4.0] - 2026-11-03
|
|
27
|
+
|
|
28
|
+
### Added
|
|
29
|
+
|
|
30
|
+
- The five hand-written architecture documents `OVERVIEW.md`, `ARCHITECTURE.md`, `COMPONENTS.md`,
|
|
31
|
+
`DATAFLOW.md` and `API.md` in `docs/architecture/`. Each ends with a Verification table that
|
|
32
|
+
`repo-tools check` reads. The root `README.md` has a Documentation section that links all ten
|
|
33
|
+
architecture documents and the design document.
|
|
34
|
+
- The config key `dispatchCalls` (in section `depgraph` or `map`) lists the calls that register a typed-dispatch
|
|
35
|
+
constant. The duplicate report tagged only the call `mathTyped` as `DISPATCH_VARIANT`. Repositories with other
|
|
36
|
+
registration calls received a `TRUE_DUPLICATE` for each registered name. The default list is
|
|
37
|
+
`["mathTyped"]`, and with the default the reports are byte for byte the reports of 2.3.0. An empty list switches
|
|
38
|
+
the tag off. `repo-tools map` and `repo-tools check` both read the key, so the measured counts agree. The note in
|
|
39
|
+
`duplicate-symbols.json` and the text in `duplicate-symbols.md` show the names of the listed calls.
|
|
40
|
+
`docs/design.md` section 5.1 states the rules.
|
|
41
|
+
- `repo-tools ste --require=<path>` states that the gate must cover a file. The option repeats. The run exits 2 when
|
|
42
|
+
the file does not exist, or when the run did not examine it. A document that someone deletes inside a folder that
|
|
43
|
+
still exists gave no finding before.
|
|
44
|
+
- `repo-tools ste --since=<rev>` keeps only the findings on the lines that the working tree adds or changes since the
|
|
45
|
+
git revision `<rev>`. A long document with old findings can now gate a new edit. A sentence-length finding counts
|
|
46
|
+
when any line of its paragraph changed. The totals line gives the number of hidden findings. `docs/design.md`
|
|
47
|
+
section 9.1 states the rules. A run without the two options gives the same output as before.
|
|
48
|
+
- The summary of `repo-tools clones` lists the files with a parse error, one path on each line, in code-unit order.
|
|
49
|
+
The summary gave only the number before, so a reader could not act on it. The new setting `parseErrorList` (flag
|
|
50
|
+
`--list-errors`, default 20) sets the most paths in the list. `clones.json` does not hold the setting. A run
|
|
51
|
+
without parse errors gives the same output as before. `docs/design.md` section 17.7 states the format.
|
|
52
|
+
- `docs/parity-clones.md` has a second repository, deepthinking-mcp (243 files). 1,172 units are the same, and the
|
|
53
|
+
command finds all 12 exact groups of the prototype. The 29 units that only one side reports lie at the cutoff of
|
|
54
|
+
50 labels, except two functions that are mostly template strings. Tree-sitter makes a node for each escape
|
|
55
|
+
sequence of a template string, and the prototype makes one node for each template element.
|
|
56
|
+
|
|
57
|
+
### Changed
|
|
58
|
+
|
|
59
|
+
- The five duplicate functions that `repo-tools clones` found in this repository are merged. `realPath` is in
|
|
60
|
+
`src/io.ts` (it was in `src/chunk/index.ts` and `src/depgraph/extensions.ts`). `rglobParts` is in
|
|
61
|
+
`src/map/discovery.ts`, and `csprojParts` calls it. `summaryRowsOf` takes the two labels that differ, so the
|
|
62
|
+
2.0.0 Markdown no longer has a second copy of the row list. The two type-only checks of `src/map/parsing.ts` share
|
|
63
|
+
one helper. The output of every command is unchanged. The source has 41 lines fewer. `clones` now finds 0
|
|
64
|
+
exact groups (it found 2) and 1 near pair (it found 8).
|
|
65
|
+
- The repository now has its own `docs/architecture/` folder. `repo-tools map . --out=docs/architecture` writes it:
|
|
66
|
+
the dependency graph, the file inventory, the duplicate and unused reports, and the test coverage. `repo-tools check`
|
|
67
|
+
passes against it. Biome skips this folder, because the generator owns the format of its files.
|
|
68
|
+
- The privacy check (`scripts/privacy-check.ts`) keeps the hashes of the candidates of each word, so it hashes a word
|
|
69
|
+
once. The scan of this repository took about 4.5 s on a Windows machine and takes about 1.5 s now, and the findings
|
|
70
|
+
are the same. The test "this repository scans clean" timed out at the 5 s default of `bun test` on that machine.
|
|
71
|
+
A memo of at most 20,000 words keeps the memory bounded.
|
|
72
|
+
- Every report of `repo-tools map` carries the `name` field of `package.json` as the project name. A report uses
|
|
73
|
+
the folder name only when `package.json` has no name, or when the name is empty or not a string.
|
|
74
|
+
`dependency-graph.json` and `dependency-graph.yaml` wrote the folder name before, so two checkouts of one repository
|
|
75
|
+
gave two graphs. A committed `dependency-graph.json` changes once in a repository whose folder name differs from
|
|
76
|
+
its package name. `tests/unit/map-project-name.test.ts` pins the rule, and `docs/design.md` section 14.4 states it.
|
|
77
|
+
- The two file lists of `TEST_COVERAGE.md` have the headings `Source Files Not Imported By A Test` and
|
|
78
|
+
`Source Files Imported By A Test`. The headings said `Without Test Coverage` and `With Test Coverage`. The report
|
|
79
|
+
counts a file when a test file imports it. A file that only an end-to-end spec runs was therefore on the first list
|
|
80
|
+
under a heading that said it had no coverage. The text for an empty first list changed in the same way.
|
|
81
|
+
`docs/design.md` section 14.2 states the basis.
|
|
82
|
+
- The README, `docs/design.md` (sections 17 and 17.8) and `docs/parity-clones.md` state the scope of `repo-tools clones`.
|
|
83
|
+
The command serves the owner of one repository during a refactoring. A score ranks the pairs of one run. A count or
|
|
84
|
+
a score does not compare between repositories, settings or tool versions. The two parsers of the parity record
|
|
85
|
+
already give different pair counts on the same input. The parity record is a regression record for the choice
|
|
86
|
+
of parser. No code changed.
|
|
87
|
+
- `docs/design.md` section 17.8 states that a decorator before a top-level function (the AssemblyScript `@inline`) is a
|
|
88
|
+
parse error in tree-sitter-typescript. The summary lists the file, and the functions of the file still give units.
|
|
89
|
+
The AssemblyScript sources of MathTS have one such file in 26. All 16 functions of that file give units with
|
|
90
|
+
`--min-nodes=1`. No code changed.
|
|
91
|
+
|
|
92
|
+
### Fixed
|
|
93
|
+
|
|
94
|
+
- `repo-tools map` writes `typeOnly: true` for the edge of `export type * from 'm'` and `export type * as ns from
|
|
95
|
+
'm'`. The grammar (`tree-sitter-typescript` 0.23.2) does not know this syntax and puts the word `type` inside an
|
|
96
|
+
error node, so the edge held `typeOnly: false`. A cycle through such an edge counted as a runtime cycle. A
|
|
97
|
+
committed `dependency-graph.json` changes in a repository that uses the syntax. `docs/design.md` section 14.4
|
|
98
|
+
states the rule.
|
|
99
|
+
- `repo-tools ste` does not measure a list of identifiers against the sentence limit. A list item or a sentence
|
|
100
|
+
whose only words are `and`, `or` and inline code is a list of names, not a sentence. A generated report of
|
|
101
|
+
`repo-tools map` gave such a bullet of 32 words (limit 25), so `repo-tools ste` failed on its own output. A sentence
|
|
102
|
+
with one prose word keeps the limit, and so does prose with many code spans. `docs/design.md` section 9 states the
|
|
103
|
+
difference from the Python checker.
|
|
104
|
+
|
|
9
105
|
## [2.3.0] - 2026-10-22
|
|
10
106
|
|
|
11
107
|
### Added
|
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
| `clones` | Lists the functions of a TypeScript or JavaScript repository, and finds the functions that copy each other. |
|
|
15
15
|
| `ste` | Checks Markdown or docstring prose against Simplified Technical English. |
|
|
16
16
|
|
|
17
|
-
Status: version 2.
|
|
17
|
+
Status: version 2.5.0.
|
|
18
18
|
|
|
19
19
|
- `map`, `check` and `query` read their settings from `repo-tools.config.json` in the root. The
|
|
20
20
|
section of `map` is `map` (its old name, `depgraph`, is also read). `--config=<file>` makes any
|
|
@@ -44,7 +44,7 @@ repo-tools --version
|
|
|
44
44
|
|
|
45
45
|
The executable holds the tool and the Bun runtime. It needs no Bun, Node or `node_modules`.
|
|
46
46
|
Download the file for your platform and `SHA256SUMS` from the
|
|
47
|
-
[GitHub release](https://github.com/danielsimonjr/repo-tools/releases/tag/v2.
|
|
47
|
+
[GitHub release](https://github.com/danielsimonjr/repo-tools/releases/tag/v2.5.0):
|
|
48
48
|
|
|
49
49
|
| Platform | File |
|
|
50
50
|
|---|---|
|
|
@@ -343,8 +343,13 @@ Exit codes: 0 when the run finished, even if it found no copy. 1 when the root h
|
|
|
343
343
|
to read. 2 on a usage error, a bad config file or a root that is not a folder.
|
|
344
344
|
|
|
345
345
|
The result is a list of candidates. Read both bodies of a pair before you change anything.
|
|
346
|
+
|
|
347
|
+
The command serves the owner of one repository during a refactoring. A score ranks the pairs of one run. Do not
|
|
348
|
+
compare counts or scores between repositories, settings or tool versions.
|
|
349
|
+
|
|
346
350
|
`docs/design.md` (section 17) gives the rules. `docs/parity-clones.md` records the comparison with the
|
|
347
|
-
prototype of the memoryjs audit.
|
|
351
|
+
prototype of the memoryjs audit, on memoryjs and on deepthinking-mcp. The record shows that the two parsers
|
|
352
|
+
agree. The record makes no claim about other repositories.
|
|
348
353
|
|
|
349
354
|
## Develop
|
|
350
355
|
|
|
@@ -361,6 +366,24 @@ prototype of the memoryjs audit.
|
|
|
361
366
|
| `bun run audit:ledger` | Reverts each fix of `docs/fix-ledger-2.0.0.md` in a scratch copy and checks that a test of that fix fails. |
|
|
362
367
|
| `bun run check:design` | Finds each reference to a section of `docs/design.md` that has no heading with that number. |
|
|
363
368
|
|
|
369
|
+
## Documentation
|
|
370
|
+
|
|
371
|
+
| Document | Contents |
|
|
372
|
+
|---|---|
|
|
373
|
+
| [docs/architecture/OVERVIEW.md](docs/architecture/OVERVIEW.md) | The project, its metrics and its layout. |
|
|
374
|
+
| [docs/architecture/ARCHITECTURE.md](docs/architecture/ARCHITECTURE.md) | The layers, the key decisions, the build and the test strategy. |
|
|
375
|
+
| [docs/architecture/COMPONENTS.md](docs/architecture/COMPONENTS.md) | Each module, with the real signatures of its exports. |
|
|
376
|
+
| [docs/architecture/DATAFLOW.md](docs/architecture/DATAFLOW.md) | One run of each subcommand, step by step. |
|
|
377
|
+
| [docs/architecture/API.md](docs/architecture/API.md) | The commands, the flags, the config keys, the exit codes and the report files. |
|
|
378
|
+
| [docs/architecture/FILE_INVENTORY.md](docs/architecture/FILE_INVENTORY.md) | Every source file with its area and disposition. Generated. |
|
|
379
|
+
| [docs/architecture/TEST_COVERAGE.md](docs/architecture/TEST_COVERAGE.md) | The source files that a test imports. Generated. |
|
|
380
|
+
| [docs/architecture/DEPENDENCY_GRAPH.md](docs/architecture/DEPENDENCY_GRAPH.md) | Who imports whom. Generated. |
|
|
381
|
+
| [docs/architecture/unused-analysis.md](docs/architecture/unused-analysis.md) | Files and exports with no importer. Generated. |
|
|
382
|
+
| [docs/architecture/duplicate-symbols.md](docs/architecture/duplicate-symbols.md) | Names that more than one file defines. Generated. |
|
|
383
|
+
| [docs/design.md](docs/design.md) | The design of each subcommand, section by section. |
|
|
384
|
+
|
|
385
|
+
Run `repo-tools check . --docs=docs/architecture` to compare the numbers in these documents with the code.
|
|
386
|
+
|
|
364
387
|
## Design
|
|
365
388
|
|
|
366
389
|
`docs/design.md` describes the modules, the output rules, the config, the extension contract,
|