From e270032d37ba35969b4ea55ab719a6815ea44cc1 Mon Sep 17 00:00:00 2001 From: Lucas Azzola Date: Mon, 29 May 2017 01:05:33 +1000 Subject: [PATCH] chore(typescript): upgrade typescript-eslint-parser to 992f1fa (fixes #1769) (#1785) --- package.json | 2 +- tests/async/__snapshots__/jsfmt.spec.js.snap | 24 +++++++++++++++++++ tests/async/async-iteration.js | 10 ++++++++ .../__snapshots__/jsfmt.spec.js.snap | 9 +++++++ tests/typescript_class/dunder.ts | 2 ++ yarn.lock | 4 ++-- 6 files changed, 48 insertions(+), 3 deletions(-) create mode 100644 tests/async/async-iteration.js create mode 100644 tests/typescript_class/dunder.ts diff --git a/package.json b/package.json index 448d08eba..662daa6a3 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "rollup-plugin-node-globals": "1.1.0", "rollup-plugin-node-resolve": "2.0.0", "typescript": "2.3.2", - "typescript-eslint-parser": "git://github.com/eslint/typescript-eslint-parser.git#31ad3c4c3e59ad3290aeb1a04d8f2683de55fbde" + "typescript-eslint-parser": "git://github.com/eslint/typescript-eslint-parser.git#992f1fa940c5679c8a509059665146f717da58cb" }, "scripts": { "test": "jest", diff --git a/tests/async/__snapshots__/jsfmt.spec.js.snap b/tests/async/__snapshots__/jsfmt.spec.js.snap index c3ffa44fc..25434bdd4 100644 --- a/tests/async/__snapshots__/jsfmt.spec.js.snap +++ b/tests/async/__snapshots__/jsfmt.spec.js.snap @@ -1,5 +1,29 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP +exports[`async-iteration.js 1`] = ` + +async function * a() { + yield* b(); +} + +class X { + async * b() { + yield* a(); + } +} +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +async function* a() { + yield* b(); +} + +class X { + async *b() { + yield* a(); + } +} + +`; + exports[`await_parse.js 1`] = ` async function f() { (await f()).length } async function g() { diff --git a/tests/async/async-iteration.js b/tests/async/async-iteration.js new file mode 100644 index 000000000..992a22c32 --- /dev/null +++ b/tests/async/async-iteration.js @@ -0,0 +1,10 @@ + +async function * a() { + yield* b(); +} + +class X { + async * b() { + yield* a(); + } +} diff --git a/tests/typescript_class/__snapshots__/jsfmt.spec.js.snap b/tests/typescript_class/__snapshots__/jsfmt.spec.js.snap index 4642f551d..667ab947e 100644 --- a/tests/typescript_class/__snapshots__/jsfmt.spec.js.snap +++ b/tests/typescript_class/__snapshots__/jsfmt.spec.js.snap @@ -1,5 +1,14 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP +exports[`dunder.ts 1`] = ` +// eslint/typescript-eslint-parser#296 +class F<__T> {} +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// eslint/typescript-eslint-parser#296 +class F<__T> {} + +`; + exports[`generics.ts 1`] = ` class implements Map {} diff --git a/tests/typescript_class/dunder.ts b/tests/typescript_class/dunder.ts new file mode 100644 index 000000000..aed0e24d9 --- /dev/null +++ b/tests/typescript_class/dunder.ts @@ -0,0 +1,2 @@ +// eslint/typescript-eslint-parser#296 +class F<__T> {} diff --git a/yarn.lock b/yarn.lock index 5a5b39ba1..ad8aa9abf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2808,9 +2808,9 @@ typedarray@^0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" -"typescript-eslint-parser@git://github.com/eslint/typescript-eslint-parser.git#31ad3c4c3e59ad3290aeb1a04d8f2683de55fbde": +"typescript-eslint-parser@git://github.com/eslint/typescript-eslint-parser.git#992f1fa940c5679c8a509059665146f717da58cb": version "3.0.0" - resolved "git://github.com/eslint/typescript-eslint-parser.git#31ad3c4c3e59ad3290aeb1a04d8f2683de55fbde" + resolved "git://github.com/eslint/typescript-eslint-parser.git#992f1fa940c5679c8a509059665146f717da58cb" dependencies: lodash.unescape "4.0.1" semver "5.3.0"