node-mysql2
node-mysql2 copied to clipboard
Breaking Change: PoolConnection is no longer derived from Connection since 3.11.5.
import mysql from 'mysql2';
const Connection = mysql.Connection;
const PoolConnection = mysql.PoolConnection;
console.log(PoolConnection.prototype instanceof Connection);
[email protected] : true [email protected] : false
Related:
- https://github.com/sidorares/node-mysql2/pull/3081
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.