hermes-parser
Advanced tools
Comparing version 0.17.0 to 0.17.1
@@ -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 @@ |
@@ -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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
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
1039586
6225
+ Addedhermes-estree@0.17.1(transitive)
- Removedhermes-estree@0.17.0(transitive)
Updatedhermes-estree@0.17.1