Skip to content

Commit

Permalink
fix(angular): correctly print unary expression with + (#5405)
Browse files Browse the repository at this point in the history
  • Loading branch information
ikatyang committed Nov 9, 2018
1 parent 4e7fca5 commit 6fafd0a
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -19,7 +19,7 @@
"@babel/parser": "7.1.5",
"@glimmer/syntax": "0.30.3",
"@iarna/toml": "2.0.0",
"angular-estree-parser": "1.1.4",
"angular-estree-parser": "1.1.5",
"angular-html-parser": "1.0.0",
"camelcase": "4.1.0",
"chalk": "2.1.0",
Expand Down
8 changes: 8 additions & 0 deletions tests/html_angular/__snapshots__/jsfmt.spec.js.snap
Expand Up @@ -85,6 +85,7 @@ exports[`attributes.component.html - angular-verify 1`] = `
{'btn-success': (dialog$ | async).level === dialogLevelEnum.SUCCESS,
'btn-warning': (dialog$ | async).level === dialogLevelEnum.WARNING,
'btn-svg': (dialog$ | async).level === dialogLevelEnum.DANGER}"
[stickout]="+toolAssembly.stickoutMm"
></div>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<div
Expand Down Expand Up @@ -194,6 +195,7 @@ exports[`attributes.component.html - angular-verify 1`] = `
'btn-warning': (dialog$ | async).level === dialogLevelEnum.WARNING,
'btn-svg': (dialog$ | async).level === dialogLevelEnum.DANGER
}"
[stickout]="+toolAssembly.stickoutMm"
></div>

`;
Expand Down Expand Up @@ -283,6 +285,7 @@ exports[`attributes.component.html - angular-verify 2`] = `
{'btn-success': (dialog$ | async).level === dialogLevelEnum.SUCCESS,
'btn-warning': (dialog$ | async).level === dialogLevelEnum.WARNING,
'btn-svg': (dialog$ | async).level === dialogLevelEnum.DANGER}"
[stickout]="+toolAssembly.stickoutMm"
></div>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<div
Expand Down Expand Up @@ -392,6 +395,7 @@ exports[`attributes.component.html - angular-verify 2`] = `
'btn-warning': (dialog$ | async).level === dialogLevelEnum.WARNING,
'btn-svg': (dialog$ | async).level === dialogLevelEnum.DANGER
}"
[stickout]="+toolAssembly.stickoutMm"
></div>

`;
Expand Down Expand Up @@ -481,6 +485,7 @@ exports[`attributes.component.html - angular-verify 3`] = `
{'btn-success': (dialog$ | async).level === dialogLevelEnum.SUCCESS,
'btn-warning': (dialog$ | async).level === dialogLevelEnum.WARNING,
'btn-svg': (dialog$ | async).level === dialogLevelEnum.DANGER}"
[stickout]="+toolAssembly.stickoutMm"
></div>
~
<div
Expand Down Expand Up @@ -812,6 +817,9 @@ exports[`attributes.component.html - angular-verify 3`] = `
.level ===
dialogLevelEnum.DANGER
}"
[stickout]="
+toolAssembly.stickoutMm
"
></div>

`;
Expand Down
1 change: 1 addition & 0 deletions tests/html_angular/attributes.component.html
Expand Up @@ -82,4 +82,5 @@
{'btn-success': (dialog$ | async).level === dialogLevelEnum.SUCCESS,
'btn-warning': (dialog$ | async).level === dialogLevelEnum.WARNING,
'btn-svg': (dialog$ | async).level === dialogLevelEnum.DANGER}"
[stickout]="+toolAssembly.stickoutMm"
></div>
6 changes: 3 additions & 3 deletions yarn.lock
Expand Up @@ -704,9 +704,9 @@ amdefine@>=0.0.4:
version "1.0.1"
resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5"

angular-estree-parser@1.1.4:
version "1.1.4"
resolved "https://registry.yarnpkg.com/angular-estree-parser/-/angular-estree-parser-1.1.4.tgz#173fd2a9a30ccd38864e879e66b83cbbbdfd45db"
angular-estree-parser@1.1.5:
version "1.1.5"
resolved "https://registry.yarnpkg.com/angular-estree-parser/-/angular-estree-parser-1.1.5.tgz#f278e03e648a2bfb6c5dcdf17ba3273f3251b74a"
dependencies:
lines-and-columns "^1.1.6"
tslib "^1.9.3"
Expand Down

0 comments on commit 6fafd0a

Please sign in to comment.