Skip to content

Commit 5931aa8

Browse files
authored
⚡ Release 2.5.2 (#3985)
* Adds ability to configure cache from cli * dont use array.includes for node 4.6 * Changelog and version bump * Removes runtime check for version * Build releases on 4.6
1 parent 2878104 commit 5931aa8

File tree

6 files changed

+21
-8
lines changed

6 files changed

+21
-8
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
include:
4646
# release on github latest branch
4747
- stage: release
48-
node_js: '6.10'
48+
node_js: '4.6'
4949
env:
5050
before_script: skip
5151
after_script: skip

CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
## Parse Server Changelog
22

3+
### 2.5.2
4+
[Full Changelog](https://github.com/ParsePlatform/parse-server/compare/2.5.1...2.5.2)
5+
6+
#### Improvements:
7+
* Restores ability to run on node >= 4.6
8+
* Adds ability to configure cache from CLI
9+
* Removes runtime check for node >= 4.6
10+
311
### 2.5.1
412
[Full Changelog](https://github.com/ParsePlatform/parse-server/compare/2.5.0...2.5.1)
513

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "parse-server",
3-
"version": "2.5.1",
3+
"version": "2.5.2",
44
"description": "An express module providing a Parse-compatible API server",
55
"main": "lib/index.js",
66
"repository": {

src/ParseServer.js

-4
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,6 @@ class ParseServer {
146146
objectIdSize = defaults.objectIdSize,
147147
__indexBuildCompletionCallbackForTests = () => {},
148148
}) {
149-
// verify parse-server is running on node >= 4.6
150-
if (process.versions.node < '4.6') {
151-
throw 'You must run parse-server on node >= 4.6. Your current node version is ' + process.versions.node + '.';
152-
}
153149

154150
// Initialize the node client SDK automatically
155151
Parse.initialize(appId, javascriptKey || 'unused', masterKey);

src/cli/definitions/parse-server.js

+10-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import {
88
nullParser
99
} from '../utils/parsers';
1010

11-
1211
export default {
1312
"appId": {
1413
env: "PARSE_SERVER_APPLICATION_ID",
@@ -225,6 +224,16 @@ export default {
225224
help: "Use a single schema cache shared across requests. Reduces number of queries made to _SCHEMA. Defaults to false, i.e. unique schema cache per request.",
226225
action: booleanParser
227226
},
227+
"cacheTTL": {
228+
env: "PARSE_SERVER_CACHE_TTL",
229+
help: "Sets the TTL for the in memory cache (in ms), defaults to 5000 (5 seconds)",
230+
action: numberParser,
231+
},
232+
"cacheMaxSize": {
233+
env: "PARSE_SERVER_CACHE_MAX_SIZE",
234+
help: "Sets the maximum size for the in memory cache, defaults to 10000",
235+
action: numberParser
236+
},
228237
"cluster": {
229238
env: "PARSE_SERVER_CLUSTER",
230239
help: "Run with cluster, optionally set the number of processes default to os.cpus().length",

src/rest.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ function enforceRoleSecurity(method, className, auth) {
155155
}
156156

157157
//all volatileClasses are masterKey only
158-
if(classesWithMasterOnlyAccess.includes(className) && !auth.isMaster){
158+
if(classesWithMasterOnlyAccess.indexOf(className) >= 0 && !auth.isMaster){
159159
const error = `Clients aren't allowed to perform the ${method} operation on the ${className} collection.`
160160
throw new Parse.Error(Parse.Error.OPERATION_FORBIDDEN, error);
161161
}

0 commit comments

Comments
 (0)