Skip to content

Commit

Permalink
chokidar to 3.x
Browse files Browse the repository at this point in the history
  • Loading branch information
qdraw committed Oct 6, 2024
1 parent e3bc9cc commit 181768f
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 33 deletions.
69 changes: 44 additions & 25 deletions starskydesktop/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion starskydesktop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
}
},
"dependencies": {
"chokidar": "^4.0.1",
"chokidar": "^3.6.0",
"electron-settings": "^4.0.4",
"react": "^18.3.1",
"react-dom": "^18.3.1",
Expand Down
4 changes: 2 additions & 2 deletions starskydesktop/src/app/file-watcher/setup-file-watcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ export async function SetupFileWatcher() {
persistent: true,
interval: 600,
binaryInterval: 1200,
alwaysStat: true
alwaysStat: true,
})
.on("change", (path, stats) => {
// eslint-disable-next-line @typescript-eslint/no-floating-promises
ActionWhenFileIsChanged(path, stats);
});

FileWatcherObjects.add([watch, tempPathIncludingBaseUrl]);
FileWatcherObjects.add([watch as any, tempPathIncludingBaseUrl]);
logger.info(`[SetupFileWatcher] add: ${tempPathIncludingBaseUrl}`);
}
12 changes: 7 additions & 5 deletions starskydesktop/src/app/main-window/spellcheck.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,30 +10,32 @@ export function spellCheck(newWindow: BrowserWindow) {
const objMenu = new Menu();
const objMenuHead = new MenuItem({
label: "Corrections",
enabled: false
enabled: false,
});
objMenu.append(objMenuHead);
const objMenuSep = new MenuItem({
type: "separator"
type: "separator",
});
objMenu.append(objMenuSep);
// eslint-disable-next-line array-callback-return
params.dictionarySuggestions.map((strSuggestion) => {
const objMenuItem = new MenuItem({
click(_this, objWindow) {
console.log(objWindow);

// eslint-disable-next-line @typescript-eslint/no-floating-promises
objWindow.webContents.insertText(strSuggestion);
newWindow.webContents.insertText(strSuggestion);
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
objMenu.closePopup(this);
},
label: strSuggestion
label: strSuggestion,
});
objMenu.append(objMenuItem);
});
objMenu.popup({
window: newWindow,
x: params.x,
y: params.y
y: params.y,
});
}
});
Expand Down

0 comments on commit 181768f

Please sign in to comment.