vue-component-meta 1.8.4 → 1.8.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/out/index.js +9 -7
- package/package.json +5 -5
package/out/index.js
CHANGED
|
@@ -20,13 +20,14 @@ const path = require("typesafe-path/posix");
|
|
|
20
20
|
const vue_component_type_helpers_1 = require("vue-component-type-helpers");
|
|
21
21
|
const typescript_1 = require("@volar/typescript");
|
|
22
22
|
__exportStar(require("./types"), exports);
|
|
23
|
+
const windowsPathReg = /\\/g;
|
|
23
24
|
function createComponentMetaCheckerByJsonConfig(root, json, checkerOptions = {}, ts = require('typescript')) {
|
|
24
|
-
const rootPath = root.replace(
|
|
25
|
+
const rootPath = root.replace(windowsPathReg, '/');
|
|
25
26
|
return createComponentMetaCheckerWorker(() => vue.createParsedCommandLineByJson(ts, ts.sys, root, json), checkerOptions, rootPath, path.join(rootPath, 'jsconfig.json.global.vue'), ts);
|
|
26
27
|
}
|
|
27
28
|
exports.createComponentMetaCheckerByJsonConfig = createComponentMetaCheckerByJsonConfig;
|
|
28
29
|
function createComponentMetaChecker(tsconfigPath, checkerOptions = {}, ts = require('typescript')) {
|
|
29
|
-
const tsconfig = tsconfigPath.replace(
|
|
30
|
+
const tsconfig = tsconfigPath.replace(windowsPathReg, '/');
|
|
30
31
|
return createComponentMetaCheckerWorker(() => vue.createParsedCommandLine(ts, ts.sys, tsconfigPath), checkerOptions, path.dirname(tsconfig), tsconfig + '.global.vue', ts);
|
|
31
32
|
}
|
|
32
33
|
exports.createComponentMetaChecker = createComponentMetaChecker;
|
|
@@ -35,11 +36,12 @@ function createComponentMetaCheckerWorker(loadParsedCommandLine, checkerOptions,
|
|
|
35
36
|
* Original Host
|
|
36
37
|
*/
|
|
37
38
|
let parsedCommandLine = loadParsedCommandLine();
|
|
38
|
-
let fileNames = parsedCommandLine.fileNames.map(path => path.replace(
|
|
39
|
+
let fileNames = parsedCommandLine.fileNames.map(path => path.replace(windowsPathReg, '/'));
|
|
39
40
|
let projectVersion = 0;
|
|
40
41
|
const scriptSnapshots = new Map();
|
|
41
42
|
const _host = {
|
|
42
|
-
|
|
43
|
+
workspacePath: rootPath,
|
|
44
|
+
rootPath: rootPath,
|
|
43
45
|
getProjectVersion: () => projectVersion.toString(),
|
|
44
46
|
getCompilationSettings: () => parsedCommandLine.options,
|
|
45
47
|
getScriptFileNames: () => fileNames,
|
|
@@ -57,18 +59,18 @@ function createComponentMetaCheckerWorker(loadParsedCommandLine, checkerOptions,
|
|
|
57
59
|
return {
|
|
58
60
|
...baseCreate(_host, vue.resolveVueCompilerOptions(parsedCommandLine.vueOptions), checkerOptions, globalComponentName, ts),
|
|
59
61
|
updateFile(fileName, text) {
|
|
60
|
-
fileName = fileName.replace(
|
|
62
|
+
fileName = fileName.replace(windowsPathReg, '/');
|
|
61
63
|
scriptSnapshots.set(fileName, ts.ScriptSnapshot.fromString(text));
|
|
62
64
|
projectVersion++;
|
|
63
65
|
},
|
|
64
66
|
deleteFile(fileName) {
|
|
65
|
-
fileName = fileName.replace(
|
|
67
|
+
fileName = fileName.replace(windowsPathReg, '/');
|
|
66
68
|
fileNames = fileNames.filter(f => f !== fileName);
|
|
67
69
|
projectVersion++;
|
|
68
70
|
},
|
|
69
71
|
reload() {
|
|
70
72
|
parsedCommandLine = loadParsedCommandLine();
|
|
71
|
-
fileNames = parsedCommandLine.fileNames.map(path => path.replace(
|
|
73
|
+
fileNames = parsedCommandLine.fileNames.map(path => path.replace(windowsPathReg, '/'));
|
|
72
74
|
this.clearCache();
|
|
73
75
|
},
|
|
74
76
|
clearCache() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vue-component-meta",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.6",
|
|
4
4
|
"main": "out/index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"files": [
|
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
"directory": "packages/vue-component-meta"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@volar/typescript": "~1.
|
|
17
|
-
"@vue/language-core": "1.8.
|
|
16
|
+
"@volar/typescript": "~1.9.0",
|
|
17
|
+
"@vue/language-core": "1.8.6",
|
|
18
18
|
"typesafe-path": "^0.2.2",
|
|
19
|
-
"vue-component-type-helpers": "1.8.
|
|
19
|
+
"vue-component-type-helpers": "1.8.6"
|
|
20
20
|
},
|
|
21
21
|
"peerDependencies": {
|
|
22
22
|
"typescript": "*"
|
|
@@ -26,5 +26,5 @@
|
|
|
26
26
|
"optional": true
|
|
27
27
|
}
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "9da8afee02bc7251ae97716480ba31f8aff2794a"
|
|
30
30
|
}
|