@vue/language-core 1.8.22 → 1.9.0-alpha.0
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/generators/script.js +3 -3
- package/out/languageModule.d.ts +1 -1
- package/out/languageModule.js +3 -3
- package/out/utils/ts.js +1 -1
- package/package.json +7 -4
package/out/generators/script.js
CHANGED
|
@@ -4,7 +4,7 @@ exports.generate = void 0;
|
|
|
4
4
|
const language_core_1 = require("@volar/language-core");
|
|
5
5
|
const source_map_1 = require("@volar/source-map");
|
|
6
6
|
const muggle = require("muggle-string");
|
|
7
|
-
const
|
|
7
|
+
const path = require("path-browserify");
|
|
8
8
|
const shared_1 = require("../utils/shared");
|
|
9
9
|
const transform_1 = require("../utils/transform");
|
|
10
10
|
function generate(ts, fileName, script, scriptSetup, styles, // TODO: computed it
|
|
@@ -674,7 +674,7 @@ declare function defineProp<T>(value?: T | (() => T), required?: boolean, rest?:
|
|
|
674
674
|
codes.push(`});\n`); // defineComponent({
|
|
675
675
|
}
|
|
676
676
|
else if (script) {
|
|
677
|
-
codes.push(`let __VLS_internalComponent!: typeof import('./${
|
|
677
|
+
codes.push(`let __VLS_internalComponent!: typeof import('./${path.basename(fileName)}')['default'];\n`);
|
|
678
678
|
}
|
|
679
679
|
else {
|
|
680
680
|
codes.push(`const __VLS_internalComponent = (await import('${vueCompilerOptions.lib}')).defineComponent({});\n`);
|
|
@@ -709,7 +709,7 @@ declare function defineProp<T>(value?: T | (() => T), required?: boolean, rest?:
|
|
|
709
709
|
codes.push(`;\n`);
|
|
710
710
|
}
|
|
711
711
|
else if (scriptSetup) {
|
|
712
|
-
codes.push(`let __VLS_name!: '${
|
|
712
|
+
codes.push(`let __VLS_name!: '${path.basename(fileName.substring(0, fileName.lastIndexOf('.')))}';\n`);
|
|
713
713
|
}
|
|
714
714
|
else {
|
|
715
715
|
codes.push(`const __VLS_name = undefined;\n`);
|
package/out/languageModule.d.ts
CHANGED
|
@@ -6,5 +6,5 @@ export declare function createVueLanguage(ts: typeof import('typescript/lib/tsse
|
|
|
6
6
|
/**
|
|
7
7
|
* @deprecated planed to remove in 2.0, please use createVueLanguage instead of
|
|
8
8
|
*/
|
|
9
|
-
export declare function createLanguages(compilerOptions?: ts.CompilerOptions, vueCompilerOptions?: Partial<VueCompilerOptions>,
|
|
9
|
+
export declare function createLanguages(ts: typeof import('typescript/lib/tsserverlibrary'), compilerOptions?: ts.CompilerOptions, vueCompilerOptions?: Partial<VueCompilerOptions>, codegenStack?: boolean): Language[];
|
|
10
10
|
//# sourceMappingURL=languageModule.d.ts.map
|
package/out/languageModule.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createLanguages = exports.createVueLanguage = void 0;
|
|
4
|
-
const
|
|
4
|
+
const path = require("path-browserify");
|
|
5
5
|
const plugins_1 = require("./plugins");
|
|
6
6
|
const vueFile_1 = require("./virtualFile/vueFile");
|
|
7
7
|
const sharedTypes = require("./utils/globalTypes");
|
|
@@ -60,7 +60,7 @@ function createVueLanguage(ts, compilerOptions = {}, _vueCompilerOptions = {}, c
|
|
|
60
60
|
},
|
|
61
61
|
resolveHost(host) {
|
|
62
62
|
const sharedTypesSnapshot = ts.ScriptSnapshot.fromString(sharedTypes.getTypesCode(vueCompilerOptions));
|
|
63
|
-
const sharedTypesFileName =
|
|
63
|
+
const sharedTypesFileName = path.join(host.rootPath, sharedTypes.baseName);
|
|
64
64
|
return {
|
|
65
65
|
...host,
|
|
66
66
|
resolveModuleName(moduleName, impliedNodeFormat) {
|
|
@@ -89,7 +89,7 @@ exports.createVueLanguage = createVueLanguage;
|
|
|
89
89
|
/**
|
|
90
90
|
* @deprecated planed to remove in 2.0, please use createVueLanguage instead of
|
|
91
91
|
*/
|
|
92
|
-
function createLanguages(compilerOptions = {}, vueCompilerOptions = {},
|
|
92
|
+
function createLanguages(ts, compilerOptions = {}, vueCompilerOptions = {}, codegenStack = false) {
|
|
93
93
|
return [
|
|
94
94
|
createVueLanguage(ts, compilerOptions, vueCompilerOptions, codegenStack),
|
|
95
95
|
...vueCompilerOptions.experimentalAdditionalLanguageModules?.map(module => require(module)) ?? [],
|
package/out/utils/ts.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.resolveVueCompilerOptions = exports.createParsedCommandLine = exports.createParsedCommandLineByJson = void 0;
|
|
4
|
-
const path = require("path");
|
|
4
|
+
const path = require("path-browserify");
|
|
5
5
|
function createParsedCommandLineByJson(ts, parseConfigHost, rootDir, json, configFileName = rootDir + '/jsconfig.json') {
|
|
6
6
|
const proxyHost = proxyParseConfigHostForExtendConfigPaths(parseConfigHost);
|
|
7
7
|
ts.parseJsonConfigFileContent(json, proxyHost.host, rootDir, {}, configFileName);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue/language-core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.9.0-alpha.0",
|
|
4
4
|
"main": "out/index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"files": [
|
|
@@ -13,17 +13,20 @@
|
|
|
13
13
|
"directory": "packages/language-core"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@volar/language-core": "~1.10.
|
|
17
|
-
"@volar/source-map": "~1.10.
|
|
16
|
+
"@volar/language-core": "~1.10.9",
|
|
17
|
+
"@volar/source-map": "~1.10.9",
|
|
18
18
|
"@vue/compiler-dom": "^3.3.0",
|
|
19
19
|
"@vue/shared": "^3.3.0",
|
|
20
20
|
"computeds": "^0.0.1",
|
|
21
21
|
"minimatch": "^9.0.3",
|
|
22
22
|
"muggle-string": "^0.3.1",
|
|
23
|
+
"path-browserify": "^1.0.1",
|
|
23
24
|
"vue-template-compiler": "^2.7.14"
|
|
24
25
|
},
|
|
25
26
|
"devDependencies": {
|
|
26
27
|
"@types/minimatch": "^5.1.2",
|
|
28
|
+
"@types/node": "latest",
|
|
29
|
+
"@types/path-browserify": "^1.0.1",
|
|
27
30
|
"@vue/compiler-sfc": "^3.3.0"
|
|
28
31
|
},
|
|
29
32
|
"peerDependencies": {
|
|
@@ -34,5 +37,5 @@
|
|
|
34
37
|
"optional": true
|
|
35
38
|
}
|
|
36
39
|
},
|
|
37
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "d6905e4d4d1208f560a544509494f33f431b602a"
|
|
38
41
|
}
|