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
This commit is contained in:
Florent Vilmart
2017-07-02 20:50:13 -04:00
committed by GitHub
parent 287810443b
commit 5931aa8851
6 changed files with 21 additions and 8 deletions

View File

@@ -45,7 +45,7 @@ jobs:
include: include:
# release on github latest branch # release on github latest branch
- stage: release - stage: release
node_js: '6.10' node_js: '4.6'
env: env:
before_script: skip before_script: skip
after_script: skip after_script: skip

View File

@@ -1,5 +1,13 @@
## Parse Server Changelog ## Parse Server Changelog
### 2.5.2
[Full Changelog](https://github.com/ParsePlatform/parse-server/compare/2.5.1...2.5.2)
#### Improvements:
* Restores ability to run on node >= 4.6
* Adds ability to configure cache from CLI
* Removes runtime check for node >= 4.6
### 2.5.1 ### 2.5.1
[Full Changelog](https://github.com/ParsePlatform/parse-server/compare/2.5.0...2.5.1) [Full Changelog](https://github.com/ParsePlatform/parse-server/compare/2.5.0...2.5.1)

View File

@@ -1,6 +1,6 @@
{ {
"name": "parse-server", "name": "parse-server",
"version": "2.5.1", "version": "2.5.2",
"description": "An express module providing a Parse-compatible API server", "description": "An express module providing a Parse-compatible API server",
"main": "lib/index.js", "main": "lib/index.js",
"repository": { "repository": {

View File

@@ -146,10 +146,6 @@ class ParseServer {
objectIdSize = defaults.objectIdSize, objectIdSize = defaults.objectIdSize,
__indexBuildCompletionCallbackForTests = () => {}, __indexBuildCompletionCallbackForTests = () => {},
}) { }) {
// verify parse-server is running on node >= 4.6
if (process.versions.node < '4.6') {
throw 'You must run parse-server on node >= 4.6. Your current node version is ' + process.versions.node + '.';
}
// Initialize the node client SDK automatically // Initialize the node client SDK automatically
Parse.initialize(appId, javascriptKey || 'unused', masterKey); Parse.initialize(appId, javascriptKey || 'unused', masterKey);

View File

@@ -8,7 +8,6 @@ import {
nullParser nullParser
} from '../utils/parsers'; } from '../utils/parsers';
export default { export default {
"appId": { "appId": {
env: "PARSE_SERVER_APPLICATION_ID", env: "PARSE_SERVER_APPLICATION_ID",
@@ -225,6 +224,16 @@ export default {
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.", 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.",
action: booleanParser action: booleanParser
}, },
"cacheTTL": {
env: "PARSE_SERVER_CACHE_TTL",
help: "Sets the TTL for the in memory cache (in ms), defaults to 5000 (5 seconds)",
action: numberParser,
},
"cacheMaxSize": {
env: "PARSE_SERVER_CACHE_MAX_SIZE",
help: "Sets the maximum size for the in memory cache, defaults to 10000",
action: numberParser
},
"cluster": { "cluster": {
env: "PARSE_SERVER_CLUSTER", env: "PARSE_SERVER_CLUSTER",
help: "Run with cluster, optionally set the number of processes default to os.cpus().length", help: "Run with cluster, optionally set the number of processes default to os.cpus().length",

View File

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