Skip to content

Commit cd4f439

Browse files
feat: migrate to nuxt 4
1 parent 6e9687e commit cd4f439

40 files changed

Lines changed: 5311 additions & 3764 deletions

.app/package.json

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,15 @@
1111
"clean": "rimraf .nuxt .output node_modules"
1212
},
1313
"devDependencies": {
14-
"@iconify-json/fa6-brands": "^1.2.5",
14+
"@iconify-json/fa6-brands": "^1.2.6",
1515
"@iconify-json/ph": "^1.2.2",
16-
"@iconify-json/simple-icons": "^1.2.30",
17-
"@nuxt/fonts": "^0.11.1",
18-
"@shuriken-ui/nuxt": "4.0.0-beta.4",
19-
"nuxt": "3.16.2",
20-
"tailwindcss": "^4.1.3",
21-
"typescript": "5.8.3"
16+
"@iconify-json/simple-icons": "^1.2.47",
17+
"@nuxt/fonts": "^0.11.4",
18+
"@shuriken-ui/nuxt": "4.0.0",
19+
"nuxt": "4.0.3",
20+
"tailwindcss": "^4.1.11",
21+
"typescript": "5.9.2",
22+
"vue": "^3.5.18",
23+
"vue-tsc": "^3.0.5"
2224
}
2325
}

.app/tsconfig.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
{
2-
// https://nuxt.com/docs/guide/concepts/typescript
3-
"extends": "./.nuxt/tsconfig.json"
2+
"references": [
3+
{ "path": "./.nuxt/tsconfig.app.json" },
4+
{ "path": "./.nuxt/tsconfig.server.json" },
5+
{ "path": "./.nuxt/tsconfig.shared.json" },
6+
{ "path": "./.nuxt/tsconfig.node.json" }
7+
],
8+
"files": []
49
}

.demo/app/components/AddonInputPassword.vue

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ onNuxtReady(async () => {
183183
class="flex items-center justify-between gap-2"
184184
>
185185
<Icon
186+
v-if="props.icons.hint"
186187
:name="props.icons.hint"
187188
class="text-muted-400 dark:text-muted-500 size-4 shrink-0"
188189
/>
@@ -198,6 +199,7 @@ onNuxtReady(async () => {
198199
class="flex items-center justify-between gap-2"
199200
>
200201
<Icon
202+
v-if="props.icons.hint"
201203
:name="props.icons.hint"
202204
class="text-muted-400 dark:text-muted-500 size-4 shrink-0"
203205
/>
@@ -265,10 +267,11 @@ onNuxtReady(async () => {
265267
class="relative flex size-full items-center justify-center"
266268
>
267269
<Icon
270+
v-if="showPassword ? props.icons.reveal : props.icons.hide"
268271
:name="
269272
showPassword
270-
? props.icons.reveal
271-
: props.icons.hide
273+
? props.icons.reveal!
274+
: props.icons.hide!
272275
"
273276
class="size-4"
274277
/>

.demo/app/pages/dashboards/map.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ function updatePopup() {
404404
405405
const feature = selectedLocation.value
406406
const coordinates = ((feature.geometry || {}) as any)?.coordinates as LngLatLike
407-
const properties = feature.properties as GeoJsonLocationProperties
407+
const properties = feature.properties as unknown as GeoJsonLocationProperties
408408
409409
popup.value = new mapboxgl.Popup({
410410
closeOnClick: false,
@@ -561,7 +561,7 @@ function selectFeature(feature?: any) {
561561
class="starting:opacity-0 transition-discrete duration-300 transition-all"
562562
>
563563
<DemoMapMarker
564-
v-bind="(selectedLocation.properties as GeoJsonLocationProperties)"
564+
v-bind="(selectedLocation.properties as unknown as GeoJsonLocationProperties)"
565565
@close="selectFeature()"
566566
/>
567567
</div>

.demo/app/pages/layouts/onboarding-1.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const loading = ref(false)
1616
const twoFaMode = ref('email_address')
1717
const currentStep = ref(1)
1818
const codeLength = ref(4)
19-
const input = ref<string[]>([])
19+
const input = ref<number[]>([])
2020
const inputElements = useTemplateRef<HTMLInputElement[]>('inputElements')
2121
const correctPin = '1234'
2222
const onlyCheckOnLastFieldInput = ref(true)

.demo/content/documentation/04.demo-installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ It's a good starting point to see how Tairo is used to build a dashboard applica
1717
::doc-checklist
1818
---
1919
items:
20-
- Nuxt 4 compatibility mode
20+
- Nuxt 4
2121
- Nuxt content integration
2222
- Nuxt i18n integration
2323
- Prebuilt layouts

.demo/content/documentation/10.setup/1.new-project.md

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -49,26 +49,11 @@ cd <app>
4949
```
5050
::
5151

52-
### Enable Nuxt 4 compatibility
53-
54-
This optionnal step allows you to use the latest version of Nuxt with Tairo.
55-
56-
::code-group
57-
```ts [<app>/nuxt.config.ts]
58-
export default defineNuxtConfig({
59-
future: {
60-
compatibilityVersion: 4,
61-
},
62-
})
63-
```
64-
::
65-
6652
---
6753

6854
Useful resources:
6955

7056
- [New Project on nuxt.com](https://nuxt.com/docs/getting-started/installation#new-project)
71-
- [Testing Nuxt 4 on nuxt.com](https://nuxt.com/docs/getting-started/upgrade#testing-nuxt-4)
7257

7358
---
7459

.demo/nuxt.config.ts

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,23 @@ export default defineNuxtConfig({
8181
'~/assets/main.css',
8282
],
8383
fonts: {
84+
families: [
85+
{
86+
name: 'Inter',
87+
provider: 'google',
88+
weights: ['100 900'],
89+
},
90+
{
91+
name: 'Karla',
92+
provider: 'google',
93+
weights: ['200 800'],
94+
},
95+
{
96+
name: 'Fira Code',
97+
provider: 'google',
98+
weights: ['300 700'],
99+
},
100+
],
84101
experimental: {
85102
processCSSVariables: true,
86103
},
@@ -110,7 +127,6 @@ export default defineNuxtConfig({
110127
// We recommend using the default prefix_except_default strategy for SEO.
111128
strategy: 'no_prefix',
112129
defaultLocale: 'en',
113-
lazy: true,
114130
locales: [
115131
{ code: 'en', dir: 'ltr', language: 'en-US', file: 'en-US.yaml', name: 'English', isCatchallLocale: true },
116132
{ code: 'fr', dir: 'ltr', language: 'fr-FR', file: 'fr-FR.yaml', name: 'Français' },
@@ -119,13 +135,6 @@ export default defineNuxtConfig({
119135
{ code: 'ar', dir: 'rtl', language: 'ar-SA', file: 'ar-SA.yaml', name: 'العربية' },
120136
{ code: 'ja', dir: 'ltr', language: 'ja-JP', file: 'ja-JP.yaml', name: '日本語' },
121137
],
122-
// Use i18n v10 features
123-
experimental: {
124-
generatedLocaleFilePathFormat: 'off',
125-
},
126-
bundle: {
127-
optimizeTranslationDirective: false,
128-
},
129138
},
130139

131140
routeRules: {
@@ -198,6 +207,7 @@ export default defineNuxtConfig({
198207
include: [
199208
'scule',
200209
'klona',
210+
'minisearch',
201211
// AddonDatepicker
202212
'v-calendar',
203213
// AddonApexcharts
@@ -215,7 +225,6 @@ export default defineNuxtConfig({
215225
'mapbox-gl',
216226
'@mapbox/mapbox-gl-geocoder',
217227
// form validation
218-
'@vee-validate/zod',
219228
'vee-validate',
220229
'zod',
221230
// calendar app

.demo/package.json

Lines changed: 53 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -13,89 +13,90 @@
1313
"clean": "rimraf .nuxt .output node_modules"
1414
},
1515
"devDependencies": {
16-
"@iconify-json/akar-icons": "^1.2.2",
17-
"@iconify-json/bi": "^1.2.2",
18-
"@iconify-json/cib": "^1.2.2",
19-
"@iconify-json/cryptocurrency": "^1.2.2",
20-
"@iconify-json/devicon": "^1.2.23",
21-
"@iconify-json/fa-brands": "^1.2.1",
22-
"@iconify-json/fa6-brands": "^1.2.5",
16+
"@cssninja/tairo-component-meta": "workspace:*",
17+
"@iconify-json/akar-icons": "^1.2.7",
18+
"@iconify-json/bi": "^1.2.6",
19+
"@iconify-json/cib": "^1.2.3",
20+
"@iconify-json/cryptocurrency": "^1.2.3",
21+
"@iconify-json/devicon": "^1.2.41",
22+
"@iconify-json/fa-brands": "^1.2.2",
23+
"@iconify-json/fa6-brands": "^1.2.6",
2324
"@iconify-json/feather": "^1.2.1",
24-
"@iconify-json/file-icons": "^1.2.1",
25-
"@iconify-json/flagpack": "^1.2.2",
25+
"@iconify-json/file-icons": "^1.2.2",
26+
"@iconify-json/flagpack": "^1.2.6",
2627
"@iconify-json/gg": "^1.2.2",
2728
"@iconify-json/guidance": "^1.2.2",
28-
"@iconify-json/ic": "^1.2.2",
29-
"@iconify-json/icon-park-outline": "^1.2.2",
30-
"@iconify-json/ion": "^1.2.2",
31-
"@iconify-json/logos": "^1.2.4",
32-
"@iconify-json/lucide": "^1.2.34",
29+
"@iconify-json/ic": "^1.2.4",
30+
"@iconify-json/icon-park-outline": "^1.2.4",
31+
"@iconify-json/ion": "^1.2.6",
32+
"@iconify-json/logos": "^1.2.9",
33+
"@iconify-json/lucide": "^1.2.62",
3334
"@iconify-json/mdi": "^1.2.2",
3435
"@iconify-json/mdi-light": "^1.2.2",
35-
"@iconify-json/mingcute": "^1.2.3",
36+
"@iconify-json/mingcute": "^1.2.5",
3637
"@iconify-json/nonicons": "^1.2.2",
37-
"@iconify-json/pajamas": "^1.2.4",
38+
"@iconify-json/pajamas": "^1.2.13",
3839
"@iconify-json/ph": "^1.2.2",
3940
"@iconify-json/ri": "^1.2.5",
40-
"@iconify-json/simple-icons": "^1.2.30",
41-
"@iconify-json/solar": "^1.2.2",
42-
"@iconify-json/streamline": "^1.2.2",
43-
"@iconify-json/system-uicons": "^1.2.2",
41+
"@iconify-json/simple-icons": "^1.2.47",
42+
"@iconify-json/solar": "^1.2.4",
43+
"@iconify-json/streamline": "^1.2.5",
44+
"@iconify-json/system-uicons": "^1.2.4",
4445
"@iconify-json/teenyicons": "^1.2.2",
45-
"@iconify-json/token-branded": "^1.2.16",
46-
"@iconify-json/uiw": "^1.2.1",
47-
"@iconify-json/unjs": "^1.2.0",
46+
"@iconify-json/token-branded": "^1.2.24",
47+
"@iconify-json/uiw": "^1.2.3",
48+
"@iconify-json/unjs": "^1.2.3",
4849
"@iconify-json/vaadin": "^1.2.1",
49-
"@mapbox/mapbox-gl-geocoder": "5.0.3",
50-
"@nuxt/content": "3.4.0",
51-
"@cssninja/tairo-component-meta": "workspace:*",
52-
"@nuxt/fonts": "^0.11.1",
53-
"@nuxt/image": "1.10.0",
54-
"@nuxt/kit": "^3.16.2",
55-
"@nuxtjs/i18n": "^9.5.2",
56-
"@shuriken-ui/nuxt": "4.0.0-beta.4",
50+
"@mapbox/mapbox-gl-geocoder": "5.1.0",
51+
"@nuxt/content": "3.6.3",
52+
"@nuxt/fonts": "^0.11.4",
53+
"@nuxt/image": "1.11.0",
54+
"@nuxt/kit": "^4.0.3",
55+
"@nuxtjs/i18n": "^10.0.5",
56+
"@shuriken-ui/nuxt": "4.0.0",
5757
"@tailwindcss/typography": "^0.5.16",
5858
"@types/geojson": "^7946.0.15",
5959
"@types/mapbox-gl": "3.4.1",
6060
"@types/mapbox__mapbox-gl-geocoder": "^5.0.0",
61-
"@vee-validate/zod": "^4.15.0",
62-
"@vueuse/core": "^13.0.0",
63-
"@vueuse/nuxt": "^13.0.0",
61+
"@vueuse/core": "^13.6.0",
62+
"@vueuse/nuxt": "^13.6.0",
6463
"@zxcvbn-ts/core": "^3.0.4",
6564
"@zxcvbn-ts/language-common": "^3.0.4",
6665
"@zxcvbn-ts/language-en": "^3.0.2",
6766
"@zxcvbn-ts/language-fr": "^3.0.2",
68-
"apexcharts": "4.5.0",
67+
"apexcharts": "5.3.3",
68+
"better-sqlite3": "^12.2.0",
6969
"country-codes-list": "^2.0.0",
7070
"date-fns": "4.1.0",
71-
"debug": "^4.3.7",
71+
"debug": "^4.4.1",
7272
"geojson": "^0.5.0",
7373
"imask": "7.6.1",
7474
"klona": "^2.0.6",
75-
"libphonenumber-js": "^1.12.6",
76-
"lightningcss": "^1.29.2",
77-
"lightweight-charts": "^5.0.5",
75+
"libphonenumber-js": "^1.12.12",
76+
"lightningcss": "^1.30.1",
77+
"lightweight-charts": "^5.0.8",
7878
"magic-string": "0.30.17",
79-
"mapbox-gl": "3.11.0",
79+
"mapbox-gl": "3.14.0",
8080
"minisearch": "^7.1.2",
81-
"nuxt": "3.16.2",
82-
"nuxt-component-meta": "0.10.1",
81+
"nuxt": "4.0.3",
82+
"nuxt-component-meta": "0.13.1",
8383
"ohash": "^2.0.11",
8484
"pathe": "^2.0.3",
85-
"reka-ui": "^2.2.0",
85+
"reka-ui": "^2.4.1",
8686
"scule": "^1.3.0",
87-
"sharp": "0.34.0",
88-
"shiki": "3.2.1",
87+
"sharp": "0.34.3",
88+
"shiki": "3.9.2",
8989
"slugify": "^1.6.6",
90-
"tailwindcss": "^4.1.3",
91-
"typescript": "5.8.3",
90+
"tailwindcss": "^4.1.11",
91+
"typescript": "5.9.2",
9292
"v-calendar": "3.1.2",
93-
"vee-validate": "^4.15.0",
94-
"vue": "^3.5.13",
95-
"vue-component-meta": "2.2.8",
96-
"vue-router": "^4.5.0",
93+
"vee-validate": "^4.15.1",
94+
"vue": "^3.5.18",
95+
"vue-component-meta": "3.0.5",
96+
"vue-router": "^4.5.1",
97+
"vue-tsc": "^3.0.5",
9798
"vue3-apexcharts": "1.8.0",
9899
"vue3-smooth-dnd": "0.0.6",
99-
"zod": "^3.24.1"
100+
"zod": "^4.0.17"
100101
}
101102
}

.demo/tsconfig.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
{
2-
// https://nuxt.com/docs/guide/concepts/typescript
3-
"extends": "./.nuxt/tsconfig.json"
2+
"references": [
3+
{ "path": "./.nuxt/tsconfig.app.json" },
4+
{ "path": "./.nuxt/tsconfig.server.json" },
5+
{ "path": "./.nuxt/tsconfig.shared.json" },
6+
{ "path": "./.nuxt/tsconfig.node.json" }
7+
],
8+
"files": []
49
}

0 commit comments

Comments
 (0)