A simple native Promise wrapper for mysqljs/mysql (the popular MySQL client for Node.js). Version 1.4.1 is current; release cadence is irregular. It mirrors the mysqljs/mysql API exactly but returns Promises instead of using callbacks, enabling async/await usage. Key differentiators: lightweight (no dependencies beyond mysql), TypeScript types included, and supports pool and connection queries. It does not add any extra features over the original library, only converts callback patterns to promises.
npm install k8w-promise-mysqlNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows creating a connection pool, executing a simple query and a parameterized query, then closing the pool.
Use pool.getConnection() for manual transaction control, same as mysqljs/mysql documentation.
Always destructure: const { results, fields } = await pool.query(...);Use dynamic import or a bundler that handles CJS interop.
Use import PromiseMySQL from 'k8w-promise-mysql' instead of import { createPool } from 'k8w-promise-mysql'.Run: npm install mysql
Ensure mysql is installed (types are bundled with k8w-promise-mysql) and restart TypeScript server.