I expect nyc to correctly handle file paths that contain url encoded characters.
Observed Behavior
$ npx nyc node dist/\{id\}.js
Transformation error for /dev/shm/nyc-urlencode-bug/dist/{id}.js ; return original code
An error occurred while trying to read the map file at /dev/shm/nyc-urlencode-bug/dist/%7Bid%7D.js.map
Error: ENOENT: no such file or directory, open '/dev/shm/nyc-urlencode-bug/dist/%7Bid%7D.js.map'
If I create symlinks from dist/%7Bid%7D.js.map to dist/{id}.js.map nyc runs perfectly ok. I notice that {id}.js contains the url already encoded so perhaps its missing a decode call?
Anyone has any ideas here? I have the same issue exactly.
Everything else is working (if I don't have such files, it all works fabulously)
@kazkansouh did you find a resolution?
Link to bug demonstration repository
I have setup a mini example of the issue:
https://github.com/kazkansouh/nyc-urlencode-bug
Expected Behavior
I expect nyc to correctly handle file paths that contain url encoded characters.
Observed Behavior
If I create symlinks from
dist/%7Bid%7D.js.map
todist/{id}.js.map
nyc runs perfectly ok. I notice that{id}.js
contains the url already encoded so perhaps its missing a decode call?Environment Information