Skip to content

Commit

Permalink
dataclass@2.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeyraspopov committed Sep 28, 2022
1 parent 81b6184 commit ad54c85
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Changelog

## [`v2.1.0`](https://github.com/alexeyraspopov/dataclass/releases/tag/v2.1.0)

- Data instances are now sealed. Adding extra keys via `create()` or `copy()` will result in runtime
error. If type system is properly utilized, this should not create any issues to existing code.
- Fully rewritten instantiation and copy algorithms with backward compatibility. New implementation
consumes less memory and uses faster approach in copying objects.
- Fixed dynamic defaults being re-generated after `copy()`
- `copy()` methods now both can omit the argument, creating a referential copy of the instance.
- `equals()` now compares all keys (previously it was checking only the ones overriding defaults).
The assumed optimizaiton in time didn't pay out and only caused unnecessary complication to
copying mechanism and higher memory consumtion.

## [`v2.0.0`](https://github.com/alexeyraspopov/dataclass/releases/tag/v2.0.0)

- Dataclass is now licensed under [ISC License](https://en.wikipedia.org/wiki/ISC_license)
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": "dataclass",
"version": "2.0.0",
"version": "2.1.0",
"description": "Data classes for TypeScript & JavaScript",
"author": "Alexey Raspopov",
"license": "ISC",
Expand Down

0 comments on commit ad54c85

Please sign in to comment.