Skip to content

Publish 0.86.0#1766

Open
robhogan wants to merge 4 commits into
mainfrom
export-D110690704
Open

Publish 0.86.0#1766
robhogan wants to merge 4 commits into
mainfrom
export-D110690704

Conversation

@robhogan

@robhogan robhogan commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Summary:
Publish 0.86.0

Changelog: [Internal]

Reviewed By: hoxyq, huntie, GijsWeterings

Differential Revision: D110690704

robhogan and others added 4 commits July 6, 2026 06:04
…ults to `true`

Differential Revision: D110759649
Summary:
The whole-bundle source map served by Metro (the `.map` endpoint, inline source maps, and RAM bundle info) can be emitted either as a flat map or as an indexed/sectioned map. The indexed form passes each module's stored VLQ `mappings` through verbatim instead of decoding and re-encoding them into one flat map, so it is much cheaper to serialize; the flat form was only kept for consumers that predate index-map support. This was gated behind `serializer.unstable_allowIndexMap` (default off) and additionally only took effect when at least one module actually stored a compact VLQ map (`shouldEmitIndexedMap` checked `some(isVlqMap)`).

Index maps are now safe to emit unconditionally, so this removes the choice:

- Deletes the `serializer.unstable_allowIndexMap` option (default, Flow type, and generated TS type).
- Removes `shouldEmitIndexedMap` and the `some(isVlqMap)` guard from `sourceMapGenerator`; both `sourceMapGenerator` and `sourceMapGeneratorNonBlocking` now always call `fromRawMappingsIndexed`. `fromRawMappingsIndexed`/`toIndexMapSection` already handle every input shape (VLQ maps pass through verbatim; tuple maps are re-encoded per section), so no change is needed there.
- Drops the now-dead `allowIndexMap` plumbing from `Server.js` and the `unstable_allowIndexMap` wiring in the fb-metro CLI (the `--experimental-compact-source-maps` flag still controls `transformer.unstable_compactSourceMaps`, which is what determines VLQ storage).

Behavioral change: the bundle `.map` (and inline/RAM-bundle maps) is now always a sectioned index map, whereas previously it defaulted to a flat map. This is the intended graduation of the index-map path; consumers on this toolchain already understand index maps.

Scope note — this does NOT make the flat serialization functions dead: `fromRawMappings` is still called directly by `metro-transform-worker` and `metro-buck-transform-worker` for single-module maps, and `fromRawMappings`/`fromRawMappingsNonBlocking`/`isVlqMap`/`toBabelSegments` remain public exports of `metro-source-map`. Only the serializer's flat-vs-indexed *choice* is removed. `fromRawMappingsNonBlocking` is now internally unused but retained as public API; removing it would be a separate, deliberate API break.

Differential Revision: D110757150
…maps

Summary:
`unstable_compactSourceMaps` gated whether the transform worker stored each module's source map as a compact VLQ `VlqMap` (`{mappings, names}`) or as decoded `MetroSourceMapSegmentTuple[]`. Its default was flipped to `true` earlier in this stack; this removes the option entirely and makes compact VLQ storage unconditional.

- Deletes the `transformer.unstable_compactSourceMaps` option (Flow type, metro-config default, and generated TS type).
- Simplifies `transformJS`/`transformJSON` to always encode a `VlqMap`: the Babel decoded-map fast path when not minifying, re-encoding the minifier's tuples otherwise.
- Narrows `JsOutput.data.map` from `Array<MetroSourceMapSegmentTuple> | VlqMap` to `VlqMap` and regenerates the TS defs.

Note: breaking change for external custom serializers/plugins that read `module.output[].data.map` expecting tuple arrays — the map is now always a `VlqMap`. Runtime tuple handling in `metro-source-map`/`symbolicate` is retained because non-JsOutput tuple sources (the minifier and virtual `map: []` scripts) still exist.

Differential Revision: D110762248
Summary:
Publish 0.86.0

Changelog: [Internal]

Reviewed By: hoxyq, huntie, GijsWeterings

Differential Revision: D110690704
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 6, 2026
@meta-codesync

meta-codesync Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

@robhogan has exported this pull request. If you are a Meta employee, you can view the originating Diff in D110690704.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant