Skip to content

Commit 5f9f98b

Browse files
authored
Merge branch 'alpha' into snyk-upgrade-88be3eb02ce6725e515b875a3de97add
2 parents d46c8fc + 410a1c7 commit 5f9f98b

20 files changed

+763
-444
lines changed

.github/workflows/ci.yml

+9-6
Original file line numberDiff line numberDiff line change
@@ -187,14 +187,17 @@ jobs:
187187
- name: PostgreSQL 11, PostGIS 3.1
188188
POSTGRES_IMAGE: postgis/postgis:11-3.1
189189
NODE_VERSION: 16.13.0
190-
- name: PostgreSQL 12, PostGIS 3.1
191-
POSTGRES_IMAGE: postgis/postgis:12-3.1
190+
- name: PostgreSQL 11, PostGIS 3.2
191+
POSTGRES_IMAGE: postgis/postgis:11-3.2
192192
NODE_VERSION: 16.13.0
193-
- name: PostgreSQL 13, PostGIS 3.1
194-
POSTGRES_IMAGE: postgis/postgis:13-3.1
193+
- name: PostgreSQL 12, PostGIS 3.2
194+
POSTGRES_IMAGE: postgis/postgis:12-3.2
195195
NODE_VERSION: 16.13.0
196-
- name: PostgreSQL 14, PostGIS 3.1
197-
POSTGRES_IMAGE: postgis/postgis:14-3.1
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
198201
NODE_VERSION: 16.13.0
199202
fail-fast: false
200203
name: ${{ matrix.name }}

CONTRIBUTING.md

+2-2
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

+23-6
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,10 @@ Parse Server is continuously tested with the most recent releases of PostgreSQL
134134

135135
| Version | PostGIS Version | End-of-Life | Parse Server Support End | Compatible |
136136
|-------------|-----------------|---------------|--------------------------|------------|
137-
| Postgres 11 | 3.0, 3.1 | November 2023 | April 2022 | ✅ Yes |
138-
| Postgres 12 | 3.1 | November 2024 | April 2023 | ✅ Yes |
139-
| Postgres 13 | 3.1 | November 2025 | April 2024 | ✅ Yes |
140-
| Postgres 14 | 3.1 | November 2026 | April 2025 | ✅ Yes |
137+
| Postgres 11 | 3.0, 3.1, 3.2 | November 2023 | April 2022 | ✅ Yes |
138+
| Postgres 12 | 3.2 | November 2024 | April 2023 | ✅ Yes |
139+
| Postgres 13 | 3.2 | November 2025 | April 2024 | ✅ Yes |
140+
| Postgres 14 | 3.2 | November 2026 | April 2025 | ✅ Yes |
141141

142142
### Locally
143143
```bash
@@ -525,9 +525,26 @@ let api = new ParseServer({
525525
| `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/`. |
526526
| `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`. |
527527
528-
### Notes <!-- omit in toc -->
528+
### Postgres <!-- omit in toc -->
529+
530+
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.
531+
532+
```bash
533+
#!/bin/bash
534+
535+
set -e
536+
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
537+
SELECT idempotency_delete_expired_records();
538+
EOSQL
529539
530-
- This feature is currently only available for MongoDB and not for Postgres.
540+
exec "$@"
541+
```
542+
543+
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:
544+
545+
```bash
546+
2 * * * * /root/parse_idempotency_delete_expired_records.sh >/dev/null 2>&1
547+
```
531548
532549
## Localization
533550

changelogs/CHANGELOG_alpha.md

+35
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,38 @@
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+
136
# [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)
237

338

package-lock.json

+93-53
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "parse-server",
3-
"version": "5.0.0-alpha.11",
3+
"version": "5.0.0-alpha.16",
44
"description": "An express module providing a Parse-compatible API server",
55
"main": "lib/index.js",
66
"repository": {
@@ -27,12 +27,12 @@
2727
"@parse/push-adapter": "3.4.1",
2828
"apollo-server-express": "2.25.2",
2929
"bcryptjs": "2.4.3",
30-
"body-parser": "1.19.0",
30+
"body-parser": "1.19.1",
3131
"commander": "5.1.0",
3232
"cors": "2.8.5",
3333
"deepcopy": "2.1.0",
3434
"express": "4.17.1",
35-
"follow-redirects": "1.14.5",
35+
"follow-redirects": "1.14.6",
3636
"graphql": "15.7.1",
3737
"graphql-list-fields": "2.0.2",
3838
"graphql-relay": "0.7.0",
@@ -131,7 +131,7 @@
131131
"madge:circular": "node_modules/.bin/madge ./src --circular"
132132
},
133133
"engines": {
134-
"node": ">=12.20.0 <16"
134+
"node": ">=12.20.0 <17"
135135
},
136136
"bin": {
137137
"parse-server": "bin/parse-server"

0 commit comments

Comments
 (0)