Releases: PerryTS/mysql
v0.1.7 — Perry-native Linux password auth (#2)
Fixes #2 — connect() password auth timing out under a Perry-native Linux binary.
Two driver-side bugs, both fixed:
-
Perry runtime detection.
deferWritesnever activated becauseisNodeLike()keyed offprocess.versions.node, which Perry pins to"22.0.0". The driver now detects Perry positively viaprocess.versions.perry(isPerry()), so the deferred-write path (and the TLS-upgrade / socket-open branches) take the correct Perry path. -
Flush mechanism. The queued
HandshakeResponse41was flushed by a zero-delaysetTimeoutscheduled from inside a'data'handler, which never fires on a Perry-native binary. Replaced with a single shared, self-stopping,unref'dsetIntervalpump.
Empty-password connections already worked; this restores non-empty mysql_native_password (and other) auth on Perry-native Linux. No behavior change on Node.js / Bun.
v0.1.6
Fixes #1 — BIGINT read via the prepared (binary) protocol came back as a JS bigint under the Perry-native binary (but number under Node) even for small in-range values like 1, breaking JSON.stringify and turning auto-increment ids into null in HTTP responses.
The binary LONGLONG decoder now combines the two 32-bit words with pure number arithmetic and number-literal comparisons instead of Number(bigint) / bigint comparisons (both miscompiled by older Perry builds). Exact for |value| ≤ 2^53 and identical to Node; out-of-range values still return bigint. Robust regardless of Perry compiler version. Verified end-to-end on native Perry against a live MySQL server.
See CHANGELOG.md for details.
v0.1.5
Fixed
- Perry-native Linux: password auth hung until
connectTimeoutMs(#2). Perry-compiled Linux binaries silently dropsocket.write()calls issued from inside a'data'callback (upstream: PerryTS/perry#5021), which swallowed the driver's HandshakeResponse41 — along with auth-switch responses,COM_STMT_EXECUTEafter PrepareOK, and the LOCAL_INFILE terminator. All socket writes now go through a per-connection queue flushed from a zero-delay timer under Perry (outside the data dispatch), preserving frame order; Node/Bun keep the synchronous write path. The TLS upgrade is held back until the queued SSLRequest has flushed so the ClientHello can't precede it.
No API changes.
v0.1.4 — Node strict-ESM compat
Published 0.1.3 wouldn't load under Node's strict ESM loader. import { createPool } from '@perryts/mysql' would throw does not provide an export named 'createPool' because the package was missing "type": "module" (so Node parsed dist/*.js as CommonJS) and the compiled dist/*.{js,d.ts} carried extensionless relative imports (from './connection') that Node strict ESM refuses to resolve.
This release adds "type": "module" to package.json and a small post-build pass (scripts/fix-esm-imports.mjs) that walks dist/ and rewrites every relative import to include an explicit .js extension. Source files are untouched — only the compiled artifacts are patched.
Verified locally: node --input-type=module -e "import { createPool, connect, Pool, sql } from './dist/index.js'" resolves every named export. Bun + Perry paths are unaffected — the failure was Node-strict-ESM only.
Full changelog: https://github.com/PerryTS/mysql/blob/main/CHANGELOG.md
v0.1.3
Patch release: fix transport/net-socket.ts::openSocket to call net.createConnection(port, host) on Perry, matching Node's documented positional signature.
- Pre-fix the file's header comment incorrectly asserted Perry took
(host, port)and the call followed suit. Perry has always matched Node's(port, host)(seecrates/perry-codegen/src/lower_call.rsin the perry tree). Under the wrong order Perry coerced the host string to a port (NaN-coerced) and the port number to a host pointer, returning an invalid socket handle that silently no-op'd through everysock.on(...)registration.await connect(...)then never resolved against any MySQL server, surfacing as the immediate-exit /(number).next is not a functionsymptom from PerryTS/perry#536. - Header comment rewritten to reflect Perry's actual
(port, host)contract. The Node.js / Bun code path is unchanged — it uses the object form({ host, port })and works as before. - Requires perry >= v0.5.652 for the matching runtime-side fixes (
[].pop()/[].shift()returningundefinedinstead of NaN, perry-ext-net active-handles wiring under the well-known flip). With both halves in place, the issue's repro returns the SELECT row end-to-end.
See CHANGELOG.md for full history.
v0.1.2
Patch release: fix binary decoders for DATE, DATETIME/TIMESTAMP, and TIME columns.
- The upstream resultset framing already consumes the length-encoded prefix, so the binary decoders must discriminate on
buf.lengthinstead of reading a leading length byte. Previously this caused off-by-one parsing of the year and other fields on binary-protocol rows. .gitignore: minor housekeeping.
See CHANGELOG.md for full history.
v0.1.1
First test of the automated release workflow.
- Add
.github/workflows/publish.ymlfor OIDC trusted-publisher npm releases. - Restore canonical
PerryTScasing inpackage.jsonrepo URL (provenance verification is case-sensitive). - README: add headline benchmarks vs mysql2 and Perry AOT.
- Scrub leftover hard-coded benchmark connection details (repo-only; not in the published tarball).
See CHANGELOG.md for full history.