Skip to content

Commit 7aaf3bf

Browse files
author
Valeriy Borodayev
committed
refactor: fix package.json, update packages, fix tests
1 parent 2ba707c commit 7aaf3bf

File tree

4 files changed

+1198
-1024
lines changed

4 files changed

+1198
-1024
lines changed

__fixtures__/__mocks__/db.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
import * as m from 'mongodb-memory-server';
55

6-
const DB = require.requireActual('../db').default;
6+
const DB = jest.requireActual('../db').default;
77

88
const mongod = new m.MongoMemoryServer({});
99

package.json

Lines changed: 47 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22
"name": "mongoose-history-diff",
33
"version": "0.0.0-semantically-released",
44
"description": "A mongoose plugin to take diffs and history of your documents",
5-
"main": "/lib/index.js",
6-
"types": "/lib/index.d.ts",
7-
"files": ["/lib"],
5+
"main": "./lib/index.js",
6+
"types": "./lib/index.d.ts",
7+
"files": [
8+
"./lib"
9+
],
810
"repository": {
911
"type": "git",
1012
"url": "https://github.com/borodayev/mongoose-history-diff.git"
@@ -28,26 +30,27 @@
2830
"homepage": "https://github.com/borodayev/mongoose-history-diff",
2931
"license": "MIT",
3032
"peerDependencies": {
31-
"mongoose": "^5.9.12"
33+
"mongoose": "^5.9.28"
3234
},
3335
"devDependencies": {
34-
"@types/jest": "^25.2.1",
35-
"@types/mongoose": "^5.7.15",
36-
"@typescript-eslint/eslint-plugin": "^2.30.0",
37-
"@typescript-eslint/parser": "^2.30.0",
38-
"cz-conventional-changelog": "^3.1.0",
39-
"eslint": "^6.8.0",
40-
"eslint-config-airbnb-typescript": "^7.2.1",
36+
"@semantic-release/commit-analyzer": "^8.0.1",
37+
"@types/jest": "^26.0.9",
38+
"@types/mongoose": "^5.7.36",
39+
"@typescript-eslint/eslint-plugin": "^3.8.0",
40+
"@typescript-eslint/parser": "^3.8.0",
41+
"cz-conventional-changelog": "^3.2.0",
42+
"eslint": "^7.6.0",
43+
"eslint-config-airbnb-typescript": "^9.0.0",
4144
"eslint-config-prettier": "^6.11.0",
42-
"eslint-plugin-import": "^2.20.2",
43-
"eslint-plugin-jest": "^23.8.2",
44-
"eslint-plugin-prettier": "^3.1.3",
45-
"jest": "25.5.4",
46-
"mongodb-memory-server": "^6.5.2",
45+
"eslint-plugin-import": "^2.22.0",
46+
"eslint-plugin-jest": "^23.20.0",
47+
"eslint-plugin-prettier": "^3.1.4",
48+
"jest": "26.2.2",
49+
"mongodb-memory-server": "^6.6.3",
4750
"prettier": "^2.0.5",
48-
"semantic-release": "^17.0.7",
49-
"ts-jest": "^25.5.0",
50-
"typescript": "^3.8.3"
51+
"semantic-release": "^17.1.1",
52+
"ts-jest": "^26.1.4",
53+
"typescript": "^3.9.7"
5154
},
5255
"publishConfig": {
5356
"access": "public"
@@ -57,6 +60,31 @@
5760
"path": "./node_modules/cz-conventional-changelog"
5861
}
5962
},
63+
"release": {
64+
"branches": [
65+
"master"
66+
],
67+
"plugins": [
68+
[
69+
"@semantic-release/commit-analyzer",
70+
{
71+
"preset": "angular",
72+
"releaseRules": [
73+
{
74+
"type": "docs",
75+
"scope": "README",
76+
"release": "patch"
77+
},
78+
{
79+
"type": "refactor",
80+
"release": "patch"
81+
}
82+
]
83+
}
84+
],
85+
"@semantic-release/release-notes-generator"
86+
]
87+
},
6088
"jest": {
6189
"testEnvironment": "node",
6290
"transform": {

src/diff.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,7 @@ export const revertChanges = (target: any, changes: Array<RawChangeT>): any => {
237237

238238
export default class MHD {
239239
static orderIndependent: boolean;
240+
240241
static excludedFields: Array<ExcludeFieldT> = [];
241242

242243
static findDiff(lhs: any, rhs: any): Array<RawChangeT> {

0 commit comments

Comments
 (0)