Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '24'
node-version-file: '.nvmrc'
cache: 'npm'

- name: Install Linux dependencies for robotjs
Expand Down Expand Up @@ -49,7 +49,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '24'
node-version-file: '.nvmrc'
cache: 'npm'

- name: Install Linux dependencies for robotjs
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
if: matrix.language == 'javascript-typescript'
uses: actions/setup-node@v4
with:
node-version: '24'
node-version-file: '.nvmrc'
cache: 'npm'

# Install Linux dependencies for native modules like robotjs
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 24
node-version-file: '.nvmrc'
cache: 'npm'

- name: Install Linux dependencies for robotjs
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
24.2.0
24.15.0
17 changes: 0 additions & 17 deletions __mocks__/better-sqlite3.ts

This file was deleted.

3 changes: 1 addition & 2 deletions __tests__/main/services/dictationService.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import 'reflect-metadata';
import robotjs from '@jitsi/robotjs';
import { Store } from '@reduxjs/toolkit';
import { BrowserWindow, globalShortcut } from 'electron';
import { container } from 'tsyringe';

Expand Down Expand Up @@ -130,7 +129,7 @@ describe('DictationService', () => {
]);

container.register(DI_TOKENS.Store, {
useValue: mockStore as unknown as Store,
useValue: mockStore,
});
container.register(DI_TOKENS.TranscriptionService, {
useValue: mockTranscriptionService,
Expand Down
4 changes: 1 addition & 3 deletions __tests__/main/services/recordingManager.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ function createDefaultTestState() {
error: null,
hasAssemblyAIKey: true,
dictationStylingPrompt: '',
microphoneGain: 1.0,
systemAudioGain: 0.7,
},
updates: {
status: 'idle' as const,
Expand Down Expand Up @@ -106,7 +104,7 @@ describe('RecordingManager', () => {

// Create mocks using factories
defaultState = createDefaultTestState();
mockStore = createMockStore() as unknown as MockStore;
mockStore = createMockStore();
mockStore.getState.mockReturnValue(defaultState);
mockStore.dispatch.mockImplementation(() => ({
unwrap: () => Promise.resolve({ recordingId: 'test-recording-id' }),
Expand Down
2 changes: 1 addition & 1 deletion __tests__/main/services/summarizationService.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ describe('SummarizationService', () => {
const userMessage = mockLLMGatewayService.chat.mock.calls[0][0].find(
(m: { role: string }) => m.role === 'user'
);
expect(userMessage.content).toContain('Transcript:\n');
expect(userMessage.content).toContain('## Transcript\n');
});

it('should handle empty summary prompt', async () => {
Expand Down
12 changes: 3 additions & 9 deletions __tests__/main/services/transcriptFileService.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -468,9 +468,7 @@ Original content
});

it('should return false if transcript not found', async () => {
mockFs.readdir.mockResolvedValue(
[] as unknown as Awaited<ReturnType<typeof fs.readdir>>
);
mockFs.readdir.mockResolvedValue([]);

const result = await service.updateTranscript('nonexistent', {
summary: 'New',
Expand Down Expand Up @@ -544,9 +542,7 @@ Content
});

it('should return false if transcript not found', async () => {
mockFs.readdir.mockResolvedValue(
[] as unknown as Awaited<ReturnType<typeof fs.readdir>>
);
mockFs.readdir.mockResolvedValue([]);

const result = await service.deleteTranscript('nonexistent');

Expand Down Expand Up @@ -746,9 +742,7 @@ Content
});

it('should return false if transcript does not exist', async () => {
mockFs.readdir.mockResolvedValue(
[] as unknown as Awaited<ReturnType<typeof fs.readdir>>
);
mockFs.readdir.mockResolvedValue([]);

const result = await service.transcriptExists('nonexistent');

Expand Down
5 changes: 1 addition & 4 deletions __tests__/test-helpers/mock-factories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,6 @@ export function createMockStore(
error: null,
hasAssemblyAIKey: true,
dictationStylingPrompt: '',
microphoneGain: 1.0,
systemAudioGain: 0.7,
},
recordings: {
ids: [],
Expand Down Expand Up @@ -194,8 +192,7 @@ export function createMockStore(
[Symbol.observable]: jest.fn(),
};

return store as unknown as MockStore &
Store<RootState> & { dispatch: AppDispatch };
return store;
}

// ============================================================================
Expand Down
2 changes: 0 additions & 2 deletions electron-builder.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
},
"files": ["dist/**/*", "!dist/**/*.map"],
"asarUnpack": [
"node_modules/electron-audio-loopback/**/*",
"node_modules/better-sqlite3/**/*",
"node_modules/@jitsi/robotjs/**/*",
"node_modules/**/*.node",
"**/*.node"
Expand Down
3 changes: 3 additions & 0 deletions jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ export default {
useESM: false,
tsconfig: {
jsx: 'react-jsx',
module: 'ESNext',
moduleResolution: 'Bundler',
ignoreDeprecations: '6.0',
},
},
],
Expand Down
Loading
Loading