Skip to content

Commit 71848ee

Browse files
committed
Merge branch 'upstream/alpha' into moumouls/sync-upstream
# Conflicts: # package-lock.json # package.json # spec/AuthenticationAdaptersV2.spec.js # src/cli/utils/runner.js
2 parents b20d0ce + 435f0d1 commit 71848ee

File tree

229 files changed

+15674
-27817
lines changed

Some content is hidden

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

229 files changed

+15674
-27817
lines changed

.github/workflows/ci.yml

Lines changed: 30 additions & 28 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.12.0
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:
@@ -148,35 +143,39 @@ jobs:
148143
- name: MongoDB 4.2, ReplicaSet
149144
MONGODB_VERSION: 4.2.25
150145
MONGODB_TOPOLOGY: replset
151-
NODE_VERSION: 20.12.0
146+
NODE_VERSION: 22.4.1
152147
- name: MongoDB 4.4, ReplicaSet
153148
MONGODB_VERSION: 4.4.29
154149
MONGODB_TOPOLOGY: replset
155-
NODE_VERSION: 20.12.0
150+
NODE_VERSION: 22.4.1
156151
- name: MongoDB 5, ReplicaSet
157152
MONGODB_VERSION: 5.0.26
158153
MONGODB_TOPOLOGY: replset
159-
NODE_VERSION: 20.12.0
154+
NODE_VERSION: 22.4.1
160155
- name: MongoDB 6, ReplicaSet
161156
MONGODB_VERSION: 6.0.14
162157
MONGODB_TOPOLOGY: replset
163-
NODE_VERSION: 20.12.0
158+
NODE_VERSION: 22.4.1
164159
- name: MongoDB 7, ReplicaSet
165160
MONGODB_VERSION: 7.0.8
166161
MONGODB_TOPOLOGY: replset
167-
NODE_VERSION: 20.12.0
162+
NODE_VERSION: 22.4.1
168163
- name: Redis Cache
169164
PARSE_SERVER_TEST_CACHE: redis
170165
MONGODB_VERSION: 7.0.8
171166
MONGODB_TOPOLOGY: standalone
172-
NODE_VERSION: 20.12.0
167+
NODE_VERSION: 22.4.1
168+
- name: Node 20
169+
MONGODB_VERSION: 7.0.8
170+
MONGODB_TOPOLOGY: standalone
171+
NODE_VERSION: 20.15.1
173172
- name: Node 18
174173
MONGODB_VERSION: 7.0.8
175174
MONGODB_TOPOLOGY: standalone
176-
NODE_VERSION: 18.20.0
175+
NODE_VERSION: 18.20.4
177176
fail-fast: false
178177
name: ${{ matrix.name }}
179-
timeout-minutes: 15
178+
timeout-minutes: 20
180179
runs-on: ubuntu-latest
181180
services:
182181
redis:
@@ -213,36 +212,37 @@ jobs:
213212
- name: Upload code coverage
214213
uses: codecov/codecov-action@v4
215214
with:
216-
fail_ci_if_error: true
215+
# Set to `true` once codecov token bug is fixed; https://github.com/parse-community/parse-server/issues/9129
216+
fail_ci_if_error: false
217217
token: ${{ secrets.CODECOV_TOKEN }}
218218
check-postgres:
219219
strategy:
220220
matrix:
221221
include:
222222
- name: PostgreSQL 13, PostGIS 3.1
223223
POSTGRES_IMAGE: postgis/postgis:13-3.1
224-
NODE_VERSION: 20.12.0
224+
NODE_VERSION: 22.4.1
225225
- name: PostgreSQL 13, PostGIS 3.2
226226
POSTGRES_IMAGE: postgis/postgis:13-3.2
227-
NODE_VERSION: 20.12.0
227+
NODE_VERSION: 22.4.1
228228
- name: PostgreSQL 13, PostGIS 3.3
229229
POSTGRES_IMAGE: postgis/postgis:13-3.3
230-
NODE_VERSION: 20.12.0
230+
NODE_VERSION: 22.4.1
231231
- name: PostgreSQL 13, PostGIS 3.4
232232
POSTGRES_IMAGE: postgis/postgis:13-3.4
233-
NODE_VERSION: 20.12.0
233+
NODE_VERSION: 22.4.1
234234
- name: PostgreSQL 14, PostGIS 3.4
235235
POSTGRES_IMAGE: postgis/postgis:14-3.4
236-
NODE_VERSION: 20.12.0
236+
NODE_VERSION: 22.4.1
237237
- name: PostgreSQL 15, PostGIS 3.4
238238
POSTGRES_IMAGE: postgis/postgis:15-3.4
239-
NODE_VERSION: 20.12.0
239+
NODE_VERSION: 22.4.1
240240
- name: PostgreSQL 16, PostGIS 3.4
241-
POSTGRES_IMAGE: postgis/postgis:15-3.4
242-
NODE_VERSION: 20.12.0
241+
POSTGRES_IMAGE: postgis/postgis:16-3.4
242+
NODE_VERSION: 22.4.1
243243
fail-fast: false
244244
name: ${{ matrix.name }}
245-
timeout-minutes: 15
245+
timeout-minutes: 20
246246
runs-on: ubuntu-latest
247247
services:
248248
redis:
@@ -288,8 +288,10 @@ jobs:
288288
- name: Upload code coverage
289289
uses: codecov/codecov-action@v4
290290
with:
291-
fail_ci_if_error: true
291+
fail_ci_if_error: false
292292
token: ${{ secrets.CODECOV_TOKEN }}
293+
env:
294+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
293295
concurrency:
294296
group: ${{ github.workflow }}-${{ github.ref }}
295297
cancel-in-progress: true

.github/workflows/release-automated.yml

Lines changed: 1 addition & 1 deletion
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.20.0
20+
node-version: 20
2121
registry-url: https://registry.npmjs.org/
2222
- name: Cache Node.js modules
2323
uses: actions/cache@v4

.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: 18 additions & 3 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)
@@ -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

Dockerfile

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
############################################################
22
# Build stage
33
############################################################
4-
FROM node:lts-alpine AS build
4+
FROM node:20.14.0-alpine3.20 AS build
5+
6+
RUN apk --no-cache add \
7+
build-base \
8+
git \
9+
python3
510

6-
RUN apk --no-cache add git
711
WORKDIR /tmp
812

913
# Copy package.json first to benefit from layer caching
@@ -24,7 +28,7 @@ RUN npm ci --omit=dev --ignore-scripts \
2428
############################################################
2529
# Release stage
2630
############################################################
27-
FROM node:lts-alpine AS release
31+
FROM node:20.14.0-alpine3.20 AS release
2832

2933
VOLUME /parse-server/cloud /parse-server/config
3034

README.md

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
---
44

5-
[![Build Status](https://github.com/parse-community/parse-server/workflows/ci/badge.svg?branch=alpha)](https://github.com/parse-community/parse-server/actions?query=workflow%3Aci+branch%3Aalpha)
6-
[![Build Status](https://github.com/parse-community/parse-server/workflows/ci/badge.svg?branch=beta)](https://github.com/parse-community/parse-server/actions?query=workflow%3Aci+branch%3Abeta)
7-
[![Build Status](https://github.com/parse-community/parse-server/workflows/ci/badge.svg?branch=release)](https://github.com/parse-community/parse-server/actions?query=workflow%3Aci+branch%3Arelease)
5+
[![Build Status](https://github.com/parse-community/parse-server/actions/workflows/ci.yml/badge.svg?branch=alpha)](https://github.com/parse-community/parse-server/actions/workflows/ci.yml?query=workflow%3Aci+branch%3Aalpha)
6+
[![Build Status](https://github.com/parse-community/parse-server/actions/workflows/ci.yml/badge.svg?branch=beta)](https://github.com/parse-community/parse-server/actions/workflows/ci.yml?query=workflow%3Aci+branch%3Abeta)
7+
[![Build Status](https://github.com/parse-community/parse-server/actions/workflows/ci.yml/badge.svg?branch=release)](https://github.com/parse-community/parse-server/actions/workflows/ci.yml?query=workflow%3Aci+branch%3Arelease)
88
[![Snyk Badge](https://snyk.io/test/github/parse-community/parse-server/badge.svg)](https://snyk.io/test/github/parse-community/parse-server)
9-
[![Coverage](https://img.shields.io/codecov/c/github/parse-community/parse-server/alpha.svg)](https://codecov.io/github/parse-community/parse-server?branch=alpha)
9+
[![Coverage](https://codecov.io/github/parse-community/parse-server/branch/alpha/graph/badge.svg)](https://app.codecov.io/github/parse-community/parse-server/tree/alpha)
1010
[![auto-release](https://img.shields.io/badge/%F0%9F%9A%80-auto--release-9e34eb.svg)](https://github.com/parse-community/parse-dashboard/releases)
1111

12-
[![Node Version](https://img.shields.io/badge/nodejs-18,_20-green.svg?logo=node.js&style=flat)](https://nodejs.org)
12+
[![Node Version](https://img.shields.io/badge/nodejs-18,_20,_22-green.svg?logo=node.js&style=flat)](https://nodejs.org)
1313
[![MongoDB Version](https://img.shields.io/badge/mongodb-4.2,_4.4,_5,_6,_7-green.svg?logo=mongodb&style=flat)](https://www.mongodb.com)
1414
[![Postgres Version](https://img.shields.io/badge/postgresql-13,_14,_15,_16-green.svg?logo=postgresql&style=flat)](https://www.postgresql.org)
1515

@@ -129,20 +129,21 @@ Parse Server is continuously tested with the most recent releases of Node.js to
129129

130130
| Version | Latest Version | End-of-Life | Compatible |
131131
|------------|----------------|-------------|------------|
132-
| Node.js 18 | 18.20.0 | April 2025 | ✅ Yes |
133-
| Node.js 20 | 20.12.0 | April 2026 | ✅ Yes |
132+
| Node.js 18 | 18.20.4 | April 2025 | ✅ Yes |
133+
| Node.js 20 | 20.15.1 | April 2026 | ✅ Yes |
134+
| Node.js 22 | 22.4.1 | April 2027 | ✅ Yes |
134135

135136
#### MongoDB
136137

137138
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 [MongoDB lifecycle schedule](https://www.mongodb.com/support-policy/lifecycles) and only test against versions that are officially supported and have not reached their end-of-life date. MongoDB "rapid releases" are ignored as these are considered pre-releases of the next major version.
138139

139140
| Version | Latest Version | End-of-Life | Compatible |
140-
| ----------- | -------------- | ------------- | ---------- |
141-
| MongoDB 4.2 | 4.2.25 | April 2023 | ✅ Yes |
142-
| MongoDB 4.4 | 4.4.29 | February 2024 | ✅ Yes |
143-
| MongoDB 5 | 5.0.26 | October 2024 | ✅ Yes |
144-
| MongoDB 6 | 6.0.14 | July 2025 | ✅ Yes |
145-
| MongoDB 7 | 7.0.8 | TDB | ✅ Yes |
141+
|-------------|----------------|---------------|------------|
142+
| MongoDB 4.2 | 4.2.25 | April 2023 | ✅ Yes |
143+
| MongoDB 4.4 | 4.4.29 | February 2024 | ✅ Yes |
144+
| MongoDB 5 | 5.0.26 | October 2024 | ✅ Yes |
145+
| MongoDB 6 | 6.0.14 | July 2025 | ✅ Yes |
146+
| MongoDB 7 | 7.0.8 | TDB | ✅ Yes |
146147

147148
#### PostgreSQL
148149

@@ -305,7 +306,7 @@ app.listen(1337, function() {
305306
});
306307
```
307308

308-
For a full list of available options, run `parse-server --help` or take a look at [Parse Server Configurations](http://parseplatform.org/parse-server/api/master/ParseServerOptions.html).
309+
For a full list of available options, run `parse-server --help` or take a look at [Parse Server Configurations][server-options].
309310

310311
## Parse Server Health
311312

@@ -332,7 +333,7 @@ The response looks like this:
332333

333334
Parse Server can be configured using the following options. You may pass these as parameters when running a standalone `parse-server`, or by loading a configuration file in JSON format using `parse-server path/to/configuration.json`. If you're using Parse Server on Express, you may also pass these to the `ParseServer` object as options.
334335

335-
For the full list of available options, run `parse-server --help` or take a look at [Parse Server Configurations](http://parseplatform.org/parse-server/api/master/ParseServerOptions.html).
336+
For the full list of available options, run `parse-server --help` or take a look at [Parse Server Configurations][server-options].
336337

337338
## Basic Options
338339

@@ -366,7 +367,7 @@ The client keys used with Parse are no longer necessary with Parse Server. If yo
366367

367368
## Email Verification and Password Reset
368369

369-
Verifying user email addresses and enabling password reset via email requires an email adapter. There are many email adapters provided and maintained by the community. The following is an example configuration with an example email adapter. See the [Parse Server Options](https://parseplatform.org/parse-server/api/master/ParseServerOptions.html) for more details and a full list of available options.
370+
Verifying user email addresses and enabling password reset via email requires an email adapter. There are many email adapters provided and maintained by the community. The following is an example configuration with an example email adapter. See the [Parse Server Options][server-options] for more details and a full list of available options.
370371

371372
```js
372373
const server = ParseServer({
@@ -406,7 +407,7 @@ Email adapters contributed by the community:
406407

407408
## Password and Account Policy
408409

409-
Set a password and account policy that meets your security requirements. The following is an example configuration. See the [Parse Server Options](https://parseplatform.org/parse-server/api/master/ParseServerOptions.html) for more details and a full list of available options.
410+
Set a password and account policy that meets your security requirements. The following is an example configuration. See the [Parse Server Options][server-options] for more details and a full list of available options.
410411

411412
```js
412413
const server = ParseServer({
@@ -1206,3 +1207,4 @@ Support us with a monthly donation and help us continue our activities. [Become
12061207
[log_release]: https://github.com/parse-community/parse-server/blob/release/changelogs/CHANGELOG_release.md
12071208
[log_beta]: https://github.com/parse-community/parse-server/blob/beta/changelogs/CHANGELOG_beta.md
12081209
[log_alpha]: https://github.com/parse-community/parse-server/blob/alpha/changelogs/CHANGELOG_alpha.md
1210+
[server-options] http://parseplatform.org/parse-server/api/release/ParseServerOptions.html

0 commit comments

Comments
 (0)