Update all non-major dependencies (#1879)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
renovate[bot] 2024-10-16 16:15:09 +00:00 committed by GitHub
parent 78b00471ff
commit 0edde6735f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 16 additions and 13 deletions

View File

@ -79,7 +79,7 @@
"@babel/core": "^7.18.10", "@babel/core": "^7.18.10",
"@babel/preset-env": "^7.18.10", "@babel/preset-env": "^7.18.10",
"@babel/preset-typescript": "^7.18.6", "@babel/preset-typescript": "^7.18.6",
"@electron/asar": "^3.2.3", "@electron/asar": "3.2.10",
"@electron/fuses": "^1.7.0", "@electron/fuses": "^1.7.0",
"@mapbox/node-pre-gyp": "^1.0.11", "@mapbox/node-pre-gyp": "^1.0.11",
"@playwright/test": "1.48.0", "@playwright/test": "1.48.0",

View File

@ -176,15 +176,18 @@ function onLinkContextMenu(ev: Event, params: ContextMenuParams, webContents: We
ev.preventDefault(); ev.preventDefault();
} }
function cutCopyPasteSelectContextMenus(params: ContextMenuParams): MenuItemConstructorOptions[] { function cutCopyPasteSelectContextMenus(
params: ContextMenuParams,
webContents: WebContents,
): MenuItemConstructorOptions[] {
const options: MenuItemConstructorOptions[] = []; const options: MenuItemConstructorOptions[] = [];
if (params.misspelledWord) { if (params.misspelledWord) {
params.dictionarySuggestions.forEach((word) => { params.dictionarySuggestions.forEach((word) => {
options.push({ options.push({
label: word, label: word,
click: (menuItem, browserWindow) => { click: () => {
browserWindow?.webContents.replaceMisspelling(word); webContents.replaceMisspelling(word);
}, },
}); });
}); });
@ -194,8 +197,8 @@ function cutCopyPasteSelectContextMenus(params: ContextMenuParams): MenuItemCons
}, },
{ {
label: _t("right_click_menu|add_to_dictionary"), label: _t("right_click_menu|add_to_dictionary"),
click: (menuItem, browserWindow) => { click: () => {
browserWindow?.webContents.session.addWordToSpellCheckerDictionary(params.misspelledWord); webContents.session.addWordToSpellCheckerDictionary(params.misspelledWord);
}, },
}, },
{ {
@ -237,8 +240,8 @@ function cutCopyPasteSelectContextMenus(params: ContextMenuParams): MenuItemCons
return options; return options;
} }
function onSelectedContextMenu(ev: Event, params: ContextMenuParams): void { function onSelectedContextMenu(ev: Event, params: ContextMenuParams, webContents: WebContents): void {
const items = cutCopyPasteSelectContextMenus(params); const items = cutCopyPasteSelectContextMenus(params, webContents);
const popupMenu = Menu.buildFromTemplate(items); const popupMenu = Menu.buildFromTemplate(items);
// popup() requires an options object even for no options // popup() requires an options object even for no options
@ -246,12 +249,12 @@ function onSelectedContextMenu(ev: Event, params: ContextMenuParams): void {
ev.preventDefault(); ev.preventDefault();
} }
function onEditableContextMenu(ev: Event, params: ContextMenuParams): void { function onEditableContextMenu(ev: Event, params: ContextMenuParams, webContents: WebContents): void {
const items: MenuItemConstructorOptions[] = [ const items: MenuItemConstructorOptions[] = [
{ role: "undo" }, { role: "undo" },
{ role: "redo", enabled: params.editFlags.canRedo }, { role: "redo", enabled: params.editFlags.canRedo },
{ type: "separator" }, { type: "separator" },
...cutCopyPasteSelectContextMenus(params), ...cutCopyPasteSelectContextMenus(params, webContents),
]; ];
const popupMenu = Menu.buildFromTemplate(items); const popupMenu = Menu.buildFromTemplate(items);
@ -286,9 +289,9 @@ export default (webContents: WebContents): void => {
if (params.linkURL || params.srcURL) { if (params.linkURL || params.srcURL) {
onLinkContextMenu(ev, params, webContents); onLinkContextMenu(ev, params, webContents);
} else if (params.selectionText) { } else if (params.selectionText) {
onSelectedContextMenu(ev, params); onSelectedContextMenu(ev, params, webContents);
} else if (params.isEditable) { } else if (params.isEditable) {
onEditableContextMenu(ev, params); onEditableContextMenu(ev, params, webContents);
} }
}); });

View File

@ -973,7 +973,7 @@
ajv "^6.12.0" ajv "^6.12.0"
ajv-keywords "^3.4.1" ajv-keywords "^3.4.1"
"@electron/asar@^3.2.3": "@electron/asar@3.2.10":
version "3.2.10" version "3.2.10"
resolved "https://registry.yarnpkg.com/@electron/asar/-/asar-3.2.10.tgz#615cf346b734b23cafa4e0603551010bd0e50aa8" resolved "https://registry.yarnpkg.com/@electron/asar/-/asar-3.2.10.tgz#615cf346b734b23cafa4e0603551010bd0e50aa8"
integrity sha512-mvBSwIBUeiRscrCeJE1LwctAriBj65eUDm0Pc11iE5gRwzkmsdbS7FnZ1XUWjpSeQWL1L5g12Fc/SchPM9DUOw== integrity sha512-mvBSwIBUeiRscrCeJE1LwctAriBj65eUDm0Pc11iE5gRwzkmsdbS7FnZ1XUWjpSeQWL1L5g12Fc/SchPM9DUOw==