vue-component-meta 2.1.5 → 2.1.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/lib/base.js +5 -8
- package/package.json +4 -4
package/lib/base.js
CHANGED
|
@@ -19,18 +19,18 @@ exports.createCheckerBase = createCheckerBase;
|
|
|
19
19
|
exports.baseCreate = baseCreate;
|
|
20
20
|
const typescript_1 = require("@volar/typescript");
|
|
21
21
|
const vue = require("@vue/language-core");
|
|
22
|
-
const
|
|
22
|
+
const path_browserify_1 = require("path-browserify");
|
|
23
23
|
const vue_component_type_helpers_1 = require("vue-component-type-helpers");
|
|
24
24
|
const vue2_1 = require("vue-component-type-helpers/vue2");
|
|
25
25
|
__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 baseCreate(ts, () => vue.createParsedCommandLineByJson(ts, ts.sys, rootDir, json), checkerOptions, rootDir,
|
|
29
|
+
return baseCreate(ts, () => vue.createParsedCommandLineByJson(ts, ts.sys, rootDir, json, undefined, true), checkerOptions, rootDir, path_browserify_1.posix.join(rootDir, 'jsconfig.json.global.vue'));
|
|
30
30
|
}
|
|
31
31
|
function createCheckerBase(ts, tsconfig, checkerOptions = {}) {
|
|
32
32
|
tsconfig = tsconfig.replace(windowsPathReg, '/');
|
|
33
|
-
return baseCreate(ts, () => vue.createParsedCommandLine(ts, ts.sys, tsconfig), checkerOptions,
|
|
33
|
+
return baseCreate(ts, () => vue.createParsedCommandLine(ts, ts.sys, tsconfig, true), checkerOptions, path_browserify_1.posix.dirname(tsconfig), tsconfig + '.global.vue');
|
|
34
34
|
}
|
|
35
35
|
function baseCreate(ts, getCommandLine, checkerOptions, rootPath, globalComponentName) {
|
|
36
36
|
let commandLine = getCommandLine();
|
|
@@ -56,10 +56,7 @@ function baseCreate(ts, getCommandLine, checkerOptions, rootPath, globalComponen
|
|
|
56
56
|
getMetaFileName(globalComponentName),
|
|
57
57
|
];
|
|
58
58
|
};
|
|
59
|
-
const vueLanguagePlugin = vue.createVueLanguagePlugin(ts, projectHost.getCompilationSettings(),
|
|
60
|
-
...commandLine.vueOptions,
|
|
61
|
-
__setupedGlobalTypes: () => true,
|
|
62
|
-
}, id => id);
|
|
59
|
+
const vueLanguagePlugin = vue.createVueLanguagePlugin(ts, projectHost.getCompilationSettings(), commandLine.vueOptions, id => id);
|
|
63
60
|
const language = vue.createLanguage([
|
|
64
61
|
vueLanguagePlugin,
|
|
65
62
|
{
|
|
@@ -103,7 +100,7 @@ function baseCreate(ts, getCommandLine, checkerOptions, rootPath, globalComponen
|
|
|
103
100
|
const fileExists = languageServiceHost.fileExists.bind(languageServiceHost);
|
|
104
101
|
const getScriptSnapshot = languageServiceHost.getScriptSnapshot.bind(languageServiceHost);
|
|
105
102
|
const globalTypesName = `${commandLine.vueOptions.lib}_${commandLine.vueOptions.target}_${commandLine.vueOptions.strictTemplates}.d.ts`;
|
|
106
|
-
const globalTypesContents = vue.generateGlobalTypes(
|
|
103
|
+
const globalTypesContents = `// @ts-nocheck\nexport {};\n` + vue.generateGlobalTypes(commandLine.vueOptions.lib, commandLine.vueOptions.target, commandLine.vueOptions.strictTemplates);
|
|
107
104
|
const globalTypesSnapshot = {
|
|
108
105
|
getText: (start, end) => globalTypesContents.substring(start, end),
|
|
109
106
|
getLength: () => globalTypesContents.length,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vue-component-meta",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.6",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"files": [
|
|
6
6
|
"**/*.js",
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
15
|
"@volar/typescript": "~2.4.1",
|
|
16
|
-
"@vue/language-core": "2.1.
|
|
16
|
+
"@vue/language-core": "2.1.6",
|
|
17
17
|
"path-browserify": "^1.0.1",
|
|
18
|
-
"vue-component-type-helpers": "2.1.
|
|
18
|
+
"vue-component-type-helpers": "2.1.6"
|
|
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": "
|
|
32
|
+
"gitHead": "fd61953ce9eb924eeaf4df0bf8d2237267321194"
|
|
33
33
|
}
|