vue-tsc 3.3.7 → 3.3.9
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/index.js +15 -2
- package/package.json +5 -4
package/index.js
CHANGED
|
@@ -36,11 +36,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
36
36
|
exports.run = run;
|
|
37
37
|
const runTsc_1 = require("@volar/typescript/lib/quickstart/runTsc");
|
|
38
38
|
const core = __importStar(require("@vue/language-core"));
|
|
39
|
+
const path = __importStar(require("node:path"));
|
|
39
40
|
const windowsPathRE = /\\/g;
|
|
40
|
-
function run(tscPath
|
|
41
|
+
function run(tscPath) {
|
|
41
42
|
let runExtensions = ['.vue'];
|
|
42
43
|
let extensionsChangedException;
|
|
43
|
-
const main = () => (0, runTsc_1.runTsc)(tscPath, runExtensions, (ts, options) => {
|
|
44
|
+
const main = () => (0, runTsc_1.runTsc)(resolveTscPath(tscPath), runExtensions, (ts, options) => {
|
|
44
45
|
const { configFilePath } = options.options;
|
|
45
46
|
const vueOptions = typeof configFilePath === 'string'
|
|
46
47
|
? core.createParsedCommandLine(ts, ts.sys, configFilePath.replace(windowsPathRE, '/')).vueOptions
|
|
@@ -69,4 +70,16 @@ function run(tscPath = require.resolve('typescript/lib/tsc')) {
|
|
|
69
70
|
}
|
|
70
71
|
}
|
|
71
72
|
}
|
|
73
|
+
function resolveTscPath(tscPath = require.resolve('typescript/lib/tsc')) {
|
|
74
|
+
try {
|
|
75
|
+
const { name } = require(path.join(tscPath, '..', '..', 'package.json'));
|
|
76
|
+
if (name === '@typescript/typescript6') {
|
|
77
|
+
// `typescript` may be aliased to `@typescript/typescript6`,
|
|
78
|
+
// which keeps tsc in its full TypeScript 6 dependency (`@typescript/old`)
|
|
79
|
+
return require.resolve('@typescript/old/lib/tsc', { paths: [path.dirname(tscPath)] });
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
catch { }
|
|
83
|
+
return tscPath;
|
|
84
|
+
}
|
|
72
85
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vue-tsc",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.9",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"files": [
|
|
6
6
|
"bin",
|
|
@@ -21,10 +21,11 @@
|
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@volar/typescript": "2.4.28",
|
|
24
|
-
"@vue/language-core": "3.3.
|
|
24
|
+
"@vue/language-core": "3.3.9"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@types/node": "^26.0.1"
|
|
27
|
+
"@types/node": "^26.0.1",
|
|
28
|
+
"typescript": "latest"
|
|
28
29
|
},
|
|
29
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "51617b912fd53168fae7330fcabf9640ec5a1eee"
|
|
30
31
|
}
|