New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@volar/language-server

Package Overview
Dependencies
Maintainers
1
Versions
238
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@volar/language-server - npm Package Compare versions

Comparing version 1.2.0-alpha.7 to 1.2.0-alpha.8

142

out/common/features/languageFeatures.js

@@ -23,51 +23,51 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

connection.onDocumentFormatting((params, token) => __awaiter(this, void 0, void 0, function* () {
return worker(params.textDocument.uri, token, vueLs => {
return vueLs.format(params.textDocument.uri, params.options);
return worker(params.textDocument.uri, token, service => {
return service.format(params.textDocument.uri, params.options);
});
}));
connection.onDocumentRangeFormatting((params, token) => __awaiter(this, void 0, void 0, function* () {
return worker(params.textDocument.uri, token, vueLs => {
return vueLs.format(params.textDocument.uri, params.options, params.range);
return worker(params.textDocument.uri, token, service => {
return service.format(params.textDocument.uri, params.options, params.range);
});
}));
connection.onDocumentOnTypeFormatting((params, token) => __awaiter(this, void 0, void 0, function* () {
return worker(params.textDocument.uri, token, vueLs => {
return vueLs.format(params.textDocument.uri, params.options, undefined, params);
return worker(params.textDocument.uri, token, service => {
return service.format(params.textDocument.uri, params.options, undefined, params);
});
}));
connection.onSelectionRanges((params, token) => __awaiter(this, void 0, void 0, function* () {
return worker(params.textDocument.uri, token, vueLs => {
return vueLs.getSelectionRanges(params.textDocument.uri, params.positions);
return worker(params.textDocument.uri, token, service => {
return service.getSelectionRanges(params.textDocument.uri, params.positions);
});
}));
connection.onFoldingRanges((params, token) => __awaiter(this, void 0, void 0, function* () {
return worker(params.textDocument.uri, token, vueLs => {
return vueLs.getFoldingRanges(params.textDocument.uri);
return worker(params.textDocument.uri, token, service => {
return service.getFoldingRanges(params.textDocument.uri);
});
}));
connection.languages.onLinkedEditingRange((params, token) => __awaiter(this, void 0, void 0, function* () {
return worker(params.textDocument.uri, token, vueLs => {
return vueLs.findLinkedEditingRanges(params.textDocument.uri, params.position);
return worker(params.textDocument.uri, token, service => {
return service.findLinkedEditingRanges(params.textDocument.uri, params.position);
});
}));
connection.onDocumentSymbol((params, token) => __awaiter(this, void 0, void 0, function* () {
return worker(params.textDocument.uri, token, vueLs => {
return vueLs.findDocumentSymbols(params.textDocument.uri);
return worker(params.textDocument.uri, token, service => {
return service.findDocumentSymbols(params.textDocument.uri);
});
}));
connection.onDocumentColor((params, token) => __awaiter(this, void 0, void 0, function* () {
return worker(params.textDocument.uri, token, vueLs => {
return vueLs.findDocumentColors(params.textDocument.uri);
return worker(params.textDocument.uri, token, service => {
return service.findDocumentColors(params.textDocument.uri);
});
}));
connection.onColorPresentation((params, token) => __awaiter(this, void 0, void 0, function* () {
return worker(params.textDocument.uri, token, vueLs => {
return vueLs.getColorPresentations(params.textDocument.uri, params.color, params.range);
return worker(params.textDocument.uri, token, service => {
return service.getColorPresentations(params.textDocument.uri, params.color, params.range);
});
}));
connection.onCompletion((params, token) => __awaiter(this, void 0, void 0, function* () {
return worker(params.textDocument.uri, token, (vueLs) => __awaiter(this, void 0, void 0, function* () {
return worker(params.textDocument.uri, token, (service) => __awaiter(this, void 0, void 0, function* () {
lastCompleteUri = params.textDocument.uri;
lastCompleteLs = vueLs;
const list = yield vueLs.doComplete(params.textDocument.uri, params.position, params.context);
lastCompleteLs = service;
const list = yield service.doComplete(params.textDocument.uri, params.position, params.context);
if (list) {

@@ -89,25 +89,25 @@ for (const item of list.items) {

connection.onHover((params, token) => __awaiter(this, void 0, void 0, function* () {
return worker(params.textDocument.uri, token, vueLs => {
return vueLs.doHover(params.textDocument.uri, params.position);
return worker(params.textDocument.uri, token, service => {
return service.doHover(params.textDocument.uri, params.position);
});
}));
connection.onSignatureHelp((params, token) => __awaiter(this, void 0, void 0, function* () {
return worker(params.textDocument.uri, token, vueLs => {
return vueLs.getSignatureHelp(params.textDocument.uri, params.position, params.context);
return worker(params.textDocument.uri, token, service => {
return service.getSignatureHelp(params.textDocument.uri, params.position, params.context);
});
}));
connection.onPrepareRename((params, token) => __awaiter(this, void 0, void 0, function* () {
return worker(params.textDocument.uri, token, vueLs => {
return vueLs.prepareRename(params.textDocument.uri, params.position);
return worker(params.textDocument.uri, token, service => {
return service.prepareRename(params.textDocument.uri, params.position);
});
}));
connection.onRenameRequest((params, token) => __awaiter(this, void 0, void 0, function* () {
return worker(params.textDocument.uri, token, vueLs => {
return vueLs.doRename(params.textDocument.uri, params.position, params.newName);
return worker(params.textDocument.uri, token, service => {
return service.doRename(params.textDocument.uri, params.position, params.newName);
});
}));
connection.onCodeLens((params, token) => __awaiter(this, void 0, void 0, function* () {
return worker(params.textDocument.uri, token, (vueLs) => __awaiter(this, void 0, void 0, function* () {
lastCodeLensLs = vueLs;
return vueLs.doCodeLens(params.textDocument.uri);
return worker(params.textDocument.uri, token, (service) => __awaiter(this, void 0, void 0, function* () {
lastCodeLensLs = service;
return service.doCodeLens(params.textDocument.uri);
}));

@@ -125,4 +125,4 @@ }));

}
return worker(args[0], token, vueLs => {
return vueLs.doExecuteCommand(params.command, args, {
return worker(args[0], token, service => {
return service.doExecuteCommand(params.command, args, {
token,

@@ -137,6 +137,6 @@ workDoneProgress,

connection.onCodeAction((params, token) => __awaiter(this, void 0, void 0, function* () {
return worker(params.textDocument.uri, token, (vueLs) => __awaiter(this, void 0, void 0, function* () {
return worker(params.textDocument.uri, token, (service) => __awaiter(this, void 0, void 0, function* () {
var _b, _c, _d;
lastCodeActionLs = vueLs;
let codeActions = (_b = yield vueLs.doCodeActions(params.textDocument.uri, params.range, params.context)) !== null && _b !== void 0 ? _b : [];
lastCodeActionLs = service;
let codeActions = (_b = yield service.doCodeActions(params.textDocument.uri, params.range, params.context)) !== null && _b !== void 0 ? _b : [];
for (const codeAction of codeActions) {

@@ -161,34 +161,34 @@ if (codeAction.data && typeof codeAction.data === 'object') {

connection.onReferences((params, token) => __awaiter(this, void 0, void 0, function* () {
return worker(params.textDocument.uri, token, vueLs => {
return vueLs.findReferences(params.textDocument.uri, params.position);
return worker(params.textDocument.uri, token, service => {
return service.findReferences(params.textDocument.uri, params.position);
});
}));
connection.onRequest(protocol_1.FindFileReferenceRequest.type, (params, token) => __awaiter(this, void 0, void 0, function* () {
return worker(params.textDocument.uri, token, vueLs => {
return vueLs.findFileReferences(params.textDocument.uri);
return worker(params.textDocument.uri, token, service => {
return service.findFileReferences(params.textDocument.uri);
});
}));
connection.onImplementation((params, token) => __awaiter(this, void 0, void 0, function* () {
return worker(params.textDocument.uri, token, vueLs => {
return vueLs.findImplementations(params.textDocument.uri, params.position);
return worker(params.textDocument.uri, token, service => {
return service.findImplementations(params.textDocument.uri, params.position);
});
}));
connection.onDefinition((params, token) => __awaiter(this, void 0, void 0, function* () {
return worker(params.textDocument.uri, token, vueLs => {
return vueLs.findDefinition(params.textDocument.uri, params.position);
return worker(params.textDocument.uri, token, service => {
return service.findDefinition(params.textDocument.uri, params.position);
});
}));
connection.onTypeDefinition((params, token) => __awaiter(this, void 0, void 0, function* () {
return worker(params.textDocument.uri, token, vueLs => {
return vueLs.findTypeDefinition(params.textDocument.uri, params.position);
return worker(params.textDocument.uri, token, service => {
return service.findTypeDefinition(params.textDocument.uri, params.position);
});
}));
connection.onDocumentHighlight((params, token) => __awaiter(this, void 0, void 0, function* () {
return worker(params.textDocument.uri, token, vueLs => {
return vueLs.findDocumentHighlights(params.textDocument.uri, params.position);
return worker(params.textDocument.uri, token, service => {
return service.findDocumentHighlights(params.textDocument.uri, params.position);
});
}));
connection.onDocumentLinks((params, token) => __awaiter(this, void 0, void 0, function* () {
return worker(params.textDocument.uri, token, vueLs => {
return vueLs.findDocumentLinks(params.textDocument.uri);
return worker(params.textDocument.uri, token, service => {
return service.findDocumentLinks(params.textDocument.uri);
});

@@ -205,4 +205,4 @@ }));

return;
const vueLs = (yield project).getLanguageService();
results = results.concat(yield vueLs.findWorkspaceSymbols(params.query));
const service = (yield project).getLanguageService();
results = results.concat(yield service.findWorkspaceSymbols(params.query));
}

@@ -214,5 +214,5 @@ }

var _f;
return (_f = yield worker(params.textDocument.uri, token, (vueLs) => __awaiter(this, void 0, void 0, function* () {
lastCallHierarchyLs = vueLs;
return vueLs.callHierarchy.doPrepare(params.textDocument.uri, params.position);
return (_f = yield worker(params.textDocument.uri, token, (service) => __awaiter(this, void 0, void 0, function* () {
lastCallHierarchyLs = service;
return service.callHierarchy.doPrepare(params.textDocument.uri, params.position);
}))) !== null && _f !== void 0 ? _f : [];

@@ -231,5 +231,5 @@ }));

yield shared.sleep(200);
return (_j = yield worker(params.textDocument.uri, token, (vueLs) => __awaiter(this, void 0, void 0, function* () {
return (_j = yield worker(params.textDocument.uri, token, (service) => __awaiter(this, void 0, void 0, function* () {
var _k;
const result = (_k = yield (vueLs === null || vueLs === void 0 ? void 0 : vueLs.getSemanticTokens(params.textDocument.uri, undefined, semanticTokensLegend, token, tokens => resultProgress === null || resultProgress === void 0 ? void 0 : resultProgress.report(buildTokens(tokens))))) !== null && _k !== void 0 ? _k : [];
const result = (_k = yield (service === null || service === void 0 ? void 0 : service.getSemanticTokens(params.textDocument.uri, undefined, semanticTokensLegend, token, tokens => resultProgress === null || resultProgress === void 0 ? void 0 : resultProgress.report(buildTokens(tokens))))) !== null && _k !== void 0 ? _k : [];
return buildTokens(result);

@@ -241,5 +241,5 @@ }))) !== null && _j !== void 0 ? _j : buildTokens([]);

yield shared.sleep(200);
return (_l = yield worker(params.textDocument.uri, token, (vueLs) => __awaiter(this, void 0, void 0, function* () {
return (_l = yield worker(params.textDocument.uri, token, (service) => __awaiter(this, void 0, void 0, function* () {
var _m;
const result = (_m = yield (vueLs === null || vueLs === void 0 ? void 0 : vueLs.getSemanticTokens(params.textDocument.uri, params.range, semanticTokensLegend, token, tokens => resultProgress === null || resultProgress === void 0 ? void 0 : resultProgress.report(buildTokens(tokens))))) !== null && _m !== void 0 ? _m : [];
const result = (_m = yield (service === null || service === void 0 ? void 0 : service.getSemanticTokens(params.textDocument.uri, params.range, semanticTokensLegend, token, tokens => resultProgress === null || resultProgress === void 0 ? void 0 : resultProgress.report(buildTokens(tokens))))) !== null && _m !== void 0 ? _m : [];
return buildTokens(result);

@@ -249,5 +249,5 @@ }))) !== null && _l !== void 0 ? _l : buildTokens([]);

connection.languages.diagnostics.on((params, token, _workDoneProgressReporter, resultProgressReporter) => __awaiter(this, void 0, void 0, function* () {
const result = yield worker(params.textDocument.uri, token, vueLs => {
const result = yield worker(params.textDocument.uri, token, service => {
const tsToken = cancelHost.createCancellationToken(token);
return vueLs.doValidation(params.textDocument.uri, tsToken, errors => {
return service.doValidation(params.textDocument.uri, tsToken, errors => {
// resultProgressReporter is undefined in vscode

@@ -270,4 +270,4 @@ resultProgressReporter === null || resultProgressReporter === void 0 ? void 0 : resultProgressReporter.report({

connection.languages.inlayHint.on((params, token) => __awaiter(this, void 0, void 0, function* () {
return worker(params.textDocument.uri, token, (vueLs) => __awaiter(this, void 0, void 0, function* () {
return vueLs.getInlayHints(params.textDocument.uri, params.range);
return worker(params.textDocument.uri, token, (service) => __awaiter(this, void 0, void 0, function* () {
return service.getInlayHints(params.textDocument.uri, params.range);
}));

@@ -283,5 +283,5 @@ }));

var _o;
return (_o = yield worker(file.oldUri, token, vueLs => {
return (_o = yield worker(file.oldUri, token, service => {
var _a;
return (_a = vueLs.getEditsForFileRename(file.oldUri, file.newUri)) !== null && _a !== void 0 ? _a : null;
return (_a = service.getEditsForFileRename(file.oldUri, file.newUri)) !== null && _a !== void 0 ? _a : null;
})) !== null && _o !== void 0 ? _o : null;

@@ -297,4 +297,4 @@ })));

connection.onRequest(protocol_1.AutoInsertRequest.type, (params, token) => __awaiter(this, void 0, void 0, function* () {
return worker(params.textDocument.uri, token, vueLs => {
return vueLs.doAutoInsert(params.textDocument.uri, params.position, params.options);
return worker(params.textDocument.uri, token, service => {
return service.doAutoInsert(params.textDocument.uri, params.position, params.options);
});

@@ -309,6 +309,6 @@ }));

}
const vueLs = yield getLanguageService(uri);
if (vueLs) {
const service = yield getLanguageService(uri);
if (service) {
try { // handle TS cancel throw
const result = yield cb(vueLs);
const result = yield cb(service);
if (token.isCancellationRequested) {

@@ -315,0 +315,0 @@ resolve(undefined);

{
"name": "@volar/language-server",
"version": "1.2.0-alpha.7",
"version": "1.2.0-alpha.8",
"main": "out/index.js",

@@ -20,5 +20,5 @@ "license": "MIT",

"dependencies": {
"@volar/language-core": "1.2.0-alpha.7",
"@volar/language-service": "1.2.0-alpha.7",
"@volar/shared": "1.2.0-alpha.7",
"@volar/language-core": "1.2.0-alpha.8",
"@volar/language-service": "1.2.0-alpha.8",
"@volar/shared": "1.2.0-alpha.8",
"@vscode/l10n": "^0.0.10",

@@ -33,3 +33,3 @@ "request-light": "^0.6.0",

},
"gitHead": "5811cdb90f68a2db0166aafadcce3f953156c9a3"
"gitHead": "9437b4560f35d2a153a9e2ae0dd0f64285bbb3b3"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc