Skip to content

Commit 4f7730e

Browse files
authored
chore: use shared connection string redaction utility COMPASS-5308 (#1170)
Use a common connection string redaction utility from the `mongodb-connection-string-url` package that is shared between mongosh and Compass.
1 parent 4e57b77 commit 4f7730e

File tree

12 files changed

+100
-89
lines changed

12 files changed

+100
-89
lines changed

packages/cli-repl/package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/cli-repl/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
"askpassword": "^1.2.4",
5959
"is-recoverable-error": "^1.0.2",
6060
"lodash.set": "^4.3.2",
61-
"mongodb-connection-string-url": "^2.2.0",
61+
"mongodb-connection-string-url": "^2.3.2",
6262
"mongodb-log-writer": "^1.0.3",
6363
"nanobus": "^4.4.0",
6464
"pretty-bytes": "^5.3.0",

packages/cli-repl/src/smoke-tests.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ async function runSmokeTest(executable: string, args: string[], input: string, o
6363
await once(proc.stdout, 'end');
6464
try {
6565
assert.match(stdout, output);
66-
console.error({ status: 'success', input, output, stdout, executable, args: args.map(redactURICredentials) });
66+
console.error({ status: 'success', input, output, stdout, executable, args: args.map(arg => redactURICredentials(arg)) });
6767
} catch (err) {
68-
console.error({ status: 'failure', input, output, stdout, executable, args: args.map(redactURICredentials) });
68+
console.error({ status: 'failure', input, output, stdout, executable, args: args.map(arg => redactURICredentials(arg)) });
6969
throw err;
7070
}
7171
}

packages/history/package-lock.json

Lines changed: 55 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/history/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
"unitTestsOnly": true
3030
},
3131
"dependencies": {
32-
"mongodb-redact": "^0.2.2"
32+
"mongodb-redact": "^0.2.2",
33+
"mongodb-connection-string-url": "^2.3.2"
3334
}
3435
}

packages/history/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
export { changeHistory, redactSensitiveData, HIDDEN_COMMANDS } from './history';
2-
export { redactURICredentials } from './redact-credentials';
2+
export { redactConnectionString as redactURICredentials } from 'mongodb-connection-string-url';

packages/history/src/redact-credentials.spec.ts

Lines changed: 0 additions & 31 deletions
This file was deleted.

packages/history/src/redact-credentials.ts

Lines changed: 0 additions & 12 deletions
This file was deleted.

packages/service-provider-core/package-lock.json

Lines changed: 28 additions & 30 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/service-provider-core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"bson": "^4.6.0",
3636
"mongodb": "^4.2.1",
3737
"mongodb-build-info": "^1.2.0",
38-
"mongodb-connection-string-url": "^2.2.0"
38+
"mongodb-connection-string-url": "^2.3.2"
3939
},
4040
"optionalDependencies": {
4141
"mongodb-client-encryption": "^2.0.0-beta.0"

0 commit comments

Comments
 (0)