Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information