vue-tsc 1.3.12 → 1.3.13
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/bin/vue-tsc.js +10 -0
- package/package.json +5 -4
package/bin/vue-tsc.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
const semver = require('semver')
|
|
2
3
|
const fs = require('fs');
|
|
4
|
+
const tsPkg = require('typescript/package.json');
|
|
3
5
|
const readFileSync = fs.readFileSync;
|
|
4
6
|
const tscPath = require.resolve('typescript/lib/tsc');
|
|
5
7
|
const proxyApiPath = require.resolve('../out/index');
|
|
@@ -17,6 +19,14 @@ fs.readFileSync = (...args) => {
|
|
|
17
19
|
// proxy createProgram apis
|
|
18
20
|
tryReplace(/function createProgram\(.+\) {/, s => s + ` return require(${JSON.stringify(proxyApiPath)}).createProgram(...arguments);`);
|
|
19
21
|
|
|
22
|
+
// patches logic for checking root file existance in build program for incremental builds
|
|
23
|
+
if (semver.gt(tsPkg.version, '5.0.0')) {
|
|
24
|
+
tryReplace(`for (const existingRoot of buildInfoVersionMap.roots) {`, `for (const existingRoot of buildInfoVersionMap.roots
|
|
25
|
+
.filter(file => !file.toLowerCase().includes('__vls_'))
|
|
26
|
+
.map(file => file.replace(/\.vue\.(j|t)sx?$/i, '.vue'))
|
|
27
|
+
) {`);
|
|
28
|
+
}
|
|
29
|
+
|
|
20
30
|
return tsc;
|
|
21
31
|
|
|
22
32
|
function tryReplace(search, replace) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vue-tsc",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.13",
|
|
4
4
|
"main": "out/index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"files": [
|
|
@@ -17,11 +17,12 @@
|
|
|
17
17
|
"vue-tsc": "./bin/vue-tsc.js"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@volar/vue-language-core": "1.3.
|
|
21
|
-
"@volar/vue-typescript": "1.3.
|
|
20
|
+
"@volar/vue-language-core": "1.3.13",
|
|
21
|
+
"@volar/vue-typescript": "1.3.13",
|
|
22
|
+
"semver": "^7.3.8"
|
|
22
23
|
},
|
|
23
24
|
"peerDependencies": {
|
|
24
25
|
"typescript": "*"
|
|
25
26
|
},
|
|
26
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "f1f2e7de96e46599a2c84c801f43ecf91d08d4b7"
|
|
27
28
|
}
|