Skip to content

Commit 5957c5b

Browse files
committed
Merge commit 'b59517fd68a56885c9ab73525526e42ff4003333' into add-page-localization
* commit 'b59517fd68a56885c9ab73525526e42ff4003333': Add tests against multiple MongoDB versions (parse-community#7161) # Conflicts: # CHANGELOG.md # README.md # package-lock.json
2 parents 0ac2ec7 + b59517f commit 5957c5b

14 files changed

+519
-112
lines changed

.github/workflows/ci.yml

Lines changed: 45 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,62 @@ env:
1111
NODE_VERSION: 10
1212
PARSE_SERVER_TEST_TIMEOUT: 20000
1313
jobs:
14+
check-ci:
15+
name: CI Self-Check
16+
timeout-minutes: 30
17+
runs-on: ubuntu-18.04
18+
steps:
19+
- uses: actions/checkout@v2
20+
- name: Use Node.js ${{ matrix.NODE_VERSION }}
21+
uses: actions/setup-node@v1
22+
with:
23+
node-version: ${{ matrix.node-version }}
24+
- name: Cache Node.js modules
25+
uses: actions/cache@v2
26+
with:
27+
path: ~/.npm
28+
key: ${{ runner.os }}-node-${{ matrix.NODE_VERSION }}-${{ hashFiles('**/package-lock.json') }}
29+
restore-keys: |
30+
${{ runner.os }}-node-${{ matrix.NODE_VERSION }}-
31+
- name: Install dependencies
32+
run: npm ci
33+
- name: CI Self-Check
34+
run: npm run ci:check
1435
check-mongo:
1536
strategy:
1637
matrix:
1738
include:
18-
- name: Mongo 4.0.4, ReplicaSet, WiredTiger
19-
MONGODB_VERSION: 4.0.4
39+
- name: Mongo 4.4, ReplicaSet, WiredTiger
40+
MONGODB_VERSION: 4.4.3
41+
MONGODB_TOPOLOGY: replicaset
42+
MONGODB_STORAGE_ENGINE: wiredTiger
43+
NODE_VERSION: 10
44+
- name: Mongo 4.2, ReplicaSet, WiredTiger
45+
MONGODB_VERSION: 4.2.12
46+
MONGODB_TOPOLOGY: replicaset
47+
MONGODB_STORAGE_ENGINE: wiredTiger
48+
NODE_VERSION: 10
49+
- name: Mongo 4.0, ReplicaSet, WiredTiger
50+
MONGODB_VERSION: 4.0.22
2051
MONGODB_TOPOLOGY: replicaset
2152
MONGODB_STORAGE_ENGINE: wiredTiger
2253
NODE_VERSION: 10
23-
- name: Mongo 3.6.21
24-
MONGODB_VERSION: 3.6.21
54+
- name: Mongo 3.6, Standalone, MMAPv1
55+
MONGODB_VERSION: 3.6.22
56+
MONGODB_TOPOLOGY: standalone
57+
MONGODB_STORAGE_ENGINE: mmapv1
2558
NODE_VERSION: 10
2659
- name: Redis Cache
2760
PARSE_SERVER_TEST_CACHE: redis
61+
MONGODB_VERSION: 4.4.3
62+
MONGODB_TOPOLOGY: standalone
63+
MONGODB_STORAGE_ENGINE: wiredTiger
2864
NODE_VERSION: 10
29-
- name: Node 12.12.0
30-
NODE_VERSION: 12.12.0
65+
- name: Node 12.20
66+
MONGODB_VERSION: 4.4.3
67+
MONGODB_TOPOLOGY: standalone
68+
MONGODB_STORAGE_ENGINE: wiredTiger
69+
NODE_VERSION: 12.20.1
3170
name: ${{ matrix.name }}
3271
timeout-minutes: 30
3372
runs-on: ubuntu-18.04

CHANGELOG.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,17 @@
44
[Full Changelog](https://github.com/parse-community/parse-server/compare/4.5.0...master)
55

66
__BREAKING CHANGES:__
7-
- NEW: Added file upload restriction. File upload is now only allowed for authenticated users by default for improved security. To allow file upload also for Anonymous Users or Public, set the `fileUpload` parameter in the [Parse Server Options](https://parseplatform.org/parse-server/api/master/ParseServerOptions.html). [#7071](https://github.com/parse-community/parse-server/pull/7071). Thanks to [dblythy](https://github.com/dblythy).
7+
- NEW: Added file upload restriction. File upload is now only allowed for authenticated users by default for improved security. To allow file upload also for Anonymous Users or Public, set the `fileUpload` parameter in the [Parse Server Options](https://parseplatform.org/parse-server/api/master/ParseServerOptions.html). [#7071](https://github.com/parse-community/parse-server/pull/7071). Thanks to [dblythy](https://github.com/dblythy), [Manuel Trezza](https://github.com/mtrezza).
88
___
9-
- NEW (EXPERIMENTAL): Added page localization for password reset and email verification. **Caution, this is an experimental feature that may not be appropriate for production.** [#6891](https://github.com/parse-community/parse-server/issues/6891). Thanks to [Manuel Trezza](https://github.com/mtrezza).
9+
- NEW (EXPERIMENTAL): Added new page router with placeholder rendering and localization of custom and feature pages such as password reset and email verification. **Caution, this is an experimental feature that may not be appropriate for production.** [#6891](https://github.com/parse-community/parse-server/issues/6891). Thanks to [Manuel Trezza](https://github.com/mtrezza).
10+
- NEW: Added convenience method `Parse.Cloud.sendEmail(...)` to send email via email adapter in Cloud Code. [#7089](https://github.com/parse-community/parse-server/pull/7089). Thanks to [dblythy](https://github.com/dblythy)
11+
- NEW: LiveQuery support for $and, $nor, $containedBy, $geoWithin, $geoIntersects queries [#7113](https://github.com/parse-community/parse-server/pull/7113). Thanks to [dplewis](https://github.com/dplewis)
12+
- NEW: Supporting patterns in LiveQuery server's config parameter `classNames` [#7131](https://github.com/parse-community/parse-server/pull/7131). Thanks to [Nes-si](https://github.com/Nes-si)
1013
- IMPROVE: Added new account lockout policy option `accountLockout.unlockOnPasswordReset` to automatically unlock account on password reset. [#7146](https://github.com/parse-community/parse-server/pull/7146). Thanks to [Manuel Trezza](https://github.com/mtrezza).
14+
- IMPROVE: Parse Server will from now on be continuously tested against all relevant MongoDB versions (minor versions). Added MongoDB compatibility table to Parse Server docs. [7161](https://github.com/parse-community/parse-server/pull/7161). Thanks to [Manuel Trezza](https://github.com/mtrezza).
1115
- IMPROVE: Optimize queries on classes with pointer permissions. [#7061](https://github.com/parse-community/parse-server/pull/7061). Thanks to [Pedro Diaz](https://github.com/pdiaz)
1216
- FIX: request.context for afterFind triggers. [#7078](https://github.com/parse-community/parse-server/pull/7078). Thanks to [dblythy](https://github.com/dblythy)
13-
- NEW: Added convenience method Parse.Cloud.sendEmail(...) to send email via email adapter in Cloud Code. [#7089](https://github.com/parse-community/parse-server/pull/7089). Thanks to [dblythy](https://github.com/dblythy)
1417
- FIX: Winston Logger interpolating stdout to console [#7114](https://github.com/parse-community/parse-server/pull/7114). Thanks to [dplewis](https://github.com/dplewis)
15-
- NEW: LiveQuery support for $and, $nor, $containedBy, $geoWithin, $geoIntersects queries [#7113](https://github.com/parse-community/parse-server/pull/7113). Thanks to [dplewis](https://github.com/dplewis)
16-
- NEW: Supporting patterns in LiveQuery server's config parameter `classNames` [#7131](https://github.com/parse-community/parse-server/pull/7131). Thanks to [Nes-si](https://github.com/Nes-si)
1718

1819
### 4.5.0
1920
[Full Changelog](https://github.com/parse-community/parse-server/compare/4.4.0...4.5.0)

CONTRIBUTING.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,11 @@ If your pull request introduces a change that may affect the storage or retrieva
7171
- `it_only_db('postgres')` // will make a test that only runs on postgres
7272
- `it_exclude_dbs(['mongo'])` // will make a test that runs against all DB's but mongo
7373

74+
* If your feature is intended to work with MongoDB and PostgreSQL, you can include or exclude tests more granularly with:
75+
76+
- `it_only_mongodb_version('>=4.4')` // will test with any version of Postgres but only with version >=4.4 of MongoDB; accepts semver notation to specify a version range
77+
- `it_exclude_mongodb_version('<4.4')` // will test with any version of Postgres and MongoDB, excluding version <4.4 of MongoDB; accepts semver notation to specify a version range
78+
7479
#### Run Postgres setup for Parse with Docker
7580

7681
[PostGIS images (select one with v2.2 or higher) on docker dashboard](https://hub.docker.com/r/postgis/postgis) is based off of the official [postgres](https://registry.hub.docker.com/_/postgres/) image and will work out-of-the-box (as long as you create a user with the necessary extensions for each of your Parse databases; see below). To launch the compatible Postgres instance, copy and paste the following line into your shell:

README.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
<p align="center">
2323
<img alt="MongoDB 3.6" src="https://img.shields.io/badge/mongodb-3.6-green.svg?logo=mongodb&style=flat">
2424
<img alt="MongoDB 4.0" src="https://img.shields.io/badge/mongodb-4.0-green.svg?logo=mongodb&style=flat">
25+
<img alt="MongoDB 4.2" src="https://img.shields.io/badge/mongodb-4.2-green.svg?logo=mongodb&style=flat">
26+
<img alt="MongoDB 4.4" src="https://img.shields.io/badge/mongodb-4.4-green.svg?logo=mongodb&style=flat">
2527
</p>
2628

2729
<h2 align="center">Our Sponsors</h2>
@@ -45,6 +47,8 @@ The full documentation for Parse Server is available in the [wiki](https://githu
4547

4648
- [Getting Started](#getting-started)
4749
- [Running Parse Server](#running-parse-server)
50+
- [Compatibility](#compatibility)
51+
- [MongoDB Support](#mongodb-support)
4852
- [Locally](#locally)
4953
- [Docker Container](#docker-container)
5054
- [Saving an Object](#saving-an-object)
@@ -60,7 +64,7 @@ The full documentation for Parse Server is available in the [wiki](https://githu
6064
- [Using Environment Variables](#using-environment-variables)
6165
- [Available Adapters](#available-adapters)
6266
- [Configuring File Adapters](#configuring-file-adapters)
63-
- [Idempodency Enforcement](#idempodency-enforcement)
67+
- [Idempotency Enforcement](#idempotency-enforcement)
6468
- [Localization](#localization)
6569
- [Pages](#pages)
6670
- [Localization with Directory Structure](#localization-with-directory-structure)
@@ -85,7 +89,6 @@ The full documentation for Parse Server is available in the [wiki](https://githu
8589
- [Sponsors](#sponsors)
8690
- [Backers](#backers)
8791

88-
8992
# Getting Started
9093

9194
The fastest and easiest way to get started is to run MongoDB and Parse Server locally.
@@ -98,6 +101,18 @@ Before you start make sure you have installed:
98101
- [MongoDB](https://www.mongodb.com/) or [PostgreSQL](https://www.postgresql.org/)(with [PostGIS](https://postgis.net) 2.2.0 or higher)
99102
- Optionally [Docker](https://www.docker.com/)
100103

104+
### Compatibility
105+
106+
#### MongoDB Support
107+
Parse Server is continuously tested with the most recent releases of MongoDB to ensure compatibility. The rests run against the latest patch version of each MongoDB release. We follow the [MongoDB support schedule](https://www.mongodb.com/support-policy) and only test against versions that are officially supported by MongoDB and have not reached their end-of-life date yet.
108+
109+
| Version | Latest Patch Version | End-of-Life Date | Compatibility |
110+
|-------------|----------------------|------------------|--------------------|
111+
| MongoDB 3.6 | 3.6.21 | April 2021 | ✅ Fully compatible |
112+
| MongoDB 4.0 | 4.0.22 | January 2022 | ✅ Fully compatible |
113+
| MongoDB 4.2 | 4.2.12 | TBD | ✅ Fully compatible |
114+
| MongoDB 4.4 | 4.4.3 | TBD | ✅ Fully compatible |
115+
101116
### Locally
102117
```bash
103118
$ npm install -g parse-server mongodb-runner
@@ -415,7 +430,7 @@ Parse Server allows developers to choose from several options when hosting files
415430

416431
`GridFSBucketAdapter` is used by default and requires no setup, but if you're interested in using S3 or Google Cloud Storage, additional configuration information is available in the [Parse Server guide](http://docs.parseplatform.org/parse-server/guide/#configuring-file-adapters).
417432

418-
## Idempodency Enforcement
433+
## Idempotency Enforcement
419434

420435
**Caution, this is an experimental feature that may not be appropriate for production.**
421436

package-lock.json

Lines changed: 8 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
"ws": "7.4.2"
6262
},
6363
"devDependencies": {
64+
"@actions/core": "1.2.6",
6465
"@babel/cli": "7.10.0",
6566
"@babel/core": "7.10.0",
6667
"@babel/plugin-proposal-object-rest-spread": "7.10.0",
@@ -88,23 +89,33 @@
8889
"jsdoc": "3.6.3",
8990
"jsdoc-babel": "0.5.0",
9091
"lint-staged": "10.2.3",
91-
"mongodb-runner": "mongodb-js/runner",
92+
"mongodb-runner": "4.8.1",
93+
"mongodb-version-list": "1.0.0",
9294
"node-fetch": "2.6.1",
9395
"nyc": "15.1.0",
94-
"prettier": "2.0.5"
96+
"prettier": "2.0.5",
97+
"yaml": "1.10.0"
9598
},
9699
"scripts": {
100+
"ci:check": "node ./resources/checkMongodbVersions.js",
97101
"definitions": "node ./resources/buildConfigDefinitions.js && prettier --write 'src/Options/*.js'",
98102
"docs": "jsdoc -c ./jsdoc-conf.json",
99103
"lint": "flow && eslint --cache ./",
100104
"lint-fix": "eslint --fix --cache ./",
101105
"build": "babel src/ -d lib/ --copy-files",
102106
"watch": "babel --watch src/ -d lib/ --copy-files",
103-
"pretest": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=4.0.4} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} MONGODB_STORAGE_ENGINE=${MONGODB_STORAGE_ENGINE:=mmapv1} mongodb-runner start",
104-
"testonly": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=4.0.4} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} MONGODB_STORAGE_ENGINE=${MONGODB_STORAGE_ENGINE:=mmapv1} TESTING=1 jasmine",
107+
"test:mongodb:runnerstart": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=$npm_config_dbversion} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} MONGODB_STORAGE_ENGINE=${MONGODB_STORAGE_ENGINE:=wiredTiger} mongodb-runner start",
108+
"test:mongodb:testonly": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=$npm_config_dbversion} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} MONGODB_STORAGE_ENGINE=${MONGODB_STORAGE_ENGINE:=wiredTiger} TESTING=1 jasmine",
109+
"test:mongodb": "npm run test:mongodb:runnerstart --dbversion=$npm_config_dbversion && npm run test:mongodb:testonly --dbversion=$npm_config_dbversion",
110+
"test:mongodb:4.0.22": "npm run test:mongodb --dbversion=4.0.22",
111+
"test:mongodb:4.2.12": "npm run test:mongodb --dbversion=4.2.12",
112+
"test:mongodb:4.4.3": "npm run test:mongodb --dbversion=4.4.3",
113+
"posttest:mongodb": "mongodb-runner stop",
114+
"pretest": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=4.4.3} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} MONGODB_STORAGE_ENGINE=${MONGODB_STORAGE_ENGINE:=wiredTiger} mongodb-runner start",
115+
"testonly": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=4.4.3} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} MONGODB_STORAGE_ENGINE=${MONGODB_STORAGE_ENGINE:=wiredTiger} TESTING=1 jasmine",
105116
"test": "npm run testonly",
106-
"posttest": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=4.0.4} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} MONGODB_STORAGE_ENGINE=${MONGODB_STORAGE_ENGINE:=mmapv1} mongodb-runner stop",
107-
"coverage": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=4.0.4} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} MONGODB_STORAGE_ENGINE=${MONGODB_STORAGE_ENGINE:=mmapv1} TESTING=1 nyc jasmine",
117+
"posttest": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=4.4.3} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} MONGODB_STORAGE_ENGINE=${MONGODB_STORAGE_ENGINE:=wiredTiger} mongodb-runner stop",
118+
"coverage": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=4.4.3} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} MONGODB_STORAGE_ENGINE=${MONGODB_STORAGE_ENGINE:=wiredTiger} TESTING=1 nyc jasmine",
108119
"start": "node ./bin/parse-server",
109120
"prettier": "prettier --write '{src,spec}/{**/*,*}.js'",
110121
"prepare": "npm run build",

0 commit comments

Comments
 (0)