Skip to content

Commit 0aff60a

Browse files
authored
feat(deps): Upgrade kuromojin (#2)
* Upgrade kuromojin * Use ESModules import
1 parent 18f99ba commit 0aff60a

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"url": "https://github.com/textlint-ja/textlint-rule-no-dropping-i/issues"
55
},
66
"dependencies": {
7-
"kuromojin": "^1.2.1",
7+
"kuromojin": "^2.1.1",
88
"textlint-rule-helper": "^1.1.4"
99
},
1010
"description": "い抜き言葉を検出するtextlint rule",

src/no-dropping-i.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// LICENSE : MIT
22
"use strict";
33
import { RuleHelper } from "textlint-rule-helper";
4-
import kuromojin from "kuromojin";
4+
import { tokenize } from "kuromojin";
55

66
function isTargetWord(token) {
77
return token.pos == "助詞" && token.pos_detail_1 == "接続助詞" && token.basic_form == "て";
@@ -20,7 +20,7 @@ module.exports = function(context) {
2020
return;
2121
}
2222
let text = getSource(node);
23-
return kuromojin(text).then(tokens => {
23+
return tokenize(text).then(tokens => {
2424
tokens.reduce((prev, current) => {
2525
if (isTargetWord(prev) && isMasuWord(current)) {
2626
report(

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2928,10 +2928,10 @@ kuromoji@0.1.1:
29282928
doublearray "0.0.2"
29292929
zlibjs "^0.2.0"
29302930

2931-
kuromojin@^1.2.1:
2932-
version "1.5.1"
2933-
resolved "https://registry.yarnpkg.com/kuromojin/-/kuromojin-1.5.1.tgz#f5c4cc2d4a8b56343c7281f7def8d56309184078"
2934-
integrity sha512-tzt3UUqWqzwHMsahchyrcs9kgbn6OM7xP4QRCd0w5vqE0lA/cjCH0OxjLaekz5cnxGmcy8RfN7La3xOxZOvJ1w==
2931+
kuromojin@^2.1.1:
2932+
version "2.1.1"
2933+
resolved "https://registry.yarnpkg.com/kuromojin/-/kuromojin-2.1.1.tgz#5de1dbec4ffcc7cce57a10e75e751cd1ca384e38"
2934+
integrity sha512-bd5dfE9CdRBoRPiquE5uhzBrDOn2K3WuFeOWqZgM7DNtQhvS7P9IALy5MtDxXcnw7DLBAZ1A7DByPO5BhXdgew==
29352935
dependencies:
29362936
kuromoji "0.1.1"
29372937

0 commit comments

Comments
 (0)