Skip to content

Commit 8d62aaa

Browse files
authored
fix(deps): update to textlint 13 (#22)
- remove unused dependencies
1 parent 85c7888 commit 8d62aaa

File tree

4 files changed

+72
-81
lines changed

4 files changed

+72
-81
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ This is helper library for creating [textlint](https://github.com/textlint/textl
88
npm install textlint-rule-helper
99
```
1010

11+
### Support textlint version
12+
13+
- ~2.2: textlint 12>=
14+
- ~2.3: textlint 13>=
15+
1116
## API
1217

1318
### class RuleHelper

package.json

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,23 +25,21 @@
2525
"watch": "tsc -p . --watch"
2626
},
2727
"dependencies": {
28-
"@textlint/ast-node-types": "^12.3.0",
28+
"@textlint/ast-node-types": "^13.0.2",
2929
"structured-source": "^4.0.0",
3030
"unist-util-visit": "^2.0.3"
3131
},
3232
"devDependencies": {
3333
"@textlint/ast-node-types": "^12.1.0",
34-
"@textlint/kernel": "^12.5.0",
35-
"@textlint/textlint-plugin-markdown": "^12.5.0",
36-
"@textlint/types": "^12.5.0",
34+
"@textlint/kernel": "^13.0.2",
35+
"@textlint/textlint-plugin-markdown": "^13.0.2",
36+
"@textlint/types": "^13.0.2",
3737
"@types/mocha": "^10.0.1",
3838
"@types/node": "^18.11.18",
39-
"@types/structured-source": "^3.0.0",
4039
"markdown-to-ast": "^6.0.3",
4140
"mocha": "^10.2.0",
4241
"ts-node": "^10.9.1",
4342
"ts-node-test-register": "^10.0.0",
44-
"txt-ast-traverse": "^2.0.4",
4543
"typescript": "^4.9.4"
4644
}
4745
}

src/IgnoreNodeManager.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
// LICENSE : MIT
22
"use strict";
33
import visit from "unist-util-visit";
4-
import { TxtNode, TxtParentNode, TxtNodeType, TextNodeRange } from "@textlint/ast-node-types"
4+
import { TxtNode, TxtNodeRange, TxtNodeType, TxtParentNode } from "@textlint/ast-node-types"
55

66
/**
77
* Ignore node manager that manager ignored ranges.
88
*
99
*/
1010
export default class IgnoreNodeManager {
11-
private _ignoredRangeList: TextNodeRange[];
11+
private _ignoredRangeList: TxtNodeRange[];
1212

1313
constructor() {
1414
/**
@@ -48,7 +48,7 @@ export default class IgnoreNodeManager {
4848
* @returns {boolean}
4949
* @deprecated This method will be removed
5050
*/
51-
isIgnoredRange(aRange: TextNodeRange) {
51+
isIgnoredRange(aRange: TxtNodeRange) {
5252
return this.isIgnoredIndex(aRange[0]) || this.isIgnoredIndex(aRange[1]);
5353
}
5454

@@ -73,7 +73,7 @@ export default class IgnoreNodeManager {
7373
* add range to ignore range list
7474
* @param {[number, number]} range
7575
*/
76-
ignoreRange(range: TextNodeRange) {
76+
ignoreRange(range: TxtNodeRange) {
7777
this._ignoredRangeList.push(range);
7878
}
7979

yarn.lock

Lines changed: 59 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -48,58 +48,58 @@
4848
"@jridgewell/resolve-uri" "^3.0.3"
4949
"@jridgewell/sourcemap-codec" "^1.4.10"
5050

51-
"@textlint/ast-node-types@^12.3.0":
52-
version "12.3.0"
53-
resolved "https://registry.yarnpkg.com/@textlint/ast-node-types/-/ast-node-types-12.3.0.tgz#3eb52ca2d7234ad8e015a1fc104ab15945a25e1f"
54-
integrity sha512-ke5hlKy/xZ/vQt6j+h4k9GradJPDsV3FKsUqWpCpF/X8qWCU2zM4e1SMUAFjoUcLuF9in+eXIQ71Qm/AdjjkZQ==
51+
"@textlint/ast-node-types@^13.0.2":
52+
version "13.0.2"
53+
resolved "https://registry.yarnpkg.com/@textlint/ast-node-types/-/ast-node-types-13.0.2.tgz#15761c7f8a12384b1a17bbbf176e8d5c9e9884c7"
54+
integrity sha512-4l+acQ88z44nLM7uchP25TIc6BFy7W0puI1a4DtBHyk53P2aUXI+JE30GuhzsPUkqwGGcEnTeE3zOA1WNQi5lw==
5555

56-
"@textlint/ast-node-types@^4.0.0", "@textlint/ast-node-types@^4.0.1":
56+
"@textlint/ast-node-types@^4.0.0":
5757
version "4.4.3"
5858
resolved "https://registry.yarnpkg.com/@textlint/ast-node-types/-/ast-node-types-4.4.3.tgz#fdba16e8126cddc50f45433ce7f6c55e7829566c"
5959
integrity sha512-qi2jjgO6Tn3KNPGnm6B7p6QTEPvY95NFsIAaJuwbulur8iJUEenp1OnoUfiDaC/g2WPPEFkcfXpmnu8XEMFo2A==
6060

61-
"@textlint/ast-tester@^12.5.0":
62-
version "12.5.0"
63-
resolved "https://registry.yarnpkg.com/@textlint/ast-tester/-/ast-tester-12.5.0.tgz#a8b15951d0e0a3cb394b2f863c352c4e6e79ccce"
64-
integrity sha512-osHf1OFLC3RnjGyoSBynn2u5pgj7qkik8TNaxgPekVwlLWtJTcyh22PHo+mXPF47XWM5gJQmy/72nUrqtbDMPg==
61+
"@textlint/ast-tester@^13.0.2":
62+
version "13.0.2"
63+
resolved "https://registry.yarnpkg.com/@textlint/ast-tester/-/ast-tester-13.0.2.tgz#cb3b6c5c36bb7b424f19a2e61fc43c34feeb0291"
64+
integrity sha512-TUFPPGisFK+Rt4TqeMhXhqoF99B9jzJB/B3PL/YJUZeEKu7Qr9/rIBP1dKX7m1S9TlpnqS49EcD1LWC1COq0gw==
6565
dependencies:
66-
"@textlint/ast-node-types" "^12.3.0"
66+
"@textlint/ast-node-types" "^13.0.2"
6767
debug "^4.3.4"
6868

69-
"@textlint/ast-traverse@^12.5.0":
70-
version "12.5.0"
71-
resolved "https://registry.yarnpkg.com/@textlint/ast-traverse/-/ast-traverse-12.5.0.tgz#3c1c4502ee5dc14405ea759eea1328e600214f5f"
72-
integrity sha512-TAbfxz8x8Q/sn7D/h7OikzYp5NqPDrRExm3N+3v9yj+gq++fxHtskas48tm1TYcChTMq6BbPU+EGbdlMo3rWWA==
73-
dependencies:
74-
"@textlint/ast-node-types" "^12.3.0"
75-
76-
"@textlint/feature-flag@^12.5.0":
77-
version "12.5.0"
78-
resolved "https://registry.yarnpkg.com/@textlint/feature-flag/-/feature-flag-12.5.0.tgz#762110efd5e2277e1aecd3a6eb8eebd0050011b8"
79-
integrity sha512-GdyRbbIsWRuZieWKvRxQA8j5wX5hzq+QqEmuputBrU/KKapNfkg6uNY2GOY6SWvC8QcwD0dYh3Dy1x2txT8p8Q==
80-
81-
"@textlint/kernel@^12.5.0":
82-
version "12.5.0"
83-
resolved "https://registry.yarnpkg.com/@textlint/kernel/-/kernel-12.5.0.tgz#7b05e4c6c5d4b7441d2ff98a8919a9849af64b90"
84-
integrity sha512-9UspUHtS2FShTO9pWnrZjadjIvJzFIdIZDKIYCdZuUdU8dEhJqwOdYosqM4N5Wy40aMKnv4Voxp80Ssaq7zZaA==
85-
dependencies:
86-
"@textlint/ast-node-types" "^12.3.0"
87-
"@textlint/ast-tester" "^12.5.0"
88-
"@textlint/ast-traverse" "^12.5.0"
89-
"@textlint/feature-flag" "^12.5.0"
90-
"@textlint/source-code-fixer" "^12.5.0"
91-
"@textlint/types" "^12.5.0"
92-
"@textlint/utils" "^12.5.0"
69+
"@textlint/ast-traverse@^13.0.2":
70+
version "13.0.2"
71+
resolved "https://registry.yarnpkg.com/@textlint/ast-traverse/-/ast-traverse-13.0.2.tgz#0eb3308cfa9861857135e874ec8bd50e1ff7731a"
72+
integrity sha512-OBbJABVy/hIc/lwG7AiharRRFFJ15fyoUbVj3QjGeaaWtIJQdPxgq9Dm8B/QUC6wtfxMprttijWHdIMfEhzcVg==
73+
dependencies:
74+
"@textlint/ast-node-types" "^13.0.2"
75+
76+
"@textlint/feature-flag@^13.0.2":
77+
version "13.0.2"
78+
resolved "https://registry.yarnpkg.com/@textlint/feature-flag/-/feature-flag-13.0.2.tgz#1934b4b4019ea890cac080ea2b6f3d0e07bb18de"
79+
integrity sha512-u00NZZe2upKYHzwApNNW3qYPemlPj6/ffkTdxJIHd6KD43YhmokcVc4VQYgeCE2ulIPuRLus+imeB0JJlQBfpw==
80+
81+
"@textlint/kernel@^13.0.2":
82+
version "13.0.2"
83+
resolved "https://registry.yarnpkg.com/@textlint/kernel/-/kernel-13.0.2.tgz#f34aa9708f71589a59febab4200606e67bc91c08"
84+
integrity sha512-djv4FHhbA1qbcHybMbzEw7k9cVN5staIPkGCmivPlWb8Lm0J1xKl87YSLZejNb6aBNJB8NALfrUO7sIE79R1aQ==
85+
dependencies:
86+
"@textlint/ast-node-types" "^13.0.2"
87+
"@textlint/ast-tester" "^13.0.2"
88+
"@textlint/ast-traverse" "^13.0.2"
89+
"@textlint/feature-flag" "^13.0.2"
90+
"@textlint/source-code-fixer" "^13.0.2"
91+
"@textlint/types" "^13.0.2"
92+
"@textlint/utils" "^13.0.2"
9393
debug "^4.3.4"
9494
deep-equal "^1.1.1"
95-
structured-source "^3.0.2"
95+
structured-source "^4.0.0"
9696

97-
"@textlint/markdown-to-ast@^12.5.0":
98-
version "12.5.0"
99-
resolved "https://registry.yarnpkg.com/@textlint/markdown-to-ast/-/markdown-to-ast-12.5.0.tgz#9421257ec9ffd6c0120d27d24d57fa6526ece05d"
100-
integrity sha512-+fUslPm0+ukMnRVMPUQwKv1DEwmDP/rXFuzc5+k5tCMhighZ/Fv/e3Y9MUe7SgNDte7ilajTa3/uP0Iurr60WA==
97+
"@textlint/markdown-to-ast@^13.0.2":
98+
version "13.0.2"
99+
resolved "https://registry.yarnpkg.com/@textlint/markdown-to-ast/-/markdown-to-ast-13.0.2.tgz#d969641871079b01bbe6a311409aa36aca3fe166"
100+
integrity sha512-qi5Sw0aCyv/eTNzTlGZqhisoBvfFlYPzayzd2TI8XYteF+Xnnse+eLi/AgEScu+u1OjzhBbBY2Ub9yihP77huw==
101101
dependencies:
102-
"@textlint/ast-node-types" "^12.3.0"
102+
"@textlint/ast-node-types" "^13.0.2"
103103
debug "^4.3.4"
104104
mdast-util-gfm-autolink-literal "^0.1.3"
105105
remark-footnotes "^3.0.0"
@@ -109,32 +109,32 @@
109109
traverse "^0.6.7"
110110
unified "^9.2.2"
111111

112-
"@textlint/source-code-fixer@^12.5.0":
113-
version "12.5.0"
114-
resolved "https://registry.yarnpkg.com/@textlint/source-code-fixer/-/source-code-fixer-12.5.0.tgz#eec073fbce81750be6d0561b024024ebd1990492"
115-
integrity sha512-7LebJ6Y64Rb4fVYyokpU8FnjNLdx+TehcHQJ9L/fi8PYVjpS/08klYtYfRtKWmi/vrWED7U0aGhb8Xr26NuWFw==
112+
"@textlint/source-code-fixer@^13.0.2":
113+
version "13.0.2"
114+
resolved "https://registry.yarnpkg.com/@textlint/source-code-fixer/-/source-code-fixer-13.0.2.tgz#aa7721a1054aba3e02cf04edce98ec9b479c2363"
115+
integrity sha512-ay+QdAKn1IA2I7224htQixjgr3ZVfwpIjAwRyfPMevo1711HUUNOBRqaW8IG7eHO4N5ZyTTH9Gx4PJy9BDbQ0g==
116116
dependencies:
117-
"@textlint/types" "^12.5.0"
117+
"@textlint/types" "^13.0.2"
118118
debug "^4.3.4"
119119

120-
"@textlint/textlint-plugin-markdown@^12.5.0":
121-
version "12.5.0"
122-
resolved "https://registry.yarnpkg.com/@textlint/textlint-plugin-markdown/-/textlint-plugin-markdown-12.5.0.tgz#3e8ad49ba1ee6f50a49118f49e72e871ffc6c10d"
123-
integrity sha512-1B4mTmA1NOvK2kAk4Rl/TW3QFB80iwhsOKSJ16nCH/yvF82xgH+Gu4gQB/prNpACb4TivmzwvBRYp7rzhOTTyA==
120+
"@textlint/textlint-plugin-markdown@^13.0.2":
121+
version "13.0.2"
122+
resolved "https://registry.yarnpkg.com/@textlint/textlint-plugin-markdown/-/textlint-plugin-markdown-13.0.2.tgz#167a7b50635e525f2a54576b9f74870895d8a04b"
123+
integrity sha512-V9oDp4GUAOTZnQztm3a8H5GG27c0VA6wA6028pjl7J70iLjT/L9wv6xV/Cfcma51rfc5H6q2sDMOWzIEugg8/A==
124124
dependencies:
125-
"@textlint/markdown-to-ast" "^12.5.0"
125+
"@textlint/markdown-to-ast" "^13.0.2"
126126

127-
"@textlint/types@^12.5.0":
128-
version "12.5.0"
129-
resolved "https://registry.yarnpkg.com/@textlint/types/-/types-12.5.0.tgz#b0a79f83ece81b7e8ffe2570a073ea77a4459734"
130-
integrity sha512-Po5qOubilL/g3dx+ZUgaQzNXbROADBF4Z5xy7qqgV6pBQIEE/06INZDmmLE1Eesm2zoDpygoG/1f/0/Cy5Yupw==
127+
"@textlint/types@^13.0.2":
128+
version "13.0.2"
129+
resolved "https://registry.yarnpkg.com/@textlint/types/-/types-13.0.2.tgz#dcd551fa20e24d164529459b2aa92a90f42dde56"
130+
integrity sha512-0XbunSvhmBbLxwCJxZJuZ/HdQNh670KhfH8XbDJR08G6t4WLXWobunyRS1m4fp6enjJe2vLYDBGAwdSIoxMZfw==
131131
dependencies:
132-
"@textlint/ast-node-types" "^12.3.0"
132+
"@textlint/ast-node-types" "^13.0.2"
133133

134-
"@textlint/utils@^12.5.0":
135-
version "12.5.0"
136-
resolved "https://registry.yarnpkg.com/@textlint/utils/-/utils-12.5.0.tgz#7654e8f2f1a4522a3258bddc63936335843255ea"
137-
integrity sha512-bQWrQ7Xaru1DRLQhAQQJgNnfGQIwgTgWUigdS5wSwpbmfLDnaMzHu3AG0lk5hEnELMKTCIej5uCR0+YscyUckg==
134+
"@textlint/utils@^13.0.2":
135+
version "13.0.2"
136+
resolved "https://registry.yarnpkg.com/@textlint/utils/-/utils-13.0.2.tgz#763e95c83a669e49c3d960188cdfa19cde991d2a"
137+
integrity sha512-WJ7JeziBEBgxmANpYecJJ6l7BZ51Lc22oJecymPHWM0vtVX1gTJXPyPRcQRwQVGzyX1oo8sXXNlUHDb14/jEyQ==
138138

139139
"@tsconfig/node10@^1.0.7":
140140
version "1.0.9"
@@ -178,11 +178,6 @@
178178
resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz#d3357479a0fdfdd5907fe67e17e0a85c906e1301"
179179
integrity sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==
180180

181-
"@types/structured-source@^3.0.0":
182-
version "3.0.0"
183-
resolved "https://registry.yarnpkg.com/@types/structured-source/-/structured-source-3.0.0.tgz#e95d76037d400c1957f3b709f023b308e92f3829"
184-
integrity sha512-8u+Wo5+GEXe4jZyQ8TplLp+1A7g32ZcVoE7VZu8VcxnlaEm5I/+T579R7q3qKN76jmK0lRshpo4hl4bj/kEPKA==
185-
186181
"@types/unist@*", "@types/unist@^2.0.0", "@types/unist@^2.0.2":
187182
version "2.0.6"
188183
resolved "https://registry.yarnpkg.com/@types/unist/-/unist-2.0.6.tgz#250a7b16c3b91f672a24552ec64678eeb1d3a08d"
@@ -1480,13 +1475,6 @@ ts-node@^10.9.1:
14801475
v8-compile-cache-lib "^3.0.1"
14811476
yn "3.1.1"
14821477

1483-
txt-ast-traverse@^2.0.4:
1484-
version "2.0.4"
1485-
resolved "https://registry.yarnpkg.com/txt-ast-traverse/-/txt-ast-traverse-2.0.4.tgz#1d6f7eae7faf93fcd1a498531c2d8bffc6b7105b"
1486-
integrity sha512-sqlCeZYXwBKEUsliU67Pi5lsH/xTmFfrd4WTYN4eu8p8h2/ogNOsCebk11yJ+eq8VCkuuGt7tsufrJDcpa9Cwg==
1487-
dependencies:
1488-
"@textlint/ast-node-types" "^4.0.1"
1489-
14901478
type-fest@^0.6.0:
14911479
version "0.6.0"
14921480
resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.6.0.tgz#8d2a2370d3df886eb5c90ada1c5bf6188acf838b"

0 commit comments

Comments
 (0)