Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build(deps): Bump meriyah from 4.2.0 to 4.2.1 #12567

Merged
merged 5 commits into from Apr 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
23 changes: 23 additions & 0 deletions changelog_unreleased/javascript/12567.md
@@ -0,0 +1,23 @@
#### Update `meriyah` to fix several bugs (#12567 by @fisker, fixes in [`meriyah`](https://github.com/meriyah/meriyah/) by @3cp)

Fixes bugs when parsing following valid code:

```js
foo(await bar());
```

```js
const regex = /.*/ms;
```

```js
const element = <p>{/w/.test(s)}</p>;
```

```js
class A extends B {
#privateMethod() {
super.method();
}
}
```
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -63,7 +63,7 @@
"linguist-languages": "7.15.0",
"lodash": "4.17.21",
"mem": "9.0.2",
"meriyah": "4.2.0",
"meriyah": "4.2.1",
"micromatch": "4.0.5",
"minimist": "1.2.6",
"n-readlines": "1.0.1",
Expand Down
22 changes: 22 additions & 0 deletions tests/format/js/classes/__snapshots__/jsfmt.spec.js.snap
Expand Up @@ -325,6 +325,28 @@ class B {
================================================================================
`;

exports[`super.js format 1`] = `
====================================options=====================================
parsers: ["babel", "flow", "typescript"]
printWidth: 80
| printWidth
=====================================input======================================
class A extends B {
#a() {
super.x();
}
}

=====================================output=====================================
class A extends B {
#a() {
super.x();
}
}

================================================================================
`;

exports[`ternary.js format 1`] = `
====================================options=====================================
parsers: ["babel", "flow", "typescript"]
Expand Down
5 changes: 5 additions & 0 deletions tests/format/js/classes/super.js
@@ -0,0 +1,5 @@
class A extends B {
#a() {
super.x();
}
}
16 changes: 16 additions & 0 deletions tests/format/js/regex/__snapshots__/jsfmt.spec.js.snap
Expand Up @@ -28,6 +28,22 @@ printWidth: 80
================================================================================
`;

exports[`multiple-flags.js format 1`] = `
====================================options=====================================
parsers: ["babel", "flow", "typescript"]
printWidth: 80
| printWidth
=====================================input======================================
/.*/ms;
/.*/my;

=====================================output=====================================
/.*/ms;
/.*/my;

================================================================================
`;

exports[`test.js format 1`] = `
====================================options=====================================
parsers: ["babel", "flow", "typescript"]
Expand Down
2 changes: 2 additions & 0 deletions tests/format/js/regex/multiple-flags.js
@@ -0,0 +1,2 @@
/.*/ms;
/.*/my;
16 changes: 16 additions & 0 deletions tests/format/js/top-level-await/__snapshots__/jsfmt.spec.js.snap
Expand Up @@ -13,3 +13,19 @@ await something();

================================================================================
`;

exports[`in-expression.js format 1`] = `
====================================options=====================================
parsers: ["babel", "typescript"]
printWidth: 80
| printWidth
=====================================input======================================
call(
await something()
)

=====================================output=====================================
call(await something());

================================================================================
`;
3 changes: 3 additions & 0 deletions tests/format/js/top-level-await/in-expression.js
@@ -0,0 +1,3 @@
call(
await something()
)
88 changes: 88 additions & 0 deletions tests/format/jsx/jsx/__snapshots__/jsfmt.spec.js.snap
Expand Up @@ -5076,6 +5076,94 @@ singleQuote: true
================================================================================
`;

exports[`regex.js - {"singleQuote":false,"jsxSingleQuote":false} format 1`] = `
====================================options=====================================
jsxSingleQuote: false
parsers: ["flow", "babel", "typescript"]
printWidth: 80
singleQuote: false
| printWidth
=====================================input======================================
x = <div>one</div>, <div>two</div>;
x = <a>{}</a>
x = <a>{1/2}</a>
x = <a>{/w/.test(s)}</a>

=====================================output=====================================
(x = <div>one</div>), (<div>two</div>);
x = <a>{}</a>;
x = <a>{1 / 2}</a>;
x = <a>{/w/.test(s)}</a>;

================================================================================
`;

exports[`regex.js - {"singleQuote":false,"jsxSingleQuote":true} format 1`] = `
====================================options=====================================
jsxSingleQuote: true
parsers: ["flow", "babel", "typescript"]
printWidth: 80
singleQuote: false
| printWidth
=====================================input======================================
x = <div>one</div>, <div>two</div>;
x = <a>{}</a>
x = <a>{1/2}</a>
x = <a>{/w/.test(s)}</a>

=====================================output=====================================
(x = <div>one</div>), (<div>two</div>);
x = <a>{}</a>;
x = <a>{1 / 2}</a>;
x = <a>{/w/.test(s)}</a>;

================================================================================
`;

exports[`regex.js - {"singleQuote":true,"jsxSingleQuote":false} format 1`] = `
====================================options=====================================
jsxSingleQuote: false
parsers: ["flow", "babel", "typescript"]
printWidth: 80
singleQuote: true
| printWidth
=====================================input======================================
x = <div>one</div>, <div>two</div>;
x = <a>{}</a>
x = <a>{1/2}</a>
x = <a>{/w/.test(s)}</a>

=====================================output=====================================
(x = <div>one</div>), (<div>two</div>);
x = <a>{}</a>;
x = <a>{1 / 2}</a>;
x = <a>{/w/.test(s)}</a>;

================================================================================
`;

exports[`regex.js - {"singleQuote":true,"jsxSingleQuote":true} format 1`] = `
====================================options=====================================
jsxSingleQuote: true
parsers: ["flow", "babel", "typescript"]
printWidth: 80
singleQuote: true
| printWidth
=====================================input======================================
x = <div>one</div>, <div>two</div>;
x = <a>{}</a>
x = <a>{1/2}</a>
x = <a>{/w/.test(s)}</a>

=====================================output=====================================
(x = <div>one</div>), (<div>two</div>);
x = <a>{}</a>;
x = <a>{1 / 2}</a>;
x = <a>{/w/.test(s)}</a>;

================================================================================
`;

exports[`return-statement.js - {"singleQuote":false,"jsxSingleQuote":false} format 1`] = `
====================================options=====================================
jsxSingleQuote: false
Expand Down
4 changes: 4 additions & 0 deletions tests/format/jsx/jsx/regex.js
@@ -0,0 +1,4 @@
x = <div>one</div>, <div>two</div>;
x = <a>{}</a>
x = <a>{1/2}</a>
x = <a>{/w/.test(s)}</a>
8 changes: 4 additions & 4 deletions yarn.lock
Expand Up @@ -4830,10 +4830,10 @@ merge2@^1.3.0, merge2@^1.4.1:
resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae"
integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==

meriyah@4.2.0:
version "4.2.0"
resolved "https://registry.yarnpkg.com/meriyah/-/meriyah-4.2.0.tgz#29d28c37ac7b67f8b9aaa92df0b8ac12469fe98b"
integrity sha512-fCVh5GB9YT53Bq14l00HLYE3i9DywrY0JVZxbk0clXWDuMsUKKwluvC5sY0bMBqHbnIbpIjfSSIsnrzbauA8Yw==
meriyah@4.2.1:
version "4.2.1"
resolved "https://registry.yarnpkg.com/meriyah/-/meriyah-4.2.1.tgz#2a5c9ac2f4a16673afa31af1266ce491a8973bb4"
integrity sha512-Uv5sWsmjFNC6IszEmHo5bzJLL+kqjQ/VrEj9Agqsqtx7B6dcxHnHLew1ioJD19HNXrxrRZltPi+NVh12I8RLXA==

micromatch@4.0.5, micromatch@^4.0.4:
version "4.0.5"
Expand Down