Skip to content

Commit

Permalink
chore(release): 2.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
SkeLLLa committed Jan 27, 2021
1 parent 77b6001 commit 223d2aa
Show file tree
Hide file tree
Showing 20 changed files with 107 additions and 84 deletions.
71 changes: 47 additions & 24 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,59 +2,82 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## 2.1.0 (2021-01-27)

### Features

- added warnings to eslint errors ([422c893](https://github.com/SkeLLLa/node-object-hash/commit/422c8932e8ad140553259e9e49555f7ddfef4db1))
- fixed eslint errors ([e9245f7](https://github.com/SkeLLLa/node-object-hash/commit/e9245f7aa3aa14238fbb62d97dacdcc414ec0f40))
- fixed npm script issue ([0bf8c17](https://github.com/SkeLLLa/node-object-hash/commit/0bf8c175ae058bbc442628e953ff577be500d865))
- updated typescript, migrated to tslint ([3a40fcc](https://github.com/SkeLLLa/node-object-hash/commit/3a40fccbe03f265b8452b59ac1434cb1b0ceb6a3))

### Bug fixes

- remove unnecessary checks ([1bbad3a](https://github.com/SkeLLLa/node-object-hash/commit/1bbad3a2f6dc1dd28ed48ab2ca065b878b450f53))
- **lint:** fix eslint ([caeac70](https://github.com/SkeLLLa/node-object-hash/commit/caeac700031c7637448e4d76f2d2fe9276df2b01))
- **types:** fix encoding type ([cdc6958](https://github.com/SkeLLLa/node-object-hash/commit/cdc69588b781095764d574b6f14e00b2609ff4e5))
- improve checking of Hashable applicant ([3856207](https://github.com/SkeLLLa/node-object-hash/commit/38562077f9465e1aa871e607fd13de861f10582d))

### Misc

- **deps:** bump deps ([a370ea2](https://github.com/SkeLLLa/node-object-hash/commit/a370ea2bf9b89b94063d5fb3e584da20dd0eb855))
- **pj:** add prettier to docs ([77b6001](https://github.com/SkeLLLa/node-object-hash/commit/77b6001674284fc613e95fd44cddb9aec143aeb5))
- **pj:** update scripts ([dd8c778](https://github.com/SkeLLLa/node-object-hash/commit/dd8c778301899e41dacb73f83426a733bb327dda))

## [2.0.0](https://gitlab.com/m03geek/node-object-hash/compare/v2.0.0-rc.1...v2.0.0) (2019-09-07)

## [2.0.0-rc.1](https://gitlab.com/m03geek/node-object-hash/compare/v2.0.0-rc.0...v2.0.0-rc.1) (2019-09-03)

## [2.0.0-rc.0](https://gitlab.com/m03geek/node-object-hash/compare/v1.4.2...v2.0.0-rc.0) (2019-09-03)


### ⚠ BREAKING CHANGES

* Library rewritten in typescript that could cause some side-effects, but it should not.
* With `coerce=false` `Set`s will no longer generate the same hashes as `Array`s. In order to restore previous behavior set `coerce.set=true`.
* With `coerce=false` `Symbol`s will generate hash based on symbol `.toString` value. That's useful for `Symbol.for('smth')`. If `coerce.symbol=true` all `Symbols`s will have equal hashes.
TLDR; If you use library with `Set`s or `Symbol`s with `coerce=false` in order to keep hashes the same as in `v1.X.X` you should use following constructor:
- Library rewritten in typescript that could cause some side-effects, but it should not.
- With `coerce=false` `Set`s will no longer generate the same hashes as `Array`s. In order to restore previous behavior set `coerce.set=true`.
- With `coerce=false` `Symbol`s will generate hash based on symbol `.toString` value. That's useful for `Symbol.for('smth')`. If `coerce.symbol=true` all `Symbols`s will have equal hashes.
TLDR; If you use library with `Set`s or `Symbol`s with `coerce=false` in order to keep hashes the same as in `v1.X.X` you should use following constructor:

```
const hasher = require('node-object-hash')({coerce: {set: true, symbol: true}})
```
* Object sorter sources moved to `dist` directory. If you required it directly via `require('node-object-hash/objectSorter')` you should change it to require('node-object-hash/dist/objectSorter').
* Removed old `v0` version from code.
* Changed license to MIT.

- Object sorter sources moved to `dist` directory. If you required it directly via `require('node-object-hash/objectSorter')` you should change it to require('node-object-hash/dist/objectSorter').
- Removed old `v0` version from code.
- Changed license to MIT.

### Bug Fixes

* **hasher:** fix options ([05241ca](https://gitlab.com/m03geek/node-object-hash/commit/05241ca))
- **hasher:** fix options ([05241ca](https://gitlab.com/m03geek/node-object-hash/commit/05241ca))

### Features

* major refactor ([450471e](https://gitlab.com/m03geek/node-object-hash/commit/450471e))
* New granular options. Now you can specify what types need to be sorted or coerced.
* Add new `trim` option. It can be used to remove unncecessary spaces in `string`s or `function` bodies.
* Library rewritten to typescript, so it may have better ts compatibility.
- major refactor ([450471e](https://gitlab.com/m03geek/node-object-hash/commit/450471e))
- New granular options. Now you can specify what types need to be sorted or coerced.
- Add new `trim` option. It can be used to remove unncecessary spaces in `string`s or `function` bodies.
- Library rewritten to typescript, so it may have better ts compatibility.

## [1.4.X](https://gitlab.com/m03geek/node-object-hash/compare/v1.3.0...v1.4.2)

### Features
### Features

* Add support for objects without constructor #11 [PR @futpib](https://gitlab.com/m03geek/node-object-hash/pull/12)
* Simplify eslint rules, update codestyle
- Add support for objects without constructor #11 [PR @futpib](https://gitlab.com/m03geek/node-object-hash/pull/12)
- Simplify eslint rules, update codestyle

### Fixes

* Fix npm links issues in readme
* Update dev dependencies
- Fix npm links issues in readme
- Update dev dependencies

## [1.3.X](https://gitlab.com/m03geek/node-object-hash/compare/v1.2.0...v1.3.0)

### Features

* Add definition types to support typescript
* Add >=node-8.0.0 support in tests.
- Add definition types to support typescript
- Add >=node-8.0.0 support in tests.

## [1.2.X](https://gitlab.com/m03geek/node-object-hash/compare/v1.1.6...v1.2.0)

### Features
### Features

- Added typed arrays support
- Added primitive type constructors support
Expand All @@ -69,19 +92,19 @@ experience using this library. There are no changes that should affect
functionality.

- Renamed `sortObject` function to `sort` (old one is still present in code
for backward compatibility).
for backward compatibility).
- Performed some refactoring for better codestyle and documentation.
- Old version (`0.X.X`) moved to subfolder (`./v0`).
- Advanced API reference added: [link](API.md).

## [1.0.0](https://gitlab.com/m03geek/node-object-hash/compare/v0.1.0...v1.0.3)

- Sorting mechanism rewritten form ES6 Maps to simple arrays
(add <=node-4.0.0 support)
(add <=node-4.0.0 support)
- Performance optimization (~2 times faster than 0.x.x)
- API changes:
- Now module returns 'constructor' function, where you can set
default parameters: ```var objectHash = require('node-object-hash')(options);```
default parameters: `var objectHash = require('node-object-hash')(options);`

In case if you still need an old 0.x.x version it's available in `hash.js`
file.
2 changes: 1 addition & 1 deletion docs/interfaces/hasher.export_.hashable.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ with the function toHash that return the same value will have the same hash

**toHashableString**: () => _string_

Defined in: [hasher.ts:37](https://github.com/SkeLLLa/node-object-hash/blob/1e67826/src/hasher.ts#L37)
Defined in: [hasher.ts:37](https://github.com/SkeLLLa/node-object-hash/blob/77b6001/src/hasher.ts#L37)
6 changes: 3 additions & 3 deletions docs/interfaces/hasher.export_.hasher.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Create hash of an object

hash string of an object

Defined in: [hasher.ts:46](https://github.com/SkeLLLa/node-object-hash/blob/1e67826/src/hasher.ts#L46)
Defined in: [hasher.ts:46](https://github.com/SkeLLLa/node-object-hash/blob/77b6001/src/hasher.ts#L46)

---

Expand All @@ -55,7 +55,7 @@ Create sorted string from an object

sorted string from an object

Defined in: [hasher.ts:52](https://github.com/SkeLLLa/node-object-hash/blob/1e67826/src/hasher.ts#L52)
Defined in: [hasher.ts:52](https://github.com/SkeLLLa/node-object-hash/blob/77b6001/src/hasher.ts#L52)

---

Expand All @@ -77,4 +77,4 @@ Create sorted string from an object

sorted string from an object

Defined in: [hasher.ts:59](https://github.com/SkeLLLa/node-object-hash/blob/1e67826/src/hasher.ts#L59)
Defined in: [hasher.ts:59](https://github.com/SkeLLLa/node-object-hash/blob/77b6001/src/hasher.ts#L59)
10 changes: 5 additions & 5 deletions docs/interfaces/hasher.export_.hasheroptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Hash algorithm to use

**`default`** 'sha256'

Defined in: [hasher.ts:23](https://github.com/SkeLLLa/node-object-hash/blob/1e67826/src/hasher.ts#L23)
Defined in: [hasher.ts:23](https://github.com/SkeLLLa/node-object-hash/blob/77b6001/src/hasher.ts#L23)

---

Expand All @@ -47,7 +47,7 @@ Advanced coerce options could be provided as object

Inherited from: [SorterOptions](objectsorter.export_.sorteroptions.md).[coerce](objectsorter.export_.sorteroptions.md#coerce)

Defined in: [objectSorter.ts:152](https://github.com/SkeLLLa/node-object-hash/blob/1e67826/src/objectSorter.ts#L152)
Defined in: [objectSorter.ts:152](https://github.com/SkeLLLa/node-object-hash/blob/77b6001/src/objectSorter.ts#L152)

---

Expand All @@ -59,7 +59,7 @@ String encoding for hash

**`default`** 'base64'

Defined in: [hasher.ts:28](https://github.com/SkeLLLa/node-object-hash/blob/1e67826/src/hasher.ts#L28)
Defined in: [hasher.ts:28](https://github.com/SkeLLLa/node-object-hash/blob/77b6001/src/hasher.ts#L28)

---

Expand All @@ -74,7 +74,7 @@ Advanced sorting options could be provided as object

Inherited from: [SorterOptions](objectsorter.export_.sorteroptions.md).[sort](objectsorter.export_.sorteroptions.md#sort)

Defined in: [objectSorter.ts:158](https://github.com/SkeLLLa/node-object-hash/blob/1e67826/src/objectSorter.ts#L158)
Defined in: [objectSorter.ts:158](https://github.com/SkeLLLa/node-object-hash/blob/77b6001/src/objectSorter.ts#L158)

---

Expand All @@ -89,4 +89,4 @@ Advanced sorting options could be provided as object.

Inherited from: [SorterOptions](objectsorter.export_.sorteroptions.md).[trim](objectsorter.export_.sorteroptions.md#trim)

Defined in: [objectSorter.ts:164](https://github.com/SkeLLLa/node-object-hash/blob/1e67826/src/objectSorter.ts#L164)
Defined in: [objectSorter.ts:164](https://github.com/SkeLLLa/node-object-hash/blob/77b6001/src/objectSorter.ts#L164)
2 changes: 1 addition & 1 deletion docs/interfaces/hasher.hashable.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ with the function toHash that return the same value will have the same hash

**toHashableString**: () => _string_

Defined in: [hasher.ts:37](https://github.com/SkeLLLa/node-object-hash/blob/1e67826/src/hasher.ts#L37)
Defined in: [hasher.ts:37](https://github.com/SkeLLLa/node-object-hash/blob/77b6001/src/hasher.ts#L37)
6 changes: 3 additions & 3 deletions docs/interfaces/hasher.hasher-1.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Create hash of an object

hash string of an object

Defined in: [hasher.ts:46](https://github.com/SkeLLLa/node-object-hash/blob/1e67826/src/hasher.ts#L46)
Defined in: [hasher.ts:46](https://github.com/SkeLLLa/node-object-hash/blob/77b6001/src/hasher.ts#L46)

---

Expand All @@ -55,7 +55,7 @@ Create sorted string from an object

sorted string from an object

Defined in: [hasher.ts:52](https://github.com/SkeLLLa/node-object-hash/blob/1e67826/src/hasher.ts#L52)
Defined in: [hasher.ts:52](https://github.com/SkeLLLa/node-object-hash/blob/77b6001/src/hasher.ts#L52)

---

Expand All @@ -77,4 +77,4 @@ Create sorted string from an object

sorted string from an object

Defined in: [hasher.ts:59](https://github.com/SkeLLLa/node-object-hash/blob/1e67826/src/hasher.ts#L59)
Defined in: [hasher.ts:59](https://github.com/SkeLLLa/node-object-hash/blob/77b6001/src/hasher.ts#L59)
10 changes: 5 additions & 5 deletions docs/interfaces/hasher.hasheroptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Hash algorithm to use

**`default`** 'sha256'

Defined in: [hasher.ts:23](https://github.com/SkeLLLa/node-object-hash/blob/1e67826/src/hasher.ts#L23)
Defined in: [hasher.ts:23](https://github.com/SkeLLLa/node-object-hash/blob/77b6001/src/hasher.ts#L23)

---

Expand All @@ -47,7 +47,7 @@ Advanced coerce options could be provided as object

Inherited from: [SorterOptions](objectsorter.export_.sorteroptions.md).[coerce](objectsorter.export_.sorteroptions.md#coerce)

Defined in: [objectSorter.ts:152](https://github.com/SkeLLLa/node-object-hash/blob/1e67826/src/objectSorter.ts#L152)
Defined in: [objectSorter.ts:152](https://github.com/SkeLLLa/node-object-hash/blob/77b6001/src/objectSorter.ts#L152)

---

Expand All @@ -59,7 +59,7 @@ String encoding for hash

**`default`** 'base64'

Defined in: [hasher.ts:28](https://github.com/SkeLLLa/node-object-hash/blob/1e67826/src/hasher.ts#L28)
Defined in: [hasher.ts:28](https://github.com/SkeLLLa/node-object-hash/blob/77b6001/src/hasher.ts#L28)

---

Expand All @@ -74,7 +74,7 @@ Advanced sorting options could be provided as object

Inherited from: [SorterOptions](objectsorter.export_.sorteroptions.md).[sort](objectsorter.export_.sorteroptions.md#sort)

Defined in: [objectSorter.ts:158](https://github.com/SkeLLLa/node-object-hash/blob/1e67826/src/objectSorter.ts#L158)
Defined in: [objectSorter.ts:158](https://github.com/SkeLLLa/node-object-hash/blob/77b6001/src/objectSorter.ts#L158)

---

Expand All @@ -89,4 +89,4 @@ Advanced sorting options could be provided as object.

Inherited from: [SorterOptions](objectsorter.export_.sorteroptions.md).[trim](objectsorter.export_.sorteroptions.md#trim)

Defined in: [objectSorter.ts:164](https://github.com/SkeLLLa/node-object-hash/blob/1e67826/src/objectSorter.ts#L164)
Defined in: [objectSorter.ts:164](https://github.com/SkeLLLa/node-object-hash/blob/77b6001/src/objectSorter.ts#L164)
18 changes: 9 additions & 9 deletions docs/interfaces/objectsorter.coerceoptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ false !== '0'

**`default`** true

Defined in: [objectSorter.ts:22](https://github.com/SkeLLLa/node-object-hash/blob/1e67826/src/objectSorter.ts#L22)
Defined in: [objectSorter.ts:22](https://github.com/SkeLLLa/node-object-hash/blob/77b6001/src/objectSorter.ts#L22)

---

Expand All @@ -62,7 +62,7 @@ If `true` dates may equal the same formatted strings

**`default`** true

Defined in: [objectSorter.ts:95](https://github.com/SkeLLLa/node-object-hash/blob/1e67826/src/objectSorter.ts#L95)
Defined in: [objectSorter.ts:95](https://github.com/SkeLLLa/node-object-hash/blob/77b6001/src/objectSorter.ts#L95)

---

Expand All @@ -80,7 +80,7 @@ If `true` functions may equal the same formatted strings

**`default`** true

Defined in: [objectSorter.ts:86](https://github.com/SkeLLLa/node-object-hash/blob/1e67826/src/objectSorter.ts#L86)
Defined in: [objectSorter.ts:86](https://github.com/SkeLLLa/node-object-hash/blob/77b6001/src/objectSorter.ts#L86)

---

Expand All @@ -100,7 +100,7 @@ null !== ''

**`default`** true

Defined in: [objectSorter.ts:66](https://github.com/SkeLLLa/node-object-hash/blob/1e67826/src/objectSorter.ts#L66)
Defined in: [objectSorter.ts:66](https://github.com/SkeLLLa/node-object-hash/blob/77b6001/src/objectSorter.ts#L66)

---

Expand All @@ -120,7 +120,7 @@ If `true` converts numbers to strings

**`default`** true

Defined in: [objectSorter.ts:33](https://github.com/SkeLLLa/node-object-hash/blob/1e67826/src/objectSorter.ts#L33)
Defined in: [objectSorter.ts:33](https://github.com/SkeLLLa/node-object-hash/blob/77b6001/src/objectSorter.ts#L33)

---

Expand All @@ -138,7 +138,7 @@ If `true` set will be coerced to array

**`default`** true

Defined in: [objectSorter.ts:104](https://github.com/SkeLLLa/node-object-hash/blob/1e67826/src/objectSorter.ts#L104)
Defined in: [objectSorter.ts:104](https://github.com/SkeLLLa/node-object-hash/blob/77b6001/src/objectSorter.ts#L104)

---

Expand All @@ -158,7 +158,7 @@ If `true` strings and coerced string will be equal to coerced numbers, booleans,

**`default`** true

Defined in: [objectSorter.ts:44](https://github.com/SkeLLLa/node-object-hash/blob/1e67826/src/objectSorter.ts#L44)
Defined in: [objectSorter.ts:44](https://github.com/SkeLLLa/node-object-hash/blob/77b6001/src/objectSorter.ts#L44)

---

Expand All @@ -178,7 +178,7 @@ Symbol.for('a') !== Symbol.for('b')

**`default`** true

Defined in: [objectSorter.ts:77](https://github.com/SkeLLLa/node-object-hash/blob/1e67826/src/objectSorter.ts#L77)
Defined in: [objectSorter.ts:77](https://github.com/SkeLLLa/node-object-hash/blob/77b6001/src/objectSorter.ts#L77)

---

Expand All @@ -198,4 +198,4 @@ undefined !== ''

**`default`** true

Defined in: [objectSorter.ts:55](https://github.com/SkeLLLa/node-object-hash/blob/1e67826/src/objectSorter.ts#L55)
Defined in: [objectSorter.ts:55](https://github.com/SkeLLLa/node-object-hash/blob/77b6001/src/objectSorter.ts#L55)
Loading

0 comments on commit 223d2aa

Please sign in to comment.