vue-tsc 1.8.4 → 1.8.6

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/out/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import * as ts from 'typescript';
1
+ import type * as ts from 'typescript/lib/tsserverlibrary';
2
2
  import * as vue from '@vue/language-core';
3
3
  import * as vueTs from '@vue/typescript';
4
4
  export type Hook = (program: _Program) => void;
package/out/index.js CHANGED
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createProgram = void 0;
4
- const ts = require("typescript");
5
4
  const vue = require("@vue/language-core");
6
5
  const vueTs = require("@vue/typescript");
7
6
  const shared_1 = require("./shared");
7
+ const windowsPathReg = /\\/g;
8
8
  function createProgram(options) {
9
9
  if (!options.options.noEmit && !options.options.emitDeclarationOnly)
10
10
  throw toThrow('js emit is not supported');
@@ -14,6 +14,7 @@ function createProgram(options) {
14
14
  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.');
15
15
  if (!options.host)
16
16
  throw toThrow('!options.host');
17
+ const ts = require('typescript');
17
18
  let program = options.oldProgram;
18
19
  if (shared_1.state.hook) {
19
20
  program = shared_1.state.hook.program;
@@ -36,6 +37,8 @@ function createProgram(options) {
36
37
  const vueCompilerOptions = getVueCompilerOptions();
37
38
  const scripts = new Map();
38
39
  const languageHost = {
40
+ workspacePath: ctx.options.host.getCurrentDirectory().replace(windowsPathReg, '/'),
41
+ rootPath: ctx.options.host.getCurrentDirectory().replace(windowsPathReg, '/'),
39
42
  getCompilationSettings: () => ctx.options.options,
40
43
  getScriptFileNames: () => {
41
44
  return ctx.options.rootNames;
@@ -45,7 +48,6 @@ function createProgram(options) {
45
48
  return ctx.projectVersion.toString();
46
49
  },
47
50
  getProjectReferences: () => ctx.options.projectReferences,
48
- getCurrentDirectory: () => ctx.options.host.getCurrentDirectory().replace(/\\/g, '/'),
49
51
  getCancellationToken: ctx.options.host.getCancellationToken ? () => ctx.options.host.getCancellationToken() : undefined,
50
52
  };
51
53
  const vueTsLs = vueTs.createLanguageService(languageHost, vueCompilerOptions, ts, ts.sys);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-tsc",
3
- "version": "1.8.4",
3
+ "version": "1.8.6",
4
4
  "main": "out/index.js",
5
5
  "license": "MIT",
6
6
  "files": [
@@ -17,12 +17,12 @@
17
17
  "vue-tsc": "./bin/vue-tsc.js"
18
18
  },
19
19
  "dependencies": {
20
- "@vue/language-core": "1.8.4",
21
- "@vue/typescript": "1.8.4",
20
+ "@vue/language-core": "1.8.6",
21
+ "@vue/typescript": "1.8.6",
22
22
  "semver": "^7.3.8"
23
23
  },
24
24
  "peerDependencies": {
25
25
  "typescript": "*"
26
26
  },
27
- "gitHead": "a62aa882911de149ae65f4c28eddfd93e1dee99d"
27
+ "gitHead": "9da8afee02bc7251ae97716480ba31f8aff2794a"
28
28
  }