Skip to content

Commit e3d9b68

Browse files
authored
Merge branch 'alpha' into file-types
2 parents 70af738 + d19acf1 commit e3d9b68

File tree

81 files changed

+29132
-6218
lines changed

Some content is hidden

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

81 files changed

+29132
-6218
lines changed

.babelrc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66
"presets": [
77
["@babel/preset-env", {
88
"targets": {
9-
"node": "12"
10-
}
9+
"node": "14",
10+
},
11+
"exclude": ["proposal-dynamic-import"]
1112
}]
1213
],
1314
"sourceMaps": "inline"

.eslintrc.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@
55
"node": true,
66
"es6": true
77
},
8-
"parser": "babel-eslint",
8+
"parser": "@babel/eslint-parser",
99
"plugins": [
1010
"flowtype"
1111
],
1212
"parserOptions": {
1313
"ecmaVersion": 6,
14-
"sourceType": "module"
14+
"sourceType": "module",
15+
"requireConfigFile": false
1516
},
1617
"rules": {
1718
"indent": ["error", 2, { "SwitchCase": 1 }],

.github/pull_request_template.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
### Issue Description
1212
<!-- Add a brief description of the issue this PR solves. -->
1313

14-
Related issue: FILL_THIS_OUT
14+
Closes: FILL_THIS_OUT
1515

1616
### Approach
1717
<!-- Add a description of the approach in this PR. -->
@@ -26,4 +26,3 @@ Related issue: FILL_THIS_OUT
2626
- [ ] Add changes to documentation (guides, repository pages, in-code descriptions)
2727
- [ ] Add [security check](https://github.com/parse-community/parse-server/blob/master/CONTRIBUTING.md#security-checks)
2828
- [ ] Add new Parse Error codes to Parse JS SDK <!-- no hard-coded error codes in Parse Server -->
29-
- [x] A changelog entry is created automatically using the pull request title (do not manually add a changelog entry)

.github/workflows/ci.yml

Lines changed: 49 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
pull_request:
66
branches: [ release, alpha, beta ]
77
env:
8-
NODE_VERSION: 18.1.0
8+
NODE_VERSION: 18.12.1
99
PARSE_SERVER_TEST_TIMEOUT: 20000
1010
jobs:
1111
check-code-analysis:
@@ -32,7 +32,7 @@ jobs:
3232
check-ci:
3333
name: Node Engine Check
3434
timeout-minutes: 15
35-
runs-on: ubuntu-20.04
35+
runs-on: ubuntu-latest
3636
steps:
3737
- uses: actions/checkout@v2
3838
- name: Use Node.js ${{ matrix.NODE_VERSION }}
@@ -53,7 +53,7 @@ jobs:
5353
check-lint:
5454
name: Lint
5555
timeout-minutes: 15
56-
runs-on: ubuntu-20.04
56+
runs-on: ubuntu-latest
5757
steps:
5858
- uses: actions/checkout@v2
5959
- name: Use Node.js ${{ matrix.NODE_VERSION }}
@@ -70,10 +70,31 @@ jobs:
7070
- name: Install dependencies
7171
run: npm ci
7272
- run: npm run lint
73+
check-definitions:
74+
name: Check Definitions
75+
timeout-minutes: 5
76+
runs-on: ubuntu-18.04
77+
steps:
78+
- uses: actions/checkout@v2
79+
- name: Use Node.js ${{ matrix.NODE_VERSION }}
80+
uses: actions/setup-node@v2
81+
with:
82+
node-version: ${{ matrix.node-version }}
83+
- name: Cache Node.js modules
84+
uses: actions/cache@v2
85+
with:
86+
path: ~/.npm
87+
key: ${{ runner.os }}-node-${{ matrix.NODE_VERSION }}-${{ hashFiles('**/package-lock.json') }}
88+
restore-keys: |
89+
${{ runner.os }}-node-${{ matrix.NODE_VERSION }}-
90+
- name: Install dependencies
91+
run: npm ci
92+
- name: CI Definitions Check
93+
run: npm run ci:definitionsCheck
7394
check-circular:
7495
name: Circular Dependencies
7596
timeout-minutes: 5
76-
runs-on: ubuntu-20.04
97+
runs-on: ubuntu-latest
7798
steps:
7899
- uses: actions/checkout@v2
79100
- name: Use Node.js ${{ matrix.NODE_VERSION }}
@@ -93,7 +114,7 @@ jobs:
93114
check-docker:
94115
name: Docker Build
95116
timeout-minutes: 15
96-
runs-on: ubuntu-20.04
117+
runs-on: ubuntu-latest
97118
steps:
98119
- name: Checkout repository
99120
uses: actions/checkout@v2
@@ -110,77 +131,50 @@ jobs:
110131
check-lock-file-version:
111132
name: NPM Lock File Version
112133
timeout-minutes: 5
113-
runs-on: ubuntu-20.04
134+
runs-on: ubuntu-latest
114135
steps:
115136
- uses: actions/checkout@v2
116137
- name: Check NPM lock file version
117138
uses: mansona/npm-lockfile-version@v1
118139
with:
119-
version: 1
140+
version: 2
120141
check-mongo:
121142
strategy:
122143
matrix:
123144
include:
124-
- name: MongoDB 4.0, Standalone, MMAPv1
125-
MONGODB_VERSION: 4.0.28
126-
MONGODB_TOPOLOGY: standalone
127-
MONGODB_STORAGE_ENGINE: mmapv1
128-
NODE_VERSION: 18.1.0
129-
- name: MongoDB 4.0, ReplicaSet, WiredTiger
130-
MONGODB_VERSION: 4.0.28
131-
MONGODB_TOPOLOGY: replicaset
132-
MONGODB_STORAGE_ENGINE: wiredTiger
133-
NODE_VERSION: 18.1.0
134-
- name: MongoDB 4.2, ReplicaSet, WiredTiger
145+
- name: MongoDB 4.2, ReplicaSet
135146
MONGODB_VERSION: 4.2.19
136147
MONGODB_TOPOLOGY: replicaset
137-
MONGODB_STORAGE_ENGINE: wiredTiger
138-
NODE_VERSION: 18.1.0
139-
- name: MongoDB 4.4, ReplicaSet, WiredTiger
148+
NODE_VERSION: 18.12.1
149+
- name: MongoDB 4.4, ReplicaSet
140150
MONGODB_VERSION: 4.4.13
141151
MONGODB_TOPOLOGY: replicaset
142-
MONGODB_STORAGE_ENGINE: wiredTiger
143-
NODE_VERSION: 18.1.0
144-
- name: MongoDB 5, ReplicaSet, WiredTiger
152+
NODE_VERSION: 18.12.1
153+
- name: MongoDB 5, ReplicaSet
145154
MONGODB_VERSION: 5.3.2
146155
MONGODB_TOPOLOGY: replicaset
147-
MONGODB_STORAGE_ENGINE: wiredTiger
148-
NODE_VERSION: 18.1.0
149-
- name: MongoDB 6, ReplicaSet, WiredTiger
156+
NODE_VERSION: 18.12.1
157+
- name: MongoDB 6, ReplicaSet
150158
MONGODB_VERSION: 6.0.2
151159
MONGODB_TOPOLOGY: replicaset
152-
MONGODB_STORAGE_ENGINE: wiredTiger
153-
NODE_VERSION: 18.1.0
160+
NODE_VERSION: 18.12.1
154161
- name: Redis Cache
155162
PARSE_SERVER_TEST_CACHE: redis
156163
MONGODB_VERSION: 4.4.13
157164
MONGODB_TOPOLOGY: standalone
158-
MONGODB_STORAGE_ENGINE: wiredTiger
159-
NODE_VERSION: 18.1.0
160-
- name: Node 12
161-
MONGODB_VERSION: 4.4.13
162-
MONGODB_TOPOLOGY: standalone
163-
MONGODB_STORAGE_ENGINE: wiredTiger
164-
NODE_VERSION: 12.22.11
165+
NODE_VERSION: 18.12.1
165166
- name: Node 14
166167
MONGODB_VERSION: 4.4.13
167168
MONGODB_TOPOLOGY: standalone
168-
MONGODB_STORAGE_ENGINE: wiredTiger
169-
NODE_VERSION: 14.19.1
169+
NODE_VERSION: 14.21.1
170170
- name: Node 16
171171
MONGODB_VERSION: 4.4.13
172172
MONGODB_TOPOLOGY: standalone
173-
MONGODB_STORAGE_ENGINE: wiredTiger
174-
NODE_VERSION: 16.14.2
175-
- name: Node 17
176-
MONGODB_VERSION: 4.4.13
177-
MONGODB_TOPOLOGY: standalone
178-
MONGODB_STORAGE_ENGINE: wiredTiger
179-
NODE_VERSION: 17.9.0
173+
NODE_VERSION: 16.18.1
180174
fail-fast: false
181175
name: ${{ matrix.name }}
182176
timeout-minutes: 15
183-
runs-on: ubuntu-20.04
177+
runs-on: ubuntu-latest
184178
services:
185179
redis:
186180
image: redis
@@ -220,32 +214,32 @@ jobs:
220214
include:
221215
- name: PostgreSQL 11, PostGIS 3.0
222216
POSTGRES_IMAGE: postgis/postgis:11-3.0
223-
NODE_VERSION: 18.1.0
217+
NODE_VERSION: 18.12.1
224218
- name: PostgreSQL 11, PostGIS 3.1
225219
POSTGRES_IMAGE: postgis/postgis:11-3.1
226-
NODE_VERSION: 18.1.0
220+
NODE_VERSION: 18.12.1
227221
- name: PostgreSQL 11, PostGIS 3.2
228222
POSTGRES_IMAGE: postgis/postgis:11-3.2
229-
NODE_VERSION: 18.1.0
223+
NODE_VERSION: 18.12.1
230224
- name: PostgreSQL 11, PostGIS 3.3
231225
POSTGRES_IMAGE: postgis/postgis:11-3.3
232-
NODE_VERSION: 18.1.0
226+
NODE_VERSION: 18.12.1
233227
- name: PostgreSQL 12, PostGIS 3.3
234228
POSTGRES_IMAGE: postgis/postgis:12-3.3
235-
NODE_VERSION: 18.1.0
229+
NODE_VERSION: 18.12.1
236230
- name: PostgreSQL 13, PostGIS 3.3
237231
POSTGRES_IMAGE: postgis/postgis:13-3.3
238-
NODE_VERSION: 18.1.0
232+
NODE_VERSION: 18.12.1
239233
- name: PostgreSQL 14, PostGIS 3.3
240234
POSTGRES_IMAGE: postgis/postgis:14-3.3
241-
NODE_VERSION: 18.1.0
235+
NODE_VERSION: 18.12.1
242236
- name: PostgreSQL 15, PostGIS 3.3
243237
POSTGRES_IMAGE: postgis/postgis:15-3.3
244-
NODE_VERSION: 18.1.0
238+
NODE_VERSION: 18.12.1
245239
fail-fast: false
246240
name: ${{ matrix.name }}
247241
timeout-minutes: 15
248-
runs-on: ubuntu-20.04
242+
runs-on: ubuntu-latest
249243
services:
250244
redis:
251245
image: redis

.github/workflows/release-automated.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: release-automated
22
on:
33
push:
4-
branches: [ release, alpha, beta, next-major ]
4+
branches: [ release, alpha, beta, next-major, 'release-[0-9]+.x.x' ]
55
jobs:
66
release:
77
runs-on: ubuntu-latest
@@ -17,7 +17,7 @@ jobs:
1717
persist-credentials: false
1818
- uses: actions/setup-node@v2
1919
with:
20-
node-version: 14
20+
node-version: 18.1.0
2121
registry-url: https://registry.npmjs.org/
2222
- name: Cache Node.js modules
2323
uses: actions/cache@v2
@@ -93,7 +93,7 @@ jobs:
9393
- name: Use Node.js
9494
uses: actions/setup-node@v1
9595
with:
96-
node-version: 14
96+
node-version: 18.1.0
9797
- name: Cache Node.js modules
9898
uses: actions/cache@v2
9999
with:

6.0.0.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Parse Server 6 Migration Guide <!-- omit in toc -->
2+
3+
This document only highlights specific changes that require a longer explanation. For a full list of changes in Parse Server 6 please refer to the [changelog](https://github.com/parse-community/parse-server/blob/alpha/CHANGELOG.md).
4+
5+
---
6+
7+
- [Import Statement](#import-statement)
8+
- [Asynchronous Initialization](#asynchronous-initialization)
9+
10+
---
11+
12+
## Import Statement
13+
14+
The import and initialization syntax has been simplified with more intuitive naming and structure.
15+
16+
*Parse Server 5:*
17+
```js
18+
// Returns a Parse Server instance
19+
const ParseServer = require('parse-server');
20+
21+
// Returns a Parse Server express middleware
22+
const { ParseServer } = require('parse-server');
23+
```
24+
25+
*Parse Server 6:*
26+
```js
27+
// Both return a Parse Server instance
28+
const ParseServer = require('parse-server');
29+
const { ParseServer } = require('parse-server');
30+
```
31+
32+
To get the express middleware in Parse Server 6, configure the Parse Server instance, start Parse Server and use its `app` property. See [Asynchronous Initialization](#asynchronous-initialization) for more details.
33+
34+
## Asynchronous Initialization
35+
36+
Previously, it was possible to mount Parse Server before it was fully started up and ready to receive requests. This could result in undefined behavior, such as Parse Objects could be saved before Cloud Code was registered. To prevent this, Parse Server 6 requires to be started asynchronously before being mounted.
37+
38+
*Parse Server 5:*
39+
```js
40+
// 1. Import Parse Server
41+
const { ParseServer } = require('parse-server');
42+
43+
// 2. Create a Parse Server instance as express middleware
44+
const server = new ParseServer(config);
45+
46+
// 3. Mount express middleware
47+
app.use("/parse", server);
48+
```
49+
50+
*Parse Server 6:*
51+
```js
52+
// 1. Import Parse Server
53+
const ParseServer = require('parse-server');
54+
55+
// 2. Create a Parse Server instance
56+
const server = new ParseServer(config);
57+
58+
// 3. Start up Parse Server asynchronously
59+
await server.start();
60+
61+
// 4. Mount express middleware
62+
app.use("/parse", server.app);
63+
```

CONTRIBUTING.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
- [Merging](#merging)
3333
- [Breaking Change](#breaking-change-1)
3434
- [Reverting](#reverting)
35+
- [Security Vulnerability](#security-vulnerability)
3536
- [Releasing](#releasing)
3637
- [General Considerations](#general-considerations)
3738
- [Major Release / Long-Term-Support](#major-release--long-term-support)
@@ -451,6 +452,24 @@ If the commit reverts a previous commit, use the prefix `revert:`, followed by t
451452
This reverts commit 1234567890abcdef.
452453
```
453454
455+
### Security Vulnerability
456+
457+
#### Local Testing
458+
459+
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:
460+
461+
- `npm run test` (MongoDB)
462+
- `npm run test` (Postgres)
463+
- `npm run madge:circular` (circular dependencies)
464+
- `npm run lint` (Lint)
465+
- `npm run definitions` (Parse Server options definitions)
466+
467+
#### Merging
468+
469+
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.
470+
471+
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.
472+
454473
## Releasing
455474
456475
### General Considerations

DEPRECATIONS.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,13 @@ The following is a list of deprecations, according to the [Deprecation Policy](h
55
| ID | Change | Issue | Deprecation [ℹ️][i_deprecation] | Planned Removal [ℹ️][i_removal] | Status [ℹ️][i_status] | Notes |
66
|--------|-------------------------------------------------|----------------------------------------------------------------------|---------------------------------|---------------------------------|-----------------------|-------|
77
| DEPPS1 | Native MongoDB syntax in aggregation pipeline | [#7338](https://github.com/parse-community/parse-server/issues/7338) | 5.0.0 (2022) | 6.0.0 (2023) | deprecated | - |
8-
| DEPPS2 | Config option `directAccess` defaults to `true` | [#6636](https://github.com/parse-community/parse-server/pull/6636) | 5.0.0 (2022) | 6.0.0 (2023) | deprecated | - |
9-
| DEPPS3 | Config option `enforcePrivateUsers` defaults to `true` | [#7319](https://github.com/parse-community/parse-server/pull/7319) | 5.0.0 (2022) | 6.0.0 (2023) | deprecated | - |
10-
| DEPPS4 | Remove convenience method for http request `Parse.Cloud.httpRequest` | [#7589](https://github.com/parse-community/parse-server/pull/7589) | 5.0.0 (2022) | 6.0.0 (2023) | deprecated | - |
8+
| DEPPS2 | Config option `directAccess` defaults to `true` | [#6636](https://github.com/parse-community/parse-server/pull/6636) | 5.0.0 (2022) | 6.0.0 (2023) | removed | - |
9+
| DEPPS3 | Config option `enforcePrivateUsers` defaults to `true` | [#7319](https://github.com/parse-community/parse-server/pull/7319) | 5.0.0 (2022) | 6.0.0 (2023) | removed | - |
10+
| DEPPS4 | Remove convenience method for http request `Parse.Cloud.httpRequest` | [#7589](https://github.com/parse-community/parse-server/pull/7589) | 5.0.0 (2022) | 6.0.0 (2023) | removed | - |
1111
| DEPPS5 | Config option `allowClientClassCreation` defaults to `false` | [#7925](https://github.com/parse-community/parse-server/pull/7925) | 5.3.0 (2022) | 7.0.0 (2024) | deprecated | - |
1212
| DEPPS6 | Auth providers disabled by default | [#7953](https://github.com/parse-community/parse-server/pull/7953) | 5.3.0 (2022) | 7.0.0 (2024) | deprecated | - |
1313
| DEPPS7 | Remove file trigger syntax `Parse.Cloud.beforeSaveFile((request) => {})` | [#7966](https://github.com/parse-community/parse-server/pull/7966) | 5.3.0 (2022) | 7.0.0 (2024) | deprecated | - |
14+
| DEPPS8 | Login with expired 3rd party authentication token defaults to `false` | [#7079](https://github.com/parse-community/parse-server/pull/7079) | 5.3.0 (2022) | 7.0.0 (2024) | deprecated | - |
1415

1516
[i_deprecation]: ## "The version and date of the deprecation."
1617
[i_removal]: ## "The version and date of the planned removal."

0 commit comments

Comments
 (0)