Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/debugger/appWorker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ Object.defineProperty(process, "versions", {
value: undefined
});

// TODO: Replace by url.fileURLToPath method when Node 10 LTS become deprecated
// Polyfill for url.fileURLToPath - needed because this code runs in user's RN environment
// where we cannot use import/require. Keep this implementation.
function fileUrlToPath(url) {
if (process.platform === 'win32') {
return url.toString().replace('file:///', '');
Expand Down
3 changes: 2 additions & 1 deletion src/debugger/forkedAppWorker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,8 @@ export class ForkedAppWorker implements IDebuggeeWorker {
return promise;
}

// TODO: Replace by url.pathToFileURL method when Node 10 LTS become deprecated
// Simple and reliable implementation for converting file path to file:// URL
// Keep this instead of using url.pathToFileURL() to avoid URL encoding issues
public pathToFileUrl(url: string): string {
const filePrefix = process.platform === "win32" ? "file:///" : "file://";
return filePrefix + url;
Expand Down
Loading