Skip to content

Stack trace does not normalize windows paths #397

@kirkwaiblinger

Description

@kirkwaiblinger

Environment

windows

Reproduction

https://github.com/kirkwaiblinger/repro-jiti-call-stack

Describe the bug

I expect the stack trace to contain normalized windows paths that match node's format when a TS file executed by jiti is in the stack.

That means, CJS modules should have a C:\path\to\file format (resolved/normalized path) and ESM modules should have a file:///C:/path/to/file (file URL) format.

Instead, jiti gives both cases as C:/path/to/file, which is neither resolved/normalized nor a valid file URL.

Additional context

Cause of typescript-eslint/typescript-eslint#11530 (comment)

Logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions