Skip to content

Commit 71e89be

Browse files
authored
fix: Upgrade kuromojin (#1)
1 parent 4fc394c commit 71e89be

File tree

3 files changed

+9
-11
lines changed

3 files changed

+9
-11
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
},
3636
"dependencies": {
3737
"array-find-index": "^1.0.2",
38-
"kuromojin": "^1.3.2",
38+
"kuromojin": "^2.1.1",
3939
"morpheme-match-all": "^1.1.0"
4040
}
4141
}

src/textlint-rule-no-insert-dropping-sa.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ const reporter = (context) => {
4747
return {
4848
[Syntax.Str](node){
4949
const text = getSource(node);
50-
return kuromojin(text).then(tokens => {
50+
return kuromojin.tokenize(text).then(tokens => {
5151
const matchResults = matchAll(tokens);
5252
matchResults.forEach(matchResult => {
5353
const firstToken = matchResult.tokens[0];

yarn.lock

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,6 @@ array-find-index@^1.0.1, array-find-index@^1.0.2:
7373
version "1.0.2"
7474
resolved "https://registry.yarnpkg.com/array-find-index/-/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1"
7575

76-
array-find@^1.0.0:
77-
version "1.0.0"
78-
resolved "https://registry.yarnpkg.com/array-find/-/array-find-1.0.0.tgz#6c8e286d11ed768327f8e62ecee87353ca3e78b8"
79-
8076
array-union@^1.0.1:
8177
version "1.0.2"
8278
resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39"
@@ -1509,19 +1505,21 @@ kind-of@^3.0.2:
15091505
dependencies:
15101506
is-buffer "^1.1.5"
15111507

1512-
kuromoji@^0.1.1:
1508+
15131509
version "0.1.1"
15141510
resolved "https://registry.yarnpkg.com/kuromoji/-/kuromoji-0.1.1.tgz#4aabf39bcced8b8ad92d007a04a26be6da8477c9"
1511+
integrity sha1-Sqvzm8zti4rZLQB6BKJr5tqEd8k=
15151512
dependencies:
15161513
async "^2.0.1"
15171514
doublearray "0.0.2"
15181515
zlibjs "^0.2.0"
15191516

1520-
kuromojin@^1.3.2:
1521-
version "1.3.2"
1522-
resolved "https://registry.yarnpkg.com/kuromojin/-/kuromojin-1.3.2.tgz#342bb5cfbee69c9bb31d3fc439a8ad69fd281b11"
1517+
kuromojin@^2.1.1:
1518+
version "2.1.1"
1519+
resolved "https://registry.yarnpkg.com/kuromojin/-/kuromojin-2.1.1.tgz#5de1dbec4ffcc7cce57a10e75e751cd1ca384e38"
1520+
integrity sha512-bd5dfE9CdRBoRPiquE5uhzBrDOn2K3WuFeOWqZgM7DNtQhvS7P9IALy5MtDxXcnw7DLBAZ1A7DByPO5BhXdgew==
15231521
dependencies:
1524-
kuromoji "^0.1.1"
1522+
kuromoji "0.1.1"
15251523

15261524
levn@~0.3.0:
15271525
version "0.3.0"

0 commit comments

Comments
 (0)