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

@volar/typescript

Package Overview
Dependencies
Maintainers
1
Versions
222
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@volar/typescript - npm Package Compare versions

Comparing version 2.4.1 to 2.4.2

28

lib/node/proxyLanguageService.js

@@ -829,10 +829,26 @@ "use strict";

let end;
const map = language.maps.get(serviceScript.code, targetScript);
const map = language.maps.get(serviceScript.code, sourceScript);
for (const mapping of map.mappings) {
if ((0, language_core_1.isInlayHintsEnabled)(mapping.data) && mapping.sourceOffsets[0] >= span.start && mapping.sourceOffsets[0] <= span.start + span.length) {
start ??= mapping.generatedOffsets[0];
end ??= mapping.generatedOffsets[mapping.generatedOffsets.length - 1];
start = Math.min(start, mapping.generatedOffsets[0]);
end = Math.max(end, mapping.generatedOffsets[mapping.generatedOffsets.length - 1]);
if (!(0, language_core_1.isInlayHintsEnabled)(mapping.data)) {
continue;
}
let mappingStart = mapping.sourceOffsets[0];
let genStart;
let genEnd;
if (mappingStart >= span.start && mappingStart <= span.start + span.length) {
genStart = mapping.generatedOffsets[0];
genEnd = mapping.generatedOffsets[mapping.generatedOffsets.length - 1]
+ (mapping.generatedLengths ?? mapping.lengths)[mapping.generatedOffsets.length - 1];
}
else if (mappingStart < span.start && span.start < mappingStart + mapping.lengths[0]
&& mapping.sourceOffsets.length == 1
&& (!mapping.generatedLengths || mapping.generatedLengths[0] === mapping.lengths[0])) {
genStart = mapping.generatedOffsets[0] + span.start - mappingStart;
genEnd = Math.min(genStart + span.length, mapping.generatedOffsets[0] + mapping.lengths[0]);
}
else {
continue;
}
start = Math.min(start ?? genStart, genStart);
end = Math.max(end ?? genEnd, genEnd);
}

@@ -839,0 +855,0 @@ if (start === undefined || end === undefined) {

{
"name": "@volar/typescript",
"version": "2.4.1",
"version": "2.4.2",
"license": "MIT",

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

"dependencies": {
"@volar/language-core": "2.4.1",
"@volar/language-core": "2.4.2",
"path-browserify": "^1.0.1",

@@ -23,5 +23,5 @@ "vscode-uri": "^3.0.8"

"@types/path-browserify": "latest",
"@volar/language-service": "2.4.1"
"@volar/language-service": "2.4.2"
},
"gitHead": "b920b6c4a3e4b2d8f46c676ea414e94c437cb5b7"
"gitHead": "f384d55ef4ae21e9f9a6796c9676a4a710458ed9"
}
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