deprecated-tracker 2.2.0 → 2.3.1
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 +17 -0
- package/README.md +21 -3
- package/bin/deprecated-tracker.js +1 -1
- package/docs/CLI.md +15 -3
- package/out/cli.js +89 -86
- package/package.json +211 -211
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to the "Deprecated Tracker" extension will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [2.3.1]
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- **`scan_files` missed edits made after a file was staged.** The MCP tool took its changed lines from the index, so an agent that staged a file and then kept editing was told its newest code was clean — the exact flow the tool exists for. It now reads the working tree for the files it was given, while `--files` on the command line stays on the index: a pre-commit hook must judge what is about to be committed, not what merely happens to be in the editor.
|
|
10
|
+
- **`mcp install --scope project` could register the tool where no agent would look.** Project scope means the directory the command ran in, so running it from a home folder registered a "project" that is never opened, and the repo it was meant for got nothing. The install now names the directory it used and warns when that directory is not a git repository, pointing at `--scope user` for a registration that applies everywhere. Success messages say where the entry went, which the agents' own CLIs do not report.
|
|
11
|
+
|
|
12
|
+
## [2.3.0]
|
|
13
|
+
|
|
14
|
+
### Changed
|
|
15
|
+
|
|
16
|
+
- **The bare `deprecated-tracker` now prints its help instead of scanning the working directory.** Typing the name to find out what a freshly installed tool does answered "0 item(s) — PASS" from whatever directory the shell was in, which reads like the scanner is broken. Ask for the current directory explicitly: `deprecated-tracker .`. Every invocation that already carries a path or a flag is unaffected, including `--update-baseline`, `--staged`, `--changed` and `--files`.
|
|
17
|
+
|
|
18
|
+
### Fixed
|
|
19
|
+
|
|
20
|
+
- **`mcp install` never used the agent's own CLI on Windows.** `claude` and `codex` are `.cmd` shims there, and Node refuses to `execFile` a `.cmd` without a shell (CVE-2024-27980) — the bare name failed with `ENOENT` and the shim with `EINVAL`, so every Windows machine silently fell through to the config-file writer. That path works, but for `--scope user` it rewrites the whole of `~/.claude.json`, reformatting preferences that have nothing to do with this tool.
|
|
21
|
+
|
|
5
22
|
## [2.2.0]
|
|
6
23
|
|
|
7
24
|
### Added
|
package/README.md
CHANGED
|
@@ -16,7 +16,7 @@ Failing a build on *any* deprecated code is useless once a codebase already has
|
|
|
16
16
|
|
|
17
17
|
```bash
|
|
18
18
|
npx deprecated-tracker --update-baseline # commit .deprecated-tracker-baseline.json
|
|
19
|
-
npx deprecated-tracker
|
|
19
|
+
npx deprecated-tracker . # exits 1 only if the count went up
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
A first run with no baseline **passes** and tells you to record one. When the count falls it passes and prints how stale the baseline has become.
|
|
@@ -43,10 +43,28 @@ Recipes for husky, lefthook and the `pre-commit` framework (which has a `.pre-co
|
|
|
43
43
|
Register it once and Claude Code or Codex can call the scanner by name:
|
|
44
44
|
|
|
45
45
|
```bash
|
|
46
|
-
|
|
46
|
+
# Just you, every project you open
|
|
47
|
+
npx deprecated-tracker mcp install --agent claude-code --scope user
|
|
48
|
+
npx deprecated-tracker mcp install --agent codex --scope user
|
|
49
|
+
|
|
50
|
+
# The whole team, committed with the repo — run it from inside the repo
|
|
51
|
+
npx deprecated-tracker mcp install --agent claude-code --scope project
|
|
52
|
+
npx deprecated-tracker mcp install --agent codex --scope project
|
|
53
|
+
|
|
54
|
+
npx deprecated-tracker mcp install --agent all --scope project # both at once
|
|
55
|
+
npx deprecated-tracker mcp uninstall --agent all --scope user # same flags to undo
|
|
47
56
|
```
|
|
48
57
|
|
|
49
|
-
That exposes three tools — `scan_project`, `scan_changes` and `scan_files` — with schemas the agent can read, structured results, and no shell-approval prompt per call.
|
|
58
|
+
That exposes three tools — `scan_project`, `scan_changes` and `scan_files` — with schemas the agent can read, structured results, and no shell-approval prompt per call.
|
|
59
|
+
|
|
60
|
+
`--scope user` registers it for every project you open. `--scope project` is the default and registers it for **the directory you run the command in**, which is meant to be committed so a teammate has it after a clone — so run that one from inside the repo, not from your home folder, or you register a "project" no agent will ever open. The CLI prints which scope it used and where the entry went, and warns when a project install is happening outside a git repository. Where each lands:
|
|
61
|
+
|
|
62
|
+
| Agent | `--scope project` | `--scope user` |
|
|
63
|
+
|---|---|---|
|
|
64
|
+
| `claude-code` | `.mcp.json` at the repo root | `mcpServers` in `~/.claude.json` |
|
|
65
|
+
| `codex` | `.codex/config.toml` in the repo | `~/.codex/config.toml` |
|
|
66
|
+
|
|
67
|
+
The agent's own CLI (`claude mcp add`, `codex mcp add`) is used when it is on PATH; otherwise the config file is merged, never replaced. Then **restart the agent** — and with project scope, Claude Code asks you to approve the server the first time it sees it (`/mcp` if you miss the prompt). `mcp uninstall` removes only the scope you name.
|
|
50
68
|
|
|
51
69
|
No install needed either way: point `--files` at what the agent just wrote and read the JSON off stdout. Unstaged edits are covered, since a file with no staged hunks is read as entirely changed.
|
|
52
70
|
|
package/docs/CLI.md
CHANGED
|
@@ -12,9 +12,13 @@ The `deprecated-tracker` CLI does the other thing: it records today's count as a
|
|
|
12
12
|
```bash
|
|
13
13
|
npm run build # produces out/cli.js
|
|
14
14
|
node bin/deprecated-tracker.js --update-baseline # commit the baseline file
|
|
15
|
-
node bin/deprecated-tracker.js
|
|
15
|
+
node bin/deprecated-tracker.js . # exits 1 only if the count went up
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
+
A scan needs a path or a flag; the bare name prints the help instead, so
|
|
19
|
+
someone who types it to see what it does does not get a scan of whatever
|
|
20
|
+
directory their shell was in.
|
|
21
|
+
|
|
18
22
|
| Option | Effect |
|
|
19
23
|
|---|---|
|
|
20
24
|
| `--files <file...>` | Scan only these files; everything after is a path |
|
|
@@ -169,9 +173,10 @@ the verbs by name, a schema for each, structured results instead of parsed
|
|
|
169
173
|
stdout, and calls that do not each trip a shell-command approval.
|
|
170
174
|
|
|
171
175
|
```bash
|
|
172
|
-
npx deprecated-tracker mcp install
|
|
176
|
+
npx deprecated-tracker mcp install --agent claude-code --scope user
|
|
173
177
|
npx deprecated-tracker mcp install --agent codex --scope user
|
|
174
|
-
npx deprecated-tracker mcp
|
|
178
|
+
npx deprecated-tracker mcp install # every agent found, project scope
|
|
179
|
+
npx deprecated-tracker mcp uninstall --agent all --scope user
|
|
175
180
|
```
|
|
176
181
|
|
|
177
182
|
| Tool | What it does |
|
|
@@ -195,6 +200,13 @@ Project scope is the default: it gets committed, so the whole team has the tool
|
|
|
195
200
|
after a clone. `uninstall` removes only from the scope you name — cleaning up a
|
|
196
201
|
project never touches a user-level registration.
|
|
197
202
|
|
|
203
|
+
**A project registration means the directory you ran the command in.** Run it
|
|
204
|
+
from your home folder and the tool is registered for a "project" no agent will
|
|
205
|
+
ever open — nothing appears in the repo you meant, and it looks as though the
|
|
206
|
+
install did nothing. The CLI names the directory it used and warns when that
|
|
207
|
+
directory is not a git repository. Use `--scope user` when you want it
|
|
208
|
+
everywhere regardless of where you happen to be standing.
|
|
209
|
+
|
|
198
210
|
The agent's own CLI (`claude mcp add`, `codex mcp add`) is used when it is on
|
|
199
211
|
PATH; otherwise the config file is edited directly, merging rather than
|
|
200
212
|
replacing. Two things to expect afterwards:
|