New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@volar/language-server

Package Overview
Dependencies
Maintainers
1
Versions
238
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@volar/language-server - npm Package Compare versions

Comparing version 2.3.0-alpha.7 to 2.3.0-alpha.8

32

lib/server.js

@@ -187,10 +187,11 @@ "use strict";

if (capabilitiesArr.some(data => data.autoInsertionProvider)) {
const allTriggerCharacters = [];
const allConfigurationSections = [];
const triggerCharacterToConfigurationSections = new Map();
const tryAdd = (char, section) => {
const index = allTriggerCharacters.indexOf(char);
if (index === -1 || allConfigurationSections[index] !== section) {
allTriggerCharacters.push(char);
allConfigurationSections.push(section);
let sectionSet = triggerCharacterToConfigurationSections.get(char);
if (!sectionSet) {
triggerCharacterToConfigurationSections.set(char, sectionSet = new Set());
}
if (section) {
sectionSet.add(section);
}
};

@@ -200,3 +201,2 @@ for (const data of capabilitiesArr) {

const { triggerCharacters, configurationSections } = data.autoInsertionProvider;
allTriggerCharacters.push(...triggerCharacters);
if (configurationSections) {

@@ -212,3 +212,3 @@ if (configurationSections.length !== triggerCharacters.length) {

for (const char of triggerCharacters) {
tryAdd(char, null);
tryAdd(char);
}

@@ -219,5 +219,17 @@ }

status.initializeResult.autoInsertion = {
triggerCharacters: allTriggerCharacters,
configurationSections: allConfigurationSections,
triggerCharacters: [],
configurationSections: [],
};
for (const [char, sections] of triggerCharacterToConfigurationSections) {
if (sections.size) {
for (const section of sections) {
status.initializeResult.autoInsertion.triggerCharacters.push(char);
status.initializeResult.autoInsertion.configurationSections.push(section);
}
}
else {
status.initializeResult.autoInsertion.triggerCharacters.push(char);
status.initializeResult.autoInsertion.configurationSections.push(null);
}
}
}

@@ -224,0 +236,0 @@ return status.initializeResult;

{
"name": "@volar/language-server",
"version": "2.3.0-alpha.7",
"version": "2.3.0-alpha.8",
"license": "MIT",

@@ -15,6 +15,6 @@ "files": [

"dependencies": {
"@volar/language-core": "2.3.0-alpha.7",
"@volar/language-service": "2.3.0-alpha.7",
"@volar/snapshot-document": "2.3.0-alpha.7",
"@volar/typescript": "2.3.0-alpha.7",
"@volar/language-core": "2.3.0-alpha.8",
"@volar/language-service": "2.3.0-alpha.8",
"@volar/snapshot-document": "2.3.0-alpha.8",
"@volar/typescript": "2.3.0-alpha.8",
"path-browserify": "^1.0.1",

@@ -30,3 +30,3 @@ "request-light": "^0.7.0",

},
"gitHead": "3cc2a62516113c5789e4f54766e25063099a13a5"
"gitHead": "377a0083ac697a476509805a6777a2339391dcaf"
}
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