@volar/typescript 2.4.24 → 2.4.26
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.
- package/lib/node/utils.js +8 -3
- package/package.json +4 -5
package/lib/node/utils.js
CHANGED
|
@@ -31,12 +31,17 @@ function fixupImpliedNodeFormatForFile(ts, pluginExtensions, sourceFile, package
|
|
|
31
31
|
return;
|
|
32
32
|
}
|
|
33
33
|
// https://github.com/microsoft/TypeScript/blob/669c25c091ad4d32298d0f33b0e4e681d46de3ea/src/compiler/program.ts#L1354
|
|
34
|
-
const validExts = [
|
|
34
|
+
const validExts = ['.d.ts', '.ts', '.tsx', '.js', '.jsx'];
|
|
35
35
|
if (validExts.some(ext => sourceFile.fileName.endsWith(ext))) {
|
|
36
36
|
return;
|
|
37
37
|
}
|
|
38
|
-
const asTs = sourceFile.fileName + ts
|
|
39
|
-
|
|
38
|
+
const asTs = sourceFile.fileName + '.ts';
|
|
39
|
+
// Use getImpliedNodeFormatForFileWorker instead of getImpliedNodeFormatForFile for runTsc() compatibility
|
|
40
|
+
const impliedNodeFormat = ts.getImpliedNodeFormatForFileWorker?.(asTs, packageJsonInfoCache, host, options)?.impliedNodeFormat;
|
|
41
|
+
if (impliedNodeFormat === undefined) {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
sourceFile.impliedNodeFormat = impliedNodeFormat;
|
|
40
45
|
return () => sourceFile.impliedNodeFormat = undefined;
|
|
41
46
|
}
|
|
42
47
|
//# sourceMappingURL=utils.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@volar/typescript",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.26",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"files": [
|
|
6
6
|
"**/*.js",
|
|
@@ -12,14 +12,13 @@
|
|
|
12
12
|
"directory": "packages/typescript"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@volar/language-core": "2.4.
|
|
15
|
+
"@volar/language-core": "2.4.26",
|
|
16
16
|
"path-browserify": "^1.0.1",
|
|
17
17
|
"vscode-uri": "^3.0.8"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"@types/node": "latest",
|
|
21
20
|
"@types/path-browserify": "latest",
|
|
22
|
-
"@volar/language-service": "2.4.
|
|
21
|
+
"@volar/language-service": "2.4.26"
|
|
23
22
|
},
|
|
24
|
-
"gitHead": "
|
|
23
|
+
"gitHead": "4a9d25d797d08d9c149bebf0f52ac5e172f4757d"
|
|
25
24
|
}
|