Skip to content

Commit

Permalink
docs: update readme and changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
4lessandrodev committed Apr 16, 2023
1 parent 2c52fe6 commit b84f548
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
19 changes: 17 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ All notable changes to this project will be documented in this file.
## Unreleased

---
### [1.17.4] - 2022-03-15
### [1.18.0] - 2022-03-15

### Changed

- changed: move event manager to instance of aggregate #50
- changed: move event manager to instance of aggregate #50 by [Paulo Santana](https://github.com/hikinine)

The user will still have the option of using the global event handler using `DomainEvents` class, however when adding an event using an instance of an aggregate, the event can only handle from the instance of the aggregate

```ts
Expand All @@ -35,6 +36,20 @@ DomainEvents.dispatch({ /* ... */});

```

- changed: Result properties to private using # to do not serialize private keys
- changed: Types for create method: Entity, Aggregate and ValueObject
- changed: Clone method in Entity and Aggregate instance. Now It accepts optional props.

```ts

// create a copy of user instance and also copy domain events from original aggregate user.
const userCopy = user.clone({ copyEvents: true });

// create a copy and apply a new name value
const userCopy = user.clone({ name });

```

---

### [1.17.3] - 2022-03-12
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rich-domain",
"version": "1.17.4",
"version": "1.18.0",
"description": "This package provide utils file and interfaces to assistant build a complex application with domain driving design",
"main": "index.js",
"types": "index.d.ts",
Expand Down

0 comments on commit b84f548

Please sign in to comment.