Skip to content

Commit

Permalink
fix: get the latest cspell library and schema (#440)
Browse files Browse the repository at this point in the history
* fix: get the latest cspell library and schema

* Update documentSettings.ts

* Update cspell library
  • Loading branch information
Jason3S authored Feb 23, 2020
1 parent 74c19bb commit 4bcff60
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 24 deletions.
16 changes: 8 additions & 8 deletions packages/_server/npm-shrinkwrap.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/_server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"dependencies": {
"comment-json": "^1.1.3",
"cspell-glob": "^0.1.17",
"cspell-lib": "^4.1.18",
"cspell-lib": "^4.1.21",
"fs-extra": "^8.1.0",
"gensequence": "^3.0.3",
"iconv-lite": "^0.4.24",
Expand Down
13 changes: 3 additions & 10 deletions packages/_server/src/documentSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
Pattern,
Settings,
CSpellSettings,
BaseSetting
BaseSetting,
} from 'cspell-lib';
import * as path from 'path';
import * as fs from 'fs-extra';
Expand Down Expand Up @@ -481,15 +481,8 @@ function resolveDictionaryDefinitions(
): CSpellUserSettings['dictionaryDefinitions'] {
if (!dictDefs) return dictDefs;

function resolve(path: string) {
if (!path) return path;
return resolver.resolveFile(path);
}

return dictDefs.map(def => {
const path = resolve(def.path!);
return {...def, path};
});
return dictDefs
.map(def => def.path ? {...def, path: resolver.resolveFile(def.path)} : def);
}

function resolveLanguageSettings(
Expand Down
10 changes: 5 additions & 5 deletions packages/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,11 @@
"jsonValidation": [
{
"fileMatch": "cSpell.json",
"url": "https://raw.githubusercontent.com/streetsidesoftware/cspell/cspell%404.0.50/cspell.schema.json"
"url": "https://raw.githubusercontent.com/streetsidesoftware/cspell/cspell%404.0.53/cspell.schema.json"
},
{
"fileMatch": "cspell*.json",
"url": "https://raw.githubusercontent.com/streetsidesoftware/cspell/cspell%404.0.50/cspell.schema.json"
"url": "https://raw.githubusercontent.com/streetsidesoftware/cspell/cspell%404.0.53/cspell.schema.json"
}
],
"configuration": {
Expand Down Expand Up @@ -387,7 +387,7 @@
"scope": "resource",
"description": "Define settings on a per programming language basis.",
"items": {
"$ref": "https://raw.githubusercontent.com/streetsidesoftware/cspell/cspell%404.0.50/cspell.schema.json#/definitions/LanguageSetting"
"$ref": "https://raw.githubusercontent.com/streetsidesoftware/cspell/cspell%404.0.53/cspell.schema.json#/definitions/LanguageSetting"
}
},
"cSpell.dictionaries": {
Expand All @@ -404,7 +404,7 @@
"scope": "resource",
"description": "A List of Dictionary Definitions.",
"items": {
"$ref": "https://raw.githubusercontent.com/streetsidesoftware/cspell/cspell%404.0.50/cspell.schema.json#/definitions/DictionaryDefinition"
"$ref": "https://raw.githubusercontent.com/streetsidesoftware/cspell/cspell%404.0.53/cspell.schema.json#/definitions/DictionaryDefinition"
}
},
"cSpell.showCommandsInEditorContextMenu": {
Expand Down Expand Up @@ -448,7 +448,7 @@
"type": "array",
"description": "Overrides to apply based upon the file path.",
"items": {
"$ref": "https://raw.githubusercontent.com/streetsidesoftware/cspell/cspell%404.0.50/cspell.schema.json#/definitions/OverrideSettings"
"$ref": "https://raw.githubusercontent.com/streetsidesoftware/cspell/cspell%404.0.53/cspell.schema.json#/definitions/OverrideSettings"
}
}
}
Expand Down

0 comments on commit 4bcff60

Please sign in to comment.