hermes-parser 0.19.1 → 0.19.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -684,7 +684,9 @@ function mapStatementList(stmts) {
684
684
 
685
685
  if (((_node$declaration2 = node.declaration) == null ? void 0 : _node$declaration2.type) === 'HookDeclaration') {
686
686
  const comp = mapHookDeclaration(node.declaration);
687
- newBody.push(comp);
687
+ newBody.push(nodeWith(node, {
688
+ declaration: comp
689
+ }));
688
690
  break;
689
691
  }
690
692
 
@@ -705,7 +707,9 @@ function mapStatementList(stmts) {
705
707
 
706
708
  if (((_node$declaration4 = node.declaration) == null ? void 0 : _node$declaration4.type) === 'HookDeclaration') {
707
709
  const comp = mapHookDeclaration(node.declaration);
708
- newBody.push(comp);
710
+ newBody.push(nodeWith(node, {
711
+ declaration: comp
712
+ }));
709
713
  break;
710
714
  }
711
715
 
@@ -768,7 +768,7 @@ function mapStatementList(
768
768
 
769
769
  if (node.declaration?.type === 'HookDeclaration') {
770
770
  const comp = mapHookDeclaration(node.declaration);
771
- newBody.push(comp);
771
+ newBody.push(nodeWith(node, {declaration: comp}));
772
772
  break;
773
773
  }
774
774
 
@@ -787,7 +787,7 @@ function mapStatementList(
787
787
 
788
788
  if (node.declaration?.type === 'HookDeclaration') {
789
789
  const comp = mapHookDeclaration(node.declaration);
790
- newBody.push(comp);
790
+ newBody.push(nodeWith(node, {declaration: comp}));
791
791
  break;
792
792
  }
793
793
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hermes-parser",
3
- "version": "0.19.1",
3
+ "version": "0.19.2",
4
4
  "description": "A JavaScript parser built from the Hermes engine",
5
5
  "main": "dist/index.js",
6
6
  "license": "MIT",
@@ -9,7 +9,7 @@
9
9
  "url": "git@github.com:facebook/hermes.git"
10
10
  },
11
11
  "dependencies": {
12
- "hermes-estree": "0.19.1"
12
+ "hermes-estree": "0.19.2"
13
13
  },
14
14
  "devDependencies": {
15
15
  "@babel/parser": "7.7.4",