Skip to content

Commit

Permalink
Merge pull request #21 from thiagomini/fix/merge-objects
Browse files Browse the repository at this point in the history
Fix/merge objects
  • Loading branch information
thiagomini authored Sep 23, 2023
2 parents 3da299a + 4b1dc9d commit e5e4e97
Show file tree
Hide file tree
Showing 10 changed files with 149 additions and 126 deletions.
153 changes: 81 additions & 72 deletions package-lock.json

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

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"@faker-js/faker": "7.6.0",
"@mikro-orm/core": "^5.7.14",
"@mikro-orm/postgresql": "^5.7.14",
"@types/lodash": "4.14.194",
"@types/lodash": "4.14.198",
"@types/node": "18.16.3",
"@typescript-eslint/eslint-plugin": "5.59.0",
"@typescript-eslint/parser": "5.59.0",
Expand All @@ -67,10 +67,11 @@
"type-fest": "3.8.0",
"typeorm": "0.3.15",
"typescript": "5.0.4",
"vitest": "0.34.1"
"vitest": "0.34.5"
},
"dependencies": {
"class-transformer": "0.5.1",
"deepmerge": "^4.3.1",
"lodash": "4.17.21"
}
}
8 changes: 5 additions & 3 deletions src/adapters/mikro-orm.adapter.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import { EntityManager, MikroORM } from '@mikro-orm/core';
import { BaseEntity, EntityManager, MikroORM } from '@mikro-orm/core';
import { ModelAdapter } from './adapter.interface';

export type MikroOrmAdapterOptions = {
shouldFork: boolean;
};

export class MikroOrmAdapter<TModelSchema, ReturnType>
implements ModelAdapter<TModelSchema, ReturnType>
export class MikroOrmAdapter<
TModelSchema extends BaseEntity<any, any>,
ReturnType,
> implements ModelAdapter<TModelSchema, ReturnType>
{
constructor(
private readonly orm: MikroORM,
Expand Down
Loading

0 comments on commit e5e4e97

Please sign in to comment.