Aller au contenu
verdict:

Drizzle ORM 1.0.0-rc.4

preview

note: la synthèse et les notes de version sont en anglais

note: pas de synthèse pour cette release plus ancienne

Nous synthétisons les releases récentes. Les notes de version originales de cette version sont ci-dessous.

release-notesgithub.com/drizzle-team/drizzle-orm · 85 lignes
  1. # v1.0.0-rc.4
  2. - Fixed broken `View` types when using `Subquery` in selection
  3. - Fixed custom types' JSON field API not being applied when column is used as a decoder on `SQL` fields
  4. - Fixed codecs not getting applied to `SQL` field when `.mapWith(column)` is set (fixes [#5724](https://github.com/drizzle-team/drizzle-orm/issues/5724))
  5. - Fixed `Subquery` fields' columns' codecs not being applied to subquery
  6. - Fixed broken in `rc.3` `db.select` in `bun-sql/pg` driver (fixes [#5779](https://github.com/drizzle-team/drizzle-orm/issues/5779))
  7. - Updated SQLite `db.$count` builder to include `.sync()` executor for sync drivers
  8. - Removed RQBv1 from `sqlite`, removed RQBv1 `TSchema`, `TFullSchema` arguments from `sqlite` entities' generics
  9. - Fixed instances of `sqlite` query errors not being wrapped in `DrizzleQueryError` (`db.batch()` excluded due to api incompatibility)
  10. - Fixed type error on `CockroachArrayBuilder` constructor caused by referencing internal field's type
  11. - Removed `mapResult` method from `PreparedQuery` interface, removed `mapResult`, `mapBatchResult` from `pg` and `sqlite` raw queries
  12. - Fixed wrong `bun-sqlite` run result type
  13. - Switched `sqlite` RQBv2 to array mode
  14. - Enabled optimized default query mappers for `sqlite`
  15. - Reworked `sqlite` sessions: replaced per-driver `PreparedQuery` instances with executors passed via sessions, similar to current `postgresql` and `mysql` implementations, moved `useJitMappers` flag handling to dialect
  16. - Fixed missing `string` overload on `.comment(sqlCommenterComment)` in query builders
  17. - Supported nested transactions in `@tursodatabase/database`, `@tursodatabase/database-wasm`
  18. - Added filesytem-less migrator for `@tursodatabase/database-wasm` at `drizzle-orm/tursodatbase/wasm-migrator`
  19. - Split SQLite into `async`, `effect` versions (`sync` remains subtype of `async`)
  20. - Removed `SQLiteSyncDialect`, `SQLiteAsyncDialect`, moved generic SQLite `async`\\`sync` migrators to `sqlite-core/async/session` as `migrateSync`, `migrateAsync`
  21. - Fixed `sqlite` cache using same cache entry for different execute methods
  22. - Moved `EffectDrizzlePgConfig` to `drizzle-orm/pg-core/effect/utils`
  23. - Made `cache` field in `EffectCacheShape` optional
  24. - Split `mysql` into `async`, `effect` versions
  25. - Added codec system to `mysql`
  26. - Fixed `mysql` `float` rounding to either 6 digits or double
  27. - Fixed `mysql` cropping `.000` from `timestamp(3)`
  28. - Moved subquery mapper selection from `dialect.buildSelection` to `orderSelectedFields`;
  29. - [`PG`, `MySQL`] Improved codec system in set operators:
  30. - When different db types are crossed in a union, db casts them to type it deems as closest compatible to all types involved
  31. - If columns with codecs are set on both sides of union - codec of combined type will apply
  32. - If only the left-hand side of union has field with codec - left hand side's codec is preserved
  33. - If left-hand side field is devoid of codecs - field is not processed by codecs;
  34. - Set operator queries are switched from `[QUERY 1] UNION [QUERY 2]` to `SELECT ... FROM ([QUERY 1] UNION [QUERY 2]) "drizzle_union"` so cast codecs would apply after union's type mutation
  35. - Retrieved data of union with different types still may be lossy due to db's own conversion
  36. - Bump required `effect` package versions to `4.0.0-beta.83`
  37. - Fixed `sql.param` passing `Placeholder` as expected input value to encoder function instead of `Placeholder`'s value type
  38. - Fixed unguarded `Buffer` reference in `drizzle-orm/effect-schema` that caused error in environments without `Buffer`
  39. - Fixed `sqlite` `blob` column runtime-type default mode mismatch (fixes [#1064](https://github.com/drizzle-team/drizzle-orm/issues/1064))
  40. - Improved typed `sql` operator - preserved nullability, inferred initial data type to `mapWith`callback argument, added `.nullable()` method to modify output type with `| null` (fixes [#571](https://github.com/drizzle-team/drizzle-orm/issues/571)):
  41. ```typescript
  42. // Before:
  43. sql<Type | null>`...`.mapWith((v: any) => String(v)) // Output type: string
  44. // After:
  45. sql<Type | null>`...`.mapWith((v: Type) => String(v)) // Output type: string | null
  46. // `.nullable()` method:
  47. sql`...`.mapWith((v: unknown) => new Type(v)).nullable() // Output type: Type | null
  48. ```
  49. - Fixed `generatedByDefaultAsIdentity` columns not being filtered from inserts in runtime in `postgres` dialect
  50. - Improved `db.insert(table).select(...)`: removed column order match requirement, allowed skipping selection for columns with defaults or nullability (fixes [#3608](https://github.com/drizzle-team/drizzle-orm/issues/3608))
  51. ## Drivers
  52. - Updated `@tursodatabase/database`, `@tursodatabase/database-wasm` to v0.6.0, updated session internals for asynchronous prepare on driver side
  53. - Added `@tursodatabase/serverless` driver support
  54. - Added `@tursodatabase/sync` driver support
  55. - Added `@effect/sql-pglite` driver support
  56. - Added `@effect/sql-sqlite-node` driver support
  57. - Added `@effect/sql-sqlite-bun` driver support
  58. - Added `@effect/sql-sqlite-do` driver support
  59. - Added `@effect/sql-sqlite-wasm` driver support
  60. - Added `@effect/sql-libsql` driver support
  61. - Added `@effect/sql-d1` driver support
  62. - Added `@effect/sql-mysql2` driver support
  63. - Fixed `@effect/sql-pg` driver returning object response instead of raw response on `db.execute`
  64. - `pg-proxy`: added dialect config to optional dialect creator callback
  65. - Fixed postgres pull from failing for non-admin roles (fixes [#5568](https://github.com/drizzle-team/drizzle-orm/issues/5568))
  66. - Fixed: [[BUG]: [mssql] INSERT includes generatedAlwaysAs (computed) columns in the column list — SQL Server error 271
  67. ](https://github.com/drizzle-team/drizzle-orm/issues/5881)
  68. ## Drizzle Kit
  69. ### Machine-readable output & programmatic SDK
  70. - Added an `--output text|json` mode to `generate`, `push`, `pull`, `up`, `export`, and `check`. In `json` mode each command emits a typed JSON envelope (status, errors, payloads) for programmatic and agent consumption (see [OUTPUT_MODES.md](https://github.com/drizzle-team/drizzle-orm/blob/v1.0.0-rc.4/drizzle-kit/OUTPUT_MODES.md), [JSON_CONTRACT.md](https://github.com/drizzle-team/drizzle-orm/blob/v1.0.0-rc.4/drizzle-kit/JSON_CONTRACT.md))
  71. - Shipped a public programmatic SDK at the `drizzle-kit/cli` subpath exposing `generate()`, `push()`, `pull()`, `up()`, `exportSql()`, and `check()` with typed options and results matching the CLI JSON contract (see [SDK.md](https://github.com/drizzle-team/drizzle-orm/blob/v1.0.0-rc.4/drizzle-kit/SDK.md))
  72. - Auto-detected non-interactive mode (`--output json`, or `--output text` with a non-TTY stdin) no longer renders interactive prompts. Instead, unresolved renames and destructive changes (`confirm_data_loss`) are surfaced as a `missing_hints` envelope (or a missing-decisions report under `text`) and resolved by supplying a structured `hints` array up front via `--hints` / `--hints-file` (see [HINTS.md](https://github.com/drizzle-team/drizzle-orm/blob/v1.0.0-rc.4/drizzle-kit/HINTS.md))
  73. ### MCP server
  74. - Added `drizzle-kit mcp`, a Model Context Protocol server over stdio that exposes the migration lifecycle (`generate`, `push`, `check`, `export`, `up`, `pull`) as MCP tools for any MCP-capable AI agent (see [MCP.md](https://github.com/drizzle-team/drizzle-orm/blob/v1.0.0-rc.4/drizzle-kit/MCP.md))
  75. ### Agent skills
  76. - Added `drizzle-kit skills`, which installs Drizzle Kit's bundled [Agent Skills](https://skills.sh) into your project for AI coding assistants. Ships 8 skills: `drizzle`, `drizzle-generate`, `drizzle-hints`, `drizzle-migrations`, `drizzle-output-modes`, `drizzle-pull`, `drizzle-push`, and `drizzle-responses-and-errors` (see [`drizzle-kit/skills`](https://github.com/drizzle-team/drizzle-orm/blob/v1.0.0-rc.4/drizzle-kit/skills) folder)

voir sur githubimported 2026-09-28 via npm