Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: sindresorhus/hasha
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v5.2.1
Choose a base ref
...
head repository: sindresorhus/hasha
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v5.2.2
Choose a head ref
  • 3 commits
  • 3 files changed
  • 2 contributors

Commits on Oct 9, 2020

  1. Fix .fromFile() Node.js 14 compatibility (#34)

    Yanis Benson authored Oct 9, 2020

    Verified

    This commit was signed with the committer’s verified signature.
    ssbarnea Sorin Sbarnea
    Copy the full SHA
    80b71af View commit details
  2. Test on Node.js 14

    sindresorhus committed Oct 9, 2020

    Verified

    This commit was signed with the committer’s verified signature.
    ssbarnea Sorin Sbarnea
    Copy the full SHA
    36c9b03 View commit details
  3. 5.2.2

    sindresorhus committed Oct 9, 2020
    Copy the full SHA
    6e9d961 View commit details
Showing with 5 additions and 4 deletions.
  1. +1 −0 .travis.yml
  2. +1 −1 package.json
  3. +3 −3 thread.js
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
language: node_js
node_js:
- '14'
- '12'
- '10'
- '8'
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hasha",
"version": "5.2.1",
"version": "5.2.2",
"description": "Hashing made simple. Get the hash of a buffer/string/stream/file.",
"license": "MIT",
"repository": "sindresorhus/hasha",
6 changes: 3 additions & 3 deletions thread.js
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@ const handlers = {
.pipe(hasher)
.on('error', reject)
.on('finish', () => {
const {buffer} = hasher.read();
const {buffer} = new Uint8Array(hasher.read());
resolve({value: buffer, transferList: [buffer]});
});
}),
@@ -27,8 +27,8 @@ const handlers = {
hasher.update(input);
}

const hash = hasher.digest().buffer;
return {value: hash, transferList: [hash]};
const {buffer} = new Uint8Array(hasher.digest());
return {value: buffer, transferList: [buffer]};
}
};