@aws-sdk/sha256-tree-hash
Advanced tools
Comparing version 1.0.0-alpha.3 to 1.0.0-alpha.4
@@ -70,3 +70,3 @@ "use strict"; | ||
// loop through collected hashes | ||
if (this.buffer) { | ||
if (this.buffer && this.buffer.byteLength > 0) { | ||
smallHash = new this.Sha256(); | ||
@@ -131,2 +131,2 @@ smallHash.update(this.buffer); | ||
exports.TreeHash = TreeHash; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBRUEsSUFBTSxHQUFHLEdBQUcsT0FBTyxDQUFDO0FBRXBCOztHQUVHO0FBQ0g7SUFJRTs7O09BR0c7SUFDSCxrQkFDbUIsTUFBdUIsRUFDdkIsUUFBaUI7UUFEakIsV0FBTSxHQUFOLE1BQU0sQ0FBaUI7UUFDdkIsYUFBUSxHQUFSLFFBQVEsQ0FBUztRQVI1Qix5QkFBb0IsR0FBMEIsRUFBRSxDQUFDO0lBU3RELENBQUM7SUFFSjs7Ozs7T0FLRztJQUNLLDZCQUFVLEdBQWxCO1FBQ0UsSUFBSSxDQUFDLElBQUksQ0FBQyxNQUFNLEVBQUU7WUFDaEIsT0FBTztTQUNSO1FBRUQsSUFBSSxhQUFhLEdBQUcsSUFBSSxDQUFDLE1BQU0sQ0FBQyxVQUFVLENBQUM7UUFDM0MsT0FBTyxhQUFhLElBQUksR0FBRyxFQUFFO1lBQzNCLElBQU0sSUFBSSxHQUFHLElBQUksSUFBSSxDQUFDLE1BQU0sRUFBRSxDQUFDO1lBQy9CLElBQUksQ0FBQyxNQUFNLENBQUMsSUFBSSxDQUFDLE1BQU0sQ0FBQyxRQUFRLENBQUMsQ0FBQyxFQUFFLEdBQUcsQ0FBQyxDQUFDLENBQUM7WUFDMUMsSUFBSSxDQUFDLG9CQUFvQixDQUFDL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21VdGY4KGRhdGEpO1xuICAgIH1cblxuICAgIGlmIChBcnJheUJ1ZmZlci5pc1ZpZXcoZGF0YSkpIHtcbiAgICAgIHJldHVybiBuZXcgVWludDhBcnJheShcbiAgICAgICAgZGF0YS5idWZmZXIsXG4gICAgICAgIGRhdGEuYnl0ZU9mZnNldCxcbiAgICAgICAgZGF0YS5ieXRlTGVuZ3RoIC8gVWludDhBcnJheS5CWVRFU19QRVJfRUxFTUVOVFxuICAgICAgKTtcbiAgICB9XG5cbiAgICByZXR1cm4gbmV3IFVpbnQ4QXJyYXkoZGF0YSk7XG4gIH1cbn1cbiJdfQ== |
@@ -6,6 +6,15 @@ # Change Log | ||
# [1.0.0-alpha.3](https://github.com/aws/aws-sdk-js-v3/compare/@aws-sdk/sha256-tree-hash@0.1.0-preview.3...@aws-sdk/sha256-tree-hash@1.0.0-alpha.3) (2020-02-18) | ||
# [1.0.0-alpha.4](https://github.com/aws/aws-sdk-js-v3/compare/@aws-sdk/sha256-tree-hash@0.1.0-preview.3...@aws-sdk/sha256-tree-hash@1.0.0-alpha.4) (2020-03-09) | ||
### Bug Fixes | ||
* treehash on non-fractional MB ([#958](https://github.com/aws/aws-sdk-js-v3/issues/958)) ([27774b5](https://github.com/aws/aws-sdk-js-v3/commit/27774b5bdad832752185fcea9c2d82d1c027e51c)) | ||
# 1.0.0-alpha.24 (2020-02-19) | ||
# 1.0.0-alpha.21 (2020-02-11) | ||
@@ -20,2 +29,52 @@ | ||
* add sha256-tree-hash pkg ([#776](https://github.com/aws/aws-sdk-js-v3/issues/776)) ([3556224](https://github.com/aws/aws-sdk-js-v3/commit/3556224c5305e8bc774f3b13517d5edc7f996c45)) | ||
# 0.6.0 (2019-10-30) | ||
# 0.4.0 (2019-09-19) | ||
# 0.3.0 (2019-09-09) | ||
### Features | ||
* commit all clients ([#324](https://github.com/aws/aws-sdk-js-v3/issues/324)) ([cb268ed](https://github.com/aws/aws-sdk-js-v3/commit/cb268ed45fd5580ef9633da78f13aaa6aa472805)) | ||
# 0.2.0 (2019-07-12) | ||
### Features | ||
* add npm badges for individual packages ([#251](https://github.com/aws/aws-sdk-js-v3/issues/251)) ([8adc10c](https://github.com/aws/aws-sdk-js-v3/commit/8adc10cb6b0ebc32004b797556bfc171c96bbf16)) | ||
* update jest v20 to v24 ([#243](https://github.com/aws/aws-sdk-js-v3/issues/243)) ([1e156ab](https://github.com/aws/aws-sdk-js-v3/commit/1e156ab4ac5343058eaf7d448a428d8c4b72c844)) | ||
# 0.1.0 (2019-04-19) | ||
# [1.0.0-alpha.3](https://github.com/aws/aws-sdk-js-v3/compare/@aws-sdk/sha256-tree-hash@0.1.0-preview.3...@aws-sdk/sha256-tree-hash@1.0.0-alpha.3) (2020-02-19) | ||
# 1.0.0-alpha.21 (2020-02-11) | ||
# 1.0.0-alpha.13 (2020-01-24) | ||
### Features | ||
* add sha256-tree-hash pkg ([#776](https://github.com/aws/aws-sdk-js-v3/issues/776)) ([3556224](https://github.com/aws/aws-sdk-js-v3/commit/3556224)) | ||
@@ -22,0 +81,0 @@ |
{ | ||
"name": "@aws-sdk/sha256-tree-hash", | ||
"version": "1.0.0-alpha.3", | ||
"version": "1.0.0-alpha.4", | ||
"scripts": { | ||
@@ -5,0 +5,0 @@ "prepublishOnly": "tsc", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
36882