From e5f23ed2bbde6bd50f8b87d19733b25b98f78470 Mon Sep 17 00:00:00 2001 From: Christian Pillsbury Date: Mon, 18 Aug 2025 10:39:37 -0500 Subject: [PATCH] fix: resolve @open-wc/context-protocol module resolution issues MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Update TypeScript moduleResolution from "node" to "bundler" in base config - Remove 5 @ts-ignore directives for context-protocol import resolution - All HTML packages now import @open-wc/context-protocol without type errors - Builds and type checking continue to work correctly - Eliminates need for type suppression comments in critical components Files affected: - tsconfig.base.json: Updated module resolution strategy - html-media-elements/src/media-provider.ts: Removed @ts-ignore - html/src/media-provider.ts: Removed @ts-ignore - html/src/media-container.ts: Removed @ts-ignore - html/src/components/connected/media-play-button.ts: Removed @ts-ignore - html/src/components/connected/media-mute-button.ts: Removed @ts-ignore 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- packages/html/html-media-elements/src/media-provider.ts | 1 - .../html/html/src/components/connected/media-mute-button.ts | 1 - .../html/html/src/components/connected/media-play-button.ts | 1 - packages/html/html/src/media-container.ts | 1 - packages/html/html/src/media-provider.ts | 1 - tsconfig.base.json | 2 +- 6 files changed, 1 insertion(+), 6 deletions(-) diff --git a/packages/html/html-media-elements/src/media-provider.ts b/packages/html/html-media-elements/src/media-provider.ts index 370c028b..52657975 100644 --- a/packages/html/html-media-elements/src/media-provider.ts +++ b/packages/html/html-media-elements/src/media-provider.ts @@ -1,4 +1,3 @@ -// @ts-ignore - Module resolution issues with @open-wc/context-protocol import { ProviderMixin } from '@open-wc/context-protocol'; import { createMediaStore } from '@vjs-10/media-store'; diff --git a/packages/html/html/src/components/connected/media-mute-button.ts b/packages/html/html/src/components/connected/media-mute-button.ts index b3e5f090..d4091b2d 100644 --- a/packages/html/html/src/components/connected/media-mute-button.ts +++ b/packages/html/html/src/components/connected/media-mute-button.ts @@ -1,4 +1,3 @@ -// @ts-ignore - Module resolution issues with @open-wc/context-protocol import { ConsumerMixin } from '@open-wc/context-protocol'; // NOTE: This should be fairly generic code that could itself be abstracted into configuration for a more generic factory implementation. (CJP) diff --git a/packages/html/html/src/components/connected/media-play-button.ts b/packages/html/html/src/components/connected/media-play-button.ts index 79b433d3..1f2697fa 100644 --- a/packages/html/html/src/components/connected/media-play-button.ts +++ b/packages/html/html/src/components/connected/media-play-button.ts @@ -1,4 +1,3 @@ -// @ts-ignore - Module resolution issues with @open-wc/context-protocol import { ConsumerMixin } from '@open-wc/context-protocol'; // NOTE: This should be fairly generic code that could itself be abstracted into configuration for a more generic factory implementation. (CJP) diff --git a/packages/html/html/src/media-container.ts b/packages/html/html/src/media-container.ts index fd3c1141..9357db10 100644 --- a/packages/html/html/src/media-container.ts +++ b/packages/html/html/src/media-container.ts @@ -1,4 +1,3 @@ -// @ts-ignore - Module resolution issues with @open-wc/context-protocol import { ConsumerMixin } from '@open-wc/context-protocol'; export function getTemplateHTML() { diff --git a/packages/html/html/src/media-provider.ts b/packages/html/html/src/media-provider.ts index 46779d87..4a799112 100644 --- a/packages/html/html/src/media-provider.ts +++ b/packages/html/html/src/media-provider.ts @@ -1,4 +1,3 @@ -// @ts-ignore - Module resolution issues with @open-wc/context-protocol import { ProviderMixin } from '@open-wc/context-protocol'; import { createMediaStore } from '@vjs-10/media-store'; diff --git a/tsconfig.base.json b/tsconfig.base.json index f4a74190..c0b6bf43 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -3,7 +3,7 @@ "target": "ES2020", "lib": ["ES2020", "DOM", "DOM.Iterable"], "module": "ESNext", - "moduleResolution": "node", + "moduleResolution": "bundler", "allowJs": true, "checkJs": false, "declaration": true,