@cspell/cspell-tools 6.13.0 → 6.13.2

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.
@@ -0,0 +1,203 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "additionalProperties": false,
4
+ "definitions": {
5
+ "DictionaryFormats": {
6
+ "enum": [
7
+ "plaintext",
8
+ "trie",
9
+ "trie3",
10
+ "trie4"
11
+ ],
12
+ "type": "string"
13
+ },
14
+ "DictionarySource": {
15
+ "anyOf": [
16
+ {
17
+ "$ref": "#/definitions/FilePath"
18
+ },
19
+ {
20
+ "$ref": "#/definitions/FileSource"
21
+ },
22
+ {
23
+ "$ref": "#/definitions/FileListSource"
24
+ }
25
+ ]
26
+ },
27
+ "FileListSource": {
28
+ "additionalProperties": false,
29
+ "properties": {
30
+ "keepRawCase": {
31
+ "default": false,
32
+ "description": "Do not generate lower case / accent free versions of words.",
33
+ "type": "boolean"
34
+ },
35
+ "listFile": {
36
+ "$ref": "#/definitions/FilePath"
37
+ },
38
+ "maxDepth": {
39
+ "description": "Maximum number of nested Hunspell Rules to apply. This is needed for recursive dictionaries like Hebrew.",
40
+ "type": "number"
41
+ },
42
+ "split": {
43
+ "anyOf": [
44
+ {
45
+ "type": "boolean"
46
+ },
47
+ {
48
+ "const": "legacy",
49
+ "type": "string"
50
+ }
51
+ ],
52
+ "default": false,
53
+ "description": "Split lines into words."
54
+ }
55
+ },
56
+ "required": [
57
+ "listFile"
58
+ ],
59
+ "type": "object"
60
+ },
61
+ "FilePath": {
62
+ "description": "Note: All relative paths are relative to the config file location.",
63
+ "type": "string"
64
+ },
65
+ "FileSource": {
66
+ "additionalProperties": false,
67
+ "properties": {
68
+ "filename": {
69
+ "$ref": "#/definitions/FilePath"
70
+ },
71
+ "keepRawCase": {
72
+ "default": false,
73
+ "description": "Do not generate lower case / accent free versions of words.",
74
+ "type": "boolean"
75
+ },
76
+ "maxDepth": {
77
+ "description": "Maximum number of nested Hunspell Rules to apply. This is needed for recursive dictionaries like Hebrew.",
78
+ "type": "number"
79
+ },
80
+ "split": {
81
+ "anyOf": [
82
+ {
83
+ "type": "boolean"
84
+ },
85
+ {
86
+ "const": "legacy",
87
+ "type": "string"
88
+ }
89
+ ],
90
+ "default": false,
91
+ "description": "Split lines into words."
92
+ }
93
+ },
94
+ "required": [
95
+ "filename"
96
+ ],
97
+ "type": "object"
98
+ },
99
+ "Target": {
100
+ "additionalProperties": false,
101
+ "properties": {
102
+ "compress": {
103
+ "default": ": false",
104
+ "description": "gzip the file?",
105
+ "type": "boolean"
106
+ },
107
+ "excludeWordsFrom": {
108
+ "description": "Words from the sources that are found in `excludeWordsFrom` files will not be added to the dictionary.",
109
+ "items": {
110
+ "$ref": "#/definitions/FilePath"
111
+ },
112
+ "type": "array"
113
+ },
114
+ "format": {
115
+ "$ref": "#/definitions/DictionaryFormats",
116
+ "description": "Format of the dictionary."
117
+ },
118
+ "generateNonStrict": {
119
+ "default": true,
120
+ "description": "Generate lower case / accent free versions of words.",
121
+ "type": "boolean"
122
+ },
123
+ "name": {
124
+ "description": "Name of target, used as the basis of target file name.",
125
+ "type": "string"
126
+ },
127
+ "sort": {
128
+ "default": ": true",
129
+ "description": "Sort the words in the resulting dictionary. Does not apply to `trie` based formats.",
130
+ "type": "boolean"
131
+ },
132
+ "sources": {
133
+ "description": "File sources used to build the dictionary.",
134
+ "items": {
135
+ "$ref": "#/definitions/DictionarySource"
136
+ },
137
+ "type": "array"
138
+ },
139
+ "targetDirectory": {
140
+ "$ref": "#/definitions/FilePath",
141
+ "default": "current directory",
142
+ "description": "The target directory"
143
+ },
144
+ "trieBase": {
145
+ "description": "Advanced: Set the trie base number. A value between 10 and 36 Set numeric base to use. 10 is the easiest to read. 16 is common hex format. 36 is the most compact.",
146
+ "type": "number"
147
+ }
148
+ },
149
+ "required": [
150
+ "name",
151
+ "format",
152
+ "sources"
153
+ ],
154
+ "type": "object"
155
+ }
156
+ },
157
+ "properties": {
158
+ "generateNonStrict": {
159
+ "default": true,
160
+ "description": "Generate lower case / accent free versions of words.",
161
+ "type": "boolean"
162
+ },
163
+ "keepRawCase": {
164
+ "default": false,
165
+ "description": "Do not generate lower case / accent free versions of words.",
166
+ "type": "boolean"
167
+ },
168
+ "maxDepth": {
169
+ "description": "Maximum number of nested Hunspell Rules to apply. This is needed for recursive dictionaries like Hebrew.",
170
+ "type": "number"
171
+ },
172
+ "rootDir": {
173
+ "description": "Specify the directory where all relative paths will resolved against. By default, all relative paths are relative to the location of the config file.",
174
+ "type": "string"
175
+ },
176
+ "sort": {
177
+ "default": ": true",
178
+ "description": "Sort the words in the resulting dictionary. Does not apply to `trie` based formats.",
179
+ "type": "boolean"
180
+ },
181
+ "split": {
182
+ "anyOf": [
183
+ {
184
+ "type": "boolean"
185
+ },
186
+ {
187
+ "const": "legacy",
188
+ "type": "string"
189
+ }
190
+ ],
191
+ "default": false,
192
+ "description": "Split lines into words."
193
+ },
194
+ "targets": {
195
+ "description": "Optional Target Dictionaries to create.",
196
+ "items": {
197
+ "$ref": "#/definitions/Target"
198
+ },
199
+ "type": "array"
200
+ }
201
+ },
202
+ "type": "object"
203
+ }
@@ -6,7 +6,10 @@ const cspell_trie_lib_1 = require("cspell-trie-lib");
6
6
  const util_1 = require("hunspell-reader/dist/util");
7
7
  const legacyLineToWords_1 = require("./legacyLineToWords");
8
8
  function normalizeTargetWords(options) {
9
- const lineParser = (0, cspell_trie_lib_1.createDictionaryLineParser)({ stripCaseAndAccents: options.generateNonStrict });
9
+ const lineParser = (0, cspell_trie_lib_1.createDictionaryLineParser)({
10
+ stripCaseAndAccents: options.generateNonStrict,
11
+ stripCaseAndAccentsOnForbidden: true,
12
+ });
10
13
  const operations = [
11
14
  (0, sync_1.opFilter)((a) => !!a),
12
15
  lineParser,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cspell/cspell-tools",
3
- "version": "6.13.0",
3
+ "version": "6.13.2",
4
4
  "description": "Tools to assist with the development of cSpell",
5
5
  "typings": "dist/index.d.ts",
6
6
  "publishConfig": {
@@ -35,6 +35,7 @@
35
35
  "files": [
36
36
  "bin.js",
37
37
  "dist",
38
+ "cspell-tools.config.schema.json",
38
39
  "!**/__mocks__",
39
40
  "!**/*.test.*",
40
41
  "!**/*.spec.*",
@@ -47,14 +48,14 @@
47
48
  },
48
49
  "homepage": "https://github.com/streetsidesoftware/cspell#readme",
49
50
  "dependencies": {
50
- "@cspell/cspell-pipe": "6.13.0",
51
+ "@cspell/cspell-pipe": "6.13.2",
51
52
  "commander": "^9.4.1",
52
53
  "cosmiconfig": "^7.0.1",
53
- "cspell-trie-lib": "6.13.0",
54
+ "cspell-trie-lib": "6.13.2",
54
55
  "fs-extra": "^10.1.0",
55
56
  "gensequence": "^4.0.2",
56
57
  "glob": "^8.0.3",
57
- "hunspell-reader": "6.13.0"
58
+ "hunspell-reader": "6.13.2"
58
59
  },
59
60
  "engines": {
60
61
  "node": ">=14"
@@ -63,7 +64,7 @@
63
64
  "@types/fs-extra": "^9.0.13",
64
65
  "@types/glob": "^8.0.0",
65
66
  "@types/jest": "^29.2.0",
66
- "@types/node": "^18.11.5",
67
+ "@types/node": "^18.11.8",
67
68
  "@types/rimraf": "^3.0.2",
68
69
  "@types/shelljs": "^0.8.11",
69
70
  "jest": "^29.2.2",
@@ -73,5 +74,5 @@
73
74
  "ts-json-schema-generator": "^1.1.2"
74
75
  },
75
76
  "main": "bin.js",
76
- "gitHead": "e111bc5af5d1f578dbef5454cfa23b6f2b28050e"
77
+ "gitHead": "269c26afe8c5829b09e5ef731a30a2949d7c63e1"
77
78
  }