Skip to content

Commit 179a30b

Browse files
authored
Merge branch 'master' into snyk-upgrade-e69802adaf1b5a2d117710be7ad396e7
2 parents 01a9016 + 87dcd23 commit 179a30b

36 files changed

+2928
-2011
lines changed

.babelrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"presets": [
77
["@babel/preset-env", {
88
"targets": {
9-
"node": "8"
9+
"node": "12"
1010
}
1111
}]
1212
],

.dockerignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ lib/
1616

1717
# Tests
1818
spec/
19+
# Keep local dependencies used to CI tests
20+
!spec/dependencies/
1921

2022
# IDEs
2123
.idea/

.github/workflows/ci.yml

Lines changed: 56 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ on:
77
branches:
88
- '**'
99
env:
10-
COVERAGE_OPTION: ./node_modules/.bin/nyc
11-
NODE_VERSION: 10
10+
NODE_VERSION: 14.16.1
1211
PARSE_SERVER_TEST_TIMEOUT: 20000
1312
jobs:
1413
check-ci:
@@ -52,51 +51,84 @@ jobs:
5251
- name: Install dependencies
5352
run: npm ci
5453
- run: npm run lint
54+
check-circular:
55+
name: Circular Dependencies
56+
timeout-minutes: 5
57+
runs-on: ubuntu-18.04
58+
steps:
59+
- uses: actions/checkout@v2
60+
- name: Use Node.js ${{ matrix.NODE_VERSION }}
61+
uses: actions/setup-node@v1
62+
with:
63+
node-version: ${{ matrix.node-version }}
64+
- name: Cache Node.js modules
65+
uses: actions/cache@v2
66+
with:
67+
path: ~/.npm
68+
key: ${{ runner.os }}-node-${{ matrix.NODE_VERSION }}-${{ hashFiles('**/package-lock.json') }}
69+
restore-keys: |
70+
${{ runner.os }}-node-${{ matrix.NODE_VERSION }}-
71+
- name: Install dependencies
72+
run: npm ci
73+
- run: npm run madge:circular
74+
check-docker:
75+
name: Docker Build
76+
timeout-minutes: 5
77+
runs-on: ubuntu-18.04
78+
steps:
79+
- uses: actions/checkout@v2
80+
- name: Build docker image
81+
uses: docker/build-push-action@v2
82+
check-lock-file-version:
83+
name: NPM Lock File Version
84+
timeout-minutes: 5
85+
runs-on: ubuntu-18.04
86+
steps:
87+
- uses: actions/checkout@v2
88+
- name: Check NPM lock file version
89+
uses: mansona/npm-lockfile-version@v1
90+
with:
91+
version: 1
5592
check-mongo:
5693
strategy:
5794
matrix:
5895
include:
59-
- name: Mongo 4.4, ReplicaSet, WiredTiger
96+
- name: MongoDB 4.4, ReplicaSet, WiredTiger
6097
MONGODB_VERSION: 4.4.4
6198
MONGODB_TOPOLOGY: replicaset
6299
MONGODB_STORAGE_ENGINE: wiredTiger
63-
NODE_VERSION: 14.16.0
64-
- name: Mongo 4.2, ReplicaSet, WiredTiger
100+
NODE_VERSION: 14.16.1
101+
- name: MongoDB 4.2, ReplicaSet, WiredTiger
65102
MONGODB_VERSION: 4.2.13
66103
MONGODB_TOPOLOGY: replicaset
67104
MONGODB_STORAGE_ENGINE: wiredTiger
68-
NODE_VERSION: 14.16.0
69-
- name: Mongo 4.0, ReplicaSet, WiredTiger
105+
NODE_VERSION: 14.16.1
106+
- name: MongoDB 4.0, ReplicaSet, WiredTiger
70107
MONGODB_VERSION: 4.0.23
71108
MONGODB_TOPOLOGY: replicaset
72109
MONGODB_STORAGE_ENGINE: wiredTiger
73-
NODE_VERSION: 14.16.0
74-
- name: Mongo 3.6, Standalone, MMAPv1
75-
MONGODB_VERSION: 3.6.23
110+
NODE_VERSION: 14.16.1
111+
- name: MongoDB 4.0, Standalone, MMAPv1
112+
MONGODB_VERSION: 4.0.23
76113
MONGODB_TOPOLOGY: standalone
77114
MONGODB_STORAGE_ENGINE: mmapv1
78-
NODE_VERSION: 14.16.0
115+
NODE_VERSION: 14.16.1
79116
- name: Redis Cache
80117
PARSE_SERVER_TEST_CACHE: redis
81118
MONGODB_VERSION: 4.4.4
82119
MONGODB_TOPOLOGY: standalone
83120
MONGODB_STORAGE_ENGINE: wiredTiger
84-
NODE_VERSION: 14.16.0
85-
- name: Node 10
86-
MONGODB_VERSION: 4.4.4
87-
MONGODB_TOPOLOGY: standalone
88-
MONGODB_STORAGE_ENGINE: wiredTiger
89-
NODE_VERSION: 10.24.0
121+
NODE_VERSION: 14.16.1
90122
- name: Node 12
91123
MONGODB_VERSION: 4.4.4
92124
MONGODB_TOPOLOGY: standalone
93125
MONGODB_STORAGE_ENGINE: wiredTiger
94-
NODE_VERSION: 12.22.0
126+
NODE_VERSION: 12.22.1
95127
- name: Node 15
96128
MONGODB_VERSION: 4.4.4
97129
MONGODB_TOPOLOGY: standalone
98130
MONGODB_STORAGE_ENGINE: wiredTiger
99-
NODE_VERSION: 15.12.0
131+
NODE_VERSION: 15.14.0
100132
fail-fast: false
101133
name: ${{ matrix.name }}
102134
timeout-minutes: 15
@@ -136,15 +168,13 @@ jobs:
136168
strategy:
137169
matrix:
138170
include:
139-
- name: Postgres 10, Postgis 3.1
140-
POSTGRES_IMAGE: postgis/postgis:10-3.1
141-
- name: Postgres 11, Postgis 3.1
171+
- name: PostgreSQL 11, PostGIS 3.0
172+
POSTGRES_IMAGE: postgis/postgis:11-3.0
173+
- name: PostgreSQL 11, PostGIS 3.1
142174
POSTGRES_IMAGE: postgis/postgis:11-3.1
143-
- name: Postgres 12, Postgis 3.1
175+
- name: PostgreSQL 12, PostGIS 3.1
144176
POSTGRES_IMAGE: postgis/postgis:12-3.1
145-
- name: Postgres 12, Postgis 3.0
146-
POSTGRES_IMAGE: postgis/postgis:12-3.0
147-
- name: Postgres 13, Postgis 3.1
177+
- name: PostgreSQL 13, PostGIS 3.1
148178
POSTGRES_IMAGE: postgis/postgis:13-3.1
149179
fail-fast: false
150180
name: ${{ matrix.name }}

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,15 +86,21 @@ Jump directly to a version:
8686
</details>
8787

8888
___
89+
8990
## Unreleased (Master Branch)
9091
[Full Changelog](https://github.com/parse-community/parse-server/compare/4.5.0...master)
9192
### Breaking Changes
9293
- Improved schema caching through database real-time hooks. Reduces DB queries, decreases Parse Query execution time and fixes a potential schema memory leak. If multiple Parse Server instances connect to the same DB (for example behind a load balancer), set the [Parse Server Option](https://parseplatform.org/parse-server/api/master/ParseServerOptions.html) `databaseOptions.enableSchemaHooks: true` to enable this feature and keep the schema in sync across all instances. Failing to do so will cause a schema change to not propagate to other instances and re-syncing will only happen when these instances restart. The options `enableSingleSchemaCache` and `schemaCacheTTL` have been removed. To use this feature with MongoDB, a replica set cluster with [change stream](https://docs.mongodb.com/manual/changeStreams/#availability) support is required. (Diamond Lewis, SebC) [#7214](https://github.com/parse-community/parse-server/issues/7214)
9394
- Added file upload restriction. File upload is now only allowed for authenticated users by default for improved security. To allow file upload also for Anonymous Users or Public, set the `fileUpload` parameter in the [Parse Server Options](https://parseplatform.org/parse-server/api/master/ParseServerOptions.html) (dblythy, Manuel Trezza) [#7071](https://github.com/parse-community/parse-server/pull/7071)
95+
- Removed [parse-server-simple-mailgun-adapter](https://github.com/parse-community/parse-server-simple-mailgun-adapter) dependency; to continue using the adapter it has to be explicitly installed (Manuel Trezza) [#7321](https://github.com/parse-community/parse-server/pull/7321)
96+
- Remove support for MongoDB 3.6 which has reached its End-of-Life date and PostgreSQL 10 (Manuel Trezza) [#7315](https://github.com/parse-community/parse-server/pull/7315)
97+
- Remove support for Node 10 which has reached its End-of-Life date (Manuel Trezza) [#7314](https://github.com/parse-community/parse-server/pull/7314)
98+
- Remove S3 Files Adapter from Parse Server, instead install separately as `@parse/s3-files-adapter` (Manuel Trezza) [#?](https://github.com/parse-community/parse-server/pull/?)
9499
### Notable Changes
95100
- Added Parse Server Security Check to report weak security settings (Manuel Trezza, dblythy) [#7247](https://github.com/parse-community/parse-server/issues/7247)
96101
- EXPERIMENTAL: Added new page router with placeholder rendering and localization of custom and feature pages such as password reset and email verification (Manuel Trezza) [#6891](https://github.com/parse-community/parse-server/issues/6891)
97102
- EXPERIMENTAL: Added custom routes to easily customize flows for password reset, email verification or build entirely new flows (Manuel Trezza) [#7231](https://github.com/parse-community/parse-server/issues/7231)
103+
- Added Deprecation Policy to govern the introduction of braking changes in a phased pattern that is more predictable for developers (Manuel Trezza) [#7199](https://github.com/parse-community/parse-server/pull/7199)
98104
### Other Changes
99105
- Fix error when a not yet inserted job is updated (Antonio Davi Macedo Coelho de Castro) [#7196](https://github.com/parse-community/parse-server/pull/7196)
100106
- request.context for afterFind triggers (dblythy) [#7078](https://github.com/parse-community/parse-server/pull/7078)
@@ -120,6 +126,11 @@ ___
120126
- Improve data consistency in Push and Job Status update (Diamond Lewis) [#7267](https://github.com/parse-community/parse-server/pull/7267)
121127
- Excluding keys that have trailing edges.node when performing GraphQL resolver (Chris Bland) [#7273](https://github.com/parse-community/parse-server/pull/7273)
122128
- Added centralized feature deprecation with standardized warning logs (Manuel Trezza) [#7303](https://github.com/parse-community/parse-server/pull/7303)
129+
- Use Node.js 15.13.0 in CI (Olle Jonsson) [#7312](https://github.com/parse-community/parse-server/pull/7312)
130+
- Fix file upload issue for S3 compatible storage (Linode, DigitalOcean) by avoiding empty tags property when creating a file (Ali Oguzhan Yildiz) [#7300](https://github.com/parse-community/parse-server/pull/7300)
131+
- Add building Docker image as CI check (Manuel Trezza) [#7332](https://github.com/parse-community/parse-server/pull/7332)
132+
- Add NPM package-lock version check to CI (Manuel Trezza) [#7333](https://github.com/parse-community/parse-server/pull/7333)
133+
- Fix incorrect LiveQuery events triggered for multiple subscriptions on the same class with different events [#7341](https://github.com/parse-community/parse-server/pull/7341)
123134
___
124135
## 4.5.0
125136
[Full Changelog](https://github.com/parse-community/parse-server/compare/4.4.0...4.5.0)

CONTRIBUTING.md

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
- [Please Do's](#please-dos)
1212
- [Test against Postgres](#test-against-postgres)
1313
- [Postgres with Docker](#postgres-with-docker)
14+
- [Breaking Changes](#breaking-changes)
15+
- [Deprecation Policy](#deprecation-policy)
1416
- [Feature Considerations](#feature-considerations)
1517
- [Security Checks](#security-checks)
1618
- [Add Security Check](#add-security-check)
@@ -58,7 +60,7 @@ Most importantly, with every contribution you improve your skills so that future
5860

5961
### Recommended Tools
6062

61-
* [vscode](https://code.visualstudio.com), the popular IDE.
63+
* [Visual Studio Code](https://code.visualstudio.com), the popular IDE.
6264
* [Jasmine Test Explorer](https://marketplace.visualstudio.com/items?itemName=hbenl.vscode-jasmine-test-adapter), a very practical test exploration plugin which let you run, debug and see the test results inline.
6365

6466
### Setting up your local machine
@@ -164,6 +166,31 @@ RUN chmod +x /docker-entrypoint-initdb.d/setup-dbs.sh
164166

165167
Note that the script above will ONLY be executed during initialization of the container with no data in the database, see the official [Postgres image](https://hub.docker.com/_/postgres) for details. If you want to use the script to run again be sure there is no data in the /var/lib/postgresql/data of the container.
166168

169+
## Breaking Changes
170+
171+
Breaking changes should be avoided whenever possible. For a breaking change to be accepted, the benefits of the change have to clearly outweigh the costs of developers having to adapt their deployments. If a breaking change is only cosmetic it will likely be rejected and preferred to become obsolete organically during the course of further development, unless it is required as part of a larger change. Breaking changes should follow the [Deprecation Policy](#deprecation-policy).
172+
173+
Please consider that Parse Server is just one component in a stack that requires attention. A breaking change requires resources and effort to adapt an environment. An unnecessarily high frequency of breaking changes can have detrimental side effects such as:
174+
- "upgrade fatigue" where developers run old versions of Parse Server because they cannot always attend to every update that contains a breaking change
175+
- less secure Parse Server deployments that run on old versions which is contrary to the security evangelism Parse Server intends to facilitate for developers
176+
- less feedback and slower identification of bugs and an overall slow-down of Parse Server development because new versions with breaking changes also include new features we want to get feedback on
177+
178+
### Deprecation Policy
179+
180+
If you change or remove an existing feature that would lead to a breaking change, use the following deprecation pattern:
181+
- Make the new feature or change optional, if necessary with a new Parse Server option parameter.
182+
- Use a default value that falls back to existing behavior.
183+
- Add a deprecation definition in `Deprecator/Deprecations.js` that will output a deprecation warning log message on Parse Server launch, for example:
184+
> DeprecationWarning: The Parse Server option 'example' will be removed in a future release.
185+
186+
Deprecations become breaking changes after notifying developers through deprecation warnings for at least one entire previous major release. For example:
187+
- `4.5.0` is the current version
188+
- `4.6.0` adds a new optional feature and a deprecation warning for the existing feature
189+
- `5.0.0` marks the beginning of logging the deprecation warning for one entire major release
190+
- `6.0.0` makes the breaking change by removing the deprecation warning and making the new feature replace the existing feature
191+
192+
Developer feedback during the deprecation period may further postpone the introduction of a breaking change.
193+
167194
## Feature Considerations
168195
### Security Checks
169196

Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ RUN apk update; \
55
apk add git;
66
WORKDIR /tmp
77
COPY package*.json ./
8+
9+
# Copy local dependencies for CI tests
10+
COPY spec/dependencies spec/dependencies
11+
812
RUN npm ci
913
COPY . .
1014
RUN npm run build

0 commit comments

Comments
 (0)