vue-tsc 1.6.4 → 1.7.0
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/README.md +2 -2
- package/out/index.d.ts +2 -2
- package/out/index.js +4 -5
- package/package.json +4 -5
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@ Install: `npm i vue-tsc -D`
|
|
|
4
4
|
|
|
5
5
|
Usage: `vue-tsc --noEmit && vite build`
|
|
6
6
|
|
|
7
|
-
Vue 3 command line Type-Checking tool base on IDE plugin [Volar](https://github.com/
|
|
7
|
+
Vue 3 command line Type-Checking tool base on IDE plugin [Volar](https://github.com/vuejs/language-tools).
|
|
8
8
|
|
|
9
9
|
Roadmap:
|
|
10
10
|
|
|
@@ -25,7 +25,7 @@ Build dts:
|
|
|
25
25
|
|
|
26
26
|
`vue-tsc --declaration --emitDeclarationOnly`
|
|
27
27
|
|
|
28
|
-
Check out https://github.com/
|
|
28
|
+
Check out https://github.com/vuejs/language-tools/discussions/640#discussioncomment-1555479 for example repo.
|
|
29
29
|
|
|
30
30
|
## Sponsors
|
|
31
31
|
|
package/out/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as ts from 'typescript';
|
|
2
|
-
import * as vue from '@
|
|
3
|
-
import * as vueTs from '@
|
|
2
|
+
import * as vue from '@vue/language-core';
|
|
3
|
+
import * as vueTs from '@vue/typescript';
|
|
4
4
|
export type Hook = (program: _Program) => void;
|
|
5
5
|
export type _Program = ts.Program & {
|
|
6
6
|
__vue: ProgramContext;
|
package/out/index.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createProgram = void 0;
|
|
4
4
|
const ts = require("typescript");
|
|
5
|
-
const vue = require("@
|
|
6
|
-
const vueTs = require("@
|
|
5
|
+
const vue = require("@vue/language-core");
|
|
6
|
+
const vueTs = require("@vue/typescript");
|
|
7
7
|
const shared_1 = require("./shared");
|
|
8
8
|
function createProgram(options) {
|
|
9
9
|
if (!options.options.noEmit && !options.options.emitDeclarationOnly)
|
|
@@ -67,9 +67,8 @@ function createProgram(options) {
|
|
|
67
67
|
function getVueCompilerOptions() {
|
|
68
68
|
const tsConfig = ctx.options.options.configFilePath;
|
|
69
69
|
if (typeof tsConfig === 'string') {
|
|
70
|
-
return vue.createParsedCommandLine(ts, ts.sys, tsConfig
|
|
70
|
+
return vue.createParsedCommandLine(ts, ts.sys, tsConfig).vueOptions;
|
|
71
71
|
}
|
|
72
|
-
return {};
|
|
73
72
|
}
|
|
74
73
|
function getScriptVersion(fileName) {
|
|
75
74
|
return getScript(fileName)?.version ?? '';
|
|
@@ -107,7 +106,7 @@ function createProgram(options) {
|
|
|
107
106
|
ctx.projectVersion++;
|
|
108
107
|
}
|
|
109
108
|
const vueCompilerOptions = program.__vue.languageServiceHost.getVueCompilationSettings();
|
|
110
|
-
if (vueCompilerOptions
|
|
109
|
+
if (vueCompilerOptions?.hooks) {
|
|
111
110
|
const index = (shared_1.state.hook?.index ?? -1) + 1;
|
|
112
111
|
if (index < vueCompilerOptions.hooks.length) {
|
|
113
112
|
const hookPath = vueCompilerOptions.hooks[index];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vue-tsc",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"main": "out/index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"files": [
|
|
@@ -17,12 +17,11 @@
|
|
|
17
17
|
"vue-tsc": "./bin/vue-tsc.js"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@
|
|
21
|
-
"@
|
|
20
|
+
"@vue/language-core": "1.7.0",
|
|
21
|
+
"@vue/typescript": "1.7.0",
|
|
22
22
|
"semver": "^7.3.8"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"typescript": "*"
|
|
26
|
-
}
|
|
27
|
-
"gitHead": "c3d0c6a719159776f8d1899b35c2500286fe338c"
|
|
26
|
+
}
|
|
28
27
|
}
|