Skip to content

Commit 8746e06

Browse files
committed
Merge branch 'upstream/alpha' into moumouls/update-apollo-upload-client
# Conflicts: # package-lock.json # package.json
2 parents 84d64d6 + e75645d commit 8746e06

File tree

130 files changed

+23484
-19323
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

130 files changed

+23484
-19323
lines changed

.eslintrc.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@
2525
"space-infix-ops": "error",
2626
"no-useless-escape": "off",
2727
"require-atomic-updates": "off",
28-
"object-curly-spacing": ["error", "always"]
28+
"object-curly-spacing": ["error", "always"],
29+
"curly": ["error", "all"],
30+
"block-spacing": ["error", "always"]
2931
},
3032
"globals": {
3133
"Parse": true

.github/ISSUE_TEMPLATE/---1-report-an-issue.md

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,10 @@ assignees: ''
88
---
99

1010
### New Issue Checklist
11-
<!--
12-
Check every following box [x] before submitting your issue.
13-
Click the "Preview" tab for better readability.
14-
Thanks for contributing to Parse Platform!
15-
-->
1611

17-
- [ ] I am not disclosing a [vulnerability](https://github.com/parse-community/parse-server/blob/master/SECURITY.md).
18-
- [ ] I am not just asking a [question](https://github.com/parse-community/.github/blob/master/SUPPORT.md).
19-
- [ ] I have searched through [existing issues](https://github.com/parse-community/parse-server/issues?q=is%3Aissue).
20-
- [ ] I can reproduce the issue with the [latest version of Parse Server](https://github.com/parse-community/parse-server/releases). <!-- We don't investigate issues for outdated releases. -->
12+
- Report security issues [confidentially](https://github.com/parse-community/parse-server/security/policy).
13+
- Any contribution is under this [license](https://github.com/parse-community/parse-server/blob/alpha/LICENSE).
14+
- Before posting search [existing issues](https://github.com/parse-community/parse-server/issues?q=is%3Aissue).
2115

2216
### Issue Description
2317
<!-- What is the specific issue with Parse Server? -->
@@ -30,6 +24,7 @@ assignees: ''
3024

3125
### Expected Outcome
3226
<!-- What outcome, for example query result, did you expect? -->
27+
3328
### Environment
3429
<!-- Be specific with versions, don't use "latest" or semver ranges like "~x.y.z" or "^x.y.z". -->
3530

.github/ISSUE_TEMPLATE/---2-feature-request.md

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,10 @@ assignees: ''
88
---
99

1010
### New Feature / Enhancement Checklist
11-
<!--
12-
Check every following box [x] before submitting your issue.
13-
Click the "Preview" tab for better readability.
14-
Thanks for contributing to Parse Platform!
15-
-->
16-
17-
- [ ] I am not disclosing a [vulnerability](https://github.com/parse-community/parse-server/blob/master/SECURITY.md).
18-
- [ ] I am not just asking a [question](https://github.com/parse-community/.github/blob/master/SUPPORT.md).
19-
- [ ] I have searched through [existing issues](https://github.com/parse-community/parse-server/issues?q=is%3Aissue).
11+
12+
- Report security issues [confidentially](https://github.com/parse-community/parse-server/security/policy).
13+
- Any contribution is under this [license](https://github.com/parse-community/parse-server/blob/alpha/LICENSE).
14+
- Before posting search [existing issues](https://github.com/parse-community/parse-server/issues?q=is%3Aissue).
2015

2116
### Current Limitation
2217
<!-- Which current limitation is the feature or enhancement addressing? -->

.github/workflows/ci-automated-check-environment.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,8 @@ jobs:
1717
- name: Setup Node
1818
uses: actions/setup-node@v2
1919
with:
20-
node-version: 14
21-
- name: Cache Node.js modules
22-
uses: actions/cache@v4
23-
with:
24-
path: ~/.npm
25-
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
26-
restore-keys: |
27-
${{ runner.os }}-node-
20+
node-version: 20
21+
cache: 'npm'
2822
- name: Install dependencies
2923
run: npm ci
3024
- name: CI Environments Check

.github/workflows/ci.yml

Lines changed: 60 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
paths-ignore:
99
- '**/**.md'
1010
env:
11-
NODE_VERSION: 20.11.1
11+
NODE_VERSION: 22.4.1
1212
PARSE_SERVER_TEST_TIMEOUT: 20000
1313
jobs:
1414
check-code-analysis:
@@ -42,15 +42,10 @@ jobs:
4242
uses: actions/setup-node@v4
4343
with:
4444
node-version: ${{ matrix.node-version }}
45-
- name: Cache Node.js modules
46-
uses: actions/cache@v4
47-
with:
48-
path: ~/.npm
49-
key: ${{ runner.os }}-node-${{ matrix.NODE_VERSION }}-${{ hashFiles('**/package-lock.json') }}
50-
restore-keys: |
51-
${{ runner.os }}-node-${{ matrix.NODE_VERSION }}-
52-
- name: Install dependencies
45+
- name: Install prod dependencies
5346
run: npm ci
47+
- name: Remove dev dependencies
48+
run: ./ci/uninstallDevDeps.sh @actions/core
5449
- name: CI Node Engine Check
5550
run: npm run ci:checkNodeEngine
5651
check-lint:
@@ -146,37 +141,45 @@ jobs:
146141
matrix:
147142
include:
148143
- name: MongoDB 4.2, ReplicaSet
149-
MONGODB_VERSION: 4.2.19
144+
MONGODB_VERSION: 4.2.25
150145
MONGODB_TOPOLOGY: replset
151-
NODE_VERSION: 20.11.1
146+
NODE_VERSION: 22.4.1
152147
- name: MongoDB 4.4, ReplicaSet
153-
MONGODB_VERSION: 4.4.13
148+
MONGODB_VERSION: 4.4.29
154149
MONGODB_TOPOLOGY: replset
155-
NODE_VERSION: 20.11.1
150+
NODE_VERSION: 22.4.1
156151
- name: MongoDB 5, ReplicaSet
157-
MONGODB_VERSION: 5.3.2
152+
MONGODB_VERSION: 5.0.26
158153
MONGODB_TOPOLOGY: replset
159-
NODE_VERSION: 20.11.1
154+
NODE_VERSION: 22.4.1
160155
- name: MongoDB 6, ReplicaSet
161-
MONGODB_VERSION: 6.0.2
156+
MONGODB_VERSION: 6.0.14
162157
MONGODB_TOPOLOGY: replset
163-
NODE_VERSION: 20.11.1
158+
NODE_VERSION: 22.4.1
164159
- name: MongoDB 7, ReplicaSet
165-
MONGODB_VERSION: 7.0.1
160+
MONGODB_VERSION: 7.0.8
166161
MONGODB_TOPOLOGY: replset
167-
NODE_VERSION: 20.11.1
162+
NODE_VERSION: 22.4.1
163+
- name: MongoDB 8, ReplicaSet
164+
MONGODB_VERSION: 8.0.0
165+
MONGODB_TOPOLOGY: replset
166+
NODE_VERSION: 22.4.1
168167
- name: Redis Cache
169168
PARSE_SERVER_TEST_CACHE: redis
170-
MONGODB_VERSION: 4.4.13
169+
MONGODB_VERSION: 8.0.0
170+
MONGODB_TOPOLOGY: standalone
171+
NODE_VERSION: 22.4.1
172+
- name: Node 20
173+
MONGODB_VERSION: 8.0.0
171174
MONGODB_TOPOLOGY: standalone
172-
NODE_VERSION: 20.11.1
175+
NODE_VERSION: 20.15.1
173176
- name: Node 18
174-
MONGODB_VERSION: 4.4.13
177+
MONGODB_VERSION: 8.0.0
175178
MONGODB_TOPOLOGY: standalone
176-
NODE_VERSION: 18.19.1
179+
NODE_VERSION: 18.20.4
177180
fail-fast: false
178181
name: ${{ matrix.name }}
179-
timeout-minutes: 15
182+
timeout-minutes: 20
180183
runs-on: ubuntu-latest
181184
services:
182185
redis:
@@ -210,35 +213,46 @@ jobs:
210213
- run: npm run coverage
211214
env:
212215
CI: true
213-
- run: bash <(curl -s https://codecov.io/bash)
216+
- name: Upload code coverage
217+
uses: codecov/codecov-action@v4
218+
with:
219+
# Set to `true` once codecov token bug is fixed; https://github.com/parse-community/parse-server/issues/9129
220+
fail_ci_if_error: false
221+
token: ${{ secrets.CODECOV_TOKEN }}
214222
check-postgres:
215223
strategy:
216224
matrix:
217225
include:
218226
- name: PostgreSQL 13, PostGIS 3.1
219227
POSTGRES_IMAGE: postgis/postgis:13-3.1
220-
NODE_VERSION: 20.11.1
228+
NODE_VERSION: 22.4.1
221229
- name: PostgreSQL 13, PostGIS 3.2
222230
POSTGRES_IMAGE: postgis/postgis:13-3.2
223-
NODE_VERSION: 20.11.1
231+
NODE_VERSION: 22.4.1
224232
- name: PostgreSQL 13, PostGIS 3.3
225233
POSTGRES_IMAGE: postgis/postgis:13-3.3
226-
NODE_VERSION: 20.11.1
234+
NODE_VERSION: 22.4.1
227235
- name: PostgreSQL 13, PostGIS 3.4
228236
POSTGRES_IMAGE: postgis/postgis:13-3.4
229-
NODE_VERSION: 20.11.1
230-
- name: PostgreSQL 14, PostGIS 3.4
231-
POSTGRES_IMAGE: postgis/postgis:14-3.4
232-
NODE_VERSION: 20.11.1
233-
- name: PostgreSQL 15, PostGIS 3.4
234-
POSTGRES_IMAGE: postgis/postgis:15-3.4
235-
NODE_VERSION: 20.11.1
236-
- name: PostgreSQL 16, PostGIS 3.4
237-
POSTGRES_IMAGE: postgis/postgis:15-3.4
238-
NODE_VERSION: 20.11.1
237+
NODE_VERSION: 22.4.1
238+
- name: PostgreSQL 13, PostGIS 3.5
239+
POSTGRES_IMAGE: postgis/postgis:13-3.5
240+
NODE_VERSION: 22.4.1
241+
- name: PostgreSQL 14, PostGIS 3.5
242+
POSTGRES_IMAGE: postgis/postgis:14-3.5
243+
NODE_VERSION: 22.4.1
244+
- name: PostgreSQL 15, PostGIS 3.5
245+
POSTGRES_IMAGE: postgis/postgis:15-3.5
246+
NODE_VERSION: 22.4.1
247+
- name: PostgreSQL 16, PostGIS 3.5
248+
POSTGRES_IMAGE: postgis/postgis:16-3.5
249+
NODE_VERSION: 22.4.1
250+
- name: PostgreSQL 17, PostGIS 3.5
251+
POSTGRES_IMAGE: postgis/postgis:17-3.5
252+
NODE_VERSION: 22.4.1
239253
fail-fast: false
240254
name: ${{ matrix.name }}
241-
timeout-minutes: 15
255+
timeout-minutes: 20
242256
runs-on: ubuntu-latest
243257
services:
244258
redis:
@@ -281,7 +295,13 @@ jobs:
281295
- run: npm run coverage
282296
env:
283297
CI: true
284-
- run: bash <(curl -s https://codecov.io/bash)
298+
- name: Upload code coverage
299+
uses: codecov/codecov-action@v4
300+
with:
301+
fail_ci_if_error: false
302+
token: ${{ secrets.CODECOV_TOKEN }}
303+
env:
304+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
285305
concurrency:
286306
group: ${{ github.workflow }}-${{ github.ref }}
287307
cancel-in-progress: true

.github/workflows/release-automated.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
persist-credentials: false
1818
- uses: actions/setup-node@v4
1919
with:
20-
node-version: 18.19.1
20+
node-version: 20
2121
registry-url: https://registry.npmjs.org/
2222
- name: Cache Node.js modules
2323
uses: actions/cache@v4
@@ -93,7 +93,7 @@ jobs:
9393
- name: Use Node.js
9494
uses: actions/setup-node@v4
9595
with:
96-
node-version: 18.19.1
96+
node-version: 18.20.0
9797
- name: Cache Node.js modules
9898
uses: actions/cache@v4
9999
with:

.nvmrc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
10.14.2
2-
1+
20.15.0

release.config.js renamed to .releaserc.js

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,13 @@
22
* Semantic Release Config
33
*/
44

5-
const fs = require('fs').promises;
6-
const path = require('path');
5+
const { readFile } = require('fs').promises;
6+
const { resolve } = require('path');
7+
8+
// For ES6 modules use:
9+
// import { readFile } from 'fs/promises';
10+
// import { resolve, dirname } from 'path';
11+
// import { fileURLToPath } from 'url';
712

813
// Get env vars
914
const ref = process.env.GITHUB_REF;
@@ -24,7 +29,7 @@ const templates = {
2429
async function config() {
2530

2631
// Get branch
27-
const branch = ref.split('/').pop().split('-')[0];
32+
const branch = ref?.split('/')?.pop()?.split('-')[0] || '(current branch could not be determined)';
2833
console.log(`Running on branch: ${branch}`);
2934

3035
// Set changelog file
@@ -89,7 +94,7 @@ async function config() {
8994
[
9095
"@saithodev/semantic-release-backmerge",
9196
{
92-
"branches": [
97+
"backmergeBranches": [
9398
{ from: "beta", to: "alpha" },
9499
{ from: "release", to: "beta" },
95100
]
@@ -103,15 +108,17 @@ async function config() {
103108

104109
async function loadTemplates() {
105110
for (const template of Object.keys(templates)) {
106-
const text = await readFile(path.resolve(__dirname, resourcePath, templates[template].file));
111+
112+
// For ES6 modules use:
113+
// const fileUrl = import.meta.url;
114+
// const __dirname = dirname(fileURLToPath(fileUrl));
115+
116+
const filePath = resolve(__dirname, resourcePath, templates[template].file);
117+
const text = await readFile(filePath, 'utf-8');
107118
templates[template].text = text;
108119
}
109120
}
110121

111-
async function readFile(filePath) {
112-
return await fs.readFile(filePath, 'utf-8');
113-
}
114-
115122
function getReleaseComment() {
116123
const url = repositoryUrl + '/releases/tag/${nextRelease.gitTag}';
117124
const comment = '🎉 This change has been released in version [${nextRelease.version}](' + url + ')';

CONTRIBUTING.md

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
- [Reverting](#reverting)
4040
- [Security Vulnerability](#security-vulnerability)
4141
- [Local Testing](#local-testing)
42+
- [Environment](#environment)
4243
- [Merging](#merging-1)
4344
- [Releasing](#releasing)
4445
- [General Considerations](#general-considerations)
@@ -271,15 +272,15 @@ If your pull request introduces a change that may affect the storage or retrieva
271272
[PostGIS images (select one with v2.2 or higher) on docker hub](https://hub.docker.com/r/postgis/postgis) is based off of the official [postgres](https://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:
272273

273274
```
274-
docker run -d --name parse-postgres -p 5432:5432 -e POSTGRES_PASSWORD=password --rm postgis/postgis:16-3.4-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
275+
docker run -d --name parse-postgres -p 5432:5432 -e POSTGRES_PASSWORD=password --rm postgis/postgis:17-3.5-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
275276
```
276277
To stop the Postgres instance:
277278

278279
```
279280
docker stop parse-postgres
280281
```
281282

282-
You can also use the [postgis/postgis:16-3.4-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:
283+
You can also use the [postgis/postgis:17-3.5-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:
283284

284285
```
285286
#Install additional scripts. These are run in abc order during initial start
@@ -499,19 +500,33 @@ If the commit reverts a previous commit, use the prefix `revert:`, followed by t
499500
500501
#### Local Testing
501502
502-
Fixes for securify vulnerabilities are developed in private forks with a closed audience, inaccessible to the public. A current GitHub limitation does not allow to run CI tests on pull requests in private forks. Whether a pull requests fully passes all CI tests can only be determined by publishing the fix as a public pull request and running the CI. This means the fix and implicitly information about the vulnerabilty are made accessible to the public. This increases the risk that a vulnerability fix is published, but then cannot be merged immediately due to a CI issue. To mitigate that risk, before publishing a vulnerability fix, the following tests needs to be run locally and pass:
503+
Fixes for security vulnerabilities are developed in private forks with a closed audience, inaccessible to the public. A current GitHub limitation does not allow to run CI tests on pull requests in private forks. Whether a pull requests fully passes all CI tests can only be determined by publishing the fix as a public pull request and running the CI. This means the fix and implicitly information about the vulnerability are made accessible to the public. This increases the risk that a vulnerability fix is published, but then cannot be merged immediately due to a CI issue. To mitigate that risk, before publishing a vulnerability fix, the following tests needs to be run locally and pass:
503504
504505
- `npm run test` (MongoDB)
505506
- `npm run test` (Postgres)
506507
- `npm run madge:circular` (circular dependencies)
507508
- `npm run lint` (Lint)
508509
- `npm run definitions` (Parse Server options definitions)
509510
511+
#### Environment
512+
513+
A reported vulnerability may have already been fixed since it was reported, either due to a targeted fix or as side-effect of other code changed. To verify that a vulnerability exists, tests need to be run in an environment that uses the latest commit of the development branch of Parse Server.
514+
515+
> [!NOTE]
516+
> Do not use the latest alpha version for testing as it may be behind the latest commit of the development branch.
517+
518+
Vulnerability test must only be conducted in environments for which the tester can ensure that no unauthorized 3rd party has potentially access to. This is to ensure a vulnerability stays confidential and is not exposed prematurely to the public.
519+
520+
You must not test a vulnerability using any 3rd party APIs that provide Parse Server as a hosted service (SaaS) as this may expose the vulnerability to an unauthorized 3rd party and the effects of the vulnerability may cause issues on the provider's side.
521+
522+
> [!CAUTION]
523+
> Utilizing a vulnerability in a third-party service, even for testing or development purposes, can result in legal repercussions. You are solely accountable for any damage arising from such actions and agree to indemnify Parse Platform against any liabilities or claims resulting from your actions.
524+
510525
#### Merging
511526
512-
A current GitHub limitation does not allow to customize the commit message when merging pull requests of a private fork that was created to fix a security vulnerabilty. Our release automation framework demands a specific commit message syntax which therefore cannot be met. This prohibits to follow the process that GitHub suggest, which is to merge a pull request from a private fork directly to a public branch. Instead, after [local testing](#local-testing), a public pull request needs to be created with the code fix copied over from the private pull request.
527+
A current GitHub limitation does not allow to customize the commit message when merging pull requests of a private fork that was created to fix a security vulnerability. Our release automation framework demands a specific commit message syntax which therefore cannot be met. This prohibits to follow the process that GitHub suggest, which is to merge a pull request from a private fork directly to a public branch. Instead, after [local testing](#local-testing), a public pull request needs to be created with the code fix copied over from the private pull request.
513528
514-
This creates a risk that a vulnerability is indirectly disclosed by publishing a pull request with the fix, but the fix cannot be merged due to a CI issue. To mitigate that risk, the pull request title and description should be kept marginal or generic, not hiting to a vulnerabilty or giving any details about the vulnerabilty, until the pull request has been successfully merged.
529+
This creates a risk that a vulnerability is indirectly disclosed by publishing a pull request with the fix, but the fix cannot be merged due to a CI issue. To mitigate that risk, the pull request title and description should be kept marginal or generic, not hinting to a vulnerability or giving any details about the vulnerability, until the pull request has been successfully merged.
515530
516531
## Releasing
517532

0 commit comments

Comments
 (0)