vue-tsc 1.0.22 → 1.1.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/bin/vue-tsc.js +0 -3
- package/out/index.d.ts +2 -3
- package/out/index.js +4 -7
- package/package.json +5 -5
package/bin/vue-tsc.js
CHANGED
|
@@ -14,9 +14,6 @@ fs.readFileSync = (...args) => {
|
|
|
14
14
|
tryReplace(/supportedJSExtensions = .*(?=;)/, s => s + '.concat([[".vue"]])');
|
|
15
15
|
tryReplace(/allSupportedExtensions = .*(?=;)/, s => s + '.concat([[".vue"]])');
|
|
16
16
|
|
|
17
|
-
// proxy startTracing, dumpTracingLegend
|
|
18
|
-
tryReplace(/ = tracingEnabled\./g, ` = require(${JSON.stringify(proxyApiPath)}).loadTsLib().`);
|
|
19
|
-
|
|
20
17
|
// proxy createProgram apis
|
|
21
18
|
tryReplace(/function createProgram\(.+\) {/, s => s + ` return require(${JSON.stringify(proxyApiPath)}).createProgram(...arguments);`);
|
|
22
19
|
|
package/out/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as ts from 'typescript';
|
|
2
2
|
import * as vue from '@volar/vue-language-core';
|
|
3
3
|
import * as vueTs from '@volar/vue-typescript';
|
|
4
|
+
export type Hook = (program: _Program) => void;
|
|
4
5
|
export type _Program = ts.Program & {
|
|
5
6
|
__vue: ProgramContext;
|
|
6
7
|
};
|
|
@@ -10,7 +11,5 @@ interface ProgramContext {
|
|
|
10
11
|
languageServiceHost: vue.VueLanguageServiceHost;
|
|
11
12
|
languageService: ReturnType<typeof vueTs.createLanguageService>;
|
|
12
13
|
}
|
|
13
|
-
export declare function createProgram(options: ts.CreateProgramOptions
|
|
14
|
-
_options?: ts.CompilerOptions, _host?: ts.CompilerHost, _oldProgram?: ts.Program, _configFileParsingDiagnostics?: readonly ts.Diagnostic[]): _Program;
|
|
15
|
-
export declare function loadTsLib(): typeof ts;
|
|
14
|
+
export declare function createProgram(options: ts.CreateProgramOptions): _Program;
|
|
16
15
|
export {};
|
package/out/index.js
CHANGED
|
@@ -8,18 +8,19 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
-
exports.
|
|
11
|
+
exports.createProgram = void 0;
|
|
12
12
|
const ts = require("typescript");
|
|
13
13
|
const vue = require("@volar/vue-language-core");
|
|
14
14
|
const vueTs = require("@volar/vue-typescript");
|
|
15
15
|
const shared_1 = require("./shared");
|
|
16
|
-
function createProgram(options
|
|
17
|
-
_options, _host, _oldProgram, _configFileParsingDiagnostics) {
|
|
16
|
+
function createProgram(options) {
|
|
18
17
|
var _a, _b;
|
|
19
18
|
if (!options.options.noEmit && !options.options.emitDeclarationOnly)
|
|
20
19
|
throw toThrow('js emit is not supported');
|
|
21
20
|
if (!options.options.noEmit && options.options.noEmitOnError)
|
|
22
21
|
throw toThrow('noEmitOnError is not supported');
|
|
22
|
+
if (options.options.extendedDiagnostics || options.options.generateTrace)
|
|
23
|
+
throw toThrow('--extendedDiagnostics / --generateTrace is not supported, please run `Write Virtual Files` in VSCode to write virtual files and use `--extendedDiagnostics` / `--generateTrace` via tsc instead of vue-tsc to debug.');
|
|
23
24
|
if (!options.host)
|
|
24
25
|
throw toThrow('!options.host');
|
|
25
26
|
let program = options.oldProgram;
|
|
@@ -137,10 +138,6 @@ _options, _host, _oldProgram, _configFileParsingDiagnostics) {
|
|
|
137
138
|
return program;
|
|
138
139
|
}
|
|
139
140
|
exports.createProgram = createProgram;
|
|
140
|
-
function loadTsLib() {
|
|
141
|
-
return ts;
|
|
142
|
-
}
|
|
143
|
-
exports.loadTsLib = loadTsLib;
|
|
144
141
|
function toThrow(msg) {
|
|
145
142
|
console.error(msg);
|
|
146
143
|
return msg;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vue-tsc",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"main": "out/index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"files": [
|
|
@@ -11,17 +11,17 @@
|
|
|
11
11
|
"repository": {
|
|
12
12
|
"type": "git",
|
|
13
13
|
"url": "https://github.com/johnsoncodehk/volar.git",
|
|
14
|
-
"directory": "
|
|
14
|
+
"directory": "packages/vue-tsc"
|
|
15
15
|
},
|
|
16
16
|
"bin": {
|
|
17
17
|
"vue-tsc": "./bin/vue-tsc.js"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@volar/vue-language-core": "1.0
|
|
21
|
-
"@volar/vue-typescript": "1.0
|
|
20
|
+
"@volar/vue-language-core": "1.1.0",
|
|
21
|
+
"@volar/vue-typescript": "1.1.0"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
24
|
"typescript": "*"
|
|
25
25
|
},
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "49ea0e360354fd2833ae8250f8f02f0ff3eb341c"
|
|
27
27
|
}
|