From f56bd9b1cb753509209fa10b0a891208872c269f Mon Sep 17 00:00:00 2001 From: fcsouza Date: Sun, 13 Sep 2026 23:40:43 -0300 Subject: [PATCH] test: Handle is an interface again It became a type alias two commits ago to get past an index signature on `MockModuleOptions`. @vttforge/testing 0.14.1 takes an interface, so the workaround and the comment explaining it are gone. --- package.json | 2 +- pnpm-lock.yaml | 10 +++++----- pnpm-workspace.yaml | 2 +- scripts/updates/__tests__/check.test.ts | 12 +++--------- 4 files changed, 10 insertions(+), 16 deletions(-) diff --git a/package.json b/package.json index 999c963..cbed8cc 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "devDependencies": { "@playwright/test": "^1.56.0", "@vttforge/cli": "^0.18.0", - "@vttforge/testing": "^0.14.0", + "@vttforge/testing": "^0.14.1", "@vttforge/types": "^0.8.0", "@vttforge/vite-plugin": "^0.6.0", "typescript": "^5.4.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a38de4c..5ef0dd4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -19,8 +19,8 @@ importers: specifier: ^0.18.0 version: 0.18.0 '@vttforge/testing': - specifier: ^0.14.0 - version: 0.14.0 + specifier: ^0.14.1 + version: 0.14.1 '@vttforge/types': specifier: ^0.8.0 version: 0.8.0 @@ -381,8 +381,8 @@ packages: '@vttforge/core@0.20.0': resolution: {integrity: sha512-ehpp9DRuq6tVP2rdE0KpKqYD60JkSIJNhwr7u4Svb421kc42w9TiE6hUzgd32Go/WqezjgJHCe3lkjticcsSsQ==} - '@vttforge/testing@0.14.0': - resolution: {integrity: sha512-q/fSJVaxA16EPIziaidIpf/76a9/tOetz8RkNzSnCpcW8iY5OY5SMJwqir9p+bpk3iSQyV3yce0cREk+Emv96g==} + '@vttforge/testing@0.14.1': + resolution: {integrity: sha512-UvceTdft6JJ+RQwZCzE9h4sPgdKB89cdTEgDNFe/wZtmb9PYxXu6gShTPe3TK3mOXO9q8KNHpoZGLey5xkGhRA==} engines: {node: '>=22.0.0'} '@vttforge/types@0.11.0': @@ -1222,7 +1222,7 @@ snapshots: dependencies: '@vttforge/types': 0.5.0 - '@vttforge/testing@0.14.0': + '@vttforge/testing@0.14.1': dependencies: '@vttforge/types': 0.11.0 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 5cf3679..c4a8a18 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -3,4 +3,4 @@ minimumReleaseAgeExclude: - '@vttforge/core@0.19.0 || 0.20.0' - '@vttforge/types@0.3.0 || 0.4.0 || 0.5.0 || 0.7.0 || 0.8.0 || 0.11.0' - '@vttforge/vite-plugin@0.6.0' - - '@vttforge/testing@0.8.0 || 0.10.0 || 0.11.0 || 0.12.0 || 0.14.0' + - '@vttforge/testing@0.8.0 || 0.10.0 || 0.11.0 || 0.12.0 || 0.14.0 || 0.14.1' diff --git a/scripts/updates/__tests__/check.test.ts b/scripts/updates/__tests__/check.test.ts index 52e34ce..33a5c6b 100644 --- a/scripts/updates/__tests__/check.test.ts +++ b/scripts/updates/__tests__/check.test.ts @@ -10,20 +10,14 @@ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'; import { CACHE_SETTING, MODULE_ID } from '../../constants.js'; import { checkUpdates, EMPTY_CACHE, lastReport, type UpdateCache } from '../check.js'; -/** - * One installed module, as Foundry builds a handle from a manifest. - * - * A type, not an interface. `MockModuleOptions` carries an index signature and - * an interface does not satisfy one, so an interface here fails to compile at - * the call below. - */ -type Handle = { +/** One installed module, as Foundry builds a handle from a manifest. */ +interface Handle { id: string; title: string; version: string; url?: string; manifest?: string; -}; +} const realFetch = globalThis.fetch; let mock: ReturnType | undefined;