Skip to content

docs(snaps-cli): sourceMap is documented as defaulting to true, but it is false - #4098

Open
boleklebovski wants to merge 1 commit into
MetaMask:mainfrom
boleklebovski:docs/sourcemap-default-is-false
Open

docs(snaps-cli): sourceMap is documented as defaulting to true, but it is false#4098
boleklebovski wants to merge 1 commit into
MetaMask:mainfrom
boleklebovski:docs/sourcemap-default-is-false

Conversation

@boleklebovski

@boleklebovski boleklebovski commented Aug 12, 2026

Copy link
Copy Markdown

Problem

Two places tell snap authors that source maps are on by default:

  • packages/snaps-cli/src/config.ts:53@default true
  • packages/snaps-cli/README.md:235- Default: \true``

The struct says otherwise, packages/snaps-cli/src/config.ts:385:

sourceMap: defaulted(union([boolean(), literal('inline')]), false),

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 .map file 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 sourceMap in @metamask/snaps-cli: the README and SnapConfig JSDoc previously said the default was true, while SnapsConfigStruct has always defaulted to false.

Updates the README sourceMap section and the @default on sourceMap in config.ts to false. 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.

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>
@boleklebovski
boleklebovski requested a review from a team as a code owner August 12, 2026 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant