Repository navigation
·
31 commits
to main
since this release
Immutable
release. Only release title and notes can be modified.
[1.3.8] - 2025-10-18
Added
- Introduced programmatic
defineModelAPI for model definitions, eliminating the need for decorators (model.ts). - Added
MetadataStorageclass to manage model configurations withoutreflect-metadata. - Added support for defining lifecycle hooks in
ModelConfigor as class methods (hooks.ts). - Added
example.tsto demonstrate the new programmatic API usage. - Extended
ModelConfiginterface to support columns, relations, hooks, versioning, and soft deletes (types.ts).
Changed
- Replaced decorator-based model definitions with
defineModelAPI, removing dependency onreflect-metadataand TypeScript experimental features (experimentalDecorators,emitDecoratorMetadata). - Updated
stabilize.tsto exportdefineModeland removereflect-metadataimport. - Modified
repository.tsto useMetadataStoragefor table names, columns, relations, validators, and soft delete fields. - Rewrote
hooks.tsto support hooks viaModelConfigand class methods, integrated withMetadataStorage. - Updated
migrations.tsto generate schemas usingMetadataStorageinstead of decorator metadata. - Revised
types.tsto remove decorator-related types and addModelConfig,ColumnConfig, andRelationConfiginterfaces. - Updated
README.mdto reflect the new programmatic API, remove decorator references, and update examples. - Ensured compatibility with
verbatimModuleSyntaxby usingexport typefor type exports instabilize.ts.
Removed
- Deleted
decorators.tsas decorators are no longer used. - Removed dependency on
reflect-metadatafrom the project.
Fixed
- Fixed TypeScript type errors in
repository.tsforcolumnsandrelationsby mappingMetadataStorageoutputs to match expected types. - Corrected
runHooksinrepository.tsto callhook.callback(entity)instead ofhook(). - Fixed TypeScript
verbatimModuleSyntaxerror instabilize.tsby separating type and value exports.