diff --git a/package.json b/package.json index ab6928ae5..ecb1baf70 100644 --- a/package.json +++ b/package.json @@ -134,7 +134,7 @@ "esm-utils": "4.1.0", "execa": "6.1.0", "jest": "29.2.1", - "jest-light-runner": "0.4.0", + "jest-light-runner": "0.4.1", "jest-snapshot-serializer-ansi": "1.0.0", "jest-snapshot-serializer-raw": "1.2.0", "jest-watch-typeahead": "2.2.0", diff --git a/tests/format/js/babel-plugins/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/babel-plugins/__snapshots__/jsfmt.spec.js.snap index 2e11f5dbf..2ad5155b9 100644 --- a/tests/format/js/babel-plugins/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/babel-plugins/__snapshots__/jsfmt.spec.js.snap @@ -393,17 +393,6 @@ console.log(Bork.staticFunction()); // > "babelIsCool" ================================================================================ `; -exports[`class-static-block.js [meriyah] format 1`] = ` -"Unexpected token: '{' (4:10) - 2 | static #x = 42; - 3 | static y; -> 4 | static { - | ^ - 5 | try { - 6 | this.y = doSomethingWith(this.#x); - 7 | } catch {" -`; - exports[`class-static-block.js format 1`] = ` ====================================options===================================== parsers: ["babel", "babel-ts", "babel-flow"] diff --git a/tests/format/js/class-static-block/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/class-static-block/__snapshots__/jsfmt.spec.js.snap index dd0cc3f43..10e0d99ad 100644 --- a/tests/format/js/class-static-block/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/class-static-block/__snapshots__/jsfmt.spec.js.snap @@ -1,16 +1,5 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`class-static-block.js [meriyah] format 1`] = ` -"Unexpected token: '{' (4:10) - 2 | static #x = 42; - 3 | static y; -> 4 | static { - | ^ - 5 | try { - 6 | this.y = doSomethingWith(this.#x); - 7 | } catch {" -`; - exports[`class-static-block.js format 1`] = ` ====================================options===================================== parsers: ["babel"] @@ -79,17 +68,6 @@ class A2 { ================================================================================ `; -exports[`with-line-breaks.js [meriyah] format 1`] = ` -"Unexpected token: '{' (3:3) - 1 | class Foo { - 2 | static -> 3 | { - | ^ - 4 | 1 + 1; - 5 | } - 6 | };" -`; - exports[`with-line-breaks.js format 1`] = ` ====================================options===================================== parsers: ["babel"] diff --git a/tests/format/js/comments/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/comments/__snapshots__/jsfmt.spec.js.snap index a172e029c..13d0cc272 100644 --- a/tests/format/js/comments/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/comments/__snapshots__/jsfmt.spec.js.snap @@ -2619,101 +2619,6 @@ export default AspectRatioBox; ================================================================================ `; -exports[`issue-7724.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -const foo = "Bar"; - -/** - * @template T - * @param {Type} type - * @param {T} value - * @return {Value} - *//** - * @param {Type} type - * @return {Value} - */ -function value(type, value) { - if (arguments.length === 2) { - return new ConcreteValue(type, value); - } else { - return new Value(type); - } -} -=====================================output===================================== -const foo = "Bar" - -/** - * @template T - * @param {Type} type - * @param {T} value - * @return {Value} - */ /** - * @param {Type} type - * @return {Value} - */ -function value(type, value) { - if (arguments.length === 2) { - return new ConcreteValue(type, value) - } else { - return new Value(type) - } -} - -================================================================================ -`; - -exports[`issue-7724.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const foo = "Bar"; - -/** - * @template T - * @param {Type} type - * @param {T} value - * @return {Value} - *//** - * @param {Type} type - * @return {Value} - */ -function value(type, value) { - if (arguments.length === 2) { - return new ConcreteValue(type, value); - } else { - return new Value(type); - } -} -=====================================output===================================== -const foo = "Bar"; - -/** - * @template T - * @param {Type} type - * @param {T} value - * @return {Value} - */ /** - * @param {Type} type - * @return {Value} - */ -function value(type, value) { - if (arguments.length === 2) { - return new ConcreteValue(type, value); - } else { - return new Value(type); - } -} - -================================================================================ -`; - exports[`issues.js - {"semi":false} format 1`] = ` ====================================options===================================== parsers: ["babel", "flow", "typescript"] diff --git a/tests/format/js/regex/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/regex/__snapshots__/jsfmt.spec.js.snap index 18d9ecdde..f458f7331 100644 --- a/tests/format/js/regex/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/regex/__snapshots__/jsfmt.spec.js.snap @@ -1,12 +1,5 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`d-flag.js [meriyah] format 1`] = ` -"Unexpected regular expression flag (1:3) -> 1 | /./d; - | ^ - 2 |" -`; - exports[`d-flag.js format 1`] = ` ====================================options===================================== parsers: ["babel", "flow", "typescript"] diff --git a/tests/format/js/strings/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/strings/__snapshots__/jsfmt.spec.js.snap index 96a320028..9997bec12 100644 --- a/tests/format/js/strings/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/strings/__snapshots__/jsfmt.spec.js.snap @@ -66,60 +66,6 @@ const loremIpsumFooBazBar2 = ================================================================================ `; -exports[`multiline-literal.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -// https://github.com/prettier/prettier/pull/13274 - -const loremIpsumFooBazBar1 = 'Multiline string\\ - Multiline string\\ -' - -const loremIpsumFooBazBar2 = 'Multiline string\\ - Multiline string\\ - Multiline string' - -=====================================output===================================== -// https://github.com/prettier/prettier/pull/13274 - -const loremIpsumFooBazBar1 = - "Multiline string\\ - Multiline string\\ -"; - -const loremIpsumFooBazBar2 = - "Multiline string\\ - Multiline string\\ - Multiline string"; - -================================================================================ -`; - -exports[`non-octal-eight-and-nine.js [acorn] format 1`] = ` -"Invalid escape sequence (3:3) - 1 | // https://github.com/babel/babel/pull/11852 - 2 | -> 3 | "\\8","\\9"; - | ^ - 4 | () => { - 5 | "use strict"; - 6 | "\\8", "\\9";" -`; - -exports[`non-octal-eight-and-nine.js [espree] format 1`] = ` -"Invalid escape sequence (3:3) - 1 | // https://github.com/babel/babel/pull/11852 - 2 | -> 3 | "\\8","\\9"; - | ^ - 4 | () => { - 5 | "use strict"; - 6 | "\\8", "\\9";" -`; - exports[`non-octal-eight-and-nine.js - {"trailingComma":"all"} [acorn] format 1`] = ` "Invalid escape sequence (3:3) 1 | // https://github.com/babel/babel/pull/11852 diff --git a/tests/format/typescript/optional-variance/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/optional-variance/__snapshots__/jsfmt.spec.js.snap index 0354574d0..566dc26e0 100644 --- a/tests/format/typescript/optional-variance/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/typescript/optional-variance/__snapshots__/jsfmt.spec.js.snap @@ -134,150 +134,6 @@ declare class StateNode { ================================================================================ `; -exports[`with-jsx.tsx [babel-ts] format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -type Covariant = { - x: T; -} -type Contravariant = { - f: (x: T) => void; -} -type Invariant = { - f: (x: T) => T; -} -type T10 = T; -type T11 = keyof T; -type T12 = T[K]; -type T13 = T[keyof T]; - -type Covariant1 = { - x: T; -} - -type Contravariant1 = keyof T; - -type Contravariant2 = { - f: (x: T) => void; -} - -type Invariant1 = { - f: (x: T) => T; -} - -type Invariant2 = { - f: (x: T) => T; -} -type Foo1 = { - x: T; - f: FooFn1; -} - -type Foo2 = { - x: T; - f: FooFn2; -} - -type Foo3 = { - x: T; - f: FooFn3; -} - -type T21 = T; - -interface Baz {} -interface Baz {} - -interface Parent { - child: Child | null; - parent: Parent | null; -} - -declare class StateNode { - _storedEvent: TEvent; - _action: ActionObject; - _state: StateNode; -} - -=====================================output===================================== -type Covariant = { - x: T; -}; -type Contravariant = { - f: (x: T) => void; -}; -type Invariant = { - f: (x: T) => T; -}; -type T10 = T; -type T11 = keyof T; -type T12 = T[K]; -type T13 = T[keyof T]; - -type Covariant1 = { - x: T; -}; - -type Contravariant1 = keyof T; - -type Contravariant2 = { - f: (x: T) => void; -}; - -type Invariant1 = { - f: (x: T) => T; -}; - -type Invariant2 = { - f: (x: T) => T; -}; -type Foo1 = { - x: T; - f: FooFn1; -}; - -type Foo2 = { - x: T; - f: FooFn2; -}; - -type Foo3 = { - x: T; - f: FooFn3; -}; - -type T21 = T; - -interface Baz {} -interface Baz {} - -interface Parent { - child: Child | null; - parent: Parent | null; -} - -declare class StateNode { - _storedEvent: TEvent; - _action: ActionObject; - _state: StateNode; -} - -================================================================================ -`; - -exports[`with-jsx.tsx [typescript] format 1`] = ` -"Unexpected token. Did you mean \`{'>'}\` or \`>\`? (2:11) - 1 | // valid JSX -> 2 | () => {}; - | ^ - 3 | - 4 | type Covariant = { - 5 | x: T;" -`; - exports[`with-jsx.tsx format 1`] = ` ====================================options===================================== parsers: ["typescript"] diff --git a/yarn.lock b/yarn.lock index 3418a2bec..c46b92805 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5053,9 +5053,9 @@ __metadata: languageName: node linkType: hard -"jest-light-runner@npm:0.4.0": - version: 0.4.0 - resolution: "jest-light-runner@npm:0.4.0" +"jest-light-runner@npm:0.4.1": + version: 0.4.1 + resolution: "jest-light-runner@npm:0.4.1" dependencies: "@jest/expect": ^29.0.1 jest-circus: ^29.0.1 @@ -5066,7 +5066,7 @@ __metadata: supports-color: ^9.2.1 peerDependencies: jest: ^27.5.0 || ^28.0.0 || ^29.0.0 - checksum: 8ad449a830bd1b039d505baa40881e6e7d1badc8698d844c456c156f820bf0a4b58563ef07678dbed368ca968262bccd28ba756a3d4dc1a8e19f49a57bf82775 + checksum: e1a3019e9d3cd03627f85e2a7cfd10f89c6b34e88f6fbd8496575fe995cad1e333a7aed476137612cbd2f2de0474c4bc6c5191a28c4db8b231c9ea957d09d07b languageName: node linkType: hard @@ -6681,7 +6681,7 @@ __metadata: import-meta-resolve: 2.1.0 jest: 29.2.1 jest-docblock: 29.2.0 - jest-light-runner: 0.4.0 + jest-light-runner: 0.4.1 jest-snapshot-serializer-ansi: 1.0.0 jest-snapshot-serializer-raw: 1.2.0 jest-watch-typeahead: 2.2.0