Skip to content

Commit

Permalink
dev: Update schema generator (#1957)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason3S committed Nov 5, 2021
1 parent 7d4f3b3 commit b8502b6
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 38 deletions.
9 changes: 7 additions & 2 deletions cspell.schema.json
Expand Up @@ -31,6 +31,7 @@
},
"DictionaryDefinitionAlternate": {
"additionalProperties": false,
"deprecated": true,
"deprecationMessage": "Use `DictionaryDefinitionPreferred`",
"description": "Only for legacy dictionary definitions",
"properties": {
Expand All @@ -40,6 +41,7 @@
},
"file": {
"$ref": "#/definitions/DictionaryPath",
"deprecated": true,
"deprecationMessage": "Use `path` instead.",
"description": "Path to the file, only for legacy dictionary definitions"
},
Expand Down Expand Up @@ -332,6 +334,7 @@
"type": "array"
}
],
"deprecated": true,
"deprecationMessage": "Use `locale` instead",
"description": "Deprecated - The locale filter, matches against the language. This can be a comma separated list. \"*\" will match all locales."
},
Expand Down Expand Up @@ -690,8 +693,7 @@
{
"type": "string"
},
{
}
{}
],
"maxItems": 2,
"minItems": 2,
Expand Down Expand Up @@ -721,6 +723,7 @@
},
"VersionLegacy": {
"const": "0.1",
"deprecated": true,
"deprecationMessage": "Use `0.2`",
"description": "Legacy Configuration File Versions",
"type": "string"
Expand Down Expand Up @@ -942,10 +945,12 @@
"type": "array"
},
"showStatus": {
"deprecated": true,
"description": "Show status",
"type": "boolean"
},
"spellCheckDelayMs": {
"deprecated": true,
"description": "Delay in ms after a document has changed before checking it for spelling errors.",
"type": "number"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/cspell-lib/src/Settings/CSpellSettingsServer.ts
Expand Up @@ -350,7 +350,7 @@ export function readRawSettings(filename: string, relativeTo?: string): CSpellSe
*
* @param filenames - settings files to read
* @returns combined configuration
* @deprecated
* @deprecated true
*/
export function readSettingsFiles(filenames: string[]): CSpellSettings {
return filenames.map((filename) => readSettings(filename)).reduce((a, b) => mergeSettings(a, b), defaultSettings);
Expand Down
2 changes: 1 addition & 1 deletion packages/cspell-trie-lib/src/lib/util.ts
Expand Up @@ -211,7 +211,7 @@ export const normalizeWord = (text: string): string => text.normalize();
* converts text to lower case and removes any accents.
* @param text - text to convert
* @returns lowercase word without accents
* @deprecated
* @deprecated true
*/
export const normalizeWordToLowercase = (text: string): string =>
text.toLowerCase().normalize('NFD').replace(/\p{M}/gu, '');
Expand Down
9 changes: 7 additions & 2 deletions packages/cspell-types/cspell.schema.json
Expand Up @@ -31,6 +31,7 @@
},
"DictionaryDefinitionAlternate": {
"additionalProperties": false,
"deprecated": true,
"deprecationMessage": "Use `DictionaryDefinitionPreferred`",
"description": "Only for legacy dictionary definitions",
"properties": {
Expand All @@ -40,6 +41,7 @@
},
"file": {
"$ref": "#/definitions/DictionaryPath",
"deprecated": true,
"deprecationMessage": "Use `path` instead.",
"description": "Path to the file, only for legacy dictionary definitions"
},
Expand Down Expand Up @@ -332,6 +334,7 @@
"type": "array"
}
],
"deprecated": true,
"deprecationMessage": "Use `locale` instead",
"description": "Deprecated - The locale filter, matches against the language. This can be a comma separated list. \"*\" will match all locales."
},
Expand Down Expand Up @@ -690,8 +693,7 @@
{
"type": "string"
},
{
}
{}
],
"maxItems": 2,
"minItems": 2,
Expand Down Expand Up @@ -721,6 +723,7 @@
},
"VersionLegacy": {
"const": "0.1",
"deprecated": true,
"deprecationMessage": "Use `0.2`",
"description": "Legacy Configuration File Versions",
"type": "string"
Expand Down Expand Up @@ -942,10 +945,12 @@
"type": "array"
},
"showStatus": {
"deprecated": true,
"description": "Show status",
"type": "boolean"
},
"spellCheckDelayMs": {
"deprecated": true,
"description": "Delay in ms after a document has changed before checking it for spelling errors.",
"type": "number"
},
Expand Down
30 changes: 10 additions & 20 deletions packages/cspell-types/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/cspell-types/package.json
Expand Up @@ -51,7 +51,7 @@
"ajv-cli": "^5.0.0",
"jest": "^27.3.1",
"rimraf": "^3.0.2",
"ts-json-schema-generator": "^0.96.0",
"ts-json-schema-generator": "^0.97.0",
"typedoc": "^0.22.7",
"typedoc-plugin-markdown": "^3.11.3",
"typescript": "^4.4.4"
Expand Down
22 changes: 11 additions & 11 deletions packages/cspell-types/src/CSpellSettingsDef.ts
Expand Up @@ -238,18 +238,18 @@ export interface WorkspaceTrustSettings {
/**
* VS Code Spell Checker Settings
* To be Removed
* @deprecated
* @deprecated true
*/
export interface LegacySettings {
/**
* Show status
* @deprecated
* @deprecated true
*/
showStatus?: boolean;

/**
* Delay in ms after a document has changed before checking it for spelling errors.
* @deprecated
* @deprecated true
*/
spellCheckDelayMs?: number;
/************************/
Expand Down Expand Up @@ -403,7 +403,7 @@ export interface DictionaryDefinitionPreferred extends DictionaryDefinitionBase

/**
* Only for legacy dictionary definitions
* @deprecated
* @deprecated true
* @deprecationMessage Use `path` instead.
* @hidden
*/
Expand All @@ -412,7 +412,7 @@ export interface DictionaryDefinitionPreferred extends DictionaryDefinitionBase

/**
* Only for legacy dictionary definitions
* @deprecated
* @deprecated true
* @deprecationMessage Use `DictionaryDefinitionPreferred`
*/
export interface DictionaryDefinitionAlternate extends DictionaryDefinitionBase {
Expand All @@ -421,22 +421,22 @@ export interface DictionaryDefinitionAlternate extends DictionaryDefinitionBase

/**
* Path to the file, only for legacy dictionary definitions
* @deprecated
* @deprecated true
* @deprecationMessage Use `path` instead.
*/
file: DictionaryPath;
}

/**
* @deprecated
* @deprecated true
* @hidden
*/
export interface DictionaryDefinitionLegacy extends DictionaryDefinitionBase {
/** Path to the file, if undefined the path to the extension dictionaries is assumed */
path?: FsPath;
/**
* File name
* @deprecated
* @deprecated true
* @deprecationMessage Use path instead.
*/
file: FsPath;
Expand Down Expand Up @@ -498,7 +498,7 @@ export interface LanguageSettingFilterFieldsDeprecated {
languageId: LanguageId | LanguageIdSingle[];
/**
* Deprecated - The locale filter, matches against the language. This can be a comma separated list. "*" will match all locales.
* @deprecated
* @deprecated true
* @deprecationMessage Use `locale` instead
*/
local?: LocaleId | LocaleId[];
Expand Down Expand Up @@ -598,15 +598,15 @@ export type VersionLatest = '0.2';

/**
* Legacy Configuration File Versions
* @deprecated
* @deprecated true
* @deprecationMessage Use `0.2`
*/
export type VersionLegacy = '0.1';

export type Version = VersionLatest | VersionLegacy;

/**
* @deprecated
* @deprecated true
* @deprecationMessage Use LocaleId instead
*/
export type LocalId = LocaleId;
Expand Down

0 comments on commit b8502b6

Please sign in to comment.