Skip to content

Commit aba0081

Browse files
authored
feat: add support for MongoDB 6 (parse-community#8242)
1 parent 4af13af commit aba0081

File tree

5 files changed

+16
-10
lines changed

5 files changed

+16
-10
lines changed

Diff for: .github/workflows/ci.yml

+5
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,11 @@ jobs:
146146
MONGODB_TOPOLOGY: replicaset
147147
MONGODB_STORAGE_ENGINE: wiredTiger
148148
NODE_VERSION: 18.1.0
149+
- name: MongoDB 6, ReplicaSet, WiredTiger
150+
MONGODB_VERSION: 6.0.2
151+
MONGODB_TOPOLOGY: replicaset
152+
MONGODB_STORAGE_ENGINE: wiredTiger
153+
NODE_VERSION: 18.1.0
149154
- name: Redis Cache
150155
PARSE_SERVER_TEST_CACHE: redis
151156
MONGODB_VERSION: 4.4.13

Diff for: README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
[![auto-release](https://img.shields.io/badge/%F0%9F%9A%80-auto--release-9e34eb.svg)](https://github.com/parse-community/parse-dashboard/releases)
99

1010
[![Node Version](https://img.shields.io/badge/nodejs-12,_14,_16,_17,_18-green.svg?logo=node.js&style=flat)](https://nodejs.org)
11-
[![MongoDB Version](https://img.shields.io/badge/mongodb-4.0,_4.2,_4.4,_5.0,_5.1,_5.2-green.svg?logo=mongodb&style=flat)](https://www.mongodb.com)
11+
[![MongoDB Version](https://img.shields.io/badge/mongodb-4.0,_4.2,_4.4,_5.0,_5.1,_5.2,_6-green.svg?logo=mongodb&style=flat)](https://www.mongodb.com)
1212
[![Postgres Version](https://img.shields.io/badge/postgresql-11,_12,_13,_14,_15-green.svg?logo=postgresql&style=flat)](https://www.postgresql.org)
1313

1414
[![npm latest version](https://img.shields.io/npm/v/parse-server/latest.svg)](https://www.npmjs.com/package/parse-server)
@@ -142,7 +142,7 @@ Parse Server is continuously tested with the most recent releases of MongoDB to
142142
| MongoDB 4.2 | 4.2.19 | April 2023 | ✅ Yes |
143143
| MongoDB 4.4 | 4.4.13 | February 2024 | ✅ Yes |
144144
| MongoDB 5.3 | 5.3.2 | October 2024 | ✅ Yes |
145-
| MongoDB 6.0 | - | July 2025 | ❌ Not tested |
145+
| MongoDB 6 | 6.0.2 | July 2025 | ✅ Yes |
146146

147147
#### PostgreSQL
148148

Diff for: package.json

+1
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@
119119
"test:mongodb:4.2.19": "npm run test:mongodb --dbversion=4.2.19",
120120
"test:mongodb:4.4.13": "npm run test:mongodb --dbversion=4.4.13",
121121
"test:mongodb:5.3.2": "npm run test:mongodb --dbversion=5.3.2",
122+
"test:mongodb:6.0.2": "npm run test:mongodb --dbversion=6.0.2",
122123
"posttest:mongodb": "mongodb-runner stop",
123124
"pretest": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=5.3.2} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} MONGODB_STORAGE_ENGINE=${MONGODB_STORAGE_ENGINE:=wiredTiger} mongodb-runner start",
124125
"testonly": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=5.3.2} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} MONGODB_STORAGE_ENGINE=${MONGODB_STORAGE_ENGINE:=wiredTiger} TESTING=1 jasmine",

Diff for: spec/MongoStorageAdapter.spec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ describe_only_db('mongo')('MongoStorageAdapter', () => {
308308
await expectAsync(adapter.getClass('UnknownClass')).toBeRejectedWith(undefined);
309309
});
310310

311-
it_only_mongodb_version('<5.1')('should use index for caseInsensitive query', async () => {
311+
it_only_mongodb_version('<5.1>=6')('should use index for caseInsensitive query', async () => {
312312
const user = new Parse.User();
313313
user.set('username', 'Bugs');
314314
user.set('password', 'Bunny');
@@ -342,7 +342,7 @@ describe_only_db('mongo')('MongoStorageAdapter', () => {
342342
expect(postIndexPlan.executionStats.executionStages.stage).toBe('FETCH');
343343
});
344344

345-
it_only_mongodb_version('>=5.1')('should use index for caseInsensitive query', async () => {
345+
it_only_mongodb_version('>=5.1<6')('should use index for caseInsensitive query', async () => {
346346
const user = new Parse.User();
347347
user.set('username', 'Bugs');
348348
user.set('password', 'Bunny');

Diff for: spec/ParseQuery.hint.spec.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ describe_only_db('mongo')('Parse.Query hint', () => {
2727
await TestUtils.destroyAllDataPermanently(false);
2828
});
2929

30-
it_only_mongodb_version('<5.1')('query find with hint string', async () => {
30+
it_only_mongodb_version('<5.1>=6')('query find with hint string', async () => {
3131
const object = new TestObject();
3232
await object.save();
3333

@@ -39,7 +39,7 @@ describe_only_db('mongo')('Parse.Query hint', () => {
3939
expect(explain.queryPlanner.winningPlan.inputStage.indexName).toBe('_id_');
4040
});
4141

42-
it_only_mongodb_version('>=5.1')('query find with hint string', async () => {
42+
it_only_mongodb_version('>=5.1<6')('query find with hint string', async () => {
4343
const object = new TestObject();
4444
await object.save();
4545

@@ -50,7 +50,7 @@ describe_only_db('mongo')('Parse.Query hint', () => {
5050
expect(explain.queryPlanner.winningPlan.queryPlan.inputStage.indexName).toBe('_id_');
5151
});
5252

53-
it_only_mongodb_version('<5.1')('query find with hint object', async () => {
53+
it_only_mongodb_version('<5.1>=6')('query find with hint object', async () => {
5454
const object = new TestObject();
5555
await object.save();
5656

@@ -64,7 +64,7 @@ describe_only_db('mongo')('Parse.Query hint', () => {
6464
});
6565
});
6666

67-
it_only_mongodb_version('>=5.1')('query find with hint object', async () => {
67+
it_only_mongodb_version('>=5.1<6')('query find with hint object', async () => {
6868
const object = new TestObject();
6969
await object.save();
7070

@@ -265,7 +265,7 @@ describe_only_db('mongo')('Parse.Query hint', () => {
265265
expect(queryPlanner.winningPlan.queryPlan.inputStage.inputStage.keyPattern).toEqual({ _id: 1 });
266266
});
267267

268-
it_only_mongodb_version('<5.1')('query find with hint (rest)', async () => {
268+
it_only_mongodb_version('<5.1>=6')('query find with hint (rest)', async () => {
269269
const object = new TestObject();
270270
await object.save();
271271
let options = Object.assign({}, masterKeyOptions, {
@@ -290,7 +290,7 @@ describe_only_db('mongo')('Parse.Query hint', () => {
290290
expect(explain.queryPlanner.winningPlan.inputStage.inputStage.indexName).toBe('_id_');
291291
});
292292

293-
it_only_mongodb_version('>=5.1')('query find with hint (rest)', async () => {
293+
it_only_mongodb_version('>=5.1<6')('query find with hint (rest)', async () => {
294294
const object = new TestObject();
295295
await object.save();
296296
let options = Object.assign({}, masterKeyOptions, {

0 commit comments

Comments
 (0)