Skip to content
This repository was archived by the owner on Jan 7, 2021. It is now read-only.

Commit 5b78a6d

Browse files
author
Chau Tran
committed
fix(package.json): update automapper v2
1 parent 5f60084 commit 5b78a6d

4 files changed

Lines changed: 608 additions & 585 deletions

File tree

package.json

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"automapper",
1515
"typescript"
1616
],
17+
"sideEffects": false,
1718
"repository": {
1819
"type": "git",
1920
"url": "https://github.com/nestjsx/automapper.git"
@@ -82,32 +83,32 @@
8283
]
8384
},
8485
"devDependencies": {
85-
"@commitlint/cli": "8.2.0",
86-
"@commitlint/config-conventional": "8.2.0",
87-
"@nestjs/common": "6.10.0",
88-
"@nestjs/core": "6.10.0",
89-
"@nestjs/testing": "6.9.0",
90-
"@types/jest": "24.0.23",
91-
"commitizen": "4.0.3",
92-
"coveralls": "3.0.7",
93-
"cz-conventional-changelog": "3.0.2",
94-
"husky": "3.0.9",
95-
"lint-staged": "9.4.3",
96-
"prettier": "1.19.0",
97-
"reflect-metadata": "0.1.13",
86+
"@commitlint/cli": "^8.2.0",
87+
"@commitlint/config-conventional": "^8.2.0",
88+
"@nestjs/common": "^6.10.1",
89+
"@nestjs/core": "^6.10.1",
90+
"@nestjs/testing": "^6.10.1",
91+
"@types/jest": "^24.0.23",
92+
"commitizen": "^4.0.3",
93+
"coveralls": "^3.0.7",
94+
"cz-conventional-changelog": "^3.0.2",
95+
"husky": "^3.0.9",
96+
"lint-staged": "^9.4.3",
97+
"prettier": "^1.19.1",
98+
"reflect-metadata": "^0.1.13",
9899
"semantic-release": "^15.13.30",
99-
"shelljs": "0.8.3",
100-
"ts-node": "8.5.0",
101-
"tsdx": "0.11.0",
102-
"tslib": "1.10.0",
103-
"typedoc": "0.15.2",
104-
"typescript": "3.7.2"
100+
"shelljs": "^0.8.3",
101+
"ts-node": "^8.5.2",
102+
"tsdx": "^0.11.0",
103+
"tslib": "^1.10.0",
104+
"typedoc": "^0.15.2",
105+
"typescript": "~3.7.2"
105106
},
106107
"dependencies": {
107-
"@nartc/automapper": "^1.1.8"
108+
"@nartc/automapper": "^2.0.0"
108109
},
109110
"peerDependencies": {
110-
"@nestjs/common": "~6.8.5",
111-
"reflect-metadata": "~0.1.13"
111+
"@nestjs/common": "^6.10.1",
112+
"reflect-metadata": "^0.1.13"
112113
}
113114
}

src/automapper.explorer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,6 @@ export class AutomapperExplorer {
3636
return;
3737
}
3838

39-
mapper.addProfile(new value());
39+
mapper.addProfile(value);
4040
}
4141
}

test/automapper.test.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,8 @@ class MockVm {
1818

1919
@Profile()
2020
class MockProfile extends MappingProfileBase {
21-
constructor() {
21+
constructor(mapper: AutoMapper) {
2222
super();
23-
}
24-
25-
configure(mapper: AutoMapper): void {
2623
mapper
2724
.createMap(Mock, MockVm)
2825
.forMember(d => d.bar, opts => opts.mapFrom(s => s.foo))
@@ -37,11 +34,8 @@ class Another {
3734

3835
@Profile()
3936
class AnotherProfile extends MappingProfileBase {
40-
constructor() {
37+
constructor(mapper: AutoMapper) {
4138
super();
42-
}
43-
44-
configure(mapper: AutoMapper): void {
4539
mapper.createMap(Another, MockVm);
4640
}
4741
}

0 commit comments

Comments
 (0)