Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add user module #2

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
DATABASE_URL=

MYSQL_DATABASE=
MYSQL_ROOT_PASSWORD=
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
"@nestjs/common": "^11.0.1",
"@nestjs/core": "^11.0.1",
"@nestjs/platform-express": "^11.0.1",
"@prisma/client": "^6.3.1",
"class-transformer": "^0.5.1",
"class-validator": "^0.14.1",
"prisma": "^6.3.1",
"reflect-metadata": "^0.2.2",
"rxjs": "^7.8.1"
Expand Down
16 changes: 16 additions & 0 deletions prisma/migrations/20250205172850_/migration.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
-- CreateTable
CREATE TABLE "User" (
"id" SERIAL NOT NULL,
"worldId" TEXT NOT NULL,
"username" TEXT NOT NULL,
"name" TEXT NOT NULL,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,

CONSTRAINT "User_pkey" PRIMARY KEY ("id")
);

-- CreateIndex
CREATE UNIQUE INDEX "User_worldId_key" ON "User"("worldId");

-- CreateIndex
CREATE UNIQUE INDEX "User_username_key" ON "User"("username");
10 changes: 10 additions & 0 deletions prisma/migrations/20250205180025_user_entity/migration.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/*
Warnings:

- You are about to drop the column `name` on the `User` table. All the data in the column will be lost.

*/
-- AlterTable
ALTER TABLE "User" DROP COLUMN "name",
ADD COLUMN "pollsCreatedCount" INTEGER NOT NULL DEFAULT 0,
ADD COLUMN "profilePicture" TEXT;
68 changes: 68 additions & 0 deletions prisma/migrations/20250205193050_initail_entities/migration.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
-- CreateTable
CREATE TABLE "Poll" (
"id" SERIAL NOT NULL,
"userId" INTEGER NOT NULL,
"title" TEXT NOT NULL,
"description" TEXT,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"startDate" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"endDate" TIMESTAMP(3) NOT NULL,
"isAnonymous" BOOLEAN NOT NULL DEFAULT false,

CONSTRAINT "Poll_pkey" PRIMARY KEY ("id")
);
Comment on lines +1 to +13
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Add missing indexes and constraints to Poll table.

Consider adding:

  1. Index on userId for better query performance
  2. Check constraint to ensure startDate is before endDate
 CREATE TABLE "Poll" (
     "id" SERIAL NOT NULL,
     "userId" INTEGER NOT NULL,
     "title" TEXT NOT NULL,
     "description" TEXT,
     "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
     "startDate" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
     "endDate" TIMESTAMP(3) NOT NULL,
     "isAnonymous" BOOLEAN NOT NULL DEFAULT false,

     CONSTRAINT "Poll_pkey" PRIMARY KEY ("id")
+    CONSTRAINT "Poll_dates_check" CHECK ("startDate" <= "endDate")
 );
+CREATE INDEX "Poll_userId_idx" ON "Poll"("userId");

Committable suggestion skipped: line range outside the PR's diff.


-- CreateTable
CREATE TABLE "Option" (
"id" SERIAL NOT NULL,
"optionText" TEXT NOT NULL,
"pollId" INTEGER NOT NULL,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,

CONSTRAINT "Option_pkey" PRIMARY KEY ("id")
);

-- CreateTable
CREATE TABLE "Tag" (
"id" SERIAL NOT NULL,
"content" TEXT,

CONSTRAINT "Tag_pkey" PRIMARY KEY ("id")
);

-- CreateTable
CREATE TABLE "Vote" (
"id" SERIAL NOT NULL,
"weight" INTEGER NOT NULL,
"optionId" INTEGER NOT NULL,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"proof" TEXT[],

CONSTRAINT "Vote_pkey" PRIMARY KEY ("id")
);
Comment on lines +34 to +42
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Add constraints and index to Vote table.

Consider adding:

  1. Check constraint for positive weight values
  2. Index on optionId for better query performance
  3. Use JSONB type for proof array
 CREATE TABLE "Vote" (
     "id" SERIAL NOT NULL,
     "weight" INTEGER NOT NULL,
     "optionId" INTEGER NOT NULL,
     "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
-    "proof" TEXT[],
+    "proof" JSONB,

-    CONSTRAINT "Vote_pkey" PRIMARY KEY ("id")
+    CONSTRAINT "Vote_pkey" PRIMARY KEY ("id"),
+    CONSTRAINT "Vote_weight_check" CHECK ("weight" > 0)
 );
+CREATE INDEX "Vote_optionId_idx" ON "Vote"("optionId");
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
CREATE TABLE "Vote" (
"id" SERIAL NOT NULL,
"weight" INTEGER NOT NULL,
"optionId" INTEGER NOT NULL,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"proof" TEXT[],
CONSTRAINT "Vote_pkey" PRIMARY KEY ("id")
);
CREATE TABLE "Vote" (
"id" SERIAL NOT NULL,
"weight" INTEGER NOT NULL,
"optionId" INTEGER NOT NULL,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"proof" JSONB,
CONSTRAINT "Vote_pkey" PRIMARY KEY ("id"),
CONSTRAINT "Vote_weight_check" CHECK ("weight" > 0)
);
CREATE INDEX "Vote_optionId_idx" ON "Vote"("optionId");


-- CreateTable
CREATE TABLE "_PollToTag" (
"A" INTEGER NOT NULL,
"B" INTEGER NOT NULL,

CONSTRAINT "_PollToTag_AB_pkey" PRIMARY KEY ("A","B")
);

-- CreateIndex
CREATE INDEX "_PollToTag_B_index" ON "_PollToTag"("B");

-- AddForeignKey
ALTER TABLE "Poll" ADD CONSTRAINT "Poll_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE "Option" ADD CONSTRAINT "Option_pollId_fkey" FOREIGN KEY ("pollId") REFERENCES "Poll"("id") ON DELETE RESTRICT ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE "Vote" ADD CONSTRAINT "Vote_optionId_fkey" FOREIGN KEY ("optionId") REFERENCES "Option"("id") ON DELETE RESTRICT ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE "_PollToTag" ADD CONSTRAINT "_PollToTag_A_fkey" FOREIGN KEY ("A") REFERENCES "Poll"("id") ON DELETE CASCADE ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE "_PollToTag" ADD CONSTRAINT "_PollToTag_B_fkey" FOREIGN KEY ("B") REFERENCES "Tag"("id") ON DELETE CASCADE ON UPDATE CASCADE;
3 changes: 3 additions & 0 deletions prisma/migrations/migration_lock.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Please do not edit this file manually
# It should be added in your version-control system (e.g., Git)
provider = "postgresql"
52 changes: 52 additions & 0 deletions prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,55 @@ datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}

model User{
id Int @id @default(autoincrement())
worldId String @unique()
username String @unique()
profilePicture String?
pollsCreatedCount Int @default(0)
createdAt DateTime @default(now())
poll Poll[]

}


model Poll{
id Int @id @default(autoincrement())
user User @relation(fields: [userId],references: [id])
userId Int
title String
description String?
options Option[]
tags Tag[]
createdAt DateTime @default(now())
startDate DateTime @default(now())
endDate DateTime
isAnonymous Boolean @default(false)

}
Comment on lines +28 to +41
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Add validation and indexes to Poll model.

Consider the following improvements:

  1. Add validation to ensure startDate is before endDate
  2. Add index on userId for faster lookups
  3. Define onDelete behavior for relations
 model Poll{
   id Int @id @default(autoincrement())
-  user User @relation(fields: [userId],references: [id])
+  user User @relation("UserPolls", fields: [userId],references: [id])
   userId  Int 
   title String 
   description String?
-  options Option[]
+  options Option[] @relation("PollOptions", onDelete: Cascade)
-  tags Tag[]
+  tags Tag[] @relation("PollTags")
   createdAt DateTime @default(now())
   startDate DateTime @default(now())
   endDate DateTime
   isAnonymous Boolean @default(false)

+  @@index([userId])
+  @@check(startDate <= endDate)
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
model Poll{
id Int @id @default(autoincrement())
user User @relation(fields: [userId],references: [id])
userId Int
title String
description String?
options Option[]
tags Tag[]
createdAt DateTime @default(now())
startDate DateTime @default(now())
endDate DateTime
isAnonymous Boolean @default(false)
}
model Poll{
id Int @id @default(autoincrement())
user User @relation("UserPolls", fields: [userId], references: [id])
userId Int
title String
description String?
options Option[] @relation("PollOptions", onDelete: Cascade)
tags Tag[] @relation("PollTags")
createdAt DateTime @default(now())
startDate DateTime @default(now())
endDate DateTime
isAnonymous Boolean @default(false)
@@index([userId])
@@check(startDate <= endDate)
}


model Option {
id Int @id @default(autoincrement())
optionText String
poll Poll @relation(fields: [pollId], references: [id])
pollId Int
votes Vote[]
createdAt DateTime @default(now())
}

model Tag{
id Int @id @default(autoincrement())
content String?
poll Poll[]

}

model Vote{
id Int @id @default(autoincrement())
weight Int
option Option @relation(fields: [optionId], references: [id])
optionId Int
createdAt DateTime @default(now())
proof String[]
}
Comment on lines +59 to +66
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Add validation and index to Vote model.

Consider the following improvements:

  1. Add validation for weight field
  2. Add index on optionId for faster lookups
  3. Consider using JSONB for proof array if using PostgreSQL
 model Vote{
   id Int @id @default(autoincrement())
-  weight Int 
+  weight Int @check(weight > 0)
-  option Option @relation(fields: [optionId], references: [id])
+  option Option @relation("OptionVotes", fields: [optionId], references: [id])
   optionId  Int
   createdAt DateTime @default(now())
-  proof String[] 
+  proof String[] @db.JsonB
+  @@index([optionId])
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
model Vote{
id Int @id @default(autoincrement())
weight Int
option Option @relation(fields: [optionId], references: [id])
optionId Int
createdAt DateTime @default(now())
proof String[]
}
model Vote{
id Int @id @default(autoincrement())
weight Int @check(weight > 0)
option Option @relation("OptionVotes", fields: [optionId], references: [id])
optionId Int
createdAt DateTime @default(now())
proof String[] @db.JsonB
@@index([optionId])
}

7 changes: 5 additions & 2 deletions src/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import { Module } from '@nestjs/common';
import { AppController } from './app.controller';
import { AppService } from './app.service';
import { UsersService } from './users/users.service';
import { UsersController } from './users/users.controller';
import { UsersModule } from './users/users.module';
Comment on lines +4 to +6
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Remove unused imports and fix module configuration.

  1. The UsersService import is unused and can be removed.
  2. The UsersController is already provided through UsersModule, so it should be removed from the controllers array to avoid duplicate registration.

Apply this diff to fix the issues:

-import { UsersService } from './users/users.service';
-import { UsersController } from './users/users.controller';
 import { UsersModule } from './users/users.module';

 @Module({
   imports: [UsersModule],
-  controllers: [AppController, UsersController],
+  controllers: [AppController],
   providers: [AppService],
 })

Also applies to: 9-10

🧰 Tools
🪛 ESLint

[error] 4-4: 'UsersService' is defined but never used.

(@typescript-eslint/no-unused-vars)


@Module({
imports: [],
controllers: [AppController],
imports: [UsersModule],
controllers: [AppController, UsersController],
providers: [AppService],
})
export class AppModule {}
11 changes: 11 additions & 0 deletions src/prisma.service.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { Injectable, OnModuleInit } from '@nestjs/common';
import { PrismaClient } from '@prisma/client';

@Injectable()
export class PrismaService extends PrismaClient implements OnModuleInit {
async onModuleInit() {
await this.$connect()
.then(() => console.log('Connected to DB'))
.catch((err) => console.log(err));
}
Comment on lines +6 to +10
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Enhance error handling and logging.

  1. Use NestJS Logger instead of console.log for consistent logging across the application.
  2. Consider throwing the error to prevent the application from starting with a failed DB connection.

Apply this diff:

-  async onModuleInit() {
-    await this.$connect()
-      .then(() => console.log('Connected to DB'))
-      .catch((err) => console.log(err));
+  private readonly logger = new Logger(PrismaService.name);
+
+  async onModuleInit() {
+    try {
+      await this.$connect();
+      this.logger.log('Successfully connected to database');
+    } catch (error) {
+      this.logger.error('Failed to connect to database', error);
+      throw error;
+    }
   }

Don't forget to import Logger:

import { Injectable, Logger, OnModuleInit } from '@nestjs/common';

}
15 changes: 15 additions & 0 deletions src/users/dtos/CreateUser.dto.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { IsNotEmpty, IsOptional, IsString } from 'class-validator';

export class CreateUserDto {
@IsString()
@IsNotEmpty()
worldId: string;

@IsString()
@IsNotEmpty()
username: string;

@IsString()
@IsOptional()
profilePicture?: string;
}
20 changes: 20 additions & 0 deletions src/users/users.controller.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import {
Body,
Controller,
Post,
UsePipes,
ValidationPipe,
} from '@nestjs/common';
import { UsersService } from './users.service';
import { CreateUserDto } from './dtos/CreateUser.dto';

@Controller('users')
export class UsersController {
constructor(private userService: UsersService) {}

@Post()
@UsePipes(ValidationPipe)
async createUser(@Body() createUserDto: CreateUserDto) {
return await this.userService.createUser(createUserDto);
}
Comment on lines +15 to +19
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Enhance method implementation with response type and error handling.

  1. Update the service name to match the constructor.
  2. Add response type for better type safety.
  3. Add error handling for potential database conflicts.

Apply this diff:

   @Post()
   @UsePipes(ValidationPipe)
-  async createUser(@Body() createUserDto: CreateUserDto) {
-    return await this.userService.createUser(createUserDto);
+  async createUser(@Body() createUserDto: CreateUserDto): Promise<User> {
+    try {
+      return await this.usersService.createUser(createUserDto);
+    } catch (error) {
+      if (error.code === 'P2002') {
+        throw new ConflictException('User with this worldId or username already exists');
+      }
+      throw error;
+    }
   }

Don't forget to add these imports:

import { ConflictException } from '@nestjs/common';
import { User } from '@prisma/client';

}
12 changes: 12 additions & 0 deletions src/users/users.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { Module } from '@nestjs/common';
import { PrismaService } from 'src/prisma.service';
import { UsersController } from './users.controller';
import { UsersService } from './users.service';

@Module({
imports: [],
controllers: [UsersController],
providers: [UsersService, PrismaService],
exports: [UsersService],
})
export class UsersModule {}
13 changes: 13 additions & 0 deletions src/users/users.service.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { Injectable } from '@nestjs/common';
import { Prisma } from '@prisma/client';
import { PrismaService } from 'src/prisma.service';

@Injectable()
export class UsersService {
constructor(private prisma: PrismaService) {}

async createUser(data: Prisma.UserCreateInput) {
console.log(data);
return this.prisma.user.create({ data });
}
Comment on lines +9 to +12
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Improve error handling, logging, and type safety.

  1. Replace console.log with NestJS Logger
  2. Add error handling for database operations
  3. Add return type annotation

Apply this diff:

+  private readonly logger = new Logger(UsersService.name);
+
-  async createUser(data: Prisma.UserCreateInput) {
-    console.log(data);
-    return this.prisma.user.create({ data });
+  async createUser(data: Prisma.UserCreateInput): Promise<Prisma.User> {
+    this.logger.debug('Creating user', data);
+    try {
+      return await this.prisma.user.create({ data });
+    } catch (error) {
+      this.logger.error('Failed to create user', error);
+      throw new InternalServerErrorException('Failed to create user');
+    }
   }

Don't forget to import:

import { Injectable, InternalServerErrorException, Logger } from '@nestjs/common';

}
34 changes: 34 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1063,6 +1063,11 @@
resolved "https://registry.yarnpkg.com/@pkgr/core/-/core-0.1.1.tgz#1ec17e2edbec25c8306d424ecfbf13c7de1aaa31"
integrity sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==

"@prisma/client@^6.3.1":
version "6.3.1"
resolved "https://registry.yarnpkg.com/@prisma/client/-/client-6.3.1.tgz#4e4b05b27f4541ea541a601c57a8ada10b526848"
integrity sha512-ARAJaPs+eBkemdky/XU3cvGRl+mIPHCN2lCXsl5Vlb0E2gV+R6IN7aCI8CisRGszEZondwIsW9Iz8EJkTdykyA==

"@prisma/[email protected]":
version "6.3.1"
resolved "https://registry.yarnpkg.com/@prisma/debug/-/debug-6.3.1.tgz#08730461dab4fe147efa70637952b942dc1961b5"
Expand Down Expand Up @@ -1466,6 +1471,11 @@
"@types/methods" "^1.1.4"
"@types/superagent" "^8.1.0"

"@types/validator@^13.11.8":
version "13.12.2"
resolved "https://registry.yarnpkg.com/@types/validator/-/validator-13.12.2.tgz#760329e756e18a4aab82fc502b51ebdfebbe49f5"
integrity sha512-6SlHBzUW8Jhf3liqrGGXyTJSIFe4nqlJ5A5KaMZ2l/vbM3Wh3KSybots/wfWVzNLK4D1NZluDlSQIbIEPx6oyA==

"@types/yargs-parser@*":
version "21.0.3"
resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-21.0.3.tgz#815e30b786d2e8f0dcd85fd5bcf5e1a04d008f15"
Expand Down Expand Up @@ -2278,6 +2288,20 @@ cjs-module-lexer@^1.0.0:
resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.4.3.tgz#0f79731eb8cfe1ec72acd4066efac9d61991b00d"
integrity sha512-9z8TZaGM1pfswYeXrUpzPrkx8UnWYdhJclsiYMm6x/w5+nN+8Tf/LnAgfLGQCm59qAOxU8WwHEq2vNwF6i4j+Q==

class-transformer@^0.5.1:
version "0.5.1"
resolved "https://registry.yarnpkg.com/class-transformer/-/class-transformer-0.5.1.tgz#24147d5dffd2a6cea930a3250a677addf96ab336"
integrity sha512-SQa1Ws6hUbfC98vKGxZH3KFY0Y1lm5Zm0SY8XX9zbK7FJCyVEac3ATW0RIpwzW+oOfmHE5PMPufDG9hCfoEOMw==

class-validator@^0.14.1:
version "0.14.1"
resolved "https://registry.yarnpkg.com/class-validator/-/class-validator-0.14.1.tgz#ff2411ed8134e9d76acfeb14872884448be98110"
integrity sha512-2VEG9JICxIqTpoK1eMzZqaV+u/EiwEJkMGzTrZf6sU/fwsnOITVgYJ8yojSy6CaXtO9V0Cc6ZQZ8h8m4UBuLwQ==
dependencies:
"@types/validator" "^13.11.8"
libphonenumber-js "^1.10.53"
validator "^13.9.0"

cli-cursor@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-3.1.0.tgz#264305a7ae490d1d03bf0c9ba7c925d1753af307"
Expand Down Expand Up @@ -4087,6 +4111,11 @@ levn@^0.4.1:
prelude-ls "^1.2.1"
type-check "~0.4.0"

libphonenumber-js@^1.10.53:
version "1.11.19"
resolved "https://registry.yarnpkg.com/libphonenumber-js/-/libphonenumber-js-1.11.19.tgz#de6437b15d23d9e3b16e5b14c6f2d6d65f58c9b7"
integrity sha512-bW/Yp/9dod6fmyR+XqSUL1N5JE7QRxQ3KrBIbYS1FTv32e5i3SEtQVX+71CYNv8maWNSOgnlCoNp9X78f/cKiA==

lines-and-columns@^1.1.6:
version "1.2.4"
resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632"
Expand Down Expand Up @@ -5581,6 +5610,11 @@ v8-to-istanbul@^9.0.1:
"@types/istanbul-lib-coverage" "^2.0.1"
convert-source-map "^2.0.0"

validator@^13.9.0:
version "13.12.0"
resolved "https://registry.yarnpkg.com/validator/-/validator-13.12.0.tgz#7d78e76ba85504da3fee4fd1922b385914d4b35f"
integrity sha512-c1Q0mCiPlgdTVVVIJIrBuxNicYE+t/7oKeI9MWLj3fh/uq2Pxh/3eeWbVZ4OcGW1TUf53At0njHw5SMdA3tmMg==

vary@^1, vary@~1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc"
Expand Down