Skip to content

Commit bd9bba6

Browse files
committed
use crypto.randomUUID() instead of @lukeed/uuid - closes #4929
1 parent ceef881 commit bd9bba6

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

packages/create-svelte/templates/default/package.template.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
"type": "module",
1717
"dependencies": {
1818
"@fontsource/fira-mono": "^4.5.0",
19-
"@lukeed/uuid": "^2.0.0",
2019
"cookie": "^0.4.1"
2120
}
2221
}

packages/create-svelte/templates/default/src/hooks.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
import { v4 as uuid } from '@lukeed/uuid';
21
import type { Handle } from '@sveltejs/kit';
32
import * as cookie from 'cookie';
43

54
/** @type {import('@sveltejs/kit').Handle} */
65
export const handle: Handle = async ({ event, resolve }) => {
76
const cookies = cookie.parse(event.request.headers.get('cookie') || '');
8-
event.locals.userid = cookies['userid'] || uuid();
7+
event.locals.userid = cookies['userid'] || crypto.randomUUID();
98

109
const response = await resolve(event);
1110

0 commit comments

Comments
 (0)