All notable changes to this package are documented in this file.
- Made value-object state deeply immutable through defensive copying and freezing, constrained it to plain domain data, and replaced serialisation-based equality with dependable structural comparison.
- Generalised entities and aggregates to accept an explicit identifier type and value, allowing string, numeric, bigint, UUID and other identifier strategies.
- Made identifier and entity equality type-aware: equal raw values no longer make different identifier or entity classes equal.
- Made entity and aggregate properties protected so state changes are expressed through domain methods rather than public property mutation.
- Required entity identifiers explicitly, leaving creation and reconstitution factories to decide how identifiers are obtained.
- Made aggregate domain-event collections readonly snapshots and replaced the
aggregate-version setter with
updateAggregateVersion(). - Added consumer-level declaration tests for the published ESM and CommonJS package surface.
- Added
Domain.Identifier<Value>for strongly typed custom identifiers. - Added validated
UUIDv4.generate()andUUIDv4.fromString()factories that preserve subclass types. - Added runtime validation for explicit entity identifiers and finite numeric identifier values.
- Added
clearDomainEvents()as the explicit event lifecycle operation.
- Removed automatic UUIDv4 generation from the base entity constructor.
- Removed aggregate domain-event logging and its direct
console.infoside effect. - Removed mutable access to value-object properties and aggregate event arrays.
- Removed
clearEvents()and the writableaggregateVersionproperty.
- Relicensed the Bitloops-owned source from GPL-3.0 to MIT.
- Moved package development to
bitloops/ddd-tactical-core-boilerplate. - Published under the new
ddd-tactical-core-boilerplatepackage name. - Raised the supported Node.js version to 22 or newer.
- Replaced the previous TypeScript build with verified ESM and CommonJS package outputs.
- Removed the unused
nats,class-transformerandreflect-metadataruntime dependencies.