adopt API changes in tests and extensions

This commit is contained in:
Johannes Rieken
2021-06-22 14:34:07 +02:00
parent 24f9000e97
commit 14704a7e92
6 changed files with 51 additions and 32 deletions

View File

@@ -235,7 +235,13 @@ export class PackageJSONContribution implements IJSONContribution {
public resolveSuggestion(resource: Uri | undefined, item: CompletionItem): Thenable<CompletionItem | null> | null {
if (item.kind === CompletionItemKind.Property && !item.documentation) {
return this.fetchPackageInfo(item.label, resource).then(info => {
let name = item.label;
if (typeof name !== 'string') {
name = name.label;
}
return this.fetchPackageInfo(name, resource).then(info => {
if (info) {
item.documentation = this.getDocumentation(info.description, info.version, info.homepage);
return item;