diff --git a/package.json b/package.json index 79d53cfdb..87af84faa 100644 --- a/package.json +++ b/package.json @@ -66,7 +66,7 @@ "get-east-asian-width": "1.3.0", "get-stdin": "9.0.0", "graphql": "16.11.0", - "hermes-parser": "0.28.1", + "hermes-parser": "0.29.0", "html-element-attributes": "3.4.0", "html-ua-styles": "0.0.8", "ignore": "7.0.5", diff --git a/packages/plugin-hermes/package.json b/packages/plugin-hermes/package.json index 5349a8ecf..e0e09db7b 100644 --- a/packages/plugin-hermes/package.json +++ b/packages/plugin-hermes/package.json @@ -1,6 +1,6 @@ { "name": "@prettier/plugin-hermes", - "version": "0.0.1", + "version": "0.0.2", "description": "Prettier Hermes plugin.", "type": "module", "exports": { diff --git a/scripts/build/transform/index.js b/scripts/build/transform/index.js index 36c9b28a1..377294aa8 100644 --- a/scripts/build/transform/index.js +++ b/scripts/build/transform/index.js @@ -27,7 +27,8 @@ function transform(original, file) { ), ) || file.startsWith(path.join(PROJECT_ROOT, "node_modules/meriyah/")) || - file.startsWith(path.join(PROJECT_ROOT, "node_modules/@glimmer/")) + file.startsWith(path.join(PROJECT_ROOT, "node_modules/@glimmer/")) || + file.startsWith(path.join(PROJECT_ROOT, "node_modules/hermes-parser/")) ) ) { return original; diff --git a/tests/config/run-format-test.js b/tests/config/run-format-test.js index 89ba50a7f..369487dd6 100644 --- a/tests/config/run-format-test.js +++ b/tests/config/run-format-test.js @@ -89,15 +89,9 @@ const oxcTsDisabledTests = new Set(); const hermesDisabledTests = new Set([ ...commentClosureTypecaseTests, ...[ - // Need update L183 to use `replaceAll` - // https://app.unpkg.com/hermes-parser@0.28.1/files/dist/HermesASTAdapter.js - "js/call/first-argument-expansion/expression-2nd-arg.js", - "js/directives/escaped.js", // Not supported "flow/comments", "flow-repo/union_new", - // Wrongly parsed - "js/sloppy-mode/function-declaration-in-if.js", // Wrong location of `Property.value` "js/classes/method.js", "js/comments/function-declaration.js", diff --git a/yarn.lock b/yarn.lock index a0d3f0c23..25dc7148f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5101,19 +5101,19 @@ __metadata: languageName: node linkType: hard -"hermes-estree@npm:0.28.1": - version: 0.28.1 - resolution: "hermes-estree@npm:0.28.1" - checksum: 10/3195a1aa7035d96b77839e6bfd6832b51830518aaf8dabfca11248b84d6fb6abd27e21c8caa84229954a76b4f8a1e346b65d421a4daecd3053bd2ea08fe6abc9 +"hermes-estree@npm:0.29.0": + version: 0.29.0 + resolution: "hermes-estree@npm:0.29.0" + checksum: 10/40fdf631c2b782975a6c578524e2be6f83bf3a84d471ad4b4582a1e8f15f0fecdca9048cec54c343a57cb4b75e060bdfc5f40d76fbba605671bce5bae7a58a74 languageName: node linkType: hard -"hermes-parser@npm:0.28.1": - version: 0.28.1 - resolution: "hermes-parser@npm:0.28.1" +"hermes-parser@npm:0.29.0": + version: 0.29.0 + resolution: "hermes-parser@npm:0.29.0" dependencies: - hermes-estree: "npm:0.28.1" - checksum: 10/cb2aa4d386929825c3bd8184eeb4e3dcf34892c1f850624d09a80aee0674bc2eb135eccaeb7ac33675552130229ee6160025c4e4f351d6a61b503bd8bfdf63f5 + hermes-estree: "npm:0.29.0" + checksum: 10/c9aaaf5d9de59b3d8443333434091fbb527b2b751c8cf66b0797b127dd04b9c0820f8fb085d5ce3a5706f601b2a5fefc1c6a84bb1598e80468baa25a13d890fb languageName: node linkType: hard @@ -7489,7 +7489,7 @@ __metadata: get-stdin: "npm:9.0.0" globals: "npm:16.2.0" graphql: "npm:16.11.0" - hermes-parser: "npm:0.28.1" + hermes-parser: "npm:0.29.0" html-element-attributes: "npm:3.4.0" html-ua-styles: "npm:0.0.8" ignore: "npm:7.0.5"