Skip to content

Commit

Permalink
fix(deps): remove forked dependency
Browse files Browse the repository at this point in the history
Remove use of a forked dependency. The fork appears to add in an 'optional' option, which is undocumented and seemingly untested. It seems to work without it too.

The dependency has seen some updates, too, including TypeScript changes required for using strict mode (CyriacBr/class-fixtures-factory#10).

Refs #406, #398
  • Loading branch information
thewilkybarkid committed Sep 7, 2021
1 parent 4b7d4cf commit 318fdf7
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 9 deletions.
5 changes: 3 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
"@mikro-orm/postgresql": "^4.5.4",
"@reach/tooltip": "^0.10.5",
"anonymus": "^2.0.0",
"class-fixtures-factory": "git+https://github.com/throneless-tech/class-fixtures-factory.git",
"class-fixtures-factory": "^1.6.1",
"clipboard-copy": "^3.1.0",
"combined-stream": "^1.0.8",
"commander": "^5.1.0",
Expand Down
1 change: 0 additions & 1 deletion src/backend/models/entities/Badge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ export class Badge extends BaseEntity {
@Unique()
name!: string;

//@Fixture({ get: faker => faker.internet.color(), optional: true })
@Fixture(faker => faker.internet.color())
@Property()
color?: string;
Expand Down
2 changes: 0 additions & 2 deletions src/backend/models/entities/Community.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,10 @@ export class Community extends BaseEntity {
@Unique()
slug!: string;

//@Fixture({ get: faker => faker.lorem.paragraph(), optional: true })
@Fixture(faker => faker.lorem.sentences())
@Property({ columnType: 'text', nullable: true })
description?: string;

//@Fixture({ get: faker => faker.image.abstract(), optional: true })
@Fixture(faker => faker.image.abstract())
@Property({ nullable: true })
banner?: Buffer;
Expand Down
2 changes: 1 addition & 1 deletion src/backend/models/entities/FullReview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export class FullReview extends BaseEntity {
@Property()
isFlagged: boolean = false;

@Fixture({ get: () => createRandomDoi(), optional: true })
@Fixture({ get: () => createRandomDoi() })
@Property({ nullable: true })
@Unique()
doi?: string;
Expand Down
1 change: 0 additions & 1 deletion src/backend/models/entities/Tag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ export class Tag extends BaseEntity {
@Unique()
name!: string;

//@Fixture({ get: faker => faker.internet.color(), optional: true })
@Fixture(faker => faker.internet.color())
@Property()
color?: string;
Expand Down
2 changes: 1 addition & 1 deletion src/backend/models/entities/Work.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export class Work extends BaseEntity {
@Property({ nullable: true })
type?: string;

@Fixture({ get: () => `doi:${createRandomDoi()}`, optional: true })
@Fixture({ get: () => `doi:${createRandomDoi()}` })
@Property({ nullable: true })
handle?: string;

Expand Down

0 comments on commit 318fdf7

Please sign in to comment.