Skip to content

Commit

Permalink
Build(deps): Bump meriyah from 4.2.0 to 4.2.1 (prettier#12567)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
2 people authored and medikoo committed Jan 2, 2024
1 parent ac5be9c commit 0727d1f
Show file tree
Hide file tree
Showing 11 changed files with 184 additions and 5 deletions.
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 @@ -64,7 +64,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 @@ -307,6 +307,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 @@ -4968,6 +4968,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 @@ -4943,10 +4943,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, micromatch@^4.0.5:
version "4.0.5"
Expand Down

0 comments on commit 0727d1f

Please sign in to comment.