Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: valtyr/prisma-kysely
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.4.0
Choose a base ref
...
head repository: valtyr/prisma-kysely
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.4.1
Choose a head ref
  • 2 commits
  • 3 files changed
  • 2 contributors

Commits on May 17, 2023

  1. Revert to own generated type (#46)

    * Revert to own generated type
    
    * Add changeset
    valtyr authored May 17, 2023
    Copy the full SHA
    36393b6 View commit details
  2. Version Packages (#47)

    Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
    valtyr and github-actions[bot] authored May 17, 2023
    Copy the full SHA
    b8e8229 View commit details
Showing with 11 additions and 2 deletions.
  1. +6 −0 CHANGELOG.md
  2. +1 −1 package.json
  3. +4 −1 src/helpers/generateFile.ts
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# prisma-kysely

## 1.4.1

### Patch Changes

- 36393b6: Bugfix: revert to own generated type, that supports ColumnType

## 1.4.0

### Minor Changes
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
"repository": {
"url": "https://github.com/valtyr/prisma-kysely"
},
"version": "1.4.0",
"version": "1.4.1",
"main": "dist/generator.js",
"files": [
"dist"
5 changes: 4 additions & 1 deletion src/helpers/generateFile.ts
Original file line number Diff line number Diff line change
@@ -19,7 +19,10 @@ export const generateFile = (

const result = printer.printFile(file);

const leader = `import type { ColumnType, Generated, GeneratedAlways } from "kysely";
const leader = `import type { ColumnType, GeneratedAlways } from "kysely";
export type Generated<T> = T extends ColumnType<infer S, infer I, infer U>
? ColumnType<S, I | undefined, U>
: ColumnType<T, T | undefined, T>;
export type Timestamp = ColumnType<Date, Date | string, Date | string>;`;

if (withEnumImport) {