Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

hermes-parser

Package Overview
Dependencies
Maintainers
3
Versions
43
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.0 to 0.17.1

15

dist/estree/StripComponentSyntax.js

@@ -198,12 +198,3 @@ /**

if (refParam != null) {
const refType = refParam.local;
ref = {
type: 'Identifier',
name: 'ref',
optional: false,
typeAnnotation: refType.type === 'AssignmentPattern' ? refType.left.typeAnnotation : refType.typeAnnotation,
loc: refParam.loc,
range: refParam.range,
parent: EMPTY_PARENT
};
ref = refParam.local;
}

@@ -232,6 +223,2 @@

{
if (getComponentParameterName(param.name) === 'ref') {
throw (0, _createSyntaxError.createSyntaxError)(param, 'Component parameters named "ref" are currently not supported');
}
let value;

@@ -238,0 +225,0 @@

15

dist/utils/mutateESTreeASTForPrettier.js

@@ -20,3 +20,13 @@ /**

// https://github.com/prettier/prettier/blob/d962466a828f8ef51435e3e8840178d90b7ec6cd/src/language-js/parse/postprocess/index.js#L161-L182
function transformChainExpression(node) {
function transformChainExpression(node, comments) {
if (comments != null) {
var _node$comments;
// $FlowExpectedError[prop-missing]
const joinedComments = comments.concat((_node$comments = node.comments) != null ? _node$comments : []); // $FlowExpectedError[prop-missing]
// $FlowFixMe[cannot-write]
node.comments = joinedComments;
}
switch (node.type) {

@@ -60,3 +70,4 @@ case 'CallExpression':

if (node.type === 'ChainExpression') {
return transformChainExpression(node.expression);
// $FlowFixMe[prop-missing]
return transformChainExpression(node.expression, node == null ? void 0 : node.comments);
} // Prettier currently relies on comparing the `node` vs `node.value` start positions to know if an

@@ -63,0 +74,0 @@ // `ObjectTypeProperty` is a method or not (instead of using the `node.method` boolean). To correctly print

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

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

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

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

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

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