@volar/language-service 1.0.0-alpha.1 → 1.0.0-alpha.3

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.
@@ -11,12 +11,22 @@ Object.defineProperty(exports, "__esModule", { value: true });
11
11
  exports.register = void 0;
12
12
  const rename_1 = require("./rename");
13
13
  const dedupe = require("../utils/dedupe");
14
+ const language_core_1 = require("@volar/language-core");
14
15
  function register(context) {
15
16
  return (oldUri, newUri) => __awaiter(this, void 0, void 0, function* () {
16
17
  const vueDocument = context.documents.get(oldUri);
17
18
  if (vueDocument) {
18
- oldUri += '.ts';
19
- newUri += '.ts';
19
+ let tsExt;
20
+ (0, language_core_1.forEachEmbeddeds)(vueDocument.file.embeddeds, embedded => {
21
+ if (embedded.isTsHostFile && embedded.fileName.replace(vueDocument.file.fileName, '').match(/^\.(js|ts)x?$/)) {
22
+ tsExt = embedded.fileName.substring(embedded.fileName.lastIndexOf('.'));
23
+ }
24
+ });
25
+ if (!tsExt) {
26
+ return;
27
+ }
28
+ oldUri += tsExt;
29
+ newUri += tsExt;
20
30
  }
21
31
  for (const plugin of context.plugins) {
22
32
  if (!plugin.doFileRename)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@volar/language-service",
3
- "version": "1.0.0-alpha.1",
3
+ "version": "1.0.0-alpha.3",
4
4
  "main": "out/index.js",
5
5
  "license": "MIT",
6
6
  "files": [
@@ -16,11 +16,11 @@
16
16
  "typescript": "latest"
17
17
  },
18
18
  "dependencies": {
19
- "@volar/language-core": "1.0.0-alpha.1",
20
- "@volar/shared": "1.0.0-alpha.1",
21
- "@volar/source-map": "1.0.0-alpha.1",
22
- "@volar/transforms": "1.0.0-alpha.1",
23
- "@volar/typescript-faster": "1.0.0-alpha.1",
19
+ "@volar/language-core": "1.0.0-alpha.3",
20
+ "@volar/shared": "1.0.0-alpha.3",
21
+ "@volar/source-map": "1.0.0-alpha.3",
22
+ "@volar/transforms": "1.0.0-alpha.3",
23
+ "@volar/typescript-faster": "1.0.0-alpha.3",
24
24
  "@vue/reactivity": "^3.2.38",
25
25
  "upath": "^2.0.1",
26
26
  "vscode-html-languageservice": "^5.0.1",
@@ -29,5 +29,5 @@
29
29
  "vscode-languageserver-textdocument": "^1.0.7",
30
30
  "vscode-uri": "^3.0.3"
31
31
  },
32
- "gitHead": "3dfd4076f0ca0aa88867ba4fea2979a32ca74ffc"
32
+ "gitHead": "55a1d3fa143411dd4520020f407e427df4e4e26a"
33
33
  }