From 6bc7756925ee12d72e844278e2f7b64539cc5cc8 Mon Sep 17 00:00:00 2001 From: Fanis Tharropoulos Date: Thu, 26 Mar 2026 21:21:18 +0200 Subject: [PATCH 1/3] build: change test tsconfig target & module --- tsconfig.test.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tsconfig.test.json b/tsconfig.test.json index b4da180f..4ce1ca1c 100644 --- a/tsconfig.test.json +++ b/tsconfig.test.json @@ -3,6 +3,8 @@ "include": ["./src/**/*.ts", "./test/**/*.ts"], "compilerOptions": { "noEmit": true, - "rootDir": "." - } + "rootDir": ".", + "target": "esnext", + "module": "esnext" +} } From 2a89035fdcaee901203e750f39b9bec29bedddb7 Mon Sep 17 00:00:00 2001 From: Fanis Tharropoulos Date: Thu, 26 Mar 2026 21:19:51 +0200 Subject: [PATCH 2/3] fix(test): fix type issues on tests --- test/Typesense/ApiCall.spec.ts | 12 +++++++----- test/Typesense/Operations.spec.ts | 18 ++++++++++-------- test/Typesense/Stats.spec.ts | 2 +- test/Typesense/StemmingDictionaries.spec.ts | 2 +- test/Typesense/StemmingDictionary.spec.ts | 2 +- 5 files changed, 20 insertions(+), 16 deletions(-) diff --git a/test/Typesense/ApiCall.spec.ts b/test/Typesense/ApiCall.spec.ts index 5a9b745b..c7a2c435 100644 --- a/test/Typesense/ApiCall.spec.ts +++ b/test/Typesense/ApiCall.spec.ts @@ -422,11 +422,13 @@ describe("ApiCall", () => { const apiCall = new ApiCall(client.configuration); mockAxios - .onGet("https://node0/path/collections", "", { - Accept: "application/json, text/plain, */*", - "Content-Type": "application/json", - "X-TYPESENSE-API-KEY": client.configuration.apiKey, - "x-header-name": "value", + .onGet("https://node0/path/collections", { + headers: { + Accept: "application/json, text/plain, */*", + "Content-Type": "application/json", + "X-TYPESENSE-API-KEY": client.configuration.apiKey, + "x-header-name": "value", + }, }) .reply(200, JSON.stringify({}), { "content-type": "application/json" }); diff --git a/test/Typesense/Operations.spec.ts b/test/Typesense/Operations.spec.ts index 0d1f8360..a1108deb 100644 --- a/test/Typesense/Operations.spec.ts +++ b/test/Typesense/Operations.spec.ts @@ -75,11 +75,12 @@ describe("Operations", function () { "/operations/schema_changes", typesense.configuration.nodes[0], ), - null, { - Accept: "application/json, text/plain, */*", - "Content-Type": "application/json", - "X-TYPESENSE-API-KEY": typesense.configuration.apiKey, + headers: { + Accept: "application/json, text/plain, */*", + "Content-Type": "application/json", + "X-TYPESENSE-API-KEY": typesense.configuration.apiKey, + }, }, ) .reply(200, [ @@ -108,11 +109,12 @@ describe("Operations", function () { "/operations/schema_changes", typesense.configuration.nodes[0], ), - null, { - Accept: "application/json, text/plain, */*", - "Content-Type": "application/json", - "X-TYPESENSE-API-KEY": typesense.configuration.apiKey, + headers: { + Accept: "application/json, text/plain, */*", + "Content-Type": "application/json", + "X-TYPESENSE-API-KEY": typesense.configuration.apiKey, + }, }, ) .reply(200, []); diff --git a/test/Typesense/Stats.spec.ts b/test/Typesense/Stats.spec.ts index aa6caacd..fd7b1926 100644 --- a/test/Typesense/Stats.spec.ts +++ b/test/Typesense/Stats.spec.ts @@ -15,7 +15,7 @@ describe("Stats", function () { nodes: [ { host: "node0", - port: "8108", + port: 8108, protocol: "http", }, ], diff --git a/test/Typesense/StemmingDictionaries.spec.ts b/test/Typesense/StemmingDictionaries.spec.ts index 73facd9e..51dacefd 100644 --- a/test/Typesense/StemmingDictionaries.spec.ts +++ b/test/Typesense/StemmingDictionaries.spec.ts @@ -15,7 +15,7 @@ describe("StemmingDictionaries", function () { nodes: [ { host: "node0", - port: "8108", + port: 8108, protocol: "http", }, ], diff --git a/test/Typesense/StemmingDictionary.spec.ts b/test/Typesense/StemmingDictionary.spec.ts index fddb85c7..f096c313 100644 --- a/test/Typesense/StemmingDictionary.spec.ts +++ b/test/Typesense/StemmingDictionary.spec.ts @@ -15,7 +15,7 @@ describe("StemmingDictionary", function () { nodes: [ { host: "node0", - port: "8108", + port: 8108, protocol: "http", }, ], From 8aecbb35eaacb0d36af52a4ddfe88bdf56bd7e2f Mon Sep 17 00:00:00 2001 From: Fanis Tharropoulos Date: Thu, 26 Mar 2026 21:22:33 +0200 Subject: [PATCH 3/3] ci: add typecheck to ci pipeline --- .github/workflows/tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a3500831..f82b8004 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -35,6 +35,7 @@ jobs: - run: npm ci - run: npm run build - run: npm run ci-lint + - run: npm run typecheck - run: npm run test - uses: actions/upload-artifact@v4 with: