Registry / devops / ngma
library1.0.6jsnpmunverified

Command-line utility to scan AngularJS applications and recommend migration paths to Angular. Version 1.0.6 is the latest stable release. It analyzes code complexity, SLOC, antipatterns, and AngularJS version to suggest either rewrite or phased upgrade via ngUpgrade. Key differentiators: built-in antipattern detection, preparation report generation, and explicit rewrite threshold calculation. Periodic releases with no set cadence.

npm install ngma
INSTALL
IMPORT
SIG · NGMA
N
ngma
devopsjavascriptv1.0.6
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.

analysisTool
import { analysisTool } from 'ngma'
const analysisTool = require('ngma');
Package is ESM-only; named export. CommonJS require will fail.
analysisTool (default import)
import AnalysisTool from 'ngma'
Package also exports a default class. Ensure TypeScript 'esModuleInterop' is true for default import.
AnalysisResult type
import type { AnalysisResult } from 'ngma'
import { AnalysisResult } from 'ngma'
AnalysisResult is exported only as a type; using it in value position will cause runtime error.

Shows programmatic usage: create analysisTool instance, call runAnalysis with app path, and handle the resulting recommendation promise.

import { analysisTool } from 'ngma'; const tool = new analysisTool(); tool.runAnalysis('/path/to/angularjs-app') .then(recommendation => { console.log('Recommendation:', recommendation); }) .catch(err => { console.error('Analysis failed:', err); }); // Alternatively, use CLI: // ngma /path/to/angularjs-app
Debug
Known issues
gotchaAnalysis may be slow on large codebases due to synchronous file operations.
fix
Use asynchronous methods (e.g., countLinesOfCode) and await promises instead of blocking.
affects: all
gotchaMust have write permissions to the analyzed directory for writing reports.
fix
Ensure the process has appropriate write permissions or set up a working directory.
affects: all
deprecatedMethod 'buildPathIgnoringGlobs' is internal and may change without notice.
fix
Avoid using internal methods; rely on the public API: runAnalysis() and runRecommendation().
affects: all
Errors
Common errors & fixes
Error: Cannot find module 'ngma'
Package not installed globally or locally.
fix
Run 'npm install -g ngma' to install globally, or 'npm install ngma' for local project use.
TypeError: analysisTool is not a constructor
Using CommonJS require() on ESM-only package.
fix
Switch to ES modules: use import or ensure your package.json has "type": "module".
Error: EACCES: permission denied, open '/path/to/.ngma-report.json'
No write permission to the output directory.
fix
Run the tool with appropriate permissions or change working directory to a writable location.
Upgrade
Version history
1.0.6latest on npm
Audit
Dependencies
globrequiredfilesystem traversal and ignore pattern matching
parse-gitignorerequiredparsing .gitignore files into glob patterns
node-slocrequiredcounting source lines of code (SLOC)
readline-syncrequiredsynchronous user input for CLI interaction
Agent activity
9 hits · last 30 days
node
8
Amazon
1
Resources
packagengma
ngma — npm install ngma · libregistry