From 8e65500875467556c7213010cd7049dc302dcee7 Mon Sep 17 00:00:00 2001 From: Thomas Ruoff Date: Sun, 30 Mar 2025 22:11:38 +0200 Subject: [PATCH] replace uuid pkg --- db/booking.ts | 3 +-- package-lock.json | 16 +--------------- package.json | 3 +-- 3 files changed, 3 insertions(+), 19 deletions(-) diff --git a/db/booking.ts b/db/booking.ts index 1eea973..15f8a70 100644 --- a/db/booking.ts +++ b/db/booking.ts @@ -1,5 +1,4 @@ import * as mongoose from 'mongoose' -import { v4 as uuidv4 } from 'uuid' import { dateFormatBackend, getDays, @@ -42,7 +41,7 @@ const BookingSchema = new mongoose.Schema( // need a seperate uuid to be able to target a booking anonimously uuid: { type: String, - default: uuidv4, + default: () => crypto.randomUUID(), index: true, }, name: { type: String, required: true }, diff --git a/package-lock.json b/package-lock.json index 7b8c3d5..9f1d339 100644 --- a/package-lock.json +++ b/package-lock.json @@ -27,8 +27,7 @@ "nodemailer": "^6.10.0", "react": "19.1.0", "react-calendar": "5.1.0", - "react-dom": "19.1.0", - "uuid": "10.0.0" + "react-dom": "19.1.0" }, "devDependencies": { "@types/nodemailer": "^6.4.17", @@ -14586,19 +14585,6 @@ "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", "dev": true }, - "node_modules/uuid": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-10.0.0.tgz", - "integrity": "sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==", - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" - ], - "license": "MIT", - "bin": { - "uuid": "dist/bin/uuid" - } - }, "node_modules/v8-to-istanbul": { "version": "9.1.0", "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.1.0.tgz", diff --git a/package.json b/package.json index 1dbfacf..9454206 100644 --- a/package.json +++ b/package.json @@ -30,8 +30,7 @@ "nodemailer": "^6.10.0", "react": "19.1.0", "react-calendar": "5.1.0", - "react-dom": "19.1.0", - "uuid": "10.0.0" + "react-dom": "19.1.0" }, "devDependencies": { "@types/nodemailer": "^6.4.17",