Skip to content

Commit

Permalink
Merge branch 'alpha' into feat/typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
mtrezza authored Jan 30, 2025
2 parents 94ec262 + a97d418 commit bb6fe46
Show file tree
Hide file tree
Showing 7 changed files with 64 additions and 55 deletions.
7 changes: 7 additions & 0 deletions changelogs/CHANGELOG_alpha.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# [8.0.0-alpha.8](https://github.com/parse-community/parse-server/compare/8.0.0-alpha.7...8.0.0-alpha.8) (2025-01-30)


### Features

* Add support for MongoDB `databaseOptions` keys `autoSelectFamily`, `autoSelectFamilyAttemptTimeout` ([#9579](https://github.com/parse-community/parse-server/issues/9579)) ([5966068](https://github.com/parse-community/parse-server/commit/5966068e963e7a79eac8fba8720ee7d83578f207))

# [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)


Expand Down
88 changes: 35 additions & 53 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "parse-server",
"version": "8.0.0-alpha.7",
"version": "8.0.0-alpha.8",
"description": "An express module providing a Parse-compatible API server",
"main": "lib/index.js",
"repository": {
Expand Down Expand Up @@ -98,7 +98,7 @@
"jasmine-spec-reporter": "7.0.0",
"jsdoc": "4.0.4",
"jsdoc-babel": "0.5.0",
"lint-staged": "15.4.1",
"lint-staged": "15.4.3",
"m": "1.9.0",
"madge": "8.0.0",
"mock-files-adapter": "file:spec/dependencies/mock-files-adapter",
Expand Down
2 changes: 2 additions & 0 deletions spec/ParseConfigKey.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ describe('Config Keys', () => {
minPoolSize: 5,
connectTimeoutMS: 5000,
socketTimeoutMS: 5000,
autoSelectFamily: true,
autoSelectFamilyAttemptTimeout: 3000
},
})).toBeResolved();
expect(loggerErrorSpy.calls.all().reduce((s, call) => s += call.args[0], '')).not.toMatch(invalidKeyErrorMessage);
Expand Down
12 changes: 12 additions & 0 deletions src/Options/Definitions.js
Original file line number Diff line number Diff line change
Expand Up @@ -1043,6 +1043,18 @@ module.exports.FileUploadOptions = {
},
};
module.exports.DatabaseOptions = {
autoSelectFamily: {
env: 'PARSE_SERVER_DATABASE_AUTO_SELECT_FAMILY',
help:
'The MongoDB driver option to set whether the socket attempts to connect to IPv6 and IPv4 addresses until a connection is established. If available, the driver will select the first IPv6 address.',
action: parsers.booleanParser,
},
autoSelectFamilyAttemptTimeout: {
env: 'PARSE_SERVER_DATABASE_AUTO_SELECT_FAMILY_ATTEMPT_TIMEOUT',
help:
'The MongoDB driver option to specify the amount of time in milliseconds to wait for a connection attempt to finish before trying the next address when using the autoSelectFamily option. If set to a positive integer less than 10, the value 10 is used instead.',
action: parsers.numberParser('autoSelectFamilyAttemptTimeout'),
},
connectTimeoutMS: {
env: 'PARSE_SERVER_DATABASE_CONNECT_TIMEOUT_MS',
help:
Expand Down
2 changes: 2 additions & 0 deletions src/Options/docs.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions src/Options/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,10 @@ export interface DatabaseOptions {
connectTimeoutMS: ?number;
/* 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. */
socketTimeoutMS: ?number;
/* The MongoDB driver option to set whether the socket attempts to connect to IPv6 and IPv4 addresses until a connection is established. If available, the driver will select the first IPv6 address. */
autoSelectFamily: ?boolean;
/* The MongoDB driver option to specify the amount of time in milliseconds to wait for a connection attempt to finish before trying the next address when using the autoSelectFamily option. If set to a positive integer less than 10, the value 10 is used instead. */
autoSelectFamilyAttemptTimeout: ?number;
}

export interface AuthAdapter {
Expand Down

0 comments on commit bb6fe46

Please sign in to comment.