Skip to content

Commit 7a5fe9a

Browse files
authored
feat: upgrade Volar to 2 (#336)
* wip: update * feat: upgrade volar to 2 * feat: watch
1 parent bd1b52a commit 7a5fe9a

19 files changed

Lines changed: 1043 additions & 1129 deletions

.husky/commit-msg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/sh
2-
. "$(dirname "$0")/_/husky.sh"
3-
. "$(dirname "$0")/common.sh"
2+
. "$(dirname "$0")/husky.sh"
3+
. "$(dirname "$0")/../common.sh"
44

55
npx --no-install commitlint --edit "$1"

.husky/pre-commit

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/sh
2-
. "$(dirname "$0")/_/husky.sh"
3-
. "$(dirname "$0")/common.sh"
2+
. "$(dirname "$0")/husky.sh"
3+
. "$(dirname "$0")/../common.sh"
44

55
[ -n "$CI" ] && exit 0
66

examples/react/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"@types/react-dom": "^18.2.22",
1717
"@vitejs/plugin-react": "^4.2.1",
1818
"tslib": "^2.6.2",
19-
"typescript": "5.4.3",
20-
"vite": "^5.2.6"
19+
"typescript": "5.5.3",
20+
"vite": "^5.3.4"
2121
}
2222
}

examples/svelte/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"svelte": "^4.2.12",
1414
"svelte-check": "^3.6.8",
1515
"tslib": "^2.6.2",
16-
"typescript": "5.4.3",
17-
"vite": "^5.2.6"
16+
"typescript": "5.5.3",
17+
"vite": "^5.3.4"
1818
}
1919
}

examples/ts/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"types": "dist/ts-test.d.ts",
1212
"devDependencies": {
1313
"tslib": "^2.6.2",
14-
"typescript": "5.4.3",
15-
"vite": "^5.2.6"
14+
"typescript": "5.5.3",
15+
"vite": "^5.3.4"
1616
}
1717
}

examples/ts/src/test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ export interface TestBase {
22
name: string
33
}
44

5+
/**
6+
* Comment
7+
*/
58
export interface Component {
69
name: string,
710
type: string

examples/ts/vite.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export default defineConfig({
2929
// aliasesExclude: [/^@components/],
3030
staticImport: true,
3131
// insertTypesEntry: true,
32-
rollupTypes: true,
32+
// rollupTypes: true,
3333
declarationOnly: true
3434
})
3535
]

examples/vue/components/Setup.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ defineProps({
88
}
99
})
1010
11-
const count = defineModel('count', { type: Number, default: 0 })
11+
// Must specify the generic type for defineModel to infer correct type
12+
const count = defineModel<number>('count', { default: 0 })
1213
1314
const emit = defineEmits(['on-add'])
1415

examples/vue/components/TypeProps.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<script setup lang="ts">
66
export type Props = {
7-
color: 'blue' | 'red' | 'purple',
7+
color: 'blue' | 'red' | 'purple' | 'yellow',
88
array?: { foo: number }[]
99
}
1010

examples/vue/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"@vitejs/plugin-vue": "^5.0.4",
1515
"@vitejs/plugin-vue-jsx": "^3.1.0",
1616
"tslib": "^2.6.2",
17-
"typescript": "5.4.3",
18-
"vite": "^5.2.6"
17+
"typescript": "5.5.3",
18+
"vite": "^5.3.4"
1919
}
2020
}

0 commit comments

Comments
 (0)