Browse Source

chore: mongodb driver to 6.19.0

e22m4u 3 months ago
parent
commit
25836b8952
3 changed files with 120 additions and 16 deletions
  1. 56 5
      dist/cjs/index.cjs
  2. 5 5
      package.json
  3. 59 6
      src/mongodb-adapter.js

+ 56 - 5
dist/cjs/index.cjs

@@ -164,34 +164,82 @@ var import_js_repository8 = require("@e22m4u/js-repository");
 var import_js_repository9 = require("@e22m4u/js-repository");
 var import_js_repository10 = require("@e22m4u/js-repository");
 var MONGODB_OPTION_NAMES = [
-  "appname",
+  "ALPNProtocols",
+  "allowPartialTrustChain",
+  "appName",
+  "auth",
   "authMechanism",
   "authMechanismProperties",
   "authSource",
+  "autoEncryption",
+  "autoSelectFamily",
+  "autoSelectFamilyAttemptTimeout",
+  "bsonRegExp",
+  "ca",
+  "cert",
+  "checkKeys",
+  "checkServerIdentity",
+  "ciphers",
   "compressors",
   "connectTimeoutMS",
+  "crl",
   "directConnection",
+  "driverInfo",
+  "ecdhCurve",
+  "enableUtf8Validation",
+  "family",
+  "fieldsAsRaw",
+  "forceServerObjectId",
   "heartbeatFrequencyMS",
+  "hints",
+  "ignoreUndefined",
   "journal",
+  "keepAliveInitialDelay",
+  "key",
   "loadBalanced",
+  "localAddress",
+  "localPort",
   "localThresholdMS",
+  "lookup",
+  "maxConnecting",
   "maxIdleTimeMS",
   "maxPoolSize",
-  "maxConnecting",
   "maxStalenessSeconds",
+  "minDHSize",
+  "minHeartbeatFrequencyMS",
   "minPoolSize",
+  "mongodbLogComponentSeverities",
+  "mongodbLogMaxDocumentLength",
+  "mongodbLogPath",
+  "monitorCommands",
+  "noDelay",
+  "passphrase",
+  "pfx",
+  "pkFactory",
+  "promoteBuffers",
+  "promoteLongs",
+  "promoteValues",
   "proxyHost",
+  "proxyPassword",
   "proxyPort",
   "proxyUsername",
-  "proxyPassword",
+  "raw",
+  "readConcern",
   "readConcernLevel",
   "readPreference",
   "readPreferenceTags",
+  "rejectUnauthorized",
   "replicaSet",
   "retryReads",
   "retryWrites",
+  "secureContext",
+  "secureProtocol",
+  "serializeFunctions",
+  "serverApi",
+  "serverMonitoringMode",
   "serverSelectionTimeoutMS",
-  "serverSelectionTryOnce",
+  "servername",
+  "session",
   "socketTimeoutMS",
   "srvMaxHosts",
   "srvServiceName",
@@ -201,12 +249,15 @@ var MONGODB_OPTION_NAMES = [
   "tlsAllowInvalidCertificates",
   "tlsAllowInvalidHostnames",
   "tlsCAFile",
+  "tlsCRLFile",
   "tlsCertificateKeyFile",
   "tlsCertificateKeyFilePassword",
   "tlsInsecure",
+  "useBigInt64",
   "w",
   "waitQueueTimeoutMS",
-  "wTimeoutMS",
+  "writeConcern",
+  "wtimeoutMS",
   "zlibCompressionLevel"
 ];
 var DEFAULT_SETTINGS = {

+ 5 - 5
package.json

@@ -38,7 +38,7 @@
     "prepare": "husky"
   },
   "dependencies": {
-    "mongodb": "6.18.0"
+    "mongodb": "6.19.0"
   },
   "peerDependencies": {
     "@e22m4u/js-format": "~0.1.0",
@@ -47,13 +47,13 @@
   "devDependencies": {
     "@commitlint/cli": "~19.8.1",
     "@commitlint/config-conventional": "~19.8.1",
-    "@eslint/js": "~9.33.0",
+    "@eslint/js": "~9.34.0",
     "c8": "~10.1.3",
-    "chai": "~5.2.1",
-    "chai-as-promised": "~8.0.1",
+    "chai": "~6.0.1",
+    "chai-as-promised": "~8.0.2",
     "dotenv": "~17.2.1",
     "esbuild": "~0.25.9",
-    "eslint": "~9.33.0",
+    "eslint": "~9.34.0",
     "eslint-config-prettier": "~10.1.8",
     "eslint-plugin-chai-expect": "~3.1.0",
     "eslint-plugin-mocha": "~11.1.0",

+ 59 - 6
src/mongodb-adapter.js

@@ -17,39 +17,89 @@ import {InvalidOperatorValueError} from '@e22m4u/js-repository';
 
 /**
  * Mongodb option names.
- * 5.8.1
+ * 6.19.0
+ *
+ * https://mongodb.github.io/node-mongodb-native/6.19/interfaces/MongoClientOptions.html
  *
  * @type {string[]}
  */
 const MONGODB_OPTION_NAMES = [
-  'appname',
+  'ALPNProtocols',
+  'allowPartialTrustChain',
+  'appName',
+  'auth',
   'authMechanism',
   'authMechanismProperties',
   'authSource',
+  'autoEncryption',
+  'autoSelectFamily',
+  'autoSelectFamilyAttemptTimeout',
+  'bsonRegExp',
+  'ca',
+  'cert',
+  'checkKeys',
+  'checkServerIdentity',
+  'ciphers',
   'compressors',
   'connectTimeoutMS',
+  'crl',
   'directConnection',
+  'driverInfo',
+  'ecdhCurve',
+  'enableUtf8Validation',
+  'family',
+  'fieldsAsRaw',
+  'forceServerObjectId',
   'heartbeatFrequencyMS',
+  'hints',
+  'ignoreUndefined',
   'journal',
+  'keepAliveInitialDelay',
+  'key',
   'loadBalanced',
+  'localAddress',
+  'localPort',
   'localThresholdMS',
+  'lookup',
+  'maxConnecting',
   'maxIdleTimeMS',
   'maxPoolSize',
-  'maxConnecting',
   'maxStalenessSeconds',
+  'minDHSize',
+  'minHeartbeatFrequencyMS',
   'minPoolSize',
+  'mongodbLogComponentSeverities',
+  'mongodbLogMaxDocumentLength',
+  'mongodbLogPath',
+  'monitorCommands',
+  'noDelay',
+  'passphrase',
+  'pfx',
+  'pkFactory',
+  'promoteBuffers',
+  'promoteLongs',
+  'promoteValues',
   'proxyHost',
+  'proxyPassword',
   'proxyPort',
   'proxyUsername',
-  'proxyPassword',
+  'raw',
+  'readConcern',
   'readConcernLevel',
   'readPreference',
   'readPreferenceTags',
+  'rejectUnauthorized',
   'replicaSet',
   'retryReads',
   'retryWrites',
+  'secureContext',
+  'secureProtocol',
+  'serializeFunctions',
+  'serverApi',
+  'serverMonitoringMode',
   'serverSelectionTimeoutMS',
-  'serverSelectionTryOnce',
+  'servername',
+  'session',
   'socketTimeoutMS',
   'srvMaxHosts',
   'srvServiceName',
@@ -59,12 +109,15 @@ const MONGODB_OPTION_NAMES = [
   'tlsAllowInvalidCertificates',
   'tlsAllowInvalidHostnames',
   'tlsCAFile',
+  'tlsCRLFile',
   'tlsCertificateKeyFile',
   'tlsCertificateKeyFilePassword',
   'tlsInsecure',
+  'useBigInt64',
   'w',
   'waitQueueTimeoutMS',
-  'wTimeoutMS',
+  'writeConcern',
+  'wtimeoutMS',
   'zlibCompressionLevel',
 ];