Skip to content

Commit 98489a1

Browse files
committed
refactor(tsc): removed handling for TS 5.7
TS 5.7 issue is fixed by upstream: volarjs/volar.js#252
1 parent dcb0e35 commit 98489a1

File tree

3 files changed

+3
-23
lines changed

3 files changed

+3
-23
lines changed

packages/tsc/index.ts

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
import { runTsc } from '@volar/typescript/lib/quickstart/runTsc';
22
import * as vue from '@vue/language-core';
3-
import * as semver from 'semver';
43

54
const windowsPathReg = /\\/g;
65

7-
export function run(tscPath = getTscPath()) {
6+
export function run(tscPath = require.resolve('typescript/lib/tsc')) {
87

98
let runExtensions = ['.vue'];
109

@@ -47,14 +46,3 @@ export function run(tscPath = getTscPath()) {
4746
}
4847
}
4948
}
50-
51-
function getTscPath() {
52-
const version = require('typescript/package.json').version as string;
53-
54-
if (semver.gte(version, '5.7.0')) {
55-
return require.resolve('typescript/lib/_tsc');
56-
}
57-
else {
58-
return require.resolve('typescript/lib/tsc');
59-
}
60-
}

packages/tsc/package.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,12 @@
1818
},
1919
"dependencies": {
2020
"@volar/typescript": "~2.4.11",
21-
"@vue/language-core": "2.1.10",
22-
"semver": "^7.5.4"
21+
"@vue/language-core": "2.1.10"
2322
},
2423
"peerDependencies": {
2524
"typescript": ">=5.0.0"
2625
},
2726
"devDependencies": {
28-
"@types/node": "latest",
29-
"@types/semver": "^7.5.4"
27+
"@types/node": "latest"
3028
}
3129
}

pnpm-lock.yaml

Lines changed: 0 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)