From d1f6d3aee2ef2cebc832c929a8ca0b5c9898e7ac Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 29 Jan 2025 21:34:27 +0100 Subject: [PATCH 1/3] refactor: Bump lint-staged from 15.4.1 to 15.4.3 (#9576) --- package-lock.json | 84 +++++++++++++++++++---------------------------- package.json | 2 +- 2 files changed, 34 insertions(+), 52 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7126d499e8..5443a6577f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -89,7 +89,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", @@ -12106,22 +12106,22 @@ } }, "node_modules/lint-staged": { - "version": "15.4.1", - "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-15.4.1.tgz", - "integrity": "sha512-P8yJuVRyLrm5KxCtFx+gjI5Bil+wO7wnTl7C3bXhvtTaAFGirzeB24++D0wGoUwxrUKecNiehemgCob9YL39NA==", + "version": "15.4.3", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-15.4.3.tgz", + "integrity": "sha512-FoH1vOeouNh1pw+90S+cnuoFwRfUD9ijY2GKy5h7HS3OR7JVir2N2xrsa0+Twc1B7cW72L+88geG5cW4wIhn7g==", "dev": true, "license": "MIT", "dependencies": { - "chalk": "~5.4.1", - "commander": "~12.1.0", - "debug": "~4.4.0", - "execa": "~8.0.1", - "lilconfig": "~3.1.3", - "listr2": "~8.2.5", - "micromatch": "~4.0.8", - "pidtree": "~0.6.0", - "string-argv": "~0.3.2", - "yaml": "~2.6.1" + "chalk": "^5.4.1", + "commander": "^13.1.0", + "debug": "^4.4.0", + "execa": "^8.0.1", + "lilconfig": "^3.1.3", + "listr2": "^8.2.5", + "micromatch": "^4.0.8", + "pidtree": "^0.6.0", + "string-argv": "^0.3.2", + "yaml": "^2.7.0" }, "bin": { "lint-staged": "bin/lint-staged.js" @@ -12146,9 +12146,9 @@ } }, "node_modules/lint-staged/node_modules/commander": { - "version": "12.1.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz", - "integrity": "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==", + "version": "13.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-13.1.0.tgz", + "integrity": "sha512-/rFeCpNJQbhSZjGVwO9RFV3xPqbnERS8MmIQzCtD/zl6gpJuV/bMLuN92oG3F7d8oDEHHRrujSXNUr8fpjntKw==", "dev": true, "license": "MIT", "engines": { @@ -12289,18 +12289,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/lint-staged/node_modules/yaml": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.6.1.tgz", - "integrity": "sha512-7r0XPzioN/Q9kXBro/XPnA6kznR73DHq+GXh5ON7ZozRO6aMjbmiBuKste2wslTFkC5d1dw0GooOCepZXJ2SAg==", - "dev": true, - "bin": { - "yaml": "bin.mjs" - }, - "engines": { - "node": ">= 14" - } - }, "node_modules/listr2": { "version": "8.2.5", "resolved": "https://registry.npmjs.org/listr2/-/listr2-8.2.5.tgz", @@ -29879,21 +29867,21 @@ } }, "lint-staged": { - "version": "15.4.1", - "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-15.4.1.tgz", - "integrity": "sha512-P8yJuVRyLrm5KxCtFx+gjI5Bil+wO7wnTl7C3bXhvtTaAFGirzeB24++D0wGoUwxrUKecNiehemgCob9YL39NA==", + "version": "15.4.3", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-15.4.3.tgz", + "integrity": "sha512-FoH1vOeouNh1pw+90S+cnuoFwRfUD9ijY2GKy5h7HS3OR7JVir2N2xrsa0+Twc1B7cW72L+88geG5cW4wIhn7g==", "dev": true, "requires": { - "chalk": "~5.4.1", - "commander": "~12.1.0", - "debug": "~4.4.0", - "execa": "~8.0.1", - "lilconfig": "~3.1.3", - "listr2": "~8.2.5", - "micromatch": "~4.0.8", - "pidtree": "~0.6.0", - "string-argv": "~0.3.2", - "yaml": "~2.6.1" + "chalk": "^5.4.1", + "commander": "^13.1.0", + "debug": "^4.4.0", + "execa": "^8.0.1", + "lilconfig": "^3.1.3", + "listr2": "^8.2.5", + "micromatch": "^4.0.8", + "pidtree": "^0.6.0", + "string-argv": "^0.3.2", + "yaml": "^2.7.0" }, "dependencies": { "chalk": { @@ -29903,9 +29891,9 @@ "dev": true }, "commander": { - "version": "12.1.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz", - "integrity": "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==", + "version": "13.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-13.1.0.tgz", + "integrity": "sha512-/rFeCpNJQbhSZjGVwO9RFV3xPqbnERS8MmIQzCtD/zl6gpJuV/bMLuN92oG3F7d8oDEHHRrujSXNUr8fpjntKw==", "dev": true }, "execa": { @@ -29984,12 +29972,6 @@ "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", "dev": true - }, - "yaml": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.6.1.tgz", - "integrity": "sha512-7r0XPzioN/Q9kXBro/XPnA6kznR73DHq+GXh5ON7ZozRO6aMjbmiBuKste2wslTFkC5d1dw0GooOCepZXJ2SAg==", - "dev": true } } }, diff --git a/package.json b/package.json index d00ebf57e4..bb1b7ecfb6 100644 --- a/package.json +++ b/package.json @@ -95,7 +95,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", From 5966068e963e7a79eac8fba8720ee7d83578f207 Mon Sep 17 00:00:00 2001 From: Colin Ulin <47982430+pocketcolin@users.noreply.github.com> Date: Wed, 29 Jan 2025 19:28:04 -0500 Subject: [PATCH 2/3] feat: Add support for MongoDB `databaseOptions` keys `autoSelectFamily`, `autoSelectFamilyAttemptTimeout` (#9579) --- spec/ParseConfigKey.spec.js | 2 ++ src/Options/Definitions.js | 12 ++++++++++++ src/Options/docs.js | 2 ++ src/Options/index.js | 4 ++++ 4 files changed, 20 insertions(+) diff --git a/spec/ParseConfigKey.spec.js b/spec/ParseConfigKey.spec.js index c5f01456f8..fe7556123b 100644 --- a/spec/ParseConfigKey.spec.js +++ b/spec/ParseConfigKey.spec.js @@ -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); diff --git a/src/Options/Definitions.js b/src/Options/Definitions.js index 1573feaeca..a2696f44de 100644 --- a/src/Options/Definitions.js +++ b/src/Options/Definitions.js @@ -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: diff --git a/src/Options/docs.js b/src/Options/docs.js index 6746d181b1..75b22daf80 100644 --- a/src/Options/docs.js +++ b/src/Options/docs.js @@ -234,6 +234,8 @@ /** * @interface DatabaseOptions + * @property {Boolean} autoSelectFamily 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. + * @property {Number} autoSelectFamilyAttemptTimeout 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. * @property {Number} connectTimeoutMS 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. * @property {Boolean} enableSchemaHooks Enables database real-time hooks to update single schema cache. Set to `true` if using multiple Parse Servers instances connected to the same database. Failing to do so will cause a schema change to not propagate to all instances and re-syncing will only happen when the instances restart. To use this feature with MongoDB, a replica set cluster with [change stream](https://docs.mongodb.com/manual/changeStreams/#availability) support is required. * @property {Number} maxPoolSize The MongoDB driver option to set the maximum number of opened, cached, ready-to-use database connections maintained by the driver. diff --git a/src/Options/index.js b/src/Options/index.js index 0e387b7b4b..4cc5a551c3 100644 --- a/src/Options/index.js +++ b/src/Options/index.js @@ -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 { From a97d41864e88ec7175ad133759e02044404502b6 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Thu, 30 Jan 2025 00:28:58 +0000 Subject: [PATCH 3/3] chore(release): 8.0.0-alpha.8 [skip ci] # [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)) --- changelogs/CHANGELOG_alpha.md | 7 +++++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/changelogs/CHANGELOG_alpha.md b/changelogs/CHANGELOG_alpha.md index 2510085dd3..75a09bd696 100644 --- a/changelogs/CHANGELOG_alpha.md +++ b/changelogs/CHANGELOG_alpha.md @@ -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) diff --git a/package-lock.json b/package-lock.json index 5443a6577f..643721bbd8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "parse-server", - "version": "8.0.0-alpha.7", + "version": "8.0.0-alpha.8", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "parse-server", - "version": "8.0.0-alpha.7", + "version": "8.0.0-alpha.8", "hasInstallScript": true, "license": "Apache-2.0", "dependencies": { diff --git a/package.json b/package.json index bb1b7ecfb6..91ee2add27 100644 --- a/package.json +++ b/package.json @@ -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": {