metro-cache
Advanced tools
Comparing version 0.32.0 to 0.33.0
{ | ||
"version": "0.32.0", | ||
"version": "0.33.0", | ||
"name": "metro-cache", | ||
@@ -16,5 +16,6 @@ "description": "🚇 Cache layers for Metro", | ||
"jest-serializer": "22.4.3", | ||
"metro-core": "0.32.0", | ||
"mkdirp": "^0.5.1" | ||
"metro-core": "0.33.0", | ||
"mkdirp": "^0.5.1", | ||
"rimraf": "^2.5.4" | ||
} | ||
} |
@@ -15,3 +15,3 @@ /** | ||
const FileStore = require('./stores/FileStore'); | ||
const PersistedMapStore = require('./stores/PersistedMapStore'); | ||
const HttpStore = require('./stores/HttpStore'); | ||
@@ -24,4 +24,4 @@ const stableHash = require('./stableHash'); | ||
module.exports.FileStore = FileStore; | ||
module.exports.PersistedMapStore = PersistedMapStore; | ||
module.exports.HttpStore = HttpStore; | ||
module.exports.stableHash = stableHash; |
@@ -16,2 +16,3 @@ /** | ||
const path = require('path'); | ||
const rimraf = require('rimraf'); | ||
@@ -31,9 +32,4 @@ import type {TransformedCode} from 'metro/src/JSTransformer/worker'; | ||
constructor(options: Options) { | ||
const root = options.root; | ||
for (let i = 0; i < 256; i++) { | ||
mkdirp.sync(path.join(root, ('0' + i.toString(16)).slice(-2))); | ||
} | ||
this._root = root; | ||
this._root = options.root; | ||
this._createDirs(); | ||
} | ||
@@ -70,2 +66,7 @@ | ||
clear() { | ||
this._removeDirs(); | ||
this._createDirs(); | ||
} | ||
_getFilePath(key: Buffer): string { | ||
@@ -78,4 +79,16 @@ return path.join( | ||
} | ||
_createDirs() { | ||
for (let i = 0; i < 256; i++) { | ||
mkdirp.sync(path.join(this._root, ('0' + i.toString(16)).slice(-2))); | ||
} | ||
} | ||
_removeDirs() { | ||
for (let i = 0; i < 256; i++) { | ||
rimraf.sync(path.join(this._root, ('0' + i.toString(16)).slice(-2))); | ||
} | ||
} | ||
} | ||
module.exports = FileStore; |
@@ -16,2 +16,3 @@ /** | ||
set(key: Buffer, value: T): void | Promise<void>, | ||
clear(): void | Promise<void>, | ||
}; |
@@ -15,3 +15,3 @@ /** | ||
const FileStore = require('./stores/FileStore'); | ||
const PersistedMapStore = require('./stores/PersistedMapStore'); | ||
const HttpStore = require('./stores/HttpStore'); | ||
@@ -24,4 +24,4 @@ const stableHash = require('./stableHash'); | ||
module.exports.FileStore = FileStore; | ||
module.exports.PersistedMapStore = PersistedMapStore; | ||
module.exports.HttpStore = HttpStore; | ||
module.exports.stableHash = stableHash; |
@@ -16,2 +16,3 @@ /** | ||
const path = require('path'); | ||
const rimraf = require('rimraf'); | ||
@@ -31,9 +32,4 @@ | ||
constructor(options) { | ||
const root = options.root; | ||
for (let i = 0; i < 256; i++) { | ||
mkdirp.sync(path.join(root, ('0' + i.toString(16)).slice(-2))); | ||
} | ||
this._root = root; | ||
this._root = options.root; | ||
this._createDirs(); | ||
} | ||
@@ -70,2 +66,7 @@ | ||
clear() { | ||
this._removeDirs(); | ||
this._createDirs(); | ||
} | ||
_getFilePath(key) { | ||
@@ -77,2 +78,14 @@ return path.join( | ||
} | ||
_createDirs() { | ||
for (let i = 0; i < 256; i++) { | ||
mkdirp.sync(path.join(this._root, ('0' + i.toString(16)).slice(-2))); | ||
} | ||
} | ||
_removeDirs() { | ||
for (let i = 0; i < 256; i++) { | ||
rimraf.sync(path.join(this._root, ('0' + i.toString(16)).slice(-2))); | ||
} | ||
}} | ||
@@ -79,0 +92,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Network access
Supply chain riskThis module accesses the network.
Found 2 instances in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
42817
1007
2
4
18
+ Addedrimraf@^2.5.4
+ Addedbalanced-match@1.0.2(transitive)
+ Addedbrace-expansion@1.1.11(transitive)
+ Addedconcat-map@0.0.1(transitive)
+ Addedfs.realpath@1.0.0(transitive)
+ Addedglob@7.2.3(transitive)
+ Addedinflight@1.0.6(transitive)
+ Addedmetro-core@0.33.0(transitive)
+ Addedmetro-resolver@0.33.0(transitive)
+ Addedminimatch@3.1.2(transitive)
+ Addedonce@1.4.0(transitive)
+ Addedpath-is-absolute@1.0.1(transitive)
+ Addedrimraf@2.7.1(transitive)
+ Addedwrappy@1.0.2(transitive)
- Removedmetro-core@0.32.0(transitive)
- Removedmetro-resolver@0.32.0(transitive)
Updatedmetro-core@0.33.0