docs(snaps-cli): sourceMap is documented as defaulting to true, but it is false - #4098
Open
boleklebovski wants to merge 1 commit into
Open
docs(snaps-cli): sourceMap is documented as defaulting to true, but it is false#4098boleklebovski wants to merge 1 commit into
sourceMap is documented as defaulting to true, but it is false#4098boleklebovski wants to merge 1 commit into
Conversation
The default was flipped when source maps were disabled by default; the JSDoc tag and the README were never updated. Signed-off-by: boleklebovski <160799963+boleklebovski@users.noreply.github.com>
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.
Problem
Two places tell snap authors that source maps are on by default:
packages/snaps-cli/src/config.ts:53—@default truepackages/snaps-cli/README.md:235—- Default: \true``The struct says otherwise,
packages/snaps-cli/src/config.ts:385:The behaviour changed when source maps were disabled by default; the type annotation and the README entry were not updated with it, so they have been describing the old behaviour ever since.
The effect is quiet: an author reads the docs, expects a
.mapfile next to the bundle, does not get one, and has no reason to suspect the documentation rather than their setup.Fix
Change both annotations to
false. Two lines; the struct — the thing that actually decides — is untouched.Note
Low Risk
Only README and JSDoc defaults are updated; build behavior and config parsing are untouched.
Overview
Documentation-only fix for
sourceMapin@metamask/snaps-cli: the README andSnapConfigJSDoc previously said the default wastrue, whileSnapsConfigStructhas always defaulted tofalse.Updates the README
sourceMapsection and the@defaultonsourceMapinconfig.tstofalse. Runtime behavior and the struct default are unchanged.Reviewed by Cursor Bugbot for commit 82ebd63. Bugbot is set up for automated code reviews on this repo. Configure here.