Skip to content

Commit 9ed0134

Browse files
committed
Merge branch 'parse-upstream'
2 parents 7933468 + 9e71999 commit 9ed0134

34 files changed

+1369
-1110
lines changed

.babelrc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
["@babel/preset-env", {
88
"targets": {
99
"node": "12"
10-
},
11-
"exclude": ["proposal-dynamic-import"]
10+
}
1211
}]
1312
],
1413
"sourceMaps": "inline"

.github/workflows/ci.yml

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
branches:
77
- '**'
88
env:
9-
NODE_VERSION: 14.18.1
9+
NODE_VERSION: 16.13.0
1010
PARSE_SERVER_TEST_TIMEOUT: 20000
1111
jobs:
1212
check-ci:
@@ -105,43 +105,43 @@ jobs:
105105
MONGODB_VERSION: 5.0.3
106106
MONGODB_TOPOLOGY: replicaset
107107
MONGODB_STORAGE_ENGINE: wiredTiger
108-
NODE_VERSION: 14.18.1
108+
NODE_VERSION: 16.13.0
109109
- name: MongoDB 4.4, ReplicaSet, WiredTiger
110110
MONGODB_VERSION: 4.4.10
111111
MONGODB_TOPOLOGY: replicaset
112112
MONGODB_STORAGE_ENGINE: wiredTiger
113-
NODE_VERSION: 14.18.1
113+
NODE_VERSION: 16.13.0
114114
- name: MongoDB 4.2, ReplicaSet, WiredTiger
115115
MONGODB_VERSION: 4.2.17
116116
MONGODB_TOPOLOGY: replicaset
117117
MONGODB_STORAGE_ENGINE: wiredTiger
118-
NODE_VERSION: 14.18.1
118+
NODE_VERSION: 16.13.0
119119
- name: MongoDB 4.0, ReplicaSet, WiredTiger
120120
MONGODB_VERSION: 4.0.27
121121
MONGODB_TOPOLOGY: replicaset
122122
MONGODB_STORAGE_ENGINE: wiredTiger
123-
NODE_VERSION: 14.18.1
123+
NODE_VERSION: 16.13.0
124124
- name: MongoDB 4.0, Standalone, MMAPv1
125125
MONGODB_VERSION: 4.0.27
126126
MONGODB_TOPOLOGY: standalone
127127
MONGODB_STORAGE_ENGINE: mmapv1
128-
NODE_VERSION: 14.18.1
128+
NODE_VERSION: 16.13.0
129129
- name: Redis Cache
130130
PARSE_SERVER_TEST_CACHE: redis
131131
MONGODB_VERSION: 4.4.10
132132
MONGODB_TOPOLOGY: standalone
133133
MONGODB_STORAGE_ENGINE: wiredTiger
134-
NODE_VERSION: 14.18.1
134+
NODE_VERSION: 16.13.0
135135
- name: Node 12
136136
MONGODB_VERSION: 4.4.10
137137
MONGODB_TOPOLOGY: standalone
138138
MONGODB_STORAGE_ENGINE: wiredTiger
139139
NODE_VERSION: 12.22.7
140-
- name: Node 15
140+
- name: Node 14
141141
MONGODB_VERSION: 4.4.10
142142
MONGODB_TOPOLOGY: standalone
143143
MONGODB_STORAGE_ENGINE: wiredTiger
144-
NODE_VERSION: 15.14.0
144+
NODE_VERSION: 14.18.1
145145
fail-fast: false
146146
name: ${{ matrix.name }}
147147
timeout-minutes: 15
@@ -183,19 +183,22 @@ jobs:
183183
include:
184184
- name: PostgreSQL 11, PostGIS 3.0
185185
POSTGRES_IMAGE: postgis/postgis:11-3.0
186-
NODE_VERSION: 14.18.1
186+
NODE_VERSION: 16.13.0
187187
- name: PostgreSQL 11, PostGIS 3.1
188188
POSTGRES_IMAGE: postgis/postgis:11-3.1
189-
NODE_VERSION: 14.18.1
190-
- name: PostgreSQL 12, PostGIS 3.1
191-
POSTGRES_IMAGE: postgis/postgis:12-3.1
192-
NODE_VERSION: 14.18.1
193-
- name: PostgreSQL 13, PostGIS 3.1
194-
POSTGRES_IMAGE: postgis/postgis:13-3.1
195-
NODE_VERSION: 14.18.1
196-
- name: PostgreSQL 14, PostGIS 3.1
197-
POSTGRES_IMAGE: postgis/postgis:14-3.1
198-
NODE_VERSION: 14.18.1
189+
NODE_VERSION: 16.13.0
190+
- name: PostgreSQL 11, PostGIS 3.2
191+
POSTGRES_IMAGE: postgis/postgis:11-3.2
192+
NODE_VERSION: 16.13.0
193+
- name: PostgreSQL 12, PostGIS 3.2
194+
POSTGRES_IMAGE: postgis/postgis:12-3.2
195+
NODE_VERSION: 16.13.0
196+
- name: PostgreSQL 13, PostGIS 3.2
197+
POSTGRES_IMAGE: postgis/postgis:13-3.2
198+
NODE_VERSION: 16.13.0
199+
- name: PostgreSQL 14, PostGIS 3.2
200+
POSTGRES_IMAGE: postgis/postgis:14-3.2
201+
NODE_VERSION: 16.13.0
199202
fail-fast: false
200203
name: ${{ matrix.name }}
201204
timeout-minutes: 15

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,15 +154,15 @@ If your pull request introduces a change that may affect the storage or retrieva
154154
[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:
155155

156156
```
157-
docker run -d --name parse-postgres -p 5432:5432 -e POSTGRES_PASSWORD=password --rm postgis/postgis:13-3.1-alpine && sleep 20 && docker exec -it parse-postgres psql -U postgres -c 'CREATE DATABASE parse_server_postgres_adapter_test_database;' && docker exec -it parse-postgres psql -U postgres -c 'CREATE EXTENSION pgcrypto; CREATE EXTENSION postgis;' -d parse_server_postgres_adapter_test_database && docker exec -it parse-postgres psql -U postgres -c 'CREATE EXTENSION postgis_topology;' -d parse_server_postgres_adapter_test_database
157+
docker run -d --name parse-postgres -p 5432:5432 -e POSTGRES_PASSWORD=password --rm postgis/postgis:13-3.2-alpine && sleep 20 && docker exec -it parse-postgres psql -U postgres -c 'CREATE DATABASE parse_server_postgres_adapter_test_database;' && docker exec -it parse-postgres psql -U postgres -c 'CREATE EXTENSION pgcrypto; CREATE EXTENSION postgis;' -d parse_server_postgres_adapter_test_database && docker exec -it parse-postgres psql -U postgres -c 'CREATE EXTENSION postgis_topology;' -d parse_server_postgres_adapter_test_database
158158
```
159159
To stop the Postgres instance:
160160

161161
```
162162
docker stop parse-postgres
163163
```
164164

165-
You can also use the [postgis/postgis:13-3.1-alpine](https://hub.docker.com/r/postgis/postgis) image in a Dockerfile and copy this [script](https://github.com/parse-community/parse-server/blob/master/scripts/before_script_postgres.sh) to the image by adding the following lines:
165+
You can also use the [postgis/postgis:13-3.2-alpine](https://hub.docker.com/r/postgis/postgis) image in a Dockerfile and copy this [script](https://github.com/parse-community/parse-server/blob/master/scripts/before_script_postgres.sh) to the image by adding the following lines:
166166

167167
```
168168
#Install additional scripts. These are run in abc order during initial start

README.md

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
[![Coverage](https://img.shields.io/codecov/c/github/parse-community/parse-server/alpha.svg)](https://codecov.io/github/parse-community/parse-server?branch=alpha)
1212
[![auto-release](https://img.shields.io/badge/%F0%9F%9A%80-auto--release-9e34eb.svg)](https://github.com/parse-community/parse-dashboard/releases)
1313

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

@@ -120,8 +120,8 @@ Parse Server is continuously tested with the most recent releases of Node.js to
120120
| ---------- | -------------- | ----------- | ------------ |
121121
| Node.js 12 | 12.22.7 | April 2022 | ✅ Yes |
122122
| Node.js 14 | 14.18.1 | April 2023 | ✅ Yes |
123-
| Node.js 15 | 15.14.0 | June 2021 | ✅ Yes |
124-
| Node.js 16 | 16.x.x | April 2024 | ❌ Not tested |
123+
| Node.js 16 | 16.13.0 | April 2024 | ✅ Yes |
124+
| Node.js 17 | 17.x | June 2022 | ❌ Not tested |
125125

126126
#### MongoDB
127127
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 only test against versions that are officially supported and have not reached their end-of-life date.
@@ -138,10 +138,10 @@ Parse Server is continuously tested with the most recent releases of PostgreSQL
138138

139139
| Version | PostGIS Version | End-of-Life | Parse Server Support End | Compatible |
140140
| ----------- | --------------- | ------------- | ------------------------ | ---------- |
141-
| Postgres 11 | 3.0, 3.1 | November 2023 | April 2022 | ✅ Yes |
142-
| Postgres 12 | 3.1 | November 2024 | April 2023 | ✅ Yes |
143-
| Postgres 13 | 3.1 | November 2025 | April 2024 | ✅ Yes |
144-
| Postgres 14 | 3.1 | November 2026 | April 2025 | ✅ Yes |
141+
| Postgres 11 | 3.0, 3.1, 3.2 | November 2023 | April 2022 | ✅ Yes |
142+
| Postgres 12 | 3.2 | November 2024 | April 2023 | ✅ Yes |
143+
| Postgres 13 | 3.2 | November 2025 | April 2024 | ✅ Yes |
144+
| Postgres 14 | 3.2 | November 2026 | April 2025 | ✅ Yes |
145145

146146
### Locally
147147
```bash
@@ -529,9 +529,26 @@ let api = new ParseServer({
529529
| `idempotencyOptions.paths` | yes | `Array<String>` | `[]` | `.*` (all paths, includes the examples below), <br>`functions/.*` (all functions), <br>`jobs/.*` (all jobs), <br>`classes/.*` (all classes), <br>`functions/.*` (all functions), <br>`users` (user creation / update), <br>`installations` (installation creation / update) | PARSE_SERVER_EXPERIMENTAL_IDEMPOTENCY_PATHS | An array of path patterns that have to match the request path for request deduplication to be enabled. The mount path must not be included, for example to match the request path `/parse/functions/myFunction` specify the path pattern `functions/myFunction`. A trailing slash of the request path is ignored, for example the path pattern `functions/myFunction` matches both `/parse/functions/myFunction` and `/parse/functions/myFunction/`. |
530530
| `idempotencyOptions.ttl` | yes | `Integer` | `300` | `60` (60 seconds) | PARSE_SERVER_EXPERIMENTAL_IDEMPOTENCY_TTL | The duration in seconds after which a request record is discarded from the database. Duplicate requests due to network issues can be expected to arrive within milliseconds up to several seconds. This value must be greater than `0`. |
531531
532-
### Notes <!-- omit in toc -->
532+
### Postgres <!-- omit in toc -->
533+
534+
To use this feature in Postgres, you will need to create a cron job using [pgAdmin](https://www.pgadmin.org/docs/pgadmin4/development/pgagent_jobs.html) or similar to call the Postgres function `idempotency_delete_expired_records()` that deletes expired idempotency records. You can find an example script below. Make sure the script has the same privileges to log into Postgres as Parse Server.
535+
536+
```bash
537+
#!/bin/bash
538+
539+
set -e
540+
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
541+
SELECT idempotency_delete_expired_records();
542+
EOSQL
533543
534-
- This feature is currently only available for MongoDB and not for Postgres.
544+
exec "$@"
545+
```
546+
547+
Assuming the script above is named, `parse_idempotency_delete_expired_records.sh`, a cron job that runs the script every 2 minutes may look like:
548+
549+
```bash
550+
2 * * * * /root/parse_idempotency_delete_expired_records.sh >/dev/null 2>&1
551+
```
535552
536553
## Localization
537554

changelogs/CHANGELOG_alpha.md

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,85 @@
1+
# [5.0.0-alpha.16](https://github.com/parse-community/parse-server/compare/5.0.0-alpha.15...5.0.0-alpha.16) (2022-01-02)
2+
3+
4+
### Features
5+
6+
* add Idempotency to Postgres ([#7750](https://github.com/parse-community/parse-server/issues/7750)) ([0c3feaa](https://github.com/parse-community/parse-server/commit/0c3feaaa1751964c0db89f25674935c3354b1538))
7+
8+
# [5.0.0-alpha.15](https://github.com/parse-community/parse-server/compare/5.0.0-alpha.14...5.0.0-alpha.15) (2022-01-02)
9+
10+
11+
### Features
12+
13+
* support `postgresql` protocol in database URI ([#7757](https://github.com/parse-community/parse-server/issues/7757)) ([caf4a23](https://github.com/parse-community/parse-server/commit/caf4a2341f554b28e3918c53e7e897a3ca47bf8b))
14+
15+
# [5.0.0-alpha.14](https://github.com/parse-community/parse-server/compare/5.0.0-alpha.13...5.0.0-alpha.14) (2022-01-02)
16+
17+
18+
### Features
19+
20+
* support relativeTime query constraint on Postgres ([#7747](https://github.com/parse-community/parse-server/issues/7747)) ([16b1b2a](https://github.com/parse-community/parse-server/commit/16b1b2a19714535ca805f2dbb3b561d8f6a519a7))
21+
22+
# [5.0.0-alpha.13](https://github.com/parse-community/parse-server/compare/5.0.0-alpha.12...5.0.0-alpha.13) (2021-12-08)
23+
24+
25+
### Bug Fixes
26+
27+
* node engine compatibility did not include node 16 ([#7739](https://github.com/parse-community/parse-server/issues/7739)) ([ea7c014](https://github.com/parse-community/parse-server/commit/ea7c01400f992a1263543706fe49b6174758a2d6))
28+
29+
# [5.0.0-alpha.12](https://github.com/parse-community/parse-server/compare/5.0.0-alpha.11...5.0.0-alpha.12) (2021-12-06)
30+
31+
32+
### Bug Fixes
33+
34+
* adding or modifying a nested property requires addField permissions ([#7679](https://github.com/parse-community/parse-server/issues/7679)) ([6a6248b](https://github.com/parse-community/parse-server/commit/6a6248b6cb2e732d17131e18e659943b894ed2f1))
35+
36+
# [5.0.0-alpha.11](https://github.com/parse-community/parse-server/compare/5.0.0-alpha.10...5.0.0-alpha.11) (2021-11-29)
37+
38+
39+
### Bug Fixes
40+
41+
* upgrade mime from 2.5.2 to 3.0.0 ([#7725](https://github.com/parse-community/parse-server/issues/7725)) ([f5ef98b](https://github.com/parse-community/parse-server/commit/f5ef98bde32083403c0e30a12162fcc1e52cac37))
42+
43+
# [5.0.0-alpha.10](https://github.com/parse-community/parse-server/compare/5.0.0-alpha.9...5.0.0-alpha.10) (2021-11-29)
44+
45+
46+
### Bug Fixes
47+
48+
* upgrade parse from 3.3.1 to 3.4.0 ([#7723](https://github.com/parse-community/parse-server/issues/7723)) ([d4c1f47](https://github.com/parse-community/parse-server/commit/d4c1f473073764cb0570c633fc4a30669c2ce889))
49+
50+
# [5.0.0-alpha.9](https://github.com/parse-community/parse-server/compare/5.0.0-alpha.8...5.0.0-alpha.9) (2021-11-27)
51+
52+
53+
### Bug Fixes
54+
55+
* unable to use objectId size higher than 19 on GraphQL API ([#7627](https://github.com/parse-community/parse-server/issues/7627)) ([ed86c80](https://github.com/parse-community/parse-server/commit/ed86c807721cc52a1a5a9dea0b768717eec269ed))
56+
57+
# [5.0.0-alpha.8](https://github.com/parse-community/parse-server/compare/5.0.0-alpha.7...5.0.0-alpha.8) (2021-11-18)
58+
59+
60+
### Features
61+
62+
* add support for Node 16 ([#7707](https://github.com/parse-community/parse-server/issues/7707)) ([45cc58c](https://github.com/parse-community/parse-server/commit/45cc58c7e5e640a46c5d508019a3aa81242964b1))
63+
64+
65+
### BREAKING CHANGES
66+
67+
* Removes official Node 15 support which has reached it end-of-life date. ([45cc58c](45cc58c))
68+
69+
# [5.0.0-alpha.7](https://github.com/parse-community/parse-server/compare/5.0.0-alpha.6...5.0.0-alpha.7) (2021-11-12)
70+
71+
72+
### Bug Fixes
73+
74+
* node engine range has no upper limit to exclude incompatible node versions ([#7692](https://github.com/parse-community/parse-server/issues/7692)) ([573558d](https://github.com/parse-community/parse-server/commit/573558d3adcbcc6222c92003829867e1a73eef94))
75+
76+
# [5.0.0-alpha.6](https://github.com/parse-community/parse-server/compare/5.0.0-alpha.5...5.0.0-alpha.6) (2021-11-10)
77+
78+
79+
### Reverts
80+
81+
* refactor: allow ES import for cloud string if package type is module ([b64640c](https://github.com/parse-community/parse-server/commit/b64640c5705f733798783e68d216e957044ef23c))
82+
183
# [5.0.0-alpha.5](https://github.com/parse-community/parse-server/compare/5.0.0-alpha.4...5.0.0-alpha.5) (2021-11-01)
284

385

ci/ciCheck.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
'use strict'
1+
'use strict';
22

33
const CiVersionCheck = require('./CiVersionCheck');
44
const mongoVersionList = require('mongodb-version-list');
@@ -14,9 +14,8 @@ async function check() {
1414
* Check the MongoDB versions used in test environments.
1515
*/
1616
async function checkMongoDbVersions() {
17-
1817
const releasedVersions = await new Promise((resolve, reject) => {
19-
mongoVersionList(function(error, versions) {
18+
mongoVersionList(function (error, versions) {
2019
if (error) {
2120
reject(error);
2221
}
@@ -47,7 +46,6 @@ async function checkMongoDbVersions() {
4746
* Check the Nodejs versions used in test environments.
4847
*/
4948
async function checkNodeVersions() {
50-
5149
const allVersions = await allNodeVersions();
5250
const releasedVersions = allVersions.versions;
5351

@@ -62,7 +60,8 @@ async function checkNodeVersions() {
6260
ignoreReleasedVersions: [
6361
'<12.0.0', // These versions have reached their end-of-life support date
6462
'>=13.0.0 <14.0.0', // These versions have reached their end-of-life support date
65-
'>=16.0.0', // This version has not been officially released yet
63+
'>=15.0.0 <16.0.0', // These versions have reached their end-of-life support date
64+
'>=17.0.0', // These versions are not officially supported yet
6665
],
6766
}).check();
6867
}

0 commit comments

Comments
 (0)