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 all 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
90 changes: 45 additions & 45 deletions package-lock.json

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@
"main": "src/index.js",
"homepage": "https://github.com/electron-userland/electron-spellchecker",
"dependencies": {
"@nornagon/cld": "^2.4.9",
"@aabuhijleh/electron-remote": "^1.4.0",
"@felixrieseberg/spellchecker": "^4.0.10",
"bcp47": "^1.1.2",
"cld": "^2.5.1",
"debug": "^4.1.1",
"electron-remote": "^1.3.0",
"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
2 changes: 1 addition & 1 deletion src/context-menu-listener.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const { remote } = require('electron');
const { Observable } = require('rxjs/Observable');
const { Subscription } = require('rxjs/Subscription');
const { fromRemoteWindow } = require('electron-remote');
const { fromRemoteWindow } = require('@aabuhijleh/electron-remote');

require('rxjs/add/observable/fromEvent');
require('rxjs/add/operator/map');
Expand Down
2 changes: 1 addition & 1 deletion src/dictionary-sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const app = process.type === 'renderer' ?
require('electron').app;

const {downloadFileOrUrl} =
require('electron-remote').requireTaskPool(require.resolve('electron-remote/remote-ajax'));
require('@aabuhijleh/electron-remote').requireTaskPool(require.resolve('@aabuhijleh/electron-remote/remote-ajax'));

/**
* DictioanrySync handles downloading and saving Hunspell dictionaries. Pass it
Expand Down
6 changes: 3 additions & 3 deletions src/spell-check-handler.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const {spawn} = require('spawn-rx');
const {requireTaskPool} = require('electron-remote');
const {requireTaskPool} = require('@aabuhijleh/electron-remote');
const LRU = require('lru-cache');

const {Subscription} = require('rxjs/Subscription');
Expand Down 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