Skip to content

Commit 1bfb08f

Browse files
dependabot[bot]fisker
authored andcommitted
Build(deps): Bump meriyah from 4.2.0 to 4.2.1 (#12567)
* Build(deps): Bump meriyah from 4.2.0 to 4.2.1 Bumps [meriyah](https://github.com/meriyah/meriyah) from 4.2.0 to 4.2.1. - [Release notes](https://github.com/meriyah/meriyah/releases) - [Changelog](https://github.com/meriyah/meriyah/blob/master/CHANGELOG.md) - [Commits](meriyah/meriyah@v4.2.0...v4.2.1) --- updated-dependencies: - dependency-name: meriyah dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * Add test for meriyah/meriyah@6de707a * Test meriyah/meriyah@37c6361 * Test meriyah/meriyah@d757c6b * Add changelog Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: fisker Cheung <lionkay@gmail.com>
1 parent 9400c89 commit 1bfb08f

File tree

11 files changed

+184
-5
lines changed

11 files changed

+184
-5
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#### Update `meriyah` to fix several bugs (#12567 by @fisker, fixes in [`meriyah`](https://github.com/meriyah/meriyah/) by @3cp)
2+
3+
Fixes bugs when parsing following valid code:
4+
5+
```js
6+
foo(await bar());
7+
```
8+
9+
```js
10+
const regex = /.*/ms;
11+
```
12+
13+
```js
14+
const element = <p>{/w/.test(s)}</p>;
15+
```
16+
17+
```js
18+
class A extends B {
19+
#privateMethod() {
20+
super.method();
21+
}
22+
}
23+
```

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
"linguist-languages": "7.15.0",
6464
"lodash": "4.17.21",
6565
"mem": "9.0.2",
66-
"meriyah": "4.2.0",
66+
"meriyah": "4.2.1",
6767
"micromatch": "4.0.5",
6868
"minimist": "1.2.6",
6969
"n-readlines": "1.0.1",

tests/format/js/classes/__snapshots__/jsfmt.spec.js.snap

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,28 @@ class B {
325325
================================================================================
326326
`;
327327

328+
exports[`super.js format 1`] = `
329+
====================================options=====================================
330+
parsers: ["babel", "flow", "typescript"]
331+
printWidth: 80
332+
| printWidth
333+
=====================================input======================================
334+
class A extends B {
335+
#a() {
336+
super.x();
337+
}
338+
}
339+
340+
=====================================output=====================================
341+
class A extends B {
342+
#a() {
343+
super.x();
344+
}
345+
}
346+
347+
================================================================================
348+
`;
349+
328350
exports[`ternary.js format 1`] = `
329351
====================================options=====================================
330352
parsers: ["babel", "flow", "typescript"]

tests/format/js/classes/super.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
class A extends B {
2+
#a() {
3+
super.x();
4+
}
5+
}

tests/format/js/regex/__snapshots__/jsfmt.spec.js.snap

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,22 @@ printWidth: 80
2828
================================================================================
2929
`;
3030

31+
exports[`multiple-flags.js format 1`] = `
32+
====================================options=====================================
33+
parsers: ["babel", "flow", "typescript"]
34+
printWidth: 80
35+
| printWidth
36+
=====================================input======================================
37+
/.*/ms;
38+
/.*/my;
39+
40+
=====================================output=====================================
41+
/.*/ms;
42+
/.*/my;
43+
44+
================================================================================
45+
`;
46+
3147
exports[`test.js format 1`] = `
3248
====================================options=====================================
3349
parsers: ["babel", "flow", "typescript"]
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/.*/ms;
2+
/.*/my;

tests/format/js/top-level-await/__snapshots__/jsfmt.spec.js.snap

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,19 @@ await something();
1313
1414
================================================================================
1515
`;
16+
17+
exports[`in-expression.js format 1`] = `
18+
====================================options=====================================
19+
parsers: ["babel", "typescript"]
20+
printWidth: 80
21+
| printWidth
22+
=====================================input======================================
23+
call(
24+
await something()
25+
)
26+
27+
=====================================output=====================================
28+
call(await something());
29+
30+
================================================================================
31+
`;
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
call(
2+
await something()
3+
)

tests/format/jsx/jsx/__snapshots__/jsfmt.spec.js.snap

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5076,6 +5076,94 @@ singleQuote: true
50765076
================================================================================
50775077
`;
50785078

5079+
exports[`regex.js - {"singleQuote":false,"jsxSingleQuote":false} format 1`] = `
5080+
====================================options=====================================
5081+
jsxSingleQuote: false
5082+
parsers: ["flow", "babel", "typescript"]
5083+
printWidth: 80
5084+
singleQuote: false
5085+
| printWidth
5086+
=====================================input======================================
5087+
x = <div>one</div>, <div>two</div>;
5088+
x = <a>{}</a>
5089+
x = <a>{1/2}</a>
5090+
x = <a>{/w/.test(s)}</a>
5091+
5092+
=====================================output=====================================
5093+
(x = <div>one</div>), (<div>two</div>);
5094+
x = <a>{}</a>;
5095+
x = <a>{1 / 2}</a>;
5096+
x = <a>{/w/.test(s)}</a>;
5097+
5098+
================================================================================
5099+
`;
5100+
5101+
exports[`regex.js - {"singleQuote":false,"jsxSingleQuote":true} format 1`] = `
5102+
====================================options=====================================
5103+
jsxSingleQuote: true
5104+
parsers: ["flow", "babel", "typescript"]
5105+
printWidth: 80
5106+
singleQuote: false
5107+
| printWidth
5108+
=====================================input======================================
5109+
x = <div>one</div>, <div>two</div>;
5110+
x = <a>{}</a>
5111+
x = <a>{1/2}</a>
5112+
x = <a>{/w/.test(s)}</a>
5113+
5114+
=====================================output=====================================
5115+
(x = <div>one</div>), (<div>two</div>);
5116+
x = <a>{}</a>;
5117+
x = <a>{1 / 2}</a>;
5118+
x = <a>{/w/.test(s)}</a>;
5119+
5120+
================================================================================
5121+
`;
5122+
5123+
exports[`regex.js - {"singleQuote":true,"jsxSingleQuote":false} format 1`] = `
5124+
====================================options=====================================
5125+
jsxSingleQuote: false
5126+
parsers: ["flow", "babel", "typescript"]
5127+
printWidth: 80
5128+
singleQuote: true
5129+
| printWidth
5130+
=====================================input======================================
5131+
x = <div>one</div>, <div>two</div>;
5132+
x = <a>{}</a>
5133+
x = <a>{1/2}</a>
5134+
x = <a>{/w/.test(s)}</a>
5135+
5136+
=====================================output=====================================
5137+
(x = <div>one</div>), (<div>two</div>);
5138+
x = <a>{}</a>;
5139+
x = <a>{1 / 2}</a>;
5140+
x = <a>{/w/.test(s)}</a>;
5141+
5142+
================================================================================
5143+
`;
5144+
5145+
exports[`regex.js - {"singleQuote":true,"jsxSingleQuote":true} format 1`] = `
5146+
====================================options=====================================
5147+
jsxSingleQuote: true
5148+
parsers: ["flow", "babel", "typescript"]
5149+
printWidth: 80
5150+
singleQuote: true
5151+
| printWidth
5152+
=====================================input======================================
5153+
x = <div>one</div>, <div>two</div>;
5154+
x = <a>{}</a>
5155+
x = <a>{1/2}</a>
5156+
x = <a>{/w/.test(s)}</a>
5157+
5158+
=====================================output=====================================
5159+
(x = <div>one</div>), (<div>two</div>);
5160+
x = <a>{}</a>;
5161+
x = <a>{1 / 2}</a>;
5162+
x = <a>{/w/.test(s)}</a>;
5163+
5164+
================================================================================
5165+
`;
5166+
50795167
exports[`return-statement.js - {"singleQuote":false,"jsxSingleQuote":false} format 1`] = `
50805168
====================================options=====================================
50815169
jsxSingleQuote: false

tests/format/jsx/jsx/regex.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
x = <div>one</div>, <div>two</div>;
2+
x = <a>{}</a>
3+
x = <a>{1/2}</a>
4+
x = <a>{/w/.test(s)}</a>

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy