Comparing version 7.0.1 to 7.0.2
@@ -5,2 +5,12 @@ # Change Log | ||
<a name="7.0.2"></a> | ||
## [7.0.2](https://github.com/zkat/cacache/compare/v7.0.1...v7.0.2) (2017-04-03) | ||
### Bug Fixes | ||
* **integrity:** use EINTEGRITY error code and update ssri ([8dc2e62](https://github.com/zkat/cacache/commit/8dc2e62)) | ||
<a name="7.0.1"></a> | ||
@@ -36,3 +46,3 @@ ## [7.0.1](https://github.com/zkat/cacache/compare/v7.0.0...v7.0.1) (2017-04-03) | ||
* `cacache.get.info()`, `cacache.ls(), and `cacache.ls.stream()` will now return objects that looks like this: | ||
* `cacache.get.info()`, `cacache.ls()`, and `cacache.ls.stream()` will now return objects that looks like this: | ||
@@ -53,3 +63,3 @@ ``` | ||
* `put.byDigest()`, `put.stream.byDigest`, `get.byDigest()` and `get.stream.byDigest() now expect an SRI instead of a `digest` + `opts.hashAlgorithm` pairing. | ||
* `put.byDigest()`, `put.stream.byDigest`, `get.byDigest()` and `get.stream.byDigest()` now expect an SRI instead of a `digest` + `opts.hashAlgorithm` pairing. | ||
@@ -56,0 +66,0 @@ * `get.hasContent()` now expects an integrity hash instead of a digest. If content exists, it will return the specific single integrity hash that was found in the cache. |
@@ -97,3 +97,3 @@ 'use strict' | ||
var err = new Error(`Checksum failed for ${sri} (${path})`) | ||
err.code = 'EBADCHECKSUM' | ||
err.code = 'EINTEGRITY' | ||
err.sri = sri | ||
@@ -100,0 +100,0 @@ err.path = path |
@@ -162,3 +162,3 @@ 'use strict' | ||
var err = new Error('checksum failed') | ||
err.code = 'EBADCHECKSUM' | ||
err.code = 'EINTEGRITY' | ||
err.expected = expected | ||
@@ -165,0 +165,0 @@ err.found = found |
@@ -15,3 +15,3 @@ 'use strict' | ||
// In the case of cache corruption, users will receive an | ||
// EBADCHECKSUM error elsewhere, and can remove the offending | ||
// EINTEGRITY error elsewhere, and can remove the offending | ||
// content their own way. | ||
@@ -18,0 +18,0 @@ // |
@@ -136,3 +136,3 @@ 'use strict' | ||
).catch(err => { | ||
if (err.code !== 'EBADCHECKSUM') { throw err } | ||
if (err.code !== 'EINTEGRITY') { throw err } | ||
return rimraf(filepath).then(() => { | ||
@@ -139,0 +139,0 @@ contentInfo.valid = false |
{ | ||
"name": "cacache", | ||
"version": "7.0.1", | ||
"version": "7.0.2", | ||
"cache-version": { | ||
@@ -70,3 +70,3 @@ "content": "2", | ||
"rimraf": "^2.6.1", | ||
"ssri": "^3.0.0", | ||
"ssri": "^4.0.0", | ||
"unique-filename": "^1.1.0" | ||
@@ -73,0 +73,0 @@ }, |
@@ -346,3 +346,3 @@ # cacache [![npm version](https://img.shields.io/npm/v/cacache.svg)](https://npm.im/cacache) [![license](https://img.shields.io/npm/l/cacache.svg)](https://npm.im/cacache) [![Travis](https://img.shields.io/travis/zkat/cacache.svg)](https://travis-ci.org/zkat/cacache) [![AppVeyor](https://ci.appveyor.com/api/projects/status/github/zkat/cacache?svg=true)](https://ci.appveyor.com/project/zkat/cacache) [![Coverage Status](https://coveralls.io/repos/github/zkat/cacache/badge.svg?branch=latest)](https://coveralls.io/github/zkat/cacache?branch=latest) | ||
if provided and does not match the post-insertion digest, insertion will fail | ||
with an `EBADCHECKSUM` error. | ||
with an `EINTEGRITY` error. | ||
@@ -478,4 +478,4 @@ `hashAlgorithm` has no effect if this option is present. | ||
[Subresource | ||
Integrity](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity) | ||
spec. That is, any time cacache expects an `integrity` argument or option, it | ||
Integrity spec](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity). | ||
That is, any time cacache expects an `integrity` argument or option, it | ||
should be in the format `<hashAlgorithm>-<base64-hash>`. | ||
@@ -482,0 +482,0 @@ |
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
64033
+ Addedssri@4.1.6(transitive)
- Removedssri@3.0.2(transitive)
Updatedssri@^4.0.0