deprecated-tracker 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 CHANGED
@@ -2,6 +2,61 @@
2
2
 
3
3
  All notable changes to the "Deprecated Tracker" extension will be documented in this file.
4
4
 
5
+ ## [2.5.0]
6
+
7
+ ### Changed
8
+
9
+ - **Every surface was redesigned.** The results panel, the statistics overview, the settings panel and the sidebar view now share one palette, one type scale and one set of icons. The organising idea is the only classification the scanner can make honestly for every project: each deprecated declaration is **documented** (it names a replacement), **bare** (it says nothing) or **unused** (nothing calls it), and each is a different job. No severity levels and no removal-version grouping, both of which were explored and neither of which exists reliably in the data โ€” `deprecationSchedule` is optional and usually absent, because it can only be recovered from prose in the tag. A composition band above the results carries the three counts, and each row picks up a coloured rail for its class.
10
+ - **Emoji are gone from the interface.** `๐Ÿ“Š ๐Ÿ“‹ ๐Ÿ“ฆ โš ๏ธ ๐Ÿ”— ๐Ÿ“ˆ ๐ŸŽฏ ๐Ÿ”ฅ` in the statistics dashboard and `๐Ÿ” โš™๏ธ ๐Ÿ“Š ๐Ÿ“‹ ๐Ÿ•’` in the sidebar are inline SVG, which takes a colour, follows the theme and renders identically on every platform. One pair remains, in the requirements panel, because an asset test asserts its exact text.
11
+ - **The panel chrome shrank.** A 24px heading with 35px of padding around it became a 44px toolbar; rows are 38px. On a panel docked to a third of the screen, the old proportions spent more space describing the view than showing it. The sidebar lost its card border and its 44px drop-shadowed buttons for the same reason.
12
+ - **Three hardcoded colours are gone.** `#ff9800`, `#f57c00` and `#ff6b6b` ignored the theme entirely. Every rule now reads a `--dt-*` token, and high-contrast themes hand every one of those tokens straight back to VS Code rather than overriding it.
13
+
14
+ ### Added
15
+
16
+ - **The composition band filters.** Clicking *documented*, *no reason* or *unused* narrows the table to that class, and the active segment is marked with a ring rather than by colour alone.
17
+ - **Resizable columns.** Drag the boundary between any two headers; double-click resets. The handle draws nothing โ€” the `col-resize` cursor is the whole affordance โ€” and it is grabbable beside any row, not only in the header.
18
+ - **Click a row to expand its call sites**, with the count shown as a badge instead of a `Show 2 usages` button. Clicks that land on a link or a button still belong to that control.
19
+ - **The table header stays put while the rows scroll.**
20
+ - **Symbol and file names are reachable from the keyboard.** They were already clickable, but they are `<span>`s, so they had no tab stop and no `Enter` handler. Both now do, and the hover affordance is an underline that appears on the row rather than a permanent one โ€” an underlined list is unreadable.
21
+
22
+ ### Fixed
23
+
24
+ - **Switching away from a panel and back reset it.** `MainPanel` explicitly set `retainContextWhenHidden: false`, so VS Code tore the webview down whenever the tab went to the background and reloaded the HTML on return, losing the scroll position and every expanded call-site list. Clicking a result โ€” the panel's main action โ€” moved focus to the editor and did exactly that. The statistics and ignore panels never set the option at all and defaulted to the same behaviour. All three now retain their context, and the webview additionally declines to rebuild the table when it is re-sent a result set identical to the one already on screen.
25
+ - **A column filter could zero a symbol's call sites.** The filters tested each item independently, but a declaration and its call sites are separate items and the call sites usually live in other files. Filtering by `api` therefore deleted every usage recorded in `edge-usages.ts` and left the declarations reading `0 ยท unused` โ€” the row then classified itself as unused, which was false. Filters now select whole groups, matched against the same values the row displays, so a surviving group keeps all of its items.
26
+ - **Cancelling a scan hid the View Results button until the next successful one.** Starting a scan hid the button, and neither the cancel path nor the failure path restored it, even though the previous scan's results were still held and still openable. The button's visibility now follows only whether results exist.
27
+ - **The row separator broke into pieces.** It was drawn per cell, and the rows are CSS grids: the line stopped at every column gap, fell short of the row padding at both ends, and โ€” because the cells are centred and differ in height โ€” drew each segment at its own height. The separator belongs to the row.
28
+ - **The webview panels showed a generic document icon** in their editor tabs. All five now carry the extension's own mark, in the light and dark variants VS Code needs for a tab icon.
29
+
30
+ ### Internal
31
+
32
+ - **`style.css` was rebuilt on a token layer.** Every rule consumed `--vscode-*` directly across 1,467 lines, so a palette change meant editing hundreds of declarations; there is now one `:root` block and one override per theme class. Roughly 110 lines of verbatim-duplicated rules and 17 rule blocks with no matching markup were removed at the same time.
33
+ - **`settings.css` carries its own copy of the tokens.** `SettingsPanel` builds its own `styleUri` and loads that file alone, so it never sees the shared stylesheet; pointing it at the shared tokens would leave every colour undefined.
34
+ - **`--dt-faint` is not the colour the palette specified.** `#6F7B83` measures 3.9:1 on the dark ground and `#7E8A91` measures 3.5:1 on the light one, both under the 4.5:1 that AA requires for body text. They are `#8A959C` and `#6B767D`.
35
+
36
+ ## [2.4.1]
37
+
38
+ ### Fixed
39
+
40
+ - **The webview panels escaped some values and not others.** The results history and the four statistics tables ran names, file paths and reasons through `escapeHtml`, but interpolated counts, kinds and scan ids straight into `innerHTML` on the assumption that a number cannot carry markup. That assumption holds for the value's type and not for its origin: every one of those fields is derived from the scanned project, which is code the extension was pointed at rather than code it trusts. Six sites across `main.js` and `statistics.js` now escape uniformly. Escaping a number is free, and a template where some interpolations are escaped and others are not is a template nobody can review at a glance.
41
+
42
+ ### Internal
43
+
44
+ - **The packaging scripts built shell command strings out of `__dirname`.** `scripts/package.js` and `scripts/publish.js` composed `npm` and `npx` invocations by interpolating an absolute path into a string and handing it to `execSync`, so a checkout directory containing shell metacharacters would have been interpreted rather than quoted. Both now use `execFileSync` with an argv array, which has no shell to interpret anything. They invoke npm through `process.env.npm_execpath` rather than spawning `npm.cmd`, because Node refuses to spawn a `.cmd` without a shell and re-adding one would have undone the fix. The consequence for contributors: these scripts must be run through npm โ€” `npm run build-package`, not `node scripts/package.js`, which now exits with a message saying so.
45
+ - **Pinned patched versions of six transitive development dependencies.** An `overrides` block moves `js-yaml`, `minimatch`, `@babel/core` and `ajv` onto their fixed releases, taking `npm audit` to zero. None of this reaches a user: the published package declares no runtime dependencies, and these packages exist only under jest, eslint and their trees.
46
+
47
+ ## [2.4.0]
48
+
49
+ ### Added
50
+
51
+ - **Go to declaration, from the usage.** A deprecated usage told you what it was and why, but not where the deprecated symbol lives โ€” finding that meant searching for the name and picking the declaration out of its own call sites. The diagnostic now carries the declaration's location, so VS Code links to it from the Problems panel and the hover, and **Quick Fix** on the usage offers **Go to declaration (file:line)**. It navigates and nothing else: applying a replacement guessed out of the prose in a `@deprecated` tag stays parked, because a wrong edit is worse than none.
52
+
53
+ ## [2.3.1]
54
+
55
+ ### Fixed
56
+
57
+ - **`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.
58
+ - **`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.
59
+
5
60
  ## [2.3.0]
6
61
 
7
62
  ### Changed
package/README.md CHANGED
@@ -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
- npx deprecated-tracker mcp install # --agent claude-code|codex|all
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. Restart the agent afterwards; Claude Code will ask you to approve a project-scoped server the first time.
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/SECURITY.md ADDED
@@ -0,0 +1,52 @@
1
+ # Security Policy
2
+
3
+ ## Supported versions
4
+
5
+ Fixes land on the latest released version only. There are no maintenance
6
+ branches for older releases.
7
+
8
+ | Version | Supported |
9
+ | ------- | --------- |
10
+ | 2.4.x | Yes |
11
+ | < 2.4 | No |
12
+
13
+ ## Reporting a vulnerability
14
+
15
+ Report privately through GitHub, not in a public issue:
16
+
17
+ 1. Go to the [Security tab](https://github.com/milad-hub/deprecated-tracker/security)
18
+ 2. Choose **Report a vulnerability**
19
+
20
+ That opens a private advisory visible only to you and the maintainer. Please
21
+ include the version, the platform, and the smallest reproduction you can manage.
22
+
23
+ Expect an acknowledgement within a week. If a report is confirmed, the fix and
24
+ the advisory are published together.
25
+
26
+ ## Scope
27
+
28
+ The published npm package declares no runtime dependencies, but that is a
29
+ statement about `package.json`, not about what executes on your machine.
30
+ esbuild inlines whatever the sources import, so the TypeScript compiler ships
31
+ inside `out/cli.js`. Anything bundled into a released artifact is in scope no
32
+ matter which dependency block it was declared in.
33
+
34
+ Reports that are in scope include:
35
+
36
+ - Code execution or file access outside the scanned project, whether from the
37
+ CLI, the MCP server, or a configuration file
38
+ - Cross-site scripting in the extension's webview panels, which render names,
39
+ file paths, and reasons taken from the scanned code
40
+ - The `mcp install` / `mcp uninstall` commands writing outside their declared
41
+ target when given hostile input
42
+ - Vulnerabilities in third-party code bundled into the published `.tgz` or
43
+ `.vsix`, including the TypeScript compiler
44
+
45
+ Out of scope:
46
+
47
+ - Vulnerabilities in build and test tooling that never leaves the development
48
+ machine โ€” jest, eslint, prettier, esbuild and their dependency trees. These
49
+ are tracked through Dependabot instead.
50
+ - Denial of service caused by pointing the scanner at a deliberately
51
+ pathological project. The scanner is a developer tool run against code you
52
+ already have on disk.
@@ -1,4 +1,4 @@
1
- #!/usr/bin/env node
1
+ #!/usr/bin/env node
2
2
  "use strict";
3
3
 
4
4
  const { run } = require("../out/cli.js");
package/docs/CLI.md CHANGED
@@ -173,9 +173,10 @@ the verbs by name, a schema for each, structured results instead of parsed
173
173
  stdout, and calls that do not each trip a shell-command approval.
174
174
 
175
175
  ```bash
176
- npx deprecated-tracker mcp install # every agent found, project scope
176
+ npx deprecated-tracker mcp install --agent claude-code --scope user
177
177
  npx deprecated-tracker mcp install --agent codex --scope user
178
- npx deprecated-tracker mcp uninstall # same flags, same targets
178
+ npx deprecated-tracker mcp install # every agent found, project scope
179
+ npx deprecated-tracker mcp uninstall --agent all --scope user
179
180
  ```
180
181
 
181
182
  | Tool | What it does |
@@ -199,6 +200,13 @@ Project scope is the default: it gets committed, so the whole team has the tool
199
200
  after a clone. `uninstall` removes only from the scope you name โ€” cleaning up a
200
201
  project never touches a user-level registration.
201
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
+
202
210
  The agent's own CLI (`claude mcp add`, `codex mcp add`) is used when it is on
203
211
  PATH; otherwise the config file is edited directly, merging rather than
204
212
  replacing. Two things to expect afterwards: