@vue/language-core 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/index.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- import type { VueCompilerOptions } from './lib/types';
2
1
  export * from './lib/codegen/template';
3
2
  export * from './lib/languageModule';
4
3
  export * from './lib/parsers/scriptSetupRanges';
@@ -12,10 +11,3 @@ export * from './lib/utils/shared';
12
11
  export { tsCodegen } from './lib/plugins/vue-tsx';
13
12
  export * from '@volar/language-core';
14
13
  export type * as CompilerDOM from '@vue/compiler-dom';
15
- declare module '@volar/language-core' {
16
- interface Language {
17
- vue?: {
18
- compilerOptions: VueCompilerOptions;
19
- };
20
- }
21
- }
@@ -6,13 +6,13 @@ const plugin = () => {
6
6
  version: 2,
7
7
  getEmbeddedCodes(_fileName, sfc) {
8
8
  return sfc.customBlocks.map((customBlock, i) => ({
9
- id: 'customBlock_' + i,
9
+ id: 'custom_block_' + i,
10
10
  lang: customBlock.lang,
11
11
  }));
12
12
  },
13
13
  resolveEmbeddedCode(_fileName, sfc, embeddedFile) {
14
- if (embeddedFile.id.startsWith('customBlock_')) {
15
- const index = parseInt(embeddedFile.id.slice('customBlock_'.length));
14
+ if (embeddedFile.id.startsWith('custom_block_')) {
15
+ const index = parseInt(embeddedFile.id.slice('custom_block_'.length));
16
16
  const customBlock = sfc.customBlocks[index];
17
17
  embeddedFile.content.push([
18
18
  customBlock.content,
@@ -30,7 +30,6 @@ function computedSfc(ts, plugins, fileName, snapshot, parsed) {
30
30
  const ast = plugin.compileSFCScript?.(base.lang, base.content);
31
31
  if (ast) {
32
32
  return ast;
33
- ;
34
33
  }
35
34
  }
36
35
  return ts.createSourceFile(fileName + '.' + base.lang, '', 99);
@@ -55,7 +54,6 @@ function computedSfc(ts, plugins, fileName, snapshot, parsed) {
55
54
  const ast = plugin.compileSFCScript?.(base.lang, base.content);
56
55
  if (ast) {
57
56
  return ast;
58
- ;
59
57
  }
60
58
  }
61
59
  return ts.createSourceFile(fileName + '.' + base.lang, '', 99);
@@ -101,7 +99,7 @@ function computedSfc(ts, plugins, fileName, snapshot, parsed) {
101
99
  }));
102
100
  });
103
101
  const customBlocks = (0, computeds_1.computedArray)((0, computeds_1.computed)(() => parsed()?.descriptor.customBlocks ?? []), (block, i) => {
104
- const base = computedSfcBlock('customBlock_' + i, 'txt', block);
102
+ const base = computedSfcBlock('custom_block_' + i, 'txt', block);
105
103
  const type = (0, computeds_1.computed)(() => block().type);
106
104
  return (0, computeds_1.computed)(() => mergeObject(base, {
107
105
  get type() { return type(); },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vue/language-core",
3
- "version": "2.0.23-alpha.1",
3
+ "version": "2.0.24",
4
4
  "license": "MIT",
5
5
  "files": [
6
6
  "**/*.js",
@@ -12,7 +12,7 @@
12
12
  "directory": "packages/language-core"
13
13
  },
14
14
  "dependencies": {
15
- "@volar/language-core": "~2.4.0-alpha.0",
15
+ "@volar/language-core": "~2.4.0-alpha.2",
16
16
  "@vue/compiler-dom": "^3.4.0",
17
17
  "@vue/shared": "^3.4.0",
18
18
  "computeds": "^0.0.1",
@@ -25,7 +25,7 @@
25
25
  "@types/minimatch": "^5.1.2",
26
26
  "@types/node": "latest",
27
27
  "@types/path-browserify": "^1.0.1",
28
- "@volar/typescript": "~2.4.0-alpha.0",
28
+ "@volar/typescript": "~2.4.0-alpha.2",
29
29
  "@vue/compiler-sfc": "^3.4.0"
30
30
  },
31
31
  "peerDependencies": {
@@ -36,5 +36,5 @@
36
36
  "optional": true
37
37
  }
38
38
  },
39
- "gitHead": "70cb34e9d58afd603d50cb5b870116b189f4662b"
39
+ "gitHead": "bca79db09e413ef29c17b910271c123a7a68806f"
40
40
  }