@volar/typescript
Advanced tools
Comparing version 2.2.3 to 2.2.4
@@ -6,3 +6,3 @@ "use strict"; | ||
function decorateLanguageServiceHost(ts, language, languageServiceHost) { | ||
const extensions = language.plugins | ||
const pluginExtensions = language.plugins | ||
.map(plugin => plugin.typescript?.extraFileExtensions.map(ext => '.' + ext.extension) ?? []) | ||
@@ -21,5 +21,5 @@ .flat(); | ||
if (extensions) { | ||
for (const ext of extensions) { | ||
for (const ext of pluginExtensions) { | ||
if (!extensions.includes(ext)) { | ||
extensions = [...extensions, ...ext]; | ||
extensions = [...extensions, ext]; | ||
} | ||
@@ -31,3 +31,3 @@ } | ||
} | ||
if (extensions.length) { | ||
if (pluginExtensions.length) { | ||
const resolveModuleName = (0, resolveModuleName_1.createResolveModuleName)(ts, languageServiceHost, language.plugins, fileName => language.scripts.get(fileName)); | ||
@@ -40,3 +40,3 @@ const getCanonicalFileName = languageServiceHost.useCaseSensitiveFileNames?.() | ||
languageServiceHost.resolveModuleNameLiterals = (moduleLiterals, containingFile, redirectedReference, options, ...rest) => { | ||
if (moduleLiterals.every(name => !extensions.some(ext => name.text.endsWith(ext)))) { | ||
if (moduleLiterals.every(name => !pluginExtensions.some(ext => name.text.endsWith(ext)))) { | ||
return resolveModuleNameLiterals(moduleLiterals, containingFile, redirectedReference, options, ...rest); | ||
@@ -51,3 +51,3 @@ } | ||
languageServiceHost.resolveModuleNames = (moduleNames, containingFile, reusedNames, redirectedReference, options, containingSourceFile) => { | ||
if (moduleNames.every(name => !extensions.some(ext => name.endsWith(ext)))) { | ||
if (moduleNames.every(name => !pluginExtensions.some(ext => name.endsWith(ext)))) { | ||
return resolveModuleNames(moduleNames, containingFile, reusedNames, redirectedReference, options, containingSourceFile); | ||
@@ -54,0 +54,0 @@ } |
{ | ||
"name": "@volar/typescript", | ||
"version": "2.2.3", | ||
"version": "2.2.4", | ||
"license": "MIT", | ||
@@ -15,3 +15,3 @@ "files": [ | ||
"dependencies": { | ||
"@volar/language-core": "2.2.3", | ||
"@volar/language-core": "2.2.4", | ||
"path-browserify": "^1.0.1" | ||
@@ -22,5 +22,5 @@ }, | ||
"@types/path-browserify": "latest", | ||
"@volar/language-service": "2.2.3" | ||
"@volar/language-service": "2.2.4" | ||
}, | ||
"gitHead": "189ea5c663630358a9ad965c50d2bee69a9d84eb" | ||
"gitHead": "71a58c8b9c3a3e420b95df9ffb4a50be37cb31bc" | ||
} |
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
181618
+ Added@volar/language-core@2.2.4(transitive)
+ Added@volar/source-map@2.2.4(transitive)
- Removed@volar/language-core@2.2.3(transitive)
- Removed@volar/source-map@2.2.3(transitive)
Updated@volar/language-core@2.2.4