Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!(deps): bump driver to 6.7.0 MONGOSH-1790 #191

Merged
merged 6 commits into from
Jun 4, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove abort-controller and address feedback
mabaasit committed Jun 4, 2024
commit 67ede2b35a9def9bcfb528ec10e4333ffa30004f
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -88,7 +88,6 @@
"xvfb-maybe": "^0.2.1"
},
"dependencies": {
"abort-controller": "^3.0.0",
"express": "^4.18.2",
"open": "^9.1.0",
"openid-client": "^5.6.4"
3 changes: 1 addition & 2 deletions src/plugin.spec.ts
Original file line number Diff line number Diff line change
@@ -22,7 +22,6 @@ import {
oktaBrowserAuthCodeFlow,
oktaBrowserDeviceAuthFlow,
} from '../test/oidc-test-provider';
import { AbortController, AbortSignal } from './util';
import { MongoLogWriter } from 'mongodb-log-writer';
import { PassThrough } from 'stream';
import { verifySuccessfulAuthCodeFlowLog } from '../test/log-hook-verification-helpers';
@@ -59,7 +58,7 @@ function requestToken(
abortSignal?: OIDCAbortSignal
): ReturnType<OIDCCallbackFunction> {
return plugin.mongoClientOptions.authMechanismProperties.OIDC_HUMAN_CALLBACK({
timeoutContext: abortSignal ?? new AbortController().signal,
timeoutContext: abortSignal,
version: 1,
idpInfo: oidcParams,
});
1 change: 0 additions & 1 deletion src/plugin.ts
Original file line number Diff line number Diff line change
@@ -8,7 +8,6 @@ import type {
} from './types';
import { MongoDBOIDCError } from './types';
import {
AbortController,
errorString,
messageFromError,
normalizeObject,
1 change: 0 additions & 1 deletion src/rfc-8252-http-server.spec.ts
Original file line number Diff line number Diff line change
@@ -7,7 +7,6 @@ import type { AddressInfo } from 'net';
import { createConnection } from 'net';
import type { SinonSandbox } from 'sinon';
import sinon from 'sinon';
import { AbortController } from './util';
import { promisify } from 'util';
import { randomBytes } from 'crypto';

2 changes: 1 addition & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
@@ -99,7 +99,7 @@ export interface IdPServerResponse {
*/
export interface OIDCCallbackParams {
refreshToken?: string;
timeoutContext: OIDCAbortSignal;
timeoutContext?: OIDCAbortSignal;
version: 1;
username?: string;
idpInfo?: IdPServerInfo;
7 changes: 0 additions & 7 deletions src/util.ts
Original file line number Diff line number Diff line change
@@ -45,13 +45,6 @@ export function errorString(err: unknown): string {
);
}

export const AbortController =
// eslint-disable-next-line @typescript-eslint/no-var-requires
globalThis.AbortController ?? require('abort-controller').AbortController;
export const AbortSignal =
// eslint-disable-next-line @typescript-eslint/no-var-requires
globalThis.AbortSignal ?? require('abort-controller').AbortSignal;

// AbortSignal.timeout, but consistently .unref()ed
export function timeoutSignal(ms: number): AbortSignal {
const controller = new AbortController();