Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make the SourceMap node validation more precise and possibly slightly more performant; related to #385 #396

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Jun 18, 2019

  1. make the SourceMap node validation more precise and possibly more per…

    …formant: check for the okay/good cases before checking the various error situations. Hence the first error check (with its extensive report message) has been moved down. The check has been duplicated for the 'generated' section of the mapping as that's another potential user app programmer error source.
    
    The diff is a little large because I turned on `prettier` for all my branches for easier merging/diffing (once one has moved to a `prettier`-formatted codebase).
    
    Extracted from SHA-1: 151593b * stricter validation for source and generated line/column: when they exist, they MUST be numbers. Related to mozilla#385 (which is not fixed by this, mind you). For this patch I choose to stick with the exception being thrown as that better ensures code/mapping quality AFAIAC.
    
    As all error validation checks are now in a single spot and within a single conditional chunk, source-map can choose to resolve by, for example, providing a source-map option which enables/disables these checks.
    GerHobbelt committed Jun 18, 2019
    Configuration menu
    Copy the full SHA
    e9184b0 View commit details
    Browse the repository at this point in the history