Skip to content

Commit 871e508

Browse files
authored
feat: Increase required minimum MongoDB versions to 6.0.19, 7.0.16, 8.0.4 (parse-community#9531)
BREAKING CHANGE: This releases increases the required minimum MongoDB versions to `6.0.19`, `7.0.16`, `8.0.4` and removes support for MongoDB `4`, `5`.
1 parent fbf78f0 commit 871e508

File tree

5 files changed

+31
-284
lines changed

5 files changed

+31
-284
lines changed

.github/workflows/ci.yml

+6-18
Original file line numberDiff line numberDiff line change
@@ -142,41 +142,29 @@ jobs:
142142
strategy:
143143
matrix:
144144
include:
145-
- name: MongoDB 4.2, ReplicaSet
146-
MONGODB_VERSION: 4.2.25
147-
MONGODB_TOPOLOGY: replset
148-
NODE_VERSION: 22.12.0
149-
- name: MongoDB 4.4, ReplicaSet
150-
MONGODB_VERSION: 4.4.29
151-
MONGODB_TOPOLOGY: replset
152-
NODE_VERSION: 22.12.0
153-
- name: MongoDB 5, ReplicaSet
154-
MONGODB_VERSION: 5.0.26
155-
MONGODB_TOPOLOGY: replset
156-
NODE_VERSION: 22.12.0
157145
- name: MongoDB 6, ReplicaSet
158-
MONGODB_VERSION: 6.0.14
146+
MONGODB_VERSION: 6.0.19
159147
MONGODB_TOPOLOGY: replset
160148
NODE_VERSION: 22.12.0
161149
- name: MongoDB 7, ReplicaSet
162-
MONGODB_VERSION: 7.0.8
150+
MONGODB_VERSION: 7.0.16
163151
MONGODB_TOPOLOGY: replset
164152
NODE_VERSION: 22.12.0
165153
- name: MongoDB 8, ReplicaSet
166-
MONGODB_VERSION: 8.0.0
154+
MONGODB_VERSION: 8.0.4
167155
MONGODB_TOPOLOGY: replset
168156
NODE_VERSION: 22.12.0
169157
- name: Redis Cache
170158
PARSE_SERVER_TEST_CACHE: redis
171-
MONGODB_VERSION: 8.0.0
159+
MONGODB_VERSION: 8.0.4
172160
MONGODB_TOPOLOGY: standalone
173161
NODE_VERSION: 22.12.0
174162
- name: Node 20
175-
MONGODB_VERSION: 8.0.0
163+
MONGODB_VERSION: 8.0.4
176164
MONGODB_TOPOLOGY: standalone
177165
NODE_VERSION: 20.18.0
178166
- name: Node 18
179-
MONGODB_VERSION: 8.0.0
167+
MONGODB_VERSION: 8.0.4
180168
MONGODB_TOPOLOGY: standalone
181169
NODE_VERSION: 18.20.4
182170
fail-fast: false

README.md

+10-13
Original file line numberDiff line numberDiff line change
@@ -127,24 +127,21 @@ Before you start make sure you have installed:
127127

128128
Parse Server is continuously tested with the most recent releases of Node.js to ensure compatibility. We follow the [Node.js Long Term Support plan](https://github.com/nodejs/Release) and only test against versions that are officially supported and have not reached their end-of-life date.
129129

130-
| Version | Latest Version | End-of-Life | Compatible |
131-
|------------|----------------|-------------|------------|
132-
| Node.js 18 | 18.20.4 | April 2025 | ✅ Yes |
133-
| Node.js 20 | 20.18.0 | April 2026 | ✅ Yes |
134-
| Node.js 22 | 22.12.0 | April 2027 | ✅ Yes |
130+
| Version | Minimum Version | End-of-Life | Compatible |
131+
|------------|-----------------|-------------|------------|
132+
| Node.js 18 | 18.20.4 | April 2025 | ✅ Yes |
133+
| Node.js 20 | 20.18.0 | April 2026 | ✅ Yes |
134+
| Node.js 22 | 22.12.0 | April 2027 | ✅ Yes |
135135

136136
#### MongoDB
137137

138138
Parse Server is continuously tested with the most recent releases of MongoDB to ensure compatibility. We follow the [MongoDB support schedule](https://www.mongodb.com/support-policy) and [MongoDB lifecycle schedule](https://www.mongodb.com/support-policy/lifecycles) and only test against versions that are officially supported and have not reached their end-of-life date. MongoDB "rapid releases" are ignored as these are considered pre-releases of the next major version.
139139

140-
| Version | Latest Version | End-of-Life | Compatible |
141-
|-------------|----------------|---------------|------------|
142-
| MongoDB 4.2 | 4.2.25 | April 2023 | ✅ Yes |
143-
| MongoDB 4.4 | 4.4.29 | February 2024 | ✅ Yes |
144-
| MongoDB 5 | 5.0.26 | October 2024 | ✅ Yes |
145-
| MongoDB 6 | 6.0.14 | July 2025 | ✅ Yes |
146-
| MongoDB 7 | 7.0.8 | TDB | ✅ Yes |
147-
| MongoDB 8 | 8.0.0 | TDB | ✅ Yes |
140+
| Version | Minimum Version | End-of-Life | Compatible |
141+
|-----------|-----------------|-------------|------------|
142+
| MongoDB 6 | 6.0.19 | July 2025 | ✅ Yes |
143+
| MongoDB 7 | 7.0.16 | August 2026 | ✅ Yes |
144+
| MongoDB 8 | 8.0.4 | TDB | ✅ Yes |
148145

149146
#### PostgreSQL
150147

package.json

+6-9
Original file line numberDiff line numberDiff line change
@@ -121,18 +121,15 @@
121121
"test:mongodb:runnerstart": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=$npm_config_dbversion} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} mongodb-runner start -t ${MONGODB_TOPOLOGY} --version ${MONGODB_VERSION} -- --port 27017",
122122
"test:mongodb:testonly": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=$npm_config_dbversion} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} TESTING=1 jasmine",
123123
"test:mongodb": "npm run test:mongodb:runnerstart --dbversion=$npm_config_dbversion && npm run test:mongodb:testonly --dbversion=$npm_config_dbversion",
124-
"test:mongodb:4.2.19": "npm run test:mongodb --dbversion=4.2.19",
125-
"test:mongodb:4.4.13": "npm run test:mongodb --dbversion=4.4.13",
126-
"test:mongodb:5.3.2": "npm run test:mongodb --dbversion=5.3.2",
127-
"test:mongodb:6.0.2": "npm run test:mongodb --dbversion=6.0.2",
128-
"test:mongodb:7.0.1": "npm run test:mongodb --dbversion=7.0.1",
129-
"test:mongodb:8.0.3": "npm run test:mongodb --dbversion=8.0.3",
124+
"test:mongodb:6.0.19": "npm run test:mongodb --dbversion=6.0.19",
125+
"test:mongodb:7.0.16": "npm run test:mongodb --dbversion=7.0.16",
126+
"test:mongodb:8.0.4": "npm run test:mongodb --dbversion=8.0.4",
130127
"test:postgres:testonly": "cross-env PARSE_SERVER_TEST_DB=postgres PARSE_SERVER_TEST_DATABASE_URI=postgres://postgres:password@localhost:5432/parse_server_postgres_adapter_test_database npm run testonly",
131-
"pretest": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=5.3.2} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} mongodb-runner start -t ${MONGODB_TOPOLOGY} --version ${MONGODB_VERSION} -- --port 27017",
132-
"testonly": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=5.3.2} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} TESTING=1 jasmine",
128+
"pretest": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=8.0.4} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} mongodb-runner start -t ${MONGODB_TOPOLOGY} --version ${MONGODB_VERSION} -- --port 27017",
129+
"testonly": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=8.0.4} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} TESTING=1 jasmine",
133130
"test": "npm run testonly",
134131
"posttest": "cross-env mongodb-runner stop --all",
135-
"coverage": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=5.3.2} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} TESTING=1 nyc jasmine",
132+
"coverage": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=8.0.4} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} TESTING=1 nyc jasmine",
136133
"start": "node ./bin/parse-server",
137134
"prettier": "prettier --write {src,spec}/{**/*,*}.js",
138135
"prepare": "npm run build",

spec/MongoStorageAdapter.spec.js

-34
Original file line numberDiff line numberDiff line change
@@ -424,40 +424,6 @@ describe_only_db('mongo')('MongoStorageAdapter', () => {
424424
expect(postIndexPlan.executionStats.executionStages.stage).toBe('FETCH');
425425
});
426426

427-
it_only_mongodb_version('>=5.1 <6')('should use index for caseInsensitive query', async () => {
428-
const user = new Parse.User();
429-
user.set('username', 'Bugs');
430-
user.set('password', 'Bunny');
431-
await user.signUp();
432-
433-
const database = Config.get(Parse.applicationId).database;
434-
await database.adapter.dropAllIndexes('_User');
435-
436-
const preIndexPlan = await database.find(
437-
'_User',
438-
{ username: 'bugs' },
439-
{ caseInsensitive: true, explain: true }
440-
);
441-
442-
const schema = await new Parse.Schema('_User').get();
443-
444-
await database.adapter.ensureIndex(
445-
'_User',
446-
schema,
447-
['username'],
448-
'case_insensitive_username',
449-
true
450-
);
451-
452-
const postIndexPlan = await database.find(
453-
'_User',
454-
{ username: 'bugs' },
455-
{ caseInsensitive: true, explain: true }
456-
);
457-
expect(preIndexPlan.queryPlanner.winningPlan.queryPlan.stage).toBe('COLLSCAN');
458-
expect(postIndexPlan.queryPlanner.winningPlan.queryPlan.stage).toBe('FETCH');
459-
});
460-
461427
it('should delete field without index', async () => {
462428
const database = Config.get(Parse.applicationId).database;
463429
const obj = new Parse.Object('MyObject');

0 commit comments

Comments
 (0)