sync-disk-cache
Advanced tools
Comparing version 1.2.0 to 1.2.1
14
index.js
@@ -190,4 +190,12 @@ 'use strict'; | ||
mkdirp(path.dirname(filePath), mode); | ||
writeFile(filePath, this.compress(value), mode); | ||
try { | ||
writeFile(filePath, this.compress(value), mode); | ||
} catch (e) { | ||
if (e.code === 'ENOENT') { | ||
mkdirp(path.dirname(filePath), mode); | ||
writeFile(filePath, this.compress(value), mode); | ||
} else { | ||
throw e; | ||
} | ||
} | ||
chmod(filePath, mode.mode); | ||
@@ -224,3 +232,3 @@ | ||
defineFunction(Cache.prototype, 'pathFor', function(key) { | ||
return path.join(this.root, key); | ||
return path.join(this.root, new Buffer(key).toString('base64')); | ||
}); | ||
@@ -227,0 +235,0 @@ |
{ | ||
"name": "sync-disk-cache", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "sync disk cache", | ||
@@ -33,3 +33,3 @@ "files": [ | ||
"rimraf": "^2.2.8", | ||
"username": "^1.0.1" | ||
"username": "^2.3.0" | ||
}, | ||
@@ -36,0 +36,0 @@ "devDependencies": { |
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
9427
254
+ Addedcross-spawn-async@2.2.5(transitive)
+ Addedexeca@0.4.0(transitive)
+ Addedis-stream@1.1.0(transitive)
+ Addedisexe@2.0.0(transitive)
+ Addedlru-cache@4.1.5(transitive)
+ Addedmem@0.1.1(transitive)
+ Addednpm-run-path@1.0.0(transitive)
+ Addedpath-key@1.0.0(transitive)
+ Addedpseudomap@1.0.2(transitive)
+ Addedstrip-eof@1.0.0(transitive)
+ Addedusername@2.3.0(transitive)
+ Addedwhich@1.3.1(transitive)
+ Addedyallist@2.1.2(transitive)
- Removedarray-find-index@1.0.2(transitive)
- Removedcamelcase@2.1.1(transitive)
- Removedcamelcase-keys@2.1.0(transitive)
- Removedcurrently-unhandled@0.4.1(transitive)
- Removeddecamelize@1.2.0(transitive)
- Removederror-ex@1.3.2(transitive)
- Removedfind-up@1.1.2(transitive)
- Removedfunction-bind@1.1.2(transitive)
- Removedget-stdin@4.0.1(transitive)
- Removedgraceful-fs@4.2.11(transitive)
- Removedhasown@2.0.2(transitive)
- Removedhosted-git-info@2.8.9(transitive)
- Removedindent-string@2.1.0(transitive)
- Removedis-arrayish@0.2.1(transitive)
- Removedis-core-module@2.15.1(transitive)
- Removedis-finite@1.1.0(transitive)
- Removedis-utf8@0.2.1(transitive)
- Removedload-json-file@1.1.0(transitive)
- Removedloud-rejection@1.6.0(transitive)
- Removedmap-obj@1.0.1(transitive)
- Removedmeow@3.7.0(transitive)
- Removednormalize-package-data@2.5.0(transitive)
- Removedparse-json@2.2.0(transitive)
- Removedpath-exists@2.1.0(transitive)
- Removedpath-parse@1.0.7(transitive)
- Removedpath-type@1.1.0(transitive)
- Removedpify@2.3.0(transitive)
- Removedpinkie@2.0.4(transitive)
- Removedpinkie-promise@2.0.1(transitive)
- Removedread-pkg@1.1.0(transitive)
- Removedread-pkg-up@1.0.1(transitive)
- Removedredent@1.0.0(transitive)
- Removedrepeating@2.0.1(transitive)
- Removedresolve@1.22.8(transitive)
- Removedsemver@5.7.2(transitive)
- Removedsignal-exit@3.0.7(transitive)
- Removedspdx-correct@3.2.0(transitive)
- Removedspdx-exceptions@2.5.0(transitive)
- Removedspdx-expression-parse@3.0.1(transitive)
- Removedspdx-license-ids@3.0.20(transitive)
- Removedstrip-bom@2.0.0(transitive)
- Removedstrip-indent@1.0.1(transitive)
- Removedsupports-preserve-symlinks-flag@1.0.0(transitive)
- Removedtrim-newlines@1.0.0(transitive)
- Removedusername@1.0.1(transitive)
- Removedvalidate-npm-package-license@3.0.4(transitive)
Updatedusername@^2.3.0