diff --git a/CHANGELOG.md b/CHANGELOG.md index bbfbffb35..7c33e2868 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,11 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased + ### Added - Update Storybook and Cypress version - Update Nx version +### Changed + +- Eliminated `uuid` in favor of using `randomUUID` from `node:crypto` +- Upgraded `color` from version `5.0.0` to `5.0.3 + ### Fixed - Fixed an issue with the exchange rate calculation when converting between derived currencies and their root currencies diff --git a/apps/api/src/app/import/import.service.ts b/apps/api/src/app/import/import.service.ts index a5f3dda96..2deef1c44 100644 --- a/apps/api/src/app/import/import.service.ts +++ b/apps/api/src/app/import/import.service.ts @@ -35,7 +35,7 @@ import { DataSource, Prisma, SymbolProfile } from '@prisma/client'; import { Big } from 'big.js'; import { endOfToday, isAfter, isSameSecond, parseISO } from 'date-fns'; import { omit, uniqBy } from 'lodash'; -import { v4 as uuidv4 } from 'uuid'; +import { randomUUID } from 'node:crypto'; import { ImportDataDto } from './import-data.dto'; @@ -277,7 +277,7 @@ export class ImportService { // Asset profile belongs to a different user if (existingAssetProfile) { - const symbol = uuidv4(); + const symbol = randomUUID(); assetProfileSymbolMapping[assetProfile.symbol] = symbol; assetProfile.symbol = symbol; } @@ -496,7 +496,7 @@ export class ImportService { accountId: validatedAccount?.id, accountUserId: undefined, createdAt: new Date(), - id: uuidv4(), + id: randomUUID(), isDraft: isAfter(date, endOfToday()), SymbolProfile: { assetClass, diff --git a/apps/api/src/app/order/order.service.ts b/apps/api/src/app/order/order.service.ts index 7dc6c646d..001d43b7a 100644 --- a/apps/api/src/app/order/order.service.ts +++ b/apps/api/src/app/order/order.service.ts @@ -37,7 +37,7 @@ import { Big } from 'big.js'; import { isUUID } from 'class-validator'; import { endOfToday, isAfter } from 'date-fns'; import { groupBy, uniqBy } from 'lodash'; -import { v4 as uuidv4 } from 'uuid'; +import { randomUUID } from 'node:crypto'; @Injectable() export class OrderService { @@ -143,7 +143,7 @@ export class OrderService { } else { // Create custom asset profile name = name ?? data.SymbolProfile.connectOrCreate.create.symbol; - symbol = uuidv4(); + symbol = randomUUID(); } data.SymbolProfile.connectOrCreate.create.assetClass = assetClass; diff --git a/apps/api/src/services/demo/demo.service.ts b/apps/api/src/services/demo/demo.service.ts index 8f3658736..a24716d96 100644 --- a/apps/api/src/services/demo/demo.service.ts +++ b/apps/api/src/services/demo/demo.service.ts @@ -7,7 +7,7 @@ import { } from '@ghostfolio/common/config'; import { Injectable } from '@nestjs/common'; -import { v4 as uuidv4 } from 'uuid'; +import { randomUUID } from 'node:crypto'; @Injectable() export class DemoService { @@ -41,7 +41,7 @@ export class DemoService { accountId: demoAccountId, accountUserId: demoUserId, comment: null, - id: uuidv4(), + id: randomUUID(), userId: demoUserId }; }); diff --git a/apps/client/src/app/components/user-detail-dialog/user-detail-dialog.html b/apps/client/src/app/components/user-detail-dialog/user-detail-dialog.html index 551f9b943..60f6a2585 100644 --- a/apps/client/src/app/components/user-detail-dialog/user-detail-dialog.html +++ b/apps/client/src/app/components/user-detail-dialog/user-detail-dialog.html @@ -10,6 +10,12 @@
User ID
+
+ Role +
+ + +
Registration Date
-
- -
Authentication
-
- Role -
@if (data.hasPermissionForSubscription) { diff --git a/package-lock.json b/package-lock.json index 7e25a93f2..b1601b18a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -55,7 +55,7 @@ "cheerio": "1.0.0", "class-transformer": "0.5.1", "class-validator": "0.14.2", - "color": "5.0.0", + "color": "5.0.3", "countries-and-timezones": "3.8.0", "countries-list": "3.2.0", "countup.js": "2.9.0", @@ -89,7 +89,6 @@ "svgmap": "2.14.0", "tablemark": "4.1.0", "twitter-api-v2": "1.27.0", - "uuid": "11.1.0", "yahoo-finance2": "3.10.2", "zone.js": "0.15.1" }, @@ -16031,13 +16030,13 @@ "license": "MIT" }, "node_modules/color": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/color/-/color-5.0.0.tgz", - "integrity": "sha512-16BlyiuyLq3MLxpRWyOTiWsO3ii/eLQLJUQXBSNcxMBBSnyt1ee9YUdaozQp03ifwm5woztEZGDbk9RGVuCsdw==", + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/color/-/color-5.0.3.tgz", + "integrity": "sha512-ezmVcLR3xAVp8kYOm4GS45ZLLgIE6SPAFoduLr6hTDajwb3KZ2F46gulK3XpcwRFb5KKGCSezCBAY4Dw4HsyXA==", "license": "MIT", "dependencies": { - "color-convert": "^3.0.1", - "color-string": "^2.0.0" + "color-convert": "^3.1.3", + "color-string": "^2.1.3" }, "engines": { "node": ">=18" @@ -16062,9 +16061,9 @@ "license": "MIT" }, "node_modules/color-string": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-string/-/color-string-2.0.1.tgz", - "integrity": "sha512-5z9FbYTZPAo8iKsNEqRNv+OlpBbDcoE+SY9GjLfDUHEfcNNV7tS9eSAlFHEaub/r5tBL9LtskAeq1l9SaoZ5tQ==", + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/color-string/-/color-string-2.1.4.tgz", + "integrity": "sha512-Bb6Cq8oq0IjDOe8wJmi4JeNn763Xs9cfrBcaylK1tPypWzyoy2G3l90v9k64kjphl/ZJjPIShFztenRomi8WTg==", "license": "MIT", "dependencies": { "color-name": "^2.0.0" @@ -37465,6 +37464,7 @@ "https://github.com/sponsors/ctavan" ], "license": "MIT", + "optional": true, "bin": { "uuid": "dist/esm/bin/uuid" } diff --git a/package.json b/package.json index a3a2e4078..7c503b11b 100644 --- a/package.json +++ b/package.json @@ -101,7 +101,7 @@ "cheerio": "1.0.0", "class-transformer": "0.5.1", "class-validator": "0.14.2", - "color": "5.0.0", + "color": "5.0.3", "countries-and-timezones": "3.8.0", "countries-list": "3.2.0", "countup.js": "2.9.0", @@ -135,7 +135,6 @@ "svgmap": "2.14.0", "tablemark": "4.1.0", "twitter-api-v2": "1.27.0", - "uuid": "11.1.0", "yahoo-finance2": "3.10.2", "zone.js": "0.15.1" },