From 78a16fa4cbd0c5d98ca8131aa2896be5845aa919 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Thu, 2 Jun 2022 09:51:56 +0200 Subject: [PATCH] fix: drop more csflePath references --- .evergreen/install-node.sh | 1 + packages/arg-parser/src/arg-mapper.ts | 4 ++-- packages/cli-repl/src/cli-repl.ts | 1 + packages/cli-repl/src/crypt-library-paths.ts | 2 -- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.evergreen/install-node.sh b/.evergreen/install-node.sh index 79c073980..9037017e2 100755 --- a/.evergreen/install-node.sh +++ b/.evergreen/install-node.sh @@ -31,6 +31,7 @@ else make -j8 NO_EXPAT=1) fi + npm cache clear --force || true # Try to work around `Cannot read property 'pickAlgorithm' of null` errors in CI npm i -g npm@8.x fi diff --git a/packages/arg-parser/src/arg-mapper.ts b/packages/arg-parser/src/arg-mapper.ts index 4bde06eab..5f3ed5bce 100644 --- a/packages/arg-parser/src/arg-mapper.ts +++ b/packages/arg-parser/src/arg-mapper.ts @@ -106,9 +106,9 @@ const MAPPINGS: { awsSessionToken: (i, v) => setAWSKMS(i, 'sessionToken', v), awsIamSessionToken: (i, v) => setAuthMechProp(i, 'AWS_SESSION_TOKEN', v), // @ts-expect-error AutoEncryption options have been renamed, drop the (outer) csflePath call after the next release - csfleLibraryPath: (i, v) => setAutoEncryptExtra(setAutoEncryptExtra(i, 'cryptSharedLibPath', v), 'csflePath', v), + csfleLibraryPath: (i, v) => setAutoEncryptExtra(i, 'cryptSharedLibPath', v), // @ts-expect-error AutoEncryption options have been renamed, drop the (outer) csflePath call after the next release - cryptSharedLibPath: (i, v) => setAutoEncryptExtra(setAutoEncryptExtra(i, 'cryptSharedLibPath', v), 'csflePath', v), + cryptSharedLibPath: (i, v) => setAutoEncryptExtra(i, 'cryptSharedLibPath', v), gssapiServiceName: (i, v) => setAuthMechProp(i, 'SERVICE_NAME', v), sspiRealmOverride: (i, v) => setAuthMechProp(i, 'SERVICE_REALM', v), sspiHostnameCanonicalization: diff --git a/packages/cli-repl/src/cli-repl.ts b/packages/cli-repl/src/cli-repl.ts index 63c1bbf35..c6369c67a 100644 --- a/packages/cli-repl/src/cli-repl.ts +++ b/packages/cli-repl/src/cli-repl.ts @@ -656,6 +656,7 @@ class CliRepl implements MongoshIOProvider { if (!this.getCryptLibraryPaths) { throw new MongoshInternalError('This instance of mongosh is not configured for in-use encryption'); } + // @ts-expect-error AutoEncryption options have been renamed, wait for the next driver release return (this.cachedCryptLibraryPath ??= this.getCryptLibraryPaths(this.bus)); } diff --git a/packages/cli-repl/src/crypt-library-paths.ts b/packages/cli-repl/src/crypt-library-paths.ts index c8a08a3ba..83dd4a098 100644 --- a/packages/cli-repl/src/crypt-library-paths.ts +++ b/packages/cli-repl/src/crypt-library-paths.ts @@ -9,7 +9,6 @@ export const SHARED_LIBRARY_SUFFIX = export interface CryptLibraryPathResult { cryptSharedLibPath?: string; - csflePath?: string; // Alias, currently still used by the driver expectedVersion?: { version: bigint; versionStr: string }; } @@ -53,7 +52,6 @@ export async function getCryptLibraryPaths( const version = getCryptSharedLibraryVersion(libraryCandidate); const result = { cryptSharedLibPath: libraryCandidate, - csflePath: libraryCandidate, expectedVersion: version }; bus.emit('mongosh:crypt-library-load-found', result);