sourcemaps.io icon indicating copy to clipboard operation
sourcemaps.io copied to clipboard

Extract source map validator as a library

Open connorjclark opened this issue 6 years ago • 1 comments

Would be very useful to have this as a module to use in a CI / test environment. https://github.com/ben-ng/sourcemap-validator isn't ideal because it only returns the first error, and also I believe the implementation here is more detailed.

connorjclark avatar Jun 14 '19 19:06 connorjclark

I plan to add a new audit in Lighthouse that displays all the source map validation errors for a given page.

I haven't had a chance to explore the source code here yet, but supposing I fork and expose the validation code as a library, would this repo consider merging my changes and publishing a package?

EDIT: It seems like the meat of the validation is just this one function. In that case, I am tempted to just recreate the function. Also Lighthouse happens to use a different source map library so it'll be necessary to make a new implementation anyhow. But I'll make sure the results match this tool :)

connorjclark avatar Jul 06 '20 20:07 connorjclark