Comparing version 3.0.2 to 4.0.0
@@ -5,2 +5,17 @@ # Change Log | ||
<a name="4.0.0"></a> | ||
# [4.0.0](https://github.com/zkat/ssri/compare/v3.0.2...v4.0.0) (2017-04-03) | ||
### Bug Fixes | ||
* **integrity:** should have changed the error code before. oops ([8381afa](https://github.com/zkat/ssri/commit/8381afa)) | ||
### BREAKING CHANGES | ||
* **integrity:** EBADCHECKSUM -> EINTEGRITY for verification errors | ||
<a name="3.0.2"></a> | ||
@@ -7,0 +22,0 @@ ## [3.0.2](https://github.com/zkat/ssri/compare/v3.0.1...v3.0.2) (2017-04-03) |
@@ -261,3 +261,3 @@ 'use strict' | ||
const err = new Error(`${sri} integrity checksum failed when using ${algorithm}`) | ||
err.code = 'EBADCHECKSUM' | ||
err.code = 'EINTEGRITY' | ||
err.found = newSri | ||
@@ -264,0 +264,0 @@ err.expected = digests |
{ | ||
"name": "ssri", | ||
"version": "3.0.2", | ||
"version": "4.0.0", | ||
"description": "Standard Subresource Integrity library -- parses, serializes, generates, and verifies integrity metadata according to the SRI spec.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -348,3 +348,3 @@ # ssri [![npm version](https://img.shields.io/npm/v/ssri.svg)](https://npm.im/ssri) [![license](https://img.shields.io/npm/l/ssri.svg)](https://npm.im/ssri) [![Travis](https://img.shields.io/travis/zkat/ssri.svg)](https://travis-ci.org/zkat/ssri) [![AppVeyor](https://ci.appveyor.com/api/projects/status/github/zkat/ssri?svg=true)](https://ci.appveyor.com/project/zkat/ssri) [![Coverage Status](https://coveralls.io/repos/github/zkat/ssri/badge.svg?branch=latest)](https://coveralls.io/github/zkat/ssri?branch=latest) | ||
If the Promise is rejected because verification failed, the returned error will | ||
have `err.code` as `EBADCHECKSUM`. | ||
have `err.code` as `EINTEGRITY`. | ||
@@ -382,3 +382,3 @@ If `opts.size` is given, it will be matched against the stream size. An error | ||
'sha1-BaDDigEST' | ||
) // -> Promise<Error<{code: 'EBADCHECKSUM'}>> | ||
) // -> Promise<Error<{code: 'EINTEGRITY'}>> | ||
``` | ||
@@ -403,3 +403,3 @@ | ||
value is a single `Hash` object that is the one that succeeded verification. If | ||
verification fails, the stream will error with an `EBADCHECKSUM` error code. | ||
verification fails, the stream will error with an `EINTEGRITY` error code. | ||
@@ -406,0 +406,0 @@ If `opts.size` is given, it will be matched against the stream size. An error |
31165