From 9a9a54e17dacfe8ad125267f078c13000e4e9977 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20My=C5=9Bliwiec?= Date: Tue, 3 Mar 2020 09:19:11 +0100 Subject: [PATCH] fix(): fix uuid deprecated imports --- packages/common/decorators/core/injectable.decorator.ts | 4 ++-- .../decorators/http/create-route-param-metadata.decorator.ts | 2 +- packages/common/utils/random-string-generator.util.ts | 2 +- packages/core/middleware/utils.ts | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/common/decorators/core/injectable.decorator.ts b/packages/common/decorators/core/injectable.decorator.ts index 9abbe1cfcae..2daff396499 100644 --- a/packages/common/decorators/core/injectable.decorator.ts +++ b/packages/common/decorators/core/injectable.decorator.ts @@ -1,6 +1,6 @@ -import * as uuid from 'uuid/v4'; -import { ScopeOptions } from '../../interfaces/scope-options.interface'; +import { v4 as uuid } from 'uuid'; import { SCOPE_OPTIONS_METADATA } from '../../constants'; +import { ScopeOptions } from '../../interfaces/scope-options.interface'; import { Type } from '../../interfaces/type.interface'; /** diff --git a/packages/common/decorators/http/create-route-param-metadata.decorator.ts b/packages/common/decorators/http/create-route-param-metadata.decorator.ts index 8ec87b9b676..dd9af27b705 100644 --- a/packages/common/decorators/http/create-route-param-metadata.decorator.ts +++ b/packages/common/decorators/http/create-route-param-metadata.decorator.ts @@ -1,4 +1,4 @@ -import * as uuid from 'uuid/v4'; +import { v4 as uuid } from 'uuid'; import { CUSTOM_ROUTE_AGRS_METADATA, ROUTE_ARGS_METADATA, diff --git a/packages/common/utils/random-string-generator.util.ts b/packages/common/utils/random-string-generator.util.ts index 3e89ca056d1..6897e6e7d3a 100644 --- a/packages/common/utils/random-string-generator.util.ts +++ b/packages/common/utils/random-string-generator.util.ts @@ -1,3 +1,3 @@ -import * as uuid from 'uuid/v4'; +import { v4 as uuid } from 'uuid'; export const randomStringGenerator = () => uuid(); diff --git a/packages/core/middleware/utils.ts b/packages/core/middleware/utils.ts index 224698496ca..1dd03e2a908 100644 --- a/packages/core/middleware/utils.ts +++ b/packages/core/middleware/utils.ts @@ -1,7 +1,7 @@ /* eslint-disable @typescript-eslint/no-use-before-define */ import { Type } from '@nestjs/common/interfaces'; import { isFunction } from '@nestjs/common/utils/shared.utils'; -import * as uuid from 'uuid/v4'; +import { v4 as uuid } from 'uuid'; export const filterMiddleware = (middleware: T[]) => { return []