@volar/typescript
Advanced tools
Comparing version 2.4.0-alpha.8 to 2.4.0-alpha.9
import type { LanguageServiceEnvironment, Disposable } from '@volar/language-service'; | ||
import type * as ts from 'typescript'; | ||
import { URI } from 'vscode-uri'; | ||
export declare function createSys(sys: ts.System | undefined, { fs, onDidChangeWatchedFiles }: LanguageServiceEnvironment, getCurrentDirectory: () => string, uriConverter: { | ||
export declare function createSys(sys: ts.System | undefined, env: LanguageServiceEnvironment, getCurrentDirectory: () => string, uriConverter: { | ||
asUri(fileName: string): URI; | ||
@@ -6,0 +6,0 @@ asFileName(uri: URI): string; |
@@ -8,3 +8,3 @@ "use strict"; | ||
let currentCwd = ''; | ||
function createSys(sys, { fs, onDidChangeWatchedFiles }, getCurrentDirectory, uriConverter) { | ||
function createSys(sys, env, getCurrentDirectory, uriConverter) { | ||
let version = 0; | ||
@@ -19,3 +19,3 @@ const caseSensitive = sys?.useCaseSensitiveFileNames ?? false; | ||
const promises = new Set(); | ||
const fileWatcher = onDidChangeWatchedFiles?.(({ changes }) => { | ||
const fileWatcher = env.onDidChangeWatchedFiles?.(({ changes }) => { | ||
version++; | ||
@@ -113,3 +113,3 @@ for (const change of changes) { | ||
dir.exists = false; | ||
const result = fs?.stat(uriConverter.asUri(dirName)); | ||
const result = env.fs?.stat(uriConverter.asUri(dirName)); | ||
if (typeof result === 'object' && 'then' in result) { | ||
@@ -155,3 +155,3 @@ const promise = result; | ||
function handleStat(fileName, file) { | ||
const result = fs?.stat(uriConverter.asUri(fileName)); | ||
const result = env.fs?.stat(uriConverter.asUri(fileName)); | ||
if (typeof result === 'object' && 'then' in result) { | ||
@@ -229,3 +229,3 @@ const promise = result; | ||
const uri = uriConverter.asUri(fileName); | ||
const result = fs?.readFile(uri, encoding); | ||
const result = env.fs?.readFile(uri, encoding); | ||
if (typeof result === 'object' && 'then' in result) { | ||
@@ -255,3 +255,3 @@ const promise = result; | ||
dir.requestedRead = true; | ||
const result = fs?.readDirectory(uriConverter.asUri(dirName || '.')); | ||
const result = env.fs?.readDirectory(uriConverter.asUri(dirName || '.')); | ||
if (typeof result === 'object' && 'then' in result) { | ||
@@ -278,3 +278,3 @@ const promise = result; | ||
if (fileType === 64) { | ||
const stat = fs?.stat(uriConverter.asUri(dirName + '/' + name)); | ||
const stat = env.fs?.stat(uriConverter.asUri(dirName + '/' + name)); | ||
if (typeof stat === 'object' && 'then' in stat) { | ||
@@ -281,0 +281,0 @@ const promise = stat; |
{ | ||
"name": "@volar/typescript", | ||
"version": "2.4.0-alpha.8", | ||
"version": "2.4.0-alpha.9", | ||
"license": "MIT", | ||
@@ -15,3 +15,3 @@ "files": [ | ||
"dependencies": { | ||
"@volar/language-core": "2.4.0-alpha.8", | ||
"@volar/language-core": "2.4.0-alpha.9", | ||
"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.8" | ||
"@volar/language-service": "2.4.0-alpha.9" | ||
}, | ||
"gitHead": "2b5644585168133d5a5c5144e15e1ee52b265d0b" | ||
"gitHead": "4a3fc1bf36eb12ccd58bc8cb25f11f1a9f7b2300" | ||
} |
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
200024
+ Added@volar/language-core@2.4.0-alpha.9(transitive)
+ Added@volar/source-map@2.4.0-alpha.9(transitive)
- Removed@volar/language-core@2.4.0-alpha.8(transitive)
- Removed@volar/source-map@2.4.0-alpha.8(transitive)