@volar/kit 1.3.0-alpha.2 → 1.4.0-alpha.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.
- package/out/index.js +4 -4
- package/package.json +3 -4
package/out/index.js
CHANGED
|
@@ -54,7 +54,7 @@ function create(tsConfigPath, config, extraFileExtensions = [], ts = require('ty
|
|
|
54
54
|
const document = service.context.getTextDocument(uri);
|
|
55
55
|
let diagnostics = [];
|
|
56
56
|
if (document) {
|
|
57
|
-
diagnostics = yield service.doValidation(uri);
|
|
57
|
+
diagnostics = yield service.doValidation(uri, language_service_1.CancellationToken.None, 'all');
|
|
58
58
|
diagnostics = diagnostics.filter(diagnostic => { var _a; return ((_a = diagnostic.severity) !== null && _a !== void 0 ? _a : 1) <= severity; });
|
|
59
59
|
const errors = diagnostics.map(diagnostic => ({
|
|
60
60
|
category: diagnostic.severity === language_service_1.DiagnosticSeverity.Error ? ts.DiagnosticCategory.Error : ts.DiagnosticCategory.Warning,
|
|
@@ -79,10 +79,10 @@ function create(tsConfigPath, config, extraFileExtensions = [], ts = require('ty
|
|
|
79
79
|
const document = service.context.getTextDocument(uri);
|
|
80
80
|
if (document) {
|
|
81
81
|
const range = { start: document.positionAt(0), end: document.positionAt(document.getText().length) };
|
|
82
|
-
const codeActions = yield service.doCodeActions(uri, range, { diagnostics, only: ['source.fixAll'], triggerKind: language_service_1.CodeActionTriggerKind.Invoked });
|
|
82
|
+
const codeActions = yield service.doCodeActions(uri, range, { diagnostics, only: ['source.fixAll'], triggerKind: language_service_1.CodeActionTriggerKind.Invoked }, language_service_1.CancellationToken.None);
|
|
83
83
|
if (codeActions) {
|
|
84
84
|
for (let i = 0; i < codeActions.length; i++) {
|
|
85
|
-
codeActions[i] = yield service.doCodeActionResolve(codeActions[i]);
|
|
85
|
+
codeActions[i] = yield service.doCodeActionResolve(codeActions[i], language_service_1.CancellationToken.None);
|
|
86
86
|
}
|
|
87
87
|
const edits = codeActions.map(codeAction => codeAction.edit).filter((edit) => !!edit);
|
|
88
88
|
if (edits.length) {
|
|
@@ -114,7 +114,7 @@ function create(tsConfigPath, config, extraFileExtensions = [], ts = require('ty
|
|
|
114
114
|
const uri = fileNameToUri(fileName);
|
|
115
115
|
const document = service.context.getTextDocument(uri);
|
|
116
116
|
if (document) {
|
|
117
|
-
const edits = yield service.format(uri, options);
|
|
117
|
+
const edits = yield service.format(uri, options, undefined, undefined, language_service_1.CancellationToken.None);
|
|
118
118
|
if (edits === null || edits === void 0 ? void 0 : edits.length) {
|
|
119
119
|
const newString = vscode_languageserver_textdocument_1.TextDocument.applyEdits(document, edits);
|
|
120
120
|
writeFile(fileName, newString);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@volar/kit",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0-alpha.0",
|
|
4
4
|
"main": "out/index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"files": [
|
|
@@ -13,13 +13,12 @@
|
|
|
13
13
|
"directory": "packages/kit"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@volar/language-service": "1.
|
|
17
|
-
"@volar/shared": "1.3.0-alpha.2",
|
|
16
|
+
"@volar/language-service": "1.4.0-alpha.0",
|
|
18
17
|
"vscode-languageserver-textdocument": "^1.0.8",
|
|
19
18
|
"vscode-uri": "^3.0.7"
|
|
20
19
|
},
|
|
21
20
|
"peerDependencies": {
|
|
22
21
|
"typescript": "*"
|
|
23
22
|
},
|
|
24
|
-
"gitHead": "
|
|
23
|
+
"gitHead": "2607410cae341cf802b446062d446ad497be2057"
|
|
25
24
|
}
|