Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make it compatible with Node 12 / Electron 5 #154

Merged
merged 6 commits into from
Jul 14, 2019
Merged
Show file tree
Hide file tree
Changes from 4 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
35 changes: 17 additions & 18 deletions package-lock.json

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

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "electron-spellchecker",
"version": "2.1.0",
"version": "2.2.0",
aabuhijleh marked this conversation as resolved.
Show resolved Hide resolved
"description": "Implement spellchecking, correctly",
"scripts": {
"doc": "esdoc -c ./esdoc.json",
Expand All @@ -27,11 +27,11 @@
"main": "src/index.js",
"homepage": "https://github.com/electron-userland/electron-spellchecker",
"dependencies": {
"@nornagon/cld": "^2.4.9",
"@felixrieseberg/spellchecker": "^4.0.10",
"bcp47": "^1.1.2",
"cld": "^2.5.1",
"debug": "^4.1.1",
"electron-remote": "^1.3.0",
"electron-remote": "https://github.com/aabuhijleh/electron-remote/tarball/master",
aabuhijleh marked this conversation as resolved.
Show resolved Hide resolved
"keyboard-layout": "^2.0.15",
"lru-cache": "^5.1.1",
"mkdirp": "^0.5.1",
Expand Down
2 changes: 1 addition & 1 deletion src/cld2.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const cld = require('@nornagon/cld');
const cld = require('cld');

module.exports = {
detect: function (text) {
Expand Down
4 changes: 2 additions & 2 deletions src/spell-check-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ module.exports = class SpellCheckHandler {
.mergeMap(async (langWithoutLocale) => {
d(`Auto-detected language as ${langWithoutLocale}`);
let lang = await this.getLikelyLocaleForLanguage(langWithoutLocale);
if (lang !== this.currentSpellcheckerLanguage) await this.switchLanguage(lang);
if ( (lang !== this.currentSpellcheckerLanguage) || (!this.currentSpellchecker) ) await this.switchLanguage(lang);

return lang;
})
Expand Down Expand Up @@ -513,8 +513,8 @@ module.exports = class SpellCheckHandler {
}

this.spellCheckInvoked.next(true);

misspelled.forEach(w => this.spellingErrorOccurred.next(w));
callback(misspelled);
}

/**
Expand Down