angularjs-third-party-deps
Mine AngularJS-specific third-party packages and migration blockers; read-only metrics
# angularjs-third-party-deps
Read-only **mining codemod** that scans `package.json` (`dependencies`, `devDependencies`, `peerDependencies`) for AngularJS (1.x)-specific packages and classifies each as a migration blocker, and emits `angularjs_dependency` metrics. No files are written to the target repo.
## Detection
Matches AngularJS ecosystem naming conventions only:
- `angular` (core)
- `angular-*` (e.g. `angular-route`, `angular-mocks`, `angular-resource`, `angular-sanitize`, `angular-animate`, `angular-touch`, `angular-cookies`, `angular-messages`, `angular-translate`, `angular-ui-bootstrap`, `angular-ui-router`, ...)
- `ui-router` / `@uirouter/*` (`@uirouter/angularjs`, `@uirouter/core`, `@uirouter/angular`, `@uirouter/angular-hybrid`, ...)
- `ng-*` (legacy AngularJS directive libraries, e.g. `ng-file-upload`, `ng-table`)
Modern Angular (2+) packages are intentionally excluded: `@angular/*` doesn't start with `angular-`/`@uirouter/`, and `ngx-*` doesn't start with `ng-` (no hyphen immediately after `ng`).
## Classification
| `classification` | `risk` | Meaning |
| ------------------ | -------- | ------------------------------------------------------------------------------------------------------------------ |
| `unsupported` | critical | AngularJS-only, EOL, no forward-compatible path — must be removed |
| `needs-equivalent` | medium | An Angular (2+) counterpart exists but requires a manual/partial rewrite |
| `compatible` | low | Built for the hybrid AngularJS/Angular bridge itself (e.g. `@uirouter/angular-hybrid`) — low risk during migration |
Well-known packages use a curated exact-match table; unrecognized `angular-*`/`@uirouter/*`/`ng-*` names fall back to a conservative `needs-equivalent` / `manual` default.
## Metrics
| Metric | Cardinalities |
| ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `angularjs_dependency` | `file`, `package_name`, `version`, `dependency_type`, `classification`, `migration_category` (`dependency`), `risk`, `automation`, `effort_points`, `recommended_phase` |
## Installation
```bash
# Install from registry
codemod run angularjs-third-party-deps
# Or run locally
codemod run -w workflow.yaml
```
## Development
```bash
# Test the transformation
pnpm test
# Type-check
pnpm run check-types
# Validate the workflow
codemod workflow validate -w workflow.yaml
# Publish to registry
codemod login
codemod publish
```
## License
MIT