Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 5 additions & 0 deletions .changeset/afraid-mangos-carry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@typesql/core": patch
---

A `Json<T>` value reads by one rule on every database: as `T`, unless the type map reads JSON as a `string`, as SQLite's maps do. A MySQL map with `json: string` (mysql2's `jsonStrings`) now reads `Json<T>` columns as text, and a SQLite map that reads JSON parsed reads them as `T`.
7 changes: 7 additions & 0 deletions .changeset/ancient-birds-listen.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@typesql/pg": patch
"@typesql/mysql": patch
"@typesql/sqlite": patch
---

The introspection `main(argv, io?)` takes an `io` with any of `stdout`, `stderr`, `cwd` and `env`, the process's by default. `typesql introspect` reports a failed connection as `cannot connect to PostgreSQL: …` (or MySQL).
5 changes: 5 additions & 0 deletions .changeset/angry-kiwis-brush.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@typesql/core": patch
---

MySQL and MariaDB: `WHERE x = ANY (SELECT …)` and `x <> SOME (SELECT …)` make `x` non-null, like `IN (SELECT …)`.
5 changes: 5 additions & 0 deletions .changeset/angry-seas-perform.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@typesql/core": patch
---

A file that imports a type such as `Col` or `SchemaOf` from `@typesql/core` no longer loads the type declarations of every dialect's engine.
7 changes: 7 additions & 0 deletions .changeset/big-walls-wait.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@typesql/pg": patch
"@typesql/mysql": patch
"@typesql/drizzle": patch
---

A script of several statements, such as one passed to `sql.as()`, resolves to its last statement's rows and count, as the migrator's `.raw()` does: node-postgres scripts no longer fail with `Cannot read properties of undefined`, and mysql2 scripts (with `multipleStatements`) no longer return every statement's result as rows.
5 changes: 5 additions & 0 deletions .changeset/brave-ants-drum.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@typesql/drizzle": patch
---

On TiDB Cloud and PlanetScale serverless, values are written into the statement as escaped literals, as `@typesql/mysql` does: the client's own `?` substitution also replaced a `?` inside a string literal.
5 changes: 5 additions & 0 deletions .changeset/brave-wolves-exist.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@typesql/core": patch
---

TypeSQL reads MySQL, MariaDB and SQLite statements by their own rules: in `sql()`, `sql.fragment()`, `sql.raw()` and the `$n` rewriting of the MySQL and SQLite drivers, backtick- and bracket-quoted names, backslash escapes in MySQL strings, `#` comments and block comments, which these databases do not nest, no longer hide or invent `:name` parameters and inline values.
5 changes: 5 additions & 0 deletions .changeset/bright-boxes-exist.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@typesql/core": patch
---

The migrator binds MySQL and MariaDB values as `@typesql/mysql` does: a plain object is refused with `cannot bind [object Object] as a MySQL value; use sql.json() for JSON` instead of being written into the statement as SQL text. With a `url`, it also connects with the mariadb connector when mysql2 is not installed.
5 changes: 5 additions & 0 deletions .changeset/calm-tables-yawn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@typesql/core": patch
---

In PostgreSQL, a cast array parameter such as `$1::text[]` has nullable elements, since it accepts and returns them: `SELECT x FROM unnest($1::text[]) AS x` gives `x: string | null`. A cast parameter that accepts `NULL` makes a column nullable in every `SELECT`; before, the result depended on whether the select list held a `$` or a comment. PostgreSQL migrations accept `CREATE FUNCTION` and `CREATE PROCEDURE` with a `BEGIN ATOMIC … END` body.
5 changes: 5 additions & 0 deletions .changeset/clever-tigers-try.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@typesql/core": minor
---

`@typesql/core/adapter` holds what the adapters share: connections (`connectPostgres`, `connectMysql`, `connectSqlite`), result normalisers (`pgResult`, `mysqlResult`), value encoders (`jsonText`, `mysqlBind`, `mysqlInline`, `sqliteBindings`), `pooledTransaction`, `createFamilySql`, the schema source writer (`schemaWriter`, `columnSource`, `doc`, …) and the `typesql introspect` shell (`introspectCommand`). `SqlDriver.transaction` also receives, after `client`, `depth` and `fn`, the name of the savepoint to make instead of a transaction of its own (`undefined` when none encloses the client), and a driver's optional `inTransaction(client)` tells that its client is a transaction already; drivers written for 7.0 keep working. A `Dialect` names the lexis of its SQL text (`lexis`). `@typesql/core/migration` exports `loadMigrator`, the config loading of `typesql migrate`.
5 changes: 5 additions & 0 deletions .changeset/cool-boats-compete.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@typesql/kysely": patch
---

With `mysql` and `sqlite`, a `"db.table"` key of a Kysely `DB` is the table `table` of another (or attached) database, as MySQL and SQLite name it in SQL (`FROM db.table`); a SQLite `"main.table"` key is the main database's table. They were flat keys no statement could name. MySQL and SQLite columns are the dialect's `Col`.
5 changes: 5 additions & 0 deletions .changeset/dry-waves-tan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"typesql": patch
---

Without semantic highlighting, names, `:name` parameters, casts and `$tag$` strings with non-ASCII letters are colored, and `--` or `/*` right after an operator starts a comment.
5 changes: 5 additions & 0 deletions .changeset/eager-pandas-drop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@typesql/core": patch
---

MySQL, MariaDB and SQLite: `INSERT INTO t VALUES (…)` without a column list no longer types its parameters against the wrong columns when the schema has no `position` flags; it checks the number of values and types the parameters as `unknown`. The columns of an `ON DUPLICATE KEY UPDATE` row alias with a column list (`AS new(a, b)`) now follow the table's positions, and `FIRST` / `AFTER` in a migration's `ALTER TABLE` no longer invent positions for a table without them.
5 changes: 5 additions & 0 deletions .changeset/early-turkeys-joke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@typesql/core": patch
---

`typesql migrate generate` writes a PostgreSQL JSON column a migration types with `Json<T>` (in `.raw<…>()`) as `Json<T, …>` with its import, like `typesql introspect`, instead of a schema file that does not compile.
5 changes: 5 additions & 0 deletions .changeset/fair-trees-share.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@typesql/prisma": patch
---

The generator writes a MySQL auto-increment column as `Col<"int", { autoIncrement: true }>`, without the `hasDefault: true` that `autoIncrement` implies.
5 changes: 5 additions & 0 deletions .changeset/giant-flowers-wave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@typesql/drizzle": none
---

One conversion of a Drizzle schema module for the three dialects, with each dialect's column types.
6 changes: 6 additions & 0 deletions .changeset/good-frogs-own.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@typesql/core": patch
"@typesql/sqlite": patch
---

The schema files of `typesql migrate generate` and `typesql introspect --dialect sqlite` give the hidden columns of a virtual table (FTS5's table-named column and `rank`) `hasDefault: true`, as the schema a migration leaves does: an INSERT without a column list leaves them out.
5 changes: 5 additions & 0 deletions .changeset/good-kings-refuse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@typesql/core": patch
---

PostgreSQL: `Col<"char">`, as introspection writes it, and `"char"` in DDL and typed literals are the one-byte `"char"` type rather than `char(n)` (`bpchar`).
5 changes: 5 additions & 0 deletions .changeset/heavy-olives-hear.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@typesql/core": minor
---

A PostgreSQL migration's `db` reads rows as the migrator's `pg` client returns them, with the new `NodePostgresTypeMap` from `@typesql/core/postgres`: `record`, `void`, `"char"[]` and `aclitem[]` values are strings and intervals have `toPostgres()`.
5 changes: 5 additions & 0 deletions .changeset/honest-melons-thank.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@typesql/core": patch
---

On SQLite, which has no `DEFAULT` in a `VALUES` row, `sql.values` rows that give different columns, or a value that can be `undefined` where another row sends one, are a type error instead of a runtime error.
6 changes: 6 additions & 0 deletions .changeset/itchy-icons-flash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@typesql/kysely": patch
"@typesql/drizzle": patch
---

On MySQL and MariaDB, values are bound as `@typesql/mysql` binds them: a plain object is refused with `cannot bind [object Object] as a MySQL value; use sql.json() for JSON` instead of being written into the statement as SQL text.
5 changes: 5 additions & 0 deletions .changeset/itchy-shirts-remain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@typesql/core": patch
---

The types of `sql()`, `sql.fragment()`, `sql.combine()`, `sql.and()` and `sql.or()` read MySQL, MariaDB and SQLite text by their own rules too: backtick- and bracket-quoted names, backslash escapes in MySQL strings, `#` comments, `--` without a following space in MySQL and block comments, which these databases do not nest, no longer make `sql()` require or number `:name` and `$n` parameters the database does not have.
5 changes: 5 additions & 0 deletions .changeset/lazy-fireants-swim.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@typesql/sqlite": patch
---

`typesql introspect` keeps a table whose name starts like a virtual table's, such as `docs_archive` next to an FTS table `docs`: shadow tables are the ones SQLite reports as such (SQLite 3.37 or later).
5 changes: 5 additions & 0 deletions .changeset/little-fireants-own.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@typesql/core": patch
---

PostgreSQL: arrays with NULL elements keep `(T | null)[]` through `VALUES` and recursive CTEs, and a parameter combined with an aggregate under `GROUP BY ROLLUP`, `CUBE` or `GROUPING SETS` accepts `null`, since the total row's aggregate can be NULL.
5 changes: 5 additions & 0 deletions .changeset/loud-eels-hunt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@typesql/core": patch
---

PostgreSQL: a `$functions` signature's `strict: [n]` checks arguments past the eighth, and an unknown function's message suggests the closest `pg_catalog` function too (`crc33` → `crc32`).
5 changes: 5 additions & 0 deletions .changeset/loud-wolves-draw.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@typesql/postgres": none
---

Take the savepoint name of a nested transaction from @typesql/core.
5 changes: 5 additions & 0 deletions .changeset/mighty-kings-cover.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@typesql/language-server": patch
---

Completions work in `sql.prepare()` and `sql.raw()` strings, and in a migration's `db()`, `.ddl()`, `.add()` and `.raw()` strings. SQLite strings are read as SQLite: `[name]` and backtick names, `?`, `?1`, `@name` and `$name` parameters, and block comments that don't nest; and `FROM main.` and `FROM temp.` list the tables, as their columns already resolved. In PostgreSQL, backslash escapes in `E'…'` strings no longer end the string early. Names that need quoting come from `@typesql/core`'s keyword lists.
5 changes: 5 additions & 0 deletions .changeset/mighty-kings-hide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@typesql/core": minor
---

`@typesql/core/adapter` exports `familyStatement`: a statement as a PostgreSQL, SQLite or MySQL driver takes it, with `$n` parameters or `?` placeholders.
5 changes: 5 additions & 0 deletions .changeset/new-wolves-kneel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@typesql/core": patch
---

SQLite: `x / - -0` (and `%`) is nullable, since `- -0` is zero, and `x / +2` is not.
7 changes: 7 additions & 0 deletions .changeset/nice-bees-jam.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@typesql/core": patch
"@typesql/mysql": patch
"@typesql/drizzle": patch
---

On the HTTP drivers (TiDB Cloud and PlanetScale serverless), a `'` in a value is written as `''`, so a value cannot end its string on a server with `NO_BACKSLASH_ESCAPES`. Backslashes in values are still corrupted in that mode.
5 changes: 5 additions & 0 deletions .changeset/nice-dodos-type.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@typesql/better-auth": none
---

Read the per-database SQL from one record of the supported dialects.
5 changes: 5 additions & 0 deletions .changeset/old-taxis-dig.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@typesql/core": patch
---

PostgreSQL: `CASE`, `COALESCE`, `UNION`, `JOIN … USING` and the other constructs that find a common type follow PostgreSQL's implicit casts: of two types that convert to each other the first is kept (`coalesce(oid_col, regclass_col)` is `oid`), and `"char"` with `text` or `time` with `interval` are reported as types that cannot be matched.
5 changes: 5 additions & 0 deletions .changeset/polite-turkeys-cough.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@typesql/core": patch
---

PostgreSQL: `CASE`, `COALESCE`, `GREATEST`, `LEAST` and `ARRAY[]` over values with no common type are errors like `UNION` already was (`CASE types point and integer cannot be matched`), types such as `oid` and `integer` that convert implicitly combine instead of failing, and `= ANY(x)` rejects every non-array `x`.
5 changes: 5 additions & 0 deletions .changeset/pretty-eggs-rest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@typesql/core": patch
---

PostgreSQL: `jsonpath`, `regconfig`, `refcursor`, `pg_snapshot` and `txid_snapshot` values are typed `string`, as node-postgres and postgres.js return them, instead of `unknown`.
5 changes: 5 additions & 0 deletions .changeset/pretty-owls-heal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@typesql/core": patch
---

The README and the npm description say how small the runtime is: under 3 kB minified and gzipped.
5 changes: 5 additions & 0 deletions .changeset/proud-fireants-tie.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@typesql/core": minor
---

A new `@typesql/core/reserved` entry point exports each dialect's reserved words and the schema keys that name no table, for editor tooling such as `@typesql/language-server`. The parsers read the same word lists.
5 changes: 5 additions & 0 deletions .changeset/rare-spiders-boil.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@typesql/pg": none
---

`PgTypeMap` extends core's `NodePostgresTypeMap`; its types are unchanged.
5 changes: 5 additions & 0 deletions .changeset/real-mice-invent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@typesql/prisma": patch
---

`executor(prisma)` without a `dialect` throws for a Prisma provider other than postgresql, sqlite and mysql, as the `typesql-prisma` generator does, instead of writing PostgreSQL's placeholders. `FromPrisma`, `FromPrismaMysql` and `FromPrismaSqlite` type columns as the dialect's `Col`.
5 changes: 5 additions & 0 deletions .changeset/real-trains-love.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@typesql/core": patch
---

PostgreSQL and SQLite: a `WHERE` condition that rejects NULL in a column of an outer-joined table gives all of that table's columns their declared nullability again, as MySQL already did (`LEFT JOIN posts p … WHERE p.title = $1` makes `p.id` non-null).
5 changes: 5 additions & 0 deletions .changeset/sharp-eels-push.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@typesql/sqlite": patch
---

`typesql introspect --dialect sqlite --exclude "a, b"` trims the spaces around each pattern, as the other dialects do.
5 changes: 5 additions & 0 deletions .changeset/slow-poets-exist.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@typesql/cli": patch
---

`main(argv, io)` writes the output of `typesql introspect` through `io`, as it does for `typesql migrate`, instead of to the process's stdout and stderr.
5 changes: 5 additions & 0 deletions .changeset/slow-turtles-live.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@typesql/core": patch
---

`x NOT IN (SELECT …)`, `x <> ALL (…)` and SQLite's `x NOT IN ()` no longer make `x` non-null: they are true for a NULL `x` when the subquery or list is empty.
5 changes: 5 additions & 0 deletions .changeset/small-flowers-juggle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@typesql/core": patch
---

A PostgreSQL or SQLite name with `$` in it (`a$b$`, `x$1`) is read as a name: in PostgreSQL `sql()` text, `a$b$` no longer opens a dollar quote that hid the `:name` parameters and inline values after it, and `x$1` is no longer counted or renumbered as parameter `$1` when a statement runs.
5 changes: 5 additions & 0 deletions .changeset/sour-hats-enjoy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@typesql/core": patch
---

PostgreSQL: a statement that reads or writes `"$types"`, `"$functions"` or `"$nullParams"` reports `relation "…" does not exist`, as PostgreSQL does, instead of `"…" is not a table`.
5 changes: 5 additions & 0 deletions .changeset/tame-boxes-share.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@typesql/core": patch
---

On MySQL and MariaDB, a plain object for a JSON parameter is a type error, as the drivers refuse it at runtime: pass `sql.json(value)` or JSON text. An inline array or object for a JSON parameter there says `must be passed as sql.json(value)`, and MySQL and SQLite messages name a `Json<T>` column type `json` instead of printing its internal type.
5 changes: 5 additions & 0 deletions .changeset/tame-spiders-sneeze.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@typesql/core": patch
---

MySQL and MariaDB: the error for a JS array passed for a JSON parameter no longer mentions node-postgres; migration `ddl()` errors show the `SqlError` message instead of internal type names.
5 changes: 5 additions & 0 deletions .changeset/thick-apes-greet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"typesql": patch
---

Completions work in `sql.prepare()` and `sql.raw()` strings, and in a migration's `db()`, `.ddl()`, `.add()` and `.raw()` strings. With semantic highlighting, SQLite strings are colored as SQLite (`[name]` and backtick names, `?`, `@name` and `$name` parameters), and PostgreSQL strings as PostgreSQL: backslash escapes in `E'…'` strings, and `#` and backticks as operators, not a comment and a name. In SQLite, completions after `main.` or `temp.` list the tables, with those the statement uses first.
5 changes: 5 additions & 0 deletions .changeset/thick-buses-attack.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@typesql/language-server": patch
---

The package ships its type declarations, which read an optional `typescript` peer (7.1 or later), and exports only its main entry point (the `typesql-language-server` command stays). In SQLite, completions after `main.` or `temp.` list the tables the statement uses first, as after `public.` in PostgreSQL.
5 changes: 5 additions & 0 deletions .changeset/thick-geckos-do.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@typesql/core": patch
---

In PostgreSQL, a function call holding a parameter in the values of `INSERT` or `MERGE` no longer fails with an "infinitely circular" error that turned later statements in the file into `any`, nor does `(f(x)).*`. `x = ANY(array)` and `x = ALL(array)` are nullable when the array can hold `NULL` elements. In migrations, `begin` and `end` used as names (`NEW.end`, `AS end`, a parameter or routine called `begin`) no longer hide a later `COMMIT` or reject a valid trigger, and `CASE … END FOR UPDATE` ends the `CASE`.
5 changes: 5 additions & 0 deletions .changeset/tiny-cats-learn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@typesql/core": patch
---

`sql.withPlugin()` on the `sql` of `createSql()` keeps its dialect's type, as on the adapters' `sql`: its `.dialect`, and an `Sql<DB, TM, [CasePlugin]>` annotation, compile.
5 changes: 5 additions & 0 deletions .changeset/tough-pumas-count.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@typesql/cli": patch
---

`typesql introspect` without `--dialect` or `--url` reads MySQL or MariaDB when `DATABASE_URL` is a `mysql://` or `mariadb://` URL, as for `--url`, instead of connecting to it as PostgreSQL.
5 changes: 5 additions & 0 deletions .changeset/wild-dodos-judge.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@typesql/core": patch
---

PostgreSQL: a window name used inside `POSITION`, `SUBSTRING`, `TRIM` or `OVERLAY` must be defined, and a built-in function called with a number of arguments none of its overloads takes is an error (`function upper(text, text) does not exist`) instead of an `unknown` column.
9 changes: 9 additions & 0 deletions .changeset/young-roses-sniff.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"@typesql/core": patch
"@typesql/pg": patch
"@typesql/mysql": patch
"@typesql/sqlite": patch
"@typesql/prisma": patch
---

`typesql introspect --type-name`, `generateSource({ typeName })` and the Prisma generator's `typeName` reject a name that is not a TypeScript identifier (`typesql introspect` exits with 2) instead of writing a schema file that does not compile.
13 changes: 9 additions & 4 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,12 @@ jobs:
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
with:
package-manager-cache: false
node-version: 26
node-version-file: .node-version
- run: pnpm install --frozen-lockfile
- run: pnpm lint
- run: pnpm build
- run: pnpm typecheck
- run: pnpm knip
- run: pnpm --filter typesql exec vsce package --no-dependencies --out "$RUNNER_TEMP/typesql.vsix"
- run: pnpm docs:build

Expand All @@ -51,7 +52,7 @@ jobs:
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
with:
package-manager-cache: false
node-version: 26
node-version-file: .node-version
- run: node tools/check-intents.ts "$BASE"
env:
BASE: ${{ github.event.pull_request.base.sha || github.event.before }}
Expand All @@ -71,12 +72,16 @@ jobs:
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
with:
package-manager-cache: false
node-version: 26.8.1
node-version-file: .node-version
- run: pnpm install --frozen-lockfile
- run: pnpm --dir tests typecheck
- name: Start PostgreSQL, MySQL and MariaDB
run: docker compose -f tests/compose.yaml up --detach --wait
- run: pnpm test
- name: Check the sources generated from PostgreSQL
run: |
pnpm --filter @typesql/core --filter @typesql/pg run build
node tools/gen-pg-functions.ts --check
node tools/pg-catalog-from-pg.ts --check
- name: Retain failing scenario applications and logs
if: failure()
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
Expand Down
Loading
Loading