source-map-sharp icon indicating copy to clipboard operation
source-map-sharp copied to clipboard

https://github.com/mozilla/source-map for .NET, re-written in F#

Source Map Sharp

Tests status

About

This is a direct rewrite (meaning, the goal was not to write 'idiomatic' F# code, but to resemble inital JS code as close as possible) of source map generation tool https://github.com/mozilla/source-map

Which is originally written in JS. The initial purpose is to use it with https://github.com/fable-compiler/Fable project

See https://github.com/fable-compiler/Fable/issues/2166 - "Bring back source map support"

UPD: The issue above was closed, and this project is now being used by Fable to generated Source Maps. Hooray!

Current support status

  • Fable - working fine
  • .NET - working fine

Running tests

dotnet:

dotnet test

Fable (js):

dotnet tool restore
pnpm install
pnpm test

Files - status

Legend:

๐Ÿ˜Š - Everything fine

๐Ÿคจ - Everything fine except minor details (or not important right now details)

๐Ÿ˜ด - Not needed / won't do

๐Ÿ˜จ - Should be done, but isn't

๐Ÿคฏ - Done but no tested

  1. ๐Ÿ˜Š ArraySet - Done & tested
  2. ๐Ÿ˜Š Base64 - Done & tested
  3. ๐Ÿ˜Š Base64-vlq - Done & tested
  4. ๐Ÿ˜ด binary-search - Not done, probably won't need
  5. ๐Ÿคจ mapping-list - Done, not tested specifically, coverage shows 95% via other tessts
  6. ๐Ÿ˜ด mapping.wasm - Not done, probably won't need
  7. ๐Ÿ˜ด read-wasm-browser - Not done, probably won't need
  8. ๐Ÿ˜ด read-wasm - Not done, probably won't need
  9. ๐Ÿ˜จ source-map-consumer - Not done, Don't know if will need it or not at the moment
  10. ๐Ÿ˜Š source-map-generator - Done except the consumer parts, tested except consumer parts
  11. ๐Ÿ˜Š source-node - Done except the consumer parts, tested except consumer parts
  12. ๐Ÿ˜ด url-browser - Not done, probably won't need
  13. ๐Ÿ˜ด url - Not done, probably won't need
  14. ๐Ÿคจ util - Done partially, what's needed
  15. ๐Ÿ˜ด wasm - Not done, probably won't need

"SourceMapConsumer"-related stuff

Not done at the moment:

  1. SourceNode fromStringWithSourceMap function
  2. SourceMapGenerator fromSourceMap function
  3. SourceMapConsumer module
  4. SourceMapNode, SourceMapGenerator - consumer-related tests

Help needed

  1. Source map consumer
  2. Documentation & usage examples
  3. Decisions on WASM stuff - Rust repo https://github.com/fitzgen/source-map-mappings