prisma-zero 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -71,6 +71,32 @@ export const userTable = table('User')
71
71
  .primaryKey('id');
72
72
  ```
73
73
 
74
+ ## Postgres Time Support
75
+
76
+ Prisma Postgres `DateTime` native types continue to map to Zero `number()` columns, including `@db.Time` and `@db.Timetz`:
77
+
78
+ ```prisma
79
+ model StoreHours {
80
+ id String @id @default(uuid())
81
+ opensAt DateTime @db.Time(6)
82
+ closesAt DateTime @db.Timetz(6)
83
+ }
84
+ ```
85
+
86
+ The generated Zero schema will include:
87
+
88
+ ```ts
89
+ export const storeHoursTable = table('StoreHours')
90
+ .columns({
91
+ id: string(),
92
+ opensAt: number(),
93
+ closesAt: number(),
94
+ })
95
+ .primaryKey('id');
96
+ ```
97
+
98
+ This generator intentionally keeps `time` and `timetz` fields as plain `number()` columns so they match Zero's existing date/time handling. If your app uses `@db.Time` or `@db.Timetz`, make sure your installed `@rocicorp/zero` version includes upstream support for those Postgres types (`0.26.0+`).
99
+
74
100
  ### Supported Array Types
75
101
 
76
102
  - **Scalar arrays**: `String[]`, `Int[]`, `Float[]`, `Boolean[]`, `DateTime[]`, `BigInt[]`, `Decimal[]`
@@ -39,7 +39,7 @@ var import_promises = require("fs/promises");
39
39
  var import_path = require("path");
40
40
 
41
41
  // package.json
42
- var version = "0.1.2";
42
+ var version = "0.1.3";
43
43
 
44
44
  // src/generators/code-generator.ts
45
45
  function generateImports(schema, config) {
package/dist/generator.js CHANGED
@@ -6,7 +6,7 @@ import { mkdir, writeFile } from "fs/promises";
6
6
  import { join } from "path";
7
7
 
8
8
  // package.json
9
- var version = "0.1.2";
9
+ var version = "0.1.3";
10
10
 
11
11
  // src/generators/code-generator.ts
12
12
  function generateImports(schema, config) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prisma-zero",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Generate Zero schemas from Prisma ORM schemas",
5
5
  "type": "module",
6
6
  "bin": {
@@ -36,27 +36,27 @@
36
36
  "url": "https://bugs.rocicorp.dev"
37
37
  },
38
38
  "dependencies": {
39
- "@prisma/generator-helper": "^7.1.0",
39
+ "@prisma/generator-helper": "^7.5.0",
40
40
  "camelcase": "^9.0.0"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@rocicorp/prettier-config": "^0.4.0",
44
- "@rocicorp/zero": "0.25.2",
45
- "@types/node": "^24.10.1",
46
- "@types/pg": "^8.15.6",
44
+ "@rocicorp/zero": "1.0.0",
45
+ "@types/node": "^25.5.0",
46
+ "@types/pg": "^8.20.0",
47
47
  "@types/pluralize": "^0.0.33",
48
48
  "@types/ws": "^8.18.1",
49
- "@vitest/browser": "^4.0.15",
50
- "@vitest/coverage-v8": "4.0.15",
51
- "@vitest/ui": "^4.0.15",
52
- "oxlint": "^1.31.0",
53
- "oxlint-tsgolint": "^0.8.3",
54
- "prettier": "^3.7.4",
49
+ "@vitest/browser": "^4.1.1",
50
+ "@vitest/coverage-v8": "4.1.1",
51
+ "@vitest/ui": "^4.1.1",
52
+ "oxlint": "^1.57.0",
53
+ "oxlint-tsgolint": "^0.17.4",
54
+ "prettier": "^3.8.1",
55
55
  "tsup": "^8.5.1",
56
56
  "tsx": "^4.21.0",
57
- "typescript": "^5.9.3",
58
- "vite-tsconfig-paths": "^5.1.4",
59
- "vitest": "^4.0.15"
57
+ "typescript": "^6.0.2",
58
+ "vite-tsconfig-paths": "^6.1.1",
59
+ "vitest": "^4.1.1"
60
60
  },
61
61
  "prettier": "@rocicorp/prettier-config",
62
62
  "scripts": {