@volar/language-service
Advanced tools
Comparing version 1.0.0-alpha.5 to 1.0.0-beta.0
@@ -7,3 +7,3 @@ import { DocumentServiceRuntimeContext, PluginContext } from './types'; | ||
import type * as _0 from 'vscode-languageserver-protocol'; | ||
export declare type DocumentService = ReturnType<typeof createDocumentService>; | ||
export type DocumentService = ReturnType<typeof createDocumentService>; | ||
export declare function createDocumentServiceContext(options: { | ||
@@ -10,0 +10,0 @@ ts: typeof import('typescript/lib/tsserverlibrary'); |
@@ -6,3 +6,3 @@ import { createEmbeddedLanguageServiceHost, LanguageServiceHost } from '@volar/language-core'; | ||
import type * as _0 from 'vscode-languageserver-protocol'; | ||
export declare type LanguageService = ReturnType<typeof createLanguageService>; | ||
export type LanguageService = ReturnType<typeof createLanguageService>; | ||
export declare function createLanguageServiceContext(options: { | ||
@@ -9,0 +9,0 @@ host: LanguageServiceHost; |
@@ -7,4 +7,4 @@ import { DocumentRegistry, EmbeddedFileSourceMap, SourceFile, PositionCapabilities, Teleport, TeleportMappingData, TeleportCapabilities, EmbeddedFile } from '@volar/language-core'; | ||
import { URI } from 'vscode-uri'; | ||
export declare type SourceFileDocuments = ReturnType<typeof parseSourceFileDocuments>; | ||
export declare type SourceFileDocument = ReturnType<typeof parseSourceFileDocument>; | ||
export type SourceFileDocuments = ReturnType<typeof parseSourceFileDocuments>; | ||
export type SourceFileDocument = ReturnType<typeof parseSourceFileDocument>; | ||
export declare class SourceMap<Data = undefined> { | ||
@@ -11,0 +11,0 @@ sourceDocument: TextDocument; |
@@ -27,11 +27,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
return items === null || items === void 0 ? void 0 : items.map(item => { | ||
const data = { | ||
uri, | ||
originalItem: item, | ||
pluginId: context.plugins.indexOf(plugin), | ||
sourceMap: sourceMap ? { | ||
embeddedDocumentUri: sourceMap.mappedDocument.uri, | ||
} : undefined, | ||
}; | ||
return Object.assign(Object.assign({}, item), { data: data }); | ||
return Object.assign(Object.assign({}, item), { data: { | ||
uri, | ||
originalItem: item, | ||
pluginId: context.plugins.indexOf(plugin), | ||
sourceMap: sourceMap ? { | ||
embeddedDocumentUri: sourceMap.mappedDocument.uri, | ||
} : undefined, | ||
} }); | ||
}); | ||
@@ -38,0 +37,0 @@ }), (data, sourceMap) => !sourceMap ? data : data |
@@ -58,11 +58,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
return codeActions === null || codeActions === void 0 ? void 0 : codeActions.map(_codeAction => { | ||
const data = { | ||
uri, | ||
originalItem: _codeAction, | ||
pluginId: context.plugins.indexOf(plugin), | ||
sourceMap: sourceMap ? { | ||
embeddedDocumentUri: sourceMap.mappedDocument.uri, | ||
} : undefined, | ||
}; | ||
return Object.assign(Object.assign({}, _codeAction), { data: data }); | ||
return Object.assign(Object.assign({}, _codeAction), { data: { | ||
uri, | ||
originalItem: _codeAction, | ||
pluginId: context.plugins.indexOf(plugin), | ||
sourceMap: sourceMap ? { | ||
embeddedDocumentUri: sourceMap.mappedDocument.uri, | ||
} : undefined, | ||
} }); | ||
}); | ||
@@ -69,0 +68,0 @@ }), (_codeActions, sourceMap) => _codeActions.map(_codeAction => { |
@@ -23,10 +23,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
return codeLens.map(item => { | ||
const data = { | ||
uri, | ||
originalItem: item, | ||
pluginId: context.plugins.indexOf(plugin), | ||
}; | ||
const commandArgs = item.command ? [uri, context.plugins.indexOf(plugin), item.command] : undefined; | ||
const codeLens = Object.assign(Object.assign({}, item), { command: item.command && commandArgs ? Object.assign(Object.assign({}, item.command), { command: executeCommand_1.executePluginCommand, arguments: commandArgs }) : undefined, data: data }); | ||
return codeLens; | ||
return Object.assign(Object.assign({}, item), { command: item.command && commandArgs ? Object.assign(Object.assign({}, item.command), { command: executeCommand_1.executePluginCommand, arguments: commandArgs }) : undefined, data: { | ||
uri, | ||
originalItem: item, | ||
pluginId: context.plugins.indexOf(plugin), | ||
} }); | ||
}); | ||
@@ -33,0 +31,0 @@ } |
@@ -38,11 +38,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
cacheData.list = Object.assign(Object.assign({}, embeddedCompletionList), { items: embeddedCompletionList.items.map(item => { | ||
const data = { | ||
uri, | ||
originalItem: item, | ||
pluginId: context.plugins.indexOf(cacheData.plugin), | ||
sourceMap: { | ||
embeddedDocumentUri: sourceMap.mappedDocument.uri, | ||
}, | ||
}; | ||
return Object.assign(Object.assign({}, (0, transforms_1.transformCompletionItem)(item, embeddedRange => { var _a; return (_a = sourceMap.getSourceRange(embeddedRange.start, embeddedRange.end)) === null || _a === void 0 ? void 0 : _a[0]; })), { data: data }); | ||
return Object.assign(Object.assign({}, (0, transforms_1.transformCompletionItem)(item, embeddedRange => { var _a; return (_a = sourceMap.getSourceRange(embeddedRange.start, embeddedRange.end)) === null || _a === void 0 ? void 0 : _a[0]; })), { data: { | ||
uri, | ||
originalItem: item, | ||
pluginId: context.plugins.indexOf(cacheData.plugin), | ||
sourceMap: { | ||
embeddedDocumentUri: sourceMap.mappedDocument.uri, | ||
}, | ||
} }); | ||
}) }); | ||
@@ -60,9 +59,8 @@ } | ||
cacheData.list = Object.assign(Object.assign({}, completionList), { items: completionList.items.map(item => { | ||
const data = { | ||
uri, | ||
originalItem: item, | ||
pluginId: context.plugins.indexOf(cacheData.plugin), | ||
sourceMap: undefined, | ||
}; | ||
return Object.assign(Object.assign({}, item), { data: data }); | ||
return Object.assign(Object.assign({}, item), { data: { | ||
uri, | ||
originalItem: item, | ||
pluginId: context.plugins.indexOf(cacheData.plugin), | ||
sourceMap: undefined, | ||
} }); | ||
}) }); | ||
@@ -106,11 +104,10 @@ } | ||
const completionList = Object.assign(Object.assign({}, embeddedCompletionList), { items: embeddedCompletionList.items.map(item => { | ||
const data = { | ||
uri, | ||
originalItem: item, | ||
pluginId: context.plugins.indexOf(plugin), | ||
sourceMap: { | ||
embeddedDocumentUri: sourceMap.mappedDocument.uri, | ||
} | ||
}; | ||
return Object.assign(Object.assign({}, (0, transforms_1.transformCompletionItem)(item, embeddedRange => { var _a; return (_a = sourceMap.getSourceRange(embeddedRange.start, embeddedRange.end)) === null || _a === void 0 ? void 0 : _a[0]; })), { data: data }); | ||
return Object.assign(Object.assign({}, (0, transforms_1.transformCompletionItem)(item, embeddedRange => { var _a; return (_a = sourceMap.getSourceRange(embeddedRange.start, embeddedRange.end)) === null || _a === void 0 ? void 0 : _a[0]; })), { data: { | ||
uri, | ||
originalItem: item, | ||
pluginId: context.plugins.indexOf(plugin), | ||
sourceMap: { | ||
embeddedDocumentUri: sourceMap.mappedDocument.uri, | ||
} | ||
} }); | ||
}) }); | ||
@@ -154,9 +151,8 @@ cache.data.push({ | ||
list: Object.assign(Object.assign({}, completionList), { items: completionList.items.map(item => { | ||
const data = { | ||
uri, | ||
originalItem: item, | ||
pluginId: context.plugins.indexOf(plugin), | ||
sourceMap: undefined, | ||
}; | ||
return Object.assign(Object.assign({}, item), { data: data }); | ||
return Object.assign(Object.assign({}, item), { data: { | ||
uri, | ||
originalItem: item, | ||
pluginId: context.plugins.indexOf(plugin), | ||
sourceMap: undefined, | ||
} }); | ||
}) }), | ||
@@ -163,0 +159,0 @@ }); |
@@ -5,3 +5,3 @@ import type { LanguageServiceRuntimeContext } from '../types'; | ||
export declare const executePluginCommand = "volar.executtePluginCommand"; | ||
export declare type ExecutePluginCommandArgs = [ | ||
export type ExecutePluginCommandArgs = [ | ||
string, | ||
@@ -8,0 +8,0 @@ // uri |
import type * as vscode from 'vscode-languageserver-protocol'; | ||
import type { TextDocument } from 'vscode-languageserver-textdocument'; | ||
import { PluginContext } from './types'; | ||
export declare type NotNullableResult<T> = T | Thenable<T>; | ||
export declare type NullableResult<T> = NotNullableResult<T | undefined | null>; | ||
export declare type SemanticToken = [number, number, number, number, number]; | ||
export type NotNullableResult<T> = T | Thenable<T>; | ||
export type NullableResult<T> = NotNullableResult<T | undefined | null>; | ||
export type SemanticToken = [number, number, number, number, number]; | ||
export interface ExecuteCommandContext { | ||
@@ -8,0 +8,0 @@ token: vscode.CancellationToken; |
{ | ||
"name": "@volar/language-service", | ||
"version": "1.0.0-alpha.5", | ||
"version": "1.0.0-beta.0", | ||
"main": "out/index.js", | ||
@@ -16,10 +16,10 @@ "license": "MIT", | ||
"devDependencies": { | ||
"typescript": "latest" | ||
"typescript": "beta" | ||
}, | ||
"dependencies": { | ||
"@volar/language-core": "1.0.0-alpha.5", | ||
"@volar/shared": "1.0.0-alpha.5", | ||
"@volar/source-map": "1.0.0-alpha.5", | ||
"@volar/transforms": "1.0.0-alpha.5", | ||
"@volar/typescript-faster": "1.0.0-alpha.5", | ||
"@volar/language-core": "1.0.0-beta.0", | ||
"@volar/shared": "1.0.0-beta.0", | ||
"@volar/source-map": "1.0.0-beta.0", | ||
"@volar/transforms": "1.0.0-beta.0", | ||
"@volar/typescript-faster": "1.0.0-beta.0", | ||
"@vue/reactivity": "^3.2.38", | ||
@@ -33,3 +33,3 @@ "upath": "^2.0.1", | ||
}, | ||
"gitHead": "dd3efd3f7458aca9ba5dcdf549ce80999cb7affd" | ||
"gitHead": "e93a2cf6e614f6c8fa9b8a61e314c123cbe9a95a" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
192253
3452
+ Added@volar/code-gen@1.0.0-beta.0(transitive)
+ Added@volar/language-core@1.0.0-beta.0(transitive)
+ Added@volar/shared@1.0.0-beta.0(transitive)
+ Added@volar/source-map@1.0.0-beta.0(transitive)
+ Added@volar/transforms@1.0.0-beta.0(transitive)
+ Added@volar/typescript-faster@1.0.0-beta.0(transitive)
- Removed@volar/code-gen@1.0.0-alpha.5(transitive)
- Removed@volar/language-core@1.0.0-alpha.5(transitive)
- Removed@volar/shared@1.0.0-alpha.5(transitive)
- Removed@volar/source-map@1.0.0-alpha.5(transitive)
- Removed@volar/transforms@1.0.0-alpha.5(transitive)
- Removed@volar/typescript-faster@1.0.0-alpha.5(transitive)
Updated@volar/shared@1.0.0-beta.0