Remove electron-remote to fix support on Electron 5+ #170
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hey folks, per the discussion in #152, this PR:
Replaces the use of electron-remote to download the dictionaries with a basic
fetch
. I manually checked that the files this produces on disk have the correct checksums because the buffer conversion you have to do from fetch => fs is a little whacky.Removes the use of electron-remote task pooling around
cld
language detection. I actually think that this has been unnecessary for a long time - the spellchecker truncates the provided text to 512 characters, so the run time of CLD has a fairly low upper bound. I usecld
synchronously in another place in Mailspring and with a character limit that low it's never been an issue. This code is only run when the user of the module callsprovideHintText
, so maybe just don't call it constantly - you shouldn't have been doing that before anyway. ;-)Removes the ContextMenuListener from this module entirely. I think it was included because doing it "right" was hard, but I don't think that's the case anymore? I believe you can just replace your usage with this - I believe Electron has fixed the "listeners getting detached" issue that was originally being worked around via electron-remote.
Hope y'all are all doing well in these wild times!