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:
Michel Weststrate
2021-12-13 05:46:42 -08:00
committed by Facebook GitHub Bot
parent d95b15094f
commit accef856fc
18 changed files with 47 additions and 306 deletions

View File

@@ -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()