Registry / devops / angular-pr-guardian

angular-pr-guardian

JSON →
library1.0.0jsnpmunverified

Angular PR Guardian v1.0.0 is an automated migration readiness tool for Angular 20+, scanning projects for deprecated APIs, performance issues, and providing actionable migration recommendations. It features 20+ migration rules covering standalone components, Signals migration, new control flow (@if/@for), performance optimizations, and deprecated API detection. Released under MIT license, it supports zero-config usage, works with local paths and GitHub URLs, and generates detailed reports with prioritized fix suggestions.

npm install angular-pr-guardian
INSTALL
IMPORT
SIG · ANGULAR-PR-GUARDIA
A
angular-pr-guardian
devopsjavascriptv1.0.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

AngularPRGuardian
import { AngularPRGuardian } from 'angular-pr-guardian'
import AngularPRGuardian from 'angular-pr-guardian'
Named export only; no default export.
scanProject
import { scanProject } from 'angular-pr-guardian'
const { scanProject } = require('angular-pr-guardian')
ESM-only; CommonJS require is not supported.
generateReport
import { generateReport } from 'angular-pr-guardian'
import { GenerateReport } from 'angular-pr-guardian'
Function name is camelCase, not PascalCase.
MigrationRule interface
import { MigrationRule } from 'angular-pr-guardian'
TypeScript type import for custom rules.

Shows two ways to use the tool: via AngularPRGuardian class and scanProject function, with token for GitHub.

import { AngularPRGuardian, scanProject } from 'angular-pr-guardian'; async function check() { const guard = new AngularPRGuardian({ projectPath: '.', ghToken: process.env.GH_TOKEN ?? '' }); const results = await guard.run(); console.log('Issues found:', results.issues.length); // Or use scanProject directly const scan = await scanProject({ projectPath: '.', verbose: true }); console.log(scan.summary); } check().catch(console.error);
Debug
Known issues
breakingRequires Node.js >=16.0.0; older versions will throw an engine error.
fix
Upgrade Node.js to v16 or higher.
affects: >=1.0.0
deprecatedThe 'opts.useLegacyParser' option (v0.9.x) is removed; parser is auto-detected.
fix
Remove 'useLegacyParser' from options object.
affects: >=1.0.0
gotchaGitHub token (GH_TOKEN) required when scanning remote repos; otherwise fetch fails.
fix
Set GH_TOKEN environment variable or pass in options.
affects: >=1.0.0
gotchaDoes not auto-fix issues; only generates recommendations. Users must apply fixes manually.
fix
Use '--fix' flag is not supported; manually apply suggestions.
affects: >=1.0.0
gotchaMay report false positives for Angular 19 projects using experimental APIs that are not yet deprecated.
fix
Use 'ignoreRules' option to suppress specific rules.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Cannot find module 'angular-pr-guardian'
Package not installed globally or locally.
fix
Run 'npm install -g angular-pr-guardian' or 'npm install angular-pr-guardian'.
TypeError: angular_pr_guardian_1.scanProject is not a function
Using CommonJS require instead of ESM import.
fix
Use 'import { scanProject } from "angular-pr-guardian"' in ESM context.
Error: GH_TOKEN is required for remote repositories
Missing GitHub token when scanning a GitHub URL.
fix
Set GH_TOKEN environment variable or pass token in options.
Upgrade
Version history
1.0.0latest on npm
Audit
Dependencies
@angular/compilerrequiredRequired to parse Angular templates and detect deprecated syntax
chalkrequiredUsed for colored console output in reports
typescriptrequiredRequired for parsing TypeScript files and Angular decorators
Agent activity
43 hits · last 30 days
node
36
OpenAI (training)
1
Resources
angular-pr-guardian — npm install angular-pr-guardian · libregistry