Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Feature] Remove misleading Node 10 TODO comments #2607

Description

@ConnorQi01

Summary

Two TODO comments in the debugger code suggest replacing polyfill implementations
when "Node 10 LTS becomes deprecated". These comments are misleading because:

  1. 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.

  2. 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions