Build(deps): Bump @babel/parser from 7.11.2 to 7.11.5 (#8947)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: fisker <lionkay@gmail.com>
This commit is contained in:
1 parent
56da3ba31c
commit
0983660aa8
14 files changed
+104
-12
No files matched your search
+1
-1
@@ -22,7 +22,7 @@
|
||||
"dependencies": {
|
||||
"@angular/compiler": "10.0.14",
|
||||
"@babel/code-frame": "7.10.4",
|
||||
"@babel/parser": "7.11.2",
|
||||
"@babel/parser": "7.11.5",
|
||||
"@glimmer/syntax": "0.60.0",
|
||||
"@iarna/toml": "2.2.5",
|
||||
"@typescript-eslint/typescript-estree": "3.10.1",
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
"use strict";
|
||||
|
||||
const { ErrorMessages } = require("@babel/parser/lib/parser/error-message");
|
||||
const createError = require("../common/parser-create-error");
|
||||
const {
|
||||
getNextNonSpaceNonCommentCharacterIndexWithStartIndex,
|
||||
@@ -165,10 +164,15 @@ function tryCombinations(fn, combinations) {
|
||||
}
|
||||
|
||||
const messagesShouldThrow = new Set([
|
||||
// `TSErrors.UnexpectedTypeAnnotation` not exported
|
||||
// TSErrors.UnexpectedTypeAnnotation
|
||||
// https://github.com/babel/babel/blob/008fe25ae22e78288fbc637d41069bb4a1040987/packages/babel-parser/src/plugins/typescript/index.js#L95
|
||||
"Did not expect a type annotation here.",
|
||||
ErrorMessages.ModuleAttributeDifferentFromType,
|
||||
// ErrorMessages.ModuleAttributeDifferentFromType
|
||||
// https://github.com/babel/babel/blob/a023b6456cac4505096028f91c5b78829955bfc2/packages/babel-parser/src/parser/error-message.js#L92
|
||||
"The only accepted module attribute is `type`",
|
||||
// FlowErrors.UnexpectedTypeParameterBeforeAsyncArrowFunction
|
||||
// https://github.com/babel/babel/blob/a023b6456cac4505096028f91c5b78829955bfc2/packages/babel-parser/src/plugins/flow.js#L118
|
||||
"Type parameters must come after the async keyword, e.g. instead of `<T> async () => {}`, use `async <T>() => {}`",
|
||||
]);
|
||||
|
||||
function shouldRethrow(error) {
|
||||
|
||||
@@ -3682,15 +3682,17 @@ function printMethod(path, options, print) {
|
||||
if (value.async) {
|
||||
parts.push("async ");
|
||||
}
|
||||
if (value.generator) {
|
||||
parts.push("*");
|
||||
}
|
||||
} else {
|
||||
assert.ok(kind === "get" || kind === "set");
|
||||
|
||||
parts.push(kind, " ");
|
||||
}
|
||||
|
||||
// A `getter`/`setter` can't be a generator, but it's recoverable
|
||||
if (value.generator) {
|
||||
parts.push("*");
|
||||
}
|
||||
|
||||
parts.push(
|
||||
printPropertyKey(path, options, print),
|
||||
node.optional || node.key.optional ? "?" : "",
|
||||
|
||||
@@ -113,6 +113,36 @@ const a3 = {
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`invalid-accessor-generator.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
// Invalid, but recoverable
|
||||
// https://github.com/babel/babel/pull/11921/
|
||||
|
||||
({
|
||||
get *iterator() { },
|
||||
set *iterator(iter) { },
|
||||
get iterator2() { },
|
||||
set iterator2(iter) { },
|
||||
});
|
||||
|
||||
=====================================output=====================================
|
||||
// Invalid, but recoverable
|
||||
// https://github.com/babel/babel/pull/11921/
|
||||
|
||||
({
|
||||
get *iterator() {},
|
||||
set *iterator(iter) {},
|
||||
get iterator2() {},
|
||||
set iterator2(iter) {},
|
||||
});
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`method.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel"]
|
||||
@@ -165,7 +195,7 @@ group(
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`right_break.js format 1`] = `
|
||||
exports[`right-break.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel"]
|
||||
printWidth: 80
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
// Invalid, but recoverable
|
||||
// https://github.com/babel/babel/pull/11921/
|
||||
|
||||
({
|
||||
get *iterator() { },
|
||||
set *iterator(iter) { },
|
||||
get iterator2() { },
|
||||
set iterator2(iter) { },
|
||||
});
|
||||
File renamed without changes.
@@ -0,0 +1,19 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`async-arrow-invalid.js error test 1`] = `
|
||||
"Type parameters must come after the async keyword, e.g. instead of \`<T> async (3:1)
|
||||
1 | // https://github.com/babel/babel/pull/11979
|
||||
2 |
|
||||
> 3 | <T> async () => {}
|
||||
| ^
|
||||
4 | "
|
||||
`;
|
||||
|
||||
exports[`async-arrow-invalid.js error test 2`] = `
|
||||
"Type parameters must come after the async keyword, e.g. instead of \`<T> async (3:1)
|
||||
1 | // https://github.com/babel/babel/pull/11979
|
||||
2 |
|
||||
> 3 | <T> async () => {}
|
||||
| ^
|
||||
4 | "
|
||||
`;
|
||||
@@ -0,0 +1,3 @@
|
||||
// https://github.com/babel/babel/pull/11979
|
||||
|
||||
<T> async () => {}
|
||||
@@ -0,0 +1,2 @@
|
||||
run_spec(__dirname, ["babel-flow"]);
|
||||
run_spec(__dirname, ["babel"]);
|
||||
@@ -1,5 +1,13 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`async-arrow-invalid.js error test 1`] = `
|
||||
"Unexpected token ILLEGAL (4:1)
|
||||
2 |
|
||||
3 | <T> async () => {}
|
||||
> 4 |
|
||||
| ^"
|
||||
`;
|
||||
|
||||
exports[`default-escaped.js error test 1`] = `
|
||||
"Unexpected identifier, expected the token \`{\` (1:8)
|
||||
> 1 | export asyn\\\\u{63} from \\"async\\";
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
// https://github.com/babel/babel/pull/11979
|
||||
|
||||
<T> async () => {}
|
||||
@@ -18,6 +18,15 @@ exports[`module-attributes.js error test 1`] = `
|
||||
2 | "
|
||||
`;
|
||||
|
||||
exports[`no-for-in-init-concise-binary-in.js error test 1`] = `
|
||||
"Unexpected token, expected \\")\\" (3:18)
|
||||
1 | // https://github.com/babel/babel/pull/11931
|
||||
2 |
|
||||
> 3 | for (() => x in y;;);
|
||||
| ^
|
||||
4 | "
|
||||
`;
|
||||
|
||||
exports[`partial-template-strings.js error test 1`] = `
|
||||
"Unexpected token (6:42)
|
||||
4 |
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
// https://github.com/babel/babel/pull/11931
|
||||
|
||||
for (() => x in y;;);
|
||||
@@ -279,10 +279,10 @@
|
||||
chalk "^2.0.0"
|
||||
js-tokens "^4.0.0"
|
||||
|
||||
"@babel/parser@7.11.2":
|
||||
version "7.11.2"
|
||||
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.11.2.tgz#0882ab8a455df3065ea2dcb4c753b2460a24bead"
|
||||
integrity sha512-Vuj/+7vLo6l1Vi7uuO+1ngCDNeVmNbTngcJFKCR/oEtz8tKz0CJxZEGmPt9KcIloZhOZ3Zit6xbpXT2MDlS9Vw==
|
||||
"@babel/parser@7.11.5":
|
||||
version "7.11.5"
|
||||
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.11.5.tgz#c7ff6303df71080ec7a4f5b8c003c58f1cf51037"
|
||||
integrity sha512-X9rD8qqm695vgmeaQ4fvz/o3+Wk4ZzQvSHkDBgpYKxpD4qTAUm88ZKtHkVqIOsYFFbIQ6wQYhC6q7pjqVK0E0Q==
|
||||
|
||||
"@babel/parser@^7.1.0", "@babel/parser@^7.10.4", "@babel/parser@^7.11.5":
|
||||
version "7.11.5"
|
||||
|
||||
Reference in new issue
Block a user