Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vscode-languageserver-protocol

Package Overview
Dependencies
Maintainers
11
Versions
130
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vscode-languageserver-protocol - npm Package Compare versions

Comparing version 3.17.0-next.3 to 3.17.0-next.4

32

lib/common/api.d.ts

@@ -15,3 +15,25 @@ import type { integer } from 'vscode-languageserver-types';

const lspReservedErrorRangeStart: integer;
/**
* The server cancelled the request. This error code should
* only be used for requests that explicitly support being
* server cancellable.
*
* @since 3.17.0
*/
const ServerCancelled: integer;
/**
* The server detected that the content of a document got
* modified outside normal conditions. A server should
* NOT send this error code if it detects a content change
* in it unprocessed messages. The result even computed
* on an older state might still be useful for the client.
*
* If a client decides that a result is not of any use anymore
* the client should cancel the request.
*/
const ContentModified: integer;
/**
* The client has canceled a request and a server as detected
* the cancel.
*/
const RequestCancelled: integer;

@@ -34,5 +56,11 @@ /**

type $DiagnosticServerCapabilities = diag.$DiagnosticServerCapabilities;
type DiagnosticPullMode = diag.DiagnosticPullMode;
const DiagnosticPullMode: typeof diag.DiagnosticPullMode;
type DiagnosticPullModeFlags = diag.DiagnosticPullModeFlags;
const DiagnosticPullModeFlags: typeof diag.DiagnosticPullModeFlags;
type DiagnosticTriggerKind = diag.DiagnosticTriggerKind;
const DiagnosticTriggerKind: typeof diag.DiagnosticTriggerKind;
type DiagnosticContext = diag.DiagnosticContext;
type DiagnosticServerCancellationData = diag.DiagnosticServerCancellationData;
const DiagnosticServerCancellationData: typeof diag.DiagnosticServerCancellationData;
type DiagnosticList = diag.DiagnosticList;
const DiagnosticRequest: typeof diag.DiagnosticRequest;
}

@@ -33,3 +33,25 @@ "use strict";

LSPErrorCodes.lspReservedErrorRangeStart = -32899;
/**
* The server cancelled the request. This error code should
* only be used for requests that explicitly support being
* server cancellable.
*
* @since 3.17.0
*/
LSPErrorCodes.ServerCancelled = -32802;
/**
* The server detected that the content of a document got
* modified outside normal conditions. A server should
* NOT send this error code if it detects a content change
* in it unprocessed messages. The result even computed
* on an older state might still be useful for the client.
*
* If a client decides that a result is not of any use anymore
* the client should cancel the request.
*/
LSPErrorCodes.ContentModified = -32801;
/**
* The client has canceled a request and a server as detected
* the cancel.
*/
LSPErrorCodes.RequestCancelled = -32800;

@@ -47,5 +69,7 @@ /**

(function (Proposed) {
Proposed.DiagnosticPullMode = diag.DiagnosticPullMode;
Proposed.DiagnosticPullModeFlags = diag.DiagnosticPullModeFlags;
Proposed.DiagnosticTriggerKind = diag.DiagnosticTriggerKind;
Proposed.DiagnosticServerCancellationData = diag.DiagnosticServerCancellationData;
Proposed.DiagnosticRequest = diag.DiagnosticRequest;
})(Proposed = exports.Proposed || (exports.Proposed = {}));
//# sourceMappingURL=api.js.map

@@ -21,8 +21,48 @@ import { RequestHandler } from 'vscode-jsonrpc';

}
export declare namespace DiagnosticPullMode {
const onType: 1;
const onSave: 2;
function is(value: any): value is DiagnosticPullMode;
export declare namespace DiagnosticPullModeFlags {
/**
* Trigger the diagnostic pull on open only.
*/
const onOpen: 1;
/**
* Trigger the diagnostic pull on type only
*/
const onType: 2;
/**
* Trigger the diagnostic pull on save only
*/
const onSave: 4;
/**
* Trigger the diagnostic pull on open, type and save.
*/
const all: number;
function is(value: any): value is DiagnosticPullModeFlags;
function isOpen(value: number): boolean;
function isType(value: number): boolean;
function isSave(value: number): boolean;
}
export declare type DiagnosticPullMode = 1 | 2;
export declare type DiagnosticPullModeFlags = number;
export declare namespace DiagnosticTriggerKind {
/**
* The request got triggered through some API
*/
const Invoked: 1;
/**
* The request got triggered because the user opened a document.
*/
const Opened: 2;
/**
* The request got triggered because the user typed in a document.
*/
const Typed: 3;
/**
* The request got triggered because the user saved a document.
*/
const Saved: 4;
function is(value: any): value is DiagnosticTriggerKind;
}
export declare type DiagnosticTriggerKind = 1 | 2 | 3 | 4;
export interface DiagnosticContext {
triggerKind: DiagnosticTriggerKind;
}
export interface DiagnosticParams extends WorkDoneProgressParams, PartialResultParams {

@@ -33,6 +73,18 @@ /**

textDocument: TextDocumentIdentifier;
/**
* Additional context information.
*/
context: DiagnosticContext;
}
export interface DiagnosticOptions extends WorkDoneProgressOptions {
/**
* An optional identifier under which the diagnostics are
* managed by the client.
*/
identifier?: string;
mode: DiagnosticPullMode;
/**
* An optional mode indicating when the client should
* pull. Defaults to `onOpen & onType`.
*/
mode?: DiagnosticPullModeFlags;
}

@@ -42,8 +94,20 @@ export interface DiagnosticRegistrationOptions extends TextDocumentRegistrationOptions, DiagnosticOptions, StaticRegistrationOptions {

export interface $DiagnosticServerCapabilities {
diagnosticProvider?: DiagnosticOptions;
diagnosticProvider?: boolean | DiagnosticOptions;
}
export interface DiagnosticServerCancellationData {
retriggerRequest: boolean;
}
export declare namespace DiagnosticServerCancellationData {
function is(value: any): value is DiagnosticServerCancellationData;
}
/**
* The result of a diagnostic pull request.
*/
export interface DiagnosticList {
items: Diagnostic[];
}
export declare namespace DiagnosticRequest {
const method: 'textDocument/diagnostic';
const type: ProtocolRequestType<DiagnosticParams, Diagnostic[] | null, Diagnostic[], void, DiagnosticRegistrationOptions>;
type HandlerSignature = RequestHandler<DiagnosticParams, Diagnostic[] | null, void>;
const type: ProtocolRequestType<DiagnosticParams, DiagnosticList, Diagnostic[], DiagnosticServerCancellationData, DiagnosticRegistrationOptions>;
type HandlerSignature = RequestHandler<DiagnosticParams, DiagnosticList | null, void>;
}

@@ -7,13 +7,71 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.DiagnosticRequest = exports.DiagnosticPullMode = void 0;
exports.DiagnosticRequest = exports.DiagnosticServerCancellationData = exports.DiagnosticTriggerKind = exports.DiagnosticPullModeFlags = void 0;
const Is = require("./utils/is");
const messages_1 = require("./messages");
var DiagnosticPullMode;
(function (DiagnosticPullMode) {
DiagnosticPullMode.onType = 1;
DiagnosticPullMode.onSave = 2;
var DiagnosticPullModeFlags;
(function (DiagnosticPullModeFlags) {
/**
* Trigger the diagnostic pull on open only.
*/
DiagnosticPullModeFlags.onOpen = 1;
/**
* Trigger the diagnostic pull on type only
*/
DiagnosticPullModeFlags.onType = 2;
/**
* Trigger the diagnostic pull on save only
*/
DiagnosticPullModeFlags.onSave = 4;
/**
* Trigger the diagnostic pull on open, type and save.
*/
DiagnosticPullModeFlags.all = DiagnosticPullModeFlags.onOpen & DiagnosticPullModeFlags.onType & DiagnosticPullModeFlags.onSave;
function is(value) {
return value === 1 || value === 2;
return DiagnosticPullModeFlags.onType <= value && value <= DiagnosticPullModeFlags.all;
}
DiagnosticPullMode.is = is;
})(DiagnosticPullMode = exports.DiagnosticPullMode || (exports.DiagnosticPullMode = {}));
DiagnosticPullModeFlags.is = is;
function isOpen(value) {
return (value & DiagnosticPullModeFlags.onOpen) !== 0;
}
DiagnosticPullModeFlags.isOpen = isOpen;
function isType(value) {
return (value & DiagnosticPullModeFlags.onType) !== 0;
}
DiagnosticPullModeFlags.isType = isType;
function isSave(value) {
return (value & DiagnosticPullModeFlags.onSave) !== 0;
}
DiagnosticPullModeFlags.isSave = isSave;
})(DiagnosticPullModeFlags = exports.DiagnosticPullModeFlags || (exports.DiagnosticPullModeFlags = {}));
var DiagnosticTriggerKind;
(function (DiagnosticTriggerKind) {
/**
* The request got triggered through some API
*/
DiagnosticTriggerKind.Invoked = 1;
/**
* The request got triggered because the user opened a document.
*/
DiagnosticTriggerKind.Opened = 2;
/**
* The request got triggered because the user typed in a document.
*/
DiagnosticTriggerKind.Typed = 3;
/**
* The request got triggered because the user saved a document.
*/
DiagnosticTriggerKind.Saved = 4;
function is(value) {
return DiagnosticTriggerKind.Invoked <= value && value <= DiagnosticTriggerKind.Saved;
}
DiagnosticTriggerKind.is = is;
})(DiagnosticTriggerKind = exports.DiagnosticTriggerKind || (exports.DiagnosticTriggerKind = {}));
var DiagnosticServerCancellationData;
(function (DiagnosticServerCancellationData) {
function is(value) {
const candidate = value;
return candidate && Is.boolean(candidate.retriggerRequest);
}
DiagnosticServerCancellationData.is = is;
})(DiagnosticServerCancellationData = exports.DiagnosticServerCancellationData || (exports.DiagnosticServerCancellationData = {}));
var DiagnosticRequest;

@@ -20,0 +78,0 @@ (function (DiagnosticRequest) {

2

lib/common/protocol.js

@@ -9,4 +9,4 @@ "use strict";

exports.MonikerRequest = exports.MonikerKind = exports.UniquenessLevel = exports.WillDeleteFilesRequest = exports.DidDeleteFilesNotification = exports.WillRenameFilesRequest = exports.DidRenameFilesNotification = exports.WillCreateFilesRequest = exports.DidCreateFilesNotification = exports.FileOperationPatternKind = exports.LinkedEditingRangeRequest = exports.ShowDocumentRequest = exports.SemanticTokensRegistrationType = exports.SemanticTokensRefreshRequest = exports.SemanticTokensRangeRequest = exports.SemanticTokensDeltaRequest = exports.SemanticTokensRequest = exports.TokenFormat = exports.CallHierarchyPrepareRequest = exports.CallHierarchyOutgoingCallsRequest = exports.CallHierarchyIncomingCallsRequest = exports.WorkDoneProgressCancelNotification = exports.WorkDoneProgressCreateRequest = exports.WorkDoneProgress = exports.SelectionRangeRequest = exports.DeclarationRequest = exports.FoldingRangeRequest = exports.ColorPresentationRequest = exports.DocumentColorRequest = exports.ConfigurationRequest = exports.DidChangeWorkspaceFoldersNotification = exports.WorkspaceFoldersRequest = exports.TypeDefinitionRequest = exports.ImplementationRequest = exports.ApplyWorkspaceEditRequest = exports.ExecuteCommandRequest = exports.PrepareRenameRequest = exports.RenameRequest = exports.PrepareSupportDefaultBehavior = exports.DocumentOnTypeFormattingRequest = exports.DocumentRangeFormattingRequest = exports.DocumentFormattingRequest = exports.DocumentLinkResolveRequest = void 0;
const messages_1 = require("./messages");
const Is = require("./utils/is");
const messages_1 = require("./messages");
const protocol_implementation_1 = require("./protocol.implementation");

@@ -13,0 +13,0 @@ Object.defineProperty(exports, "ImplementationRequest", { enumerable: true, get: function () { return protocol_implementation_1.ImplementationRequest; } });

@@ -179,3 +179,3 @@ import { TextDocumentIdentifier, Range, uinteger, SemanticTokensEdit, SemanticTokensLegend, SemanticTokens, SemanticTokensDelta } from 'vscode-languageserver-types';

* semantic tokens currently shown. It should be used with absolute care
* and is useful for situation where a server for example detect a project
* and is useful for situation where a server for example detects a project
* wide change that requires such a calculation.

@@ -182,0 +182,0 @@ */

{
"name": "vscode-languageserver-protocol",
"description": "VSCode Language Server Protocol implementation",
"version": "3.17.0-next.3",
"version": "3.17.0-next.4",
"author": "Microsoft Corporation",

@@ -21,3 +21,3 @@ "license": "MIT",

"dependencies": {
"vscode-jsonrpc": "6.1.0-next.1",
"vscode-jsonrpc": "6.1.0-next.2",
"vscode-languageserver-types": "3.17.0-next.1"

@@ -24,0 +24,0 @@ },

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