sqlingo is a port of SQLGlot. Parse, transpile, and optimize SQL across 32 dialects, in the browser or Node.js.
$ npm install sqlingo32 of 32 - one-for-one with upstream
At work I maintain @dbml/core, a library that converts between DBML and SQL. Under the hood it uses ANTLR, and it has not aged well:
No viable alternative at....At a hackathon I stumbled on SQLGlot, which does exactly what I needed. The catch: it's Python. I tried running it via Pyodide, but the runtime is too heavy to ship.
So I started porting it to JavaScript. Two weeks in, polyglot was announced. I kept going because I wanted full control over the implementation and a reliable way to stay in sync with upstream. sqlingo mirrors SQLGlot file for file, so catching up with a new release is a diff, not a rewrite.