All notable changes to this project will be documented in this file.
- Further features and improvements coming soon.
- CLI: db:backup - Backup the database to a timestamped file. SQLite databases are copied directly; other databases export to JSON.
- CLI: db:restore - Restore the database from a backup file with confirmation prompt.
- CLI: generate:api - Generate a full REST API scaffold (CRUD routes) from a model definition.
- CLI: migrate:fresh - Drop all tables and re-run all migrations without seeding.
- CLI: db:size - Show database and table size statistics (file size, row counts, table sizes).
- New examples:
saas.ts(multi-tenant SaaS),cms.ts(content management system),analytics.ts(event tracking and aggregations). - Updated CLI banner with improved formatting and expanded
infocommand output. - Updated CLI, docs, and README with new commands and examples.
- CLI version bumped to 2.1.0.
- Updated stabilize-docs hero badge from v1.3.0 to v2.1.0.
- Updated features component with Backup & Restore, API Generation, and Database Analytics features.
- Updated CLI documentation pages with all new commands.
- Expanded examples page with 6 new example cards (E-Commerce, REST API, Query Builder, Soft Deletes, Caching, Hooks).
- Updated main README with new examples section and expanded CLI documentation.
- Added Timestamps Configuration feature for automatic management of
createdAtandupdatedAtcolumns (types.ts,model.ts,repository.ts,migrations.ts).- Added
TimestampsConfiginterface andtimestampsproperty toModelConfigintypes.ts. - Added
getTimestampsmethod toMetadataStorageinmodel.ts. - Updated
create,update,bulkCreate,bulkUpdate, andupsertmethods inrepository.tsto set timestamps automatically. - Updated
migrations.tsto include timestamp columns in schema generation. - Updated
README.mdwith a new "Timestamps" section and example.
- Added
- Fixed TypeScript error (TS7053) in
repository.tsfor timestamps handling in_create,_bulkCreate,_bulkUpdate, and_upsertmethods by usingRecord<string, any>for safe property access and maintainingPartial<T>type safety.
- Added Custom Query Scopes feature, allowing reusable query conditions defined in model configurations (
types.ts,model.ts,query-builder.ts,repository.ts).- Added
scopesproperty toModelConfiginterface intypes.tsto define scope functions. - Added
getScopesmethod toMetadataStorageinmodel.tsto retrieve scope definitions. - Added
scopemethod toQueryBuilderinquery-builder.tsto apply scopes to queries. - Added
scopemethod toRepositoryinrepository.tsfor direct scope application. - Updated
README.mdwith a new "Custom Query Scopes" section and example.
- 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).
- 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.
- Deleted
decorators.tsas decorators are no longer used. - Removed dependency on
reflect-metadatafrom the project.
- 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.
- Improved repository QueryBuilder with chainable joins, advanced where clauses, and cache support.
- Added support for model decorators and repository pattern.
- New CLI features for migrations, seeds, rollback, and status.
- Security, funding, conduct, and contributing markdowns.
- More expressive README and docs.
- Updated ORM configuration examples.
- Enhanced documentation for open source best practices.
- Various bug fixes for connection handling and retry logic.