From a303e13060f10622cd46d1c68b5f5cab81f3c821 Mon Sep 17 00:00:00 2001 From: Half-Shot Date: Tue, 6 Jan 2026 17:14:50 +0000 Subject: [PATCH 1/2] Change module resolution to check for correct imports. --- packages/element-web-playwright-common/tsconfig.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/element-web-playwright-common/tsconfig.json b/packages/element-web-playwright-common/tsconfig.json index 04bbd964f0..bbbd26cdb4 100644 --- a/packages/element-web-playwright-common/tsconfig.json +++ b/packages/element-web-playwright-common/tsconfig.json @@ -4,6 +4,8 @@ "compilerOptions": { "outDir": "lib", "declarationMap": true, + "module": "node16", + "moduleResolution": "node16", "allowImportingTsExtensions": false }, "include": ["src"] From 23565d2d36a0d1356dd0dec83b670bba32395abb Mon Sep 17 00:00:00 2001 From: Half-Shot Date: Tue, 6 Jan 2026 17:15:04 +0000 Subject: [PATCH 2/2] Fix imports to import with .js --- packages/element-web-playwright-common/src/fixtures/axe.ts | 2 +- .../element-web-playwright-common/src/fixtures/index.ts | 2 +- .../src/testcontainers/HomeserverContainer.ts | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/element-web-playwright-common/src/fixtures/axe.ts b/packages/element-web-playwright-common/src/fixtures/axe.ts index 2c0c97af45..b7c03763cc 100644 --- a/packages/element-web-playwright-common/src/fixtures/axe.ts +++ b/packages/element-web-playwright-common/src/fixtures/axe.ts @@ -8,7 +8,7 @@ Please see LICENSE files in the repository root for full details. import AxeBuilder from "@axe-core/playwright"; -import { test as base } from "./user"; +import { test as base } from "./user.js"; // We want to avoid using `mergeTests` because it drops useful type information about the fixtures. Instead, we extend // the definition of `test` from `user.ts`, so that there is a linear hierarchy. diff --git a/packages/element-web-playwright-common/src/fixtures/index.ts b/packages/element-web-playwright-common/src/fixtures/index.ts index 58aebfa20e..de7bce2f29 100644 --- a/packages/element-web-playwright-common/src/fixtures/index.ts +++ b/packages/element-web-playwright-common/src/fixtures/index.ts @@ -9,4 +9,4 @@ export { type Services, type WorkerOptions } from "./services.js"; // We avoid using `mergeTests` because it drops useful type information about the fixtures. // `axe` is the top of our stack of extensions (it extends `user`, etc), so it's the one we want to use. -export { test } from "./axe"; +export { test } from "./axe.js"; diff --git a/packages/element-web-playwright-common/src/testcontainers/HomeserverContainer.ts b/packages/element-web-playwright-common/src/testcontainers/HomeserverContainer.ts index 57ceb653db..dcb5efa386 100644 --- a/packages/element-web-playwright-common/src/testcontainers/HomeserverContainer.ts +++ b/packages/element-web-playwright-common/src/testcontainers/HomeserverContainer.ts @@ -8,9 +8,9 @@ Please see LICENSE files in the repository root for full details. import { type AbstractStartedContainer, type GenericContainer } from "testcontainers"; import { type APIRequestContext, type TestInfo } from "@playwright/test"; -import { type StartedMatrixAuthenticationServiceContainer } from "./mas"; -import { type ClientServerApi, type Credentials } from "../utils/api"; -import { type StartedMailpitContainer } from "./mailpit"; +import { type StartedMatrixAuthenticationServiceContainer } from "./mas.js"; +import { type ClientServerApi, type Credentials } from "../utils/api.js"; +import { type StartedMailpitContainer } from "./mailpit.js"; export interface HomeserverInstance { readonly baseUrl: string;