angular-estree-parser
Advanced tools
Comparing version 2.0.0 to 2.0.1
@@ -5,2 +5,13 @@ # Change Log | ||
<a name="2.0.1"></a> | ||
## [2.0.1](https://github.com/ikatyang/angular-estree-parser/compare/v2.0.0...v2.0.1) (2020-05-09) | ||
### Bug Fixes | ||
* **transform:** correct chained optional expression with computed properties ([#193](https://github.com/ikatyang/angular-estree-parser/issues/193)) ([73cf46d](https://github.com/ikatyang/angular-estree-parser/commit/73cf46d)) | ||
* **transform:** handle ThisExpression correctly ([#194](https://github.com/ikatyang/angular-estree-parser/issues/194)) ([cf89706](https://github.com/ikatyang/angular-estree-parser/commit/cf89706)) | ||
<a name="2.0.0"></a> | ||
@@ -7,0 +18,0 @@ # [2.0.0](https://github.com/ikatyang/angular-estree-parser/compare/v1.3.1...v2.0.0) (2020-04-02) |
@@ -89,14 +89,17 @@ "use strict"; | ||
} | ||
case 'ImplicitReceiver': { | ||
return _c('ThisExpression', {}, node.span, { | ||
hasParentParens: isInParentParens, | ||
}); | ||
} | ||
case 'KeyedRead': { | ||
const { obj, key } = node; | ||
const tObj = _t(obj); | ||
const tKey = _t(key); | ||
return _c('MemberExpression', { | ||
return _transformReceiverAndName(obj, tKey, { | ||
computed: true, | ||
object: tObj, | ||
property: tKey, | ||
optional: false, | ||
}, { | ||
start: _getOuterStart(tObj), | ||
end: node.span.end, | ||
}, { hasParentParens: isInParentParens }); | ||
hasParentParens: isInParentParens, | ||
}); | ||
} | ||
@@ -285,8 +288,7 @@ case 'LiteralArray': { | ||
function _transformReceiverAndName(receiver, tName, props, { end = _getOuterEnd(tName), hasParentParens = false } = {}) { | ||
// implicit `this` | ||
if (receiver.span.start >= receiver.span.end) { | ||
return tName; | ||
} | ||
const tReceiver = utils_1.getNgType(receiver) === 'ImplicitReceiver' | ||
? _c('ThisExpression', {}, receiver.span) | ||
: _t(receiver); | ||
const tReceiver = _t(receiver); | ||
const isOptionalReceiver = _isOptionalReceiver(tReceiver); | ||
@@ -293,0 +295,0 @@ return _c(props.optional || isOptionalReceiver |
{ | ||
"name": "angular-estree-parser", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "A parser that converts Angular source code into an ESTree-compatible form", | ||
@@ -5,0 +5,0 @@ "keywords": [], |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
45619
956