vue-component-meta 2.0.23-alpha.1 → 2.0.24

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/lib/base.d.ts CHANGED
@@ -25,7 +25,7 @@ export declare function createCheckerBase(ts: typeof import('typescript'), tscon
25
25
  tsLs: ts.LanguageService;
26
26
  };
27
27
  };
28
- export declare function baseCreate(ts: typeof import('typescript'), configFileName: string | undefined, projectHost: TypeScriptProjectHost, vueCompilerOptions: vue.VueCompilerOptions, checkerOptions: MetaCheckerOptions, globalComponentName: string): {
28
+ export declare function baseCreate(ts: typeof import('typescript'), projectHost: TypeScriptProjectHost, vueCompilerOptions: vue.VueCompilerOptions, checkerOptions: MetaCheckerOptions, globalComponentName: string): {
29
29
  getExportNames: (componentPath: string) => string[];
30
30
  getComponentMeta: (componentPath: string, exportName?: string) => ComponentMeta;
31
31
  __internal__: {
package/lib/base.js CHANGED
@@ -26,13 +26,13 @@ __exportStar(require("./types"), exports);
26
26
  const windowsPathReg = /\\/g;
27
27
  function createCheckerByJsonConfigBase(ts, rootDir, json, checkerOptions = {}) {
28
28
  rootDir = rootDir.replace(windowsPathReg, '/');
29
- return createCheckerWorker(ts, () => vue.createParsedCommandLineByJson(ts, ts.sys, rootDir, json), checkerOptions, rootDir, path.join(rootDir, 'jsconfig.json.global.vue'), undefined);
29
+ return createCheckerWorker(ts, () => vue.createParsedCommandLineByJson(ts, ts.sys, rootDir, json), checkerOptions, rootDir, path.join(rootDir, 'jsconfig.json.global.vue'));
30
30
  }
31
31
  function createCheckerBase(ts, tsconfig, checkerOptions = {}) {
32
32
  tsconfig = tsconfig.replace(windowsPathReg, '/');
33
- return createCheckerWorker(ts, () => vue.createParsedCommandLine(ts, ts.sys, tsconfig), checkerOptions, path.dirname(tsconfig), tsconfig + '.global.vue', tsconfig);
33
+ return createCheckerWorker(ts, () => vue.createParsedCommandLine(ts, ts.sys, tsconfig), checkerOptions, path.dirname(tsconfig), tsconfig + '.global.vue');
34
34
  }
35
- function createCheckerWorker(ts, loadParsedCommandLine, checkerOptions, rootPath, globalComponentName, configFileName) {
35
+ function createCheckerWorker(ts, loadParsedCommandLine, checkerOptions, rootPath, globalComponentName) {
36
36
  /**
37
37
  * Original Host
38
38
  */
@@ -57,7 +57,7 @@ function createCheckerWorker(ts, loadParsedCommandLine, checkerOptions, rootPath
57
57
  },
58
58
  };
59
59
  return {
60
- ...baseCreate(ts, configFileName, projectHost, parsedCommandLine.vueOptions, checkerOptions, globalComponentName),
60
+ ...baseCreate(ts, projectHost, parsedCommandLine.vueOptions, checkerOptions, globalComponentName),
61
61
  updateFile(fileName, text) {
62
62
  fileName = fileName.replace(windowsPathReg, '/');
63
63
  scriptSnapshots.set(fileName, ts.ScriptSnapshot.fromString(text));
@@ -79,7 +79,7 @@ function createCheckerWorker(ts, loadParsedCommandLine, checkerOptions, rootPath
79
79
  },
80
80
  };
81
81
  }
82
- function baseCreate(ts, configFileName, projectHost, vueCompilerOptions, checkerOptions, globalComponentName) {
82
+ function baseCreate(ts, projectHost, vueCompilerOptions, checkerOptions, globalComponentName) {
83
83
  const globalComponentSnapshot = ts.ScriptSnapshot.fromString('<script setup lang="ts"></script>');
84
84
  const metaSnapshots = {};
85
85
  const getScriptFileNames = projectHost.getScriptFileNames;
@@ -130,17 +130,7 @@ function baseCreate(ts, configFileName, projectHost, vueCompilerOptions, checker
130
130
  language.scripts.delete(fileName);
131
131
  }
132
132
  });
133
- language.typescript = {
134
- sys: ts.sys,
135
- configFileName,
136
- asFileName: s => s,
137
- asScriptId: s => s,
138
- ...(0, typescript_1.createLanguageServiceHost)(ts, ts.sys, language, s => s, projectHost),
139
- };
140
- language.vue = {
141
- compilerOptions: vueCompilerOptions,
142
- };
143
- const { languageServiceHost } = language.typescript;
133
+ const { languageServiceHost } = (0, typescript_1.createLanguageServiceHost)(ts, ts.sys, language, s => s, projectHost);
144
134
  const tsLs = ts.createLanguageService(languageServiceHost);
145
135
  if (checkerOptions.forceUseTs) {
146
136
  const getScriptKind = languageServiceHost.getScriptKind?.bind(languageServiceHost);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-component-meta",
3
- "version": "2.0.23-alpha.1",
3
+ "version": "2.0.24",
4
4
  "license": "MIT",
5
5
  "files": [
6
6
  "**/*.js",
@@ -12,10 +12,10 @@
12
12
  "directory": "packages/component-meta"
13
13
  },
14
14
  "dependencies": {
15
- "@volar/typescript": "~2.4.0-alpha.0",
16
- "@vue/language-core": "2.0.23-alpha.1",
15
+ "@volar/typescript": "~2.4.0-alpha.2",
16
+ "@vue/language-core": "2.0.24",
17
17
  "path-browserify": "^1.0.1",
18
- "vue-component-type-helpers": "2.0.23-alpha.1"
18
+ "vue-component-type-helpers": "2.0.24"
19
19
  },
20
20
  "peerDependencies": {
21
21
  "typescript": "*"
@@ -29,5 +29,5 @@
29
29
  "@types/node": "latest",
30
30
  "@types/path-browserify": "latest"
31
31
  },
32
- "gitHead": "70cb34e9d58afd603d50cb5b870116b189f4662b"
32
+ "gitHead": "bca79db09e413ef29c17b910271c123a7a68806f"
33
33
  }