Skip to content

Commit 0f8e919

Browse files
authored
Merge pull request #2592 from microsoft/dev/v-peq/removeNode10TodoComments
chore: remove misleading Node 10 TODO comments
2 parents 4238aef + c68ff20 commit 0f8e919

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

src/debugger/appWorker.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ Object.defineProperty(process, "versions", {
6363
value: undefined
6464
});
6565
66-
// TODO: Replace by url.fileURLToPath method when Node 10 LTS become deprecated
66+
// Polyfill for url.fileURLToPath - needed because this code runs in user's RN environment
67+
// where we cannot use import/require. Keep this implementation.
6768
function fileUrlToPath(url) {
6869
if (process.platform === 'win32') {
6970
return url.toString().replace('file:///', '');

src/debugger/forkedAppWorker.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,8 @@ export class ForkedAppWorker implements IDebuggeeWorker {
203203
return promise;
204204
}
205205

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

0 commit comments

Comments
 (0)