Skip to content

Commit ff25d62

Browse files
committed
Migrate to nodejs mongodb driver 4
1 parent 6eb4559 commit ff25d62

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+2444
-3458
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Test
22

3-
on: [push]
3+
on: [push, pull_request]
44

55
jobs:
66
build:

package.json

Lines changed: 26 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -15,62 +15,59 @@
1515
"author": "Rmannn <alex.hermann@pop-code.com>",
1616
"license": "MIT",
1717
"peerDependencies": {
18-
"@nestjs/common": "^7",
19-
"@nestjs/core": "^7",
18+
"@nestjs/common": "^8",
19+
"@nestjs/core": "^8",
2020
"reflect-metadata": "^0.1.13",
2121
"class-validator": "^0.13.1"
2222
},
2323
"dependencies": {
2424
"class-transformer": "0.4.0",
2525
"cls-hooked": "4.2.2",
26-
"dataloader": "2.0.0",
27-
"debug": "4.3.1",
26+
"debug": "4.3.2",
2827
"global": "4.4.0",
2928
"lodash": "4.17.21",
30-
"mongodb": "3.6.6",
31-
"slugify": "1.5.0",
29+
"mongodb": "4.0.1",
30+
"slugify": "1.6.0",
3231
"uuid": "8.3.2"
3332
},
3433
"devDependencies": {
35-
"@nestjs/common": "7.6.15",
36-
"@nestjs/core": "7.6.15",
37-
"@nestjs/testing": "7.6.15",
38-
"@nestjs/platform-express": "7.6.15",
34+
"@nestjs/common": "8.0.5",
35+
"@nestjs/core": "8.0.5",
36+
"@nestjs/testing": "8.0.5",
37+
"@nestjs/platform-express": "8.0.5",
3938
"@types/cls-hooked": "4.3.3",
40-
"@types/debug": "4.1.5",
41-
"@types/jest": "26.0.23",
42-
"@types/lodash": "4.14.169",
43-
"@types/mongodb": "3.6.12",
39+
"@types/debug": "4.1.7",
40+
"@types/jest": "26.0.24",
41+
"@types/lodash": "4.14.171",
4442
"@types/supertest": "2.0.11",
45-
"@typescript-eslint/eslint-plugin": "4.23.0",
46-
"@typescript-eslint/parser": "4.23.0",
43+
"@typescript-eslint/eslint-plugin": "4.28.5",
44+
"@typescript-eslint/parser": "4.28.5",
4745
"class-validator": "0.13.1",
48-
"eslint": "7.26.0",
46+
"eslint": "7.31.0",
4947
"eslint-config-prettier": "8.3.0",
5048
"eslint-config-standard-with-typescript": "20.0.0",
51-
"eslint-plugin-import": "2.23.2",
49+
"eslint-plugin-import": "2.23.4",
5250
"eslint-plugin-node": "11.1.0",
5351
"eslint-plugin-prefer-arrow": "1.2.3",
54-
"eslint-plugin-promise": "4.2.1",
52+
"eslint-plugin-promise": "5.1.0",
5553
"eslint-plugin-standard": "5.0.0",
56-
"jest": "26.6.3",
57-
"prettier": "2.3.0",
54+
"jest": "27.0.6",
55+
"prettier": "2.3.2",
5856
"reflect-metadata": "0.1.13",
59-
"rxjs": "6.6.7",
60-
"supertest": "6.1.3",
61-
"ts-jest": "26.5.6",
62-
"ts-node": "9.1.1",
63-
"tsconfig-paths": "3.9.0",
64-
"typedoc": "0.20.36",
65-
"typescript": "4.2.4"
57+
"rxjs": "7.2.0",
58+
"supertest": "6.1.4",
59+
"ts-jest": "27.0.4",
60+
"ts-node": "10.1.0",
61+
"tsconfig-paths": "3.10.1",
62+
"typedoc": "0.21.4",
63+
"typescript": "4.3.5"
6664
},
6765
"scripts": {
6866
"build": "rm -Rf dist && tsc -b tsconfig.build.json",
6967
"format": "prettier \"**/*.ts\" --ignore-path ./.prettierignore --write && git status",
7068
"lint": "eslint .",
7169
"doc": "rm -Rf ./docs && typedoc ./src && touch ./docs/.nojekyll",
7270
"test": "jest",
73-
"test:build": "jest --rootDir dist",
7471
"test:watch": "jest --watch",
7572
"test:cov": "jest --coverage",
7673
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand"

src/constants.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,7 @@
11
export const DEBUG = 'nestjs-mongo';
2-
32
export const DEFAULT_CONNECTION_NAME = 'nestjs-mongo:connection:default';
43
export const NAMED_CONNECTION_TOKEN = 'nestjs-mongo:connection:name';
5-
64
export const RELATIONSHIP_METADATA_NAME = 'nestjs-mongo:relationship';
7-
export const INVERSED_RELATIONSHIP_METADATA_NAME =
8-
'nestjs-mongo:inversed_relationship';
9-
export const RELATIONSHIPS_CASCADES_METADATA_NAME =
10-
'nestjs-mongo:relationships_cascades';
11-
export const CHILD_RELATIONSHIPS = 'nestjs-mongo:child_relationships';
125
export const INDEX_METADATA_NAME = 'nestjs-mongo:index';
13-
14-
export const DATA_LOADER_NAMESPACE = 'nestjs-mongo:ns_dataloader';
156
export const SESSION_LOADER_NAMESPACE = 'nestjs-mongo:ns_sessionloader';
167
export const MONGO_SESSION_KEY = 'ns_sessionloader:mongo_client_session';

src/dataloader/data.ts

Lines changed: 0 additions & 10 deletions
This file was deleted.

src/dataloader/middleware.ts

Lines changed: 0 additions & 39 deletions
This file was deleted.

src/dataloader/service.ts

Lines changed: 0 additions & 122 deletions
This file was deleted.

0 commit comments

Comments
 (0)