The Neon serverless driver for JavaScript/TypeScript has reached version 1.0.0 and is now generally available! Built for environments like Vercel Functions, Cloudflare Workers, and even browsers, the driver carries SQL over HTTP or WebSockets; no raw TCP required.
This GA release brings a cleaner, more maintainable codebase, stronger SQL injection safeguards, support for composable tagged-template queries, and better performance when inserting binary data over HTTP.
What you need to know about the 1.0.0 GA release:
It requires Node.js v19 or later.
It includes a breaking change but only if you're calling the HTTP query template function as a conventional function. The first usage shown below remains safe and supported. However, the second usage is an SQL injection risk (notice the parentheses) and is no longer permitted and now throws an error. You'll need to update your app if you use it.
// this usage remains safe and supported
const resultA = await sql`SELECT * FROM table WHERE id = ${id}`;
// this usage is not safe and now throws an error
const resultB = await sql(`SELECT * FROM table WHERE id = ${id}`);
For more about these changes and others in the 1.0.0 GA release, please see the 1.0.0 release notes or read the blog post.