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 +11 -1
- package/dist/effect/enum.js +2 -3
- package/dist/effect/enum.js.map +1 -1
- package/dist/generator/index.js +1 -1
- package/package.json +1 -1
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.
|
|
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
|
|
package/dist/effect/enum.js
CHANGED
|
@@ -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
|
-
//
|
|
20
|
-
const enumName =
|
|
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)
|
package/dist/effect/enum.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enum.js","sourceRoot":"","sources":["../../src/effect/enum.ts"],"names":[],"mappings":";;AAeA,gDAuBC;AAKD,8CAMC;AAhDD,yCAAoD;
|
|
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"}
|
package/dist/generator/index.js
CHANGED
|
@@ -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.
|
|
25
|
+
version: '1.5.3',
|
|
26
26
|
defaultOutput: './generated',
|
|
27
27
|
prettyName: 'Prisma Effect Kysely Generator',
|
|
28
28
|
}),
|