Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lib: fix assert throwing different error messages in ESM and CJS #50634

Commits on Nov 11, 2023

  1. lib: fix assert shows diff messages in ESM and CJS

    This PR addresses an issue which was caused by the design in
    the ESM loader.
    The ESM loader was modifying the file path and replacing the 'file'
    property with the file proto in the stack trace.
    This, in turn, led to unhandled exceptions when the assert module
    attempted to open the file to display erroneous code.
    The changes in this PR resolve this issue by handling the file path
    correctly, ensuring that the remaining message formatting code can
    execute as expected.
    MrJithil committed Nov 11, 2023
    Configuration menu
    Copy the full SHA
    22f1ad7 View commit details
    Browse the repository at this point in the history