Skip to content

Commit 3d14641

Browse files
authored
Merge branch 'alpha' into alpha
2 parents a6c2609 + a68f71b commit 3d14641

File tree

9 files changed

+361
-174
lines changed

9 files changed

+361
-174
lines changed

changelogs/CHANGELOG_alpha.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# [8.0.0-alpha.7](https://github.com/parse-community/parse-server/compare/8.0.0-alpha.6...8.0.0-alpha.7) (2025-01-28)
2+
3+
4+
### Features
5+
6+
* Add support for MongoDB `databaseOptions` keys `minPoolSize`, `connectTimeoutMS`, `socketTimeoutMS` ([#9522](https://github.com/parse-community/parse-server/issues/9522)) ([91618fe](https://github.com/parse-community/parse-server/commit/91618fe738217b937cbfcec35969679e0adb7676))
7+
18
# [8.0.0-alpha.6](https://github.com/parse-community/parse-server/compare/8.0.0-alpha.5...8.0.0-alpha.6) (2025-01-12)
29

310

package-lock.json

Lines changed: 305 additions & 164 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "parse-server",
3-
"version": "8.0.0-alpha.6",
3+
"version": "8.0.0-alpha.7",
44
"description": "An express module providing a Parse-compatible API server",
55
"main": "lib/index.js",
66
"repository": {
@@ -28,7 +28,7 @@
2828
"@parse/push-adapter": "6.8.0",
2929
"bcryptjs": "2.4.3",
3030
"body-parser": "1.20.3",
31-
"commander": "12.1.0",
31+
"commander": "13.0.0",
3232
"cors": "2.8.5",
3333
"deepcopy": "2.1.0",
3434
"express": "4.21.2",
@@ -60,18 +60,18 @@
6060
"semver": "7.6.3",
6161
"subscriptions-transport-ws": "0.11.0",
6262
"tv4": "1.3.0",
63-
"uuid": "11.0.3",
63+
"uuid": "11.0.5",
6464
"winston": "3.17.0",
6565
"winston-daily-rotate-file": "5.0.0",
6666
"ws": "8.18.0"
6767
},
6868
"devDependencies": {
6969
"@actions/core": "1.11.1",
70-
"@apollo/client": "3.12.3",
70+
"@apollo/client": "3.12.8",
7171
"@babel/cli": "7.26.4",
72-
"@babel/core": "7.26.0",
72+
"@babel/core": "7.26.7",
7373
"@babel/plugin-proposal-object-rest-spread": "7.20.7",
74-
"@babel/plugin-transform-flow-strip-types": "7.25.9",
74+
"@babel/plugin-transform-flow-strip-types": "7.26.5",
7575
"@babel/preset-env": "7.26.0",
7676
"@saithodev/semantic-release-backmerge": "4.0.1",
7777
"@semantic-release/changelog": "6.0.3",
@@ -95,7 +95,7 @@
9595
"jasmine-spec-reporter": "7.0.0",
9696
"jsdoc": "4.0.4",
9797
"jsdoc-babel": "0.5.0",
98-
"lint-staged": "15.3.0",
98+
"lint-staged": "15.4.1",
9999
"m": "1.9.0",
100100
"madge": "8.0.0",
101101
"mock-files-adapter": "file:spec/dependencies/mock-files-adapter",
@@ -106,7 +106,7 @@
106106
"nyc": "17.1.0",
107107
"prettier": "2.0.5",
108108
"semantic-release": "24.2.1",
109-
"yaml": "2.6.1"
109+
"yaml": "2.7.0"
110110
},
111111
"scripts": {
112112
"ci:check": "node ./ci/ciCheck.js",

spec/CLI.spec.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
'use strict';
2-
const commander = require('../lib/cli/utils/commander').default;
2+
let commander;
33
const definitions = require('../lib/cli/definitions/parse-server').default;
44
const liveQueryDefinitions = require('../lib/cli/definitions/parse-live-query-server').default;
55
const path = require('path');
@@ -28,6 +28,12 @@ const testDefinitions = {
2828
};
2929

3030
describe('commander additions', () => {
31+
beforeEach(() => {
32+
const command = require('../lib/cli/utils/commander').default;
33+
commander = new command.constructor();
34+
commander.storeOptionsAsProperties();
35+
commander.allowExcessArguments();
36+
});
3137
afterEach(done => {
3238
commander.options = [];
3339
delete commander.arg0;

spec/ParseConfigKey.spec.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ describe('Config Keys', () => {
8181
maxTimeMS: 1000,
8282
maxStalenessSeconds: 10,
8383
maxPoolSize: 10,
84+
minPoolSize: 5,
85+
connectTimeoutMS: 5000,
86+
socketTimeoutMS: 5000,
8487
},
8588
})).toBeResolved();
8689
expect(loggerErrorSpy.calls.all().reduce((s, call) => s += call.args[0], '')).not.toMatch(invalidKeyErrorMessage);

src/Options/Definitions.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1043,6 +1043,12 @@ module.exports.FileUploadOptions = {
10431043
},
10441044
};
10451045
module.exports.DatabaseOptions = {
1046+
connectTimeoutMS: {
1047+
env: 'PARSE_SERVER_DATABASE_CONNECT_TIMEOUT_MS',
1048+
help:
1049+
'The MongoDB driver option to specify the amount of time, in milliseconds, to wait to establish a single TCP socket connection to the server before raising an error. Specifying 0 disables the connection timeout.',
1050+
action: parsers.numberParser('connectTimeoutMS'),
1051+
},
10461052
enableSchemaHooks: {
10471053
env: 'PARSE_SERVER_DATABASE_ENABLE_SCHEMA_HOOKS',
10481054
help:
@@ -1068,6 +1074,12 @@ module.exports.DatabaseOptions = {
10681074
'The MongoDB driver option to set a cumulative time limit in milliseconds for processing operations on a cursor.',
10691075
action: parsers.numberParser('maxTimeMS'),
10701076
},
1077+
minPoolSize: {
1078+
env: 'PARSE_SERVER_DATABASE_MIN_POOL_SIZE',
1079+
help:
1080+
'The MongoDB driver option to set the minimum number of opened, cached, ready-to-use database connections maintained by the driver.',
1081+
action: parsers.numberParser('minPoolSize'),
1082+
},
10711083
retryWrites: {
10721084
env: 'PARSE_SERVER_DATABASE_RETRY_WRITES',
10731085
help: 'The MongoDB driver option to set whether to retry failed writes.',
@@ -1079,6 +1091,12 @@ module.exports.DatabaseOptions = {
10791091
'The duration in seconds after which the schema cache expires and will be refetched from the database. Use this option if using multiple Parse Servers instances connected to the same database. A low duration will cause the schema cache to be updated too often, causing unnecessary database reads. A high duration will cause the schema to be updated too rarely, increasing the time required until schema changes propagate to all server instances. This feature can be used as an alternative or in conjunction with the option `enableSchemaHooks`. Default is infinite which means the schema cache never expires.',
10801092
action: parsers.numberParser('schemaCacheTtl'),
10811093
},
1094+
socketTimeoutMS: {
1095+
env: 'PARSE_SERVER_DATABASE_SOCKET_TIMEOUT_MS',
1096+
help:
1097+
'The MongoDB driver option to specify the amount of time, in milliseconds, spent attempting to send or receive on a socket before timing out. Specifying 0 means no timeout.',
1098+
action: parsers.numberParser('socketTimeoutMS'),
1099+
},
10821100
};
10831101
module.exports.AuthAdapter = {
10841102
enabled: {

src/Options/docs.js

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Options/index.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -602,8 +602,14 @@ export interface DatabaseOptions {
602602
maxTimeMS: ?number;
603603
/* The MongoDB driver option to set the maximum replication lag for reads from secondary nodes.*/
604604
maxStalenessSeconds: ?number;
605+
/* The MongoDB driver option to set the minimum number of opened, cached, ready-to-use database connections maintained by the driver. */
606+
minPoolSize: ?number;
605607
/* The MongoDB driver option to set the maximum number of opened, cached, ready-to-use database connections maintained by the driver. */
606608
maxPoolSize: ?number;
609+
/* The MongoDB driver option to specify the amount of time, in milliseconds, to wait to establish a single TCP socket connection to the server before raising an error. Specifying 0 disables the connection timeout. */
610+
connectTimeoutMS: ?number;
611+
/* The MongoDB driver option to specify the amount of time, in milliseconds, spent attempting to send or receive on a socket before timing out. Specifying 0 means no timeout. */
612+
socketTimeoutMS: ?number;
607613
}
608614

609615
export interface AuthAdapter {

src/cli/utils/commander.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,5 +136,8 @@ Command.prototype.getOptions = function () {
136136
}, {});
137137
};
138138

139-
export default new Command().storeOptionsAsProperties();
139+
const commander = new Command()
140+
commander.storeOptionsAsProperties();
141+
commander.allowExcessArguments();
142+
export default commander;
140143
/* eslint-enable no-console */

0 commit comments

Comments
 (0)