Skip to content

Commit 2bb405a

Browse files
authored
Replace node-spellchecker with Electron builtin spell checker (marktext#2895)
* Replace node-spellchecker with Electron builtin spellchecker * Fix word match unit tests * Fix issue to enable spell checker if it was disabled at startup * Fix spell checker was always disabled on macOS * Code cleanup * Fix circular dependency in Muya Fix circular dependency between config/index.js and utils/index.js in Muya.
1 parent cb57af4 commit 2bb405a

File tree

52 files changed

+887
-2164
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+887
-2164
lines changed

electron-builder.yml

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,12 @@ files:
2020
- "!node_modules/**/*.cjs.map"
2121
- "!node_modules/**/*.mjs.map"
2222
- "!node_modules/**/*.ts.map"
23+
- "!node_modules/vscode-ripgrep/{jsconfig.json,*.md,LICENSE}"
24+
- "!node_modules/vscode-ripgrep/download.js"
25+
- "!node_modules/vscode-ripgrep/postinstall.js"
2326
# Don't bundle build files
24-
- "!node_modules/@felixrieseberg/spellchecker/bin"
25-
- "!node_modules/@hfelix/spellchecker/bin"
2627
- "!node_modules/ced/bin"
2728
- "!node_modules/ced/vendor"
28-
- "!node_modules/cld/bin"
29-
- "!node_modules/cld/deps"
3029
- "!node_modules/fontmanager-redux/bin"
3130
- "!node_modules/keyboard-layout/bin"
3231
- "!node_modules/keytar/bin"
@@ -41,25 +40,16 @@ files:
4140
- "!node_modules/vega/build-es5/"
4241
- "!node_modules/vega-embed/build-es5/"
4342
# Don't bundle Linux build files
44-
- "!node_modules/@hfelix/spellchecker/build/Release/hunspell.a"
4543
- "!node_modules/ced/build/Release/compact_enc_det.a"
4644
# Don't bundle Windows build files
4745
- "!node_modules/**/{*.vcxproj,*.vcxproj.filters}"
4846
- "!node_modules/**/build/Release/{*.lib,*.exp,*.ilk,*.pdb,*.iobj,*.ipdb}"
4947
- "!node_modules/**/build/Release/obj"
5048
- "!node_modules/ced/build/vendor"
51-
# Don't bundle LGPL source files
52-
- "!node_modules/@felixrieseberg/spellchecker/vendor"
53-
- "!node_modules/@hfelix/spellchecker/vendor"
5449
extraFiles:
5550
- "LICENSE"
5651
- from: "resources/THIRD-PARTY-LICENSES.txt"
5752
to: "THIRD-PARTY-LICENSES.txt"
58-
extraResources:
59-
- from: "resources/hunspell_dictionaries/"
60-
to: "hunspell_dictionaries/"
61-
filter:
62-
- "!**/LICENSE-hunspell.txt"
6353
afterPack: './.electron-vue/electron-builder/afterPack.js'
6454

6555
fileAssociations:

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
"dependencies": {
3737
"@electron/remote": "^2.0.8",
3838
"@hfelix/electron-localshortcut": "^4.0.1",
39-
"@hfelix/electron-spellchecker": "^2.0.0",
4039
"@marktext/file-icons": "^1.0.6",
4140
"@octokit/rest": "^18.12.0",
4241
"arg": "^5.0.1",
@@ -177,8 +176,8 @@
177176
"webpack-merge": "^5.8.0"
178177
},
179178
"resolutions": {
180-
"cld": "^2.7.1",
181-
"node-abi": "^3.8.0"
179+
"node-abi": "^3.8.0",
180+
"node-addon-api": "^4.3.0"
182181
},
183182
"repository": {
184183
"type": "git",

resources/hunspell_dictionaries/LICENSE-en-US.txt

Lines changed: 0 additions & 273 deletions
This file was deleted.

0 commit comments

Comments
 (0)