Skip to content

Commit

Permalink
Clarify versioning expectations with regard to hash value
Browse files Browse the repository at this point in the history
Ref: #30
  • Loading branch information
addaleax committed Aug 7, 2017
1 parent 3bdf9e8 commit 03e12a7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions readme.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ crypto module for hashing. Supports SHA1 and many others (depending on the plat
as well as custom streams (e.g. CRC32).

[![NPM](https://nodei.co/npm/object-hash.png?downloads=true&downloadRank=true)](https://www.npmjs.com/package/object-hash)
[![NPM](https://nodei.co/npm-dl/object-hash.png?months=6&height=3)](https://www.npmjs.com/package/object-hash)

[![Travis CI](https://secure.travis-ci.org/puleos/object-hash.png?branch=master)](https://secure.travis-ci.org/puleos/object-hash?branch=master)
[![Coverage Status](https://coveralls.io/repos/puleos/object-hash/badge.svg?branch=master&service=github)](https://coveralls.io/github/puleos/object-hash?branch=master)
Expand All @@ -22,7 +21,12 @@ hash([1, 2, 2.718, 3.14159]) // => '136b9b88375971dff9f1af09d7356e3e04281951'

## Versioning Disclaimer

**IMPORTANT:** If you need lasting hash consistency, you should should lock `object-hash` at a specific version, because new versions (even patch versions) are likely to affect the result. For more info, see [this discussion](https://github.com/puleos/object-hash/issues/30).
Starting with version `1.1.8` (released April 2017), new versions will consider
the exact returned hash part of the API contract, i.e. changes that will affect
hash values will be considered `semver-major`. Previous versions may violate
that expectation.

For more information, see [this discussion](https://github.com/puleos/object-hash/issues/30).

## hash(value, options);
Generate a hash from any object or type. Defaults to sha1 with hex encoding.
Expand Down

0 comments on commit 03e12a7

Please sign in to comment.