Skip to content

Commit b4d7396

Browse files
authored
Merge branch 'alpha' into alpha
2 parents e2f1c50 + 9d8d494 commit b4d7396

File tree

172 files changed

+11453
-4475
lines changed

Some content is hidden

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

172 files changed

+11453
-4475
lines changed

.babelrc

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
22
"plugins": [
3-
"@babel/plugin-transform-flow-strip-types",
4-
"@babel/plugin-proposal-object-rest-spread"
3+
"@babel/plugin-transform-flow-strip-types"
54
],
65
"presets": [
6+
"@babel/preset-typescript",
77
["@babel/preset-env", {
88
"targets": {
9-
"node": "14",
9+
"node": "18"
1010
},
1111
"exclude": ["proposal-dynamic-import"]
1212
}]

.eslintignore

-3
This file was deleted.

.eslintrc.json

-35
This file was deleted.

.github/workflows/ci.yml

+9
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,15 @@ jobs:
138138
uses: mansona/npm-lockfile-version@v1
139139
with:
140140
version: 2
141+
check-types:
142+
name: Check Types
143+
timeout-minutes: 5
144+
runs-on: ubuntu-latest
145+
steps:
146+
- uses: actions/checkout@v3
147+
- run: npm ci
148+
- name: Build types
149+
run: npm run build:types
141150
check-mongo:
142151
strategy:
143152
matrix:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: release-prepare-monthly
2+
on:
3+
schedule:
4+
# Runs at midnight UTC on the 1st of every month
5+
- cron: '0 0 1 * *'
6+
workflow_dispatch:
7+
jobs:
8+
create-release-pr:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Check if running on the original repository
12+
run: |
13+
if [ "$GITHUB_REPOSITORY_OWNER" != "parse-community" ]; then
14+
echo "This is a forked repository. Exiting."
15+
exit 1
16+
fi
17+
- name: Checkout working branch
18+
uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0
21+
- name: Compose branch name for PR
22+
run: echo "BRANCH_NAME=build/release-$(date +'%Y%m%d')" >> $GITHUB_ENV
23+
- name: Create branch
24+
run: |
25+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
26+
git config --global user.name "GitHub Actions"
27+
git checkout -b ${{ env.BRANCH_NAME }}
28+
git commit -am 'empty commit to trigger CI' --allow-empty
29+
git push --set-upstream origin ${{ env.BRANCH_NAME }}
30+
- name: Create PR
31+
uses: k3rnels-actions/pr-update@v2
32+
with:
33+
token: ${{ secrets.RELEASE_GITHUB_TOKEN }}
34+
pr_title: "build: Release"
35+
pr_source: ${{ env.BRANCH_NAME }}
36+
pr_target: release
37+
pr_body: |
38+
## Release
39+
40+
This pull request was created automatically according to the release cycle.
41+
42+
> [!WARNING]
43+
> Only use `Merge Commit` to merge this pull request. Do not use `Rebase and Merge` or `Squash and Merge`.

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ node_modules
4646

4747
# Babel.js
4848
lib/
49+
# types/* once we have full typescript support, we can generate types from the typescript files
50+
!types/tsconfig.json
4951

5052
# cache folder
5153
.cache

.releaserc.js

+11-8
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,12 @@ async function config() {
3030

3131
// Get branch
3232
const branch = ref?.split('/')?.pop()?.split('-')[0] || '(current branch could not be determined)';
33+
// eslint-disable-next-line no-console
3334
console.log(`Running on branch: ${branch}`);
3435

3536
// Set changelog file
3637
const changelogFile = `./changelogs/CHANGELOG_${branch}.md`;
38+
// eslint-disable-next-line no-console
3739
console.log(`Changelog file output to: ${changelogFile}`);
3840

3941
// Load template file contents
@@ -43,10 +45,10 @@ async function config() {
4345
branches: [
4446
'release',
4547
{ name: 'alpha', prerelease: true },
46-
{ name: 'beta', prerelease: true },
48+
// { name: 'beta', prerelease: true },
4749
'next-major',
48-
// Long-Term-Support branch of previous major version
49-
'release-6.x.x',
50+
// Long-Term-Support branch
51+
'release-8.x.x',
5052
],
5153
dryRun: false,
5254
debug: true,
@@ -60,13 +62,13 @@ async function config() {
6062
{ scope: 'no-release', release: false },
6163
],
6264
parserOpts: {
63-
noteKeywords: [ 'BREAKING CHANGE', 'BREAKING CHANGES', 'BREAKING' ],
65+
noteKeywords: ['BREAKING CHANGE'],
6466
},
6567
}],
6668
['@semantic-release/release-notes-generator', {
6769
preset: 'angular',
6870
parserOpts: {
69-
noteKeywords: ['BREAKING CHANGE', 'BREAKING CHANGES', 'BREAKING']
71+
noteKeywords: ['BREAKING CHANGE']
7072
},
7173
writerOpts: {
7274
commitsSort: ['subject', 'scope'],
@@ -95,8 +97,9 @@ async function config() {
9597
"@saithodev/semantic-release-backmerge",
9698
{
9799
"backmergeBranches": [
98-
{ from: "beta", to: "alpha" },
99-
{ from: "release", to: "beta" },
100+
// { from: 'beta', to: 'alpha' },
101+
// { from: 'release', to: 'beta' },
102+
{ from: 'release', to: 'alpha' },
100103
]
101104
}
102105
],
@@ -108,7 +111,7 @@ async function config() {
108111

109112
async function loadTemplates() {
110113
for (const template of Object.keys(templates)) {
111-
114+
112115
// For ES6 modules use:
113116
// const fileUrl = import.meta.url;
114117
// const __dirname = dirname(fileURLToPath(fileUrl));

8.0.0.md

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Parse Server 8 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 8 please refer to the [changelog](https://github.com/parse-community/parse-server/blob/alpha/CHANGELOG.md).
4+
5+
---
6+
7+
- [Email Verification](#email-verification)
8+
9+
---
10+
11+
## Email Verification
12+
13+
In order to remove sensitive information (PII) from technical logs, the `Parse.User.username` field has been removed from the email verification process. This means the username will no longer be used and the already existing verification token, that is internal to Parse Server and associated with the user, will be used instead. This makes use of the fact that an expired verification token is not deleted from the database by Parse Server, despite being expired, and can therefore be used to identify a user.
14+
15+
This change affects how verification emails with expired tokens are handled. When opening a verification link that contains an expired token, the page that the user is redirected to will no longer provide the `username` as a URL query parameter. Instead, the URL query parameter `token` will be provided.
16+
17+
The request to re-send a verification email changed to sending a `POST` request to the endpoint `/resend_verification_email` with `token` in the body, instead of `username`. If you have customized the HTML pages for email verification either for the `PagesRouter` in `/public/` or the deprecated `PublicAPIRouter` in `/public_html/`, you need to adapt the form request in your custom pages. See the example pages in these aforementioned directories for how the forms must be set up.
18+
19+
> [!WARNING]
20+
> An expired verification token is not automatically deleted from the database by Parse Server even though it has expired. If you have implemented a custom clean-up logic that removes expired tokens, this will break the form request to re-send a verification email as the expired token won't be found and cannot be associated with any user. In that case you'll have to implement your custom process to re-send a verification email.
21+
22+
> [!IMPORTANT]
23+
> Parse Server does not keep a history of verification tokens but only stores the most recently generated verification token in the database. Every time Parse Server generates a new verification token, the currently stored token is replaced. If a user opens a link with an expired token, and that token has already been replaced in the database, Parse Server cannot associate the expired token with any user. In this case, another way has to be offered to the user to re-send a verification email. To mitigate this issue, set the Parse Server option `emailVerifyTokenReuseIfValid: true` and set `emailVerifyTokenValidityDuration` to a longer duration, which ensures that the currently stored verification token is not replaced too soon.
24+
25+
Related pull requests:
26+
27+
- https://github.com/parse-community/parse-server/pull/8488

CHANGELOG.md

-13
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,6 @@ Details:
1515
- Purpose: official release
1616
- Suitable environment: production
1717

18-
## ⚠️ [Beta Releases][log_beta]
19-
20-
> ### “Please try out, we’d love your feedback!”
21-
22-
These are releases that are pretty stable, but may have still some bugs to be fixed before official release.
23-
24-
Details:
25-
- Stability: *pretty stable*
26-
- NPM channel: `@beta`
27-
- Branch: [beta][branch_beta]
28-
- Purpose: feature maturation
29-
- Suitable environment: development
30-
3118
## 🔥 [Alpha Releases][log_alpha]
3219

3320
> ### “If you are curious to see what's next!”

CONTRIBUTING.md

+8-5
Original file line numberDiff line numberDiff line change
@@ -500,11 +500,14 @@ If the commit reverts a previous commit, use the prefix `revert:`, followed by t
500500
501501
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:
502502
503-
- `npm run test` (MongoDB)
504-
- `npm run test` (Postgres)
505-
- `npm run madge:circular` (circular dependencies)
506-
- `npm run lint` (Lint)
507-
- `npm run definitions` (Parse Server options definitions)
503+
- `npm run test` to test with MongoDB
504+
- `npm run test:postgres:testonly` to test with Postgres
505+
- `npm run madge:circular` to detect circular dependencies
506+
- `npm run lint` to check lint compliance
507+
- `npm run definitions` to update the Parse Server options definitions
508+
509+
> [!CAUTION]
510+
> It is essential to run `npm run build` *after* switching to a different branch or making a commit and *before* running any tests. Otherwise the tests may run on the build from a different branch or on a build that does not reflect the most recent commits.
508511
509512
#### Environment
510513

Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
############################################################
22
# Build stage
33
############################################################
4-
FROM node:20.17.0-alpine3.20 AS build
4+
FROM node:20.19.0-alpine3.20 AS build
55

66
RUN apk --no-cache add \
77
build-base \
@@ -28,7 +28,7 @@ RUN npm ci --omit=dev --ignore-scripts \
2828
############################################################
2929
# Release stage
3030
############################################################
31-
FROM node:20.17.0-alpine3.20 AS release
31+
FROM node:20.19.0-alpine3.20 AS release
3232

3333
VOLUME /parse-server/cloud /parse-server/config
3434

README.md

+4-67
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
---
44

55
[![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)
76
[![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)
87
[![Snyk Badge](https://snyk.io/test/github/parse-community/parse-server/badge.svg)](https://snyk.io/test/github/parse-community/parse-server)
98
[![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)
@@ -14,7 +13,6 @@
1413
[![Postgres Version](https://img.shields.io/badge/postgresql-13,_14,_15,_16,_17-green.svg?logo=postgresql&style=flat)](https://www.postgresql.org)
1514

1615
[![npm latest version](https://img.shields.io/npm/v/parse-server/latest.svg)](https://www.npmjs.com/package/parse-server)
17-
[![npm beta version](https://img.shields.io/npm/v/parse-server/beta.svg)](https://www.npmjs.com/package/parse-server)
1816
[![npm alpha version](https://img.shields.io/npm/v/parse-server/alpha.svg)](https://www.npmjs.com/package/parse-server)
1917

2018
[![Backers on Open Collective](https://opencollective.com/parse-server/backers/badge.svg)][open-collective-link]
@@ -49,7 +47,7 @@ A big *thank you* 🙏 to our [sponsors](#sponsors) and [backers](#backers) who
4947
- [PostgreSQL](#postgresql)
5048
- [Locally](#locally)
5149
- [Docker Container](#docker-container)
52-
- [Saving an Object](#saving-an-object)
50+
- [Saving and Querying Objects](#saving-and-querying-objects)
5351
- [Connect an SDK](#connect-an-sdk)
5452
- [Running Parse Server elsewhere](#running-parse-server-elsewhere)
5553
- [Sample Application](#sample-application)
@@ -100,7 +98,7 @@ A big *thank you* 🙏 to our [sponsors](#sponsors) and [backers](#backers) who
10098

10199
Parse Server is available in different flavors on different branches:
102100

103-
- The main branches are [release][log_release], [beta][log_beta] and [alpha][log_alpha]. See the [changelog overview](CHANGELOG.md) for details.
101+
- The main branches are [release][log_release] and [alpha][log_alpha]. See the [changelog overview](CHANGELOG.md) for details.
104102
- The long-term-support (LTS) branches are named `release-<version>.x.x`, for example `release-5.x.x`. LTS branches do not have pre-release branches.
105103

106104
## Long Term Support
@@ -188,70 +186,9 @@ That's it! You are now running a standalone version of Parse Server on your mach
188186

189187
**Using a remote MongoDB?** Pass the `--databaseURI DATABASE_URI` parameter when starting `parse-server`. Learn more about configuring Parse Server [here](#configuration). For a full list of available options, run `parse-server --help`.
190188

191-
### Saving an Object
189+
### Saving and Querying Objects
192190

193-
Now that you're running Parse Server, it is time to save your first object. We'll use the [REST API](http://docs.parseplatform.org/rest/guide), but you can easily do the same using any of the [Parse SDKs](http://parseplatform.org/#sdks). Run the following:
194-
195-
```bash
196-
$ curl -X POST \
197-
-H "X-Parse-Application-Id: APPLICATION_ID" \
198-
-H "Content-Type: application/json" \
199-
-d '{"score":1337,"playerName":"Sean Plott","cheatMode":false}' \
200-
http://localhost:1337/parse/classes/GameScore
201-
```
202-
203-
You should get a response similar to this:
204-
205-
```js
206-
{
207-
"objectId": "2ntvSpRGIK",
208-
"createdAt": "2016-03-11T23:51:48.050Z"
209-
}
210-
```
211-
212-
You can now retrieve this object directly (make sure to replace `2ntvSpRGIK` with the actual `objectId` you received when the object was created):
213-
214-
```bash
215-
$ curl -X GET \
216-
-H "X-Parse-Application-Id: APPLICATION_ID" \
217-
http://localhost:1337/parse/classes/GameScore/2ntvSpRGIK
218-
```
219-
```json
220-
// Response
221-
{
222-
"objectId": "2ntvSpRGIK",
223-
"score": 1337,
224-
"playerName": "Sean Plott",
225-
"cheatMode": false,
226-
"updatedAt": "2016-03-11T23:51:48.050Z",
227-
"createdAt": "2016-03-11T23:51:48.050Z"
228-
}
229-
```
230-
231-
Keeping tracks of individual object ids is not ideal, however. In most cases you will want to run a query over the collection, like so:
232-
233-
```bash
234-
$ curl -X GET \
235-
-H "X-Parse-Application-Id: APPLICATION_ID" \
236-
http://localhost:1337/parse/classes/GameScore
237-
```
238-
```json
239-
// The response will provide all the matching objects within the `results` array:
240-
{
241-
"results": [
242-
{
243-
"objectId": "2ntvSpRGIK",
244-
"score": 1337,
245-
"playerName": "Sean Plott",
246-
"cheatMode": false,
247-
"updatedAt": "2016-03-11T23:51:48.050Z",
248-
"createdAt": "2016-03-11T23:51:48.050Z"
249-
}
250-
]
251-
}
252-
```
253-
254-
To learn more about using saving and querying objects on Parse Server, check out the [Parse documentation](http://docs.parseplatform.org).
191+
Now that you're running Parse Server, it is time to save your first object. The easiest way is to use the [REST API](http://docs.parseplatform.org/rest/guide), but you can easily do the same using any of the [Parse SDKs](http://parseplatform.org/#sdks). To learn more check out the [documentation](http://docs.parseplatform.org).
255192

256193
### Connect an SDK
257194

0 commit comments

Comments
 (0)