jsx-ast-utils
Advanced tools
Comparing version 3.3.1 to 3.3.2
@@ -1186,2 +1186,9 @@ /* eslint-env mocha */ | ||
it('should return string representation of a cast wrapped in a deep Typescript non-null assertion', () => { | ||
const prop = extractProp('<div foo={(bar as Bar).baz!} />'); | ||
const actual = getPropValue(prop); | ||
const expected = 'bar.baz!'; | ||
assert.equal(actual, expected); | ||
}); | ||
it('should return string representation of an object wrapped in a deep Typescript non-null assertion', () => { | ||
@@ -1188,0 +1195,0 @@ const prop = extractProp('<div foo={(bar.bar)!} />'); |
Unreleased | ||
================== | ||
3.3.2 / 2022-07-06 | ||
================== | ||
- [Fix] Handle `as` casts in TSNonNullExpression | ||
3.3.1 / 2022-06-22 | ||
@@ -5,0 +9,0 @@ ================== |
@@ -41,2 +41,6 @@ 'use strict'; | ||
if (value.type === 'TSAsExpression') { | ||
return extractValueFromTSNonNullExpression(value.expression); | ||
} | ||
if (value.type === 'ThisExpression') { | ||
@@ -43,0 +47,0 @@ return extractValueFromThisExpression(); |
{ | ||
"name": "jsx-ast-utils", | ||
"version": "3.3.1", | ||
"version": "3.3.2", | ||
"description": "AST utility module for statically analyzing JSX", | ||
@@ -21,5 +21,5 @@ "main": "lib/index.js", | ||
"devDependencies": { | ||
"@babel/core": "^7.18.5", | ||
"@babel/core": "^7.18.6", | ||
"@babel/eslint-parser": "^7.18.2", | ||
"@babel/parser": "^7.18.5", | ||
"@babel/parser": "^7.18.6", | ||
"aud": "^2.0.0", | ||
@@ -34,3 +34,3 @@ "babel-cli": "^6.26.0", | ||
"babylon": "^6.18.0", | ||
"eslint": "^8.18.0", | ||
"eslint": "^8.19.0", | ||
"eslint-config-airbnb-base": "^15.0.0", | ||
@@ -37,0 +37,0 @@ "eslint-plugin-import": "^2.26.0", |
@@ -34,2 +34,6 @@ const extractValueFromThisExpression = require('./ThisExpression').default; | ||
if (value.type === 'TSAsExpression') { | ||
return extractValueFromTSNonNullExpression(value.expression); | ||
} | ||
if (value.type === 'ThisExpression') { | ||
@@ -36,0 +40,0 @@ return extractValueFromThisExpression(); |
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
229386
5598