@volar/typescript 2.4.16 → 2.4.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -34,12 +34,13 @@ function decorateLanguageServiceHost(ts, language, languageServiceHost) {
|
|
|
34
34
|
: (fileName) => fileName.toLowerCase();
|
|
35
35
|
const moduleResolutionCache = ts.createModuleResolutionCache(languageServiceHost.getCurrentDirectory(), getCanonicalFileName, languageServiceHost.getCompilationSettings());
|
|
36
36
|
if (resolveModuleNameLiterals) {
|
|
37
|
-
languageServiceHost.resolveModuleNameLiterals = (moduleLiterals, containingFile, redirectedReference, options, ...rest) => {
|
|
37
|
+
languageServiceHost.resolveModuleNameLiterals = (moduleLiterals, containingFile, redirectedReference, options, containingSourceFile, ...rest) => {
|
|
38
38
|
if (moduleLiterals.every(name => !pluginExtensions.some(ext => name.text.endsWith(ext)))) {
|
|
39
|
-
return resolveModuleNameLiterals(moduleLiterals, containingFile, redirectedReference, options, ...rest);
|
|
39
|
+
return resolveModuleNameLiterals(moduleLiterals, containingFile, redirectedReference, options, containingSourceFile, ...rest);
|
|
40
40
|
}
|
|
41
41
|
return moduleLiterals.map(moduleLiteral => {
|
|
42
|
-
|
|
42
|
+
const mode = ts.getModeForUsageLocation(containingSourceFile, moduleLiteral, options);
|
|
43
|
+
return resolveModuleName(moduleLiteral.text, containingFile, options, moduleResolutionCache, redirectedReference, mode);
|
|
43
44
|
});
|
|
44
45
|
};
|
|
45
46
|
}
|
|
@@ -156,7 +156,8 @@ function proxyCreateProgram(ts, original, create) {
|
|
|
156
156
|
return resolveModuleNameLiterals(moduleLiterals, containingFile, redirectedReference, compilerOptions, containingSourceFile, ...rest);
|
|
157
157
|
}
|
|
158
158
|
return moduleLiterals.map(moduleLiteral => {
|
|
159
|
-
|
|
159
|
+
const mode = ts.getModeForUsageLocation(containingSourceFile, moduleLiteral, compilerOptions);
|
|
160
|
+
return resolveModuleName(moduleLiteral.text, containingFile, compilerOptions, moduleResolutionCache, redirectedReference, mode);
|
|
160
161
|
});
|
|
161
162
|
};
|
|
162
163
|
options.host.resolveModuleNames = (moduleNames, containingFile, reusedNames, redirectedReference, compilerOptions, containingSourceFile) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@volar/typescript",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.17",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"files": [
|
|
6
6
|
"**/*.js",
|
|
@@ -12,14 +12,14 @@
|
|
|
12
12
|
"directory": "packages/typescript"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@volar/language-core": "2.4.
|
|
15
|
+
"@volar/language-core": "2.4.17",
|
|
16
16
|
"path-browserify": "^1.0.1",
|
|
17
17
|
"vscode-uri": "^3.0.8"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"@types/node": "latest",
|
|
21
21
|
"@types/path-browserify": "latest",
|
|
22
|
-
"@volar/language-service": "2.4.
|
|
22
|
+
"@volar/language-service": "2.4.17"
|
|
23
23
|
},
|
|
24
|
-
"gitHead": "
|
|
24
|
+
"gitHead": "5a80a17afd76ee4788263043cf758280ad87d567"
|
|
25
25
|
}
|