-
Notifications
You must be signed in to change notification settings - Fork 1
Revert "Chore/convert repo" #16
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR reverts the repository conversion from PR #15, rolling back to the previous version of the codebase. The revert includes changes to the module system, test framework, package management, and build configuration, effectively returning to an earlier state of the project.
Key changes:
- Reverted from ESM/CJS dual-module setup to a simpler CommonJS-only build
- Switched test framework from Vitest back to Mocha
- Removed MongoDB support (mongoPatch) and restored tedious support (tediousPatch)
- Reverted package manager from pnpm to yarn
- Rolled back Node.js version from v22.16.0 to v8.11.4
- Removed GitHub Actions workflows and restored CircleCI configuration
Reviewed Changes
Copilot reviewed 35 out of 39 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| tsconfig.esm.json | Removed ESM-specific TypeScript configuration file |
| tsconfig.cjs.json | Removed CommonJS-specific TypeScript configuration file |
| test/mocha.opts | Restored Mocha test configuration with ts-node |
| src/utils/setServername.ts | Removed servername utility helper function |
| src/utils/parseOptions.ts | Removed options parsing utility function |
| src/tediousPatch.ts | Restored tedious/mssql proxy patch functionality |
| src/proxyAgent.ts | Restored legacy proxyAgent implementation |
| src/proxyAgent.spec.ts | Restored Mocha-based proxyAgent tests |
| src/mongoPatch.ts | Removed MongoDB proxy support |
| src/index.ts | Reverted exports from MongoDB to tedious patch |
| src/createProxyAgent.ts | Removed createProxyAgent wrapper function |
| src/test/proxyAgent.test.ts | Removed Vitest-based test file |
| src/ProxyAgent.ts | Removed ProxyAgent class implementation |
| src/HttpsProxySocket.ts | Reverted to inline implementation removing helper utilities |
| package.json | Reverted package.json changes including dependencies and build scripts |
| .nvmrc | Rolled back Node.js version specification |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| // keep buffering | ||
| debug('have not received end of HTTP headers yet...'); | ||
| if (socket.readable) { | ||
| if (socket.read) { |
Copilot
AI
Oct 14, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using socket.read to check socket readability is incorrect. The read() method is a function, not a boolean property. Use socket.readable instead to check if the socket can be read from.
|
|
||
| // nullify the buffered data since we won't be needing it | ||
| buffers = []; | ||
| buffers = null; |
Copilot
AI
Oct 14, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assignment of null to buffers conflicts with its type declaration as Buffer[] on line 92. Either change the type to Buffer[] | null or assign an empty array [] instead.
|
|
||
| // nullify the buffered data since we won't be needing it | ||
| buffers = []; | ||
| buffers = null; |
Copilot
AI
Oct 14, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assignment of null to buffers conflicts with its type declaration as Buffer[] on line 92. Either change the type to Buffer[] | null or assign an empty array [] instead.
| socket.on('end', onend); | ||
|
|
||
| if (socket.readable) { | ||
| if (socket.read) { |
Copilot
AI
Oct 14, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using socket.read to check socket readability is incorrect. The read() method is a function, not a boolean property. Use socket.readable instead to check if the socket can be read from.
| if (socket.read) { | |
| if (socket.readable) { |
| } | ||
|
|
||
| private _connect(opts: ConnectionOptions, cb: (error: any, socket: tls.TLSSocket | null) => void) { | ||
| private _connect(opts: ConnectionOptions, cb: (error: any, socket: tls.TLSSocket) => void) { |
Copilot
AI
Oct 14, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The callback type requires socket to always be provided, but on line 170 the callback is called with only an error: cb(err). Either make the socket parameter optional in the callback type signature or always provide it in error cases.
| private _connect(opts: ConnectionOptions, cb: (error: any, socket: tls.TLSSocket) => void) { | |
| private _connect(opts: ConnectionOptions, cb: (error: any, socket?: tls.TLSSocket) => void) { |
Reverts #15