Releases: ts-safeql/safeql
@ts-safeql/shared@0.0.3
Patch Changes
-
69b874e: you can now override the default types (e.g. timestamp -> DateTime) by adding an
overrides
property to the config:// safeql.config.ts import { definedConfig } from "@ts-safeql/eslint-plugin"; export default definedConfig({ // ... overrides: { types: { timestamp: "DateTime", }, }, });
or
// .eslintrc.json { // ... "connections": { // ..., "overrides": { "types": { "timestamp": "DateTime" } } } }
@ts-safeql/generate@0.0.3
Patch Changes
-
69b874e: you can now override the default types (e.g. timestamp -> DateTime) by adding an
overrides
property to the config:// safeql.config.ts import { definedConfig } from "@ts-safeql/eslint-plugin"; export default definedConfig({ // ... overrides: { types: { timestamp: "DateTime", }, }, });
or
// .eslintrc.json { // ... "connections": { // ..., "overrides": { "types": { "timestamp": "DateTime" } } } }
-
Updated dependencies [69b874e]
- @ts-safeql/shared@0.0.3
- @ts-safeql/test-utils@0.0.3
@ts-safeql/eslint-plugin@0.0.11
Patch Changes
-
69b874e: you can now override the default types (e.g. timestamp -> DateTime) by adding an
overrides
property to the config:// safeql.config.ts import { definedConfig } from "@ts-safeql/eslint-plugin"; export default definedConfig({ // ... overrides: { types: { timestamp: "DateTime", }, }, });
or
// .eslintrc.json { // ... "connections": { // ..., "overrides": { "types": { "timestamp": "DateTime" } } } }
-
Updated dependencies [69b874e]
- @ts-safeql/generate@0.0.3
- @ts-safeql/shared@0.0.3
- @ts-safeql/test-utils@0.0.3
@ts-safeql/eslint-plugin@0.0.10
Patch Changes
- 1a55018: allow to compare actual type against type reference (sql)
@ts-safeql/eslint-plugin@0.0.9
Patch Changes
- 853f943: fixed an issue where using a config file with invalid state kept a temporary config file
@ts-safeql/eslint-plugin@0.0.8
Patch Changes
-
c639958: -
connections
can now be a single connection object instead of an array of connections.- by setting
{"useConfigFile": true }
, the plugin will use thesafeql.config.ts
file to get the connection/s information:
// .eslintrc.json { // ... "rules": { "@ts-safeql/check-sql": ["error", { "useConfigFile": true }] } }
// safeql.config.ts import { defineConfig } from "@ts-safeql/eslint-plugin"; export default defineConfig({ connections: { // ... }, });
By moving the configuration into a
.ts
file, we get full auto-completion, which should help configure the connections and find errors.Please note that
safeql.config.ts
should be at the root of your project. - by setting
@ts-safeql/eslint-plugin@0.0.7
Patch Changes
- 6b99b38: improve sql migrations detection by deeply lookup inside the specified migrationsDir
@ts-safeql/sql-tag@0.1.0
Minor Changes
- 13a33b4: Introducing a new package @ts-safeql/sql-tag. It's an sql template tag that is meant to use with sql libraries that doesn't have a built-in support for sql template tags such as node-pg, and sequelize.
@ts-safeql/eslint-plugin@0.0.6
Patch Changes
- 557d419: Improve type inference for non-table columns
@ts-safeql/eslint-plugin@0.0.5
Patch Changes
-
30c5b98: Tag-only types are now available using the "tagName" setting:
For example (Postgres.js):
{ "databaseUrl": "postgres://postgres:postgres@localhost:5432/safeql_postgresjs_demo", "tagName": "sql", "transform": "${type}[]" }
import { sql } from "postgres"; const query = sql`SELECT id FROM users`; ^^^ // Error: Query is missing type annotation // After: ✅ const query = sql<{ id: number; }[]>`SELECT id FROM users`;