From 0667d4ce0749d55030448c7b2433cfd1bfc6481a Mon Sep 17 00:00:00 2001 From: Marat Vyshegorodtsev Date: Tue, 8 Sep 2026 17:37:37 +0900 Subject: [PATCH 1/2] =?UTF-8?q?feat(typescript):=20=E2=9C=A8=20switch=20to?= =?UTF-8?q?=20sqlc-gen-typescript-native?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Point the language links to the native plugin and mark SQLite support as beta. Remove the old plugin name from historical changelog entries while keeping their original meaning. Enable TypeScript CI against v0.3.0, pinned by commit. Build sqlc from the current checkout and run the plugin's generation, type and runtime tests, then check the generated Deno SQLite example with sqlc diff. --- .github/workflows/ci-typescript.yml | 40 +++++++++++++++++++++++------ README.md | 2 +- docs/reference/changelog.md | 4 +-- docs/reference/language-support.md | 2 +- 4 files changed, 36 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci-typescript.yml b/.github/workflows/ci-typescript.yml index e5aac81fca..1e7071ee98 100644 --- a/.github/workflows/ci-typescript.yml +++ b/.github/workflows/ci-typescript.yml @@ -10,21 +10,45 @@ on: - 'docs/**' jobs: build: - if: false name: test runs-on: ubuntu-latest + timeout-minutes: 25 steps: - uses: actions/checkout@v7 - uses: actions/setup-go@v7 with: go-version: '1.26.5' - - name: install ./... - run: go install ./... + - name: Build sqlc from this checkout + run: | + go build -o "$RUNNER_TEMP/sqlc" ./cmd/sqlc + echo "SQLC=$RUNNER_TEMP/sqlc" >> "$GITHUB_ENV" - uses: actions/checkout@v7 with: - repository: sqlc-dev/sqlc-gen-typescript + repository: bonakodo/sqlc-gen-typescript-native path: typescript - # v0.1.3 - ref: daaf539092421adc15f6c3164279a3470716b560 - - run: sqlc diff - working-directory: typescript/examples + # v0.3.0 + ref: 8eac5960f4ccffac60cccdf73d4a884998e77acf + persist-credentials: false + - uses: denoland/setup-deno@v2 + with: + deno-version: "v2.9.6" + - uses: actions/setup-node@v7 + with: + node-version: "26.8.1" + cache: npm + cache-dependency-path: typescript/tests/integration/package-lock.json + - name: Install SQLite shared library + run: | + sudo apt-get update + sudo apt-get install -y libsqlite3-0 + sqlite_library=$(dpkg -L libsqlite3-0 | sed -n '/\/libsqlite3\.so\.0$/p') + test -f "$sqlite_library" + echo "DENO_SQLITE_PATH=$sqlite_library" >> "$GITHUB_ENV" + - run: deno task tools + working-directory: typescript + - name: Test generation and driver runtimes + run: deno task integration + working-directory: typescript + - name: Check generated example + run: '"$SQLC" diff' + working-directory: typescript/examples/deno-sqlite diff --git a/README.md b/README.md index ba06efa55c..036df79faa 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ Check out [an interactive example](https://play.sqlc.dev/) to see it in action, - [sqlc-gen-go](https://github.com/sqlc-dev/sqlc-gen-go) - [sqlc-gen-kotlin](https://github.com/sqlc-dev/sqlc-gen-kotlin) - [sqlc-gen-python](https://github.com/sqlc-dev/sqlc-gen-python) -- [sqlc-gen-typescript](https://github.com/sqlc-dev/sqlc-gen-typescript) +- [sqlc-gen-typescript-native](https://github.com/bonakodo/sqlc-gen-typescript-native) Additional languages can be added via [plugins](https://docs.sqlc.dev/en/latest/reference/language-support.html#community-language-support). diff --git a/docs/reference/changelog.md b/docs/reference/changelog.md index af42c037fb..84b1631f15 100644 --- a/docs/reference/changelog.md +++ b/docs/reference/changelog.md @@ -417,7 +417,7 @@ If you run into any issues with the updated dependencies, please [open an issue] - Add name to query set configuration (#3011) - Add a sidebar link for `push`, add Go plugin link (#3023) -- Update banner for sqlc-gen-typescript (#3036) +- Update banner for the TypeScript plugin (#3036) - Add strict_order_by in doc (#3044) - Re-order the migration tools list (#3064) @@ -434,7 +434,7 @@ If you run into any issues with the updated dependencies, please [open an issue] - (endtoend) Enable for more build targets (#3041) - (endtoend) Run MySQL and PostgreSQL locally on the runner (#3095) -- (typescript) Test against sqlc-gen-typescript (#3046) +- (typescript) Test against the TypeScript plugin (#3046) - Add tests for omit_sqlc_version (#3020) - Split schema and query for test (#3094) diff --git a/docs/reference/language-support.md b/docs/reference/language-support.md index 0f7a6f3004..ad1f9160dc 100644 --- a/docs/reference/language-support.md +++ b/docs/reference/language-support.md @@ -6,7 +6,7 @@ | Go | [sqlc-gen-go](https://github.com/sqlc-dev/sqlc-gen-go) | Stable | Stable | Beta | | Kotlin | [sqlc-gen-kotlin](https://github.com/sqlc-dev/sqlc-gen-kotlin) | Beta | Beta | Not implemented | | Python | [sqlc-gen-python](https://github.com/sqlc-dev/sqlc-gen-python) | Beta | Beta | Not implemented | -| TypeScript | [sqlc-gen-typescript](https://github.com/sqlc-dev/sqlc-gen-typescript) | Beta | Beta | Not implemented | +| TypeScript | [sqlc-gen-typescript-native](https://github.com/bonakodo/sqlc-gen-typescript-native) | Beta | Beta | Beta | ## Community language support From 7b060094c6e04b139fe8a5a3009de67a2f929876 Mon Sep 17 00:00:00 2001 From: Marat Vyshegorodtsev Date: Tue, 8 Sep 2026 19:03:57 +0900 Subject: [PATCH 2/2] =?UTF-8?q?chore(typescript):=20=F0=9F=94=96=20pin=20n?= =?UTF-8?q?ative=20generator=20v0.4.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci-typescript.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-typescript.yml b/.github/workflows/ci-typescript.yml index 1e7071ee98..5b0f7f6279 100644 --- a/.github/workflows/ci-typescript.yml +++ b/.github/workflows/ci-typescript.yml @@ -26,8 +26,8 @@ jobs: with: repository: bonakodo/sqlc-gen-typescript-native path: typescript - # v0.3.0 - ref: 8eac5960f4ccffac60cccdf73d4a884998e77acf + # v0.4.0 + ref: 1942c66cebc201e85fbd79fbe162a2ce6b47a666 persist-credentials: false - uses: denoland/setup-deno@v2 with: