From 857c99bd718493463199bd54f97a69300d20ed90 Mon Sep 17 00:00:00 2001 From: NullVoxPopuli Date: Wed, 26 May 2021 15:52:57 -0400 Subject: [PATCH 1/4] chore(ci): add type checking --- .github/workflows/ci.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9037b50..745d5c7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,6 +13,19 @@ env: CI: true jobs: + type_checking: + if: "! contains(toJSON(github.event.commits.*.message), '[skip ci]')" + name: Check Types + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - uses: volta-cli/action@v1 + + - run: yarn install --frozen-lockfile + - run: yarn prepack + + tests: if: "! contains(toJSON(github.event.commits.*.message), '[skip ci]')" name: Base Tests From 30e853467a51e3bea01428b243bdc1c3bbdcacd4 Mon Sep 17 00:00:00 2001 From: NullVoxPopuli Date: Wed, 26 May 2021 15:59:01 -0400 Subject: [PATCH 2/4] chore(internal): convert some test js files to ts --- tests/dummy/app/{app.js => app.ts} | 0 tests/dummy/app/{router.js => router.ts} | 0 tests/{test-helper.js => test-helper.ts} | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename tests/dummy/app/{app.js => app.ts} (100%) rename tests/dummy/app/{router.js => router.ts} (100%) rename tests/{test-helper.js => test-helper.ts} (100%) diff --git a/tests/dummy/app/app.js b/tests/dummy/app/app.ts similarity index 100% rename from tests/dummy/app/app.js rename to tests/dummy/app/app.ts diff --git a/tests/dummy/app/router.js b/tests/dummy/app/router.ts similarity index 100% rename from tests/dummy/app/router.js rename to tests/dummy/app/router.ts diff --git a/tests/test-helper.js b/tests/test-helper.ts similarity index 100% rename from tests/test-helper.js rename to tests/test-helper.ts From 5d447ef927cad29d97940355c2afd160d359a02a Mon Sep 17 00:00:00 2001 From: NullVoxPopuli Date: Wed, 26 May 2021 16:04:47 -0400 Subject: [PATCH 3/4] fix(types): withHashSupport needs explicit type --- addon/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addon/index.ts b/addon/index.ts index 290368e..c714ef1 100644 --- a/addon/index.ts +++ b/addon/index.ts @@ -16,7 +16,7 @@ type TransitionWithPrivateAPIs = Transition & { }; }; -export function withHashSupport(AppRouter: typeof EmberRouter) { +export function withHashSupport(AppRouter: typeof EmberRouter): typeof AppRouter { return class RouterWithHashSupport extends AppRouter { constructor(...args: RouterArgs) { super(...args); From 0c0ad08e3b0e49223a9eb892efcc94ab362bb0e4 Mon Sep 17 00:00:00 2001 From: NullVoxPopuli Date: Wed, 26 May 2021 16:08:55 -0400 Subject: [PATCH 4/4] chore(ci): make compatibility tests require that type checking succeeds --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 745d5c7..9287b0e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -74,7 +74,7 @@ jobs: name: "Compatibility" timeout-minutes: 7 runs-on: ubuntu-latest - needs: tests + needs: [ tests, type_checking ] strategy: fail-fast: true