node-mysql2 icon indicating copy to clipboard operation
node-mysql2 copied to clipboard

Breaking Change: PoolConnection is no longer derived from Connection since 3.11.5.

Open wakabayashik opened this issue 11 months ago • 2 comments

import mysql from 'mysql2';
const Connection = mysql.Connection;
const PoolConnection = mysql.PoolConnection;
console.log(PoolConnection.prototype instanceof Connection);

[email protected] : true [email protected] : false

wakabayashik avatar Dec 09 '24 02:12 wakabayashik

Related:

  • https://github.com/sidorares/node-mysql2/pull/3081

wellwelwel avatar Dec 09 '24 02:12 wellwelwel

I was doing some work to fix the Typescript types here, and this is now true, as it's not a true subclass of Connection by implementation, nor was it really ever.

That base class change likely needed to be released under a major version instead of the patch that it was. I don't see how they could fix this without reverting things, or doing other major breaking changes.

ashleybartlett avatar May 26 '25 02:05 ashleybartlett