Build(deps): Bump @babel/parser from 7.10.3 to 7.10.4 (#8688)

* Build(deps): Bump @babel/parser from 7.10.3 to 7.10.4

Bumps [@babel/parser](https://github.com/babel/babel/tree/HEAD/packages/babel-parser) from 7.10.3 to 7.10.4.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.10.4/packages/babel-parser)

Signed-off-by: dependabot[bot] <support@github.com>

* Add `delete obj?.#x.a` test

* Add new `tuple` and `record` tests. Fix old test

* Fix test

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: fisker <lionkay@gmail.com>
This commit is contained in:
dependabot[bot]andfisker authored and GitHub committed 2020-07-02 08:02:36 +08:00
1 parent a0e2efca04
commit 35ac6f0752
11 files changed
+125 -14

No files matched your search

+1 -1
View File
@@ -22,7 +22,7 @@
"dependencies": {
"@angular/compiler": "10.0.2",
"@babel/code-frame": "7.10.4",
"@babel/parser": "7.10.3",
"@babel/parser": "7.10.4",
"@glimmer/syntax": "0.54.0",
"@iarna/toml": "2.2.5",
"@typescript-eslint/typescript-estree": "3.5.0",
+12 -1
View File
@@ -82,7 +82,18 @@ function createParse(parseMethod, ...pluginCombinations) {
babelOptions({ sourceType, extraPlugins })
)
);
} catch (error) {
} catch (_error) {
// babel@7.10.4 throws `undefined`, when parsing
// ```js
// alert(
// <!-- comment
// 'hello world'
// )
// ```
// #8688
const error = _error || { message: "Unknown error" };
throw createError(
// babel error prints (l:c) with cols that are zero indexed
// so we need our custom error
@@ -1,5 +1,42 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`optional-chaining.js - {"semi":false} format 1`] = `
====================================options=====================================
parsers: ["babel"]
printWidth: 80
semi: false
| printWidth
=====================================input======================================
// https://github.com/babel/babel/pull/11669
delete obj?.#x.a
=====================================output=====================================
// https://github.com/babel/babel/pull/11669
delete obj?.#x.a
================================================================================
`;
exports[`optional-chaining.js format 1`] = `
====================================options=====================================
parsers: ["babel"]
printWidth: 80
| printWidth
=====================================input======================================
// https://github.com/babel/babel/pull/11669
delete obj?.#x.a
=====================================output=====================================
// https://github.com/babel/babel/pull/11669
delete obj?.#x.a;
================================================================================
`;
exports[`private_fields.js - {"semi":false} format 1`] = `
====================================options=====================================
parsers: ["babel"]
@@ -0,0 +1,3 @@
// https://github.com/babel/babel/pull/11669
delete obj?.#x.a
@@ -60,6 +60,36 @@ assert(rest.c === 3);
================================================================================
`;
exports[`invalid-record-method.js format 1`] = `
====================================options=====================================
parsers: ["babel"]
printWidth: 80
| printWidth
=====================================input======================================
// Invalid, https://github.com/babel/babel/pull/11652/
#{
a() {},
async b() {},
get c() {},
set d(_) {},
*e() {}
}
=====================================output=====================================
// Invalid, https://github.com/babel/babel/pull/11652/
#{
a() {},
async b() {},
get c() {},
set d(_) {},
*e() {},
};
================================================================================
`;
exports[`record.js format 1`] = `
====================================options=====================================
parsers: ["babel"]
+9
View File
@@ -0,0 +1,9 @@
// Invalid, https://github.com/babel/babel/pull/11652/
#{
a() {},
async b() {},
get c() {},
set d(_) {},
*e() {}
}
@@ -30,6 +30,20 @@ assert(rest[1] === 3);
================================================================================
`;
exports[`invalid-tuple-holes.js format 1`] = `
====================================options=====================================
parsers: ["babel"]
printWidth: 80
| printWidth
=====================================input======================================
#[,]
=====================================output=====================================
#[,];
================================================================================
`;
exports[`syntax.js format 1`] = `
====================================options=====================================
parsers: ["babel"]
@@ -93,3 +107,17 @@ assert(tuple5 === #[2, 2, 3, 4]);
================================================================================
`;
exports[`tuple-trailing-comma.js format 1`] = `
====================================options=====================================
parsers: ["babel"]
printWidth: 80
| printWidth
=====================================input======================================
#[1,]
=====================================output=====================================
#[1];
================================================================================
`;
+1
View File
@@ -0,0 +1 @@
#[,]
+1
View File
@@ -0,0 +1 @@
#[1,]
@@ -1,14 +1,10 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`html-like-comments.js error test 1`] = `
"Unexpected token (3:1)
"Unknown error (0:0)
1 | // Only support HTML-like comment in HTML
2 | alert(
> 3 | <!-- comment
| ^
4 | 'hello world'
5 | )
6 | "
3 | <!-- comment"
`;
exports[`module-attributes.js error test 1`] = `
+1 -6
View File
@@ -266,12 +266,7 @@
chalk "^2.0.0"
js-tokens "^4.0.0"
"@babel/parser@7.10.3":
version "7.10.3"
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.10.3.tgz#7e71d892b0d6e7d04a1af4c3c79d72c1f10f5315"
integrity sha512-oJtNJCMFdIMwXGmx+KxuaD7i3b8uS7TTFYW/FNG2BT8m+fmGHoiPYoH0Pe3gya07WuFmM5FCDIr1x0irkD/hyA==
"@babel/parser@^7.1.0", "@babel/parser@^7.10.4", "@babel/parser@^7.7.5":
"@babel/parser@7.10.4", "@babel/parser@^7.1.0", "@babel/parser@^7.10.4", "@babel/parser@^7.7.5":
version "7.10.4"
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.10.4.tgz#9eedf27e1998d87739fb5028a5120557c06a1a64"
integrity sha512-8jHII4hf+YVDsskTF6WuMB3X4Eh+PsUkC2ljq22so5rHvH+T8BzyL94VOdyFLNR8tBSVXOTbNHOKpR4TfRxVtA==