GitShow/react/metro
react

metro

๐Ÿš‡ The JavaScript bundler for React Native

by react
bundlerjavascriptreact-native
Star on GitHubForkWebsitenpm

JavaScript

5.6k stars685 forks482 contributorsActive ยท 7h agoSince 2016v0.85.0MIT

Meet the team

See all 482 on GitHub โ†’
robhogan
robhogan603 contributions
rafeca
rafeca449 contributions
motiz88
motiz88318 contributions
cpojer
cpojer282 contributions
davidaurelio
davidaurelio247 contributions
SamChou19815
SamChou19815172 contributions
huntie
huntie145 contributions
martinbigio
martinbigio101 contributions

Languages

View on GitHub โ†’
JavaScript99.8%
SCSS0.1%
CSS0%
TypeScript0%

Commit activity

Last 12 weeks ยท 70 commits

Full graph โ†’

Community health

6 of 6 standards met

Community profile โ†’
75
โœ“READMEโœ“Licenseโœ“Contributingโœ“Code of Conductโœ“Issue Templateโœ“PR Template

Recent PRs & issues

Active ยท Last activity 7h ago
See all on GitHub โ†’
durvesh1992
Fix mergeConfig dropping state when a config in the chain is asyncOpenPR

Summary When encounters a config that resolves to a (e.g. an async / a config function returning a promise) and at least one more config follows it, it hands off to with two defects: 1. Missing spread. takes a rest parameter, but the call passed as a single array argument. The remaining configs end up wrapped one level too deep, so they're merged as a bogus object (producing junk keys like ) instead of being applied as configs. 2. Dropped accumulator. (the base merged with every config to the left of the async one) was discarded โ€” the unresolved promise was passed as the base, so all prior merges were lost. The fix spreads the remaining configs into the rest parameter and folds into the resolved async config so both the accumulated state and the trailing overrides are preserved. Test plan The existing tests only cover sync configs, so this path was uncovered. Added a regression test (an async config function followed by a trailing override) asserting the base, the async config, and the trailing override all survive: Before: is (base dropped); trailing override mangled. After: all three configs merge correctly.

durvesh1992 ยท 16h ago
durvesh1992
Fix RAM bundle passing the deps function (not its result) to getTransformOptionsOpenPR

Summary hands custom a callback to look up a module's transitive dependencies. But it builds that callback as: is the function . This calls on the function itself and ignores โ€” it never invokes . Since the closure has arity 1, treats it as array-like via and returns . So any that uses this callback to compute / receives for every file it asks about. Fix Test plan Added a regression test that supplies a which calls the callback for and asserts it returns foo's transitive deps (, , ). Fails before (), passes after. Existing tests + snapshots unchanged (4 passed, 2 snapshots).

durvesh1992 ยท 1d ago
durvesh1992
Fix MockPlugin clobbering the active mock when a non-active duplicate is removedOpenPR

Summary When a manual-mock file with duplicates is removed, unconditionally reassigns the active mock to an arbitrary remaining duplicate: It never checks whether the removed file was the active mock (). When a non-active duplicate is removed and 3+ duplicates exist, returns the first-inserted path, silently changing which mock resolves โ€” even though the previously-active mock still exists on disk. The existing 2-duplicate "recovers from duplicates" test masks this because the single remaining element is coincidentally always the right answer. Fix Capture whether the removed file was the active mock before deleting, and only reassign in that case. Test plan Added a regression test: 3 duplicates (a, b, c โ†’ active c), remove the non-active , assert the active mock stays . Fails before (becomes ), passes after. Full MockPlugin + getMockName suites: 13 pass, no regressions.

durvesh1992 ยท 1d ago

Recent fixes

View closed PRs โ†’
robhogan
Remove deprecated default exports from public entry points (#1759)MergedPR

Summary: Remove the deprecated default-object export from Metro packages. The supported public API is now exclusively named exports, so any consumer importing a Metro package's default - directly, or implicitly via Babel/TypeScript - will break and must migrate to named imports. This affects the public entry points of , , , , , , , and . Default imports like these will no longer work: Switch to named imports instead: Namespace imports are unaffected and continue to work, since they bind the package's named exports: Changelog: [Breaking] Removed the deprecated default export from Metro's public packages; use named (or namespace) imports instead. ___ Reviewed By: huntie Differential Revision: D110062342

robhogan ยท 7h ago
robhogan
Remove long-deprecated `resolver.blacklistRE` config (use `blockList`)MergedPR

Summary: was deprecated in favour of in 2020. This removes it (the next release is semver major anyway), and tidies up some shim code. Changelog: Reviewed By: huntie Differential Revision: D110175146

robhogan ยท 19h ago
robhogan
Remove support for deprecated YAML and `.es6` config files (#1752)MergedPR

Summary: These have been deprecated (with a runtime warning) and removal planned for a year now. I believe they're little used in the wild and inherently very limited. Expo has already dropped support. Removing YAML support lets us drop a dependency also. Changelog: Differential Revision: D109987702

robhogan ยท 1d ago
Structured data for AI agents

Repository: react/metro. Description: ๐Ÿš‡ The JavaScript bundler for React Native Stars: 5609, Forks: 685. Primary language: JavaScript. Languages: JavaScript (99.8%), SCSS (0.1%), CSS (0%), TypeScript (0%). License: MIT. Homepage: https://metrobundler.dev Topics: bundler, javascript, react-native. Latest release: v0.85.0 (1w ago). Open PRs: 96, open issues: 361. Last activity: 7h ago. Community health: 75%. Top contributors: robhogan, rafeca, motiz88, cpojer, davidaurelio, SamChou19815, huntie, martinbigio, dependabot[bot], vjeux and others.

ยท@ofershap

Replace github.com with gitshow.dev