Conversation
|
Review requested:
|
guybedford
left a comment
There was a problem hiding this comment.
I believe this used to be to provide the "importer" information in the error message on failure, which is important in esm because we don't have a require stack.
I just checked this and can verify that for package.json with invalid syntax that importing in that directory gives the invalid syntax error without the name context of the parent module.
I would prefer if we could rather refactor getPackageConfig to support the " imported from ${base}" error context here rather than remove this context.
Are you referring to |
|
(And if this is one of those things that would be easier/faster to just do yourself than explain to me, don't let me stop you.) |
|
I just had a deeper look at this and there are two main cases for the
For case (1), useful context is the parent importer loading the package. Both of these are actually slightly different messages though. I've gone ahead and put together a nicer context for these messages in #35117. |
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes