Skip to content

Commit 11f2509

Browse files
committed
feat: ✨ update dependencies for vue3-ts templates
1 parent 158679e commit 11f2509

File tree

21 files changed

+209
-371
lines changed

21 files changed

+209
-371
lines changed

template-vue3-ts-complet/e2e/vue.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ import { expect, test } from '@playwright/test'
44
// https://playwright.dev/docs/intro
55
test('visits the app root url', async ({ page }) => {
66
await page.goto('/')
7-
await expect(page.locator('div.greetings > h1')).toHaveText('You did it!')
7+
await expect(page.locator('.fr-header .router-link-exact-active').first()).toHaveText('Service')
88
})

template-vue3-ts-complet/env.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
declare module 'virtual:pwa-register/vue' {
44
import type { Ref } from 'vue'
55

6-
export type RegisterSWOptions = {
6+
export interface RegisterSWOptions {
77
immediate?: boolean
88
onNeedRefresh?: () => void
99
onOfflineReady?: () => void

template-vue3-ts-complet/package.json

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -19,41 +19,41 @@
1919
},
2020
"dependencies": {
2121
"@gouvfr/dsfr": "^1.11.2",
22-
"@gouvminint/vue-dsfr": "^5.10.3",
22+
"@gouvminint/vue-dsfr": "^5.19.3",
2323
"focus-trap": "^7.5.4",
2424
"focus-trap-vue": "^4.0.3",
2525
"oh-vue-icons": "1.0.0-rc3",
26-
"pinia": "^2.1.7",
27-
"vue": "^3.4.21",
28-
"vue-router": "^4.3.0"
26+
"pinia": "^2.2.2",
27+
"vue": "^3.4.38",
28+
"vue-router": "^4.4.3"
2929
},
3030
"devDependencies": {
31-
"@antfu/eslint-config": "^2.11.6",
32-
"@playwright/test": "^1.42.1",
33-
"@rushstack/eslint-patch": "^1.3.3",
34-
"@tsconfig/node20": "^20.1.2",
35-
"@types/jsdom": "^21.1.6",
36-
"@types/node": "^20.11.28",
37-
"@vitejs/plugin-vue": "^5.0.4",
38-
"@vitejs/plugin-vue-jsx": "^3.1.0",
39-
"@vue/eslint-config-typescript": "^12.0.0",
40-
"@vue/test-utils": "^2.4.5",
31+
"@antfu/eslint-config": "^3.0.0",
32+
"@playwright/test": "^1.46.1",
33+
"@rushstack/eslint-patch": "^1.10.4",
34+
"@testing-library/jest-dom": "^6.5.0",
35+
"@testing-library/vue": "^8.1.0",
36+
"@tsconfig/node20": "^20.1.4",
37+
"@types/jsdom": "^21.1.7",
38+
"@types/node": "^20.16.2",
39+
"@vitejs/plugin-vue": "^5.1.3",
40+
"@vitejs/plugin-vue-jsx": "^4.0.1",
41+
"@vue/test-utils": "^2.4.6",
4142
"@vue/tsconfig": "^0.5.1",
42-
"eslint": "^8.55.0",
43-
"eslint-plugin-playwright": "^1.5.2",
44-
"eslint-plugin-vue": "^9.19.2",
45-
"jsdom": "^24.0.0",
46-
"npm-run-all2": "^6.1.2",
47-
"rimraf": "^5.0.5",
43+
"eslint": "^9.9.1",
44+
"eslint-plugin-playwright": "^1.6.2",
45+
"jsdom": "^25.0.0",
46+
"npm-run-all2": "^6.2.2",
4847
"oh-vue-icons": "1.0.0-rc3",
49-
"typescript": "~5.4.0",
50-
"unplugin-auto-import": "^0.17.5",
51-
"unplugin-vue-components": "^0.26.0",
52-
"vite": "^5.1.6",
53-
"vite-plugin-pwa": "^0.19.7",
54-
"vite-plugin-vue-devtools": "^7.0.18",
55-
"vitest": "^1.4.0",
56-
"vue-tsc": "^2.0.6",
57-
"workbox-window": "^7.0.0"
48+
"rimraf": "^5.0.10",
49+
"typescript": "~5.4.5",
50+
"unplugin-auto-import": "^0.18.2",
51+
"unplugin-vue-components": "^0.27.4",
52+
"vite": "^5.4.2",
53+
"vite-plugin-pwa": "^0.20.2",
54+
"vite-plugin-vue-devtools": "^7.3.9",
55+
"vitest": "^2.0.5",
56+
"vue-tsc": "^2.1.2",
57+
"workbox-window": "^7.1.0"
5858
}
5959
}

template-vue3-ts-complet/public/manifest.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,39 +2,39 @@
22
"name": "VueDsfr App",
33
"icons": [
44
{
5-
"src": "\/icons\/android-icon-36x36.png",
5+
"src": "/icons/android-icon-36x36.png",
66
"sizes": "36x36",
7-
"type": "image\/png",
7+
"type": "image/png",
88
"density": "0.75"
99
},
1010
{
11-
"src": "\/icons\/android-icon-48x48.png",
11+
"src": "/icons/android-icon-48x48.png",
1212
"sizes": "48x48",
13-
"type": "image\/png",
13+
"type": "image/png",
1414
"density": "1.0"
1515
},
1616
{
17-
"src": "\/icons\/android-icon-72x72.png",
17+
"src": "/icons/android-icon-72x72.png",
1818
"sizes": "72x72",
19-
"type": "image\/png",
19+
"type": "image/png",
2020
"density": "1.5"
2121
},
2222
{
23-
"src": "\/icons\/android-icon-96x96.png",
23+
"src": "/icons/android-icon-96x96.png",
2424
"sizes": "96x96",
25-
"type": "image\/png",
25+
"type": "image/png",
2626
"density": "2.0"
2727
},
2828
{
29-
"src": "\/icons\/android-icon-144x144.png",
29+
"src": "/icons/android-icon-144x144.png",
3030
"sizes": "144x144",
31-
"type": "image\/png",
31+
"type": "image/png",
3232
"density": "3.0"
3333
},
3434
{
35-
"src": "\/icons\/android-icon-192x192.png",
35+
"src": "/icons/android-icon-192x192.png",
3636
"sizes": "192x192",
37-
"type": "image\/png",
37+
"type": "image/png",
3838
"density": "4.0"
3939
}
4040
]

template-vue3-ts-complet/src/auto-imports.d.ts

Lines changed: 1 addition & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -101,96 +101,7 @@ declare global {
101101
// for vue template auto import
102102
import { UnwrapRef } from 'vue'
103103
declare module 'vue' {
104-
interface ComponentCustomProperties {
105-
readonly EffectScope: UnwrapRef<typeof import('vue')['EffectScope']>
106-
readonly OhVueIcon: UnwrapRef<typeof import('oh-vue-icons')['OhVueIcon']>
107-
readonly acceptHMRUpdate: UnwrapRef<typeof import('pinia')['acceptHMRUpdate']>
108-
readonly addIcons: UnwrapRef<typeof import('oh-vue-icons')['addIcons']>
109-
readonly afterAll: UnwrapRef<typeof import('vitest')['afterAll']>
110-
readonly afterEach: UnwrapRef<typeof import('vitest')['afterEach']>
111-
readonly assert: UnwrapRef<typeof import('vitest')['assert']>
112-
readonly beforeAll: UnwrapRef<typeof import('vitest')['beforeAll']>
113-
readonly beforeEach: UnwrapRef<typeof import('vitest')['beforeEach']>
114-
readonly chai: UnwrapRef<typeof import('vitest')['chai']>
115-
readonly computed: UnwrapRef<typeof import('vue')['computed']>
116-
readonly createApp: UnwrapRef<typeof import('vue')['createApp']>
117-
readonly createPinia: UnwrapRef<typeof import('pinia')['createPinia']>
118-
readonly customRef: UnwrapRef<typeof import('vue')['customRef']>
119-
readonly defineAsyncComponent: UnwrapRef<typeof import('vue')['defineAsyncComponent']>
120-
readonly defineComponent: UnwrapRef<typeof import('vue')['defineComponent']>
121-
readonly defineStore: UnwrapRef<typeof import('pinia')['defineStore']>
122-
readonly describe: UnwrapRef<typeof import('vitest')['describe']>
123-
readonly effectScope: UnwrapRef<typeof import('vue')['effectScope']>
124-
readonly expect: UnwrapRef<typeof import('vitest')['expect']>
125-
readonly getActivePinia: UnwrapRef<typeof import('pinia')['getActivePinia']>
126-
readonly getCurrentInstance: UnwrapRef<typeof import('vue')['getCurrentInstance']>
127-
readonly getCurrentScope: UnwrapRef<typeof import('vue')['getCurrentScope']>
128-
readonly h: UnwrapRef<typeof import('vue')['h']>
129-
readonly inject: UnwrapRef<typeof import('vue')['inject']>
130-
readonly isProxy: UnwrapRef<typeof import('vue')['isProxy']>
131-
readonly isReactive: UnwrapRef<typeof import('vue')['isReactive']>
132-
readonly isReadonly: UnwrapRef<typeof import('vue')['isReadonly']>
133-
readonly isRef: UnwrapRef<typeof import('vue')['isRef']>
134-
readonly it: UnwrapRef<typeof import('vitest')['it']>
135-
readonly mapActions: UnwrapRef<typeof import('pinia')['mapActions']>
136-
readonly mapGetters: UnwrapRef<typeof import('pinia')['mapGetters']>
137-
readonly mapState: UnwrapRef<typeof import('pinia')['mapState']>
138-
readonly mapStores: UnwrapRef<typeof import('pinia')['mapStores']>
139-
readonly mapWritableState: UnwrapRef<typeof import('pinia')['mapWritableState']>
140-
readonly markRaw: UnwrapRef<typeof import('vue')['markRaw']>
141-
readonly nextTick: UnwrapRef<typeof import('vue')['nextTick']>
142-
readonly onActivated: UnwrapRef<typeof import('vue')['onActivated']>
143-
readonly onBeforeMount: UnwrapRef<typeof import('vue')['onBeforeMount']>
144-
readonly onBeforeRouteLeave: UnwrapRef<typeof import('vue-router')['onBeforeRouteLeave']>
145-
readonly onBeforeRouteUpdate: UnwrapRef<typeof import('vue-router')['onBeforeRouteUpdate']>
146-
readonly onBeforeUnmount: UnwrapRef<typeof import('vue')['onBeforeUnmount']>
147-
readonly onBeforeUpdate: UnwrapRef<typeof import('vue')['onBeforeUpdate']>
148-
readonly onDeactivated: UnwrapRef<typeof import('vue')['onDeactivated']>
149-
readonly onErrorCaptured: UnwrapRef<typeof import('vue')['onErrorCaptured']>
150-
readonly onMounted: UnwrapRef<typeof import('vue')['onMounted']>
151-
readonly onRenderTracked: UnwrapRef<typeof import('vue')['onRenderTracked']>
152-
readonly onRenderTriggered: UnwrapRef<typeof import('vue')['onRenderTriggered']>
153-
readonly onScopeDispose: UnwrapRef<typeof import('vue')['onScopeDispose']>
154-
readonly onServerPrefetch: UnwrapRef<typeof import('vue')['onServerPrefetch']>
155-
readonly onUnmounted: UnwrapRef<typeof import('vue')['onUnmounted']>
156-
readonly onUpdated: UnwrapRef<typeof import('vue')['onUpdated']>
157-
readonly provide: UnwrapRef<typeof import('vue')['provide']>
158-
readonly reactive: UnwrapRef<typeof import('vue')['reactive']>
159-
readonly readonly: UnwrapRef<typeof import('vue')['readonly']>
160-
readonly ref: UnwrapRef<typeof import('vue')['ref']>
161-
readonly resolveComponent: UnwrapRef<typeof import('vue')['resolveComponent']>
162-
readonly setActivePinia: UnwrapRef<typeof import('pinia')['setActivePinia']>
163-
readonly setMapStoreSuffix: UnwrapRef<typeof import('pinia')['setMapStoreSuffix']>
164-
readonly shallowReactive: UnwrapRef<typeof import('vue')['shallowReactive']>
165-
readonly shallowReadonly: UnwrapRef<typeof import('vue')['shallowReadonly']>
166-
readonly shallowRef: UnwrapRef<typeof import('vue')['shallowRef']>
167-
readonly storeToRefs: UnwrapRef<typeof import('pinia')['storeToRefs']>
168-
readonly suite: UnwrapRef<typeof import('vitest')['suite']>
169-
readonly test: UnwrapRef<typeof import('vitest')['test']>
170-
readonly toRaw: UnwrapRef<typeof import('vue')['toRaw']>
171-
readonly toRef: UnwrapRef<typeof import('vue')['toRef']>
172-
readonly toRefs: UnwrapRef<typeof import('vue')['toRefs']>
173-
readonly toValue: UnwrapRef<typeof import('vue')['toValue']>
174-
readonly triggerRef: UnwrapRef<typeof import('vue')['triggerRef']>
175-
readonly unref: UnwrapRef<typeof import('vue')['unref']>
176-
readonly useAttrs: UnwrapRef<typeof import('vue')['useAttrs']>
177-
readonly useCssModule: UnwrapRef<typeof import('vue')['useCssModule']>
178-
readonly useCssVars: UnwrapRef<typeof import('vue')['useCssVars']>
179-
readonly useLink: UnwrapRef<typeof import('vue-router')['useLink']>
180-
readonly useRoute: UnwrapRef<typeof import('vue-router')['useRoute']>
181-
readonly useRouter: UnwrapRef<typeof import('vue-router')['useRouter']>
182-
readonly useScheme: UnwrapRef<typeof import('@gouvminint/vue-dsfr')['useScheme']>
183-
readonly useSlots: UnwrapRef<typeof import('vue')['useSlots']>
184-
readonly useTabs: UnwrapRef<typeof import('@gouvminint/vue-dsfr')['useTabs']>
185-
readonly vi: UnwrapRef<typeof import('vitest')['vi']>
186-
readonly vitest: UnwrapRef<typeof import('vitest')['vitest']>
187-
readonly watch: UnwrapRef<typeof import('vue')['watch']>
188-
readonly watchEffect: UnwrapRef<typeof import('vue')['watchEffect']>
189-
readonly watchPostEffect: UnwrapRef<typeof import('vue')['watchPostEffect']>
190-
readonly watchSyncEffect: UnwrapRef<typeof import('vue')['watchSyncEffect']>
191-
}
192-
}
193-
declare module '@vue/runtime-core' {
104+
interface GlobalComponents {}
194105
interface ComponentCustomProperties {
195106
readonly EffectScope: UnwrapRef<typeof import('vue')['EffectScope']>
196107
readonly OhVueIcon: UnwrapRef<typeof import('oh-vue-icons')['OhVueIcon']>

template-vue3-ts-complet/src/components.d.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
/* eslint-disable */
2-
/* prettier-ignore */
32
// @ts-nocheck
43
// Generated by unplugin-vue-components
54
// Read more: https://github.com/vuejs/core/pull/3399
65
export {}
76

7+
/* prettier-ignore */
88
declare module 'vue' {
99
export interface GlobalComponents {
10+
AppToaster: typeof import('./components/AppToaster.vue')['default']
11+
DsfrAlert: typeof import('@gouvminint/vue-dsfr')['DsfrAlert']
1012
DsfrButton: typeof import('@gouvminint/vue-dsfr')['DsfrButton']
1113
DsfrHeader: typeof import('@gouvminint/vue-dsfr')['DsfrHeader']
1214
ReloadPrompt: typeof import('./components/ReloadPrompt.vue')['default']

template-vue3-ts-complet/src/components/AppToaster.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ import type { Message } from '../composables/use-toaster'
44
defineProps<{ messages: Message[] }>()
55
66
const emit = defineEmits<{
7-
'close-message': [id: string]
7+
closeMessage: [id: string]
88
}>()
99
10-
const close = (id: string) => emit('close-message', id)
10+
const close = (id: string) => emit('closeMessage', id)
1111
</script>
1212

1313
<template>

template-vue3-ts-complet/src/components/ReloadPrompt.cy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { mount } from '@cypress/vue'
33
import '@gouvminint/vue-dsfr/styles'
44

55
import { OhVueIcon, addIcons } from 'oh-vue-icons'
6-
import { RiRefreshLine, RiSearchLine, RiCloseLine } from 'oh-vue-icons/icons/ri/index.js'
6+
import { RiCloseLine, RiRefreshLine, RiSearchLine } from 'oh-vue-icons/icons/ri/index.js'
77
import { DsfrButton } from '@gouvminint/vue-dsfr'
88

99
import ReloadPrompt from './ReloadPrompt.vue'

template-vue3-ts-complet/src/components/ReloadPrompt.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { render } from '@testing-library/vue'
22

3-
import { addIcons, OhVueIcon as VIcon } from 'oh-vue-icons'
3+
import { OhVueIcon as VIcon, addIcons } from 'oh-vue-icons'
44

5-
import { RiRefreshLine, RiSearchLine, RiCloseLine } from 'oh-vue-icons/icons/ri/index.js'
5+
import { RiCloseLine, RiRefreshLine, RiSearchLine } from 'oh-vue-icons/icons/ri/index.js'
66

77
import { DsfrButton } from '@gouvminint/vue-dsfr'
88

@@ -22,7 +22,7 @@ vi.mock('virtual:pwa-register/vue', () => {
2222
}
2323
})
2424

25-
describe('ReloadPrompt', () => {
25+
describe('reloadPrompt', () => {
2626
it('should render ReloadPrompt with right content', async () => {
2727
// Given
2828

template-vue3-ts-complet/src/components/ReloadPrompt.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
<script lang="ts" setup>
22
defineProps<{
3-
offlineReady?: boolean,
4-
needRefresh?: boolean,
3+
offlineReady?: boolean
4+
needRefresh?: boolean
55
}>()
66
7-
type EventTypes = {
7+
defineEmits<EventTypes>()
8+
9+
interface EventTypes {
810
(event: 'close'): void
911
(event: 'updateServiceWorker'): void
1012
}
11-
12-
defineEmits<EventTypes>()
1313
</script>
1414

1515
<template>

0 commit comments

Comments
 (0)