diff --git a/test/functional/columns/embedded-columns/entity/Counters.ts b/test/functional/columns/embedded-columns/entity/Counters.ts index bd8bfac58..b54a4e10e 100644 --- a/test/functional/columns/embedded-columns/entity/Counters.ts +++ b/test/functional/columns/embedded-columns/entity/Counters.ts @@ -11,12 +11,12 @@ export class Counters { @Column() favorites: number - @Column((type) => Information, { prefix: "info" }) + @Column(() => Information, { prefix: "info" }) information: Information - @Column((type) => Information, { prefix: "testData" }) + @Column(() => Information, { prefix: "testData" }) data: Information - @Column((type) => Information, { prefix: "" }) + @Column(() => Information, { prefix: "" }) dataWithoutPrefix: Information } diff --git a/test/functional/columns/embedded-columns/entity/Post.ts b/test/functional/columns/embedded-columns/entity/Post.ts index 0f94c6216..7649bb28f 100644 --- a/test/functional/columns/embedded-columns/entity/Post.ts +++ b/test/functional/columns/embedded-columns/entity/Post.ts @@ -14,12 +14,12 @@ export class Post { @Column() text: string - @Column((type) => Counters) + @Column(() => Counters) counters: Counters - @Column((type) => Counters, { prefix: "testCounters" }) + @Column(() => Counters, { prefix: "testCounters" }) otherCounters: Counters - @Column((type) => Counters, { prefix: "" }) + @Column(() => Counters, { prefix: "" }) countersWithoutPrefix: Counters } diff --git a/test/functional/columns/embedded-columns/entity/SimpleCounters.ts b/test/functional/columns/embedded-columns/entity/SimpleCounters.ts index c2939fc45..38197f91a 100644 --- a/test/functional/columns/embedded-columns/entity/SimpleCounters.ts +++ b/test/functional/columns/embedded-columns/entity/SimpleCounters.ts @@ -11,6 +11,6 @@ export class SimpleCounters { @Column() favorites: number - @Column((type) => Information, { prefix: "info" }) + @Column(() => Information, { prefix: "info" }) information: Information } diff --git a/test/functional/columns/embedded-columns/entity/SimplePost.ts b/test/functional/columns/embedded-columns/entity/SimplePost.ts index ed30c544b..e83f05230 100644 --- a/test/functional/columns/embedded-columns/entity/SimplePost.ts +++ b/test/functional/columns/embedded-columns/entity/SimplePost.ts @@ -14,6 +14,6 @@ export class SimplePost { @Column() text: string - @Column((type) => SimpleCounters) + @Column(() => SimpleCounters) counters: SimpleCounters } diff --git a/test/functional/connection/modules/blog/subscriber/TestBlogSubscriber.ts b/test/functional/connection/modules/blog/subscriber/TestBlogSubscriber.ts index ebf839a3a..cbb12f908 100644 --- a/test/functional/connection/modules/blog/subscriber/TestBlogSubscriber.ts +++ b/test/functional/connection/modules/blog/subscriber/TestBlogSubscriber.ts @@ -1,13 +1,12 @@ import { EventSubscriber } from "../../../../../../src/decorator/listeners/EventSubscriber" import { EntitySubscriberInterface } from "../../../../../../src/subscriber/EntitySubscriberInterface" -import { InsertEvent } from "../../../../../../src/subscriber/event/InsertEvent" @EventSubscriber() export class TestBlogSubscriber implements EntitySubscriberInterface { /** * Called after entity insertion. */ - beforeInsert(event: InsertEvent) { + beforeInsert() { // Do nothing } } diff --git a/test/functional/connection/modules/question/subscriber/TestQuestionSubscriber.ts b/test/functional/connection/modules/question/subscriber/TestQuestionSubscriber.ts index af14416d1..0e3779c5b 100644 --- a/test/functional/connection/modules/question/subscriber/TestQuestionSubscriber.ts +++ b/test/functional/connection/modules/question/subscriber/TestQuestionSubscriber.ts @@ -1,13 +1,12 @@ import { EventSubscriber } from "../../../../../../src/decorator/listeners/EventSubscriber" import { EntitySubscriberInterface } from "../../../../../../src/subscriber/EntitySubscriberInterface" -import { InsertEvent } from "../../../../../../src/subscriber/event/InsertEvent" @EventSubscriber() export class TestQuestionSubscriber implements EntitySubscriberInterface { /** * Called before entity insertion. */ - beforeInsert(event: InsertEvent) { + beforeInsert() { // Do nothing } } diff --git a/test/functional/connection/modules/video/subscriber/TestVideoSubscriber.ts b/test/functional/connection/modules/video/subscriber/TestVideoSubscriber.ts index d0480701d..81b471f1a 100644 --- a/test/functional/connection/modules/video/subscriber/TestVideoSubscriber.ts +++ b/test/functional/connection/modules/video/subscriber/TestVideoSubscriber.ts @@ -1,13 +1,12 @@ import { EventSubscriber } from "../../../../../../src/decorator/listeners/EventSubscriber" import { EntitySubscriberInterface } from "../../../../../../src/subscriber/EntitySubscriberInterface" -import { InsertEvent } from "../../../../../../src/subscriber/event/InsertEvent" @EventSubscriber() export class TestVideoSubscriber implements EntitySubscriberInterface { /** * Called after entity insertion. */ - beforeInsert(event: InsertEvent) { + beforeInsert() { // Do nothing } } diff --git a/test/functional/connection/subscriber/FirstConnectionSubscriber.ts b/test/functional/connection/subscriber/FirstConnectionSubscriber.ts index 6f8b590be..f5d12f2ca 100644 --- a/test/functional/connection/subscriber/FirstConnectionSubscriber.ts +++ b/test/functional/connection/subscriber/FirstConnectionSubscriber.ts @@ -1,13 +1,12 @@ import { EntitySubscriberInterface } from "../../../../src/subscriber/EntitySubscriberInterface" import { EventSubscriber } from "../../../../src/decorator/listeners/EventSubscriber" -import { InsertEvent } from "../../../../src/subscriber/event/InsertEvent" @EventSubscriber() export class FirstConnectionSubscriber implements EntitySubscriberInterface { /** * Called after entity insertion. */ - beforeInsert(event: InsertEvent) { + beforeInsert() { // Do nothing } } diff --git a/test/functional/connection/subscriber/SecondConnectionSubscriber.ts b/test/functional/connection/subscriber/SecondConnectionSubscriber.ts index 8c62608a2..716e7cb69 100644 --- a/test/functional/connection/subscriber/SecondConnectionSubscriber.ts +++ b/test/functional/connection/subscriber/SecondConnectionSubscriber.ts @@ -1,13 +1,12 @@ import { EntitySubscriberInterface } from "../../../../src/subscriber/EntitySubscriberInterface" import { EventSubscriber } from "../../../../src/decorator/listeners/EventSubscriber" -import { InsertEvent } from "../../../../src/subscriber/event/InsertEvent" @EventSubscriber() export class SecondConnectionSubscriber implements EntitySubscriberInterface { /** * Called after entity insertion. */ - beforeInsert(event: InsertEvent) { + beforeInsert() { // Do nothing } } diff --git a/test/functional/decorators/relation-count/relation-count-many-to-many/entity/Category.ts b/test/functional/decorators/relation-count/relation-count-many-to-many/entity/Category.ts index b1cdf3b31..892ced56a 100644 --- a/test/functional/decorators/relation-count/relation-count-many-to-many/entity/Category.ts +++ b/test/functional/decorators/relation-count/relation-count-many-to-many/entity/Category.ts @@ -18,10 +18,10 @@ export class Category { @Column() isRemoved: boolean = false - @ManyToMany((type) => Post, (post) => post.categories) + @ManyToMany(() => Post, (post) => post.categories) posts: Post[] - @ManyToMany((type) => Image, (image) => image.categories) + @ManyToMany(() => Image, (image) => image.categories) @JoinTable() images: Image[] diff --git a/test/functional/decorators/relation-count/relation-count-many-to-many/entity/Image.ts b/test/functional/decorators/relation-count/relation-count-many-to-many/entity/Image.ts index 466818aa2..bd39e9132 100644 --- a/test/functional/decorators/relation-count/relation-count-many-to-many/entity/Image.ts +++ b/test/functional/decorators/relation-count/relation-count-many-to-many/entity/Image.ts @@ -16,7 +16,7 @@ export class Image { @Column() isRemoved: boolean = false - @ManyToMany((type) => Category, (category) => category.images) + @ManyToMany(() => Category, (category) => category.images) categories: Category[] @RelationCount((image: Image) => image.categories) diff --git a/test/functional/decorators/relation-count/relation-count-many-to-many/entity/Post.ts b/test/functional/decorators/relation-count/relation-count-many-to-many/entity/Post.ts index 620b70ad7..19177a175 100644 --- a/test/functional/decorators/relation-count/relation-count-many-to-many/entity/Post.ts +++ b/test/functional/decorators/relation-count/relation-count-many-to-many/entity/Post.ts @@ -17,7 +17,7 @@ export class Post { @Column() isRemoved: boolean = false - @ManyToMany((type) => Category, (category) => category.posts) + @ManyToMany(() => Category, (category) => category.posts) @JoinTable() categories: Category[] diff --git a/test/functional/decorators/relation-id/relation-id-many-to-many/entity/Category.ts b/test/functional/decorators/relation-id/relation-id-many-to-many/entity/Category.ts index 71e3468f6..60e3fd1ef 100644 --- a/test/functional/decorators/relation-id/relation-id-many-to-many/entity/Category.ts +++ b/test/functional/decorators/relation-id/relation-id-many-to-many/entity/Category.ts @@ -18,10 +18,10 @@ export class Category { @Column() isRemoved: boolean = false - @ManyToMany((type) => Post, (post) => post.categories) + @ManyToMany(() => Post, (post) => post.categories) posts: Post[] - @ManyToMany((type) => Image) + @ManyToMany(() => Image) @JoinTable() images: Image[] diff --git a/test/functional/decorators/relation-id/relation-id-many-to-many/entity/Post.ts b/test/functional/decorators/relation-id/relation-id-many-to-many/entity/Post.ts index 4e95c3878..9c9a7c9f1 100644 --- a/test/functional/decorators/relation-id/relation-id-many-to-many/entity/Post.ts +++ b/test/functional/decorators/relation-id/relation-id-many-to-many/entity/Post.ts @@ -17,11 +17,11 @@ export class Post { @Column() isRemoved: boolean = false - @ManyToMany((type) => Category, (category) => category.posts) + @ManyToMany(() => Category, (category) => category.posts) @JoinTable() categories: Category[] - @ManyToMany((type) => Category) + @ManyToMany(() => Category) @JoinTable() subcategories: Category[] diff --git a/test/functional/embedded/embedded-listeners/entity/Post.ts b/test/functional/embedded/embedded-listeners/entity/Post.ts index 374062045..ac4b3d502 100644 --- a/test/functional/embedded/embedded-listeners/entity/Post.ts +++ b/test/functional/embedded/embedded-listeners/entity/Post.ts @@ -16,6 +16,6 @@ export class Post { @Column() text: string - @Column((type) => PostInformation, { prefix: "info" }) + @Column(() => PostInformation, { prefix: "info" }) information: PostInformation = new PostInformation() } diff --git a/test/functional/embedded/embedded-listeners/entity/PostInformation.ts b/test/functional/embedded/embedded-listeners/entity/PostInformation.ts index 1c0f3bf92..3ed92302e 100644 --- a/test/functional/embedded/embedded-listeners/entity/PostInformation.ts +++ b/test/functional/embedded/embedded-listeners/entity/PostInformation.ts @@ -8,7 +8,7 @@ export class PostInformation { @Index() description: string - @Column((type) => PostCounter, { prefix: "counters" }) + @Column(() => PostCounter, { prefix: "counters" }) counters: PostCounter = new PostCounter() @BeforeInsert() diff --git a/test/functional/embedded/embedded-many-to-many-case1/entity/Counters.ts b/test/functional/embedded/embedded-many-to-many-case1/entity/Counters.ts index 06e641ed8..416d01ff2 100644 --- a/test/functional/embedded/embedded-many-to-many-case1/entity/Counters.ts +++ b/test/functional/embedded/embedded-many-to-many-case1/entity/Counters.ts @@ -20,7 +20,7 @@ export class Counters { @Column(() => Subcounters, { prefix: "subcnt" }) subcounters: Subcounters - @ManyToMany((type) => User, (user) => user.likedPosts) + @ManyToMany(() => User, (user) => user.likedPosts) @JoinTable() likedUsers: User[] } diff --git a/test/functional/embedded/embedded-many-to-many-case1/entity/User.ts b/test/functional/embedded/embedded-many-to-many-case1/entity/User.ts index 0b74cb048..ec5112ef8 100644 --- a/test/functional/embedded/embedded-many-to-many-case1/entity/User.ts +++ b/test/functional/embedded/embedded-many-to-many-case1/entity/User.ts @@ -12,6 +12,6 @@ export class User { @Column() name: string - @ManyToMany((type) => Post, (post) => post.counters.likedUsers) + @ManyToMany(() => Post, (post) => post.counters.likedUsers) likedPosts: Post[] } diff --git a/test/functional/embedded/embedded-many-to-many-case2/entity/Counters.ts b/test/functional/embedded/embedded-many-to-many-case2/entity/Counters.ts index 11050ce70..6878d16a4 100644 --- a/test/functional/embedded/embedded-many-to-many-case2/entity/Counters.ts +++ b/test/functional/embedded/embedded-many-to-many-case2/entity/Counters.ts @@ -19,6 +19,6 @@ export class Counters { @Column(() => Subcounters, { prefix: "subcnt" }) subcounters: Subcounters - @ManyToMany((type) => User, (user) => user.likedPosts) + @ManyToMany(() => User, (user) => user.likedPosts) likedUsers: User[] } diff --git a/test/functional/embedded/embedded-many-to-many-case2/entity/User.ts b/test/functional/embedded/embedded-many-to-many-case2/entity/User.ts index 32ea5f2af..d9481695d 100644 --- a/test/functional/embedded/embedded-many-to-many-case2/entity/User.ts +++ b/test/functional/embedded/embedded-many-to-many-case2/entity/User.ts @@ -13,7 +13,7 @@ export class User { @Column() name: string - @ManyToMany((type) => Post, (post) => post.counters.likedUsers) + @ManyToMany(() => Post, (post) => post.counters.likedUsers) @JoinTable() likedPosts: Post[] } diff --git a/test/functional/embedded/embedded-many-to-many-case3/entity/Counters.ts b/test/functional/embedded/embedded-many-to-many-case3/entity/Counters.ts index a56337f35..f528634f3 100644 --- a/test/functional/embedded/embedded-many-to-many-case3/entity/Counters.ts +++ b/test/functional/embedded/embedded-many-to-many-case3/entity/Counters.ts @@ -21,7 +21,7 @@ export class Counters { @Column(() => Subcounters, { prefix: "subcnt" }) subcounters: Subcounters - @ManyToMany((type) => User, (user) => user.likedPosts) + @ManyToMany(() => User, (user) => user.likedPosts) @JoinTable() likedUsers: User[] } diff --git a/test/functional/embedded/embedded-many-to-many-case3/entity/User.ts b/test/functional/embedded/embedded-many-to-many-case3/entity/User.ts index 0b74cb048..ec5112ef8 100644 --- a/test/functional/embedded/embedded-many-to-many-case3/entity/User.ts +++ b/test/functional/embedded/embedded-many-to-many-case3/entity/User.ts @@ -12,6 +12,6 @@ export class User { @Column() name: string - @ManyToMany((type) => Post, (post) => post.counters.likedUsers) + @ManyToMany(() => Post, (post) => post.counters.likedUsers) likedPosts: Post[] } diff --git a/test/functional/embedded/embedded-many-to-many-case4/entity/Counters.ts b/test/functional/embedded/embedded-many-to-many-case4/entity/Counters.ts index 06e641ed8..416d01ff2 100644 --- a/test/functional/embedded/embedded-many-to-many-case4/entity/Counters.ts +++ b/test/functional/embedded/embedded-many-to-many-case4/entity/Counters.ts @@ -20,7 +20,7 @@ export class Counters { @Column(() => Subcounters, { prefix: "subcnt" }) subcounters: Subcounters - @ManyToMany((type) => User, (user) => user.likedPosts) + @ManyToMany(() => User, (user) => user.likedPosts) @JoinTable() likedUsers: User[] } diff --git a/test/functional/embedded/embedded-many-to-many-case4/entity/User.ts b/test/functional/embedded/embedded-many-to-many-case4/entity/User.ts index c095b2811..9cccfbf19 100644 --- a/test/functional/embedded/embedded-many-to-many-case4/entity/User.ts +++ b/test/functional/embedded/embedded-many-to-many-case4/entity/User.ts @@ -15,6 +15,6 @@ export class User { @Column() name: string - @ManyToMany((type) => Post, (post) => post.counters.likedUsers) + @ManyToMany(() => Post, (post) => post.counters.likedUsers) likedPosts: Post[] } diff --git a/test/functional/embedded/embedded-many-to-many-case5/entity/Counters.ts b/test/functional/embedded/embedded-many-to-many-case5/entity/Counters.ts index 9645673cd..abf2a487a 100644 --- a/test/functional/embedded/embedded-many-to-many-case5/entity/Counters.ts +++ b/test/functional/embedded/embedded-many-to-many-case5/entity/Counters.ts @@ -21,7 +21,7 @@ export class Counters { @Column(() => Subcounters, { prefix: "subcnt" }) subcounters: Subcounters - @ManyToMany((type) => User, (user) => user.likedPosts) + @ManyToMany(() => User, (user) => user.likedPosts) @JoinTable() likedUsers: User[] } diff --git a/test/functional/embedded/embedded-many-to-many-case5/entity/User.ts b/test/functional/embedded/embedded-many-to-many-case5/entity/User.ts index 94833e57a..92cd80afc 100644 --- a/test/functional/embedded/embedded-many-to-many-case5/entity/User.ts +++ b/test/functional/embedded/embedded-many-to-many-case5/entity/User.ts @@ -15,6 +15,6 @@ export class User { @Column() name: string - @ManyToMany((type) => Post, (post) => post.counters.likedUsers) + @ManyToMany(() => Post, (post) => post.counters.likedUsers) likedPosts: Post[] } diff --git a/test/functional/embedded/optional-embedded-listeners/entity/Post.ts b/test/functional/embedded/optional-embedded-listeners/entity/Post.ts index 26a5759c8..0d5b06eea 100644 --- a/test/functional/embedded/optional-embedded-listeners/entity/Post.ts +++ b/test/functional/embedded/optional-embedded-listeners/entity/Post.ts @@ -16,6 +16,6 @@ export class Post { @Column() text: string - @Column((type) => PostInformation, { prefix: "info" }) + @Column(() => PostInformation, { prefix: "info" }) information?: PostInformation } diff --git a/test/functional/embedded/optional-embedded-listeners/entity/PostInformation.ts b/test/functional/embedded/optional-embedded-listeners/entity/PostInformation.ts index 6e7c8ef4f..a58709bd8 100644 --- a/test/functional/embedded/optional-embedded-listeners/entity/PostInformation.ts +++ b/test/functional/embedded/optional-embedded-listeners/entity/PostInformation.ts @@ -6,7 +6,7 @@ export class PostInformation { @Column({ nullable: true }) description?: string - @Column((type) => PostCounter, { prefix: "counters" }) + @Column(() => PostCounter, { prefix: "counters" }) counters?: PostCounter @BeforeInsert() diff --git a/test/functional/entity-metadata-validator/basic/entity/Post.ts b/test/functional/entity-metadata-validator/basic/entity/Post.ts index 6c86bd69b..18097ebf2 100644 --- a/test/functional/entity-metadata-validator/basic/entity/Post.ts +++ b/test/functional/entity-metadata-validator/basic/entity/Post.ts @@ -17,7 +17,7 @@ export class Post { @OneToOne(() => Category) category: Category - @ManyToMany((type) => Category) + @ManyToMany(() => Category) category2: Category @RelationCount((post: Post) => post.category) diff --git a/test/functional/entity-metadata-validator/initialized-relations/entity/Post.ts b/test/functional/entity-metadata-validator/initialized-relations/entity/Post.ts index 27e7cf9cb..638c2b5e9 100644 --- a/test/functional/entity-metadata-validator/initialized-relations/entity/Post.ts +++ b/test/functional/entity-metadata-validator/initialized-relations/entity/Post.ts @@ -19,7 +19,7 @@ export class Post { @JoinColumn() category: Category - @ManyToMany((type) => Category) + @ManyToMany(() => Category) @JoinTable() categories: Category[] = [] } diff --git a/test/functional/entity-metadata-validator/initialized-relations/entity/Question.ts b/test/functional/entity-metadata-validator/initialized-relations/entity/Question.ts index 063992ff7..0ba02661a 100644 --- a/test/functional/entity-metadata-validator/initialized-relations/entity/Question.ts +++ b/test/functional/entity-metadata-validator/initialized-relations/entity/Question.ts @@ -13,7 +13,7 @@ export class Question { @Column() title: string - @ManyToMany((type) => Category, { persistence: false }) + @ManyToMany(() => Category, { persistence: false }) @JoinTable() categories: Category[] = [] } diff --git a/test/functional/entity-metadata/entity/Counters.ts b/test/functional/entity-metadata/entity/Counters.ts index c015d7f07..3a7a76b4e 100644 --- a/test/functional/entity-metadata/entity/Counters.ts +++ b/test/functional/entity-metadata/entity/Counters.ts @@ -20,7 +20,7 @@ export class Counters { @Column(() => Subcounters, { prefix: "sub" }) subcounters: Subcounters - @ManyToMany((type) => User, (user) => user.likedPosts) + @ManyToMany(() => User, (user) => user.likedPosts) @JoinTable() likedUsers: User[] } diff --git a/test/functional/entity-metadata/entity/Subcounters.ts b/test/functional/entity-metadata/entity/Subcounters.ts index 16b33b414..a1a6216f8 100644 --- a/test/functional/entity-metadata/entity/Subcounters.ts +++ b/test/functional/entity-metadata/entity/Subcounters.ts @@ -10,7 +10,7 @@ export class Subcounters { @Column() watches: number - @ManyToMany((type) => User) + @ManyToMany(() => User) @JoinTable({ name: "post_cnt_subcnt_wtch_users" }) watchedUsers: User[] } diff --git a/test/functional/entity-metadata/entity/User.ts b/test/functional/entity-metadata/entity/User.ts index 5e8b5df1a..0f9ed76b1 100644 --- a/test/functional/entity-metadata/entity/User.ts +++ b/test/functional/entity-metadata/entity/User.ts @@ -12,6 +12,6 @@ export class User { @Column() name: string - @ManyToMany((type) => Post, (post) => post.counters.likedUsers) + @ManyToMany(() => Post, (post) => post.counters.likedUsers) likedPosts: Post[] } diff --git a/test/functional/entity-model/entity/Post.ts b/test/functional/entity-model/entity/Post.ts index 281651a58..6999077cb 100644 --- a/test/functional/entity-model/entity/Post.ts +++ b/test/functional/entity-model/entity/Post.ts @@ -27,7 +27,7 @@ export class Post extends BaseEntity { }) text: string - @ManyToMany((type) => Category) + @ManyToMany(() => Category) @JoinTable() categories: Category[] } diff --git a/test/functional/migrations/generate-command/entity/post.entity.ts b/test/functional/migrations/generate-command/entity/post.entity.ts index cf14d6979..570f902ec 100644 --- a/test/functional/migrations/generate-command/entity/post.entity.ts +++ b/test/functional/migrations/generate-command/entity/post.entity.ts @@ -18,7 +18,7 @@ export class Post extends BaseEntity { }) text: string - @ManyToMany((type) => Category) + @ManyToMany(() => Category) @JoinTable() categories: Category[] } diff --git a/test/functional/migrations/show-command/migration/1530542855524-ExampleMigration.ts b/test/functional/migrations/show-command/migration/1530542855524-ExampleMigration.ts index bc23bb712..127b3b638 100644 --- a/test/functional/migrations/show-command/migration/1530542855524-ExampleMigration.ts +++ b/test/functional/migrations/show-command/migration/1530542855524-ExampleMigration.ts @@ -1,7 +1,6 @@ import { MigrationInterface } from "../../../../../src/migration/MigrationInterface" -import { QueryRunner } from "../../../../../src/query-runner/QueryRunner" export class ExampleMigration1530542855524 implements MigrationInterface { - public async up(queryRunner: QueryRunner): Promise {} - public async down(queryRunner: QueryRunner): Promise {} + public async up() {} + public async down() {} } diff --git a/test/functional/migrations/show-command/migration/1530542855524-ExampleMigrationTwo.ts b/test/functional/migrations/show-command/migration/1530542855524-ExampleMigrationTwo.ts index 7640b2f2f..3cc21709e 100644 --- a/test/functional/migrations/show-command/migration/1530542855524-ExampleMigrationTwo.ts +++ b/test/functional/migrations/show-command/migration/1530542855524-ExampleMigrationTwo.ts @@ -1,7 +1,6 @@ import { MigrationInterface } from "../../../../../src/migration/MigrationInterface" -import { QueryRunner } from "../../../../../src/query-runner/QueryRunner" export class ExampleMigrationTwo1530542855524 implements MigrationInterface { - public async up(queryRunner: QueryRunner): Promise {} - public async down(queryRunner: QueryRunner): Promise {} + public async up() {} + public async down() {} } diff --git a/test/functional/mongodb/basic/array-columns/entity/Post.ts b/test/functional/mongodb/basic/array-columns/entity/Post.ts index b3869b13b..c49c3cd97 100644 --- a/test/functional/mongodb/basic/array-columns/entity/Post.ts +++ b/test/functional/mongodb/basic/array-columns/entity/Post.ts @@ -12,7 +12,7 @@ export class Post { @Column() title: string - @Column((type) => Counters) + @Column(() => Counters) counters: Counters[] @Column() @@ -24,9 +24,9 @@ export class Post { @Column() booleans: boolean[] - @Column((type) => Counters, { array: true }) + @Column(() => Counters, { array: true }) other1: Counters[] - @Column((type) => Counters, { array: true }) + @Column(() => Counters, { array: true }) other2: Counters[] } diff --git a/test/functional/mongodb/basic/embedded-columns-listeners/entity/Counters.ts b/test/functional/mongodb/basic/embedded-columns-listeners/entity/Counters.ts index f566255bb..4371ab362 100644 --- a/test/functional/mongodb/basic/embedded-columns-listeners/entity/Counters.ts +++ b/test/functional/mongodb/basic/embedded-columns-listeners/entity/Counters.ts @@ -6,7 +6,7 @@ export class Counters { @Column() likes: number - @Column((type) => Information) + @Column(() => Information) information?: Information @BeforeInsert() diff --git a/test/functional/mongodb/basic/embedded-columns-listeners/entity/Post.ts b/test/functional/mongodb/basic/embedded-columns-listeners/entity/Post.ts index 152f14591..4ef295b92 100644 --- a/test/functional/mongodb/basic/embedded-columns-listeners/entity/Post.ts +++ b/test/functional/mongodb/basic/embedded-columns-listeners/entity/Post.ts @@ -16,9 +16,9 @@ export class Post { @Column() text: string - @Column((type) => Counters) + @Column(() => Counters) counters?: Counters - @Column((type) => Tags) + @Column(() => Tags) tags?: Tags[] } diff --git a/test/functional/mongodb/basic/embedded-columns/entity/Counters.ts b/test/functional/mongodb/basic/embedded-columns/entity/Counters.ts index 97b8071a0..d117b4ab9 100644 --- a/test/functional/mongodb/basic/embedded-columns/entity/Counters.ts +++ b/test/functional/mongodb/basic/embedded-columns/entity/Counters.ts @@ -12,9 +12,9 @@ export class Counters { @Column() favorites: number - @Column((type) => Information) + @Column(() => Information) information: Information - @Column((type) => ExtraInformation) + @Column(() => ExtraInformation) extraInformation: ExtraInformation } diff --git a/test/functional/mongodb/basic/embedded-columns/entity/ExtraInformation.ts b/test/functional/mongodb/basic/embedded-columns/entity/ExtraInformation.ts index 6d2c7b65f..e93c55802 100644 --- a/test/functional/mongodb/basic/embedded-columns/entity/ExtraInformation.ts +++ b/test/functional/mongodb/basic/embedded-columns/entity/ExtraInformation.ts @@ -2,6 +2,6 @@ import { Column } from "../../../../../../src/decorator/columns/Column" import { EditHistory } from "./EditHistory" export class ExtraInformation { - @Column((type) => EditHistory) + @Column(() => EditHistory) lastEdit: EditHistory } diff --git a/test/functional/mongodb/basic/embedded-columns/entity/Post.ts b/test/functional/mongodb/basic/embedded-columns/entity/Post.ts index c882e7e77..d6592666a 100644 --- a/test/functional/mongodb/basic/embedded-columns/entity/Post.ts +++ b/test/functional/mongodb/basic/embedded-columns/entity/Post.ts @@ -15,6 +15,6 @@ export class Post { @Column() text: string - @Column((type) => Counters) + @Column(() => Counters) counters: Counters } diff --git a/test/functional/multi-database/multi-database-basic-functionality/multi-database-basic-functionality.ts b/test/functional/multi-database/multi-database-basic-functionality/multi-database-basic-functionality.ts index da1bb3999..09f6f33f1 100644 --- a/test/functional/multi-database/multi-database-basic-functionality/multi-database-basic-functionality.ts +++ b/test/functional/multi-database/multi-database-basic-functionality/multi-database-basic-functionality.ts @@ -98,7 +98,7 @@ describe("multi-database > basic-functionality", () => { it("should correctly attach and create database files", () => Promise.all( - connections.map(async (connection) => { + connections.map(async () => { const expectedMainPath = path.join( tempPath, (connections[0].options.database as string).match( diff --git a/test/functional/multi-schema-and-database/custom-junction-database/entity/Post.ts b/test/functional/multi-schema-and-database/custom-junction-database/entity/Post.ts index e0132673d..4e64dd6c0 100644 --- a/test/functional/multi-schema-and-database/custom-junction-database/entity/Post.ts +++ b/test/functional/multi-schema-and-database/custom-junction-database/entity/Post.ts @@ -15,7 +15,7 @@ export class Post { @Column() name: string - @ManyToMany((type) => Category) + @ManyToMany(() => Category) @JoinTable({ database: "yoman" }) categories: Category[] } diff --git a/test/functional/multi-schema-and-database/custom-junction-schema/entity/Post.ts b/test/functional/multi-schema-and-database/custom-junction-schema/entity/Post.ts index f27061fda..9e77c78e9 100644 --- a/test/functional/multi-schema-and-database/custom-junction-schema/entity/Post.ts +++ b/test/functional/multi-schema-and-database/custom-junction-schema/entity/Post.ts @@ -15,7 +15,7 @@ export class Post { @Column() name: string - @ManyToMany((type) => Category) + @ManyToMany(() => Category) @JoinTable({ schema: "yoman" }) categories: Category[] } diff --git a/test/functional/persistence/bulk-insert-remove-optimization/entity/Category.ts b/test/functional/persistence/bulk-insert-remove-optimization/entity/Category.ts index 495d93901..5111dd0ec 100644 --- a/test/functional/persistence/bulk-insert-remove-optimization/entity/Category.ts +++ b/test/functional/persistence/bulk-insert-remove-optimization/entity/Category.ts @@ -12,6 +12,6 @@ export class Category { @Column() name: string - @ManyToMany((type) => Post, (post) => post.categories) + @ManyToMany(() => Post, (post) => post.categories) posts: Post[] } diff --git a/test/functional/persistence/bulk-insert-remove-optimization/entity/Post.ts b/test/functional/persistence/bulk-insert-remove-optimization/entity/Post.ts index 4baf0dffc..c4ec97d54 100644 --- a/test/functional/persistence/bulk-insert-remove-optimization/entity/Post.ts +++ b/test/functional/persistence/bulk-insert-remove-optimization/entity/Post.ts @@ -13,7 +13,7 @@ export class Post { @Column() title: string - @ManyToMany((type) => Category, (category) => category.posts, { + @ManyToMany(() => Category, (category) => category.posts, { cascade: ["insert"], }) @JoinTable() diff --git a/test/functional/persistence/cascades/cascades-remove/entity/User.ts b/test/functional/persistence/cascades/cascades-remove/entity/User.ts index 8cbcdfb46..1fa56b930 100644 --- a/test/functional/persistence/cascades/cascades-remove/entity/User.ts +++ b/test/functional/persistence/cascades/cascades-remove/entity/User.ts @@ -19,7 +19,7 @@ export class User { @OneToMany(() => Photo, (photo) => photo.user, { cascade: true }) manyPhotos: Photo[] - @ManyToMany((type) => Photo, { cascade: true }) + @ManyToMany(() => Photo, { cascade: true }) @JoinTable() manyToManyPhotos: Photo[] } diff --git a/test/functional/persistence/cascades/cascades-soft-remove/entity/User.ts b/test/functional/persistence/cascades/cascades-soft-remove/entity/User.ts index 36cfe29e2..42594466a 100644 --- a/test/functional/persistence/cascades/cascades-soft-remove/entity/User.ts +++ b/test/functional/persistence/cascades/cascades-soft-remove/entity/User.ts @@ -23,7 +23,7 @@ export class User { @OneToMany(() => Photo, (photo) => photo.user, { cascade: true }) manyPhotos: Photo[] - @ManyToMany((type) => Photo, { cascade: true }) + @ManyToMany(() => Photo, { cascade: true }) @JoinTable() manyToManyPhotos: Photo[] } diff --git a/test/functional/persistence/entity-updation/entity/PostComplex.ts b/test/functional/persistence/entity-updation/entity/PostComplex.ts index 8fc6ab1c8..1532f637e 100644 --- a/test/functional/persistence/entity-updation/entity/PostComplex.ts +++ b/test/functional/persistence/entity-updation/entity/PostComplex.ts @@ -11,6 +11,6 @@ export class PostComplex { @Column({ default: "Hello Complexity" }) text: string - @Column((type) => PostEmbedded) + @Column(() => PostEmbedded) embed: PostEmbedded } diff --git a/test/functional/persistence/many-to-many/entity/Category.ts b/test/functional/persistence/many-to-many/entity/Category.ts index ae72e2379..80a585ef9 100644 --- a/test/functional/persistence/many-to-many/entity/Category.ts +++ b/test/functional/persistence/many-to-many/entity/Category.ts @@ -12,6 +12,6 @@ export class Category { @Column() name: string - @ManyToMany((type) => Post, (post) => post.categories) + @ManyToMany(() => Post, (post) => post.categories) posts: Post[] } diff --git a/test/functional/persistence/many-to-many/entity/Post.ts b/test/functional/persistence/many-to-many/entity/Post.ts index a74012cdc..e171a6d07 100644 --- a/test/functional/persistence/many-to-many/entity/Post.ts +++ b/test/functional/persistence/many-to-many/entity/Post.ts @@ -13,7 +13,7 @@ export class Post { @Column() title: string - @ManyToMany((type) => Category, (category) => category.posts) + @ManyToMany(() => Category, (category) => category.posts) @JoinTable() categories: Category[] | null } diff --git a/test/functional/persistence/partial-persist/entity/Category.ts b/test/functional/persistence/partial-persist/entity/Category.ts index c853c2daf..bf8d83b49 100644 --- a/test/functional/persistence/partial-persist/entity/Category.ts +++ b/test/functional/persistence/partial-persist/entity/Category.ts @@ -15,6 +15,6 @@ export class Category { @Column() position: number - @ManyToMany((type) => Post, (post) => post.categories) + @ManyToMany(() => Post, (post) => post.categories) posts: Post[] } diff --git a/test/functional/persistence/partial-persist/entity/Post.ts b/test/functional/persistence/partial-persist/entity/Post.ts index c4ce1efb6..0585732ac 100644 --- a/test/functional/persistence/partial-persist/entity/Post.ts +++ b/test/functional/persistence/partial-persist/entity/Post.ts @@ -17,10 +17,10 @@ export class Post { @Column() description: string - @Column((type) => Counters) + @Column(() => Counters) counters: Counters - @ManyToMany((type) => Category, (category) => category.posts, { + @ManyToMany(() => Category, (category) => category.posts, { cascade: ["update"], }) @JoinTable() diff --git a/test/functional/query-builder/delete/entity/Photo.ts b/test/functional/query-builder/delete/entity/Photo.ts index 64e722116..1cf8d1d29 100644 --- a/test/functional/query-builder/delete/entity/Photo.ts +++ b/test/functional/query-builder/delete/entity/Photo.ts @@ -11,6 +11,6 @@ export class Photo { @Column() url: string - @Column((type) => Counters) + @Column(() => Counters) counters: Counters } diff --git a/test/functional/query-builder/insert/entity/Photo.ts b/test/functional/query-builder/insert/entity/Photo.ts index 64e722116..1cf8d1d29 100644 --- a/test/functional/query-builder/insert/entity/Photo.ts +++ b/test/functional/query-builder/insert/entity/Photo.ts @@ -11,6 +11,6 @@ export class Photo { @Column() url: string - @Column((type) => Counters) + @Column(() => Counters) counters: Counters } diff --git a/test/functional/query-builder/join/entity/Category.ts b/test/functional/query-builder/join/entity/Category.ts index caf636077..e1c4973b2 100644 --- a/test/functional/query-builder/join/entity/Category.ts +++ b/test/functional/query-builder/join/entity/Category.ts @@ -17,10 +17,10 @@ export class Category { @Column() isRemoved: boolean = false - @ManyToMany((type) => Post, (post) => post.categories) + @ManyToMany(() => Post, (post) => post.categories) posts: Post[] - @ManyToMany((type) => Image) + @ManyToMany(() => Image) @JoinTable() images: Image[] diff --git a/test/functional/query-builder/join/entity/Post.ts b/test/functional/query-builder/join/entity/Post.ts index 2ec3c25d5..046e222db 100644 --- a/test/functional/query-builder/join/entity/Post.ts +++ b/test/functional/query-builder/join/entity/Post.ts @@ -26,7 +26,7 @@ export class Post { @JoinColumn() author: User - @ManyToMany((type) => Category, (category) => category.posts) + @ManyToMany(() => Category, (category) => category.posts) @JoinTable() categories: Category[] diff --git a/test/functional/query-builder/locking/entity/Category.ts b/test/functional/query-builder/locking/entity/Category.ts index caf636077..e1c4973b2 100644 --- a/test/functional/query-builder/locking/entity/Category.ts +++ b/test/functional/query-builder/locking/entity/Category.ts @@ -17,10 +17,10 @@ export class Category { @Column() isRemoved: boolean = false - @ManyToMany((type) => Post, (post) => post.categories) + @ManyToMany(() => Post, (post) => post.categories) posts: Post[] - @ManyToMany((type) => Image) + @ManyToMany(() => Image) @JoinTable() images: Image[] diff --git a/test/functional/query-builder/locking/entity/Post.ts b/test/functional/query-builder/locking/entity/Post.ts index 2ec3c25d5..046e222db 100644 --- a/test/functional/query-builder/locking/entity/Post.ts +++ b/test/functional/query-builder/locking/entity/Post.ts @@ -26,7 +26,7 @@ export class Post { @JoinColumn() author: User - @ManyToMany((type) => Category, (category) => category.posts) + @ManyToMany(() => Category, (category) => category.posts) @JoinTable() categories: Category[] diff --git a/test/functional/query-builder/relation-count/relation-count-many-to-many/entity/Category.ts b/test/functional/query-builder/relation-count/relation-count-many-to-many/entity/Category.ts index fd93e957f..96dfa76ee 100644 --- a/test/functional/query-builder/relation-count/relation-count-many-to-many/entity/Category.ts +++ b/test/functional/query-builder/relation-count/relation-count-many-to-many/entity/Category.ts @@ -17,10 +17,10 @@ export class Category { @Column() isRemoved: boolean = false - @ManyToMany((type) => Post, (post) => post.categories) + @ManyToMany(() => Post, (post) => post.categories) posts: Post[] - @ManyToMany((type) => Image, (image) => image.categories) + @ManyToMany(() => Image, (image) => image.categories) @JoinTable() images: Image[] diff --git a/test/functional/query-builder/relation-count/relation-count-many-to-many/entity/Image.ts b/test/functional/query-builder/relation-count/relation-count-many-to-many/entity/Image.ts index 06ad028c2..81e3121c1 100644 --- a/test/functional/query-builder/relation-count/relation-count-many-to-many/entity/Image.ts +++ b/test/functional/query-builder/relation-count/relation-count-many-to-many/entity/Image.ts @@ -15,7 +15,7 @@ export class Image { @Column() isRemoved: boolean = false - @ManyToMany((type) => Category, (category) => category.images) + @ManyToMany(() => Category, (category) => category.images) categories: Category[] categoryCount: number diff --git a/test/functional/query-builder/relation-count/relation-count-many-to-many/entity/Post.ts b/test/functional/query-builder/relation-count/relation-count-many-to-many/entity/Post.ts index abe41de61..0c731c121 100644 --- a/test/functional/query-builder/relation-count/relation-count-many-to-many/entity/Post.ts +++ b/test/functional/query-builder/relation-count/relation-count-many-to-many/entity/Post.ts @@ -16,7 +16,7 @@ export class Post { @Column() isRemoved: boolean = false - @ManyToMany((type) => Category, (category) => category.posts) + @ManyToMany(() => Category, (category) => category.posts) @JoinTable() categories: Category[] diff --git a/test/functional/query-builder/relation-id/many-to-many/basic-functionality/entity/Category.ts b/test/functional/query-builder/relation-id/many-to-many/basic-functionality/entity/Category.ts index f5f76a7b6..be75ceee1 100644 --- a/test/functional/query-builder/relation-id/many-to-many/basic-functionality/entity/Category.ts +++ b/test/functional/query-builder/relation-id/many-to-many/basic-functionality/entity/Category.ts @@ -14,10 +14,10 @@ export class Category { @Column() name: string - @ManyToMany((type) => Post, (post) => post.categories) + @ManyToMany(() => Post, (post) => post.categories) posts: Post[] - @ManyToMany((type) => Image) + @ManyToMany(() => Image) @JoinTable() images: Image[] diff --git a/test/functional/query-builder/relation-id/many-to-many/basic-functionality/entity/Post.ts b/test/functional/query-builder/relation-id/many-to-many/basic-functionality/entity/Post.ts index e32534787..0f46a07cf 100644 --- a/test/functional/query-builder/relation-id/many-to-many/basic-functionality/entity/Post.ts +++ b/test/functional/query-builder/relation-id/many-to-many/basic-functionality/entity/Post.ts @@ -20,11 +20,11 @@ export class Post { tagId: number - @ManyToMany((type) => Category, (category) => category.posts) + @ManyToMany(() => Category, (category) => category.posts) @JoinTable() categories: Category[] - @ManyToMany((type) => Category) + @ManyToMany(() => Category) @JoinTable() subcategories: Category[] diff --git a/test/functional/query-builder/relation-id/many-to-many/embedded-with-multiple-pk/entity/Category.ts b/test/functional/query-builder/relation-id/many-to-many/embedded-with-multiple-pk/entity/Category.ts index 6a7cf10c4..d912d3b57 100644 --- a/test/functional/query-builder/relation-id/many-to-many/embedded-with-multiple-pk/entity/Category.ts +++ b/test/functional/query-builder/relation-id/many-to-many/embedded-with-multiple-pk/entity/Category.ts @@ -11,7 +11,7 @@ export class Category { @PrimaryColumn() name: string - @ManyToMany((type) => Post, (post) => post.counters.categories) + @ManyToMany(() => Post, (post) => post.counters.categories) posts: Post[] postIds: number[] diff --git a/test/functional/query-builder/relation-id/many-to-many/embedded-with-multiple-pk/entity/Counters.ts b/test/functional/query-builder/relation-id/many-to-many/embedded-with-multiple-pk/entity/Counters.ts index 2271d56d3..d0519cadd 100644 --- a/test/functional/query-builder/relation-id/many-to-many/embedded-with-multiple-pk/entity/Counters.ts +++ b/test/functional/query-builder/relation-id/many-to-many/embedded-with-multiple-pk/entity/Counters.ts @@ -18,7 +18,7 @@ export class Counters { @Column() favorites: number - @ManyToMany((type) => Category, (category) => category.posts) + @ManyToMany(() => Category, (category) => category.posts) @JoinTable({ name: "counter_categories" }) categories: Category[] diff --git a/test/functional/query-builder/relation-id/many-to-many/embedded-with-multiple-pk/entity/Subcounters.ts b/test/functional/query-builder/relation-id/many-to-many/embedded-with-multiple-pk/entity/Subcounters.ts index f1e35f54e..c5799ad86 100644 --- a/test/functional/query-builder/relation-id/many-to-many/embedded-with-multiple-pk/entity/Subcounters.ts +++ b/test/functional/query-builder/relation-id/many-to-many/embedded-with-multiple-pk/entity/Subcounters.ts @@ -11,7 +11,7 @@ export class Subcounters { @Column() watches: number - @ManyToMany((type) => User, (user) => user.posts) + @ManyToMany(() => User, (user) => user.posts) @JoinTable({ name: "subcnt_users" }) watchedUsers: User[] diff --git a/test/functional/query-builder/relation-id/many-to-many/embedded-with-multiple-pk/entity/User.ts b/test/functional/query-builder/relation-id/many-to-many/embedded-with-multiple-pk/entity/User.ts index b4f5f1435..37aba0eb8 100644 --- a/test/functional/query-builder/relation-id/many-to-many/embedded-with-multiple-pk/entity/User.ts +++ b/test/functional/query-builder/relation-id/many-to-many/embedded-with-multiple-pk/entity/User.ts @@ -11,7 +11,7 @@ export class User { @PrimaryColumn() name: string - @ManyToMany((type) => Post, (post) => post.counters.subcntrs.watchedUsers) + @ManyToMany(() => Post, (post) => post.counters.subcntrs.watchedUsers) posts: Post[] postIds: number[] diff --git a/test/functional/query-builder/relation-id/many-to-many/embedded/entity/Category.ts b/test/functional/query-builder/relation-id/many-to-many/embedded/entity/Category.ts index 09c818335..3335d17ea 100644 --- a/test/functional/query-builder/relation-id/many-to-many/embedded/entity/Category.ts +++ b/test/functional/query-builder/relation-id/many-to-many/embedded/entity/Category.ts @@ -12,7 +12,7 @@ export class Category { @Column() name: string - @ManyToMany((type) => Post, (post) => post.counters.categories) + @ManyToMany(() => Post, (post) => post.counters.categories) posts: Post[] postIds: number[] diff --git a/test/functional/query-builder/relation-id/many-to-many/embedded/entity/Counters.ts b/test/functional/query-builder/relation-id/many-to-many/embedded/entity/Counters.ts index 42f3583fc..f29a8b675 100644 --- a/test/functional/query-builder/relation-id/many-to-many/embedded/entity/Counters.ts +++ b/test/functional/query-builder/relation-id/many-to-many/embedded/entity/Counters.ts @@ -14,7 +14,7 @@ export class Counters { @Column() favorites: number - @ManyToMany((type) => Category, (category) => category.posts) + @ManyToMany(() => Category, (category) => category.posts) @JoinTable({ name: "counter_categories" }) categories: Category[] diff --git a/test/functional/query-builder/relation-id/many-to-many/embedded/entity/Subcounters.ts b/test/functional/query-builder/relation-id/many-to-many/embedded/entity/Subcounters.ts index a80bc3364..a6d128a69 100644 --- a/test/functional/query-builder/relation-id/many-to-many/embedded/entity/Subcounters.ts +++ b/test/functional/query-builder/relation-id/many-to-many/embedded/entity/Subcounters.ts @@ -14,7 +14,7 @@ export class Subcounters { @Column() watches: number - @ManyToMany((type) => User) + @ManyToMany(() => User) @JoinTable({ name: "subcnt_users" }) watchedUsers: User[] diff --git a/test/functional/query-builder/relation-id/many-to-many/multiple-pk/entity/Category.ts b/test/functional/query-builder/relation-id/many-to-many/multiple-pk/entity/Category.ts index 558957608..0b55e6a48 100644 --- a/test/functional/query-builder/relation-id/many-to-many/multiple-pk/entity/Category.ts +++ b/test/functional/query-builder/relation-id/many-to-many/multiple-pk/entity/Category.ts @@ -20,10 +20,10 @@ export class Category { @Column() isRemoved: boolean = false - @ManyToMany((type) => Post, (post) => post.categories) + @ManyToMany(() => Post, (post) => post.categories) posts: Post[] - @ManyToMany((type) => Image, (image) => image.categories) + @ManyToMany(() => Image, (image) => image.categories) @JoinTable() images: Image[] diff --git a/test/functional/query-builder/relation-id/many-to-many/multiple-pk/entity/Image.ts b/test/functional/query-builder/relation-id/many-to-many/multiple-pk/entity/Image.ts index 147daf9a7..4fda5fec5 100644 --- a/test/functional/query-builder/relation-id/many-to-many/multiple-pk/entity/Image.ts +++ b/test/functional/query-builder/relation-id/many-to-many/multiple-pk/entity/Image.ts @@ -12,7 +12,7 @@ export class Image { @Column() name: string - @ManyToMany((type) => Category, (category) => category.images) + @ManyToMany(() => Category, (category) => category.images) categories: Category[] categoryIds: number[] diff --git a/test/functional/query-builder/relation-id/many-to-many/multiple-pk/entity/Post.ts b/test/functional/query-builder/relation-id/many-to-many/multiple-pk/entity/Post.ts index e1d801e7a..8a5295394 100644 --- a/test/functional/query-builder/relation-id/many-to-many/multiple-pk/entity/Post.ts +++ b/test/functional/query-builder/relation-id/many-to-many/multiple-pk/entity/Post.ts @@ -19,11 +19,11 @@ export class Post { @Column() isRemoved: boolean = false - @ManyToMany((type) => Category, (category) => category.posts) + @ManyToMany(() => Category, (category) => category.posts) @JoinTable() categories: Category[] - @ManyToMany((type) => Category) + @ManyToMany(() => Category) @JoinTable() subcategories: Category[] diff --git a/test/functional/query-builder/relational/with-many/entity/Image.ts b/test/functional/query-builder/relational/with-many/entity/Image.ts index ea04db077..12380c896 100644 --- a/test/functional/query-builder/relational/with-many/entity/Image.ts +++ b/test/functional/query-builder/relational/with-many/entity/Image.ts @@ -12,6 +12,6 @@ export class Image { @Column() url: string - @ManyToMany((type) => Post, (post) => post.images) + @ManyToMany(() => Post, (post) => post.images) posts: Post[] } diff --git a/test/functional/query-builder/relational/with-many/entity/Post.ts b/test/functional/query-builder/relational/with-many/entity/Post.ts index 9039b19ad..ed7687f47 100644 --- a/test/functional/query-builder/relational/with-many/entity/Post.ts +++ b/test/functional/query-builder/relational/with-many/entity/Post.ts @@ -18,7 +18,7 @@ export class Post { @ManyToOne(() => Category, (category) => category.posts) category: Category - @ManyToMany((type) => Image, (image) => image.posts) + @ManyToMany(() => Image, (image) => image.posts) @JoinTable() images: Image[] } diff --git a/test/functional/query-builder/soft-delete/entity/Photo.ts b/test/functional/query-builder/soft-delete/entity/Photo.ts index 81bdf27e2..a716180c4 100644 --- a/test/functional/query-builder/soft-delete/entity/Photo.ts +++ b/test/functional/query-builder/soft-delete/entity/Photo.ts @@ -12,7 +12,7 @@ export class Photo { @Column() url: string - @Column((type) => Counters) + @Column(() => Counters) counters: Counters @DeleteDateColumn() diff --git a/test/functional/query-builder/subquery/entity/Post.ts b/test/functional/query-builder/subquery/entity/Post.ts index 301c65e66..f655f76de 100644 --- a/test/functional/query-builder/subquery/entity/Post.ts +++ b/test/functional/query-builder/subquery/entity/Post.ts @@ -13,7 +13,7 @@ export class Post { @Column() title: string - @ManyToMany((type) => Category) + @ManyToMany(() => Category) @JoinTable() categories: Category[] } diff --git a/test/functional/query-builder/update/entity/Photo.ts b/test/functional/query-builder/update/entity/Photo.ts index 64e722116..1cf8d1d29 100644 --- a/test/functional/query-builder/update/entity/Photo.ts +++ b/test/functional/query-builder/update/entity/Photo.ts @@ -11,6 +11,6 @@ export class Photo { @Column() url: string - @Column((type) => Counters) + @Column(() => Counters) counters: Counters } diff --git a/test/functional/relations/eager-relations/basic-eager-relations/entity/Category.ts b/test/functional/relations/eager-relations/basic-eager-relations/entity/Category.ts index 1153f06f8..5f3da6fce 100644 --- a/test/functional/relations/eager-relations/basic-eager-relations/entity/Category.ts +++ b/test/functional/relations/eager-relations/basic-eager-relations/entity/Category.ts @@ -13,7 +13,7 @@ export class Category { @Column() name: string - @ManyToMany((type) => Post, (post) => post.categories2) + @ManyToMany(() => Post, (post) => post.categories2) @JoinTable() posts2: Post[] } diff --git a/test/functional/relations/eager-relations/basic-eager-relations/entity/Post.ts b/test/functional/relations/eager-relations/basic-eager-relations/entity/Post.ts index 9a7bf70e7..e2ad23eb6 100644 --- a/test/functional/relations/eager-relations/basic-eager-relations/entity/Post.ts +++ b/test/functional/relations/eager-relations/basic-eager-relations/entity/Post.ts @@ -17,11 +17,11 @@ export class Post { @Column() title: string - @ManyToMany((type) => Category, { eager: true }) + @ManyToMany(() => Category, { eager: true }) @JoinTable() categories1: Category[] - @ManyToMany((type) => Category, (category) => category.posts2, { + @ManyToMany(() => Category, (category) => category.posts2, { eager: true, }) categories2: Category[] diff --git a/test/functional/relations/eager-relations/lazy-nested-eager-relations/entity/Category.ts b/test/functional/relations/eager-relations/lazy-nested-eager-relations/entity/Category.ts index 1153f06f8..5f3da6fce 100644 --- a/test/functional/relations/eager-relations/lazy-nested-eager-relations/entity/Category.ts +++ b/test/functional/relations/eager-relations/lazy-nested-eager-relations/entity/Category.ts @@ -13,7 +13,7 @@ export class Category { @Column() name: string - @ManyToMany((type) => Post, (post) => post.categories2) + @ManyToMany(() => Post, (post) => post.categories2) @JoinTable() posts2: Post[] } diff --git a/test/functional/relations/eager-relations/lazy-nested-eager-relations/entity/Post.ts b/test/functional/relations/eager-relations/lazy-nested-eager-relations/entity/Post.ts index 9a7bf70e7..e2ad23eb6 100644 --- a/test/functional/relations/eager-relations/lazy-nested-eager-relations/entity/Post.ts +++ b/test/functional/relations/eager-relations/lazy-nested-eager-relations/entity/Post.ts @@ -17,11 +17,11 @@ export class Post { @Column() title: string - @ManyToMany((type) => Category, { eager: true }) + @ManyToMany(() => Category, { eager: true }) @JoinTable() categories1: Category[] - @ManyToMany((type) => Category, (category) => category.posts2, { + @ManyToMany(() => Category, (category) => category.posts2, { eager: true, }) categories2: Category[] diff --git a/test/functional/relations/lazy-relations/basic-lazy-relation/entity/Category.ts b/test/functional/relations/lazy-relations/basic-lazy-relation/entity/Category.ts index 6d7f16788..b0bdaea92 100644 --- a/test/functional/relations/lazy-relations/basic-lazy-relation/entity/Category.ts +++ b/test/functional/relations/lazy-relations/basic-lazy-relation/entity/Category.ts @@ -17,7 +17,7 @@ export class Category { @OneToOne(() => Post, (post) => post.oneCategory) onePost: Promise - @ManyToMany((type) => Post, (post) => post.twoSideCategories) + @ManyToMany(() => Post, (post) => post.twoSideCategories) twoSidePosts: Promise @OneToMany(() => Post, (post) => post.twoSideCategory) diff --git a/test/functional/relations/lazy-relations/basic-lazy-relation/entity/Post.ts b/test/functional/relations/lazy-relations/basic-lazy-relation/entity/Post.ts index 14b2dad3b..59fa2e212 100644 --- a/test/functional/relations/lazy-relations/basic-lazy-relation/entity/Post.ts +++ b/test/functional/relations/lazy-relations/basic-lazy-relation/entity/Post.ts @@ -19,11 +19,11 @@ export class Post { @Column() text: string - @ManyToMany((type) => Category) + @ManyToMany(() => Category) @JoinTable() categories: Promise - @ManyToMany((type) => Category, (category) => category.twoSidePosts) + @ManyToMany(() => Category, (category) => category.twoSidePosts) @JoinTable() twoSideCategories: Promise diff --git a/test/functional/relations/lazy-relations/named-columns/entity/Category.ts b/test/functional/relations/lazy-relations/named-columns/entity/Category.ts index 973c0bf1e..308fe1e7b 100644 --- a/test/functional/relations/lazy-relations/named-columns/entity/Category.ts +++ b/test/functional/relations/lazy-relations/named-columns/entity/Category.ts @@ -19,14 +19,14 @@ export class Category { @OneToOne(() => Post, (post) => post.oneCategory) onePost: Promise - @ManyToMany((type) => Post, (post) => post.twoSideCategories) + @ManyToMany(() => Post, (post) => post.twoSideCategories) twoSidePosts: Promise @OneToMany(() => Post, (post) => post.twoSideCategory) twoSidePosts2: Promise // ManyToMany with named properties - @ManyToMany((type) => Post, (post) => post.categoriesNamedColumn) + @ManyToMany(() => Post, (post) => post.categoriesNamedColumn) postsNamedColumn: Promise // OneToMany with named properties diff --git a/test/functional/relations/lazy-relations/named-columns/entity/Post.ts b/test/functional/relations/lazy-relations/named-columns/entity/Post.ts index 88c8830e1..eefd06c79 100644 --- a/test/functional/relations/lazy-relations/named-columns/entity/Post.ts +++ b/test/functional/relations/lazy-relations/named-columns/entity/Post.ts @@ -21,11 +21,11 @@ export class Post { @Column() text: string - @ManyToMany((type) => Category) + @ManyToMany(() => Category) @JoinTable() categories: Promise - @ManyToMany((type) => Category, (category) => category.twoSidePosts) + @ManyToMany(() => Category, (category) => category.twoSidePosts) @JoinTable() twoSideCategories: Promise @@ -43,7 +43,7 @@ export class Post { twoSideCategory: Promise // ManyToMany with named properties - @ManyToMany((type) => Category, (category) => category.postsNamedColumn) + @ManyToMany(() => Category, (category) => category.postsNamedColumn) @JoinTable() categoriesNamedColumn: Promise diff --git a/test/functional/relations/lazy-relations/named-tables-and-columns/entity/Category.ts b/test/functional/relations/lazy-relations/named-tables-and-columns/entity/Category.ts index cead01342..26591895f 100644 --- a/test/functional/relations/lazy-relations/named-tables-and-columns/entity/Category.ts +++ b/test/functional/relations/lazy-relations/named-tables-and-columns/entity/Category.ts @@ -23,14 +23,14 @@ export class Category { @OneToOne(() => Post, (post) => post.oneCategory) onePost: Promise - @ManyToMany((type) => Post, (post) => post.twoSideCategories) + @ManyToMany(() => Post, (post) => post.twoSideCategories) twoSidePosts: Promise @OneToMany(() => Post, (post) => post.twoSideCategory) twoSidePosts2: Promise // ManyToMany with named properties - @ManyToMany((type) => Post, (post) => post.categoriesNamedAll) + @ManyToMany(() => Post, (post) => post.categoriesNamedAll) postsNamedAll: Promise // OneToMany with named properties diff --git a/test/functional/relations/lazy-relations/named-tables-and-columns/entity/Post.ts b/test/functional/relations/lazy-relations/named-tables-and-columns/entity/Post.ts index 0b8969b44..1a1255efd 100644 --- a/test/functional/relations/lazy-relations/named-tables-and-columns/entity/Post.ts +++ b/test/functional/relations/lazy-relations/named-tables-and-columns/entity/Post.ts @@ -26,11 +26,11 @@ export class Post { @Column() text: string - @ManyToMany((type) => Category) + @ManyToMany(() => Category) @JoinTable() categories: Promise - @ManyToMany((type) => Category, (category) => category.twoSidePosts) + @ManyToMany(() => Category, (category) => category.twoSidePosts) @JoinTable() twoSideCategories: Promise @@ -48,7 +48,7 @@ export class Post { twoSideCategory: Promise // ManyToMany with named properties - @ManyToMany((type) => Category, (category) => category.postsNamedAll) + @ManyToMany(() => Category, (category) => category.postsNamedAll) @JoinTable() categoriesNamedAll: Promise diff --git a/test/functional/relations/lazy-relations/named-tables/entity/Category.ts b/test/functional/relations/lazy-relations/named-tables/entity/Category.ts index 3c5dc76b9..887d52622 100644 --- a/test/functional/relations/lazy-relations/named-tables/entity/Category.ts +++ b/test/functional/relations/lazy-relations/named-tables/entity/Category.ts @@ -21,14 +21,14 @@ export class Category { @OneToOne(() => Post, (post) => post.oneCategory) onePost: Promise - @ManyToMany((type) => Post, (post) => post.twoSideCategories) + @ManyToMany(() => Post, (post) => post.twoSideCategories) twoSidePosts: Promise @OneToMany(() => Post, (post) => post.twoSideCategory) twoSidePosts2: Promise // ManyToMany with named properties - @ManyToMany((type) => Post, (post) => post.categoriesNamedTable) + @ManyToMany(() => Post, (post) => post.categoriesNamedTable) postsNamedTable: Promise // OneToMany with named properties diff --git a/test/functional/relations/lazy-relations/named-tables/entity/Post.ts b/test/functional/relations/lazy-relations/named-tables/entity/Post.ts index edbf52bf0..de796689a 100644 --- a/test/functional/relations/lazy-relations/named-tables/entity/Post.ts +++ b/test/functional/relations/lazy-relations/named-tables/entity/Post.ts @@ -24,11 +24,11 @@ export class Post { @Column() text: string - @ManyToMany((type) => Category) + @ManyToMany(() => Category) @JoinTable() categories: Promise - @ManyToMany((type) => Category, (category) => category.twoSidePosts) + @ManyToMany(() => Category, (category) => category.twoSidePosts) @JoinTable() twoSideCategories: Promise @@ -46,7 +46,7 @@ export class Post { twoSideCategory: Promise // ManyToMany with named properties - @ManyToMany((type) => Category, (category) => category.postsNamedTable) + @ManyToMany(() => Category, (category) => category.postsNamedTable) @JoinTable() categoriesNamedTable: Promise diff --git a/test/functional/relations/multiple-primary-keys/multiple-primary-keys-many-to-many/entity/Category.ts b/test/functional/relations/multiple-primary-keys/multiple-primary-keys-many-to-many/entity/Category.ts index 3341af104..11ef2536d 100644 --- a/test/functional/relations/multiple-primary-keys/multiple-primary-keys-many-to-many/entity/Category.ts +++ b/test/functional/relations/multiple-primary-keys/multiple-primary-keys-many-to-many/entity/Category.ts @@ -28,21 +28,21 @@ export class Category { @Column({ nullable: true }) description: string - @ManyToMany((type) => Post, (post) => post.categories) + @ManyToMany(() => Post, (post) => post.categories) posts: Post[] - @ManyToMany((type) => Post, (post) => post.categoriesWithOptions) + @ManyToMany(() => Post, (post) => post.categoriesWithOptions) postsWithOptions: Post[] - @ManyToMany((type) => Post, (post) => post.categoriesWithNonPKColumns) + @ManyToMany(() => Post, (post) => post.categoriesWithNonPKColumns) postsWithNonPKColumns: Post[] - @ManyToMany((type) => Tag, (tag) => tag.categories) + @ManyToMany(() => Tag, (tag) => tag.categories) tags: Tag[] - @ManyToMany((type) => Tag, (tag) => tag.categoriesWithOptions) + @ManyToMany(() => Tag, (tag) => tag.categoriesWithOptions) tagsWithOptions: Tag[] - @ManyToMany((type) => Tag, (tag) => tag.categoriesWithNonPKColumns) + @ManyToMany(() => Tag, (tag) => tag.categoriesWithNonPKColumns) tagsWithNonPKColumns: Tag[] } diff --git a/test/functional/relations/multiple-primary-keys/multiple-primary-keys-many-to-many/entity/Post.ts b/test/functional/relations/multiple-primary-keys/multiple-primary-keys-many-to-many/entity/Post.ts index ee45f03bd..f4841c667 100644 --- a/test/functional/relations/multiple-primary-keys/multiple-primary-keys-many-to-many/entity/Post.ts +++ b/test/functional/relations/multiple-primary-keys/multiple-primary-keys-many-to-many/entity/Post.ts @@ -13,11 +13,11 @@ export class Post { @Column() title: string - @ManyToMany((type) => Category, (category) => category.posts) + @ManyToMany(() => Category, (category) => category.posts) @JoinTable() categories: Category[] - @ManyToMany((type) => Category, (category) => category.postsWithOptions) + @ManyToMany(() => Category, (category) => category.postsWithOptions) @JoinTable({ name: "post_categories", joinColumns: [ @@ -39,10 +39,7 @@ export class Post { }) categoriesWithOptions: Category[] - @ManyToMany( - (type) => Category, - (category) => category.postsWithNonPKColumns, - ) + @ManyToMany(() => Category, (category) => category.postsWithNonPKColumns) @JoinTable({ name: "post_categories_non_primary", joinColumns: [ diff --git a/test/functional/relations/multiple-primary-keys/multiple-primary-keys-many-to-many/entity/Tag.ts b/test/functional/relations/multiple-primary-keys/multiple-primary-keys-many-to-many/entity/Tag.ts index f8c937c92..2826051ff 100644 --- a/test/functional/relations/multiple-primary-keys/multiple-primary-keys-many-to-many/entity/Tag.ts +++ b/test/functional/relations/multiple-primary-keys/multiple-primary-keys-many-to-many/entity/Tag.ts @@ -20,11 +20,11 @@ export class Tag { }) description: string - @ManyToMany((type) => Category, (category) => category.tags) + @ManyToMany(() => Category, (category) => category.tags) @JoinTable() categories: Category[] - @ManyToMany((type) => Category, (category) => category.tagsWithOptions) + @ManyToMany(() => Category, (category) => category.tagsWithOptions) @JoinTable({ name: "tag_categories", joinColumns: [ @@ -50,7 +50,7 @@ export class Tag { }) categoriesWithOptions: Category[] - @ManyToMany((type) => Category, (category) => category.tagsWithNonPKColumns) + @ManyToMany(() => Category, (category) => category.tagsWithNonPKColumns) @JoinTable({ name: "tag_categories_non_primary", joinColumns: [ diff --git a/test/functional/repository/basic-methods/entity/Blog.ts b/test/functional/repository/basic-methods/entity/Blog.ts index 139dd6b45..f40d52341 100644 --- a/test/functional/repository/basic-methods/entity/Blog.ts +++ b/test/functional/repository/basic-methods/entity/Blog.ts @@ -16,7 +16,7 @@ export class Blog { @Column() text: string - @ManyToMany((type) => Category) + @ManyToMany(() => Category) @JoinTable() categories: Category[] diff --git a/test/functional/repository/basic-methods/repository-basic-methods.ts b/test/functional/repository/basic-methods/repository-basic-methods.ts index 7dc7ea80a..07cf148b6 100644 --- a/test/functional/repository/basic-methods/repository-basic-methods.ts +++ b/test/functional/repository/basic-methods/repository-basic-methods.ts @@ -562,7 +562,7 @@ describe("repository > basic methods", () => { await externalIdObjects.findBy({ externalId: Like("external-bulk-%"), }) - ).forEach((inserted, i) => { + ).forEach((inserted) => { inserted.title.should.be.equal("Initially inserted") }) @@ -581,7 +581,7 @@ describe("repository > basic methods", () => { await externalIdObjects.findBy({ externalId: Like("external-bulk-%"), }) - ).forEach((updated, i) => { + ).forEach((updated) => { updated.title.should.be.equal("Updated") }) }), diff --git a/test/functional/repository/decrement/entity/UserWithEmbededEntity.ts b/test/functional/repository/decrement/entity/UserWithEmbededEntity.ts index 4e3c46ce4..8e6fd301b 100644 --- a/test/functional/repository/decrement/entity/UserWithEmbededEntity.ts +++ b/test/functional/repository/decrement/entity/UserWithEmbededEntity.ts @@ -16,6 +16,6 @@ export class UserWithEmbededEntity { @PrimaryColumn() id: number - @Column((type) => FriendStats) + @Column(() => FriendStats) friend: FriendStats } diff --git a/test/functional/repository/find-options-locking/entity/Category.ts b/test/functional/repository/find-options-locking/entity/Category.ts index caf636077..e1c4973b2 100644 --- a/test/functional/repository/find-options-locking/entity/Category.ts +++ b/test/functional/repository/find-options-locking/entity/Category.ts @@ -17,10 +17,10 @@ export class Category { @Column() isRemoved: boolean = false - @ManyToMany((type) => Post, (post) => post.categories) + @ManyToMany(() => Post, (post) => post.categories) posts: Post[] - @ManyToMany((type) => Image) + @ManyToMany(() => Image) @JoinTable() images: Image[] diff --git a/test/functional/repository/find-options-locking/entity/Post.ts b/test/functional/repository/find-options-locking/entity/Post.ts index 2ec3c25d5..046e222db 100644 --- a/test/functional/repository/find-options-locking/entity/Post.ts +++ b/test/functional/repository/find-options-locking/entity/Post.ts @@ -26,7 +26,7 @@ export class Post { @JoinColumn() author: User - @ManyToMany((type) => Category, (category) => category.posts) + @ManyToMany(() => Category, (category) => category.posts) @JoinTable() categories: Category[] diff --git a/test/functional/repository/find-options-relations/entity/Photo.ts b/test/functional/repository/find-options-relations/entity/Photo.ts index 00b19d65a..91ea5c874 100644 --- a/test/functional/repository/find-options-relations/entity/Photo.ts +++ b/test/functional/repository/find-options-relations/entity/Photo.ts @@ -20,6 +20,6 @@ export class Photo { @ManyToOne(() => Post, (post) => post.photos) post: Post - @Column((type) => Counters) + @Column(() => Counters) counters: Counters } diff --git a/test/functional/repository/find-options-relations/entity/Post.ts b/test/functional/repository/find-options-relations/entity/Post.ts index c72f9513d..804527429 100644 --- a/test/functional/repository/find-options-relations/entity/Post.ts +++ b/test/functional/repository/find-options-relations/entity/Post.ts @@ -24,10 +24,10 @@ export class Post { @ManyToOne(() => User) user: User - @ManyToMany((type) => Category) + @ManyToMany(() => Category) @JoinTable() categories: Category[] - @Column((type) => Counters) + @Column(() => Counters) counters: Counters } diff --git a/test/functional/repository/find-options/entity/Photo.ts b/test/functional/repository/find-options/entity/Photo.ts index 6fec0377e..eb7488373 100644 --- a/test/functional/repository/find-options/entity/Photo.ts +++ b/test/functional/repository/find-options/entity/Photo.ts @@ -29,7 +29,7 @@ export class Photo { @Column() isPublished: boolean - @ManyToMany((type) => Category) + @ManyToMany(() => Category) @JoinTable() categories: Category[] } diff --git a/test/functional/repository/find-options/entity/Post.ts b/test/functional/repository/find-options/entity/Post.ts index f8af32c50..60ec05516 100644 --- a/test/functional/repository/find-options/entity/Post.ts +++ b/test/functional/repository/find-options/entity/Post.ts @@ -18,7 +18,7 @@ export class Post { @ManyToOne(() => User) author: User - @ManyToMany((type) => Category) + @ManyToMany(() => Category) @JoinTable() categories: Category[] } diff --git a/test/functional/repository/increment/entity/UserWithEmbededEntity.ts b/test/functional/repository/increment/entity/UserWithEmbededEntity.ts index 4e3c46ce4..8e6fd301b 100644 --- a/test/functional/repository/increment/entity/UserWithEmbededEntity.ts +++ b/test/functional/repository/increment/entity/UserWithEmbededEntity.ts @@ -16,6 +16,6 @@ export class UserWithEmbededEntity { @PrimaryColumn() id: number - @Column((type) => FriendStats) + @Column(() => FriendStats) friend: FriendStats } diff --git a/test/functional/repository/set-add-remove-relations/entity/Category.ts b/test/functional/repository/set-add-remove-relations/entity/Category.ts index 1512653a3..f58106bf1 100644 --- a/test/functional/repository/set-add-remove-relations/entity/Category.ts +++ b/test/functional/repository/set-add-remove-relations/entity/Category.ts @@ -16,6 +16,6 @@ export class Category { @ManyToOne(() => Post, (post) => post.categories) post: Post - @ManyToMany((type) => Post, (post) => post.manyCategories) + @ManyToMany(() => Post, (post) => post.manyCategories) manyPosts: Post[] } diff --git a/test/functional/repository/set-add-remove-relations/entity/Post.ts b/test/functional/repository/set-add-remove-relations/entity/Post.ts index 3a24585a9..820a1e62d 100644 --- a/test/functional/repository/set-add-remove-relations/entity/Post.ts +++ b/test/functional/repository/set-add-remove-relations/entity/Post.ts @@ -17,7 +17,7 @@ export class Post { @OneToMany(() => Category, (category) => category.post) categories: Category[] | null - @ManyToMany((type) => Category, (category) => category.manyPosts) + @ManyToMany(() => Category, (category) => category.manyPosts) @JoinTable() manyCategories: Category[] } diff --git a/test/functional/sqljs/auto-save.ts b/test/functional/sqljs/auto-save.ts index 0a0443fc9..99ba0d7c0 100644 --- a/test/functional/sqljs/auto-save.ts +++ b/test/functional/sqljs/auto-save.ts @@ -7,7 +7,7 @@ import { createTestingConnections } from "../../utils/test-utils" describe("sqljs driver > autosave", () => { let connections: DataSource[] let saves = 0 - const callback = (database: Uint8Array) => { + const callback = () => { saves++ } @@ -81,7 +81,7 @@ describe("sqljs driver > autosave", () => { describe("sqljs driver > autosave off", () => { let connections: DataSource[] let saves = 0 - const callback = (database: Uint8Array) => { + const callback = () => { saves++ } diff --git a/test/functional/table-inheritance/single-table/relations/many-to-many/entity/Accountant.ts b/test/functional/table-inheritance/single-table/relations/many-to-many/entity/Accountant.ts index 13dbfed94..ab7ae809f 100644 --- a/test/functional/table-inheritance/single-table/relations/many-to-many/entity/Accountant.ts +++ b/test/functional/table-inheritance/single-table/relations/many-to-many/entity/Accountant.ts @@ -6,7 +6,7 @@ import { Department } from "./Department" @ChildEntity() export class Accountant extends Employee { - @ManyToMany((type) => Department, (department) => department.accountants) + @ManyToMany(() => Department, (department) => department.accountants) @JoinTable() departments: Department[] } diff --git a/test/functional/table-inheritance/single-table/relations/many-to-many/entity/Department.ts b/test/functional/table-inheritance/single-table/relations/many-to-many/entity/Department.ts index a27a86a8c..d6f5e1165 100644 --- a/test/functional/table-inheritance/single-table/relations/many-to-many/entity/Department.ts +++ b/test/functional/table-inheritance/single-table/relations/many-to-many/entity/Department.ts @@ -12,6 +12,6 @@ export class Department { @Column() name: string - @ManyToMany((type) => Accountant, (accountant) => accountant.departments) + @ManyToMany(() => Accountant, (accountant) => accountant.departments) accountants: Accountant[] } diff --git a/test/functional/table-inheritance/single-table/relations/many-to-many/entity/Faculty.ts b/test/functional/table-inheritance/single-table/relations/many-to-many/entity/Faculty.ts index 044be5935..c76885eae 100644 --- a/test/functional/table-inheritance/single-table/relations/many-to-many/entity/Faculty.ts +++ b/test/functional/table-inheritance/single-table/relations/many-to-many/entity/Faculty.ts @@ -12,6 +12,6 @@ export class Faculty { @Column() name: string - @ManyToMany((type) => Student, (student) => student.faculties) + @ManyToMany(() => Student, (student) => student.faculties) students: Student[] } diff --git a/test/functional/table-inheritance/single-table/relations/many-to-many/entity/Specialization.ts b/test/functional/table-inheritance/single-table/relations/many-to-many/entity/Specialization.ts index 4cd8b2be1..18af5cabb 100644 --- a/test/functional/table-inheritance/single-table/relations/many-to-many/entity/Specialization.ts +++ b/test/functional/table-inheritance/single-table/relations/many-to-many/entity/Specialization.ts @@ -12,6 +12,6 @@ export class Specialization { @Column() name: string - @ManyToMany((type) => Teacher, (teacher) => teacher.specializations) + @ManyToMany(() => Teacher, (teacher) => teacher.specializations) teachers: Teacher[] } diff --git a/test/functional/table-inheritance/single-table/relations/many-to-many/entity/Student.ts b/test/functional/table-inheritance/single-table/relations/many-to-many/entity/Student.ts index e6bc8476c..91f2979b2 100644 --- a/test/functional/table-inheritance/single-table/relations/many-to-many/entity/Student.ts +++ b/test/functional/table-inheritance/single-table/relations/many-to-many/entity/Student.ts @@ -6,7 +6,7 @@ import { JoinTable } from "../../../../../../../src/decorator/relations/JoinTabl @ChildEntity() export class Student extends Person { - @ManyToMany((type) => Faculty, (faculty) => faculty.students) + @ManyToMany(() => Faculty, (faculty) => faculty.students) @JoinTable() faculties: Faculty[] } diff --git a/test/functional/table-inheritance/single-table/relations/many-to-many/entity/Teacher.ts b/test/functional/table-inheritance/single-table/relations/many-to-many/entity/Teacher.ts index b4a8cd702..b525af92c 100644 --- a/test/functional/table-inheritance/single-table/relations/many-to-many/entity/Teacher.ts +++ b/test/functional/table-inheritance/single-table/relations/many-to-many/entity/Teacher.ts @@ -7,7 +7,7 @@ import { Specialization } from "./Specialization" @ChildEntity() export class Teacher extends Employee { @ManyToMany( - (type) => Specialization, + () => Specialization, (specialization) => specialization.teachers, ) @JoinTable({ name: "person_specs" }) diff --git a/test/functional/table-inheritance/single-table/relations/one-to-many/entity/Teacher.ts b/test/functional/table-inheritance/single-table/relations/one-to-many/entity/Teacher.ts index 0a8616697..d466c617c 100644 --- a/test/functional/table-inheritance/single-table/relations/one-to-many/entity/Teacher.ts +++ b/test/functional/table-inheritance/single-table/relations/one-to-many/entity/Teacher.ts @@ -5,9 +5,6 @@ import { Specialization } from "./Specialization" @ChildEntity() export class Teacher extends Employee { - @OneToMany( - (type) => Specialization, - (specialization) => specialization.teacher, - ) + @OneToMany(() => Specialization, (specialization) => specialization.teacher) specializations: Specialization[] } diff --git a/test/functional/transaction/transaction-in-entity-manager/transaction-in-entity-manager.ts b/test/functional/transaction/transaction-in-entity-manager/transaction-in-entity-manager.ts index 3c29efe1e..97b9af6fa 100644 --- a/test/functional/transaction/transaction-in-entity-manager/transaction-in-entity-manager.ts +++ b/test/functional/transaction/transaction-in-entity-manager/transaction-in-entity-manager.ts @@ -110,7 +110,7 @@ describe("transaction > transaction with entity manager", () => { await entityManager.save(wrongPost) }, ) - } catch (err) { + } catch { /* skip error */ } diff --git a/test/functional/view-entity/general/entity/PhotoAlbum.ts b/test/functional/view-entity/general/entity/PhotoAlbum.ts index 8bed0cc02..88a2cdb85 100644 --- a/test/functional/view-entity/general/entity/PhotoAlbum.ts +++ b/test/functional/view-entity/general/entity/PhotoAlbum.ts @@ -5,17 +5,17 @@ import { Album } from "./Album" import { Photo } from "./Photo" export const uppercase: ValueTransformer = { - to: (entityValue: string) => {}, + to: () => {}, from: (databaseValue: string) => databaseValue.toLocaleUpperCase(), } export const lowercase: ValueTransformer = { - to: (entityValue: string) => {}, + to: () => {}, from: (databaseValue: string) => databaseValue.toLocaleLowerCase(), } export const removeWhitespace: ValueTransformer = { - to: (entityValue: string) => {}, + to: () => {}, from: (databaseValue: string) => databaseValue.replace(/\s/g, ""), } @ViewEntity({ diff --git a/test/functional/view-entity/mssql/entity/PostCategory.ts b/test/functional/view-entity/mssql/entity/PostCategory.ts index 2268d0db1..38f278e7e 100644 --- a/test/functional/view-entity/mssql/entity/PostCategory.ts +++ b/test/functional/view-entity/mssql/entity/PostCategory.ts @@ -3,7 +3,7 @@ import { ViewColumn } from "../../../../../src/decorator/columns/ViewColumn" import { ViewEntity } from "../../../../../src/decorator/entity-view/ViewEntity" export const uppercase: ValueTransformer = { - to: (entityValue: string) => {}, + to: () => {}, from: (databaseValue: string) => databaseValue.toLocaleUpperCase(), } diff --git a/test/functional/view-entity/mysql/entity/PostCategory.ts b/test/functional/view-entity/mysql/entity/PostCategory.ts index 70e7f8260..3cd51108a 100644 --- a/test/functional/view-entity/mysql/entity/PostCategory.ts +++ b/test/functional/view-entity/mysql/entity/PostCategory.ts @@ -3,7 +3,7 @@ import { ViewColumn } from "../../../../../src/decorator/columns/ViewColumn" import { ViewEntity } from "../../../../../src/decorator/entity-view/ViewEntity" export const uppercase: ValueTransformer = { - to: (entityValue: string) => {}, + to: () => {}, from: (databaseValue: string) => databaseValue.toLocaleUpperCase(), } diff --git a/test/functional/view-entity/oracle/entity/PostCategory.ts b/test/functional/view-entity/oracle/entity/PostCategory.ts index 39b86c2dd..3e10df3f5 100644 --- a/test/functional/view-entity/oracle/entity/PostCategory.ts +++ b/test/functional/view-entity/oracle/entity/PostCategory.ts @@ -3,7 +3,7 @@ import { ViewColumn } from "../../../../../src/decorator/columns/ViewColumn" import { ViewEntity } from "../../../../../src/decorator/entity-view/ViewEntity" export const uppercase: ValueTransformer = { - to: (entityValue: string) => {}, + to: () => {}, from: (databaseValue: string) => databaseValue.toLocaleUpperCase(), } @ViewEntity({ diff --git a/test/functional/view-entity/postgres/entity/PostCategory.ts b/test/functional/view-entity/postgres/entity/PostCategory.ts index 39b86c2dd..3e10df3f5 100644 --- a/test/functional/view-entity/postgres/entity/PostCategory.ts +++ b/test/functional/view-entity/postgres/entity/PostCategory.ts @@ -3,7 +3,7 @@ import { ViewColumn } from "../../../../../src/decorator/columns/ViewColumn" import { ViewEntity } from "../../../../../src/decorator/entity-view/ViewEntity" export const uppercase: ValueTransformer = { - to: (entityValue: string) => {}, + to: () => {}, from: (databaseValue: string) => databaseValue.toLocaleUpperCase(), } @ViewEntity({ diff --git a/test/functional/view-entity/sqlite/entity/PostCategory.ts b/test/functional/view-entity/sqlite/entity/PostCategory.ts index 2268d0db1..38f278e7e 100644 --- a/test/functional/view-entity/sqlite/entity/PostCategory.ts +++ b/test/functional/view-entity/sqlite/entity/PostCategory.ts @@ -3,7 +3,7 @@ import { ViewColumn } from "../../../../../src/decorator/columns/ViewColumn" import { ViewEntity } from "../../../../../src/decorator/entity-view/ViewEntity" export const uppercase: ValueTransformer = { - to: (entityValue: string) => {}, + to: () => {}, from: (databaseValue: string) => databaseValue.toLocaleUpperCase(), } diff --git a/test/github-issues/10249/issue-10249.ts b/test/github-issues/10249/issue-10249.ts index dbff232c5..1d98a7313 100644 --- a/test/github-issues/10249/issue-10249.ts +++ b/test/github-issues/10249/issue-10249.ts @@ -25,7 +25,7 @@ describe("github issues > #10249 Saving an entity is not possible if only column it("should ignore changes for columns with `update: false` on saving entity", () => Promise.all( - dataSources.map(async (dataSource) => { + dataSources.map(async () => { await Promise.all( dataSources.map(async (dataSource) => { const manager = dataSource.manager diff --git a/test/github-issues/10322/issue-10322.ts b/test/github-issues/10322/issue-10322.ts index 3b0d071df..a1ccf598f 100644 --- a/test/github-issues/10322/issue-10322.ts +++ b/test/github-issues/10322/issue-10322.ts @@ -48,7 +48,7 @@ describe("github issues > #10322 logMigration of AbstractLogger has wrong loggin dataSources.map(async (dataSource) => { try { await dataSource.runMigrations() - } catch (e) { + } catch { expect(fakeLog.called).to.be.true } }), diff --git a/test/github-issues/10322/migration/1530542855524-FailMigration.ts b/test/github-issues/10322/migration/1530542855524-FailMigration.ts index 0c5c4a026..c501be8bd 100644 --- a/test/github-issues/10322/migration/1530542855524-FailMigration.ts +++ b/test/github-issues/10322/migration/1530542855524-FailMigration.ts @@ -1,10 +1,11 @@ -import { MigrationInterface, QueryRunner } from "../../../../src" +import { MigrationInterface } from "../../../../src" export class FailMigration1530542855524 implements MigrationInterface { - public async up(queryRunner: QueryRunner): Promise { + public async up() { throw new Error("migration error") } - public async down(queryRunner: QueryRunner): Promise { + + public async down() { throw new Error("migration error") } } diff --git a/test/github-issues/1034/entity/Circle.ts b/test/github-issues/1034/entity/Circle.ts index 9b2a87020..87e860221 100644 --- a/test/github-issues/1034/entity/Circle.ts +++ b/test/github-issues/1034/entity/Circle.ts @@ -17,7 +17,7 @@ export class Circle { * * You have to use getter and setter */ - @ManyToMany((type) => User, (user) => "circles") + @ManyToMany(() => User, () => "circles") @JoinTable({ name: "circle_users_user" }) private users: Promise diff --git a/test/github-issues/1034/entity/User.ts b/test/github-issues/1034/entity/User.ts index 43a4a495c..bb9ee45fd 100644 --- a/test/github-issues/1034/entity/User.ts +++ b/test/github-issues/1034/entity/User.ts @@ -11,7 +11,7 @@ export class User { @PrimaryGeneratedColumn({ type: "bigint" }) private id: string - @ManyToMany((type: object) => Circle, (circle) => "users") + @ManyToMany(() => Circle, () => "users") private circles: Promise /** diff --git a/test/github-issues/1042/entity/User.ts b/test/github-issues/1042/entity/User.ts index 620b01ec1..18c2ee09a 100644 --- a/test/github-issues/1042/entity/User.ts +++ b/test/github-issues/1042/entity/User.ts @@ -18,6 +18,6 @@ export class User { @Column("json") profile: Profile - @Column((type) => Information) + @Column(() => Information) information: Information } diff --git a/test/github-issues/1055/entity/Child.ts b/test/github-issues/1055/entity/Child.ts index 2e3f53ee1..d1779c273 100644 --- a/test/github-issues/1055/entity/Child.ts +++ b/test/github-issues/1055/entity/Child.ts @@ -12,6 +12,6 @@ export class Child { @Column() public name: string - @ManyToOne((target) => Parent, (parent) => parent.children, { lazy: true }) + @ManyToOne(() => Parent, (parent) => parent.children, { lazy: true }) public parent: Promise | Parent } diff --git a/test/github-issues/1055/entity/Parent.ts b/test/github-issues/1055/entity/Parent.ts index a8c500ef1..4d325db28 100644 --- a/test/github-issues/1055/entity/Parent.ts +++ b/test/github-issues/1055/entity/Parent.ts @@ -12,6 +12,6 @@ export class Parent { @Column() public name: string - @OneToMany((target) => Child, (child) => child.parent, { lazy: true }) + @OneToMany(() => Child, (child) => child.parent, { lazy: true }) public children: Promise } diff --git a/test/github-issues/1099/entity/Animal.ts b/test/github-issues/1099/entity/Animal.ts index b5dd246d1..e309a32cc 100644 --- a/test/github-issues/1099/entity/Animal.ts +++ b/test/github-issues/1099/entity/Animal.ts @@ -11,7 +11,7 @@ export class Animal { @Column() name: string - @ManyToMany((type) => Category) + @ManyToMany(() => Category) @JoinTable() categories: Category[] } diff --git a/test/github-issues/1200/entity/Group.ts b/test/github-issues/1200/entity/Group.ts index e2dd03c53..cea6b8034 100644 --- a/test/github-issues/1200/entity/Group.ts +++ b/test/github-issues/1200/entity/Group.ts @@ -6,7 +6,7 @@ export class Group { this.post = new Post() } - @Column((type) => Post) + @Column(() => Post) post: Post @Column() diff --git a/test/github-issues/1200/entity/Post.ts b/test/github-issues/1200/entity/Post.ts index 5d9980bac..e9f1f22e7 100644 --- a/test/github-issues/1200/entity/Post.ts +++ b/test/github-issues/1200/entity/Post.ts @@ -6,7 +6,7 @@ export class Post { this.category = new Category() } - @Column((type) => Category) + @Column(() => Category) category: Category @Column() diff --git a/test/github-issues/1200/entity/User.ts b/test/github-issues/1200/entity/User.ts index d50c722b9..8fc48feb9 100644 --- a/test/github-issues/1200/entity/User.ts +++ b/test/github-issues/1200/entity/User.ts @@ -14,10 +14,10 @@ export class User { @PrimaryGeneratedColumn() id: number - @Column((type) => Group) + @Column(() => Group) group: Group - @Column((type) => Post) + @Column(() => Post) post: Post @Column() diff --git a/test/github-issues/1210/entity/User.ts b/test/github-issues/1210/entity/User.ts index 16b763f0f..70630d0c1 100644 --- a/test/github-issues/1210/entity/User.ts +++ b/test/github-issues/1210/entity/User.ts @@ -18,6 +18,6 @@ export class User { @Column() age: number - @Column((type) => Event) + @Column(() => Event) events: Event[] } diff --git a/test/github-issues/1259/entity/Post.ts b/test/github-issues/1259/entity/Post.ts index c97958212..8e6780395 100644 --- a/test/github-issues/1259/entity/Post.ts +++ b/test/github-issues/1259/entity/Post.ts @@ -14,7 +14,7 @@ export class Post { @Column() count: number - @ManyToMany((type) => Category) + @ManyToMany(() => Category) @JoinTable() categories: Category[] } diff --git a/test/github-issues/1282/entity/Animal.ts b/test/github-issues/1282/entity/Animal.ts index e6753e68b..8819bf940 100644 --- a/test/github-issues/1282/entity/Animal.ts +++ b/test/github-issues/1282/entity/Animal.ts @@ -11,7 +11,7 @@ export class Animal { @Column() name: string - @ManyToMany((type) => Category, { eager: true }) + @ManyToMany(() => Category, { eager: true }) @JoinTable() categories: Category[] } diff --git a/test/github-issues/1504/entity/TestEntity1.ts b/test/github-issues/1504/entity/TestEntity1.ts index cd1a45fd3..a3da0f7dc 100644 --- a/test/github-issues/1504/entity/TestEntity1.ts +++ b/test/github-issues/1504/entity/TestEntity1.ts @@ -14,7 +14,7 @@ export class TestEntity1 { @Column() name: string - @OneToOne((t) => TestEntity2, (a) => a.Entity1) + @OneToOne(() => TestEntity2, (a) => a.Entity1) @JoinColumn() Entity2: TestEntity2 } diff --git a/test/github-issues/1504/entity/TestEntity2.ts b/test/github-issues/1504/entity/TestEntity2.ts index f4922ba0b..a24528cc9 100644 --- a/test/github-issues/1504/entity/TestEntity2.ts +++ b/test/github-issues/1504/entity/TestEntity2.ts @@ -16,10 +16,10 @@ export class TestEntity2 { @Column() name: string - @OneToOne((t) => TestEntity1, (a) => a.Entity2) + @OneToOne(() => TestEntity1, (a) => a.Entity2) Entity1: TestEntity1 - @OneToOne((t) => TestEntity3, (a) => a.Entity2) + @OneToOne(() => TestEntity3, (a) => a.Entity2) @JoinColumn() Entity3: TestEntity3 } diff --git a/test/github-issues/1504/entity/TestEntity3.ts b/test/github-issues/1504/entity/TestEntity3.ts index 4a506a5f2..9260316e7 100644 --- a/test/github-issues/1504/entity/TestEntity3.ts +++ b/test/github-issues/1504/entity/TestEntity3.ts @@ -13,12 +13,12 @@ export class TestEntity3 { @PrimaryGeneratedColumn() id: number - @OneToOne((t) => TestEntity2, (a) => a.Entity3) + @OneToOne(() => TestEntity2, (a) => a.Entity3) Entity2: TestEntity2 @Column() name: string - @OneToMany((t) => TestEntity4, (entity4) => entity4.Entity3) + @OneToMany(() => TestEntity4, (entity4) => entity4.Entity3) Entity4: TestEntity4[] } diff --git a/test/github-issues/1504/entity/TestEntity4.ts b/test/github-issues/1504/entity/TestEntity4.ts index f9972ec66..3c0160e2f 100644 --- a/test/github-issues/1504/entity/TestEntity4.ts +++ b/test/github-issues/1504/entity/TestEntity4.ts @@ -14,6 +14,6 @@ export class TestEntity4 { @Column() name: string - @ManyToOne((t) => TestEntity3, (entity3) => entity3.Entity4) + @ManyToOne(() => TestEntity3, (entity3) => entity3.Entity4) Entity3: TestEntity3 } diff --git a/test/github-issues/1545/entity/DataModel.ts b/test/github-issues/1545/entity/DataModel.ts index 1c6bc0031..fe6340a23 100644 --- a/test/github-issues/1545/entity/DataModel.ts +++ b/test/github-issues/1545/entity/DataModel.ts @@ -16,11 +16,9 @@ export class DataModel { @PrimaryColumn() mainId: number - @ManyToOne( - (type) => ValidationModel, - (validation) => validation.dataModel, - { eager: true }, - ) + @ManyToOne(() => ValidationModel, (validation) => validation.dataModel, { + eager: true, + }) @JoinColumn({ name: "validation", referencedColumnName: "validation", diff --git a/test/github-issues/1551/entity/Message.ts b/test/github-issues/1551/entity/Message.ts index c12ab6897..6c8ec5c40 100644 --- a/test/github-issues/1551/entity/Message.ts +++ b/test/github-issues/1551/entity/Message.ts @@ -80,7 +80,7 @@ export class Message { }) recipients: Recipient[] - @ManyToMany((type) => User, (user) => user.holderMessages, { eager: true }) + @ManyToMany(() => User, (user) => user.holderMessages, { eager: true }) @JoinTable() holders: User[] diff --git a/test/github-issues/1551/entity/User.ts b/test/github-issues/1551/entity/User.ts index 1e55cd835..a4b0a1de7 100644 --- a/test/github-issues/1551/entity/User.ts +++ b/test/github-issues/1551/entity/User.ts @@ -61,19 +61,19 @@ export class User { @Column({ nullable: true }) phone?: string - @ManyToMany((type) => Chat, (chat) => chat.allTimeMembers) + @ManyToMany(() => Chat, (chat) => chat.allTimeMembers) allTimeMemberChats: Chat[] - @ManyToMany((type) => Chat, (chat) => chat.listingMembers) + @ManyToMany(() => Chat, (chat) => chat.listingMembers) listedMemberChats: Chat[] - @ManyToMany((type) => Chat, (chat) => chat.actualGroupMembers) + @ManyToMany(() => Chat, (chat) => chat.actualGroupMembers) actualGroupMemberChats: Chat[] - @ManyToMany((type) => Chat, (chat) => chat.admins) + @ManyToMany(() => Chat, (chat) => chat.admins) adminChats: Chat[] - @ManyToMany((type) => Message, (message) => message.holders) + @ManyToMany(() => Message, (message) => message.holders) holderMessages: Message[] @OneToMany(() => Chat, (chat) => chat.owner) diff --git a/test/github-issues/1569/entity/Item.ts b/test/github-issues/1569/entity/Item.ts index 3698eaf4d..8a3777d88 100644 --- a/test/github-issues/1569/entity/Item.ts +++ b/test/github-issues/1569/entity/Item.ts @@ -13,6 +13,6 @@ export class Item { @Column() someText: string - @Column((type) => EmbeddedItem) + @Column(() => EmbeddedItem) embedded: EmbeddedItem } diff --git a/test/github-issues/1576/entity/Post.ts b/test/github-issues/1576/entity/Post.ts index 4b87094fa..fc9ad0243 100644 --- a/test/github-issues/1576/entity/Post.ts +++ b/test/github-issues/1576/entity/Post.ts @@ -18,7 +18,7 @@ export class Post { @Column("text") text: string - @ManyToMany((type) => Category) + @ManyToMany(() => Category) @JoinTable() categories: Category[] } diff --git a/test/github-issues/1591/entity/User.ts b/test/github-issues/1591/entity/User.ts index cc0abb38c..39b407f2d 100644 --- a/test/github-issues/1591/entity/User.ts +++ b/test/github-issues/1591/entity/User.ts @@ -15,7 +15,7 @@ export class User { @Column() name: string - @ManyToMany((type) => Photo) + @ManyToMany(() => Photo) @JoinTable() photos: Photo[] } diff --git a/test/github-issues/163/entity/Game.ts b/test/github-issues/163/entity/Game.ts index bd359af85..ff8eec2b6 100644 --- a/test/github-issues/163/entity/Game.ts +++ b/test/github-issues/163/entity/Game.ts @@ -28,7 +28,7 @@ export class Game { }) isReviewed: boolean - @ManyToMany((type) => Platform, (platform) => platform.games, { + @ManyToMany(() => Platform, (platform) => platform.games, { cascade: true, }) @JoinTable() diff --git a/test/github-issues/163/entity/Platform.ts b/test/github-issues/163/entity/Platform.ts index 4acc1c0ab..090234bf3 100644 --- a/test/github-issues/163/entity/Platform.ts +++ b/test/github-issues/163/entity/Platform.ts @@ -21,6 +21,6 @@ export class Platform { }) slug: string - @ManyToMany((type) => Game, (game) => game.platforms) + @ManyToMany(() => Game, (game) => game.platforms) games: Game[] } diff --git a/test/github-issues/1685/issue-1685.ts b/test/github-issues/1685/issue-1685.ts index 374310ab5..598bb9cba 100755 --- a/test/github-issues/1685/issue-1685.ts +++ b/test/github-issues/1685/issue-1685.ts @@ -47,7 +47,7 @@ describe.skip("github issues > #1685 JoinColumn from JoinColum is not considered try { await connection.manager.save(userMonth) - } catch (err) { + } catch { throw new Error("userMonth should be added") } }), diff --git a/test/github-issues/1703/entity/OrganizationEntity.ts b/test/github-issues/1703/entity/OrganizationEntity.ts index cdd043033..e1d9009e4 100755 --- a/test/github-issues/1703/entity/OrganizationEntity.ts +++ b/test/github-issues/1703/entity/OrganizationEntity.ts @@ -7,7 +7,7 @@ export class OrganizationEntity { id?: number @OneToMany( - (type) => UserToOrganizationEntity, + () => UserToOrganizationEntity, (userToOrganization) => userToOrganization.organization, ) users: UserToOrganizationEntity[] diff --git a/test/github-issues/1703/entity/UserEntity.ts b/test/github-issues/1703/entity/UserEntity.ts index 2cda7ecea..ed2d7dd8c 100755 --- a/test/github-issues/1703/entity/UserEntity.ts +++ b/test/github-issues/1703/entity/UserEntity.ts @@ -7,7 +7,7 @@ export class UserEntity { id?: number @OneToMany( - (type) => UserToOrganizationEntity, + () => UserToOrganizationEntity, (userToOrganization) => userToOrganization.user, ) organizations: UserToOrganizationEntity[] diff --git a/test/github-issues/1703/entity/UserToOrganizationEntity.ts b/test/github-issues/1703/entity/UserToOrganizationEntity.ts index 35296c5bb..1b358e166 100755 --- a/test/github-issues/1703/entity/UserToOrganizationEntity.ts +++ b/test/github-issues/1703/entity/UserToOrganizationEntity.ts @@ -21,9 +21,6 @@ export class UserToOrganizationEntity { @ManyToOne(() => UserEntity, (user) => user.organizations) user: UserEntity - @ManyToOne( - (type) => OrganizationEntity, - (organization) => organization.users, - ) + @ManyToOne(() => OrganizationEntity, (organization) => organization.users) organization: OrganizationEntity } diff --git a/test/github-issues/174/entity/Organisation.ts b/test/github-issues/174/entity/Organisation.ts index de44f8030..fbf3d33a4 100644 --- a/test/github-issues/174/entity/Organisation.ts +++ b/test/github-issues/174/entity/Organisation.ts @@ -11,6 +11,6 @@ export class Organisation { @Column() name: string - @Column((type) => Contact) + @Column(() => Contact) contact: Contact } diff --git a/test/github-issues/175/entity/Post.ts b/test/github-issues/175/entity/Post.ts index 331d589a5..5aa6b3a61 100644 --- a/test/github-issues/175/entity/Post.ts +++ b/test/github-issues/175/entity/Post.ts @@ -14,7 +14,7 @@ export class Post { @Column() title: string - @ManyToMany((type) => Category) + @ManyToMany(() => Category) @JoinTable() categories: Category[] diff --git a/test/github-issues/1825/entity/thing.ts b/test/github-issues/1825/entity/thing.ts index 90df5ffe2..ec978920c 100644 --- a/test/github-issues/1825/entity/thing.ts +++ b/test/github-issues/1825/entity/thing.ts @@ -13,6 +13,6 @@ export class Thing { @PrimaryGeneratedColumn() public id: number - @Column((type) => EmbeddedInThing) + @Column(() => EmbeddedInThing) public embeddedThing: EmbeddedInThing } diff --git a/test/github-issues/190/entity/Post.ts b/test/github-issues/190/entity/Post.ts index 4969f61b4..f4fdfdd4c 100644 --- a/test/github-issues/190/entity/Post.ts +++ b/test/github-issues/190/entity/Post.ts @@ -13,7 +13,7 @@ export class Post { @Column() title: string - @ManyToMany((type) => Category) + @ManyToMany(() => Category) @JoinTable() categories: Category[] } diff --git a/test/github-issues/1972/entity/TournamentSquadParticipant.ts b/test/github-issues/1972/entity/TournamentSquadParticipant.ts index aa5b4f4a4..02af1bdcc 100644 --- a/test/github-issues/1972/entity/TournamentSquadParticipant.ts +++ b/test/github-issues/1972/entity/TournamentSquadParticipant.ts @@ -17,7 +17,7 @@ export class TournamentSquadParticipant extends TournamentParticipant { @JoinColumn() public owner: User - @ManyToMany((type) => User, { + @ManyToMany(() => User, { eager: true, }) @JoinTable({ name: "tournament_squad_participants" }) diff --git a/test/github-issues/234/entity/Post.ts b/test/github-issues/234/entity/Post.ts index 2f0edd018..d91c497be 100644 --- a/test/github-issues/234/entity/Post.ts +++ b/test/github-issues/234/entity/Post.ts @@ -20,7 +20,7 @@ export class Post { }) category: Promise - @ManyToMany((type) => Tag, (tag) => tag.posts, { + @ManyToMany(() => Tag, (tag) => tag.posts, { cascade: ["insert"], }) @JoinTable() diff --git a/test/github-issues/234/entity/Tag.ts b/test/github-issues/234/entity/Tag.ts index adcc4229a..1423d4df1 100644 --- a/test/github-issues/234/entity/Tag.ts +++ b/test/github-issues/234/entity/Tag.ts @@ -12,6 +12,6 @@ export class Tag { @Column() name: string - @ManyToMany((type) => Post, (post) => post.tags) + @ManyToMany(() => Post, (post) => post.tags) posts: Promise } diff --git a/test/github-issues/2464/entity/Bar.ts b/test/github-issues/2464/entity/Bar.ts index a89b340b5..644b39309 100644 --- a/test/github-issues/2464/entity/Bar.ts +++ b/test/github-issues/2464/entity/Bar.ts @@ -14,6 +14,6 @@ export class Bar extends BaseEntity { @Column() description: string - @ManyToMany((type) => Foo, (foo) => foo.bars) + @ManyToMany(() => Foo, (foo) => foo.bars) foos?: Foo[] } diff --git a/test/github-issues/2632/entity/Category.ts b/test/github-issues/2632/entity/Category.ts index bae6a0253..1ef97817d 100644 --- a/test/github-issues/2632/entity/Category.ts +++ b/test/github-issues/2632/entity/Category.ts @@ -12,6 +12,6 @@ export class Category { @Column() title: string - @ManyToMany((type) => Post, (post) => post.categories) + @ManyToMany(() => Post, (post) => post.categories) posts: Post[] } diff --git a/test/github-issues/2632/entity/Post.ts b/test/github-issues/2632/entity/Post.ts index 57225e9ff..7644cb78f 100644 --- a/test/github-issues/2632/entity/Post.ts +++ b/test/github-issues/2632/entity/Post.ts @@ -13,7 +13,7 @@ export class Post { @Column() title: string - @ManyToMany((type) => Category, (category) => category.posts) + @ManyToMany(() => Category, (category) => category.posts) @JoinTable() categories: Category[] } diff --git a/test/github-issues/2693/migration/0000000000001-CreateUuidExtension.ts b/test/github-issues/2693/migration/0000000000001-CreateUuidExtension.ts index eb901bcdb..5d884a230 100644 --- a/test/github-issues/2693/migration/0000000000001-CreateUuidExtension.ts +++ b/test/github-issues/2693/migration/0000000000001-CreateUuidExtension.ts @@ -2,7 +2,7 @@ import { MigrationInterface } from "../../../../src/migration/MigrationInterface import { QueryRunner } from "../../../../src/query-runner/QueryRunner" export class CreateUuidExtension0000000000001 implements MigrationInterface { - public up(queryRunner: QueryRunner): Promise { + public async up(queryRunner: QueryRunner) { return queryRunner.query(`CREATE EXTENSION IF NOT EXISTS "uuid-ossp";`) } diff --git a/test/github-issues/2693/migration/0000000000002-CreateUsers.ts b/test/github-issues/2693/migration/0000000000002-CreateUsers.ts index 1b595fd2f..5a1706db4 100644 --- a/test/github-issues/2693/migration/0000000000002-CreateUsers.ts +++ b/test/github-issues/2693/migration/0000000000002-CreateUsers.ts @@ -3,7 +3,7 @@ import { QueryRunner } from "../../../../src/query-runner/QueryRunner" import { Table } from "../../../../src/schema-builder/table/Table" export class CreateUsers0000000000002 implements MigrationInterface { - public up(queryRunner: QueryRunner): Promise { + public async up(queryRunner: QueryRunner) { return queryRunner.createTable( new Table({ name: "users", diff --git a/test/github-issues/2693/migration/0000000000003-InsertUser.ts b/test/github-issues/2693/migration/0000000000003-InsertUser.ts index 6db5f3655..9fc993a99 100644 --- a/test/github-issues/2693/migration/0000000000003-InsertUser.ts +++ b/test/github-issues/2693/migration/0000000000003-InsertUser.ts @@ -3,12 +3,10 @@ import { QueryRunner } from "../../../../src/query-runner/QueryRunner" import { User } from "../entity/user" export class InsertUser0000000000003 implements MigrationInterface { - public up(queryRunner: QueryRunner): Promise { + public async up(queryRunner: QueryRunner) { const userRepo = queryRunner.connection.getRepository(User) return userRepo.save(new User()) } - public down(queryRunner: QueryRunner): Promise { - return Promise.resolve() - } + public async down() {} } diff --git a/test/github-issues/2703/memory-logger.ts b/test/github-issues/2703/memory-logger.ts index 1bb95cf7a..295acbca5 100644 --- a/test/github-issues/2703/memory-logger.ts +++ b/test/github-issues/2703/memory-logger.ts @@ -14,15 +14,15 @@ export class MemoryLogger implements Logger { } } - logQueryError(error: string, query: string) {} + logQueryError() {} - logQuerySlow(time: number, query: string) {} + logQuerySlow() {} - logSchemaBuild(message: string) {} + logSchemaBuild() {} - logMigration(message: string) {} + logMigration() {} - log(level: "log" | "info" | "warn", message: any) {} + log() {} clear() { this._queries = [] diff --git a/test/github-issues/2800/entity/Car.ts b/test/github-issues/2800/entity/Car.ts index bc0ebc05a..9f1caf0e1 100644 --- a/test/github-issues/2800/entity/Car.ts +++ b/test/github-issues/2800/entity/Car.ts @@ -11,6 +11,6 @@ export class CarEngine extends Engine { @ChildEntity() export class Car extends Vehicle { - @Column((type) => CarEngine, { prefix: "carEngine" }) + @Column(() => CarEngine, { prefix: "carEngine" }) public engine: CarEngine } diff --git a/test/github-issues/2800/entity/Plane.ts b/test/github-issues/2800/entity/Plane.ts index 6e6792687..10b44b1cc 100644 --- a/test/github-issues/2800/entity/Plane.ts +++ b/test/github-issues/2800/entity/Plane.ts @@ -11,6 +11,6 @@ export class PlaneEngine extends Engine { @ChildEntity() export class Plane extends Vehicle { - @Column((type) => PlaneEngine, { prefix: "planeEngine" }) + @Column(() => PlaneEngine, { prefix: "planeEngine" }) public engine: PlaneEngine } diff --git a/test/github-issues/300/entity/Race.ts b/test/github-issues/300/entity/Race.ts index 48d89953f..98c6a787d 100644 --- a/test/github-issues/300/entity/Race.ts +++ b/test/github-issues/300/entity/Race.ts @@ -11,6 +11,6 @@ export class Race { @Column() name: string - @Column((type) => Duration) + @Column(() => Duration) duration: Duration } diff --git a/test/github-issues/306/entity/Race.ts b/test/github-issues/306/entity/Race.ts index 48d89953f..98c6a787d 100644 --- a/test/github-issues/306/entity/Race.ts +++ b/test/github-issues/306/entity/Race.ts @@ -11,6 +11,6 @@ export class Race { @Column() name: string - @Column((type) => Duration) + @Column(() => Duration) duration: Duration } diff --git a/test/github-issues/3120/entity/ActionLog.ts b/test/github-issues/3120/entity/ActionLog.ts index e952a8487..300411aec 100644 --- a/test/github-issues/3120/entity/ActionLog.ts +++ b/test/github-issues/3120/entity/ActionLog.ts @@ -26,7 +26,7 @@ export class ActionLog { }) person: Person - @ManyToMany((type) => Address, { + @ManyToMany(() => Address, { createForeignKeyConstraints: false, }) @JoinTable() diff --git a/test/github-issues/3120/entity/Address.ts b/test/github-issues/3120/entity/Address.ts index 180e4222e..7b5d08474 100644 --- a/test/github-issues/3120/entity/Address.ts +++ b/test/github-issues/3120/entity/Address.ts @@ -18,6 +18,6 @@ export class Address { @Column() street: string - @ManyToMany((type) => Person, (person) => person.addresses) + @ManyToMany(() => Person, (person) => person.addresses) people: Person[] } diff --git a/test/github-issues/3120/entity/Person.ts b/test/github-issues/3120/entity/Person.ts index 1f31c5476..8a92b029b 100644 --- a/test/github-issues/3120/entity/Person.ts +++ b/test/github-issues/3120/entity/Person.ts @@ -21,7 +21,7 @@ export class Person { @ManyToOne(() => Company) company: Company - @ManyToMany((type) => Address, (address) => address.people) + @ManyToMany(() => Address, (address) => address.people) @JoinTable() addresses: Address[] diff --git a/test/github-issues/3151/entity/Category.ts b/test/github-issues/3151/entity/Category.ts index 2c2975792..c1f093e17 100644 --- a/test/github-issues/3151/entity/Category.ts +++ b/test/github-issues/3151/entity/Category.ts @@ -12,6 +12,6 @@ export class Category { @Column() name: string - @ManyToMany((type) => Note, (note) => note.categories) + @ManyToMany(() => Note, (note) => note.categories) notes: Note[] } diff --git a/test/github-issues/3151/entity/Note.ts b/test/github-issues/3151/entity/Note.ts index 3e859c400..344471bc6 100644 --- a/test/github-issues/3151/entity/Note.ts +++ b/test/github-issues/3151/entity/Note.ts @@ -13,7 +13,7 @@ export class Note { @Column() content: string - @ManyToMany((type) => Category, (category) => category.notes) + @ManyToMany(() => Category, (category) => category.notes) @JoinTable() categories: Category[] } diff --git a/test/github-issues/3158/entity/Session.ts b/test/github-issues/3158/entity/Session.ts index fb98df20e..818a32de3 100644 --- a/test/github-issues/3158/entity/Session.ts +++ b/test/github-issues/3158/entity/Session.ts @@ -22,7 +22,7 @@ export class Session { description?: string @OneToOne( - (type) => SessionSettings, + () => SessionSettings, (sessionSettings) => sessionSettings.session, ) settings: SessionSettings diff --git a/test/github-issues/320/entity/ActivityEntity.ts b/test/github-issues/320/entity/ActivityEntity.ts index 73d1f6887..38d13ff4f 100644 --- a/test/github-issues/320/entity/ActivityEntity.ts +++ b/test/github-issues/320/entity/ActivityEntity.ts @@ -12,7 +12,7 @@ export class ActivityEntity { @Column({ type: "datetime" }) endDate: Date - @ManyToMany((type) => TileEntity, (tile) => tile.activities, { + @ManyToMany(() => TileEntity, (tile) => tile.activities, { cascade: true, }) tiles: TileEntity[] diff --git a/test/github-issues/320/entity/TileEntity.ts b/test/github-issues/320/entity/TileEntity.ts index b08a9c8ca..9389772f9 100644 --- a/test/github-issues/320/entity/TileEntity.ts +++ b/test/github-issues/320/entity/TileEntity.ts @@ -9,18 +9,18 @@ export class TileEntity { @PrimaryGeneratedColumn({ type: "bigint" }) id: string - @ManyToMany((type) => TileEntity, (tile) => tile.children, { + @ManyToMany(() => TileEntity, (tile) => tile.children, { cascade: ["insert"], }) @JoinTable() parents: TileEntity[] - @ManyToMany((type) => TileEntity, (tile) => tile.parents, { + @ManyToMany(() => TileEntity, (tile) => tile.parents, { cascade: ["insert"], }) children: TileEntity[] - @ManyToMany((type) => ActivityEntity, (activity) => activity.tiles, { + @ManyToMany(() => ActivityEntity, (activity) => activity.tiles, { cascade: ["insert"], }) @JoinTable() diff --git a/test/github-issues/3551/entity/Book.ts b/test/github-issues/3551/entity/Book.ts index 0336059bf..06ea83e13 100644 --- a/test/github-issues/3551/entity/Book.ts +++ b/test/github-issues/3551/entity/Book.ts @@ -9,7 +9,7 @@ export class Chapter { @Column() title: string - @Column((type) => Page) + @Column(() => Page) pages: Page[] } @@ -21,6 +21,6 @@ export class Book { @Column() title: string - @Column((type) => Chapter) + @Column(() => Chapter) chapters: Chapter[] } diff --git a/test/github-issues/3847/naming/NamingStrategyUnderTest.ts b/test/github-issues/3847/naming/NamingStrategyUnderTest.ts index 6b444c777..d0272938f 100644 --- a/test/github-issues/3847/naming/NamingStrategyUnderTest.ts +++ b/test/github-issues/3847/naming/NamingStrategyUnderTest.ts @@ -10,7 +10,6 @@ export class NamingStrategyUnderTest tableOrName: Table | string, columnNames: string[], referencedTablePath?: string, - referencedColumnNames?: string[], ): string { tableOrName = typeof tableOrName === "string" ? tableOrName : tableOrName.name diff --git a/test/github-issues/3946/entity/Category.ts b/test/github-issues/3946/entity/Category.ts index 267dafe8e..23562efbf 100644 --- a/test/github-issues/3946/entity/Category.ts +++ b/test/github-issues/3946/entity/Category.ts @@ -17,10 +17,10 @@ export class Category { @Column() isRemoved: boolean = false - @ManyToMany((type) => Post, (post) => post.categories) + @ManyToMany(() => Post, (post) => post.categories) posts: Post[] - @ManyToMany((type) => Image, (image) => image.categories) + @ManyToMany(() => Image, (image) => image.categories) @JoinTable() images: Image[] diff --git a/test/github-issues/3946/entity/Image.ts b/test/github-issues/3946/entity/Image.ts index 1bb0ff7f3..9a927b7cc 100644 --- a/test/github-issues/3946/entity/Image.ts +++ b/test/github-issues/3946/entity/Image.ts @@ -15,7 +15,7 @@ export class Image { @Column() isRemoved: boolean = false - @ManyToMany((type) => Category, (category) => category.images) + @ManyToMany(() => Category, (category) => category.images) categories: Category[] categoryCount: number diff --git a/test/github-issues/3946/entity/Post.ts b/test/github-issues/3946/entity/Post.ts index f16fb15e4..63c025297 100644 --- a/test/github-issues/3946/entity/Post.ts +++ b/test/github-issues/3946/entity/Post.ts @@ -16,7 +16,7 @@ export class Post { @Column() isRemoved: boolean = false - @ManyToMany((type) => Category, (category) => category.posts) + @ManyToMany(() => Category, (category) => category.posts) @JoinTable() categories: Category[] diff --git a/test/github-issues/4219/shim.ts b/test/github-issues/4219/shim.ts index 9a6b8b0e0..151dd358e 100644 --- a/test/github-issues/4219/shim.ts +++ b/test/github-issues/4219/shim.ts @@ -2,7 +2,7 @@ let _Shim: any try { // We're in /test _Shim = require("../../../../extra/typeorm-class-transformer-shim") -} catch (e) { +} catch { // We're in /build/compiled/test _Shim = require("../../../../../extra/typeorm-class-transformer-shim") } diff --git a/test/github-issues/4277/issue-4277.ts b/test/github-issues/4277/issue-4277.ts index ff5036355..e9a7a5013 100644 --- a/test/github-issues/4277/issue-4277.ts +++ b/test/github-issues/4277/issue-4277.ts @@ -26,7 +26,7 @@ describe("github issues > #4277 Using cache in findAndCount and getManyAndCount connections.map((conn) => { const repo = conn.getRepository(User) - const usersToInsert = [...Array(10)].map((e) => { + const usersToInsert = [...Array(10)].map(() => { const user = new User() user.name = "Jeremy Clarkson" return user diff --git a/test/github-issues/4701/migration/1567759789051-ExampleMigration.ts b/test/github-issues/4701/migration/1567759789051-ExampleMigration.ts index 22b9bd71f..ee04ad9f0 100644 --- a/test/github-issues/4701/migration/1567759789051-ExampleMigration.ts +++ b/test/github-issues/4701/migration/1567759789051-ExampleMigration.ts @@ -1,7 +1,6 @@ import { MigrationInterface } from "../../../../src/migration/MigrationInterface" -import { QueryRunner } from "../../../../src/query-runner/QueryRunner" export class ExampleMigrationOne1567759789051 implements MigrationInterface { - public async up(queryRunner: QueryRunner): Promise {} - public async down(queryRunner: QueryRunner): Promise {} + public async up() {} + public async down() {} } diff --git a/test/github-issues/4701/migration/1567759832591-ExampleMigrationTwo.ts b/test/github-issues/4701/migration/1567759832591-ExampleMigrationTwo.ts index 22b9bd71f..ee04ad9f0 100644 --- a/test/github-issues/4701/migration/1567759832591-ExampleMigrationTwo.ts +++ b/test/github-issues/4701/migration/1567759832591-ExampleMigrationTwo.ts @@ -1,7 +1,6 @@ import { MigrationInterface } from "../../../../src/migration/MigrationInterface" -import { QueryRunner } from "../../../../src/query-runner/QueryRunner" export class ExampleMigrationOne1567759789051 implements MigrationInterface { - public async up(queryRunner: QueryRunner): Promise {} - public async down(queryRunner: QueryRunner): Promise {} + public async up() {} + public async down() {} } diff --git a/test/github-issues/4701/migration/1571426391120-ExampleMigrationThree.ts b/test/github-issues/4701/migration/1571426391120-ExampleMigrationThree.ts index 6703708de..8508a8b77 100644 --- a/test/github-issues/4701/migration/1571426391120-ExampleMigrationThree.ts +++ b/test/github-issues/4701/migration/1571426391120-ExampleMigrationThree.ts @@ -1,7 +1,6 @@ import { MigrationInterface } from "../../../../src/migration/MigrationInterface" -import { QueryRunner } from "../../../../src/query-runner/QueryRunner" export class ExampleMigrationThree1571426391120 implements MigrationInterface { - public async up(queryRunner: QueryRunner): Promise {} - public async down(queryRunner: QueryRunner): Promise {} + public async up() {} + public async down() {} } diff --git a/test/github-issues/56/issue-56.ts b/test/github-issues/56/issue-56.ts index b906f6c06..ad0468d9d 100644 --- a/test/github-issues/56/issue-56.ts +++ b/test/github-issues/56/issue-56.ts @@ -35,7 +35,7 @@ describe.skip("github issues > #56 relationships only work when both primary key return connection .getRepository(AccessToken) .save(token) - .then((token) => { + .then(() => { return connection.getRepository(User).save(user) }) .then((user) => { diff --git a/test/github-issues/58/entity/Post.ts b/test/github-issues/58/entity/Post.ts index 0c3784f0d..0caf93f92 100644 --- a/test/github-issues/58/entity/Post.ts +++ b/test/github-issues/58/entity/Post.ts @@ -13,7 +13,7 @@ export class Post { title: string @OneToMany( - (type) => PostCategory, + () => PostCategory, (postCategoryRelation) => postCategoryRelation.post, ) categories: PostCategory[] diff --git a/test/github-issues/5967/memory-logger.ts b/test/github-issues/5967/memory-logger.ts index 1bb95cf7a..295acbca5 100644 --- a/test/github-issues/5967/memory-logger.ts +++ b/test/github-issues/5967/memory-logger.ts @@ -14,15 +14,15 @@ export class MemoryLogger implements Logger { } } - logQueryError(error: string, query: string) {} + logQueryError() {} - logQuerySlow(time: number, query: string) {} + logQuerySlow() {} - logSchemaBuild(message: string) {} + logSchemaBuild() {} - logMigration(message: string) {} + logMigration() {} - log(level: "log" | "info" | "warn", message: any) {} + log() {} clear() { this._queries = [] diff --git a/test/github-issues/6580/issue-6580.ts b/test/github-issues/6580/issue-6580.ts index be2b1aa2f..b995d5dc2 100644 --- a/test/github-issues/6580/issue-6580.ts +++ b/test/github-issues/6580/issue-6580.ts @@ -2,7 +2,7 @@ import { DeepPartial } from "../../../src" import { Comment } from "./entity/Comment" describe("github issues > #6580 DeepPartial does not handle `any` and `{[k: string]}`", () => { - function attemptDeepPartial(entityLike: DeepPartial): void {} + function attemptDeepPartial(_: DeepPartial): void {} it("DeepPartial should correctly handle any", () => { attemptDeepPartial({ diff --git a/test/github-issues/7087/migration/0000000000001-CreateUsers.ts b/test/github-issues/7087/migration/0000000000001-CreateUsers.ts index 8a919bd16..c9c402deb 100644 --- a/test/github-issues/7087/migration/0000000000001-CreateUsers.ts +++ b/test/github-issues/7087/migration/0000000000001-CreateUsers.ts @@ -3,7 +3,7 @@ import { QueryRunner } from "../../../../src/query-runner/QueryRunner" import { Table } from "../../../../src/schema-builder/table/Table" export class CreateUsers0000000000001 implements MigrationInterface { - public up(queryRunner: QueryRunner): Promise { + public async up(queryRunner: QueryRunner) { return queryRunner.createTable( new Table({ name: "users", diff --git a/test/github-issues/7087/migration/0000000000002-InsertUser.ts b/test/github-issues/7087/migration/0000000000002-InsertUser.ts index 7260f4539..8883fd6b9 100644 --- a/test/github-issues/7087/migration/0000000000002-InsertUser.ts +++ b/test/github-issues/7087/migration/0000000000002-InsertUser.ts @@ -5,12 +5,12 @@ import { User } from "../entity/user" export class InsertUser0000000000002 implements MigrationInterface { public transaction = true - public up(queryRunner: QueryRunner): Promise { + public up(queryRunner: QueryRunner) { const userRepo = queryRunner.connection.getRepository(User) return userRepo.save(new User()) } - public down(queryRunner: QueryRunner): Promise { + public down() { return Promise.resolve() } } diff --git a/test/github-issues/7087/migration/0000000000003-CreateIndex.ts b/test/github-issues/7087/migration/0000000000003-CreateIndex.ts index 0d8dd3638..137b17f79 100644 --- a/test/github-issues/7087/migration/0000000000003-CreateIndex.ts +++ b/test/github-issues/7087/migration/0000000000003-CreateIndex.ts @@ -4,13 +4,13 @@ import { QueryRunner } from "../../../../src/query-runner/QueryRunner" export class CreateIndex0000000000003 implements MigrationInterface { public transaction = false - public up(queryRunner: QueryRunner): Promise { + public up(queryRunner: QueryRunner) { return queryRunner.query( "CREATE INDEX CONCURRENTLY user_ids_idx ON users(id)", ) } - public down(queryRunner: QueryRunner): Promise { + public down() { return Promise.resolve() } } diff --git a/test/github-issues/7415/entity/Category.ts b/test/github-issues/7415/entity/Category.ts index f24f3b976..f311ed57b 100644 --- a/test/github-issues/7415/entity/Category.ts +++ b/test/github-issues/7415/entity/Category.ts @@ -4,7 +4,7 @@ import { Slug } from "./Slug" @Entity() @Tree("materialized-path") export class Category { - @Column((type) => Slug, { prefix: false }) + @Column(() => Slug, { prefix: false }) id: Slug @TreeChildren() diff --git a/test/github-issues/762/entity/Foo.ts b/test/github-issues/762/entity/Foo.ts index 5b6894061..d63ff6cef 100644 --- a/test/github-issues/762/entity/Foo.ts +++ b/test/github-issues/762/entity/Foo.ts @@ -11,6 +11,6 @@ export class Foo { @Column() name: string - @Column((type) => FooMetadata) + @Column(() => FooMetadata) metadata?: FooMetadata } diff --git a/test/github-issues/762/entity/FooMetadata.ts b/test/github-issues/762/entity/FooMetadata.ts index 8a0626f92..bc8a7008d 100644 --- a/test/github-issues/762/entity/FooMetadata.ts +++ b/test/github-issues/762/entity/FooMetadata.ts @@ -5,6 +5,6 @@ export class FooMetadata { @Column({ nullable: true }) bar: number - @Column((type) => FooChildMetadata) + @Column(() => FooChildMetadata) child?: FooChildMetadata } diff --git a/test/github-issues/7662/memory-logger.ts b/test/github-issues/7662/memory-logger.ts index 1bb95cf7a..295acbca5 100644 --- a/test/github-issues/7662/memory-logger.ts +++ b/test/github-issues/7662/memory-logger.ts @@ -14,15 +14,15 @@ export class MemoryLogger implements Logger { } } - logQueryError(error: string, query: string) {} + logQueryError() {} - logQuerySlow(time: number, query: string) {} + logQuerySlow() {} - logSchemaBuild(message: string) {} + logSchemaBuild() {} - logMigration(message: string) {} + logMigration() {} - log(level: "log" | "info" | "warn", message: any) {} + log() {} clear() { this._queries = [] diff --git a/test/github-issues/813/entity/Post.ts b/test/github-issues/813/entity/Post.ts index 7c3377d1a..7ed45d142 100644 --- a/test/github-issues/813/entity/Post.ts +++ b/test/github-issues/813/entity/Post.ts @@ -13,7 +13,7 @@ export class Post { @Column() title: string - @ManyToMany((type) => Category) + @ManyToMany(() => Category) @JoinTable() categories: Category[] } diff --git a/test/github-issues/815/entity/Category.ts b/test/github-issues/815/entity/Category.ts index c254fbbc2..89184ae5f 100644 --- a/test/github-issues/815/entity/Category.ts +++ b/test/github-issues/815/entity/Category.ts @@ -23,7 +23,7 @@ export class Category { @RelationId((category: Category) => category.post) postId: number - @ManyToMany((type) => Post, (post) => post.manyCategories) + @ManyToMany(() => Post, (post) => post.manyCategories) manyPosts: Post[] @RelationId((category: Category) => category.manyPosts) diff --git a/test/github-issues/815/entity/Post.ts b/test/github-issues/815/entity/Post.ts index a0d43d9ae..5081b70ee 100644 --- a/test/github-issues/815/entity/Post.ts +++ b/test/github-issues/815/entity/Post.ts @@ -21,7 +21,7 @@ export class Post { @RelationId((post: Post) => post.categories) categoryIds: { firstId: number; secondId: number }[] - @ManyToMany((type) => Category, (category) => category.manyPosts) + @ManyToMany(() => Category, (category) => category.manyPosts) @JoinTable() manyCategories: Category[] diff --git a/test/github-issues/8221/entity/SettingSubscriber.ts b/test/github-issues/8221/entity/SettingSubscriber.ts index 524bc2805..0b30c9632 100644 --- a/test/github-issues/8221/entity/SettingSubscriber.ts +++ b/test/github-issues/8221/entity/SettingSubscriber.ts @@ -1,15 +1,13 @@ -import { - EntitySubscriberInterface, - EventSubscriber, - InsertEvent, - LoadEvent, - UpdateEvent, -} from "../../../../src" +import { EntitySubscriberInterface, EventSubscriber } from "../../../../src" import { Setting } from "./Setting" @EventSubscriber() export class SettingSubscriber implements EntitySubscriberInterface { - counter: any + counter: { + deletes: number + inserts: number + updates: number + } constructor() { this.reset() @@ -19,20 +17,20 @@ export class SettingSubscriber implements EntitySubscriberInterface { return Setting } - afterLoad(item: Setting, event?: LoadEvent) { + afterLoad(item: Setting) { // just an example, any entity modification on after load will lead to this issue item.value = "x" } - beforeUpdate(event: UpdateEvent): void { + beforeUpdate(): void { this.counter.updates++ } - beforeInsert(event: InsertEvent): void { + beforeInsert(): void { this.counter.inserts++ } - beforeRemove(event: UpdateEvent): void { + beforeRemove(): void { this.counter.deletes++ } diff --git a/test/github-issues/9266/migrations/init.ts b/test/github-issues/9266/migrations/init.ts index b42fdf663..931c8dc6b 100644 --- a/test/github-issues/9266/migrations/init.ts +++ b/test/github-issues/9266/migrations/init.ts @@ -11,5 +11,5 @@ export class CreateDatabase implements MigrationInterface { ) } - async down(queryRunner: QueryRunner): Promise {} + async down(): Promise {} } diff --git a/test/github-issues/966/entity/user.ts b/test/github-issues/966/entity/user.ts index f83725cce..4a75655a9 100644 --- a/test/github-issues/966/entity/user.ts +++ b/test/github-issues/966/entity/user.ts @@ -23,6 +23,6 @@ export class User { @PrimaryGeneratedColumn() id: number - @Column((type) => UserInfo) + @Column(() => UserInfo) info: UserInfo } diff --git a/test/github-issues/9903/issue-9903.ts b/test/github-issues/9903/issue-9903.ts index 061f92bc2..5a2c5ca35 100644 --- a/test/github-issues/9903/issue-9903.ts +++ b/test/github-issues/9903/issue-9903.ts @@ -4,7 +4,7 @@ import { closeTestingConnections, reloadTestingDatabases, } from "../../utils/test-utils" -import { DataSource } from "../../../src/index" +import { DataSource } from "../../../src" import { expect } from "chai" import { User } from "./entity/User" @@ -56,7 +56,7 @@ describe("github issues > #9903 json data type", () => { // this will ensure its json valid in mariadb so this won't break the constraint try { await userRepository.save(badJsonUser) - } catch (err) { + } catch { expect.fail( null, null, diff --git a/test/other-issues/auto-increment-id-as-string/entity/User.ts b/test/other-issues/auto-increment-id-as-string/entity/User.ts index 889268e29..0f3d21c61 100644 --- a/test/other-issues/auto-increment-id-as-string/entity/User.ts +++ b/test/other-issues/auto-increment-id-as-string/entity/User.ts @@ -24,7 +24,7 @@ export class User { @Column({ name: "user_name" }) userName: string - @ManyToMany((type) => Role) + @ManyToMany(() => Role) @JoinTable({ name: "user_role", joinColumn: { diff --git a/test/other-issues/join-empty-relations/entity/Category.ts b/test/other-issues/join-empty-relations/entity/Category.ts index bdc5e609e..3be474141 100644 --- a/test/other-issues/join-empty-relations/entity/Category.ts +++ b/test/other-issues/join-empty-relations/entity/Category.ts @@ -13,7 +13,7 @@ export class Category { @Column() name: string - @ManyToMany((type) => Author) + @ManyToMany(() => Author) @JoinTable() authors: Author[] } diff --git a/test/other-issues/join-empty-relations/entity/Post.ts b/test/other-issues/join-empty-relations/entity/Post.ts index 4969f61b4..f4fdfdd4c 100644 --- a/test/other-issues/join-empty-relations/entity/Post.ts +++ b/test/other-issues/join-empty-relations/entity/Post.ts @@ -13,7 +13,7 @@ export class Post { @Column() title: string - @ManyToMany((type) => Category) + @ManyToMany(() => Category) @JoinTable() categories: Category[] } diff --git a/test/other-issues/limit-with-order-by/entity/Post.ts b/test/other-issues/limit-with-order-by/entity/Post.ts index fbe782543..da6658951 100644 --- a/test/other-issues/limit-with-order-by/entity/Post.ts +++ b/test/other-issues/limit-with-order-by/entity/Post.ts @@ -13,7 +13,7 @@ export class Post { @Column() title: string - @ManyToMany((type) => Category, { + @ManyToMany(() => Category, { cascade: ["insert"], }) @JoinTable() diff --git a/test/other-issues/take-multiple-pk/entity/User.ts b/test/other-issues/take-multiple-pk/entity/User.ts index 8ebeb511a..ae8b972b9 100644 --- a/test/other-issues/take-multiple-pk/entity/User.ts +++ b/test/other-issues/take-multiple-pk/entity/User.ts @@ -13,7 +13,7 @@ export class User { @Column() handedness: string - @ManyToMany((type) => Role, { + @ManyToMany(() => Role, { cascade: ["insert"], }) @JoinTable() diff --git a/test/utils/test-utils.ts b/test/utils/test-utils.ts index dac8a4665..6b6932b7b 100644 --- a/test/utils/test-utils.ts +++ b/test/utils/test-utils.ts @@ -202,11 +202,11 @@ function getOrmFilepath(): string { // first checks build/compiled // useful for docker containers in order to provide a custom config return require.resolve(__dirname + "/../../ormconfig.json") - } catch (err) { + } catch { // fallbacks to the root config return require.resolve(__dirname + "/../../../../ormconfig.json") } - } catch (err) { + } catch { throw new Error( `Cannot find ormconfig.json file in the root of the project. To run tests please create ormconfig.json file` + ` in the root of the project (near ormconfig.sample.json, you need to copy ormconfig.sample.json into ormconfig.json` + @@ -469,7 +469,7 @@ export async function createTestingConnections( for (const schemaPath of schemaPaths) { try { await queryRunner.createSchema(schemaPath, true) - } catch (e) { + } catch { // Do nothing } } diff --git a/test/utils/xfail.ts b/test/utils/xfail.ts index 3aec9c84b..022e10b9e 100644 --- a/test/utils/xfail.ts +++ b/test/utils/xfail.ts @@ -28,8 +28,8 @@ const wrap = ( ok((fn as AsyncFunc).call(context as unknown as Context)) } }).then( - (e: any) => assert.fail("Expected this test to fail"), - (e: any) => { + () => assert.fail("Expected this test to fail"), + (e) => { if (!(e instanceof AssertionError)) { throw e }