prisma-effect-kysely 1.5.1 → 1.5.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/CHANGELOG.md CHANGED
@@ -5,7 +5,17 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
- ## [1.5.1] - 2025-10-12
8
+ ## [1.5.3] - 2025-10-12
9
+
10
+ ### Changed
11
+
12
+ - **BREAKING**: Enum names now preserve original Prisma schema naming instead of converting to PascalCase
13
+ - If your enum is `UserRole` in Prisma, it stays `UserRole` in generated code
14
+ - If your enum is `user_role` in Prisma, it stays `user_role` (no longer converted to `UserRole`)
15
+ - This ensures generated TypeScript enums match your Prisma schema exactly
16
+ - **Migration**: If you were relying on automatic PascalCase conversion, you'll need to update your enum references
17
+
18
+ ## [1.5.2] - 2025-10-12
9
19
 
10
20
  ### Added
11
21
 
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.generateEnumSchema = generateEnumSchema;
4
4
  exports.generateEnumsFile = generateEnumsFile;
5
5
  const enum_1 = require("../prisma/enum");
6
- const naming_1 = require("../utils/naming");
7
6
  const codegen_1 = require("../utils/codegen");
8
7
  /**
9
8
  * Generate TypeScript enum + Effect Schema.Enums wrapper
@@ -16,8 +15,8 @@ const codegen_1 = require("../utils/codegen");
16
15
  * - Type alias for convenience
17
16
  */
18
17
  function generateEnumSchema(enumDef) {
19
- // Convert SCREAMING_SNAKE_CASE to PascalCase (Test 5)
20
- const enumName = (0, naming_1.toPascalCase)(enumDef.name);
18
+ // Preserve original enum name from Prisma schema
19
+ const enumName = enumDef.name;
21
20
  const schemaName = `${enumName}Schema`;
22
21
  const typeName = `${enumName}Type`;
23
22
  // Generate native TypeScript enum members (Tests 1-2)
@@ -1 +1 @@
1
- {"version":3,"file":"enum.js","sourceRoot":"","sources":["../../src/effect/enum.ts"],"names":[],"mappings":";;AAeA,gDAuBC;AAKD,8CAMC;AAhDD,yCAAoD;AACpD,4CAA+C;AAC/C,8CAAsD;AAEtD;;;;;;;;;GASG;AACH,SAAgB,kBAAkB,CAAC,OAA2B;IAC5D,sDAAsD;IACtD,MAAM,QAAQ,GAAG,IAAA,qBAAY,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5C,MAAM,UAAU,GAAG,GAAG,QAAQ,QAAQ,CAAC;IACvC,MAAM,QAAQ,GAAG,GAAG,QAAQ,MAAM,CAAC;IAEnC,sDAAsD;IACtD,MAAM,WAAW,GAAG,OAAO,CAAC,MAAM;SAC/B,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;QACT,MAAM,KAAK,GAAG,IAAA,yBAAkB,EAAC,CAAC,CAAC,CAAC;QACpC,OAAO,KAAK,CAAC,CAAC,IAAI,OAAO,KAAK,GAAG,CAAC;IACpC,CAAC,CAAC;SACD,IAAI,CAAC,KAAK,CAAC,CAAC;IAEf,6DAA6D;IAC7D,+CAA+C;IAC/C,OAAO,eAAe,QAAQ;EAC9B,WAAW;;;eAGE,UAAU,mBAAmB,QAAQ;;cAEtC,QAAQ,gCAAgC,UAAU,IAAI,CAAC;AACrE,CAAC;AAED;;GAEG;AACH,SAAgB,iBAAiB,CAAC,KAAoC;IACpE,MAAM,MAAM,GAAG,IAAA,4BAAkB,GAAE,CAAC;IACpC,MAAM,OAAO,GAAG,kCAAkC,CAAC;IACnD,MAAM,WAAW,GAAG,KAAK,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAE/D,OAAO,GAAG,MAAM,OAAO,OAAO,OAAO,WAAW,EAAE,CAAC;AACrD,CAAC"}
1
+ {"version":3,"file":"enum.js","sourceRoot":"","sources":["../../src/effect/enum.ts"],"names":[],"mappings":";;AAeA,gDAuBC;AAKD,8CAMC;AAhDD,yCAAoD;AAEpD,8CAAsD;AAEtD;;;;;;;;;GASG;AACH,SAAgB,kBAAkB,CAAC,OAA2B;IAC5D,iDAAiD;IACjD,MAAM,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;IAC9B,MAAM,UAAU,GAAG,GAAG,QAAQ,QAAQ,CAAC;IACvC,MAAM,QAAQ,GAAG,GAAG,QAAQ,MAAM,CAAC;IAEnC,sDAAsD;IACtD,MAAM,WAAW,GAAG,OAAO,CAAC,MAAM;SAC/B,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;QACT,MAAM,KAAK,GAAG,IAAA,yBAAkB,EAAC,CAAC,CAAC,CAAC;QACpC,OAAO,KAAK,CAAC,CAAC,IAAI,OAAO,KAAK,GAAG,CAAC;IACpC,CAAC,CAAC;SACD,IAAI,CAAC,KAAK,CAAC,CAAC;IAEf,6DAA6D;IAC7D,+CAA+C;IAC/C,OAAO,eAAe,QAAQ;EAC9B,WAAW;;;eAGE,UAAU,mBAAmB,QAAQ;;cAEtC,QAAQ,gCAAgC,UAAU,IAAI,CAAC;AACrE,CAAC;AAED;;GAEG;AACH,SAAgB,iBAAiB,CAAC,KAAoC;IACpE,MAAM,MAAM,GAAG,IAAA,4BAAkB,GAAE,CAAC;IACpC,MAAM,OAAO,GAAG,kCAAkC,CAAC;IACnD,MAAM,WAAW,GAAG,KAAK,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAE/D,OAAO,GAAG,MAAM,OAAO,OAAO,OAAO,WAAW,EAAE,CAAC;AACrD,CAAC"}
@@ -22,7 +22,7 @@ const orchestrator_1 = require("./orchestrator");
22
22
  __exportStar(require("../kysely/helpers"), exports);
23
23
  exports.generator = (0, generator_helper_1.generatorHandler)({
24
24
  onManifest: () => ({
25
- version: '1.5.1',
25
+ version: '1.5.3',
26
26
  defaultOutput: './generated',
27
27
  prettyName: 'Prisma Effect Kysely Generator',
28
28
  }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prisma-effect-kysely",
3
- "version": "1.5.1",
3
+ "version": "1.5.3",
4
4
  "description": "Prisma generator that creates Effect Schema types from Prisma schema compatible with Kysely",
5
5
  "license": "MIT",
6
6
  "author": "Samuel Ho",