-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
🏗✨ Add a test for sourcemaps generation during minified compilation #27795
Conversation
Looking at the source code, |
Pretty sure this is not true. I made a known change to the source code in Edit: Unless I misunderstood the original intent of a sourcemap file? Is the |
Hey @estherkim, these files were changed:
|
@jridgewell I've added a step that compares ASTs of |
As discussed offline with @jridgewell, we're still in search of an effective way to extract the mappings from I've modified the scope of this PR to add the |
@choumx @jridgewell All changes made. This is now ready for review and merge. |
Added a new check for all the paths in the |
Added yet another check that implements #27681 (comment) and inspects the |
Background:
During minified compilation, we generate a sourcemap file called
v0.js.map
in addition to the runtime filev0.js
. Sourcemap generation frequently breaks due to untested compilation toolchain changes. See #27681.PR highlights:
gulp check-sourcemaps
gulp dist --core_runtime_only --full_sourcemaps
)sourceRoot
field exists, and is of the correct formatsources
array exists, and all paths in it point to valid filesmappings
object exists, decodes it, and verifies that a mapping exists for a known sentinel piece of codeUsage:
Passing example:
Failing example (incorrect
sourceRoot
: wrong sourcemap domain):Failing example (incorrect
sources
: revert fix in #27665):Failing example (incorrect
mappings
: modify sentinel piece of code):Fixes #27681