Comparing version 6.8.0-dev.20240629.sha.d85f827a to 6.8.0-dev.20240702.sha.f48f8d36
@@ -11,2 +11,4 @@ "use strict"; | ||
constructor(extraOptions = {}) { | ||
this.spawnPath = ''; | ||
this.spawnArgs = []; | ||
this.uri = | ||
@@ -17,5 +19,7 @@ typeof extraOptions.mongocryptdURI === 'string' && extraOptions.mongocryptdURI.length > 0 | ||
this.bypassSpawn = !!extraOptions.mongocryptdBypassSpawn; | ||
this.spawnPath = extraOptions.mongocryptdSpawnPath || ''; | ||
this.spawnArgs = []; | ||
if (Array.isArray(extraOptions.mongocryptdSpawnArgs)) { | ||
if (Object.hasOwn(extraOptions, 'mongocryptdSpawnPath') && extraOptions.mongocryptdSpawnPath) { | ||
this.spawnPath = extraOptions.mongocryptdSpawnPath; | ||
} | ||
if (Object.hasOwn(extraOptions, 'mongocryptdSpawnArgs') && | ||
Array.isArray(extraOptions.mongocryptdSpawnArgs)) { | ||
this.spawnArgs = this.spawnArgs.concat(extraOptions.mongocryptdSpawnArgs); | ||
@@ -22,0 +26,0 @@ } |
{ | ||
"name": "mongodb", | ||
"version": "6.8.0-dev.20240629.sha.d85f827a", | ||
"version": "6.8.0-dev.20240702.sha.f48f8d36", | ||
"description": "The official MongoDB driver for Node.js", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -15,4 +15,4 @@ import type { ChildProcess } from 'child_process'; | ||
bypassSpawn: boolean; | ||
spawnPath: string; | ||
spawnArgs: Array<string>; | ||
spawnPath = ''; | ||
spawnArgs: Array<string> = []; | ||
_child?: ChildProcess; | ||
@@ -28,5 +28,9 @@ | ||
this.spawnPath = extraOptions.mongocryptdSpawnPath || ''; | ||
this.spawnArgs = []; | ||
if (Array.isArray(extraOptions.mongocryptdSpawnArgs)) { | ||
if (Object.hasOwn(extraOptions, 'mongocryptdSpawnPath') && extraOptions.mongocryptdSpawnPath) { | ||
this.spawnPath = extraOptions.mongocryptdSpawnPath; | ||
} | ||
if ( | ||
Object.hasOwn(extraOptions, 'mongocryptdSpawnArgs') && | ||
Array.isArray(extraOptions.mongocryptdSpawnArgs) | ||
) { | ||
this.spawnArgs = this.spawnArgs.concat(extraOptions.mongocryptdSpawnArgs); | ||
@@ -33,0 +37,0 @@ } |
@@ -13,3 +13,4 @@ { | ||
"es2021", | ||
"ES2022.Error" | ||
"ES2022.Error", | ||
"ES2022.Object" | ||
], | ||
@@ -16,0 +17,0 @@ // We don't make use of tslib helpers, all syntax used is supported by target engine |
Sorry, the diff of this file is not supported yet
3034557
62555