feat: add path to ImportMapError::UnmappedBareSpecifier
This improves the error message emitted in the case of an unmapped specifier, specifically adding the path of the relevant import map.
Having the path information right there would have saved me a good bit of time to have realized that something was interfering with the import map specification, and so I hope this is useful for other folks as well.
This change requires one small update to denoland/deno, in cli/graph_util.rs:735 specifically. I hope that's acceptable (or if there's a better way to do this, I'd be happy to change the PR).
@dsherret could you take a look?
Yes, I'd be happy to do it.
Just so I know what to target, what do you folks usually expect out of such tests? For example, the original tuple didn't appear to have any test or code path corresponding to an empty referrer.
Just so I know what to target, what do you folks usually expect out of such tests? For example, the original tuple didn't appear to have any test or code path corresponding to an empty referrer.
Just one test like this one that calls .to_string() on the error when maybe_path is set would be great: https://github.com/denoland/import_map/blob/de119206ade83aa5eddf4afb1c388e42847781e9/rs-lib/tests/integration_test.rs#L245-L250
Thanks!