Launch Week Day 5: Introducing Reachability for PHP.Learn More
Socket
Book a DemoSign in
Socket

hermes-parser

Package Overview
Dependencies
Maintainers
3
Versions
61
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.29.1
to
0.30.0
+16
-0
dist/babel/TransformESTreeToBabel.js

@@ -1068,2 +1068,18 @@ /**

case 'DeclareOpaqueType':
case 'OpaqueType':
{
if (node.lowerBound != null) {
// $FlowExpectedError[cannot-write]
delete node.lowerBound;
}
if (node.upperBound != null) {
// $FlowExpectedError[cannot-write]
delete node.upperBound;
}
return node;
}
default:

@@ -1070,0 +1086,0 @@ {

+2
-2

@@ -69,3 +69,3 @@ /**

DeclareNamespace: ['id', 'body'],
DeclareOpaqueType: ['id', 'typeParameters', 'impltype', 'supertype'],
DeclareOpaqueType: ['id', 'typeParameters', 'impltype', 'lowerBound', 'upperBound', 'supertype'],
DeclareTypeAlias: ['id', 'typeParameters', 'right'],

@@ -170,3 +170,3 @@ DeclareVariable: ['id'],

ObjectTypeSpreadProperty: ['argument'],
OpaqueType: ['id', 'typeParameters', 'impltype', 'supertype'],
OpaqueType: ['id', 'typeParameters', 'impltype', 'lowerBound', 'upperBound', 'supertype'],
OptionalIndexedAccessType: ['objectType', 'indexType'],

@@ -173,0 +173,0 @@ PrivateIdentifier: [],

@@ -217,2 +217,4 @@ /**

impltype: 'Node',
lowerBound: 'Node',
upperBound: 'Node',
supertype: 'Node'

@@ -590,2 +592,4 @@ },

impltype: 'Node',
lowerBound: 'Node',
upperBound: 'Node',
supertype: 'Node'

@@ -592,0 +596,0 @@ },

@@ -1550,2 +1550,4 @@ /**

impltype: this.deserializeNode(),
lowerBound: this.deserializeNode(),
upperBound: this.deserializeNode(),
supertype: this.deserializeNode()

@@ -1583,2 +1585,4 @@ };

impltype: this.deserializeNode(),
lowerBound: this.deserializeNode(),
upperBound: this.deserializeNode(),
supertype: this.deserializeNode()

@@ -1585,0 +1589,0 @@ };

@@ -98,5 +98,2 @@ "use strict";

case 'Property':
return this.mapProperty(node);
case 'FunctionDeclaration':

@@ -237,13 +234,2 @@ case 'FunctionExpression':

mapProperty(nodeUnprocessed) {
const node = this.mapNodeDefault(nodeUnprocessed);
if (node.value.type === 'FunctionExpression' && (node.method || node.kind !== 'init')) {
node.value.loc.start = node.key.loc.end;
node.value.range[0] = node.key.range[1];
}
return node;
}
mapComment(node) {

@@ -250,0 +236,0 @@ if (node.type === 'CommentBlock') {

@@ -1068,2 +1068,18 @@ /**

case 'DeclareOpaqueType':
case 'OpaqueType':
{
if (node.lowerBound != null) {
// $FlowExpectedError[cannot-write]
delete node.lowerBound;
}
if (node.upperBound != null) {
// $FlowExpectedError[cannot-write]
delete node.upperBound;
}
return node;
}
default:

@@ -1070,0 +1086,0 @@ {

@@ -69,3 +69,3 @@ /**

DeclareNamespace: ['id', 'body'],
DeclareOpaqueType: ['id', 'typeParameters', 'impltype', 'supertype'],
DeclareOpaqueType: ['id', 'typeParameters', 'impltype', 'lowerBound', 'upperBound', 'supertype'],
DeclareTypeAlias: ['id', 'typeParameters', 'right'],

@@ -170,3 +170,3 @@ DeclareVariable: ['id'],

ObjectTypeSpreadProperty: ['argument'],
OpaqueType: ['id', 'typeParameters', 'impltype', 'supertype'],
OpaqueType: ['id', 'typeParameters', 'impltype', 'lowerBound', 'upperBound', 'supertype'],
OptionalIndexedAccessType: ['objectType', 'indexType'],

@@ -173,0 +173,0 @@ PrivateIdentifier: [],

@@ -217,2 +217,4 @@ /**

impltype: 'Node',
lowerBound: 'Node',
upperBound: 'Node',
supertype: 'Node'

@@ -590,2 +592,4 @@ },

impltype: 'Node',
lowerBound: 'Node',
upperBound: 'Node',
supertype: 'Node'

@@ -592,0 +596,0 @@ },

@@ -1550,2 +1550,4 @@ /**

impltype: this.deserializeNode(),
lowerBound: this.deserializeNode(),
upperBound: this.deserializeNode(),
supertype: this.deserializeNode()

@@ -1583,2 +1585,4 @@ };

impltype: this.deserializeNode(),
lowerBound: this.deserializeNode(),
upperBound: this.deserializeNode(),
supertype: this.deserializeNode()

@@ -1585,0 +1589,0 @@ };

@@ -98,5 +98,2 @@ "use strict";

case 'Property':
return this.mapProperty(node);
case 'FunctionDeclaration':

@@ -237,13 +234,2 @@ case 'FunctionExpression':

mapProperty(nodeUnprocessed) {
const node = this.mapNodeDefault(nodeUnprocessed);
if (node.value.type === 'FunctionExpression' && (node.method || node.kind !== 'init')) {
node.value.loc.start = node.key.loc.end;
node.value.range[0] = node.key.range[1];
}
return node;
}
mapComment(node) {

@@ -250,0 +236,0 @@ if (node.type === 'CommentBlock') {

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

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

"dependencies": {
"hermes-estree": "0.29.1"
"hermes-estree": "0.30.0"
},

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet