Socket
Socket
Sign inDemoInstall

jsx-ast-utils

Package Overview
Dependencies
66
Maintainers
3
Versions
35
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.3.1 to 3.3.2

7

__tests__/src/getPropValue-babelparser-test.js

@@ -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

CHANGELOG.md
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();

8

package.json
{
"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();

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc