Upgrade dependencies (#996)

* Upgrade Electron to 5.0.4

* Fix spellcheck provider

* npm audit fix
This commit is contained in:
Yuya Ochiai
2019-06-27 04:46:13 +09:00
committed by Harrison Healey
parent 2cfc735d6d
commit 04c03c3baf
5 changed files with 716 additions and 314 deletions

View File

@@ -186,10 +186,14 @@ function resetMisspelledState() {
function setSpellChecker() {
const spellCheckerLocale = ipcRenderer.sendSync('get-spellchecker-locale');
webFrame.setSpellCheckProvider(spellCheckerLocale, false, {
spellCheck(text) {
const res = ipcRenderer.sendSync('checkspell', text);
return res === null ? true : res;
webFrame.setSpellCheckProvider(spellCheckerLocale, {
spellCheck(words, callback) {
const misspeltWords = words.filter((text) => {
const res = ipcRenderer.sendSync('checkspell', text);
const isCorrect = (res === null) ? true : res;
return !isCorrect;
});
callback(misspeltWords);
},
});
resetMisspelledState();

View File

@@ -43,6 +43,10 @@ function createMainWindow(config, options) {
minWidth: minimumWindowWidth,
minHeight: minimumWindowHeight,
fullscreen: false,
webPreferences: {
nodeIntegration: true,
webviewTag: true,
},
});
const mainWindow = new BrowserWindow(windowOptions);

6
src/package-lock.json generated
View File

@@ -370,9 +370,9 @@
"integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="
},
"js-yaml": {
"version": "3.12.1",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.1.tgz",
"integrity": "sha512-um46hB9wNOKlwkHgiuyEVAybXBjwFUV0Z/RaHJblRd9DXltue9FTYvzCr9ErQrK9Adz5MU4gHWVaNUfdmrC8qA==",
"version": "3.13.1",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz",
"integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==",
"requires": {
"argparse": "^1.0.7",
"esprima": "^4.0.0"