Skip to content

Commit af57644

Browse files
authored
Merge branch 'master' into asyncOptions
2 parents 6dd18fd + a649a9e commit af57644

30 files changed

+1832
-681
lines changed

.github/workflows/ci.yml

Lines changed: 37 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -37,36 +37,46 @@ jobs:
3737
matrix:
3838
include:
3939
- name: Mongo 4.4, ReplicaSet, WiredTiger
40-
MONGODB_VERSION: 4.4.3
40+
MONGODB_VERSION: 4.4.4
4141
MONGODB_TOPOLOGY: replicaset
4242
MONGODB_STORAGE_ENGINE: wiredTiger
43-
NODE_VERSION: 10
43+
NODE_VERSION: 14.15.5
4444
- name: Mongo 4.2, ReplicaSet, WiredTiger
4545
MONGODB_VERSION: 4.2.12
4646
MONGODB_TOPOLOGY: replicaset
4747
MONGODB_STORAGE_ENGINE: wiredTiger
48-
NODE_VERSION: 10
48+
NODE_VERSION: 14.15.5
4949
- name: Mongo 4.0, ReplicaSet, WiredTiger
50-
MONGODB_VERSION: 4.0.22
50+
MONGODB_VERSION: 4.0.23
5151
MONGODB_TOPOLOGY: replicaset
5252
MONGODB_STORAGE_ENGINE: wiredTiger
53-
NODE_VERSION: 10
53+
NODE_VERSION: 14.15.5
5454
- name: Mongo 3.6, Standalone, MMAPv1
5555
MONGODB_VERSION: 3.6.22
5656
MONGODB_TOPOLOGY: standalone
5757
MONGODB_STORAGE_ENGINE: mmapv1
58-
NODE_VERSION: 10
58+
NODE_VERSION: 14.15.5
5959
- name: Redis Cache
6060
PARSE_SERVER_TEST_CACHE: redis
61-
MONGODB_VERSION: 4.4.3
61+
MONGODB_VERSION: 4.4.4
6262
MONGODB_TOPOLOGY: standalone
6363
MONGODB_STORAGE_ENGINE: wiredTiger
64-
NODE_VERSION: 10
65-
- name: Node 12.20
66-
MONGODB_VERSION: 4.4.3
64+
NODE_VERSION: 14.15.5
65+
- name: Node 10
66+
MONGODB_VERSION: 4.4.4
6767
MONGODB_TOPOLOGY: standalone
6868
MONGODB_STORAGE_ENGINE: wiredTiger
69-
NODE_VERSION: 12.20.1
69+
NODE_VERSION: 10.23.3
70+
- name: Node 12
71+
MONGODB_VERSION: 4.4.4
72+
MONGODB_TOPOLOGY: standalone
73+
MONGODB_STORAGE_ENGINE: wiredTiger
74+
NODE_VERSION: 12.20.2
75+
- name: Node 15
76+
MONGODB_VERSION: 4.4.4
77+
MONGODB_TOPOLOGY: standalone
78+
MONGODB_STORAGE_ENGINE: wiredTiger
79+
NODE_VERSION: 15.9.0
7080
name: ${{ matrix.name }}
7181
timeout-minutes: 30
7282
runs-on: ubuntu-18.04
@@ -104,7 +114,20 @@ jobs:
104114
CI: true
105115
- run: bash <(curl -s https://codecov.io/bash)
106116
check-postgres:
107-
name: Postgresql
117+
strategy:
118+
matrix:
119+
include:
120+
- name: Postgres 10, Postgis 3.1
121+
POSTGRES_IMAGE: postgis/postgis:10-3.1
122+
- name: Postgres 11, Postgis 3.1
123+
POSTGRES_IMAGE: postgis/postgis:11-3.1
124+
- name: Postgres 12, Postgis 3.1
125+
POSTGRES_IMAGE: postgis/postgis:12-3.1
126+
- name: Postgres 12, Postgis 3.0
127+
POSTGRES_IMAGE: postgis/postgis:12-3.0
128+
- name: Postgres 13, Postgis 3.1
129+
POSTGRES_IMAGE: postgis/postgis:13-3.1
130+
name: ${{ matrix.name }}
108131
timeout-minutes: 30
109132
runs-on: ubuntu-18.04
110133
services:
@@ -113,7 +136,7 @@ jobs:
113136
ports:
114137
- 6379:6379
115138
postgres:
116-
image: postgis/postgis:11-3.0
139+
image: ${{ matrix.POSTGRES_IMAGE }}
117140
env:
118141
POSTGRES_PASSWORD: postgres
119142
ports:
@@ -125,7 +148,6 @@ jobs:
125148
--health-retries 5
126149
env:
127150
PARSE_SERVER_TEST_DB: postgres
128-
POSTGRES_MAJOR_VERSION: 11
129151
PARSE_SERVER_TEST_DATABASE_URI: postgres://postgres:postgres@localhost:5432/parse_server_postgres_adapter_test_database
130152
steps:
131153
- uses: actions/checkout@v2
@@ -146,4 +168,4 @@ jobs:
146168
- run: npm run coverage
147169
env:
148170
CI: true
149-
- run: bash <(curl -s https://codecov.io/bash)
171+
- run: bash <(curl -s https://codecov.io/bash)

CHANGELOG.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11
## Parse Server Changelog
2+
<!--
3+
Please make sure you add your feature at the bottom of the associated group.
4+
Groups should be ordered:
5+
- NEW (EXPERIMENTAL)
6+
- NEW
7+
- IMPROVE
8+
- FIX
9+
Thanks for contributing to Parse Server!
10+
-->
211

312
### master
413
[Full Changelog](https://github.com/parse-community/parse-server/compare/4.5.0...master)
@@ -11,9 +20,15 @@ ___
1120
- 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)
1221
- 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)
1322
- 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)
23+
- NEW: `requireAnyUserRoles` and `requireAllUserRoles` for Parse Cloud validator. [#7097](https://github.com/parse-community/parse-server/pull/7097). Thanks to [dblythy](https://github.com/dblythy)
24+
- IMPROVE: Retry transactions on MongoDB when it fails due to transient error [#7187](https://github.com/parse-community/parse-server/pull/7187). Thanks to [Antonio Davi Macedo Coelho de Castro](https://github.com/davimacedo).
25+
- IMPROVE: Bump tests to use Mongo 4.4.4 [#7184](https://github.com/parse-community/parse-server/pull/7184). Thanks to [Antonio Davi Macedo Coelho de Castro](https://github.com/davimacedo).
1426
- 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).
15-
- 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).
27+
- IMPROVE: Parse Server is from now on continuously tested against all recent MongoDB versions that have not reached their end-of-life support date. 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).
28+
- IMPROVE: Parse Server is from now on continuously tested against all recent Node.js versions that have not reached their end-of-life support date. [7161](https://github.com/parse-community/parse-server/pull/7177). Thanks to [Manuel Trezza](https://github.com/mtrezza).
1629
- 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)
30+
- IMPROVE: Parse Server will from now on be continuously tested against all relevant Postgres versions (minor versions). Added Postgres compatibility table to Parse Server docs. [#7176](https://github.com/parse-community/parse-server/pull/7176). Thanks to [Corey Baker](https://github.com/cbaker6).
31+
- FIX: Fix error when a not yet inserted job is updated [#7196](https://github.com/parse-community/parse-server/pull/7196). Thanks to [Antonio Davi Macedo Coelho de Castro](https://github.com/davimacedo).
1732
- FIX: request.context for afterFind triggers. [#7078](https://github.com/parse-community/parse-server/pull/7078). Thanks to [dblythy](https://github.com/dblythy)
1833
- FIX: Winston Logger interpolating stdout to console [#7114](https://github.com/parse-community/parse-server/pull/7114). Thanks to [dplewis](https://github.com/dplewis)
1934

CONTRIBUTING.md

Lines changed: 66 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,65 @@
1-
# Contributing to Parse Server
1+
# Contributing to Parse Server <!-- omit in toc -->
22

3-
We really want Parse to be yours, to see it grow and thrive in the open source community.
3+
## Table of Contents <!-- omit in toc -->
4+
- [Contributing](#contributing)
5+
- [Why Contributing?](#why-contributing)
6+
- [Environment Setup](#environment-setup)
7+
- [Recommended Tools](#recommended-tools)
8+
- [Setting up your local machine](#setting-up-your-local-machine)
9+
- [Good to Know](#good-to-know)
10+
- [Troubleshooting](#troubleshooting)
11+
- [Please Do's](#please-dos)
12+
- [Test against Postgres](#test-against-postgres)
13+
- [Postgres with Docker](#postgres-with-docker)
14+
- [Feature Considerations](#feature-considerations)
15+
- [Security Checks](#security-checks)
16+
- [Parse Error](#parse-error)
17+
- [Parse Server Configuration](#parse-server-configuration)
18+
- [Code of Conduct](#code-of-conduct)
419

5-
If you are not familiar with Pull Requests and want to know more about them, you can visit the [Creating a pull request](https://help.github.com/articles/creating-a-pull-request/) article. It contains detailed informations about the process.
20+
## Contributing
621

7-
## Setting up the project for debugging and contributing:
22+
Before you start to code, please open a [new issue](https://github.com/parse-community/parse-server/issues/new/choose) to describe your idea, or search for and continue the discussion in an [existing issue](https://github.com/parse-community/parse-server/issues).
823

9-
### Recommended setup:
24+
> ⚠️ Please do not post a security vulnerability on GitHub or in the Parse Community Forum. Instead, follow the [Parse Community Security Policy](https://github.com/parse-community/parse-server/security/policy).
25+
26+
Please completely fill out any templates to provide essential information about your new feature or the bug you discovered.
27+
28+
Together we will plan out the best conceptual approach for your contribution, so that your and our time is invested in the best possible approach. The discussion often reveals how to leverage existing features of Parse Server to reach your goal with even less effort and in a more sustainable way.
29+
30+
When you are ready to code, you can find more information about opening a pull request in the [GitHub docs](https://help.github.com/articles/creating-a-pull-request/).
31+
32+
Whether this is your first contribution or you are already an experienced contributor, the Parse Community has your back – don't hesitate to ask for help!
33+
34+
## Why Contributing?
35+
36+
Buy cheap, buy twice. What? No, this is not the Economics 101 class, but the same is true for contributing.
37+
38+
There are two ways of writing a feature or fixing a bug. Sometimes the quick solution is to just write a Cloud Code function that does what you want. Contributing by making the change directly in Parse Server may take a bit longer, but it actually saves you much more time in the long run.
39+
40+
Consider the benefits you get:
41+
42+
- #### 🚀 Higher efficiency
43+
Your code is examined for efficiency and interoperability with existing features by the community.
44+
- #### 🛡 Stronger security
45+
Your code is scrutinized for bugs and vulnerabilities and automated checks help to identify security issues that may arise in the future.
46+
- #### 🧬 Continuous improvement
47+
If your feature is used by others it is likely to be continuously improved and extended by the community.
48+
- #### 💝 Giving back
49+
You give back to the community that contributed to make the Parse Platform become what it is today and for future developers to come.
50+
- #### 🧑‍🎓 Improving yourself
51+
You learn to better understand the inner workings of Parse Server, which will help you to write more efficient and resilient code for your own application.
52+
53+
Most importantly, with every contribution you improve your skills so that future contributions take even less time and you get all the benefits above for free — easy choice, right?
54+
55+
## Environment Setup
56+
57+
### Recommended Tools
1058

1159
* [vscode](https://code.visualstudio.com), the popular IDE.
1260
* [Jasmine Test Explorer](https://marketplace.visualstudio.com/items?itemName=hbenl.vscode-jasmine-test-adapter), a very practical test exploration plugin which let you run, debug and see the test results inline.
1361

14-
### Setting up you local machine:
62+
### Setting up your local machine
1563

1664
* [Fork](https://github.com/parse-community/parse-server) this project and clone the fork on your local machine:
1765

@@ -27,13 +75,15 @@ $ npm run watch # run babel watching for local file changes
2775
2876
Once you have babel running in watch mode, you can start making changes to parse-server.
2977

30-
### Good to know:
78+
### Good to Know
3179

32-
* The `lib/` folder is not commited, so never make changes in there.
80+
* The `lib/` folder is not committed, so never make changes in there.
3381
* Always make changes to files in the `src/` folder.
3482
* All the tests should point to sources in the `lib/` folder.
83+
* The `lib/` folder is produced by `babel` using either the `npm run build`, `npm run watch`, or the `npm run prepare` step.
84+
* The `npm run prepare` step is automatically invoked when your package depends on forked parse-server installed via git for example using `npm install --save git+https://github.com/[username]/parse-server#[branch/commit]`.
3585

36-
### Troubleshooting:
86+
### Troubleshooting
3787

3888
*Question*: I modify the code in the src folder but it doesn't seem to have any effect.<br/>
3989
*Answer*: Check that `npm run watch` is running
@@ -42,7 +92,10 @@ Once you have babel running in watch mode, you can start making changes to parse
4292
*Answer*: The easiest way is to install [Jasmine Test Explorer](https://marketplace.visualstudio.com/items?itemName=hbenl.vscode-test-explorer), it will let you run selectively tests and debug them.
4393

4494
*Question*: How do I deploy my forked version on my servers?<br/>
45-
*Answer*: In your `package.json`, update the `parse-server` dependency to `https://github.com/MY_USERNAME/parse-server#MY_FEATURE`. Run `npm install`, commit the changes and deploy to your servers.
95+
*Answer*: In your `package.json`, update the `parse-server` dependency to `https://github.com/[username]/parse-server#[branch/commit]`. Run `npm install`, commit the changes and deploy to your servers.
96+
97+
*Question*: How do I deploy my forked version using docker?<br/>
98+
*Answer*: In your `package.json`, update the `parse-server` dependency to `https://github.com/[username]/parse-server#[branch/commit]`. Make sure the `npm install` step in your `Dockerfile` is running under non-privileged user for the ``npm run prepare`` step to work correctly. For official node images from hub.docker.com that non-privileged user is `node` with `/home/node` working directory.
4699

47100

48101
### Please Do's
@@ -53,8 +106,9 @@ Once you have babel running in watch mode, you can start making changes to parse
53106
* Run the tests for the whole project to make sure the code passes all tests. This can be done by running the test command for a single file but removing the test file argument. The results can be seen at *<PROJECT_ROOT>/coverage/lcov-report/index.html*.
54107
* Lint your code by running `npm run lint` to make sure the code is not going to be rejected by the CI.
55108
* **Do not** publish the *lib* folder.
109+
* Please consider if any changes to the [docs](http://docs.parseplatform.org) are needed or add additional sections in the case of an enhancement or feature.
56110

57-
### Run your tests against Postgres (optional)
111+
### Test against Postgres
58112

59113
If your pull request introduces a change that may affect the storage or retrieval of objects, you may want to make sure it plays nice with Postgres.
60114

@@ -76,7 +130,7 @@ If your pull request introduces a change that may affect the storage or retrieva
76130
- `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
77131
- `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
78132

79-
#### Run Postgres setup for Parse with Docker
133+
#### Postgres with Docker
80134

81135
[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:
82136

0 commit comments

Comments
 (0)