vue-component-meta 3.2.9 → 3.3.1

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.
@@ -313,16 +313,15 @@ function createSchemaResolvers(ts, typeChecker, printer, language, getSourceScri
313
313
  const fileName = declaration.getSourceFile().fileName;
314
314
  const sourceScript = getSourceScript(fileName);
315
315
  if (sourceScript?.generated) {
316
- const script = sourceScript.generated.languagePlugin.typescript?.getServiceScript(sourceScript.generated.root);
317
- if (script) {
318
- for (const [sourceScript, map] of language.maps.forEach(script.code)) {
319
- for (const [start] of map.toSourceLocation(declaration.getStart())) {
320
- for (const [end] of map.toSourceLocation(declaration.getEnd())) {
321
- return {
322
- file: String(sourceScript.id),
323
- range: [start, end],
324
- };
325
- }
316
+ const serviceScript = sourceScript.generated.languagePlugin.typescript?.getServiceScript(sourceScript.generated.root);
317
+ if (serviceScript) {
318
+ const map = language.maps.get(serviceScript.code, sourceScript);
319
+ for (const [start] of map.toSourceLocation(declaration.getStart())) {
320
+ for (const [end] of map.toSourceLocation(declaration.getEnd())) {
321
+ return {
322
+ file: String(sourceScript.id),
323
+ range: [start, end],
324
+ };
326
325
  }
327
326
  }
328
327
  }
@@ -41,7 +41,7 @@ function getDefaultsFromScriptSetup(ts, printer, sourceScript) {
41
41
  if (!virtualCode) {
42
42
  return;
43
43
  }
44
- const sourceFile = virtualCode.sfc.scriptSetup?.ast;
44
+ const sourceFile = virtualCode.ir.scriptSetup?.ast;
45
45
  if (!sourceFile) {
46
46
  return;
47
47
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-component-meta",
3
- "version": "3.2.9",
3
+ "version": "3.3.1",
4
4
  "license": "MIT",
5
5
  "files": [
6
6
  "index.d.ts",
@@ -16,7 +16,7 @@
16
16
  },
17
17
  "dependencies": {
18
18
  "@volar/typescript": "2.4.28",
19
- "@vue/language-core": "3.2.9",
19
+ "@vue/language-core": "3.3.1",
20
20
  "path-browserify": "^1.0.1"
21
21
  },
22
22
  "devDependencies": {
@@ -31,5 +31,5 @@
31
31
  "optional": true
32
32
  }
33
33
  },
34
- "gitHead": "9c1fd47ffe25e86394232dfc76453a5f76cb4fe0"
34
+ "gitHead": "9109bf31282c3d92ca0dd1825b0872a59b572b84"
35
35
  }