Skip to content

Commit

Permalink
Merge branch 'master' into snyk-upgrade-e61233ed19b152bf610d469ae046d4ce
Browse files Browse the repository at this point in the history
  • Loading branch information
mtrezza authored Oct 18, 2021
2 parents 5f0b65c + 80bf578 commit 2680bf9
Show file tree
Hide file tree
Showing 6 changed files with 83 additions and 61 deletions.
19 changes: 0 additions & 19 deletions .github/stale.yml

This file was deleted.

8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ jobs:
MONGODB_STORAGE_ENGINE: wiredTiger
NODE_VERSION: 14.18.1
- name: MongoDB 4.4, ReplicaSet, WiredTiger
MONGODB_VERSION: 4.4.9
MONGODB_VERSION: 4.4.10
MONGODB_TOPOLOGY: replicaset
MONGODB_STORAGE_ENGINE: wiredTiger
NODE_VERSION: 14.18.1
Expand All @@ -127,17 +127,17 @@ jobs:
NODE_VERSION: 14.18.1
- name: Redis Cache
PARSE_SERVER_TEST_CACHE: redis
MONGODB_VERSION: 4.4.9
MONGODB_VERSION: 4.4.10
MONGODB_TOPOLOGY: standalone
MONGODB_STORAGE_ENGINE: wiredTiger
NODE_VERSION: 14.18.1
- name: Node 12
MONGODB_VERSION: 4.4.9
MONGODB_VERSION: 4.4.10
MONGODB_TOPOLOGY: standalone
MONGODB_STORAGE_ENGINE: wiredTiger
NODE_VERSION: 12.22.7
- name: Node 15
MONGODB_VERSION: 4.4.9
MONGODB_VERSION: 4.4.10
MONGODB_TOPOLOGY: standalone
MONGODB_STORAGE_ENGINE: wiredTiger
NODE_VERSION: 15.14.0
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ Parse Server is continuously tested with the most recent releases of MongoDB to
|-------------|----------------|------------------|--------------------|
| MongoDB 4.0 | 4.0.27 | April 2022 | ✅ Fully compatible |
| MongoDB 4.2 | 4.2.17 | TBD | ✅ Fully compatible |
| MongoDB 4.4 | 4.4.9 | TBD | ✅ Fully compatible |
| MongoDB 4.4 | 4.4.10 | TBD | ✅ Fully compatible |
| MongoDB 5.0 | 5.0.3 | January 2024 | ✅ Fully compatible |

#### PostgreSQL
Expand Down
93 changes: 67 additions & 26 deletions package-lock.json

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

16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"cors": "2.8.5",
"deepcopy": "2.1.0",
"express": "4.17.1",
"follow-redirects": "1.14.1",
"follow-redirects": "1.14.2",
"graphql": "15.6.0",
"graphql-list-fields": "2.0.2",
"graphql-relay": "0.9.0",
Expand All @@ -47,12 +47,12 @@
"mime": "2.5.2",
"mongodb": "4.1.1",
"mustache": "4.2.0",
"parse": "3.3.0",
"parse": "3.3.1",
"pg-monitor": "1.4.1",
"pg-promise": "10.11.0",
"pluralize": "8.0.0",
"redis": "3.1.2",
"semver": "7.3.4",
"semver": "7.3.5",
"subscriptions-transport-ws": "0.10.0",
"tv4": "1.3.0",
"uuid": "8.3.2",
Expand Down Expand Up @@ -114,13 +114,13 @@
"test:mongodb": "npm run test:mongodb:runnerstart --dbversion=$npm_config_dbversion && npm run test:mongodb:testonly --dbversion=$npm_config_dbversion",
"test:mongodb:4.0.27": "npm run test:mongodb --dbversion=4.0.27",
"test:mongodb:4.2.17": "npm run test:mongodb --dbversion=4.2.17",
"test:mongodb:4.4.9": "npm run test:mongodb --dbversion=4.4.9",
"test:mongodb:4.4.10": "npm run test:mongodb --dbversion=4.4.10",
"posttest:mongodb": "mongodb-runner stop",
"pretest": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=4.4.9} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} MONGODB_STORAGE_ENGINE=${MONGODB_STORAGE_ENGINE:=wiredTiger} mongodb-runner start",
"testonly": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=4.4.9} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} MONGODB_STORAGE_ENGINE=${MONGODB_STORAGE_ENGINE:=wiredTiger} TESTING=1 jasmine",
"pretest": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=4.4.10} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} MONGODB_STORAGE_ENGINE=${MONGODB_STORAGE_ENGINE:=wiredTiger} mongodb-runner start",
"testonly": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=4.4.10} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} MONGODB_STORAGE_ENGINE=${MONGODB_STORAGE_ENGINE:=wiredTiger} TESTING=1 jasmine",
"test": "npm run testonly",
"posttest": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=4.4.9} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} MONGODB_STORAGE_ENGINE=${MONGODB_STORAGE_ENGINE:=wiredTiger} mongodb-runner stop",
"coverage": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=4.4.9} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} MONGODB_STORAGE_ENGINE=${MONGODB_STORAGE_ENGINE:=wiredTiger} TESTING=1 nyc jasmine",
"posttest": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=4.4.10} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} MONGODB_STORAGE_ENGINE=${MONGODB_STORAGE_ENGINE:=wiredTiger} mongodb-runner stop",
"coverage": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=4.4.10} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} MONGODB_STORAGE_ENGINE=${MONGODB_STORAGE_ENGINE:=wiredTiger} TESTING=1 nyc jasmine",
"start": "node ./bin/parse-server",
"prettier": "prettier --write {src,spec}/{**/*,*}.js",
"prepare": "npm run build",
Expand Down
6 changes: 3 additions & 3 deletions src/Adapters/Storage/Mongo/MongoStorageAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,10 @@ export class MongoStorageAdapter implements StorageAdapter {
delete this.connectionPromise;
return;
}
database.on('error', () => {
client.on('error', () => {
delete this.connectionPromise;
});
database.on('close', () => {
client.on('close', () => {
delete this.connectionPromise;
});
this.client = client;
Expand Down Expand Up @@ -555,7 +555,7 @@ export class MongoStorageAdapter implements StorageAdapter {
return this._adaptiveCollection(className)
.then(collection =>
collection._mongoCollection.findOneAndUpdate(mongoWhere, mongoUpdate, {
returnOriginal: false,
returnDocument: 'after',
session: transactionalSession || undefined,
})
)
Expand Down

0 comments on commit 2680bf9

Please sign in to comment.