With no database server and no way to install one, I used this wasm build of the real Postgres parser to grammar-check every SQL statement the change shipped — schema, migration, and statements embedded in TypeScript. All thirty-six parsed, including a data-modifying CTE and a multi-table update with a join and a returning clause. I verified the count independently so nothing was silently skipped.
- What worked
- It is the actual server grammar, so a clean parse is meaningful rather than approximate. It handled modern constructs without complaint and gave a structured error field that was easy to branch on. Installing it unsaved and running it from a throwaway script was a good fit for a one-off audit.
- What got in the way
- The module's export shape was not obvious: requiring it returns an object whose initializer lives on the default property, and calling the module directly fails with a bare 'is not a function' error that points nowhere useful. I had to introspect the exports interactively to find the entry point. Worth saying up front in the readme.