@cspell/cspell-types 6.26.3 → 6.28.0

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.
Files changed (56) hide show
  1. package/dist/cjs/CSpellReporter.js +14 -0
  2. package/dist/cjs/CSpellSettingsDef.js +3 -0
  3. package/dist/cjs/DictionaryDefinition.js +3 -0
  4. package/dist/cjs/DictionaryInformation.js +3 -0
  5. package/dist/cjs/InlineDictionary.js +3 -0
  6. package/dist/cjs/Parser/index.d.ts +125 -12
  7. package/dist/cjs/Parser/index.js +3 -0
  8. package/dist/cjs/TextMap.js +3 -0
  9. package/dist/cjs/TextOffset.js +3 -0
  10. package/dist/cjs/{index.cjs → configFields.js} +5 -18
  11. package/dist/cjs/features.js +4 -0
  12. package/dist/cjs/index.js +9 -0
  13. package/dist/cjs/suggestionCostsDef.js +3 -0
  14. package/dist/cjs/types.js +5 -0
  15. package/dist/{cjs/Parser/CSpellReporter.d.ts → esm/CSpellReporter.d.mts} +2 -2
  16. package/dist/esm/CSpellReporter.js +1 -2
  17. package/dist/esm/CSpellReporter.mjs +10 -0
  18. package/dist/{cjs/Parser/CSpellSettingsDef.d.ts → esm/CSpellSettingsDef.d.mts} +7 -7
  19. package/dist/esm/CSpellSettingsDef.js +0 -1
  20. package/dist/esm/CSpellSettingsDef.mjs +1 -0
  21. package/dist/{cjs/Parser/DictionaryDefinition.d.ts → esm/DictionaryDefinition.d.mts} +3 -3
  22. package/dist/esm/DictionaryDefinition.js +0 -1
  23. package/dist/esm/DictionaryDefinition.mjs +1 -0
  24. package/dist/{cjs/Parser/DictionaryInformation.d.ts → esm/DictionaryInformation.d.mts} +2 -2
  25. package/dist/esm/DictionaryInformation.js +0 -1
  26. package/dist/esm/DictionaryInformation.mjs +1 -0
  27. package/dist/{cjs/Parser/InlineDictionary.d.ts → esm/InlineDictionary.d.mts} +1 -1
  28. package/dist/esm/InlineDictionary.js +0 -1
  29. package/dist/esm/InlineDictionary.mjs +1 -0
  30. package/dist/{cjs/Parser/Parser/index.d.ts → esm/Parser/index.d.mts} +1 -1
  31. package/dist/esm/Parser/index.js +0 -1
  32. package/dist/esm/Parser/index.mjs +1 -0
  33. package/dist/{cjs/Parser/TextMap.d.ts → esm/TextMap.d.mts} +1 -1
  34. package/dist/esm/TextMap.js +0 -1
  35. package/dist/esm/TextMap.mjs +1 -0
  36. package/dist/{cjs/Parser/TextOffset.d.ts → esm/TextOffset.d.mts} +1 -1
  37. package/dist/esm/TextOffset.js +0 -1
  38. package/dist/esm/TextOffset.mjs +1 -0
  39. package/dist/{cjs/Parser/configFields.d.ts → esm/configFields.d.mts} +2 -2
  40. package/dist/esm/configFields.js +0 -1
  41. package/dist/esm/configFields.mjs +52 -0
  42. package/dist/{cjs/Parser/features.d.ts → esm/features.d.mts} +1 -1
  43. package/dist/esm/features.js +0 -1
  44. package/dist/esm/features.mjs +2 -0
  45. package/dist/esm/index.d.mts +13 -0
  46. package/dist/esm/index.js +0 -1
  47. package/dist/esm/index.mjs +2 -0
  48. package/dist/{cjs/Parser/suggestionCostsDef.d.ts → esm/suggestionCostsDef.d.mts} +1 -1
  49. package/dist/esm/suggestionCostsDef.js +0 -1
  50. package/dist/esm/suggestionCostsDef.mjs +1 -0
  51. package/dist/{cjs/Parser/types.d.ts → esm/types.d.mts} +1 -1
  52. package/dist/esm/types.js +0 -1
  53. package/dist/esm/types.mjs +3 -0
  54. package/package.json +25 -29
  55. package/dist/cjs/Parser/index.cjs +0 -3
  56. /package/{ajv.config.cjs → ajv.config.js} +0 -0
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MessageTypes = exports.IssueType = void 0;
4
+ var IssueType;
5
+ (function (IssueType) {
6
+ IssueType[IssueType["spelling"] = 0] = "spelling";
7
+ IssueType[IssueType["directive"] = 1] = "directive";
8
+ })(IssueType = exports.IssueType || (exports.IssueType = {}));
9
+ exports.MessageTypes = {
10
+ Debug: 'Debug',
11
+ Info: 'Info',
12
+ Warning: 'Warning',
13
+ };
14
+ //# sourceMappingURL=CSpellReporter.js.map
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=CSpellSettingsDef.js.map
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=DictionaryDefinition.js.map
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=DictionaryInformation.js.map
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=InlineDictionary.js.map
@@ -1,13 +1,126 @@
1
- export type { CSpellUserSettingsFields } from './configFields.js';
2
- export { ConfigFields } from './configFields.js';
3
- export type { CSpellReporter, CSpellReporterModule, DebugEmitter, ErrorEmitter, ErrorLike, Issue, MessageEmitter, MessageType, MessageTypeLookup, ProgressBase, ProgressEmitter, ProgressFileBase, ProgressFileBegin, ProgressFileComplete, ProgressItem, ProgressTypes, ReporterConfiguration, ResultEmitter, RunResult, SpellingErrorEmitter, } from './CSpellReporter.js';
4
- export { IssueType, MessageTypes } from './CSpellReporter.js';
5
- export type { AdvancedCSpellSettings, AdvancedCSpellSettingsWithSourceTrace, BaseSetting, CacheFormat, CacheSettings, CacheStrategy, CommandLineSettings, CSpellPackageSettings, CSpellSettings, CSpellSettingsWithSourceTrace, CSpellUserSettings, CSpellUserSettingsWithComments, ExperimentalBaseSettings, ExperimentalFileSettings, ExtendableSettings, FileSettings, FileSource, FsPath, FSPathResolvable, Glob, GlobDef, ImportFileRef, InMemorySource, LanguageId, LanguageIdMultiple, LanguageIdMultipleNeg, LanguageIdSingle, LanguageSetting, LanguageSettingFilterFields, LanguageSettingFilterFieldsDeprecated, LanguageSettingFilterFieldsPreferred, LegacySettings, LocaleId, LocalId, MergeSource, OverrideFilterFields, OverrideSettings, Pattern, PatternId, PatternRef, Plugin, PnPSettings, PredefinedPatterns, RegExpPatternDefinition, RegExpPatternList, ReporterSettings, ReportingConfiguration, Settings, SimpleGlob, Source, SuggestionsConfiguration, TrustLevel, Version, VersionLatest, VersionLegacy, WorkspaceTrustSettings, } from './CSpellSettingsDef.js';
6
- export type { CustomDictionaryPath, CustomDictionaryScope, DictionaryDefinition, DictionaryDefinitionAlternate, DictionaryDefinitionAugmented, DictionaryDefinitionBase, DictionaryDefinitionCustom, DictionaryDefinitionInline, DictionaryDefinitionInlineFlagWords, DictionaryDefinitionInlineIgnoreWords, DictionaryDefinitionInlineWords, DictionaryDefinitionLegacy, DictionaryDefinitionPreferred, DictionaryFileTypes, DictionaryId, DictionaryNegRef, DictionaryPath, DictionaryRef, DictionaryReference, ReplaceEntry, ReplaceMap, } from './DictionaryDefinition.js';
7
- export type { CharacterSet, CharacterSetCosts, DictionaryInformation, EditCosts } from './DictionaryInformation.js';
8
- export type { Feature, Features } from './features.js';
9
- export type { ParsedText, Parser, ParseResult, ParserName, ParserOptions } from './Parser/index.js';
10
- export type { SuggestionCostMapDef, SuggestionCostsDefs } from './suggestionCostsDef.js';
11
- export type { MappedText } from './TextMap.js';
12
- export type { TextDocumentOffset, TextOffset } from './TextOffset.js';
1
+ export type ParserOptions = Record<string, unknown>;
2
+ export type ParserName = string;
3
+ export interface Parser {
4
+ /** Name of parser */
5
+ readonly name: ParserName;
6
+ /**
7
+ * Parse Method
8
+ * @param content - full content of the file
9
+ * @param filename - filename
10
+ */
11
+ parse(content: string, filename: string): ParseResult;
12
+ }
13
+ export interface ParseResult {
14
+ readonly content: string;
15
+ readonly filename: string;
16
+ readonly parsedTexts: Iterable<ParsedText>;
17
+ }
18
+ export interface ParsedText {
19
+ /**
20
+ * The text extracted and possibly transformed
21
+ */
22
+ readonly text: string;
23
+ /**
24
+ * The raw text before it has been transformed
25
+ */
26
+ readonly rawText?: string | undefined;
27
+ /**
28
+ * start and end offsets of the text
29
+ */
30
+ readonly range: Range;
31
+ /**
32
+ * The Scope annotation for a segment of text.
33
+ * Used by the spell checker to apply spell checking options
34
+ * based upon the value of the scope.
35
+ */
36
+ readonly scope?: Scope | undefined;
37
+ /**
38
+ * The source map is used to support text transformations.
39
+ *
40
+ * See: {@link SourceMap}
41
+ */
42
+ readonly map?: SourceMap | undefined;
43
+ /**
44
+ * Used to delegate parsing the contents of `text` to another parser.
45
+ *
46
+ */
47
+ readonly delegate?: DelegateInfo | undefined;
48
+ }
49
+ /**
50
+ * A SourceMap is used to map transform a piece of text back to its original text.
51
+ * This is necessary in order to report the correct location of a spelling issue.
52
+ * An empty source map indicates that it was a 1:1 transformation.
53
+ *
54
+ * The values in a source map are number pairs (even, odd) relative to the beginning of each
55
+ * string segment.
56
+ * - even - offset in the source text
57
+ * - odd - offset in the transformed text
58
+ *
59
+ * Offsets start a 0
60
+ *
61
+ * Example:
62
+ *
63
+ * - Original text: `Grand Caf\u00e9 Bj\u00f8rvika`
64
+ * - Transformed text: `Grand Café Bjørvika`
65
+ * - Map: [9, 9, 15, 10, 18, 13, 24, 14]
66
+ *
67
+ * | offset | original | offset | transformed |
68
+ * | ------ | ----------- | ------ | ----------- |
69
+ * | 0-9 | `Grand Caf` | 0-9 | `Grand Caf` |
70
+ * | 9-15 | `\u00e9` | 9-10 | `é` |
71
+ * | 15-18 | ` Bj` | 10-13 | ` Bj` |
72
+ * | 18-24 | `\u00f8` | 13-14 | `ø` |
73
+ * | 24-29 | `rvika` | 14-19 | `rvika` |
74
+ *
75
+ * <!--- cspell:ignore Bjørvika rvika --->
76
+ */
77
+ export type SourceMap = number[];
78
+ export type Range = readonly [start: number, end: number];
79
+ /**
80
+ * DelegateInfo is used by a parser to delegate parsing a subsection of a document to
81
+ * another parser. The following information is used by the spell checker to match
82
+ * the parser.
83
+ */
84
+ export interface DelegateInfo {
85
+ /**
86
+ * Proposed virtual file name including the extension.
87
+ * Format: `./${source_filename}/${block_number}.${ext}
88
+ * Example: `./README.md/1.js`
89
+ */
90
+ readonly filename: string;
91
+ /**
92
+ * The filename of the origin of the virtual file block.
93
+ * Example: `./README.md`
94
+ */
95
+ readonly originFilename: string;
96
+ /**
97
+ * Proposed file extension
98
+ * Example: `.js`
99
+ */
100
+ readonly extension: string;
101
+ /**
102
+ * Filetype to use
103
+ * Example: `javascript`
104
+ */
105
+ readonly fileType?: string;
106
+ }
107
+ /**
108
+ * Scope - chain of scope going from local to global
109
+ *
110
+ * Example:
111
+ * ```
112
+ * `comment.block.documentation.ts` -> `meta.interface.ts` -> `source.ts`
113
+ * ```
114
+ */
115
+ export interface ScopeChain {
116
+ readonly value: string;
117
+ readonly parent?: ScopeChain | undefined;
118
+ }
119
+ /**
120
+ * A string representing a scope chain separated by spaces
121
+ *
122
+ * Example: `comment.block.documentation.ts meta.interface.ts source.ts`
123
+ */
124
+ export type ScopeString = string;
125
+ export type Scope = ScopeChain | ScopeString;
13
126
  //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=TextMap.js.map
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=TextOffset.js.map
@@ -1,6 +1,7 @@
1
- 'use strict';
2
-
3
- const ConfigFields = {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ConfigFields = void 0;
4
+ exports.ConfigFields = {
4
5
  allowCompoundWords: 'allowCompoundWords',
5
6
  cache: 'cache',
6
7
  caseSensitive: 'caseSensitive',
@@ -52,18 +53,4 @@ const ConfigFields = {
52
53
  parser: 'parser',
53
54
  };
54
55
  // export const ConfigKeysNames = Object.values(ConfigKeysByField);
55
-
56
- exports.IssueType = void 0;
57
- (function (IssueType) {
58
- IssueType[IssueType["spelling"] = 0] = "spelling";
59
- IssueType[IssueType["directive"] = 1] = "directive";
60
- })(exports.IssueType = exports.IssueType || (exports.IssueType = {}));
61
- const MessageTypes = {
62
- Debug: 'Debug',
63
- Info: 'Info',
64
- Warning: 'Warning',
65
- };
66
-
67
- exports.ConfigFields = ConfigFields;
68
- exports.MessageTypes = MessageTypes;
69
- //# sourceMappingURL=index.cjs.map
56
+ //# sourceMappingURL=configFields.js.map
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ /* eslint-disable @typescript-eslint/no-empty-interface */
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ //# sourceMappingURL=features.js.map
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MessageTypes = exports.IssueType = exports.ConfigFields = void 0;
4
+ var configFields_js_1 = require("./configFields.js");
5
+ Object.defineProperty(exports, "ConfigFields", { enumerable: true, get: function () { return configFields_js_1.ConfigFields; } });
6
+ var CSpellReporter_js_1 = require("./CSpellReporter.js");
7
+ Object.defineProperty(exports, "IssueType", { enumerable: true, get: function () { return CSpellReporter_js_1.IssueType; } });
8
+ Object.defineProperty(exports, "MessageTypes", { enumerable: true, get: function () { return CSpellReporter_js_1.MessageTypes; } });
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=suggestionCostsDef.js.map
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /* eslint-disable @typescript-eslint/no-explicit-any */
3
+ /* eslint-disable @typescript-eslint/ban-types */
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ //# sourceMappingURL=types.js.map
@@ -1,4 +1,4 @@
1
- import type { TextDocumentOffset, TextOffset } from './TextOffset.js';
1
+ import type { TextDocumentOffset, TextOffset } from './TextOffset.mjs';
2
2
  export interface Suggestion {
3
3
  /**
4
4
  * Word to suggest.
@@ -149,4 +149,4 @@ export interface CSpellReporterModule {
149
149
  getReporter: (settings: unknown, config: ReporterConfiguration) => CSpellReporter;
150
150
  }
151
151
  export {};
152
- //# sourceMappingURL=CSpellReporter.d.ts.map
152
+ //# sourceMappingURL=CSpellReporter.d.mts.map
@@ -2,10 +2,9 @@ export var IssueType;
2
2
  (function (IssueType) {
3
3
  IssueType[IssueType["spelling"] = 0] = "spelling";
4
4
  IssueType[IssueType["directive"] = 1] = "directive";
5
- })(IssueType = IssueType || (IssueType = {}));
5
+ })(IssueType || (IssueType = {}));
6
6
  export const MessageTypes = {
7
7
  Debug: 'Debug',
8
8
  Info: 'Info',
9
9
  Warning: 'Warning',
10
10
  };
11
- //# sourceMappingURL=CSpellReporter.js.map
@@ -0,0 +1,10 @@
1
+ export var IssueType;
2
+ (function (IssueType) {
3
+ IssueType[IssueType["spelling"] = 0] = "spelling";
4
+ IssueType[IssueType["directive"] = 1] = "directive";
5
+ })(IssueType || (IssueType = {}));
6
+ export const MessageTypes = {
7
+ Debug: 'Debug',
8
+ Info: 'Info',
9
+ Warning: 'Warning',
10
+ };
@@ -1,9 +1,9 @@
1
- import type { ReporterConfigurationBase } from './CSpellReporter.js';
2
- import type { DictionaryDefinition, DictionaryReference } from './DictionaryDefinition.js';
3
- import type { Features } from './features.js';
4
- import type { InlineDictionary } from './InlineDictionary.js';
5
- import type { Parser, ParserName } from './Parser/index.js';
6
- import type { Serializable } from './types.js';
1
+ import type { ReporterConfigurationBase } from './CSpellReporter.mjs';
2
+ import type { DictionaryDefinition, DictionaryReference } from './DictionaryDefinition.mjs';
3
+ import type { Features } from './features.mjs';
4
+ import type { InlineDictionary } from './InlineDictionary.mjs';
5
+ import type { Parser, ParserName } from './Parser/index.mjs';
6
+ import type { Serializable } from './types.mjs';
7
7
  /**
8
8
  * These settings come from user and workspace settings.
9
9
  */
@@ -685,4 +685,4 @@ export interface Plugin {
685
685
  parsers?: Parser[];
686
686
  }
687
687
  export {};
688
- //# sourceMappingURL=CSpellSettingsDef.d.ts.map
688
+ //# sourceMappingURL=CSpellSettingsDef.d.mts.map
@@ -1,2 +1 @@
1
1
  export {};
2
- //# sourceMappingURL=CSpellSettingsDef.js.map
@@ -0,0 +1 @@
1
+ export {};
@@ -1,5 +1,5 @@
1
- import type { DictionaryInformation } from './DictionaryInformation.js';
2
- import type { InlineDictionary } from './InlineDictionary.js';
1
+ import type { DictionaryInformation } from './DictionaryInformation.mjs';
2
+ import type { InlineDictionary } from './InlineDictionary.mjs';
3
3
  export type DictionaryDefinition = DictionaryDefinitionPreferred | DictionaryDefinitionCustom | DictionaryDefinitionAugmented | DictionaryDefinitionInline | DictionaryDefinitionAlternate | DictionaryDefinitionLegacy;
4
4
  export type DictionaryFileTypes = 'S' | 'W' | 'C' | 'T';
5
5
  export interface DictionaryDefinitionBase {
@@ -216,4 +216,4 @@ export type DictionaryRef = DictionaryId;
216
216
  */
217
217
  export type DictionaryNegRef = string;
218
218
  export {};
219
- //# sourceMappingURL=DictionaryDefinition.d.ts.map
219
+ //# sourceMappingURL=DictionaryDefinition.d.mts.map
@@ -1,2 +1 @@
1
1
  export {};
2
- //# sourceMappingURL=DictionaryDefinition.js.map
@@ -0,0 +1 @@
1
+ export {};
@@ -1,4 +1,4 @@
1
- import type { SuggestionCostsDefs } from './suggestionCostsDef.js';
1
+ import type { SuggestionCostsDefs } from './suggestionCostsDef.mjs';
2
2
  /**
3
3
  * Use by dictionary authors to help improve the quality of suggestions
4
4
  * given from the dictionary.
@@ -207,4 +207,4 @@ export interface PatternAdjustment {
207
207
  penalty: number;
208
208
  }
209
209
  export {};
210
- //# sourceMappingURL=DictionaryInformation.d.ts.map
210
+ //# sourceMappingURL=DictionaryInformation.d.mts.map
@@ -1,2 +1 @@
1
1
  export {};
2
- //# sourceMappingURL=DictionaryInformation.js.map
@@ -0,0 +1 @@
1
+ export {};
@@ -41,4 +41,4 @@ export interface InlineDictionary {
41
41
  */
42
42
  suggestWords?: string[];
43
43
  }
44
- //# sourceMappingURL=InlineDictionary.d.ts.map
44
+ //# sourceMappingURL=InlineDictionary.d.mts.map
@@ -1,2 +1 @@
1
1
  export {};
2
- //# sourceMappingURL=InlineDictionary.js.map
@@ -0,0 +1 @@
1
+ export {};
@@ -123,4 +123,4 @@ export interface ScopeChain {
123
123
  */
124
124
  export type ScopeString = string;
125
125
  export type Scope = ScopeChain | ScopeString;
126
- //# sourceMappingURL=index.d.ts.map
126
+ //# sourceMappingURL=index.d.mts.map
@@ -1,2 +1 @@
1
1
  export {};
2
- //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ export {};
@@ -33,4 +33,4 @@ type PartialOrUndefined<T> = {
33
33
  [P in keyof T]?: T[P] | undefined;
34
34
  };
35
35
  export {};
36
- //# sourceMappingURL=TextMap.d.ts.map
36
+ //# sourceMappingURL=TextMap.d.mts.map
@@ -1,2 +1 @@
1
1
  export {};
2
- //# sourceMappingURL=TextMap.js.map
@@ -0,0 +1 @@
1
+ export {};
@@ -20,4 +20,4 @@ export interface TextDocumentOffset extends TextOffset {
20
20
  col: number;
21
21
  line: TextOffset;
22
22
  }
23
- //# sourceMappingURL=TextOffset.d.ts.map
23
+ //# sourceMappingURL=TextOffset.d.mts.map
@@ -1,2 +1 @@
1
1
  export {};
2
- //# sourceMappingURL=TextOffset.js.map
@@ -0,0 +1 @@
1
+ export {};
@@ -1,7 +1,7 @@
1
- import type { CSpellUserSettings } from './CSpellSettingsDef.js';
1
+ import type { CSpellUserSettings } from './CSpellSettingsDef.mjs';
2
2
  export type ConfigKeys = Exclude<keyof CSpellUserSettings, '$schema' | 'version' | 'id'>;
3
3
  export type CSpellUserSettingsFields = {
4
4
  [key in ConfigKeys]: key;
5
5
  };
6
6
  export declare const ConfigFields: CSpellUserSettingsFields;
7
- //# sourceMappingURL=configFields.d.ts.map
7
+ //# sourceMappingURL=configFields.d.mts.map
@@ -50,4 +50,3 @@ export const ConfigFields = {
50
50
  parser: 'parser',
51
51
  };
52
52
  // export const ConfigKeysNames = Object.values(ConfigKeysByField);
53
- //# sourceMappingURL=configFields.js.map
@@ -0,0 +1,52 @@
1
+ export const ConfigFields = {
2
+ allowCompoundWords: 'allowCompoundWords',
3
+ cache: 'cache',
4
+ caseSensitive: 'caseSensitive',
5
+ description: 'description',
6
+ dictionaries: 'dictionaries',
7
+ dictionaryDefinitions: 'dictionaryDefinitions',
8
+ enabled: 'enabled',
9
+ enabledLanguageIds: 'enabledLanguageIds',
10
+ enableFiletypes: 'enableFiletypes',
11
+ enableGlobDot: 'enableGlobDot',
12
+ failFast: 'failFast',
13
+ features: 'features',
14
+ files: 'files',
15
+ flagWords: 'flagWords',
16
+ gitignoreRoot: 'gitignoreRoot',
17
+ globRoot: 'globRoot',
18
+ ignorePaths: 'ignorePaths',
19
+ ignoreRegExpList: 'ignoreRegExpList',
20
+ ignoreWords: 'ignoreWords',
21
+ import: 'import',
22
+ includeRegExpList: 'includeRegExpList',
23
+ language: 'language',
24
+ languageId: 'languageId',
25
+ languageSettings: 'languageSettings',
26
+ loadDefaultConfiguration: 'loadDefaultConfiguration',
27
+ maxDuplicateProblems: 'maxDuplicateProblems',
28
+ maxNumberOfProblems: 'maxNumberOfProblems',
29
+ minWordLength: 'minWordLength',
30
+ name: 'name',
31
+ noConfigSearch: 'noConfigSearch',
32
+ noSuggestDictionaries: 'noSuggestDictionaries',
33
+ numSuggestions: 'numSuggestions',
34
+ overrides: 'overrides',
35
+ patterns: 'patterns',
36
+ pnpFiles: 'pnpFiles',
37
+ readonly: 'readonly',
38
+ reporters: 'reporters',
39
+ showStatus: 'showStatus',
40
+ spellCheckDelayMs: 'spellCheckDelayMs',
41
+ suggestionNumChanges: 'suggestionNumChanges',
42
+ suggestionsTimeout: 'suggestionsTimeout',
43
+ suggestWords: 'suggestWords',
44
+ useGitignore: 'useGitignore',
45
+ usePnP: 'usePnP',
46
+ userWords: 'userWords',
47
+ validateDirectives: 'validateDirectives',
48
+ words: 'words',
49
+ // Experimental
50
+ parser: 'parser',
51
+ };
52
+ // export const ConfigKeysNames = Object.values(ConfigKeysByField);
@@ -35,4 +35,4 @@ export type FeatureNamesKnown = keyof Features;
35
35
  export type FeatureNamesExperimental = keyof FeaturesExperimental;
36
36
  export type FeatureNamesActive = keyof FeaturesActive;
37
37
  export type FeatureNamesDeprecated = keyof FeaturesDeprecated;
38
- //# sourceMappingURL=features.d.ts.map
38
+ //# sourceMappingURL=features.d.mts.map
@@ -1,3 +1,2 @@
1
1
  /* eslint-disable @typescript-eslint/no-empty-interface */
2
2
  export {};
3
- //# sourceMappingURL=features.js.map
@@ -0,0 +1,2 @@
1
+ /* eslint-disable @typescript-eslint/no-empty-interface */
2
+ export {};
@@ -0,0 +1,13 @@
1
+ export type { CSpellUserSettingsFields } from './configFields.mjs';
2
+ export { ConfigFields } from './configFields.mjs';
3
+ export type { CSpellReporter, CSpellReporterModule, DebugEmitter, ErrorEmitter, ErrorLike, Issue, MessageEmitter, MessageType, MessageTypeLookup, ProgressBase, ProgressEmitter, ProgressFileBase, ProgressFileBegin, ProgressFileComplete, ProgressItem, ProgressTypes, ReporterConfiguration, ResultEmitter, RunResult, SpellingErrorEmitter, } from './CSpellReporter.mjs';
4
+ export { IssueType, MessageTypes } from './CSpellReporter.mjs';
5
+ export type { AdvancedCSpellSettings, AdvancedCSpellSettingsWithSourceTrace, BaseSetting, CacheFormat, CacheSettings, CacheStrategy, CommandLineSettings, CSpellPackageSettings, CSpellSettings, CSpellSettingsWithSourceTrace, CSpellUserSettings, CSpellUserSettingsWithComments, ExperimentalBaseSettings, ExperimentalFileSettings, ExtendableSettings, FileSettings, FileSource, FsPath, FSPathResolvable, Glob, GlobDef, ImportFileRef, InMemorySource, LanguageId, LanguageIdMultiple, LanguageIdMultipleNeg, LanguageIdSingle, LanguageSetting, LanguageSettingFilterFields, LanguageSettingFilterFieldsDeprecated, LanguageSettingFilterFieldsPreferred, LegacySettings, LocaleId, LocalId, MergeSource, OverrideFilterFields, OverrideSettings, Pattern, PatternId, PatternRef, Plugin, PnPSettings, PredefinedPatterns, RegExpPatternDefinition, RegExpPatternList, ReporterSettings, ReportingConfiguration, Settings, SimpleGlob, Source, SuggestionsConfiguration, TrustLevel, Version, VersionLatest, VersionLegacy, WorkspaceTrustSettings, } from './CSpellSettingsDef.mjs';
6
+ export type { CustomDictionaryPath, CustomDictionaryScope, DictionaryDefinition, DictionaryDefinitionAlternate, DictionaryDefinitionAugmented, DictionaryDefinitionBase, DictionaryDefinitionCustom, DictionaryDefinitionInline, DictionaryDefinitionInlineFlagWords, DictionaryDefinitionInlineIgnoreWords, DictionaryDefinitionInlineWords, DictionaryDefinitionLegacy, DictionaryDefinitionPreferred, DictionaryFileTypes, DictionaryId, DictionaryNegRef, DictionaryPath, DictionaryRef, DictionaryReference, ReplaceEntry, ReplaceMap, } from './DictionaryDefinition.mjs';
7
+ export type { CharacterSet, CharacterSetCosts, DictionaryInformation, EditCosts } from './DictionaryInformation.mjs';
8
+ export type { Feature, Features } from './features.mjs';
9
+ export type { ParsedText, Parser, ParseResult, ParserName, ParserOptions } from './Parser/index.mjs';
10
+ export type { SuggestionCostMapDef, SuggestionCostsDefs } from './suggestionCostsDef.mjs';
11
+ export type { MappedText } from './TextMap.mjs';
12
+ export type { TextDocumentOffset, TextOffset } from './TextOffset.mjs';
13
+ //# sourceMappingURL=index.d.mts.map
package/dist/esm/index.js CHANGED
@@ -1,3 +1,2 @@
1
1
  export { ConfigFields } from './configFields.js';
2
2
  export { IssueType, MessageTypes } from './CSpellReporter.js';
3
- //# sourceMappingURL=index.js.map
@@ -0,0 +1,2 @@
1
+ export { ConfigFields } from './configFields.mjs';
2
+ export { IssueType, MessageTypes } from './CSpellReporter.mjs';
@@ -85,4 +85,4 @@ export interface CostMapDefSwap extends CostMapDefBase {
85
85
  swap: number;
86
86
  }
87
87
  export {};
88
- //# sourceMappingURL=suggestionCostsDef.d.ts.map
88
+ //# sourceMappingURL=suggestionCostsDef.d.mts.map
@@ -1,2 +1 @@
1
1
  export {};
2
- //# sourceMappingURL=suggestionCostsDef.js.map
@@ -0,0 +1 @@
1
+ export {};
@@ -6,4 +6,4 @@ type SerializeArray<T extends Array<any>> = T extends [infer R] ? [Serialize<R>]
6
6
  type Primitives<T> = Extract<T, number | string | null | boolean>;
7
7
  export type Serializable = number | string | boolean | null | object;
8
8
  export {};
9
- //# sourceMappingURL=types.d.ts.map
9
+ //# sourceMappingURL=types.d.mts.map
package/dist/esm/types.js CHANGED
@@ -1,4 +1,3 @@
1
1
  /* eslint-disable @typescript-eslint/no-explicit-any */
2
2
  /* eslint-disable @typescript-eslint/ban-types */
3
3
  export {};
4
- //# sourceMappingURL=types.js.map
@@ -0,0 +1,3 @@
1
+ /* eslint-disable @typescript-eslint/no-explicit-any */
2
+ /* eslint-disable @typescript-eslint/ban-types */
3
+ export {};
package/package.json CHANGED
@@ -3,58 +3,53 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "6.26.3",
6
+ "version": "6.28.0",
7
7
  "description": "Types for cspell and cspell-lib",
8
- "type": "module",
9
- "main": "./dist/cjs/index.cjs",
10
- "module": "./dist/esm/index.js",
8
+ "type": "commonjs",
9
+ "main": "./dist/cjs/index.js",
10
+ "module": "./dist/esm/index.mjs",
11
11
  "exports": {
12
12
  ".": {
13
- "import": "./dist/esm/index.js",
14
- "types": "./dist/esm/index.d.ts",
15
- "require": "./dist/cjs/index.cjs"
13
+ "import": "./dist/esm/index.mjs",
14
+ "require": "./dist/cjs/index.js"
16
15
  },
17
16
  "./Parser": {
18
- "import": "./dist/esm/Parser/index.js",
19
- "types": "./dist/esm/Parser/index.d.ts",
20
- "require": "./dist/cjs/Parser/index.cjs"
17
+ "import": "./dist/esm/Parser/index.mjs",
18
+ "require": "./dist/cjs/Parser/index.js"
21
19
  },
22
20
  "./cspell.schema.json": {
23
21
  "import": "./cspell.schema.json",
24
22
  "require": "./cspell.schema.json"
25
23
  },
26
- "./ajv.config": {
27
- "import": "./ajv.config.cjs",
28
- "require": "./ajv.config.cjs"
29
- },
30
24
  "./ajv.config.js": {
31
- "require": "./ajv.config.cjs"
25
+ "require": "./ajv.config.js"
32
26
  }
33
27
  },
34
28
  "types": "index.d.ts",
35
29
  "typesVersions": {
36
30
  "*": {
31
+ "*.d.mts": [
32
+ "dist/esm/*.d.mts"
33
+ ],
37
34
  "index.d.ts": [
38
- "dist/esm/index.d.ts"
35
+ "dist/cjs/index.d.ts"
39
36
  ],
40
37
  "dist/esm/index.d.ts": [
41
38
  "dist/esm/index.d.ts"
42
39
  ],
43
40
  "Parser": [
44
- "dist/esm/Parser/index.d.ts"
41
+ "dist/cjs/Parser/index.d.ts"
45
42
  ],
46
43
  "*": [
47
- "dist/esm/*.d.ts",
48
- "dist/esm/*/index.d.ts"
44
+ "dist/cjs/*.d.ts",
45
+ "dist/cjs/*/index.d.ts"
49
46
  ]
50
47
  }
51
48
  },
52
49
  "scripts": {
53
50
  "clean": "shx rm -rf dist coverage .tsbuildinfo",
54
- "build": "pnpm build:cjs && pnpm build:esm && pnpm run build-schema",
55
- "build:cjs": "rollup -c rollup.config.mjs",
56
- "build:esm": "tsc -p tsconfig.esm.json",
57
- "build:dev": "tsc -p tsconfig.dev.json",
51
+ "build": "pnpm build:tsc && pnpm run build-schema",
52
+ "build:tsc": "tsc -b tsconfig.json && ts2mjs dist/esm",
58
53
  "build-schema": "ts-json-schema-generator --no-top-ref --path src/CSpellSettingsDef.ts --type CSpellSettings --validation-keywords markdownDescription --validation-keywords scope --validation-keywords deprecated --validation-keywords deprecationMessage -o ./cspell.schema.json && shx cp ./cspell.schema.json ../..",
59
54
  "clean-build": "pnpm run clean && pnpm run build",
60
55
  "coverage": "pnpm coverage:vitest && pnpm coverage:fix",
@@ -62,7 +57,7 @@
62
57
  "coverage:fix": "nyc report --temp-dir \"$(pwd)/coverage\" --reporter lcov --report-dir \"$(pwd)/coverage\" --cwd ../..",
63
58
  "test": "pnpm test:unit && pnpm test:schema",
64
59
  "test:unit": "vitest run",
65
- "test:schema": "ajv -s ./cspell.schema.json -d \"cspell.test.{json,yaml}\" -c ./ajv.config.cjs",
60
+ "test:schema": "ajv -s ./cspell.schema.json -d \"cspell.test.{json,yaml}\" -c ./ajv.config.js",
66
61
  "prepare": "echo Skip Building Types"
67
62
  },
68
63
  "repository": {
@@ -71,10 +66,13 @@
71
66
  },
72
67
  "files": [
73
68
  "dist",
74
- "ajv.config.cjs",
69
+ "ajv.config.js",
75
70
  "cspell.schema.json",
71
+ "!**/*.tsbuildInfo",
76
72
  "!**/__mocks__",
77
73
  "!**/*.test.*",
74
+ "!**/test/**",
75
+ "!**/test.*.*",
78
76
  "!**/*.spec.*",
79
77
  "!**/*.map"
80
78
  ],
@@ -89,10 +87,8 @@
89
87
  },
90
88
  "devDependencies": {
91
89
  "ajv-cli": "^5.0.0",
92
- "jest": "^29.4.3",
93
90
  "ts-json-schema-generator": "^1.2.0",
94
- "typescript": "^4.9.5",
95
- "vitest": "^0.28.5"
91
+ "typescript": "^4.9.5"
96
92
  },
97
- "gitHead": "b8c6e0a31c58ad61b4814f92dccfe3df4999ff81"
93
+ "gitHead": "1c314413e76908e5fbf61fd2555726112b177c0e"
98
94
  }
@@ -1,3 +0,0 @@
1
- 'use strict';
2
-
3
- //# sourceMappingURL=index.cjs.map
File without changes