Skip to content

Commit

Permalink
Fix mysql2 version
Browse files Browse the repository at this point in the history
  • Loading branch information
timokoessler committed Jan 3, 2025
1 parent e3ee11f commit 4d5bd1a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions library/sinks/MySQL2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ export class MySQL2 implements Wrapper {
const pkg = hooks.addPackage("mysql2");
// For all versions of mysql2 newer than 3.0.0
pkg.withVersion("^3.0.0").onRequire((exports, pkgInfo) => {
console.error("!!! mysql2");
// Wrap connection.query
wrapExport(exports.Connection.prototype, "query", pkgInfo, {
inspectArgs: (args, agent) => this.inspectQuery("mysql2.query", args),
Expand All @@ -65,10 +64,10 @@ export class MySQL2 implements Wrapper {
});
});

// For all versions of mysql2 newer than 3.11.0
// For all versions of mysql2 newer than / equal 3.11.5
// Reason: https://github.com/sidorares/node-mysql2/pull/3081
pkg
.withVersion("^3.11.0")
.withVersion("^3.11.5")
.onFileRequire("promise.js", (exports, pkgInfo) => {
// Wrap PromiseConnection.query
wrapExport(exports.PromiseConnection.prototype, "query", pkgInfo, {

Check warning on line 73 in library/sinks/MySQL2.ts

View check run for this annotation

Codecov / codecov/patch

library/sinks/MySQL2.ts#L72-L73

Added lines #L72 - L73 were not covered by tests
Expand Down

0 comments on commit 4d5bd1a

Please sign in to comment.