vue-tsc 2.0.12 → 2.0.14

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.
Files changed (2) hide show
  1. package/index.js +3 -4
  2. package/package.json +4 -4
package/index.js CHANGED
@@ -16,10 +16,9 @@ function run() {
16
16
  && runExtensions.every(ext => vueOptions.extensions.includes(ext))) {
17
17
  const writeFile = options.host.writeFile.bind(options.host);
18
18
  options.host.writeFile = (fileName, contents, ...args) => {
19
- contents = removeEmitGlobalTypes(contents);
20
- return writeFile(fileName, contents, ...args);
19
+ return writeFile(fileName, removeEmitGlobalTypes(contents), ...args);
21
20
  };
22
- const vueLanguagePlugin = vue.createVueLanguagePlugin(ts, id => id, options.host?.useCaseSensitiveFileNames?.() ?? false, () => '', () => options.rootNames.map(rootName => rootName.replace(windowsPathReg, '/')), options.options, vueOptions, false);
21
+ const vueLanguagePlugin = vue.createVueLanguagePlugin(ts, id => id, options.host?.useCaseSensitiveFileNames?.() ?? false, () => '', () => options.rootNames.map(rootName => rootName.replace(windowsPathReg, '/')), options.options, vueOptions);
23
22
  return [vueLanguagePlugin];
24
23
  }
25
24
  else {
@@ -42,7 +41,7 @@ function run() {
42
41
  }
43
42
  }
44
43
  exports.run = run;
45
- const removeEmitGlobalTypesRegexp = /[^\n]*__VLS_globalTypesStart[\w\W]*__VLS_globalTypesEnd[^\n]*\n/g;
44
+ const removeEmitGlobalTypesRegexp = /^[^\n]*__VLS_globalTypesStart[\w\W]*__VLS_globalTypesEnd[^\n]*\n?$/mg;
46
45
  function removeEmitGlobalTypes(dts) {
47
46
  return dts.replace(removeEmitGlobalTypesRegexp, '');
48
47
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-tsc",
3
- "version": "2.0.12",
3
+ "version": "2.0.14",
4
4
  "license": "MIT",
5
5
  "files": [
6
6
  "bin",
@@ -16,8 +16,8 @@
16
16
  "vue-tsc": "./bin/vue-tsc.js"
17
17
  },
18
18
  "dependencies": {
19
- "@volar/typescript": "2.2.0-alpha.7",
20
- "@vue/language-core": "2.0.12",
19
+ "@volar/typescript": "2.2.0-alpha.10",
20
+ "@vue/language-core": "2.0.14",
21
21
  "semver": "^7.5.4"
22
22
  },
23
23
  "peerDependencies": {
@@ -26,5 +26,5 @@
26
26
  "devDependencies": {
27
27
  "@types/node": "latest"
28
28
  },
29
- "gitHead": "c1c4e1a2a6c32da59351641bd41bf7f5db0cac69"
29
+ "gitHead": "ce1412067f88b7f9af03a2d3e04c220b4921c363"
30
30
  }