Socket
Socket
Sign inDemoInstall

hermes-parser

Package Overview
Dependencies
Maintainers
3
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hermes-parser - npm Package Compare versions

Comparing version 0.17.1 to 0.18.0

45

dist/estree/StripComponentSyntax.js

@@ -132,3 +132,3 @@ /**

if (params.length === 1 && params[0].type === 'RestElement' && (params[0].argument.type === 'Identifier' || params[0].argument.type === 'ObjectPattern')) {
if (params.length === 1 && params[0].type === 'RestElement' && params[0].argument.type === 'Identifier') {
var _restElementArgument$, _restElementArgument$2;

@@ -155,3 +155,3 @@

});
const propsProperties = paramsWithoutRef.map(mapComponentParameter);
const propsProperties = paramsWithoutRef.flatMap(mapComponentParameter);
let props = null;

@@ -213,9 +213,28 @@

{
const a = nodeWith(param, {
typeAnnotation: null,
argument: nodeWith(param.argument, {
typeAnnotation: null
})
});
return a;
switch (param.argument.type) {
case 'Identifier':
{
const a = nodeWith(param, {
typeAnnotation: null,
argument: nodeWith(param.argument, {
typeAnnotation: null
})
});
return [a];
}
case 'ObjectPattern':
{
return param.argument.properties.map(property => {
return nodeWith(property, {
typeAnnotation: null
});
});
}
default:
{
throw (0, _createSyntaxError.createSyntaxError)(param, `Unhandled ${param.argument.type} encountered in restParameter`);
}
}
}

@@ -243,3 +262,3 @@

if (param.name.type === 'Identifier' && param.shorthand && (value.type === 'Identifier' || value.type === 'AssignmentPattern')) {
return {
return [{
type: 'Property',

@@ -255,7 +274,7 @@ key: param.name,

parent: EMPTY_PARENT
};
}];
} // Complex params
return {
return [{
type: 'Property',

@@ -271,3 +290,3 @@ key: param.name,

parent: EMPTY_PARENT
};
}];
}

@@ -274,0 +293,0 @@

{
"name": "hermes-parser",
"version": "0.17.1",
"version": "0.18.0",
"description": "A JavaScript parser built from the Hermes engine",

@@ -12,3 +12,3 @@ "main": "dist/index.js",

"dependencies": {
"hermes-estree": "0.17.1"
"hermes-estree": "0.18.0"
},

@@ -15,0 +15,0 @@ "devDependencies": {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc