Skip to content

Releases: bonakodo/sqlc-gen-typescript-native

v0.4.0

Choose a tag to compare

@github-actions github-actions released this 08 Sep 09:37
v0.4.0
1942c66

Generated TypeScript now shares argument and row types, parameter encoders, row decoders, and field metadata across queries and SQL files. Public query names, interfaces, and return types stay the same.

The generator writes shared helpers to runtime_common.ts and engine code to runtime_sqlite.ts, runtime_postgresql.ts, or runtime_mysql.ts. It includes only the helpers and value kinds the queries need. Shared query code lives in query_helpers.ts. External SQLite codecs retain the public preset helpers and JSON codec factory they may import.

Compared with v0.3.0, raw generated source shrank by 64–67% in two PostgreSQL fixtures:

Fixture v0.3.0 v0.4.0 Reduction
1 table, 8 queries 39,642 bytes 14,193 bytes 64.2%
100 tables, 800 queries 1,922,028 bytes 634,032 bytes 67.0%

These counts include all generated files before bundling. Measurements used sqlc v1.31.1 on an Apple M1 Max running macOS 26.6.2 on September 8, 2026. Three cold runs and seven warm runs per fixture showed no clear change in generation speed. The WASM file grew from 78,652 to 86,712 bytes.

After regeneration, keep query_helpers.ts with the other generated files. Update application imports from runtime.ts to runtime_common.ts or the selected engine file, then remove the stale runtime.ts. Existing codec mapping paths that use ./runtime.ts still resolve to the selected runtime. See the migration notes.

Use this release in your sqlc configuration:

version: "2"
plugins:
  - name: typescript
    wasm:
      url: https://github.com/bonakodo/sqlc-gen-typescript-native/releases/download/v0.4.0/sqlc-gen-typescript-native.wasm
      sha256: bcfb32c01409ea7b700f4beb9960ed6bf4fd1439c124464bcd75b378c9371fc1
sql:
  - engine: postgresql
    schema: schema.sql
    queries: query.sql
    codegen:
      - plugin: typescript
        out: db
        options:
          runtime: node
          driver: pg

Run sqlc generate. No local plugin build is needed.

v0.3.0

Choose a tag to compare

@github-actions github-actions released this 08 Sep 08:10

The TypeScript generator now uses a pure WebAssembly implementation,
written in WebAssembly text (WAT), replacing the previous Go implementation.
The plugin runs directly in sqlc's WASI host.

The release filename and sqlc options stay the same. If you used the
process plugin, switch to the WASM configuration below. The Go library
and process plugin are no longer included.

Use this release in your sqlc configuration:

version: "2"
plugins:
  - name: typescript
    wasm:
      url: https://github.com/bonakodo/sqlc-gen-typescript-native/releases/download/v0.3.0/sqlc-gen-typescript-native.wasm
      sha256: f65bbc1585c6b191f9d52b0f3186d15d428f63ba7a2454a11020d3c583802e88
sql:
  - engine: postgresql
    schema: schema.sql
    queries: query.sql
    codegen:
      - plugin: typescript
        out: db
        options:
          runtime: node
          driver: pg

Run sqlc generate. No local plugin build is needed.

What's Changed

  • build(deps-dev): bump pg from 8.21.0 to 8.23.0 in /scripts by @dependabot[bot] in #2
  • build(deps): bump google.golang.org/protobuf from 1.31.0 to 1.36.12 by @dependabot[bot] in #1

New Contributors

Full Changelog: v0.1.0...v0.3.0

v0.2.0

Choose a tag to compare

@github-actions github-actions released this 07 Sep 17:32

Use this release in your sqlc configuration:

version: "2"
plugins:
  - name: typescript
    wasm:
      url: https://github.com/bonakodo/sqlc-gen-typescript-native/releases/download/v0.2.0/sqlc-gen-typescript-native.wasm
      sha256: d43847cb02444cc3b312442379ab9e69cfa8599c364878ef25fab61526f2f9ce
sql:
  - engine: postgresql
    schema: schema.sql
    queries: query.sql
    codegen:
      - plugin: typescript
        out: db
        options:
          runtime: node
          driver: pg

Run sqlc generate. No Go installation or local plugin build is needed.

Full Changelog: v0.1.0...v0.2.0

v0.1.0

Choose a tag to compare

@github-actions github-actions released this 07 Sep 14:06
v0.1.0
8aca7ba

Use this release in your sqlc configuration:

version: "2"
plugins:
  - name: typescript
    wasm:
      url: https://github.com/bonakodo/sqlc-gen-typescript-native/releases/download/v0.1.0/sqlc-gen-typescript-native.wasm
      sha256: 17897d9ac094d9421fe55a4d5c5779d26292071a39f3dbfb43abc8cdde7aafff
sql:
  - engine: postgresql
    schema: schema.sql
    queries: query.sql
    codegen:
      - plugin: typescript
        out: db
        options:
          runtime: node
          driver: pg

Run sqlc generate. No Go installation or local plugin build is needed.

Full Changelog: https://github.com/bonakodo/sqlc-gen-typescript-native/commits/v0.1.0