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 @babel/parser from 7.12.3 to 7.12.5 #9597

Merged
merged 15 commits into from Nov 6, 2020
Merged
Show file tree
Hide file tree
Changes from 9 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
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -22,7 +22,7 @@
"dependencies": {
"@angular/compiler": "10.2.2",
"@babel/code-frame": "7.10.4",
"@babel/parser": "7.12.3",
"@babel/parser": "7.12.5",
"@glimmer/syntax": "0.62.4",
"@iarna/toml": "2.2.5",
"@typescript-eslint/typescript-estree": "3.10.1",
Expand Down
2 changes: 2 additions & 0 deletions tests/js/babel-plugins/__snapshots__/jsfmt.spec.js.snap
Expand Up @@ -851,9 +851,11 @@ parsers: ["babel", "babel-ts", "babel-flow"]
printWidth: 80
| printWidth
=====================================input======================================
import { "😄" as smile } from "./emojis.js";
export { smile as "😄" } from "./emojis.js";

=====================================output=====================================
import { "😄" as smile } from "./emojis.js";
export { smile as "😄" } from "./emojis.js";

================================================================================
Expand Down
1 change: 1 addition & 0 deletions tests/js/babel-plugins/module-string-names.js
@@ -1 +1,2 @@
import { "😄" as smile } from "./emojis.js";
export { smile as "😄" } from "./emojis.js";
14 changes: 14 additions & 0 deletions tests/js/binary-expressions/__snapshots__/jsfmt.spec.js.snap
Expand Up @@ -740,6 +740,20 @@ printWidth: 80
================================================================================
`;

exports[`like-regexp.js format 1`] = `
====================================options=====================================
parsers: ["babel", "flow", "typescript"]
printWidth: 80
| printWidth
=====================================input======================================
0 ? a : { b : 1 }/2;

=====================================output=====================================
0 ? a : { b: 1 } / 2;

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

exports[`math.js format 1`] = `
====================================options=====================================
parsers: ["babel", "flow", "typescript"]
Expand Down
4 changes: 3 additions & 1 deletion tests/js/binary-expressions/jsfmt.spec.js
@@ -1 +1,3 @@
run_spec(__dirname, ["babel", "flow", "typescript"]);
run_spec(__dirname, ["babel", "flow", "typescript"], {
errors: { espree: ["like-regexp.js"] },
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reported to acron repo acornjs/acorn#991

});
1 change: 1 addition & 0 deletions tests/js/binary-expressions/like-regexp.js
@@ -0,0 +1 @@
0 ? a : { b : 1 }/2;
32 changes: 32 additions & 0 deletions tests/js/import-assertions/__snapshots__/jsfmt.spec.js.snap
Expand Up @@ -14,6 +14,24 @@ import("./foo.json", { assert: { type: "json" } });
================================================================================
`;

exports[`import-assertions-for-export.js format 1`] = `
====================================options=====================================
parsers: ["babel"]
printWidth: 80
| printWidth
=====================================input======================================
export { foo2 } from "foo.json" assert { type: "json" };
export * from "foo.json" assert { type: "json" };
export * as foo3 from "foo.json" assert { type: "json" };

=====================================output=====================================
export { foo2 } from "foo.json";
export * from "foo.json";
export * as foo3 from "foo.json";

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

exports[`import-assertions-multi-types.js format 1`] = `
====================================options=====================================
parsers: ["babel"]
Expand Down Expand Up @@ -42,6 +60,20 @@ import json from "./foo.json" assert { type: "json" };
================================================================================
`;

exports[`import-assertions-without-from.js format 1`] = `
====================================options=====================================
parsers: ["babel"]
printWidth: 80
| printWidth
=====================================input======================================
import "foo" assert { type: "json" }

=====================================output=====================================
import "foo" assert { type: "json" };

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

exports[`not-import-assertions.js format 1`] = `
====================================options=====================================
parsers: ["babel"]
Expand Down
3 changes: 3 additions & 0 deletions tests/js/import-assertions/import-assertions-for-export.js
@@ -0,0 +1,3 @@
export { foo2 } from "foo.json" assert { type: "json" };
export * from "foo.json" assert { type: "json" };
export * as foo3 from "foo.json" assert { type: "json" };
@@ -0,0 +1 @@
import "foo" assert { type: "json" }
4 changes: 4 additions & 0 deletions tests/js/import-assertions/jsfmt.spec.js
Expand Up @@ -4,11 +4,15 @@ run_spec(__dirname, ["babel"], {
"import-assertions-dynamic.js",
"import-assertions-multi-types.js",
"import-assertions-static.js",
"import-assertions-without-from.js",
"import-assertions-for-export.js",
],
meriyah: [
"import-assertions-dynamic.js",
"import-assertions-multi-types.js",
"import-assertions-static.js",
"import-assertions-without-from.js",
"import-assertions-for-export.js",
],
},
});
17 changes: 17 additions & 0 deletions tests/js/label/__snapshots__/jsfmt.spec.js.snap
@@ -1,5 +1,22 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`block-statement-and-regexp.js format 1`] = `
====================================options=====================================
parsers: ["babel", "flow", "typescript"]
printWidth: 80
| printWidth
=====================================input======================================
a : { b : 1 }/2/;

=====================================output=====================================
a: {
b: 1;
}
/2/;

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

exports[`comment.js format 1`] = `
====================================options=====================================
parsers: ["babel", "flow", "typescript"]
Expand Down
1 change: 1 addition & 0 deletions tests/js/label/block-statement-and-regexp.js
@@ -0,0 +1 @@
a : { b : 1 }/2/;
20 changes: 19 additions & 1 deletion tests/js/module-string-names/__snapshots__/jsfmt.spec.js.snap
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`module-string-names.js format 1`] = `
exports[`module-string-names-export.js format 1`] = `
====================================options=====================================
parsers: ["babel"]
printWidth: 80
Expand Down Expand Up @@ -30,3 +30,21 @@ export { "smile" } from "./emojis.js";

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

exports[`module-string-names-import.js format 1`] = `
====================================options=====================================
parsers: ["babel"]
printWidth: 80
| printWidth
=====================================input======================================
import { "default" as quotation } from "Confucius";
import { "foo" as bar, "default" as qux } from "module-a";
import { "學而時習之,不亦說乎?" as quotation } from "Confucius";

=====================================output=====================================
import { "default" as quotation } from "Confucius";
import { "foo" as bar, "default" as qux } from "module-a";
import { "學而時習之,不亦說乎?" as quotation } from "Confucius";

================================================================================
`;
3 changes: 3 additions & 0 deletions tests/js/module-string-names/module-string-names-import.js
@@ -0,0 +1,3 @@
import { "default" as quotation } from "Confucius";
import { "foo" as bar, "default" as qux } from "module-a";
import { "學而時習之,不亦說乎?" as quotation } from "Confucius";
41 changes: 41 additions & 0 deletions tests/js/reserved-word/__snapshots__/jsfmt.spec.js.snap
@@ -0,0 +1,41 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`interfaces.js format 1`] = `
====================================options=====================================
parsers: ["babel"]
printWidth: 80
| printWidth
=====================================input======================================
interface = "foo";
interface + 3;
interface();
class interface {}
interface ? true : false;
function interface() {}
import interface from "foo";
foo.interface;
interface.foo;
new interface();
({ interface: "foo" });
(interface, "foo");
void interface;
const interface = "foo";

=====================================output=====================================
interface = "foo";
interface + 3;
interface();
class interface {}
interface ? true : false;
function interface() {}
import interface from "foo";
foo.interface;
interface.foo;
new interface();
({ interface: "foo" });
interface, "foo";
void interface;
const interface = "foo";

================================================================================
`;
14 changes: 14 additions & 0 deletions tests/js/reserved-word/interfaces.js
@@ -0,0 +1,14 @@
interface = "foo";
interface + 3;
interface();
class interface {}
interface ? true : false;
function interface() {}
import interface from "foo";
foo.interface;
interface.foo;
new interface();
({ interface: "foo" });
(interface, "foo");
void interface;
const interface = "foo";
1 change: 1 addition & 0 deletions tests/js/reserved-word/jsfmt.spec.js
@@ -0,0 +1 @@
run_spec(__dirname, ["babel"], { errors: { espree: true, meriyah: true } });
11 changes: 11 additions & 0 deletions tests/misc/errors/babel-ts/__snapshots__/jsfmt.spec.js.snap
Expand Up @@ -13,3 +13,14 @@ exports[`type-annotation-func.ts error test 1`] = `
| ^
2 | "
`;

exports[`type-annotation-in-jsx.tsx error test 1`] = `
"Did not expect a type annotation here. (3:22)
1 | function Foo() {
2 | return (
> 3 | <div propA={[ key: value ]} propsB={(a: b)} />
| ^
4 | );
5 | }
6 | "
`;
5 changes: 5 additions & 0 deletions tests/misc/errors/babel-ts/type-annotation-in-jsx.tsx
@@ -0,0 +1,5 @@
function Foo() {
return (
<div propA={[ key: value ]} propsB={(a: b)} />
);
}
15 changes: 7 additions & 8 deletions tests/misc/errors/js/__snapshots__/jsfmt.spec.js.snap
Expand Up @@ -11,6 +11,13 @@ exports[`html-like-comments.js error test 1`] = `
6 | "
`;

exports[`import-assertions-for-export-without-from.js error test 1`] = `
"Unexpected token, expected \\";\\" (1:16)
> 1 | export { foo } assert { type: \\"json\\" };
| ^
2 | "
`;

exports[`import-assertions-with-parens.js error test 1`] = `
"Unexpected token (1:19)
> 1 | import \\"x\\" assert ({type: 'json'});
Expand All @@ -25,14 +32,6 @@ exports[`module-attributes.js error test 1`] = `
2 | "
`;

exports[`module-string-name-import.js error test 1`] = `
"Unexpected token (2:10)
1 | // https://github.com/babel/babel/issues/12209
> 2 | import { \\"foo\\" as foo } from \\"module-a\\";
| ^
3 | "
`;

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
Expand Down
@@ -0,0 +1 @@
export { foo } assert { type: "json" };
2 changes: 0 additions & 2 deletions tests/misc/errors/js/module-string-name-import.js

This file was deleted.

12 changes: 12 additions & 0 deletions tests/typescript/declare/__snapshots__/jsfmt.spec.js.snap
Expand Up @@ -110,11 +110,23 @@ declare interface Dictionary<T> {
[index: string]: T
}

declare interface B {
foo([]?): void;
bar({}, []?): any;
baz(a: string, b: number, []?): void;
}

=====================================output=====================================
declare interface Dictionary<T> {
[index: string]: T;
}

declare interface B {
foo([]?): void;
bar({}, []?): any;
baz(a: string, b: number, []?): void;
}

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

Expand Down
6 changes: 6 additions & 0 deletions tests/typescript/declare/declare_interface.ts
@@ -1,3 +1,9 @@
declare interface Dictionary<T> {
[index: string]: T
}

declare interface B {
foo([]?): void;
bar({}, []?): any;
baz(a: string, b: number, []?): void;
}
45 changes: 45 additions & 0 deletions tests/typescript/interface/__snapshots__/jsfmt.spec.js.snap
Expand Up @@ -844,6 +844,51 @@ export interface ThirdVeryLongAndBoringInterfaceName
================================================================================
`;

exports[`pattern-parameters.ts - {"semi":false} format 1`] = `
====================================options=====================================
parsers: ["typescript"]
printWidth: 80
semi: false
| printWidth
=====================================input======================================
interface B {
foo([]?): void;
bar({}, []?): any;
baz(a: string, b: number, []?): void;
}

=====================================output=====================================
interface B {
foo([]?): void
bar({}, []?): any
baz(a: string, b: number, []?): void
}

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

exports[`pattern-parameters.ts format 1`] = `
====================================options=====================================
parsers: ["typescript"]
printWidth: 80
| printWidth
=====================================input======================================
interface B {
foo([]?): void;
bar({}, []?): any;
baz(a: string, b: number, []?): void;
}

=====================================output=====================================
interface B {
foo([]?): void;
bar({}, []?): any;
baz(a: string, b: number, []?): void;
}

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

exports[`separator.ts - {"semi":false} format 1`] = `
====================================options=====================================
parsers: ["typescript"]
Expand Down
5 changes: 5 additions & 0 deletions tests/typescript/interface/pattern-parameters.ts
@@ -0,0 +1,5 @@
interface B {
foo([]?): void;
bar({}, []?): any;
baz(a: string, b: number, []?): void;
}