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

vscode-typescript-languageservice

Package Overview
Dependencies
Maintainers
1
Versions
98
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vscode-typescript-languageservice - npm Package Compare versions

Comparing version 0.27.9 to 0.27.10

20

out/services/codeAction.js

@@ -22,10 +22,12 @@ "use strict";

let result = [];
for (const error of context.diagnostics) {
try {
const codeFixes = languageService.getCodeFixesAtPosition(fileName, document.offsetAt(error.range.start), document.offsetAt(error.range.end), [Number(error.code)], formatOptions, preferences);
for (const codeFix of codeFixes) {
result = result.concat(transformCodeFix(codeFix, [error]));
if (!context.only || matchOnlyKind(vscode.CodeActionKind.QuickFix)) {
for (const error of context.diagnostics) {
try {
const codeFixes = languageService.getCodeFixesAtPosition(fileName, document.offsetAt(error.range.start), document.offsetAt(error.range.end), [Number(error.code)], formatOptions, preferences);
for (const codeFix of codeFixes) {
result = result.concat(transformCodeFix(codeFix, [error], context.only ? vscode.CodeActionKind.QuickFix : vscode.CodeActionKind.Empty));
}
}
catch { }
}
catch { }
}

@@ -138,10 +140,10 @@ if (context.only) {

}
function transformCodeFix(codeFix, diagnostics) {
function transformCodeFix(codeFix, diagnostics, kind) {
const edit = rename_1.fileTextChangesToWorkspaceEdit(codeFix.changes, getTextDocument);
const codeActions = [];
const fix = vscode.CodeAction.create(codeFix.description, edit, vscode.CodeActionKind.QuickFix);
const fix = vscode.CodeAction.create(codeFix.description, edit, kind);
fix.diagnostics = diagnostics;
codeActions.push(fix);
if (codeFix.fixAllDescription && codeFix.fixId) {
const fixAll = vscode.CodeAction.create(codeFix.fixAllDescription, vscode.CodeActionKind.QuickFix);
const fixAll = vscode.CodeAction.create(codeFix.fixAllDescription, kind);
const data = {

@@ -148,0 +150,0 @@ uri,

{
"name": "vscode-typescript-languageservice",
"version": "0.27.9",
"version": "0.27.10",
"main": "out/index.js",

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

"dependencies": {
"@volar/shared": "^0.27.9",
"@volar/shared": "^0.27.10",
"upath": "^2.0.1",

@@ -25,3 +25,3 @@ "vscode-languageserver": "^8.0.0-next.2",

},
"gitHead": "987cd47ddacaa802b28671a0b3fa18107a40e208"
"gitHead": "c9efdbe3f1824230d5f414018f05fc7711e9f830"
}
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