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

@volar/language-core

Package Overview
Dependencies
Maintainers
1
Versions
234
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@volar/language-core - npm Package Compare versions

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

30

index.js

@@ -145,9 +145,3 @@ "use strict";

maps: {
get(virtualCode) {
for (const map of this.forEach(virtualCode)) {
return map[2];
}
throw `no map found for ${virtualCode.id}`;
},
*forEach(virtualCode) {
get(virtualCode, sourceScript, mappings) {
let mapCache = virtualCodeToSourceMap.get(virtualCode.snapshot);

@@ -157,7 +151,14 @@ if (!mapCache) {

}
const sourceScript = virtualCodeToSourceScriptMap.get(virtualCode);
if (!mapCache.has(sourceScript.snapshot)) {
mapCache.set(sourceScript.snapshot, new source_map_1.SourceMap(virtualCode.mappings));
mapCache.set(sourceScript.snapshot, new source_map_1.SourceMap(mappings ?? virtualCode.mappings));
}
yield [sourceScript.id, sourceScript.snapshot, mapCache.get(sourceScript.snapshot)];
return mapCache.get(sourceScript.snapshot);
},
*forEach(virtualCode) {
const sourceScript = virtualCodeToSourceScriptMap.get(virtualCode);
yield [
sourceScript.id,
sourceScript.snapshot,
this.get(virtualCode, sourceScript),
];
if (virtualCode.associatedScriptMappings) {

@@ -167,6 +168,7 @@ for (const [relatedScriptId, relatedMappings] of virtualCode.associatedScriptMappings) {

if (relatedSourceScript) {
if (!mapCache.has(relatedSourceScript.snapshot)) {
mapCache.set(relatedSourceScript.snapshot, new source_map_1.SourceMap(relatedMappings));
}
yield [relatedSourceScript.id, relatedSourceScript.snapshot, mapCache.get(relatedSourceScript.snapshot)];
yield [
relatedSourceScript.id,
relatedSourceScript.snapshot,
this.get(virtualCode, relatedSourceScript, relatedMappings),
];
}

@@ -173,0 +175,0 @@ }

@@ -13,3 +13,3 @@ import type { Mapping, SourceMap } from '@volar/source-map';

maps: {
get(virtualCode: VirtualCode): SourceMap<CodeInformation>;
get(virtualCode: VirtualCode, sourceScript: SourceScript<T>, mappings?: Mapping<CodeInformation>[]): SourceMap<CodeInformation>;
forEach(virtualCode: VirtualCode): Generator<[id: T, snapshot: ts.IScriptSnapshot, map: SourceMap<CodeInformation>]>;

@@ -16,0 +16,0 @@ };

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

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

"dependencies": {
"@volar/source-map": "2.3.0-alpha.8"
"@volar/source-map": "2.3.0-alpha.9"
},
"gitHead": "377a0083ac697a476509805a6777a2339391dcaf"
"gitHead": "3f741930343896dfc464a893ebe5f3619bb1a1aa"
}
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