vscode-languageclient
Advanced tools
Comparing version 8.0.2 to 8.1.0-next.1
@@ -137,2 +137,9 @@ "use strict"; | ||
})(PullState || (PullState = {})); | ||
var DocumentOrUri; | ||
(function (DocumentOrUri) { | ||
function asKey(document) { | ||
return document instanceof vscode_1.Uri ? document.toString() : document.uri.toString(); | ||
} | ||
DocumentOrUri.asKey = asKey; | ||
})(DocumentOrUri || (DocumentOrUri = {})); | ||
class DocumentPullStateTracker { | ||
@@ -171,3 +178,3 @@ constructor() { | ||
unTrack(kind, document) { | ||
const key = document instanceof vscode_1.Uri ? document.toString() : document.uri.toString(); | ||
const key = DocumentOrUri.asKey(document); | ||
const states = kind === PullState.document ? this.documentPullStates : this.workspacePullStates; | ||
@@ -177,3 +184,3 @@ states.delete(key); | ||
tracks(kind, document) { | ||
const key = document instanceof vscode_1.Uri ? document.toString() : document.uri.toString(); | ||
const key = DocumentOrUri.asKey(document); | ||
const states = kind === PullState.document ? this.documentPullStates : this.workspacePullStates; | ||
@@ -183,3 +190,3 @@ return states.has(key); | ||
getResultId(kind, document) { | ||
const key = document instanceof vscode_1.Uri ? document.toString() : document.uri.toString(); | ||
const key = DocumentOrUri.asKey(document); | ||
const states = kind === PullState.document ? this.documentPullStates : this.workspacePullStates; | ||
@@ -215,3 +222,4 @@ return states.get(key)?.resultId; | ||
knows(kind, document) { | ||
return this.documentStates.tracks(kind, document); | ||
const uri = document instanceof vscode_1.Uri ? document : document.uri; | ||
return this.documentStates.tracks(kind, document) || this.openRequests.has(uri.toString()); | ||
} | ||
@@ -525,3 +533,3 @@ forget(kind, document) { | ||
} | ||
const key = document instanceof vscode_1.Uri ? document.toString() : document.uri.toString(); | ||
const key = DocumentOrUri.asKey(document); | ||
if (this.documents.has(key)) { | ||
@@ -534,3 +542,3 @@ return; | ||
remove(document) { | ||
const key = document instanceof vscode_1.Uri ? document.toString() : document.uri.toString(); | ||
const key = DocumentOrUri.asKey(document); | ||
if (this.documents.has(key)) { | ||
@@ -545,3 +553,3 @@ this.documents.delete(key); | ||
} | ||
else if (document === this.endDocument) { | ||
else if (key === this.endDocumentKey()) { | ||
// Make sure we have a correct last document. It could have | ||
@@ -565,6 +573,6 @@ this.endDocument = this.documents.last; | ||
if (document !== undefined) { | ||
const key = document instanceof vscode_1.Uri ? document.toString() : document.uri.toString(); | ||
const key = DocumentOrUri.asKey(document); | ||
this.diagnosticRequestor.pull(document); | ||
this.documents.set(key, document, vscode_languageserver_protocol_1.Touch.Last); | ||
if (document === this.endDocument) { | ||
if (key === this.endDocumentKey()) { | ||
this.stop(); | ||
@@ -585,2 +593,5 @@ } | ||
} | ||
endDocumentKey() { | ||
return this.endDocument !== undefined ? DocumentOrUri.asKey(this.endDocument) : undefined; | ||
} | ||
} | ||
@@ -683,9 +694,5 @@ class DiagnosticFeatureProviderImpl { | ||
} | ||
tabs.onOpen((opened) => { | ||
for (const document of opened) { | ||
if (matches(document) && !this.diagnosticRequestor.knows(PullState.document, document)) { | ||
this.diagnosticRequestor.pull(document, () => { addToBackgroundIfNeeded(document); }); | ||
} | ||
} | ||
}); | ||
// We don't need to pull on tab open since we will receive a document open as well later on | ||
// and that event allows us to use a document for a match check which will have a set | ||
// language id. | ||
if (diagnosticPullOptions.onChange === true) { | ||
@@ -692,0 +699,0 @@ const changeFeature = client.getFeature(vscode_languageserver_protocol_1.DidChangeTextDocumentNotification.method); |
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
import * as cp from 'child_process'; | ||
@@ -3,0 +4,0 @@ import ChildProcess = cp.ChildProcess; |
{ | ||
"name": "vscode-languageclient", | ||
"description": "VSCode Language client implementation", | ||
"version": "8.0.2", | ||
"version": "8.1.0-next.1", | ||
"author": "Microsoft Corporation", | ||
@@ -26,10 +26,10 @@ "license": "MIT", | ||
"@types/minimatch": "^3.0.5", | ||
"@types/semver": "^7.3.8", | ||
"@types/semver": "^7.3.10", | ||
"@types/vscode": "1.67.0", | ||
"shx": "^0.3.3" | ||
"shx": "^0.3.4" | ||
}, | ||
"dependencies": { | ||
"minimatch": "^3.0.4", | ||
"semver": "^7.3.5", | ||
"vscode-languageserver-protocol": "3.17.2" | ||
"minimatch": "^5.1.0", | ||
"semver": "^7.3.7", | ||
"vscode-languageserver-protocol": "3.17.3-next.1" | ||
}, | ||
@@ -36,0 +36,0 @@ "scripts": { |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
641145
12527
2
+ Addedbrace-expansion@2.0.1(transitive)
+ Addedminimatch@5.1.6(transitive)
+ Addedvscode-jsonrpc@8.1.0-next.1(transitive)
+ Addedvscode-languageserver-protocol@3.17.3-next.1(transitive)
- Removedbrace-expansion@1.1.11(transitive)
- Removedconcat-map@0.0.1(transitive)
- Removedminimatch@3.1.2(transitive)
- Removedvscode-jsonrpc@8.0.2(transitive)
- Removedvscode-languageserver-protocol@3.17.2(transitive)
Updatedminimatch@^5.1.0
Updatedsemver@^7.3.7