prisma-effect-kysely 1.7.1 → 1.7.2
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 -0
- package/dist/effect/enum.d.ts.map +1 -1
- package/dist/effect/enum.js +9 -1
- package/dist/effect/enum.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +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.7.2] - 2025-10-12
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- **Enum PascalCase Aliases**: Added missing const and type aliases for better ergonomics
|
|
13
|
+
- Now exports: `export const BudgetStatus = BUDGET_STATUS` (const alias)
|
|
14
|
+
- Now exports: `export type BudgetStatus = BudgetStatusType` (type alias)
|
|
15
|
+
- Allows consuming code to use PascalCase imports: `import { BudgetStatus } from './enums'`
|
|
16
|
+
- Maintains backward compatibility with SCREAMING_SNAKE_CASE enums
|
|
17
|
+
- This was documented in 1.7.1 but not actually implemented in the generated output
|
|
18
|
+
|
|
8
19
|
## [1.7.1] - 2025-10-12
|
|
9
20
|
|
|
10
21
|
### Changed
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enum.d.ts","sourceRoot":"","sources":["../../src/effect/enum.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAKrD;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,IAAI,CAAC,aAAa,
|
|
1
|
+
{"version":3,"file":"enum.d.ts","sourceRoot":"","sources":["../../src/effect/enum.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAKrD;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,IAAI,CAAC,aAAa,UAiC7D;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,SAAS,IAAI,CAAC,aAAa,EAAE,UAMrE"}
|
package/dist/effect/enum.js
CHANGED
|
@@ -31,13 +31,21 @@ function generateEnumSchema(enumDef) {
|
|
|
31
31
|
.join(",\n");
|
|
32
32
|
// Generate: enum + Schema.Enums() wrapper + type (Tests 3-4)
|
|
33
33
|
// Explicitly NOT using Schema.Literal (Test 6)
|
|
34
|
+
//
|
|
35
|
+
// Also generate PascalCase aliases for better ergonomics:
|
|
36
|
+
// - const alias: allows using PascalCase in runtime code
|
|
37
|
+
// - type alias: provides PascalCase type name
|
|
34
38
|
return `export enum ${enumName} {
|
|
35
39
|
${enumMembers}
|
|
36
40
|
}
|
|
37
41
|
|
|
38
42
|
export const ${schemaName} = Schema.Enums(${enumName});
|
|
39
43
|
|
|
40
|
-
export type ${typeName} = Schema.Schema.Type<typeof ${schemaName}
|
|
44
|
+
export type ${typeName} = Schema.Schema.Type<typeof ${schemaName}>;
|
|
45
|
+
|
|
46
|
+
// PascalCase aliases for better ergonomics
|
|
47
|
+
export const ${pascalName} = ${enumName};
|
|
48
|
+
export type ${pascalName} = ${typeName};`;
|
|
41
49
|
}
|
|
42
50
|
/**
|
|
43
51
|
* Generate all enum schemas as a single file content
|
package/dist/effect/enum.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enum.js","sourceRoot":"","sources":["../../src/effect/enum.ts"],"names":[],"mappings":";;AAeA,
|
|
1
|
+
{"version":3,"file":"enum.js","sourceRoot":"","sources":["../../src/effect/enum.ts"],"names":[],"mappings":";;AAeA,gDAiCC;AAKD,8CAMC;AA1DD,yCAAoD;AACpD,4CAA+C;AAC/C,8CAAsD;AAEtD;;;;;;;;;GASG;AACH,SAAgB,kBAAkB,CAAC,OAA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