87cc8edb207ffa65712c6b03d577eaa54e00f389804c968994bee004d185735494a060dc62d9326200d154fcb862c51dc45fadff0723a3e60b71444f59dfd2 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661
  1. # Changelog
  2. All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
  3. ### [12.0.4](https://github.com/npm/cacache/compare/v12.0.3...v12.0.4) (2020-03-24)
  4. ### [12.0.3](https://github.com/npm/cacache/compare/v12.0.2...v12.0.3) (2019-08-19)
  5. ### Bug Fixes
  6. * do not chown if not running as root ([2d80af9](https://github.com/npm/cacache/commit/2d80af9))
  7. ### [12.0.2](https://github.com/npm/cacache/compare/v12.0.1...v12.0.2) (2019-07-19)
  8. ### [12.0.1](https://github.com/npm/cacache/compare/v12.0.0...v12.0.1) (2019-07-19)
  9. * **deps** Abstracted out `lib/util/infer-owner.js` to
  10. [@npmcli/infer-owner](https://www.npmjs.com/package/@npmcli/infer-owner)
  11. so that it could be more easily used in other parts of the npm CLI.
  12. ## [12.0.0](https://github.com/npm/cacache/compare/v11.3.3...v12.0.0) (2019-07-15)
  13. ### Features
  14. * infer uid/gid instead of accepting as options ([ac84d14](https://github.com/npm/cacache/commit/ac84d14))
  15. * **i18n:** add another error message ([676cb32](https://github.com/npm/cacache/commit/676cb32))
  16. ### BREAKING CHANGES
  17. * the uid gid options are no longer respected or
  18. necessary. As of this change, cacache will always match the cache
  19. contents to the ownership of the cache directory (or its parent
  20. directory), regardless of what the caller passes in.
  21. Reasoning:
  22. The number one reason to use a uid or gid option was to keep root-owned
  23. files from causing problems in the cache. In npm's case, this meant
  24. that CLI's ./lib/command.js had to work out the appropriate uid and gid,
  25. then pass it to the libnpmcommand module, which had to in turn pass the
  26. uid and gid to npm-registry-fetch, which then passed it to
  27. make-fetch-happen, which passed it to cacache. (For package fetching,
  28. pacote would be in that mix as well.)
  29. Added to that, `cacache.rm()` will actually _write_ a file into the
  30. cache index, but has no way to accept an option so that its call to
  31. entry-index.js will write the index with the appropriate uid/gid.
  32. Little ownership bugs were all over the place, and tricky to trace
  33. through. (Why should make-fetch-happen even care about accepting or
  34. passing uids and gids? It's an http library.)
  35. This change allows us to keep the cache from having mixed ownership in
  36. any situation.
  37. Of course, this _does_ mean that if you have a root-owned but
  38. user-writable folder (for example, `/tmp`), then the cache will try to
  39. chown everything to root.
  40. The solution is for the user to create a folder, make it user-owned, and
  41. use that, rather than relying on cacache to create the root cache folder.
  42. If we decide to restore the uid/gid opts, and use ownership inferrence
  43. only when uid/gid are unset, then take care to also make rm take an
  44. option object, and pass it through to entry-index.js.
  45. ### [11.3.3](https://github.com/npm/cacache/compare/v11.3.2...v11.3.3) (2019-06-17)
  46. ### Bug Fixes
  47. * **audit:** npm audit fix ([200a6d5](https://github.com/npm/cacache/commit/200a6d5))
  48. * **config:** Add ssri config 'error' option ([#146](https://github.com/npm/cacache/issues/146)) ([47de8f5](https://github.com/npm/cacache/commit/47de8f5))
  49. * **deps:** npm audit fix ([481a7dc](https://github.com/npm/cacache/commit/481a7dc))
  50. * **standard:** standard --fix ([7799149](https://github.com/npm/cacache/commit/7799149))
  51. * **write:** avoid another cb never called situation ([5156561](https://github.com/npm/cacache/commit/5156561))
  52. <a name="11.3.2"></a>
  53. ## [11.3.2](https://github.com/npm/cacache/compare/v11.3.1...v11.3.2) (2018-12-21)
  54. ### Bug Fixes
  55. * **get:** make sure to handle errors in the .then ([b10bcd0](https://github.com/npm/cacache/commit/b10bcd0))
  56. <a name="11.3.1"></a>
  57. ## [11.3.1](https://github.com/npm/cacache/compare/v11.3.0...v11.3.1) (2018-11-05)
  58. ### Bug Fixes
  59. * **get:** export hasContent.sync properly ([d76c920](https://github.com/npm/cacache/commit/d76c920))
  60. <a name="11.3.0"></a>
  61. # [11.3.0](https://github.com/npm/cacache/compare/v11.2.0...v11.3.0) (2018-11-05)
  62. ### Features
  63. * **get:** add sync API for reading ([db1e094](https://github.com/npm/cacache/commit/db1e094))
  64. <a name="11.2.0"></a>
  65. # [11.2.0](https://github.com/npm/cacache/compare/v11.1.0...v11.2.0) (2018-08-08)
  66. ### Features
  67. * **read:** add sync support to other internal read.js fns ([fe638b6](https://github.com/npm/cacache/commit/fe638b6))
  68. <a name="11.1.0"></a>
  69. # [11.1.0](https://github.com/npm/cacache/compare/v11.0.3...v11.1.0) (2018-08-01)
  70. ### Features
  71. * **read:** add sync support for low-level content read ([b43af83](https://github.com/npm/cacache/commit/b43af83))
  72. <a name="11.0.3"></a>
  73. ## [11.0.3](https://github.com/npm/cacache/compare/v11.0.2...v11.0.3) (2018-08-01)
  74. ### Bug Fixes
  75. * **config:** add ssri config options ([#136](https://github.com/npm/cacache/issues/136)) ([10d5d9a](https://github.com/npm/cacache/commit/10d5d9a))
  76. * **perf:** refactor content.read to avoid lstats ([c5ac10e](https://github.com/npm/cacache/commit/c5ac10e))
  77. * **test:** oops when removing safe-buffer ([1950490](https://github.com/npm/cacache/commit/1950490))
  78. <a name="11.0.2"></a>
  79. ## [11.0.2](https://github.com/npm/cacache/compare/v11.0.1...v11.0.2) (2018-05-07)
  80. ### Bug Fixes
  81. * **verify:** size param no longer lost in a verify ([#131](https://github.com/npm/cacache/issues/131)) ([c614a19](https://github.com/npm/cacache/commit/c614a19)), closes [#130](https://github.com/npm/cacache/issues/130)
  82. <a name="11.0.1"></a>
  83. ## [11.0.1](https://github.com/npm/cacache/compare/v11.0.0...v11.0.1) (2018-04-10)
  84. <a name="11.0.0"></a>
  85. # [11.0.0](https://github.com/npm/cacache/compare/v10.0.4...v11.0.0) (2018-04-09)
  86. ### Features
  87. * **opts:** use figgy-pudding for opts ([#128](https://github.com/npm/cacache/issues/128)) ([33d4eed](https://github.com/npm/cacache/commit/33d4eed))
  88. ### meta
  89. * drop support for node@4 ([529f347](https://github.com/npm/cacache/commit/529f347))
  90. ### BREAKING CHANGES
  91. * node@4 is no longer supported
  92. <a name="10.0.4"></a>
  93. ## [10.0.4](https://github.com/npm/cacache/compare/v10.0.3...v10.0.4) (2018-02-16)
  94. <a name="10.0.3"></a>
  95. ## [10.0.3](https://github.com/npm/cacache/compare/v10.0.2...v10.0.3) (2018-02-16)
  96. ### Bug Fixes
  97. * **content:** rethrow aggregate errors as ENOENT ([fa918f5](https://github.com/npm/cacache/commit/fa918f5))
  98. <a name="10.0.2"></a>
  99. ## [10.0.2](https://github.com/npm/cacache/compare/v10.0.1...v10.0.2) (2018-01-07)
  100. ### Bug Fixes
  101. * **ls:** deleted entries could cause a premature stream EOF ([347dc36](https://github.com/npm/cacache/commit/347dc36))
  102. <a name="10.0.1"></a>
  103. ## [10.0.1](https://github.com/npm/cacache/compare/v10.0.0...v10.0.1) (2017-11-15)
  104. ### Bug Fixes
  105. * **move-file:** actually use the fallback to `move-concurrently` (#110) ([073fbe1](https://github.com/npm/cacache/commit/073fbe1))
  106. <a name="10.0.0"></a>
  107. # [10.0.0](https://github.com/npm/cacache/compare/v9.3.0...v10.0.0) (2017-10-23)
  108. ### Features
  109. * **license:** relicense to ISC (#111) ([fdbb4e5](https://github.com/npm/cacache/commit/fdbb4e5))
  110. ### Performance Improvements
  111. * more copyFile benchmarks ([63787bb](https://github.com/npm/cacache/commit/63787bb))
  112. ### BREAKING CHANGES
  113. * **license:** the license has been changed from CC0-1.0 to ISC.
  114. <a name="9.3.0"></a>
  115. # [9.3.0](https://github.com/npm/cacache/compare/v9.2.9...v9.3.0) (2017-10-07)
  116. ### Features
  117. * **copy:** added cacache.get.copy api for fast copies (#107) ([067b5f6](https://github.com/npm/cacache/commit/067b5f6))
  118. <a name="9.2.9"></a>
  119. ## [9.2.9](https://github.com/npm/cacache/compare/v9.2.8...v9.2.9) (2017-06-17)
  120. <a name="9.2.8"></a>
  121. ## [9.2.8](https://github.com/npm/cacache/compare/v9.2.7...v9.2.8) (2017-06-05)
  122. ### Bug Fixes
  123. * **ssri:** bump ssri for bugfix ([c3232ea](https://github.com/npm/cacache/commit/c3232ea))
  124. <a name="9.2.7"></a>
  125. ## [9.2.7](https://github.com/npm/cacache/compare/v9.2.6...v9.2.7) (2017-06-05)
  126. ### Bug Fixes
  127. * **content:** make verified content completely read-only (#96) ([4131196](https://github.com/npm/cacache/commit/4131196))
  128. <a name="9.2.6"></a>
  129. ## [9.2.6](https://github.com/npm/cacache/compare/v9.2.5...v9.2.6) (2017-05-31)
  130. ### Bug Fixes
  131. * **node:** update ssri to prevent old node 4 crash ([5209ffe](https://github.com/npm/cacache/commit/5209ffe))
  132. <a name="9.2.5"></a>
  133. ## [9.2.5](https://github.com/npm/cacache/compare/v9.2.4...v9.2.5) (2017-05-25)
  134. ### Bug Fixes
  135. * **deps:** fix lockfile issues and bump ssri ([84e1d7e](https://github.com/npm/cacache/commit/84e1d7e))
  136. <a name="9.2.4"></a>
  137. ## [9.2.4](https://github.com/npm/cacache/compare/v9.2.3...v9.2.4) (2017-05-24)
  138. ### Bug Fixes
  139. * **deps:** bumping deps ([bbccb12](https://github.com/npm/cacache/commit/bbccb12))
  140. <a name="9.2.3"></a>
  141. ## [9.2.3](https://github.com/npm/cacache/compare/v9.2.2...v9.2.3) (2017-05-24)
  142. ### Bug Fixes
  143. * **rm:** stop crashing if content is missing on rm ([ac90bc0](https://github.com/npm/cacache/commit/ac90bc0))
  144. <a name="9.2.2"></a>
  145. ## [9.2.2](https://github.com/npm/cacache/compare/v9.2.1...v9.2.2) (2017-05-14)
  146. ### Bug Fixes
  147. * **i18n:** lets pretend this didn't happen ([519b4ee](https://github.com/npm/cacache/commit/519b4ee))
  148. <a name="9.2.1"></a>
  149. ## [9.2.1](https://github.com/npm/cacache/compare/v9.2.0...v9.2.1) (2017-05-14)
  150. ### Bug Fixes
  151. * **docs:** fixing translation messup ([bb9e4f9](https://github.com/npm/cacache/commit/bb9e4f9))
  152. <a name="9.2.0"></a>
  153. # [9.2.0](https://github.com/npm/cacache/compare/v9.1.0...v9.2.0) (2017-05-14)
  154. ### Features
  155. * **i18n:** add Spanish translation for API ([531f9a4](https://github.com/npm/cacache/commit/531f9a4))
  156. <a name="9.1.0"></a>
  157. # [9.1.0](https://github.com/npm/cacache/compare/v9.0.0...v9.1.0) (2017-05-14)
  158. ### Features
  159. * **i18n:** Add Spanish translation and i18n setup (#91) ([323b90c](https://github.com/npm/cacache/commit/323b90c))
  160. <a name="9.0.0"></a>
  161. # [9.0.0](https://github.com/npm/cacache/compare/v8.0.0...v9.0.0) (2017-04-28)
  162. ### Bug Fixes
  163. * **memoization:** actually use the LRU ([0e55dc9](https://github.com/npm/cacache/commit/0e55dc9))
  164. ### Features
  165. * **memoization:** memoizers can be injected through opts.memoize (#90) ([e5614c7](https://github.com/npm/cacache/commit/e5614c7))
  166. ### BREAKING CHANGES
  167. * **memoization:** If you were passing an object to opts.memoize, it will now be used as an injected memoization object. If you were only passing booleans and other non-objects through that option, no changes are needed.
  168. <a name="8.0.0"></a>
  169. # [8.0.0](https://github.com/npm/cacache/compare/v7.1.0...v8.0.0) (2017-04-22)
  170. ### Features
  171. * **read:** change hasContent to return {sri, size} (#88) ([bad6c49](https://github.com/npm/cacache/commit/bad6c49)), closes [#87](https://github.com/npm/cacache/issues/87)
  172. ### BREAKING CHANGES
  173. * **read:** hasContent now returns an object with `{sri, size}` instead of `sri`. Use `result.sri` anywhere that needed the old return value.
  174. <a name="7.1.0"></a>
  175. # [7.1.0](https://github.com/npm/cacache/compare/v7.0.5...v7.1.0) (2017-04-20)
  176. ### Features
  177. * **size:** handle content size info (#49) ([91230af](https://github.com/npm/cacache/commit/91230af))
  178. <a name="7.0.5"></a>
  179. ## [7.0.5](https://github.com/npm/cacache/compare/v7.0.4...v7.0.5) (2017-04-18)
  180. ### Bug Fixes
  181. * **integrity:** new ssri with fixed integrity stream ([6d13e8e](https://github.com/npm/cacache/commit/6d13e8e))
  182. * **write:** wrap stuff in promises to improve errors ([3624fc5](https://github.com/npm/cacache/commit/3624fc5))
  183. <a name="7.0.4"></a>
  184. ## [7.0.4](https://github.com/npm/cacache/compare/v7.0.3...v7.0.4) (2017-04-15)
  185. ### Bug Fixes
  186. * **fix-owner:** throw away ENOENTs on chownr ([d49bbcd](https://github.com/npm/cacache/commit/d49bbcd))
  187. <a name="7.0.3"></a>
  188. ## [7.0.3](https://github.com/npm/cacache/compare/v7.0.2...v7.0.3) (2017-04-05)
  189. ### Bug Fixes
  190. * **read:** fixing error message for integrity verification failures ([9d4f0a5](https://github.com/npm/cacache/commit/9d4f0a5))
  191. <a name="7.0.2"></a>
  192. ## [7.0.2](https://github.com/npm/cacache/compare/v7.0.1...v7.0.2) (2017-04-03)
  193. ### Bug Fixes
  194. * **integrity:** use EINTEGRITY error code and update ssri ([8dc2e62](https://github.com/npm/cacache/commit/8dc2e62))
  195. <a name="7.0.1"></a>
  196. ## [7.0.1](https://github.com/npm/cacache/compare/v7.0.0...v7.0.1) (2017-04-03)
  197. ### Bug Fixes
  198. * **docs:** fix header name conflict in readme ([afcd456](https://github.com/npm/cacache/commit/afcd456))
  199. <a name="7.0.0"></a>
  200. # [7.0.0](https://github.com/npm/cacache/compare/v6.3.0...v7.0.0) (2017-04-03)
  201. ### Bug Fixes
  202. * **test:** fix content.write tests when running in docker ([d2e9b6a](https://github.com/npm/cacache/commit/d2e9b6a))
  203. ### Features
  204. * **integrity:** subresource integrity support (#78) ([b1e731f](https://github.com/npm/cacache/commit/b1e731f))
  205. ### BREAKING CHANGES
  206. * **integrity:** The entire API has been overhauled to use SRI hashes instead of digest/hashAlgorithm pairs. SRI hashes follow the Subresource Integrity standard and support strings and objects compatible with [`ssri`](https://npm.im/ssri).
  207. * This change bumps the index version, which will invalidate all previous index entries. Content entries will remain intact, and existing caches will automatically reuse any content from before this breaking change.
  208. * `cacache.get.info()`, `cacache.ls()`, and `cacache.ls.stream()` will now return objects that looks like this:
  209. ```
  210. {
  211. key: String,
  212. integrity: '<algorithm>-<base64hash>',
  213. path: ContentPath,
  214. time: Date<ms>,
  215. metadata: Any
  216. }
  217. ```
  218. * `opts.digest` and `opts.hashAlgorithm` are obsolete for any API calls that used them.
  219. * Anywhere `opts.digest` was accepted, `opts.integrity` is now an option. Any valid SRI hash is accepted here -- multiple hash entries will be resolved according to the standard: first, the "strongest" hash algorithm will be picked, and then each of the entries for that algorithm will be matched against the content. Content will be validated if *any* of the entries match (so, a single integrity string can be used for multiple "versions" of the same document/data).
  220. * `put.byDigest()`, `put.stream.byDigest`, `get.byDigest()` and `get.stream.byDigest()` now expect an SRI instead of a `digest` + `opts.hashAlgorithm` pairing.
  221. * `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.
  222. * `verify()` has learned to handle integrity-based caches, and forgotten how to handle old-style cache indices due to the format change.
  223. * `cacache.rm.content()` now expects an integrity hash instead of a hex digest.
  224. <a name="6.3.0"></a>
  225. # [6.3.0](https://github.com/npm/cacache/compare/v6.2.0...v6.3.0) (2017-04-01)
  226. ### Bug Fixes
  227. * **fixOwner:** ignore EEXIST race condition from mkdirp ([4670e9b](https://github.com/npm/cacache/commit/4670e9b))
  228. * **index:** ignore index removal races when inserting ([b9d2fa2](https://github.com/npm/cacache/commit/b9d2fa2))
  229. * **memo:** use lru-cache for better mem management (#75) ([d8ac5aa](https://github.com/npm/cacache/commit/d8ac5aa))
  230. ### Features
  231. * **dependencies:** Switch to move-concurrently (#77) ([dc6482d](https://github.com/npm/cacache/commit/dc6482d))
  232. <a name="6.2.0"></a>
  233. # [6.2.0](https://github.com/npm/cacache/compare/v6.1.2...v6.2.0) (2017-03-15)
  234. ### Bug Fixes
  235. * **index:** additional bucket entry verification with checksum (#72) ([f8e0f25](https://github.com/npm/cacache/commit/f8e0f25))
  236. * **verify:** return fixOwner.chownr promise ([6818521](https://github.com/npm/cacache/commit/6818521))
  237. ### Features
  238. * **tmp:** safe tmp dir creation/management util (#73) ([c42da71](https://github.com/npm/cacache/commit/c42da71))
  239. <a name="6.1.2"></a>
  240. ## [6.1.2](https://github.com/npm/cacache/compare/v6.1.1...v6.1.2) (2017-03-13)
  241. ### Bug Fixes
  242. * **index:** set default hashAlgorithm ([d6eb2f0](https://github.com/npm/cacache/commit/d6eb2f0))
  243. <a name="6.1.1"></a>
  244. ## [6.1.1](https://github.com/npm/cacache/compare/v6.1.0...v6.1.1) (2017-03-13)
  245. ### Bug Fixes
  246. * **coverage:** bumping coverage for verify (#71) ([0b7faf6](https://github.com/npm/cacache/commit/0b7faf6))
  247. * **deps:** glob should have been a regular dep :< ([0640bc4](https://github.com/npm/cacache/commit/0640bc4))
  248. <a name="6.1.0"></a>
  249. # [6.1.0](https://github.com/npm/cacache/compare/v6.0.2...v6.1.0) (2017-03-12)
  250. ### Bug Fixes
  251. * **coverage:** more coverage for content reads (#70) ([ef4f70a](https://github.com/npm/cacache/commit/ef4f70a))
  252. * **tests:** use safe-buffer because omfg (#69) ([6ab8132](https://github.com/npm/cacache/commit/6ab8132))
  253. ### Features
  254. * **rm:** limited rm.all and fixed bugs (#66) ([d5d25ba](https://github.com/npm/cacache/commit/d5d25ba)), closes [#66](https://github.com/npm/cacache/issues/66)
  255. * **verify:** tested, working cache verifier/gc (#68) ([45ad77a](https://github.com/npm/cacache/commit/45ad77a))
  256. <a name="6.0.2"></a>
  257. ## [6.0.2](https://github.com/npm/cacache/compare/v6.0.1...v6.0.2) (2017-03-11)
  258. ### Bug Fixes
  259. * **index:** segment cache items with another subbucket (#64) ([c3644e5](https://github.com/npm/cacache/commit/c3644e5))
  260. <a name="6.0.1"></a>
  261. ## [6.0.1](https://github.com/npm/cacache/compare/v6.0.0...v6.0.1) (2017-03-05)
  262. ### Bug Fixes
  263. * **docs:** Missed spots in README ([8ffb7fa](https://github.com/npm/cacache/commit/8ffb7fa))
  264. <a name="6.0.0"></a>
  265. # [6.0.0](https://github.com/npm/cacache/compare/v5.0.3...v6.0.0) (2017-03-05)
  266. ### Bug Fixes
  267. * **api:** keep memo cache mostly-internal ([2f72d0a](https://github.com/npm/cacache/commit/2f72d0a))
  268. * **content:** use the rest of the string, not the whole string ([fa8f3c3](https://github.com/npm/cacache/commit/fa8f3c3))
  269. * **deps:** removed `format-number@2.0.2` ([1187791](https://github.com/npm/cacache/commit/1187791))
  270. * **deps:** removed inflight@1.0.6 ([0d1819c](https://github.com/npm/cacache/commit/0d1819c))
  271. * **deps:** rimraf@2.6.1 ([9efab6b](https://github.com/npm/cacache/commit/9efab6b))
  272. * **deps:** standard@9.0.0 ([4202cba](https://github.com/npm/cacache/commit/4202cba))
  273. * **deps:** tap@10.3.0 ([aa03088](https://github.com/npm/cacache/commit/aa03088))
  274. * **deps:** weallcontribute@1.0.8 ([ad4f4dc](https://github.com/npm/cacache/commit/ad4f4dc))
  275. * **docs:** add security note to hashKey ([03f81ba](https://github.com/npm/cacache/commit/03f81ba))
  276. * **hashes:** change default hashAlgorithm to sha512 ([ea00ba6](https://github.com/npm/cacache/commit/ea00ba6))
  277. * **hashes:** missed a spot for hashAlgorithm defaults ([45997d8](https://github.com/npm/cacache/commit/45997d8))
  278. * **index:** add length header before JSON for verification ([fb8cb4d](https://github.com/npm/cacache/commit/fb8cb4d))
  279. * **index:** change index filenames to sha1s of keys ([bbc5fca](https://github.com/npm/cacache/commit/bbc5fca))
  280. * **index:** who cares about race conditions anyway ([b1d3888](https://github.com/npm/cacache/commit/b1d3888))
  281. * **perf:** bulk-read get+read for massive speed ([d26cdf9](https://github.com/npm/cacache/commit/d26cdf9))
  282. * **perf:** use bulk file reads for index reads ([79a8891](https://github.com/npm/cacache/commit/79a8891))
  283. * **put-stream:** remove tmp file on stream insert error ([65f6632](https://github.com/npm/cacache/commit/65f6632))
  284. * **put-stream:** robustified and predictibilized ([daf9e08](https://github.com/npm/cacache/commit/daf9e08))
  285. * **put-stream:** use new promise API for moves ([1d36013](https://github.com/npm/cacache/commit/1d36013))
  286. * **readme:** updated to reflect new default hashAlgo ([c60a2fa](https://github.com/npm/cacache/commit/c60a2fa))
  287. * **verify:** tiny typo fix ([db22d05](https://github.com/npm/cacache/commit/db22d05))
  288. ### Features
  289. * **api:** converted external api ([7bf032f](https://github.com/npm/cacache/commit/7bf032f))
  290. * **cacache:** exported clearMemoized() utility ([8d2c5b6](https://github.com/npm/cacache/commit/8d2c5b6))
  291. * **cache:** add versioning to content and index ([31bc549](https://github.com/npm/cacache/commit/31bc549))
  292. * **content:** collate content files into subdirs ([c094d9f](https://github.com/npm/cacache/commit/c094d9f))
  293. * **deps:** `@npmcorp/move@1.0.0` ([bdd00bf](https://github.com/npm/cacache/commit/bdd00bf))
  294. * **deps:** `bluebird@3.4.7` ([3a17aff](https://github.com/npm/cacache/commit/3a17aff))
  295. * **deps:** `promise-inflight@1.0.1` ([a004fe6](https://github.com/npm/cacache/commit/a004fe6))
  296. * **get:** added memoization support for get ([c77d794](https://github.com/npm/cacache/commit/c77d794))
  297. * **get:** export hasContent ([2956ec3](https://github.com/npm/cacache/commit/2956ec3))
  298. * **index:** add hashAlgorithm and format insert ret val ([b639746](https://github.com/npm/cacache/commit/b639746))
  299. * **index:** collate index files into subdirs ([e8402a5](https://github.com/npm/cacache/commit/e8402a5))
  300. * **index:** promisify entry index ([cda3335](https://github.com/npm/cacache/commit/cda3335))
  301. * **memo:** added memoization lib ([da07b92](https://github.com/npm/cacache/commit/da07b92))
  302. * **memo:** export memoization api ([954b1b3](https://github.com/npm/cacache/commit/954b1b3))
  303. * **move-file:** add move fallback for weird errors ([5cf4616](https://github.com/npm/cacache/commit/5cf4616))
  304. * **perf:** bulk content write api ([51b536e](https://github.com/npm/cacache/commit/51b536e))
  305. * **put:** added memoization support to put ([b613a70](https://github.com/npm/cacache/commit/b613a70))
  306. * **read:** switched to promises ([a869362](https://github.com/npm/cacache/commit/a869362))
  307. * **rm:** added memoization support to rm ([4205cf0](https://github.com/npm/cacache/commit/4205cf0))
  308. * **rm:** switched to promises ([a000d24](https://github.com/npm/cacache/commit/a000d24))
  309. * **util:** promise-inflight ownership fix requests ([9517cd7](https://github.com/npm/cacache/commit/9517cd7))
  310. * **util:** use promises for api ([ae204bb](https://github.com/npm/cacache/commit/ae204bb))
  311. * **verify:** converted to Promises ([f0b3974](https://github.com/npm/cacache/commit/f0b3974))
  312. ### BREAKING CHANGES
  313. * cache: index/content directories are now versioned. Previous caches are no longer compatible and cannot be migrated.
  314. * util: fix-owner now uses Promises instead of callbacks
  315. * index: Previously-generated index entries are no longer compatible and the index must be regenerated.
  316. * index: The index format has changed and previous caches are no longer compatible. Existing caches will need to be regenerated.
  317. * hashes: Default hashAlgorithm changed from sha1 to sha512. If you
  318. rely on the prior setting, pass `opts.hashAlgorithm` in explicitly.
  319. * content: Previously-generated content directories are no longer compatible
  320. and must be regenerated.
  321. * verify: API is now promise-based
  322. * read: Switches to a Promise-based API and removes callback stuff
  323. * rm: Switches to a Promise-based API and removes callback stuff
  324. * index: this changes the API to work off promises instead of callbacks
  325. * api: this means we are going all in on promises now