jsx-ast-utils
Advanced tools
@@ -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)!} />'); |
+4
-0
| 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(); |
+4
-4
| { | ||
| "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(); |
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
229386
0.27%5598
0.21%