Changelog¶
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[3.4.0] - 2026-09-08¶
Added¶
- Cursor pagination:
where()returns the instances with a non-enumerablecursorproperty whenever alimitis given. Passing it back as{ cursor }reads only the next page, whereskipreads and discards everything before it on every page. createMany(rows, options?): creates several records withBatchWriteItem, 25 per request, retrying whatever DynamoDB leaves unprocessed. It cannot check for duplicate primary keys, whichBatchWriteItemdoes not support.deleteMany(ids, options?): deletes by primary key without reading the records first. Always a hard delete and it runs no hooks.deletedquery option: replaces_includeTrashed, which keeps working as a deprecated alias.- Top-level
whereoption: the filters inWhereOptions.whereare now merged with those of the first argument. Until now they were silently ignored. - New public types:
QueryResult<M>,DynamiteConfig.
Changed¶
- Reads by primary key use
GetItemandBatchGetItem:=on the primary key is a singleGetItem, andinaBatchGetItemof 100 keys per request, instead of oneQueryper value. Any extra filter is evaluated over the item already read, so the query stays a single request. limitstops the read: pagination stops as soon as it has enough items, and the limit travels to DynamoDB asLimitwhen nothing is left to filter server-side.first()no longer reads the whole table.- Parallel
Scan: a read with nolimitthat ends in aScanis split into four segments. Same read units, a fraction of the latency. Withoutorderthe resulting order is arbitrary, as it already was. - Native ordering by sort key: a
Queryon the primary key ordered by the@IndexSortcolumn usesScanIndexForwardinstead of sorting in memory. update()by primary key writes without reading: a singleUpdateItemwith the touched fields, conditioned on the record existing, whenever no@Setor@Validateof those fields declares thecurrentargument. Instanceupdate()does the same, using the values it already holds.- Batched writes:
delete(), massupdate(),sync()on a relation,createMany()anddeleteMany()write in batches of 25. - Pivot tables are queried, never scanned:
attach(),detach(), instancesync()and loading a@ManyToManygo through the pivot's<foreign_key>_indexGSI, falling back to aScanonly when the index does not exist. - Dependencies:
pluralize,uuid,@arcaelas/utilsand@aws-sdk/lib-dynamodbwere declared but never imported, and are gone.@aws-sdk/util-dynamodbwas imported without being declared, and is now a dependency. The AWS SDK moved from an exact pin to^3.329.0, so it dedupes against the consumer's copy.
Fixed¶
- The primary key of a model renamed with
@Nameis now used correctly indelete,forceDestroy,incrementanddecrement. - Documentation:
withTrashed(),onlyTrashed(),relationDecorator(),ColumnBuilderandWrapperEntrywere documented and do not exist. The@BelongsTosignature was documented with its arguments swapped.connect()was documented as creating tables, whichsync()does. The write pipeline was documented as(current, next)when it takes(next, current).
[3.2.1] - 2026-09-03¶
Fixed¶
WhereFilterstyping:in/$innow accept an array of the column type ({ role: { $in: ["user", "assistant"] } }); before, the type demanded a single value and TypeScript rejected valid filters.
[3.2.0] - 2026-09-03¶
Changed¶
@PrimaryKeyaccepts any non-empty string id. ULID is still generated when no id is given, but existing UUID (or custom) keys no longer throwInvalid ULID.@Indexcolumns are GSIs:connect()registers every non-primary@Indexcolumn as a<field>_indexGSI andsync()creates it, sowhere/firston those fields useQueryCommand. Before, only the foreign keys of@HasMany/@HasOnewere considered.$inon the primary key or a GSI runs oneQueryCommandper distinct value instead of a fullScanCommandwith anORfilter. Relation loading (include) benefits automatically.
Fixed¶
- Primary key detection prefers the
@PrimaryKeycolumn over the first@Indexcolumn. - Self-healing after a missing GSI now removes the column's database name from the GSI registry.
[3.0.0] - 2026-06-06¶
Breaking Changes¶
- Unified mutation options: static
create,update,delete,increment,decrementand instancesave,update,destroy,forceDestroynow take a singleoptionsobject as their last argument:MutationOptions = { hook?: boolean; tx?: TransactionContext }. - Removed positional
tx: the transaction is now passed inside the options object. Replace the old trailingtxargument with{ tx }— for exampleUser.create(data, { tx })andorder.destroy({ tx }).
Added¶
- Lifecycle hooks: six instance-method decorators —
@BeforeCreate,@AfterCreate,@BeforeUpdate,@AfterUpdate,@BeforeDestroy,@AfterDestroy. Opt-in per operation with{ hook: true }. Inside a hookthisis the entity instance; the update hooks receive the changes delta as their first argument. Multiple hooks of the same type run in declaration order and async hooks are awaited. In massupdate/deletethey run once per affected entity.before*hooks run before persisting andafter*hooks run after (after commit inside a transaction).increment()/decrement()accept{ tx }but do not trigger hooks. TransactionContext.onCommitnow accepts async callbacks.
[2.0.0] - 2026-04-02¶
Breaking Changes¶
- Primitive decorators:
@Get,@Set,@Validatereplace@Mutate,@Column,@Serialize(removed). @Defaultmoved from get to set pipeline. Resolves at construction, not at read time.@PrimaryKeygenerates ULID instead of UUID. Validates ULID format. Immutable after first assignment.@NotNullis composition of@Validate. Removedstore.nullablefrom schema.@UpdatedAtrespects explicit values. Only generatesnow()when no value is passed.@BelongsTosignature unified to(model, foreignKey, localKey), same as@HasMany/@HasOne.- Set pipeline argument order changed from
(current, next)to(next, current). - Constructor runs setters for all fields, not just those present in props.
connect()no longer creates tables. Only configures the DynamoDB client.- Removed:
withTrashed(),onlyTrashed(),relationDecorator(),@Column,@Mutate,@Serialize. where()throws error if field does not exist inschema.columns.
Added¶
sync(): creates tables, GSIs and pivot tables. Auto-detects GSIs from relations. Parallel operations with polling.- Smart
where():QueryCommandwith PK or GSI, fallback toScanCommand. Self-healing if GSI doesn't exist. connect()computes expected GSIs from schemas without API calls.update()/delete()PK optimization: directGetItemCommand/DeleteItemCommand.increment()/decrement(): atomic viaUpdateItemCommand. Static, instance and transactional.create()uniqueness:ConditionExpression: attribute_not_exists(pk).- ULID: internal generator, no dependencies. Monotonic, sequential, lexicographically sortable.
- Transactions:
addUpdate(),onCommit(),__isPersistedpost-commit, auto-chunking in batches of 25. - Typing:
Schemawith real types.WhereOptionswith recursive typedinclude.PickByType<T, V>.orderaccepts objects.
Fixed¶
@CreatedAtnow setsstore.createdAt = truefor default sort.- Relation cache simplified with dirty flag.
processIncludesassigns via setter._mapPropertiesToDBremoved (dead code).where()normalization unified.
Tests¶
- 165 tests against DynamoDB Local: decorators, CRUD, recursive relations, ManyToMany, combined filters, bulk 3000, Query vs Scan, pipeline contracts, PK immutability, PK duplicates, ULID sequentiality.
[1.0.23] - 2025-12-13¶
Fixed¶
- mkdocs.yml: Corrected navigation structure pointing to non-existent paths (
guides/,api/) - TOC anchors: Fixed 47 broken anchor links across ES/DE documentation files
- Removed accents from anchors (
#introducción→#introduccion) - Fixed triple-dash anchors (
#primarykey---claves→#primarykey-claves) - docs/index.es.md, docs/index.de.md: Fixed homepage links to correct paths
- docs/installation.*.md: Fixed API reference links (
./api/table.md→./references/table.md) - docs/getting-started.*.md: Fixed core-concepts and examples links
- docs/references/client.*.md: Fixed decorators link format (
./decorators/→./decorators.md) - docs/references/decorators.de.md: Removed TOC entries for non-existent sections (file is incomplete)
- docs/examples/relations.*.md: Fixed decorator reference links to correct anchors
- docs/examples/advanced.*.md: Fixed core-concepts cross-reference link
Documentation¶
- Resolved all MkDocs build warnings (from 47 to 0 broken links)
- Improved multilingual documentation consistency (EN/ES/DE)
- Fixed German navbar appearing on 404 pages due to incorrect link paths
[1.0.20] - 2025-12-12¶
Added¶
API.md- Comprehensive API documentation covering decorators, schemas, and methodsdocs/references/table.md- Complete Table class API reference in Englishdocs/references/types.md- Full TypeScript types documentation in Englishsrc/@types/index.ts- Centralized TypeScript type definitions for better type inferenceeslint.config.js- ESLint configuration for consistent code qualityscripts/generate_seed.ts- Utility script for generating test seed datascripts/load_seed.ts- Utility script for loading seed data into DynamoDBtsx.config.json- TSX runtime configuration for development
Changed¶
- Reorganized documentation structure from
guides/,api/,advanced/into unifiedreferences/directory - Renamed example files for consistency:
basic-model→basic,advanced-queries→advanced,relationships→relations - Moved
getting-started.mdfromguides/to documentation root for easier access - Updated ~40 internal documentation links to match new structure
- Simplified navigation in
index.mdwith cleaner hierarchy - Lowercase changelog filenames for cross-platform consistency
- Refactored
src/core/table.tswith improved query handling and relationship loading - Enhanced
src/core/decorator.tswith optimized getter/setter pipelines - Improved
src/core/client.tswith better DynamoDB connection handling - Optimized all decorators in
src/decorators/*.tsfor better performance - Refactored
src/utils/relations.tswith cleaner relationship resolution logic - Updated
src/index.tsexports for simplified module structure - Reduced
src/index.test.tstest suite for faster execution - Updated
package.jsonwith improved scripts and dependencies - Cleaned up
yarn.lockremoving redundant dependency entries
Removed¶
docs/examples/validation.*- Redundant examples, content merged intobasicexamplesdocs/guides/relationships.*- Duplicate content, consolidated intorelationsexamplesdocs/api/table.mdanddocs/api/types.md- Replaced with new English versions inreferences/src/core/method.ts- Functionality consolidated intotable.ts
Fixed¶
- Corrected
table.mdandtypes.mdlanguage (were incorrectly in Spanish, now properly in English) - Fixed all broken internal documentation links across 39 files
- Resolved inconsistent file naming conventions in examples directory
Performance¶
- Reduced test file complexity for faster CI/CD execution
- Optimized yarn.lock with -2873 lines of redundant entries
- Net codebase reduction of -9220 lines while maintaining functionality
Documentation¶
- Complete documentation restructure following: Get Started → Installation → Examples → References → Changelog
- Multilingual support maintained (EN/ES/DE) across all documentation files
- Improved cross-referencing between related documentation sections
[1.0.17] - 2025-12-03¶
Added¶
@Serialize(fromDB, toDB)- Bidirectional data transformation decorator@DeleteAt()- Soft delete decorator with timestampDynamite.tx()- Atomic transactions with automatic rollbackTransactionContextclass for managing transactional operationswithTrashed()method to include soft-deleted recordsonlyTrashed()method to query only soft-deleted records- Support for
nullas fallback in@Serializeparameters
Changed¶
- Enhanced
destroy()method to support soft delete when@DeleteAtis present destroy()now accepts optionalTransactionContextparameter for transactional operations- Improved documentation with
@Serializeand@DeleteAtexamples - Consolidated decorator documentation into
/guides/decorators.md
Removed¶
/api/decorators/directory (21 files) - content merged into/guides/decorators.md
Documentation¶
- Added comprehensive
@Serializedocumentation with encryption, compression examples - Added
@DeleteAtdocumentation with trash system patterns - Added
Dynamite.tx()transaction API documentation - Updated model examples to include new decorators
- Consolidated multilingual documentation (EN/ES/DE)
[1.0.13] - 2025-10-13¶
Current Release¶
This is a stable release of @arcaelas/dynamite - a modern, decorator-first ORM for DynamoDB with full TypeScript support.
Features¶
Core Functionality¶
- Full-featured ORM with decorator-first approach
- Complete TypeScript support with type safety
- Auto table creation and management
- Zero boilerplate configuration
Decorators¶
- Core Decorators:
@PrimaryKey(),@Index(),@IndexSort(),@Name() - Data Decorators:
@Default(),@Mutate(),@Validate(),@NotNull() - Timestamp Decorators:
@CreatedAt(),@UpdatedAt() - Relationship Decorators:
@HasMany(),@BelongsTo()
TypeScript Types¶
CreationOptional<T>- Mark fields as optional during creationNonAttribute<T>- Exclude computed properties from databaseHasMany<T>- One-to-many relationshipsBelongsTo<T>- Many-to-one relationshipsInferAttributes<T>- Type inference for model attributes
Query Operations¶
- Basic CRUD operations (create, read, update, delete)
- Advanced query operators:
=,!=,<,<=,>,>=,in,not-in,contains,begins-with - Pagination support with
limitandskip - Sorting with
order(ASC/DESC) - Attribute selection with
attributesarray - Complex filtering with multiple conditions
Relationships¶
- One-to-many relationships via
@HasMany() - Many-to-one relationships via
@BelongsTo() - Nested relationship loading with
include - Filtered relationship queries
- Recursive relationship support
Data Validation & Transformation¶
- Field validation with custom validators
- Data mutation/transformation before save
- Multi-step validation chains
- Not-null constraints
- Email, age, and custom format validation
Configuration¶
- AWS DynamoDB connection support
- DynamoDB Local development support
- Custom endpoint configuration
- Flexible credential management
- Environment variable support
Dependencies¶
@aws-sdk/client-dynamodb: ^3.329.0@aws-sdk/lib-dynamodb: ^3.329.0pluralize: ^8.0.0uuid: ^11.1.0
Documentation¶
- Comprehensive README with examples
- TypeScript types documentation
- API reference guide
- Development setup instructions
- Troubleshooting guide
- Best practices and performance tips
[1.0.0] - Initial Release¶
Added¶
- Initial release of @arcaelas/dynamite
- Base Table class implementation
- Core decorator system
- DynamoDB client wrapper
- Metadata management system
- Basic CRUD operations
- Query builder functionality
- Relationship support foundation
- TypeScript definitions
- Jest testing setup
Version History Summary¶
- v3.0.0 (Current) - Lifecycle hooks (@Before/@After) and unified
{ hook, tx }mutation options (breaking: positionaltxremoved) - v1.0.23 - Documentation link fixes, TOC anchor corrections, multilingual consistency
- v1.0.20 - Documentation restructure, codebase optimization, API.md creation
- v1.0.17 - Added @Serialize, @DeleteAt, Dynamite.tx() transactions
- v1.0.13 - Stable release with full feature set
- v1.0.0 - Initial public release
Links¶
- Repository: https://github.com/arcaelas/dynamite
- Issues: https://github.com/arcaelas/dynamite/issues
- NPM Package: https://www.npmjs.com/package/@arcaelas/dynamite
- Author: Arcaelas Insiders
Migration Guides¶
Upgrading to v1.0.20¶
Documentation Links¶
If you have external links to the documentation, update them: - docs/guides/getting-started.md → docs/getting-started.md - docs/api/* → docs/references/* - docs/guides/decorators.md → docs/references/decorators.md - docs/examples/basic-model.md → docs/examples/basic.md - docs/examples/advanced-queries.md → docs/examples/advanced.md - docs/examples/relationships.md → docs/examples/relations.md
No breaking changes to the API. All features are backward compatible.
Upgrading to v1.0.13¶
No breaking changes from v1.0.0. All features are backward compatible.
Contributing¶
See GitHub Repository for contribution guidelines.
Note: For detailed usage examples and API documentation, please refer to the GitHub Repository.