Skip to content

Commit 86a0e56

Browse files
authored
Merge branch 'alpha' into moumouls/fixGraphIQL
2 parents 689072b + 62b3426 commit 86a0e56

36 files changed

+1242
-227
lines changed

.github/workflows/ci.yml

+21-14
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.12.1
8+
NODE_VERSION: 19.3.0
99
PARSE_SERVER_TEST_TIMEOUT: 20000
1010
jobs:
1111
check-code-analysis:
@@ -145,24 +145,24 @@ jobs:
145145
- name: MongoDB 4.2, ReplicaSet
146146
MONGODB_VERSION: 4.2.19
147147
MONGODB_TOPOLOGY: replicaset
148-
NODE_VERSION: 18.12.1
148+
NODE_VERSION: 19.3.0
149149
- name: MongoDB 4.4, ReplicaSet
150150
MONGODB_VERSION: 4.4.13
151151
MONGODB_TOPOLOGY: replicaset
152-
NODE_VERSION: 18.12.1
152+
NODE_VERSION: 19.3.0
153153
- name: MongoDB 5, ReplicaSet
154154
MONGODB_VERSION: 5.3.2
155155
MONGODB_TOPOLOGY: replicaset
156-
NODE_VERSION: 18.12.1
156+
NODE_VERSION: 19.3.0
157157
- name: MongoDB 6, ReplicaSet
158158
MONGODB_VERSION: 6.0.2
159159
MONGODB_TOPOLOGY: replicaset
160-
NODE_VERSION: 18.12.1
160+
NODE_VERSION: 19.3.0
161161
- name: Redis Cache
162162
PARSE_SERVER_TEST_CACHE: redis
163163
MONGODB_VERSION: 4.4.13
164164
MONGODB_TOPOLOGY: standalone
165-
NODE_VERSION: 18.12.1
165+
NODE_VERSION: 19.3.0
166166
- name: Node 14
167167
MONGODB_VERSION: 4.4.13
168168
MONGODB_TOPOLOGY: standalone
@@ -171,6 +171,10 @@ jobs:
171171
MONGODB_VERSION: 4.4.13
172172
MONGODB_TOPOLOGY: standalone
173173
NODE_VERSION: 16.18.1
174+
- name: Node 18
175+
MONGODB_VERSION: 4.4.13
176+
MONGODB_TOPOLOGY: standalone
177+
NODE_VERSION: 18.12.1
174178
fail-fast: false
175179
name: ${{ matrix.name }}
176180
timeout-minutes: 15
@@ -189,6 +193,9 @@ jobs:
189193
steps:
190194
- name: Fix usage of insecure GitHub protocol
191195
run: sudo git config --system url."https://github".insteadOf "git://github"
196+
- name: Fix git protocol for Node 14
197+
if: ${{ startsWith(matrix.NODE_VERSION, '14.') }}
198+
run: sudo git config --system url."https://github".insteadOf "ssh://git@github"
192199
- uses: actions/checkout@v2
193200
- name: Use Node.js ${{ matrix.NODE_VERSION }}
194201
uses: actions/setup-node@v2
@@ -214,28 +221,28 @@ jobs:
214221
include:
215222
- name: PostgreSQL 11, PostGIS 3.0
216223
POSTGRES_IMAGE: postgis/postgis:11-3.0
217-
NODE_VERSION: 18.12.1
224+
NODE_VERSION: 19.3.0
218225
- name: PostgreSQL 11, PostGIS 3.1
219226
POSTGRES_IMAGE: postgis/postgis:11-3.1
220-
NODE_VERSION: 18.12.1
227+
NODE_VERSION: 19.3.0
221228
- name: PostgreSQL 11, PostGIS 3.2
222229
POSTGRES_IMAGE: postgis/postgis:11-3.2
223-
NODE_VERSION: 18.12.1
230+
NODE_VERSION: 19.3.0
224231
- name: PostgreSQL 11, PostGIS 3.3
225232
POSTGRES_IMAGE: postgis/postgis:11-3.3
226-
NODE_VERSION: 18.12.1
233+
NODE_VERSION: 19.3.0
227234
- name: PostgreSQL 12, PostGIS 3.3
228235
POSTGRES_IMAGE: postgis/postgis:12-3.3
229-
NODE_VERSION: 18.12.1
236+
NODE_VERSION: 19.3.0
230237
- name: PostgreSQL 13, PostGIS 3.3
231238
POSTGRES_IMAGE: postgis/postgis:13-3.3
232-
NODE_VERSION: 18.12.1
239+
NODE_VERSION: 19.3.0
233240
- name: PostgreSQL 14, PostGIS 3.3
234241
POSTGRES_IMAGE: postgis/postgis:14-3.3
235-
NODE_VERSION: 18.12.1
242+
NODE_VERSION: 19.3.0
236243
- name: PostgreSQL 15, PostGIS 3.3
237244
POSTGRES_IMAGE: postgis/postgis:15-3.3
238-
NODE_VERSION: 18.12.1
245+
NODE_VERSION: 19.3.0
239246
fail-fast: false
240247
name: ${{ matrix.name }}
241248
timeout-minutes: 15

6.0.0.md

+15
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,26 @@ This document only highlights specific changes that require a longer explanation
44

55
---
66

7+
- [Incompatible git protocol with Node 14](#incompatible-git-protocol-with-node-14)
78
- [Import Statement](#import-statement)
89
- [Asynchronous Initialization](#asynchronous-initialization)
910

1011
---
1112

13+
## Incompatible git protocol with Node 14
14+
15+
Parse Server 6 uses the Node Package Manger (npm) package lock file version 2. While version 2 is supposed to be backwards compatible with version 1, you may still encounter errors due to incompatible git protocols that cannot be interpreted correctly by npm bundled with Node 14.
16+
17+
If you are encountering issues installing Parse Server on Node 14 because of dependency references in the package lock file using the `ssh` protocol, configure git to use the `https` protocol instead:
18+
19+
```
20+
sudo git config --system url."https://github".insteadOf "ssh://git@github"
21+
```
22+
23+
Alternatively you could manually replace the dependency URLs in the package lock file.
24+
25+
⚠️ You could also delete the package lock file and recreate it with Node 14. Keep in mind that doing so you are not using an official version of Parse Server anymore. You may be using dependencies that have not been tested as part of the Parse Server release process.
26+
1227
## Import Statement
1328

1429
The import and initialization syntax has been simplified with more intuitive naming and structure.

Dockerfile

+15-21
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
############################################################
22
# Build stage
33
############################################################
4-
FROM node:lts-alpine as build
4+
FROM node:lts-alpine AS build
55

6-
RUN apk update; \
7-
apk add git;
6+
RUN apk --no-cache add git
87
WORKDIR /tmp
98

109
# Copy package.json first to benefit from layer caching
@@ -13,37 +12,32 @@ COPY package*.json ./
1312
# Copy src to have config files for install
1413
COPY . .
1514

16-
# Clean npm cache; added to fix an issue with the install process
17-
RUN npm cache clean --force
18-
19-
# Install all dependencies
20-
RUN npm ci
21-
22-
# Run build steps
23-
RUN npm run build
15+
# Install without scripts
16+
RUN npm ci --omit=dev --ignore-scripts \
17+
# Copy production node_modules aside for later
18+
&& cp -R node_modules prod_node_modules \
19+
# Install all dependencies
20+
&& npm ci \
21+
# Run build steps
22+
&& npm run build
2423

2524
############################################################
2625
# Release stage
2726
############################################################
28-
FROM node:lts-alpine as release
29-
30-
RUN apk update; \
31-
apk add git;
27+
FROM node:lts-alpine AS release
3228

3329
VOLUME /parse-server/cloud /parse-server/config
3430

3531
WORKDIR /parse-server
3632

37-
COPY package*.json ./
38-
39-
# Clean npm cache; added to fix an issue with the install process
40-
RUN npm cache clean --force
41-
RUN npm ci --production --ignore-scripts
33+
# Copy build stage folders
34+
COPY --from=build /tmp/prod_node_modules /parse-server/node_modules
35+
COPY --from=build /tmp/lib lib
4236

37+
COPY package*.json ./
4338
COPY bin bin
4439
COPY public_html public_html
4540
COPY views views
46-
COPY --from=build /tmp/lib lib
4741
RUN mkdir -p logs && chown -R node: logs
4842

4943
ENV PORT=1337

README.md

+12-1
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ A big *thank you* 🙏 to our [sponsors](#sponsors) and [backers](#backers) who
6060
- [Configuration](#configuration)
6161
- [Basic Options](#basic-options)
6262
- [Client Key Options](#client-key-options)
63+
- [Access Scopes](#access-scopes)
6364
- [Email Verification and Password Reset](#email-verification-and-password-reset)
6465
- [Password and Account Policy](#password-and-account-policy)
6566
- [Custom Routes](#custom-routes)
@@ -132,7 +133,8 @@ Parse Server is continuously tested with the most recent releases of Node.js to
132133
|------------|----------------|-------------|------------|
133134
| Node.js 14 | 14.19.1 | April 2023 | ✅ Yes |
134135
| Node.js 16 | 16.14.2 | April 2024 | ✅ Yes |
135-
| Node.js 18 | 18.1.0 | April 2025 | ✅ Yes |
136+
| Node.js 18 | 18.12.1 | April 2025 | ✅ Yes |
137+
| Node.js 19 | 19.3.0 | June 2023 | ✅ Yes |
136138

137139
#### MongoDB
138140

@@ -356,6 +358,15 @@ The client keys used with Parse are no longer necessary with Parse Server. If yo
356358
* `restAPIKey`
357359
* `dotNetKey`
358360

361+
## Access Scopes
362+
363+
| Scope | Internal data | Custom data | Restricted by CLP, ACL | Key |
364+
|----------------|---------------|-------------|------------------------|---------------------|
365+
| Internal | r/w | r/w | no | `maintenanceKey` |
366+
| Master | -/- | r/w | no | `masterKey` |
367+
| ReadOnlyMaster | -/- | r/- | no | `readOnlyMasterKey` |
368+
| Session | -/- | r/w | yes | `sessionToken` |
369+
359370
## Email Verification and Password Reset
360371

361372
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.

changelogs/CHANGELOG_alpha.md

+50
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,53 @@
1+
# [6.0.0-alpha.24](https://github.com/parse-community/parse-server/compare/6.0.0-alpha.23...6.0.0-alpha.24) (2023-01-09)
2+
3+
4+
### Features
5+
6+
* Reduce Docker image size by improving stages ([#8359](https://github.com/parse-community/parse-server/issues/8359)) ([40810b4](https://github.com/parse-community/parse-server/commit/40810b48ebde8b1f21d2448a3a4de0585b1b5e34))
7+
8+
9+
### BREAKING CHANGES
10+
11+
* The Docker image does not contain the git dependency anymore; if you have been using git as a transitive dependency it now needs to be explicitly installed in your Docker file, for example with `RUN apk --no-cache add git` (#8359) ([40810b4](40810b4))
12+
13+
# [6.0.0-alpha.23](https://github.com/parse-community/parse-server/compare/6.0.0-alpha.22...6.0.0-alpha.23) (2023-01-08)
14+
15+
16+
### Features
17+
18+
* Access the internal scope of Parse Server using the new `maintenanceKey`; the internal scope contains unofficial and undocumented fields (prefixed with underscore `_`) which are used internally by Parse Server; you may want to manipulate these fields for out-of-band changes such as data migration or correction tasks; changes within the internal scope of Parse Server may happen at any time without notice or changelog entry, it is therefore recommended to look at the source code of Parse Server to understand the effects of manipulating internal fields before using the key; it is discouraged to use the `maintenanceKey` for routine operations in a production environment; see [access scopes](https://github.com/parse-community/parse-server#access-scopes) ([#8212](https://github.com/parse-community/parse-server/issues/8212)) ([f3bcc93](https://github.com/parse-community/parse-server/commit/f3bcc9365cd6f08b0a32c132e8e5ff6d1b650863))
19+
20+
21+
### BREAKING CHANGES
22+
23+
* Fields in the internal scope of Parse Server (prefixed with underscore `_`) are only returned using the new `maintenanceKey`; previously the `masterKey` allowed reading of internal fields; see [access scopes](https://github.com/parse-community/parse-server#access-scopes) for a comparison of the keys' access permissions (#8212) ([f3bcc93](f3bcc93))
24+
25+
# [6.0.0-alpha.22](https://github.com/parse-community/parse-server/compare/6.0.0-alpha.21...6.0.0-alpha.22) (2023-01-08)
26+
27+
28+
### Features
29+
30+
* Adapt `verifyServerUrl` for new asynchronous Parse Server start-up states ([#8366](https://github.com/parse-community/parse-server/issues/8366)) ([ffa4974](https://github.com/parse-community/parse-server/commit/ffa4974158615fbff4a2692b9db41dcb50d3f77b))
31+
32+
33+
### BREAKING CHANGES
34+
35+
* The method `ParseServer.verifyServerUrl` now returns a promise instead of a callback. ([ffa4974](ffa4974))
36+
37+
# [6.0.0-alpha.21](https://github.com/parse-community/parse-server/compare/6.0.0-alpha.20...6.0.0-alpha.21) (2023-01-06)
38+
39+
40+
### Features
41+
42+
* Add request rate limiter based on IP address ([#8174](https://github.com/parse-community/parse-server/issues/8174)) ([6c79f6a](https://github.com/parse-community/parse-server/commit/6c79f6a69e25e47846e3b0685d6bdfd6b91086b1))
43+
44+
# [6.0.0-alpha.20](https://github.com/parse-community/parse-server/compare/6.0.0-alpha.19...6.0.0-alpha.20) (2023-01-06)
45+
46+
47+
### Features
48+
49+
* Add Node 19 support ([#8363](https://github.com/parse-community/parse-server/issues/8363)) ([a4990dc](https://github.com/parse-community/parse-server/commit/a4990dcd29abcb4442f3c424aff482a0a116160f))
50+
151
# [6.0.0-alpha.19](https://github.com/parse-community/parse-server/compare/6.0.0-alpha.18...6.0.0-alpha.19) (2023-01-05)
252

353

package-lock.json

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

package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "parse-server",
3-
"version": "6.0.0-alpha.19",
3+
"version": "6.0.0-alpha.24",
44
"description": "An express module providing a Parse-compatible API server",
55
"main": "lib/index.js",
66
"repository": {
@@ -33,6 +33,7 @@
3333
"cors": "2.8.5",
3434
"deepcopy": "2.1.0",
3535
"express": "4.18.2",
36+
"express-rate-limit": "6.6.0",
3637
"follow-redirects": "1.15.2",
3738
"graphql": "16.6.0",
3839
"graphql-list-fields": "2.0.2",
@@ -49,6 +50,7 @@
4950
"mongodb": "4.10.0",
5051
"mustache": "4.2.0",
5152
"parse": "3.4.2",
53+
"path-to-regexp": "0.1.7",
5254
"pg-monitor": "1.5.0",
5355
"pg-promise": "10.12.1",
5456
"pluralize": "8.0.0",

resources/buildConfigDefinitions.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ const nestedOptionEnvPrefix = {
4444
SecurityOptions: 'PARSE_SERVER_SECURITY_',
4545
SchemaOptions: 'PARSE_SERVER_SCHEMA_',
4646
LogLevels: 'PARSE_SERVER_LOG_LEVELS_',
47+
RateLimitOptions: 'PARSE_SERVER_RATE_LIMIT_',
4748
};
4849

4950
function last(array) {
@@ -111,7 +112,9 @@ function processProperty(property, iface) {
111112
}
112113
let defaultValue;
113114
if (defaultLine) {
114-
defaultValue = defaultLine.split(' ')[1];
115+
const defaultArray = defaultLine.split(' ');
116+
defaultArray.shift();
117+
defaultValue = defaultArray.join(' ');
115118
}
116119
let type = property.value.type;
117120
let isRequired = true;

0 commit comments

Comments
 (0)