@volar/typescript
Advanced tools
Comparing version 2.4.0-alpha.19 to 2.4.0
@@ -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" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1
203358
4328
+ Added@volar/language-core@2.4.0(transitive)
+ Added@volar/source-map@2.4.0(transitive)
- Removed@volar/language-core@2.4.0-alpha.19(transitive)
- Removed@volar/source-map@2.4.0-alpha.19(transitive)
Updated@volar/language-core@2.4.0