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.0-alpha.19 to 2.4.0

4

lib/node/proxyCreateProgram.js

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

{ getLanguageId: common_1.resolveFileLanguageId },
], new language_core_1.FileMap(ts.sys.useCaseSensitiveFileNames), fileName => {
if (!sourceFileSnapshots.has(fileName)) {
], new language_core_1.FileMap(ts.sys.useCaseSensitiveFileNames), (fileName, includeFsFiles) => {
if (includeFsFiles && !sourceFileSnapshots.has(fileName)) {
const sourceFileText = originalHost.readFile(fileName);

@@ -64,0 +64,0 @@ if (sourceFileText !== undefined) {

@@ -5,3 +5,3 @@ import { Language } from '@volar/language-core';

import type { createSys } from './createSys';
export interface TypeScriptProjectHost extends Pick<ts.LanguageServiceHost, 'getLocalizedDiagnosticMessages' | 'getCurrentDirectory' | 'getCompilationSettings' | 'getProjectReferences' | 'getScriptFileNames' | 'getProjectVersion' | 'getScriptSnapshot'> {
export interface TypeScriptProjectHost extends Pick<ts.LanguageServiceHost, 'getLocalizedDiagnosticMessages' | 'getCurrentDirectory' | 'getCompilationSettings' | 'getProjectReferences' | 'getScriptFileNames' | 'getProjectVersion'> {
}

@@ -8,0 +8,0 @@ export declare function createLanguageServiceHost<T>(ts: typeof import('typescript'), sys: ReturnType<typeof createSys> | ts.System, language: Language<T>, asScriptId: (fileName: string) => T, projectHost: TypeScriptProjectHost): {

@@ -250,11 +250,8 @@ "use strict";

}
const isOpenedFile = !!projectHost.getScriptSnapshot(fileName);
if (isOpenedFile) {
const sourceScript = language.scripts.get(asScriptId(fileName));
if (sourceScript && !sourceScript.generated) {
if (!version.map.has(sourceScript.snapshot)) {
version.map.set(sourceScript.snapshot, version.lastVersion++);
}
return version.map.get(sourceScript.snapshot).toString();
const openedFile = language.scripts.get(asScriptId(fileName), false);
if (openedFile && !openedFile.generated) {
if (!version.map.has(openedFile.snapshot)) {
version.map.set(openedFile.snapshot, version.lastVersion++);
}
return version.map.get(openedFile.snapshot).toString();
}

@@ -261,0 +258,0 @@ if (sys.fileExists(fileName)) {

{
"name": "@volar/typescript",
"version": "2.4.0-alpha.19",
"version": "2.4.0",
"license": "MIT",

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

"dependencies": {
"@volar/language-core": "2.4.0-alpha.19",
"@volar/language-core": "2.4.0",
"path-browserify": "^1.0.1",

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

"@types/path-browserify": "latest",
"@volar/language-service": "2.4.0-alpha.19"
"@volar/language-service": "2.4.0"
},
"gitHead": "cbb14a44f72c365c1e8d52eff9580fb4e9765f15"
"gitHead": "7e98885cfe284451e655cf1c3954786b51aea2f8"
}
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