Summary
Two TODO comments in the debugger code suggest replacing polyfill implementations
when "Node 10 LTS becomes deprecated". These comments are misleading because:
-
appWorker.ts — The fileUrlToPath function lives inside the WORKER_BOOTSTRAP
string literal, which is injected into the user's React Native environment at runtime.
That environment cannot use import/require, so the polyfill must stay permanently.
-
forkedAppWorker.ts — The pathToFileUrl method uses a simple string concatenation
instead of url.pathToFileURL(). The official API performs URL encoding which may
alter file paths and break existing behavior, so the simple implementation should be kept.
Expected behavior
Comments accurately describe why the implementations exist and must not be replaced.
Proposed change
Replace both TODO comments with explanatory comments that document the reason
the current implementations must be preserved.
Summary
Two TODO comments in the debugger code suggest replacing polyfill implementations
when "Node 10 LTS becomes deprecated". These comments are misleading because:
appWorker.ts— ThefileUrlToPathfunction lives inside theWORKER_BOOTSTRAPstring literal, which is injected into the user's React Native environment at runtime.
That environment cannot use
import/require, so the polyfill must stay permanently.forkedAppWorker.ts— ThepathToFileUrlmethod uses a simple string concatenationinstead of
url.pathToFileURL(). The official API performs URL encoding which mayalter file paths and break existing behavior, so the simple implementation should be kept.
Expected behavior
Comments accurately describe why the implementations exist and must not be replaced.
Proposed change
Replace both TODO comments with explanatory comments that document the reason
the current implementations must be preserved.