Skip to content

Commit c211f3e

Browse files
committed
fix(component-meta): re-export vue-component-type-helpers to lib/helpers
close #5600
1 parent 374bd7a commit c211f3e

File tree

7 files changed

+16
-17
lines changed

7 files changed

+16
-17
lines changed

lerna.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
},
88
"exact": true,
99
"forcePublish": true,
10-
"allowPeerDependenciesUpdate": true,
1110
"npmClient": "pnpm",
1211
"packages": [
1312
"extensions/**",

packages/component-meta/lib/base.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,8 @@ export function baseCreate(
199199

200200
function getMetaScriptContent(fileName: string) {
201201
let code = `
202-
import type { ComponentType, ComponentProps, ComponentEmit, ComponentSlots, ComponentExposed } from 'vue-component-type-helpers';
203-
import * as Components from '${fileName.slice(0, -'.meta.ts'.length)}';
202+
import type { ComponentType, ComponentProps, ComponentEmit, ComponentSlots, ComponentExposed } from 'vue-component-meta/lib/helpers';
203+
import type * as Components from '${fileName.slice(0, -'.meta.ts'.length)}';
204204
205205
export default {} as { [K in keyof typeof Components]: ComponentMeta<typeof Components[K]>; };
206206
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export type * from 'vue-component-type-helpers';

packages/component-meta/package.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,14 @@
1515
"dependencies": {
1616
"@volar/typescript": "2.4.22",
1717
"@vue/language-core": "3.0.5",
18-
"path-browserify": "^1.0.1"
18+
"path-browserify": "^1.0.1",
19+
"vue-component-type-helpers": "3.0.5"
1920
},
2021
"peerDependencies": {
21-
"typescript": "*",
22-
"vue-component-type-helpers": "3.0.5"
22+
"typescript": "*"
2323
},
2424
"devDependencies": {
2525
"@types/node": "^22.10.4",
26-
"@types/path-browserify": "^1.0.1",
27-
"vue-component-type-helpers": "3.0.5"
26+
"@types/path-browserify": "^1.0.1"
2827
}
2928
}

pnpm-lock.yaml

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test-workspace/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"devDependencies": {
55
"typescript": "latest",
66
"vue": "https://pkg.pr.new/vue@e1bc0eb02e22bc0c236e1471c11d96a368764b72",
7-
"vue-component-type-helpers": "3.0.5",
7+
"vue-component-meta": "3.0.5",
88
"vue3.4": "npm:[email protected]"
99
}
1010
}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<script lang="ts">
2-
import type { ComponentProps, ComponentSlots, ComponentEmit, ComponentExposed } from 'vue-component-type-helpers';
2+
import type { ComponentEmit, ComponentExposed, ComponentProps, ComponentSlots } from 'vue-component-meta/lib/helpers';
33
import { exactType } from '../../shared';
4+
import type scriptSetupGeneric from '../components/script-setup-generic.vue';
45
import ScriptSetup from '../components/script-setup.vue';
5-
import scriptSetupGeneric from '../components/script-setup-generic.vue';
66
77
exactType((new ScriptSetup()).$props, {} as ComponentProps<typeof ScriptSetup>);
88
exactType((new ScriptSetup()).$emit, {} as ComponentEmit<typeof ScriptSetup>);
99
exactType((new ScriptSetup()).$slots, {} as ComponentSlots<typeof ScriptSetup>);
1010
exactType((new ScriptSetup()), {} as ComponentExposed<typeof ScriptSetup>);
11-
exactType({} as ComponentExposed<typeof scriptSetupGeneric>, {} as { baz: unknown, buz: 1 })
11+
exactType({} as ComponentExposed<typeof scriptSetupGeneric>, {} as { baz: unknown, buz: 1; });
1212
</script>

0 commit comments

Comments
 (0)