{"id":48908323,"url":"https://github.com/zaxovaiko/depretec","last_synced_at":"2026-04-16T22:01:29.544Z","repository":{"id":351867859,"uuid":"1212786519","full_name":"zaxovaiko/depretec","owner":"zaxovaiko","description":"CLI that scans JS/TS projects for @deprecated JSDoc usages and maps them to their replacements. Zero-config, CI-ready.","archived":false,"fork":false,"pushed_at":"2026-04-16T20:51:10.000Z","size":1045,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-16T21:32:57.165Z","etag":null,"topics":["bun","cli","codemods","deprecated","developer-tools","javascript","jsdoc","migration","static-analysis","typescript"],"latest_commit_sha":null,"homepage":"https://zaxovaiko.github.io/depretec/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zaxovaiko.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-16T18:23:21.000Z","updated_at":"2026-04-16T20:51:13.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/zaxovaiko/depretec","commit_stats":null,"previous_names":["zaxovaiko/depdet"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/zaxovaiko/depretec","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zaxovaiko%2Fdepretec","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zaxovaiko%2Fdepretec/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zaxovaiko%2Fdepretec/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zaxovaiko%2Fdepretec/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zaxovaiko","download_url":"https://codeload.github.com/zaxovaiko/depretec/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zaxovaiko%2Fdepretec/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31905895,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-16T18:22:33.417Z","status":"ssl_error","status_checked_at":"2026-04-16T18:21:47.142Z","response_time":69,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bun","cli","codemods","deprecated","developer-tools","javascript","jsdoc","migration","static-analysis","typescript"],"created_at":"2026-04-16T22:01:17.973Z","updated_at":"2026-04-16T22:01:29.530Z","avatar_url":"https://github.com/zaxovaiko.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# depretec\n\nFind `@deprecated` JSDoc usages in your JS/TS project and map them to their replacements.\n\n- Scans your source **and** your `node_modules` types for `@deprecated` symbols.\n- Extracts the replacement hint from both `{@link X}` and free-text (\"Use `X` instead\", \"Replaced by `X`\", \"Prefer `X`\").\n- Outputs a pretty table, JSON (LLM-friendly), or Markdown (PR-friendly).\n- Zero config. Respects your `.gitignore` and `tsconfig.json`, skips `@generated` files.\n\n## Install / run\n\n```sh\n# no install\nnpx depretec\nbunx depretec\n\n# or pin it\nbun add -D depretec\n```\n\n## Example: zod v4\n\n`src/schema.ts`:\n\n```ts\nimport { z } from 'zod'\nexport const Schema = z.object({\n  email: z.string().email(),\n  site: z.string().url(),\n})\n```\n\n```sh\n$ npx depretec\n┌───────────────────┬─────────────────┬───┬─────────────┐\n│ Location          │ Deprecated      │ → │ Replacement │\n├───────────────────┼─────────────────┼───┼─────────────┤\n│ src/schema.ts:3:21│ ZodString.email │ → │ z.email()   │\n├───────────────────┼─────────────────┼───┼─────────────┤\n│ src/schema.ts:4:20│ ZodString.url   │ → │ z.url()     │\n└───────────────────┴─────────────────┴───┴─────────────┘\n```\n\n## Feed it to an LLM\n\n```sh\nnpx depretec --format json | llm -s \"Apply these replacements to the files.\"\n```\n\n## Options\n\n```\nUsage: depretec [paths...] [options]\n\nOptions:\n  -f, --format \u003cfmt\u003e   pretty | json | md            (default: pretty)\n  -p, --project \u003cp\u003e    path to tsconfig.json         (default: auto-detect)\n      --include \u003cg\u003e    extra glob (repeatable)\n      --exclude \u003cg\u003e    exclude glob (repeatable)\n      --no-deps        only scan user source, skip node_modules\n      --fail-on-found  exit 1 if any occurrence      (for CI)\n  -h, --help\n  -v, --version\n```\n\nPositional `paths` pick the project root (first path wins). Defaults to `cwd`.\n\n## Programmatic API\n\n```ts\nimport { scan } from 'depretec'\n\nconst report = await scan({ cwd: './my-project' })\nfor (const o of report.occurrences) {\n  console.log(`${o.file}:${o.line} ${o.deprecation.qualifiedName} → ${o.deprecation.replacement ?? '?'}`)\n}\n```\n\n## How it works\n\nTwo passes over a TypeScript Program built via [`ts-morph`](https://ts-morph.com):\n\n1. **Collect** every declaration (`function`, `method`, `class`, `property`, `variable`, `type`, `interface`, `enum`, accessors) that carries a `@deprecated` JSDoc tag — both in your source and in dep `.d.ts`.\n2. **Match** every identifier in your source against those declarations using the TypeScript type checker (follows re-exports, resolves property access through method chains like `z.string().email()`).\n\nReplacement extraction tries, in order: `{@link X}` / `{@linkcode X}` / `{@linkplain X}`, then free-text heuristics (`use \\`X\\``, `replaced by \\`X\\``, `prefer \\`X\\``, and bareword variants).\n\n## Non-goals (for now)\n\n- Auto-fix / write files (planned for `--fix`).\n- `.vue` / `.svelte` / `.astro`.\n- Runtime deprecation detection.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzaxovaiko%2Fdepretec","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzaxovaiko%2Fdepretec","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzaxovaiko%2Fdepretec/lists"}