Skip to content

Commit

Permalink
chore: adjust types and ensure CI check (#273)
Browse files Browse the repository at this point in the history
## Motivation

<!-- List motivation and changes here -->

## Issues closed

<!-- List closed issues here -->
  • Loading branch information
pixelass authored May 8, 2024
1 parent f433b95 commit 1833379
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/test-and-cover.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,13 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- name: Install the dependencies for the homepage
run: npm install
working-directory: homepage
- name: Install dependencies
run: npm install
- name: test types tsc:noEmit
run: npm run tsc:noEmit
- name: Run all jest tests
run: npm run test:all
- name: Codacy Coverage
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ app
dist
build
doc
tsconfig.tsbuildinfo

# test
coverage
Expand Down
4 changes: 2 additions & 2 deletions src/electron/helpers/app-loaders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { readFileSync } from "node:fs";
import path from "path";

import type { BrowserWindowConstructorOptions } from "electron";
import type electronServe from "electron-serve";
import type { LoadURL } from "electron-serve";
import serve from "electron-serve";
import { globbySync } from "globby";
import matter from "gray-matter";
Expand All @@ -11,7 +11,7 @@ import { logger } from "@/electron/services/logger";
import { getCaptainApps } from "@/electron/utils/path-helpers";
import { jsonStringify } from "@/shared/object";

export const appLoaders: Record<string, electronServe.loadURL> = {};
export const appLoaders: Record<string, LoadURL> = {};

/**
* Represents a unique key for identifying multiple window configurations.
Expand Down
3 changes: 1 addition & 2 deletions src/electron/helpers/stores/watchers.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { USER_LANGUAGE_KEY, USER_THEME_KEY } from "@captn/utils/constants";
import type { Unsubscribe } from "conf/dist/source/types";
import { BrowserWindow } from "electron";

import { appSettingsStore, downloadsStore, inventoryStore, userStore } from "@/electron/stores";
Expand All @@ -20,7 +19,7 @@ export function sendToAllWindows<T>(key: string, value: T) {
}

export function watchStores() {
const subscriptions: Unsubscribe[] = [];
const subscriptions: (() => void)[] = [];
downloadsStore.store = traverseAndModify(downloadsStore.store);
appSettingsStore.set("requiresRestart", false);
subscriptions.push(
Expand Down

0 comments on commit 1833379

Please sign in to comment.