Skip to content

Commit

Permalink
fix(angular): update function call broken by Angular changes (#857)
Browse files Browse the repository at this point in the history
* fix(angular): update function call broken by Angular changes

angular/angular#31391 introduces a breaking
change to `parseAction`, which now requires at least three parameters.
This provides a fix-forward for when the change lands.

* fixup! fix(angular): update function call broken by Angular changes

* fixup! fix(angular): update function call broken by Angular changes

* build: update package-lock.json
  • Loading branch information
ayazhafiz authored and mgechev committed Sep 25, 2019
1 parent 8ca34b1 commit d916eb3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -62,8 +62,8 @@
},
"homepage": "https://github.com/mgechev/codelyzer#readme",
"devDependencies": {
"@angular/compiler": "8.1.3",
"@angular/core": "8.1.3",
"@angular/compiler": "8.2.0",
"@angular/core": "8.2.0",
"@commitlint/cli": "8.1.0",
"@commitlint/config-angular": "8.1.0",
"@types/chai": "4.2.2",
Expand Down
2 changes: 1 addition & 1 deletion src/templateConditionalComplexityRule.ts
Expand Up @@ -54,7 +54,7 @@ export const getFailureMessage = (totalComplexity: number, maxComplexity = Rule.
const getTotalComplexity = (ast: AST): number => {
const expr = ((ast as ASTWithSource).source || '').replace(/\s/g, '');
const expressionParser = new Parser(new Lexer());
const astWithSource = expressionParser.parseAction(expr, null);
const astWithSource = expressionParser.parseAction(expr, null, 0);
const conditions: Binary[] = [];
let totalComplexity = 0;
let condition = astWithSource.ast as Binary;
Expand Down

0 comments on commit d916eb3

Please sign in to comment.