@textlint/textlint-plugin-text 14.8.4 → 15.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +7 -9
- package/module/src/TextProcessor.d.ts +0 -12
- package/module/src/TextProcessor.d.ts.map +0 -1
- package/module/src/TextProcessor.js +0 -27
- package/module/src/TextProcessor.js.map +0 -1
- package/module/src/index.d.ts +0 -6
- package/module/src/index.d.ts.map +0 -1
- package/module/src/index.js +0 -7
- package/module/src/index.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@textlint/textlint-plugin-text",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "15.0.1",
|
|
4
4
|
"description": "plain text plugin for textlint",
|
|
5
5
|
"homepage": "https://github.com/textlint/textlint/tree/master/packages/@textlint/textlint-plugin-text/",
|
|
6
6
|
"bugs": {
|
|
@@ -14,7 +14,6 @@
|
|
|
14
14
|
"author": "azu",
|
|
15
15
|
"type": "commonjs",
|
|
16
16
|
"main": "lib/src/index.js",
|
|
17
|
-
"module": "module/src/index.js",
|
|
18
17
|
"types": "lib/src/index.d.ts",
|
|
19
18
|
"directories": {
|
|
20
19
|
"test": "test"
|
|
@@ -22,24 +21,23 @@
|
|
|
22
21
|
"files": [
|
|
23
22
|
"bin/",
|
|
24
23
|
"lib/",
|
|
25
|
-
"module/",
|
|
26
24
|
"src/",
|
|
27
25
|
"!*.tsbuildinfo"
|
|
28
26
|
],
|
|
29
27
|
"scripts": {
|
|
30
|
-
"build": "tsc -b
|
|
31
|
-
"clean": "rimraf lib/
|
|
28
|
+
"build": "tsc -b",
|
|
29
|
+
"clean": "rimraf lib/",
|
|
32
30
|
"prepack": "npm run --if-present build",
|
|
33
31
|
"test": "vitest run",
|
|
34
32
|
"test:watch": "vitest watch",
|
|
35
33
|
"watch": "tsc -b --watch"
|
|
36
34
|
},
|
|
37
35
|
"dependencies": {
|
|
38
|
-
"@textlint/text-to-ast": "
|
|
39
|
-
"@textlint/types": "
|
|
36
|
+
"@textlint/text-to-ast": "15.0.1",
|
|
37
|
+
"@textlint/types": "15.0.1"
|
|
40
38
|
},
|
|
41
39
|
"devDependencies": {
|
|
42
|
-
"@textlint/kernel": "
|
|
40
|
+
"@textlint/kernel": "15.0.1",
|
|
43
41
|
"@types/node": "^20.19.0",
|
|
44
42
|
"@types/react": "^18.3.23",
|
|
45
43
|
"rimraf": "^6.0.1",
|
|
@@ -50,5 +48,5 @@
|
|
|
50
48
|
"publishConfig": {
|
|
51
49
|
"access": "public"
|
|
52
50
|
},
|
|
53
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "ee6d1134b3439fc2c0c253897b8d1d52179e893c"
|
|
54
52
|
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { TextlintPluginProcessor, TextlintPluginOptions, TextlintPluginPreProcessResult, TextlintPluginPostProcessResult } from "@textlint/types";
|
|
2
|
-
export declare class TextProcessor implements TextlintPluginProcessor {
|
|
3
|
-
config: TextlintPluginOptions;
|
|
4
|
-
extensions: Array<string>;
|
|
5
|
-
constructor(config?: {});
|
|
6
|
-
availableExtensions(): string[];
|
|
7
|
-
processor(_ext: string): {
|
|
8
|
-
preProcess: (text: string, _filePath?: string) => TextlintPluginPreProcessResult;
|
|
9
|
-
postProcess: (messages: Array<any>, filePath?: string) => TextlintPluginPostProcessResult;
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=TextProcessor.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TextProcessor.d.ts","sourceRoot":"","sources":["../../src/TextProcessor.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACR,uBAAuB,EACvB,qBAAqB,EACrB,8BAA8B,EAC9B,+BAA+B,EAClC,MAAM,iBAAiB,CAAC;AAEzB,qBAAa,aAAc,YAAW,uBAAuB;IACzD,MAAM,EAAE,qBAAqB,CAAC;IAC9B,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;gBACd,MAAM,KAAK;IAMvB,mBAAmB;IAInB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG;QACrB,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,KAAK,8BAA8B,CAAC;QACjF,WAAW,EAAE,CAAC,QAAQ,EAAE,KAAK,CAAC,GAAG,CAAC,EAAE,QAAQ,CAAC,EAAE,MAAM,KAAK,+BAA+B,CAAC;KAC7F;CAaJ"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
// LICENSE : MIT
|
|
2
|
-
"use strict";
|
|
3
|
-
import { parse } from "@textlint/text-to-ast";
|
|
4
|
-
export class TextProcessor {
|
|
5
|
-
constructor(config = {}) {
|
|
6
|
-
this.config = config;
|
|
7
|
-
// support "extension" option
|
|
8
|
-
this.extensions = this.config.extensions ? this.config.extensions : [];
|
|
9
|
-
}
|
|
10
|
-
availableExtensions() {
|
|
11
|
-
return [".txt", ".text"].concat(this.extensions);
|
|
12
|
-
}
|
|
13
|
-
processor(_ext) {
|
|
14
|
-
return {
|
|
15
|
-
preProcess(text, _filePath) {
|
|
16
|
-
return parse(text);
|
|
17
|
-
},
|
|
18
|
-
postProcess(messages, filePath) {
|
|
19
|
-
return {
|
|
20
|
-
messages,
|
|
21
|
-
filePath: filePath ? filePath : "<text>"
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
//# sourceMappingURL=TextProcessor.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TextProcessor.js","sourceRoot":"","sources":["../../src/TextProcessor.ts"],"names":[],"mappings":"AAAA,gBAAgB;AAChB,YAAY,CAAC;AACb,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAQ9C,MAAM,OAAO,aAAa;IAGtB,YAAY,MAAM,GAAG,EAAE;QACnB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,6BAA6B;QAC7B,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC;IAC3E,CAAC;IAED,mBAAmB;QACf,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACrD,CAAC;IAED,SAAS,CAAC,IAAY;QAIlB,OAAO;YACH,UAAU,CAAC,IAAY,EAAE,SAAkB;gBACvC,OAAO,KAAK,CAAC,IAAI,CAAC,CAAC;YACvB,CAAC;YACD,WAAW,CAAC,QAAoB,EAAE,QAAiB;gBAC/C,OAAO;oBACH,QAAQ;oBACR,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ;iBAC3C,CAAC;YACN,CAAC;SACJ,CAAC;IACN,CAAC;CACJ"}
|
package/module/src/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;;;;AACnD,wBAEE"}
|
package/module/src/index.js
DELETED
package/module/src/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,gBAAgB;AAChB,YAAY,CAAC;AACb,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,eAAe;IACX,SAAS,EAAE,aAAa;CAC3B,CAAC"}
|