feat(crashlytics): add support for hidden source maps - #10868
Open
tonybaroneee wants to merge 1 commit into
Open
feat(crashlytics): add support for hidden source maps#10868tonybaroneee wants to merge 1 commit into
tonybaroneee wants to merge 1 commit into
Conversation
Wiz Scan Summary
To detect these findings earlier in the dev lifecycle, try the Wiz Code extension for VS Code, JetBrains, or Visual Studio. |
Contributor
There was a problem hiding this comment.
Code Review
This pull request adds support for hidden sourcemaps (generated without sourceMappingURL comments) in the Crashlytics sourcemap upload command. It updates the mapping discovery process to resolve matching JS files using filename conventions and the source map's 'file' property, with comprehensive unit tests added to cover these scenarios. Feedback suggests refining the fallback logic in findHiddenSourceMapTarget to ensure consistent filesystem checks when jsFilesSet is omitted, which also reduces code nesting.
tonybaroneee
force-pushed
the
support-hidden-sourcemaps
branch
from
July 30, 2026 13:02
0a62027 to
6a6d242
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add support for
hiddensourcemaps (e.g., generated by Vite, Angular, Webpack, Rollup) has been added to the Crashlytics source map upload workflow, while preserving support for traditional sourcemaps and unlinked fallback mappings.Hidden Sourcemap Helpers:
extractSourceMapFileField: Efficiently reads the header of a.js.mapfile to extract the optional"file"field without loading massive mapping tables into memory.findHiddenSourceMapTarget: Resolves the corresponding target JS file for a hidden source map via:.mapsuffix, e.g.,bundle.js.mapbundle.js)."file"property (both relative path resolution and basename matching in the same directory).Two-Pass Mapping Strategy in
findSourceMapMappings://# sourceMappingURL=comments usinggetLinkedSourceMapPath.findHiddenSourceMapTarget.Comprehensive Testing:
extractSourceMapFileField,findHiddenSourceMapTarget, Vite-style hashed bundles, Angular-style browser bundles, custom-named sourcemaps, and mixed directories.Scenarios Tested
The test above in
src/crashlytics/sourcemap.spec.tsverifies that mixed directories correctly handle all three sourcemap scenarios concurrently:tradJs+tradMap):traditional.jshas a//# sourceMappingURL=traditional-hash.js.mapcomment linking it totraditional-hash.js.mapobfuscatedFilePath: "traditional.js".hiddenJs+hiddenMap):hidden.jshas no source mapping comment, buthidden.js.mapexistsobfuscatedFilePath: "hidden.js".unlinkedMap):standalone.js.maphas no matching.jsfile on diskobfuscatedFilePath: "standalone.js.map".