Changed file code line ranges
File path relative to the repo
Module alias to a path
Filter file extensions, default value: ['.js', '.jsx', '.ts', '.tsx]
.
Paths where to look for JS modules, if you have customised modules other than npm's node_modules
.
@babel/parser
options for parsing file to AST
Limit paths of tracked files to check with. By default it will check all the git tracked files.
Find what declarations does the code line changes belong to.
@babel/parser
options
A list of object contains module absolute path and declaration name
Compare 2 git revisions and get an object refelcting the changes.
Git revision.
Git revision.
Find what module declarations will be affected by changing given code lines in given git revision context.
Git revision
Generated using TypeDoc
git-changes-affected
Find git changes affected files
Quick start
Intalling via npm:
Fnd what modules your last commit change affects by:
const gitChangesAffected = require('git-changes-affected'); gitChangesAffected();
Find impact of changes by certain commit:
gitChangesAffected({ to: '59037780a46c5000830a7a6705ebfa82d5a30095' });
Find impact of changes between 2 revisions:
gitChangesAffected({ to: '59037780a46c5000830a7a6705ebfa82d5a30095', from: '8e0d337483f9c9db07deeb2d82d7a8b3f8515423' });
If your repo uses special supports like JSX, flow, typescript, etc., you will need to enable
@babel/parser
plugins as following:gitChangesAffected({ parserOptions: { plugins: ['jsx', 'typescript'] } });