mozilla / mozilla/source-map

Add check that URLs don't contain Windows path separators (`\`)

Open
#91 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feat
Dominant language
JavaScript
Stars
3.7k
Forks
370
PR merge metrics
No merged PRs in 30d

Description

On widows file paths will include \ instead of / and source-map doesn’t convert slashes, but source map will work only with UNIX slashes.

We can fix it in app, but I think, that we need to fix it here, because every source-map node.js user must to repeat this fix.

Autoprefixer issue: https://github.com/nDmitry/grunt-autoprefixer/issues/25

I can helps with PR, but how we should do this? Try to load path (it wil be in node.js and browserfy) and if path.sep == "\\" replace all \ to /?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the URL and path-handling code in the source-map package, then inspect how it behaves on Windows and in browserified builds. Reproduce the reported backslash case and identify the existing tests covering URL conversion; done means the behavior is covered by a regression test and Windows separators are handled consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.