Skip to content

Commit 53aabda

Browse files
authored
fix(ci): clear knip unused-exports failures on dev (#119)
The `npm run knip` step in the TypeScript/Lint/Tests workflow has been red on every push to dev since 55091f0. Two distinct sources: - `MessageLoadResult` in `useChatStore.ts` was exported but only consumed in the same file (as the type of an internal store field). Demote to a file-private interface. - `KnownBridgeKey` and `DataBridgeProbeResult` in `theia/dataBridgeReader.ts` were exported (and re-exported through `theia/index.ts`) for use as type annotations at call sites that actually rely on TypeScript inference. The exports were never read. Demote to file-private and drop the barrel re-exports. Also drop the redundant `esbuild.js` entry from `knip.json` — knip auto-detects build configs and was flagging it as a configuration hint. After this commit, `npm run knip` exits 0 locally with no warnings.
1 parent a292111 commit 53aabda

4 files changed

Lines changed: 3 additions & 5 deletions

File tree

extension/knip.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
"entry": [
44
"src/extension.ts",
55
"src/webview/index.tsx",
6-
"esbuild.js",
76
"test/**/*.{ts,tsx}",
87
".mocharc.ui.yml",
98
".vscode-test.mjs"

extension/src/extension/theia/dataBridgeReader.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export const KNOWN_BRIDGE_KEYS = [
2424
'TEMPLATE',
2525
] as const;
2626

27-
export type KnownBridgeKey = (typeof KNOWN_BRIDGE_KEYS)[number];
27+
type KnownBridgeKey = (typeof KNOWN_BRIDGE_KEYS)[number];
2828

2929
/**
3030
* Reads environment variables via the EduIDE data-bridge companion extension.
@@ -101,7 +101,7 @@ export async function readEnvVarsViaDataBridge<T extends string>(
101101
return undefined;
102102
}
103103

104-
export interface DataBridgeProbeResult {
104+
interface DataBridgeProbeResult {
105105
/** Whether the `dataBridge.getEnv` command is registered (extension installed + active). */
106106
readonly commandAvailable: boolean;
107107
/** Whether `DATA_BRIDGE_ENABLED` env var is set (the bridge's own activation gate). */

extension/src/extension/theia/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,5 @@ export { initializeTheiaContext, getTheiaEnvironment } from './theiaEnvironment'
33
export { detectPlatformCapabilities } from './featureDetection';
44
export { readEnvVar } from './envVarReader';
55
export { probeDataBridge, KNOWN_BRIDGE_KEYS } from './dataBridgeReader';
6-
export type { DataBridgeProbeResult, KnownBridgeKey } from './dataBridgeReader';
76
export { authenticateFromEnvironment } from './theiaAuthProvider';
87
export { cloneRepositoryProgrammatic, autoCloneIfNeeded } from './theiaCloneService';

extension/src/webview/stores/useChatStore.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import type { ExtMsg, WebSocketDisplayStatus } from '../../shared/messageContrac
2020
type ChatWebSocketStatus = WebSocketDisplayStatus | 'unknown';
2121

2222

23-
export interface MessageLoadResult {
23+
interface MessageLoadResult {
2424
localSessionId: string;
2525
status: 'success' | 'error';
2626
}

0 commit comments

Comments
 (0)