Skip to content

Commit 4589de2

Browse files
authored
chore: update all deps (#448)
1 parent bcbf1a3 commit 4589de2

File tree

28 files changed

+2628
-5595
lines changed

28 files changed

+2628
-5595
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,5 +68,3 @@ jobs:
6868
- name: Test types
6969
run: pnpm test:types
7070

71-
# - name: Test playground types
72-
# run: pnpm test:types:playground

eslint.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,5 @@ export default createConfigForNuxt({
1313
},
1414
}).overrideRules({
1515
'@typescript-eslint/no-empty-object-type': 'off',
16+
'vue/multi-word-component-names': 'off',
1617
})

package.json

Lines changed: 30 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,21 @@
88
},
99
"license": "MIT",
1010
"type": "module",
11-
"packageManager": "pnpm@9.15.4",
11+
"packageManager": "pnpm@10.15.1",
1212
"exports": {
1313
".": {
14-
"types": "./dist/types.d.ts",
15-
"import": "./dist/module.mjs",
16-
"require": "./dist/module.cjs"
14+
"types": "./dist/types.d.mts",
15+
"import": "./dist/module.mjs"
16+
}
17+
},
18+
"main": "./dist/module.mjs",
19+
"typesVersions": {
20+
"*": {
21+
".": [
22+
"./dist/types.d.mts"
23+
]
1724
}
1825
},
19-
"main": "./dist/module.cjs",
20-
"types": "./dist/types.d.ts",
2126
"files": [
2227
"dist"
2328
],
@@ -30,19 +35,18 @@
3035
"lint": "eslint .",
3136
"lint:fix": "eslint . --fix",
3237
"test": "vitest run",
33-
"test:types": "vue-tsc --noEmit",
34-
"test:types:playground": "nuxt typecheck playground",
38+
"test:types": "vue-tsc --noEmit && cd playground && vue-tsc --noEmit",
3539
"test:watch": "vitest watch"
3640
},
3741
"dependencies": {
3842
"@adonisjs/hash": "^9.1.1",
39-
"@nuxt/kit": "^3.18.1",
43+
"@nuxt/kit": "^4.1.0",
4044
"defu": "^6.1.4",
4145
"h3": "^1.15.4",
4246
"hookable": "^5.5.3",
43-
"jose": "^5.10.0",
47+
"jose": "^6.1.0",
4448
"ofetch": "^1.4.1",
45-
"openid-client": "^6.6.2",
49+
"openid-client": "^6.7.1",
4650
"pathe": "^2.0.3",
4751
"scule": "^1.3.0",
4852
"uncrypto": "^0.1.3"
@@ -68,20 +72,20 @@
6872
}
6973
},
7074
"devDependencies": {
71-
"@iconify-json/simple-icons": "^1.2.46",
72-
"@nuxt/devtools": "2.0.0-beta.7",
73-
"@nuxt/eslint-config": "^0.7.6",
74-
"@nuxt/module-builder": "^0.8.4",
75-
"@nuxt/schema": "^3.15.4",
76-
"@nuxt/test-utils": "^3.15.4",
77-
"@nuxt/ui": "^2.21.0",
78-
"@nuxt/ui-pro": "^1.7.0",
79-
"@simplewebauthn/types": "^11.0.0",
80-
"changelogen": "^0.5.7",
81-
"eslint": "^9.32.0",
82-
"nuxt": "^3.18.1",
83-
"typescript": "5.6.3",
84-
"vitest": "^3.0.5",
85-
"vue-tsc": "^2.2.12"
75+
"@iconify-json/simple-icons": "^1.2.50",
76+
"@nuxt/devtools": "2.6.3",
77+
"@nuxt/eslint-config": "^1.9.0",
78+
"@nuxt/module-builder": "^1.0.2",
79+
"@nuxt/schema": "^4.1.0",
80+
"@nuxt/test-utils": "^3.19.2",
81+
"@types/node": "latest",
82+
"@nuxt/ui": "^4.0.0-alpha.1",
83+
"@simplewebauthn/types": "^12.0.0",
84+
"changelogen": "^0.6.2",
85+
"eslint": "^9.34.0",
86+
"nuxt": "^4.1.0",
87+
"typescript": "5.9.2",
88+
"vitest": "^3.2.4",
89+
"vue-tsc": "^3.0.6"
8690
}
8791
}

playground/app/app.vue

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<template>
2+
<UApp>
3+
<UHeader title="Nuxt Auth Utils">
4+
<template #right>
5+
<AuthState>
6+
<template #default="{ loggedIn, clear }">
7+
<AuthRegister />
8+
<AuthLogin />
9+
<WebAuthnModal />
10+
<PasswordModal />
11+
<UButton
12+
v-if="loggedIn"
13+
size="sm"
14+
variant="subtle"
15+
color="neutral"
16+
@click="clear"
17+
>
18+
Logout
19+
</UButton>
20+
</template>
21+
<template #placeholder>
22+
<UButton
23+
size="sm"
24+
variant="subtle"
25+
color="neutral"
26+
disabled
27+
>
28+
Loading...
29+
</UButton>
30+
</template>
31+
</AuthState>
32+
<UColorModeButton />
33+
</template>
34+
</UHeader>
35+
<UMain>
36+
<UContainer>
37+
<UPage>
38+
<NuxtPage />
39+
</UPage>
40+
</UContainer>
41+
</UMain>
42+
</UApp>
43+
</template>

playground/app/assets/css/main.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
@import "tailwindcss";
2+
@import "@nuxt/ui";
File renamed without changes.
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
<script lang="ts" setup>
2+
const isOpen = ref(false)
3+
4+
const { fetch, user } = useUserSession()
5+
const toast = useToast()
6+
7+
async function login(event: Event) {
8+
const target = event.target as HTMLFormElement
9+
10+
await $fetch('/api/login', {
11+
method: 'POST',
12+
body: {
13+
email: target.email.value,
14+
password: target.password.value,
15+
},
16+
}).then(() => {
17+
fetch()
18+
isOpen.value = false
19+
20+
toast.add({
21+
color: 'success',
22+
title: 'User logged in successfully',
23+
})
24+
}).catch((err) => {
25+
console.log(err)
26+
27+
toast.add({
28+
color: 'error',
29+
title: err.data?.message || err.message,
30+
})
31+
})
32+
}
33+
</script>
34+
35+
<template>
36+
<UButton
37+
v-if="!user?.email"
38+
size="sm"
39+
variant="subtle"
40+
color="neutral"
41+
@click="isOpen = true"
42+
>
43+
Sign in
44+
</UButton>
45+
46+
<UModal
47+
v-model:open="isOpen"
48+
title="Login"
49+
description="Enter your email and password"
50+
>
51+
<template #content>
52+
<div class="p-4">
53+
<form @submit.prevent="login($event)">
54+
<UFormField label="Email">
55+
<UInput
56+
name="email"
57+
type="email"
58+
/>
59+
</UFormField>
60+
<UFormField
61+
label="Password"
62+
class="mt-4"
63+
>
64+
<UInput
65+
name="password"
66+
type="password"
67+
/>
68+
</UFormField>
69+
<UButton
70+
type="submit"
71+
color="neutral"
72+
class="mt-4"
73+
>
74+
Login
75+
</UButton>
76+
</form>
77+
</div>
78+
</template>
79+
</UModal>
80+
</template>
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
<script lang="ts" setup>
2+
const isOpen = ref(false)
3+
4+
const { fetch, user } = useUserSession()
5+
const toast = useToast()
6+
7+
async function register(event: Event) {
8+
const target = event.target as HTMLFormElement
9+
10+
await $fetch('/api/register', {
11+
method: 'POST',
12+
body: {
13+
email: target.email.value,
14+
password: target.password.value,
15+
},
16+
}).then(() => {
17+
fetch()
18+
isOpen.value = false
19+
20+
toast.add({
21+
color: 'success',
22+
title: 'User registered successfully',
23+
})
24+
}).catch((err) => {
25+
console.log(err)
26+
27+
toast.add({
28+
color: 'error',
29+
title: err.data?.message || err.message,
30+
})
31+
})
32+
}
33+
</script>
34+
35+
<template>
36+
<UButton
37+
v-if="!user?.email"
38+
size="sm"
39+
variant="subtle"
40+
color="neutral"
41+
@click="isOpen = true"
42+
>
43+
Sign up
44+
</UButton>
45+
46+
<UModal
47+
v-model:open="isOpen"
48+
title="Register"
49+
description="Enter your email and password"
50+
>
51+
<template #content>
52+
<div class="p-4">
53+
<form @submit.prevent="register($event)">
54+
<UFormField label="Email">
55+
<UInput
56+
name="email"
57+
type="email"
58+
/>
59+
</UFormField>
60+
<UFormField
61+
label="Password"
62+
class="mt-4"
63+
>
64+
<UInput
65+
name="password"
66+
type="password"
67+
/>
68+
</UFormField>
69+
<UButton
70+
type="submit"
71+
color="neutral"
72+
class="mt-4"
73+
>
74+
Register
75+
</UButton>
76+
</form>
77+
</div>
78+
</template>
79+
</UModal>
80+
</template>

playground/components/PasswordModal.vue renamed to playground/app/components/PasswordModal.vue

Lines changed: 31 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ async function login() {
2121
.catch((err) => {
2222
console.log(err)
2323
toast.add({
24-
color: 'red',
24+
color: 'error',
2525
title: err.data?.message || err.message,
2626
})
2727
})
@@ -32,36 +32,41 @@ async function login() {
3232
<template>
3333
<UButton
3434
v-if="!user?.password"
35-
size="xs"
36-
color="gray"
35+
size="sm"
36+
variant="subtle"
37+
color="neutral"
3738
@click="show = true"
3839
>
3940
Password
4041
</UButton>
41-
<UDashboardModal
42-
v-model="show"
42+
<UModal
43+
v-model:open="show"
4344
title="Login with password"
4445
description="Use the password: 123456"
4546
>
46-
<form
47-
class="space-y-4"
48-
@submit.prevent="login"
49-
>
50-
<UFormGroup label="Password">
51-
<UInput
52-
v-model="password"
53-
name="password"
54-
type="password"
55-
/>
56-
</UFormGroup>
57-
<UButton
58-
type="submit"
59-
:disabled="!password"
60-
color="black"
61-
class="mt-2"
62-
>
63-
Login
64-
</UButton>
65-
</form>
66-
</UDashboardModal>
47+
<template #content>
48+
<div class="p-4">
49+
<form
50+
class="space-y-4"
51+
@submit.prevent="login"
52+
>
53+
<UFormField label="Password">
54+
<UInput
55+
v-model="password"
56+
name="password"
57+
type="password"
58+
/>
59+
</UFormField>
60+
<UButton
61+
type="submit"
62+
:disabled="!password"
63+
color="neutral"
64+
class="mt-4"
65+
>
66+
Login
67+
</UButton>
68+
</form>
69+
</div>
70+
</template>
71+
</UModal>
6772
</template>

0 commit comments

Comments
 (0)