Remove remaining Node imports from core
Summary: Removed remaining path / fs imports from Flipper core. `expand-tide` needed replacement too, but noticed that it never actually rewrites paths since all use cases were already using absolute paths, so removed it instead. Reviewed By: aigoncharov Differential Revision: D33017654 fbshipit-source-id: e12f66ef68b5f9e4279411c94445a2fb87249e9a
This commit is contained in:
committed by
Facebook GitHub Bot
parent
d95b15094f
commit
accef856fc
@@ -8,7 +8,6 @@
|
||||
* @flow strict-local
|
||||
*/
|
||||
|
||||
import {bufferToBlob} from 'flipper';
|
||||
import {RequiredParametersDialog} from './components';
|
||||
import {
|
||||
removeBookmarkFromDB,
|
||||
@@ -73,14 +72,14 @@ export function plugin(client: PluginClient<Events, Methods>) {
|
||||
draft.unshift(navigationEvent);
|
||||
});
|
||||
|
||||
const screenshot: Buffer = await client.device.screenshot();
|
||||
const screenshot = await client.device.screenshot();
|
||||
if (screenshot.byteLength === 0) {
|
||||
console.warn(
|
||||
'[navigation] Could not retrieve valid screenshot from the device.',
|
||||
);
|
||||
return;
|
||||
}
|
||||
const blobURL = URL.createObjectURL(bufferToBlob(screenshot));
|
||||
const blobURL = URL.createObjectURL(new Blob([screenshot.buffer]));
|
||||
// this process is async, make sure we update the correct one..
|
||||
const navigationEventIndex = navigationEvents
|
||||
.get()
|
||||
|
||||
Reference in New Issue
Block a user