diff --git a/.github/workflows/linting-and-unit-tests.yaml b/.github/workflows/linting-and-unit-tests.yaml index f1c651c..41866d2 100644 --- a/.github/workflows/linting-and-unit-tests.yaml +++ b/.github/workflows/linting-and-unit-tests.yaml @@ -31,7 +31,7 @@ jobs: run: pnpm install --no-frozen-lockfile - name: Run Linting - run: pnpm run lint + run: pnpm run check:ci - name: Run unit tests run: pnpm run tests diff --git a/CHANGELOG.md b/CHANGELOG.md index f832a38..c680ad0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # @tobelabs/chainwright +## 0.10.11 + +### Patch Changes + +- [Linting] - Fix linting that breaks deployment + ## 0.10.10 ### Patch Changes diff --git a/package.json b/package.json index 502f3bc..bdc0aea 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "chainwright", - "version": "0.10.10", + "version": "0.10.11", "description": "Playwright Web3 wallet testing framework for end-to-end dApp automation with MetaMask, Phantom, Solflare, Petra, Meteor, and Keplr", "type": "module", "license": "MIT", @@ -83,6 +83,8 @@ "setup-wallets": "tsx src/cli/index.ts ./tests/wallet-setup --all -f", "tests": "vitest --exclude '**/*.spec.ts'", "lint": "biome check ./src", + "check:types": "tsc", + "check:ci": "pnpm run lint && pnpm run check:types", "format": "biome format --write ./src", "tests:e2e:debug": "playwright test --config=tests/playwright.config.ts --debug", "tests:e2e:ui": "playwright test --config=tests/playwright.config.ts --ui", diff --git a/src/wallets/phantom/phantom-worker-scope-fixture.ts b/src/wallets/phantom/phantom-worker-scope-fixture.ts index db2840a..6733366 100644 --- a/src/wallets/phantom/phantom-worker-scope-fixture.ts +++ b/src/wallets/phantom/phantom-worker-scope-fixture.ts @@ -37,13 +37,12 @@ export const phantomWorkerScopeFixture = ({ slowMo, profileName }: WalletProfile ], autoCloseNotification: [ async ({ workerScopeContents }, use) => { - let cancelled = false; - const isCancelled = () => cancelled; - const runner = autoClosePhantomNotification(workerScopeContents.walletPage, isCancelled); + const autoCloseController = new AbortController(); + const runner = autoClosePhantomNotification(workerScopeContents.walletPage, autoCloseController.signal); await use(undefined); - cancelled = true; + autoCloseController.abort(); await runner.catch((error) => { console.error(`Auto close notification error: ${(error as Error).message}`); }); diff --git a/src/wallets/solflare/solflare-worker-scope-fixture.ts b/src/wallets/solflare/solflare-worker-scope-fixture.ts index 9db98e6..e642860 100644 --- a/src/wallets/solflare/solflare-worker-scope-fixture.ts +++ b/src/wallets/solflare/solflare-worker-scope-fixture.ts @@ -31,13 +31,15 @@ export const solflareWorkerScopeFixture = ({ slowMo, profileName }: WalletProfil ], autoCloseNotification: [ async ({ workerScopeContents }, use) => { - let cancelled = false; - const isCancelled = () => cancelled; - const runner = autoCloseSolflareNotification(workerScopeContents.walletPage, isCancelled); + const autoCloseController = new AbortController(); + const runner = autoCloseSolflareNotification( + workerScopeContents.walletPage, + autoCloseController.signal, + ); await use(undefined); - cancelled = true; + autoCloseController.abort(); await runner.catch((error) => { console.error(`Auto close notification error: ${(error as Error).message}`); }); diff --git a/tsconfig.json b/tsconfig.json index 2aedf3a..b950d3c 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -23,6 +23,6 @@ "@/tests/*": ["./tests/*"] } }, - "include": ["**/*.ts", "**/*.tsx"], + "include": ["src/**/*.ts", "tests/**/*.ts", "environment.d.ts"], "exclude": ["node_modules", "docs"] }