diff --git a/packages/metro-cache/src/FileStore.js b/packages/metro-cache/src/FileStore.js index 4e9c3753..85842bc5 100644 --- a/packages/metro-cache/src/FileStore.js +++ b/packages/metro-cache/src/FileStore.js @@ -42,14 +42,8 @@ class FileStore { } } - set(key: Buffer, value: TransformedCode): Promise { - return new Promise((resolve, reject) => { - const data = serializer.serialize(value); - - fs.writeFile(this._getFilePath(key), data, err => { - err ? reject(err) : resolve(); - }); - }); + set(key: Buffer, value: TransformedCode): void { + fs.writeFileSync(this._getFilePath(key), serializer.serialize(value)); } _getFilePath(key: Buffer): string {