Skip to content

Commit

Permalink
feat: remove sspichallenge event on Connection
Browse files Browse the repository at this point in the history
BREAKING CHANGE: This removes the `sspichallenge` event on `Connection`.
  • Loading branch information
arthurschreiber authored Oct 8, 2021
1 parent 87bc413 commit f76518b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 32 deletions.
30 changes: 0 additions & 30 deletions src/connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1769,18 +1769,7 @@ class Connection extends EventEmitter {
*/
on(event: 'secure', listener: (cleartext: import('tls').TLSSocket) => void): this

/**
* A SSPI token was send by the server.
*
* @deprecated
*/
on(event: 'sspichallenge', listener: (token: import('./token/token').SSPIToken) => void): this

on(event: string | symbol, listener: (...args: any[]) => void) {
if (event === 'sspichallenge') {
emitSSPIChallengeEventDeprecationWarning();
}

return super.on(event, listener);
}

Expand Down Expand Up @@ -1840,10 +1829,6 @@ class Connection extends EventEmitter {
* @private
*/
emit(event: 'rollbackTransaction'): boolean
/**
* @private
*/
emit(event: 'sspichallenge', token: import('./token/token').SSPIToken): boolean

emit(event: string | symbol, ...args: any[]) {
return super.emit(event, ...args);
Expand Down Expand Up @@ -3128,21 +3113,6 @@ class Connection extends EventEmitter {
}
}

let sspichallengeEventDeprecationWarningEmitted = false;
function emitSSPIChallengeEventDeprecationWarning() {
if (sspichallengeEventDeprecationWarningEmitted) {
return;
}

sspichallengeEventDeprecationWarningEmitted = true;

process.emitWarning(
'The `sspichallenge` event is deprecated and will be removed.',
'DeprecationWarning',
Connection.prototype.on
);
}

export default Connection;
module.exports = Connection;

Expand Down
2 changes: 0 additions & 2 deletions src/token/handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,6 @@ export class Login7TokenHandler extends TokenHandler {
this.connection.ntlmpacket = token.ntlmpacket;
this.connection.ntlmpacketBuffer = token.ntlmpacketBuffer;
}

this.connection.emit('sspichallenge', token);
}

onDatabaseChange(token: DatabaseEnvChangeToken) {
Expand Down

0 comments on commit f76518b

Please sign in to comment.