chore(deps): update dependency kysely-codegen to ^0.19.0 #139
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^0.16.8->^0.19.0Release Notes
RobinBlomberg/kysely-codegen (kysely-codegen)
v0.19.0New features
Thanks to amazing contributions from @kevinmichaelchen in #274, you can now override types on a global level:
.kysely-codegenrc.json
{ "customImports": { "InstantRange": "./custom-types", "CustomDuration": "@​my-org/custom-types#Duration", "Temporal": "@​js-temporal/polyfill", }, "typeMapping": { "timestamptz": "Temporal.Instant", "tstzrange": "InstantRange", "date": "Temporal.PlainDate", "interval": "CustomDuration" } }Example of generated output:
What's Changed
New Contributors
Full Changelog: RobinBlomberg/kysely-codegen@0.18.0...0.19.0
v0.18.0Compare Source
Migration to 0.18.0
The follow CLI options have been changed:
--schemahas been renamed to--default-schema.--singularhas been renamed to--singularize.--runtime-enumsand--runtime-enums-stylehave been merged into a single CLI option--runtime-enums.Configuration file
All codegen options can also be configured in a
.kysely-codegenrc.json(or.js,.ts,.yamletc.) file or thekysely-codegenproperty inpackage.json. See Cosmiconfig for all available configuration file formats.The default configuration:
{ "camelCase": false, "dateParser": "timestamp", "defaultSchemas": [], // ["public"] for PostgreSQL. "dialect": null, "domains": true, "envFile": null, "excludePattern": null, "includePattern": null, "logLevel": "warn", "numericParser": "string", "outFile": "./node_modules/kysely-codegen/dist/db.d.ts", "overrides": {}, "partitions": false, "print": false, "runtimeEnums": false, "singularize": false, "typeOnlyImports": true, "url": "env(DATABASE_URL)", "verify": false }The configuration object adds support for more advanced options:
{ "camelCase": true, "overrides": { "columns": { "users.settings": "{ theme: 'dark' }" } }, "singularize": { "/^(.*?)s?$/": "$1_model", "/(bacch)(?:us|i)$/i": "$1us" } }The generated output:
Custom serializers and dialects
The new configuration support also adds support for supplying custom serializers.
Here is a stub example of a basic Zod serializer (
.kysely-codegenrc.ts):Example output:
Similarly, it's also possible to supply a custom
dialectvalue, allowing you to create a completely new kysely-codegen dialects or extending an existing one with extra logic.What's Changed
...IdentifierNodeclasses into a singleIdentifierNodeclassskipAutogenerationFileCommentserializer optionoverridesnot always applying to the correct columnNew Contributors
Full Changelog: RobinBlomberg/kysely-codegen@0.17.0...0.18.0
v0.17.0What's Changed
.envfile is missingNew Contributors
Full Changelog: RobinBlomberg/kysely-codegen@0.16.7...0.17.0
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.