Last 12 weeks · 110 commits
6 of 6 standards met
Summary [!NOTE] Sharing this draft early to get initial feedback and iterate. Early benchmarking is promising: Baseline: 12,983,961 bytes 115s Tree-shake: 11,939,372 bytes, 107s Delta: -1,044,589 bytes (-8.05%), time -8s Validation so far is based on repeated bundle runs (tree-shake off vs on). Todo: [x] Add flag [x] support [x] Bench before / after [ ] Manual tests [ ] Run broader before/after benchmarks (multiple apps/configs) [ ] Ensure no regression when is disabled / not set [ ] Documentation Test plan
This PR introduces a workflow that runs every day at at ( USA West Coast, London) and tests the app on the following node versions: (minimum supported version) currently resolved to (previous lts) currently resolved to (current lts) currently resolved to (newest released node version) currently resolved to [!IMPORTANT] Because there's no organic way to notify the team when a nightly fails I decided to notify all the people who are subscribed to this PR instead, by the workflow adding a comment to it with a link to the failed run:** Successful run example: https://github.com/facebook/metro/actions/runs/10304537317 Failed run: https://github.com/facebook/metro/actions/runs/10304210697 With the comment added to the PR:
Repository: facebook/metro. Description: 🚇 The JavaScript bundler for React Native Stars: 5566, Forks: 676. 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.84.2 (6d ago). Open PRs: 68, open issues: 360. Last activity: 29m ago. Community health: 87%. Top contributors: robhogan, rafeca, motiz88, cpojer, davidaurelio, SamChou19815, huntie, martinbigio, dependabot[bot], vjeux and others.
JavaScript
Do you want to request a feature or report a bug? bug What is the current behavior? Concurrently-running react-native builds often fail with e.g.: If the current behavior is a bug, please provide the steps to reproduce and a minimal repository on GitHub that we can and . What is the expected behavior? I'd expect concurrently-running builds not to interfere with each other. Please provide your exact Metro configuration and mention your Metro, node, yarn/npm version and operating system.** MacOS 10.13.3 node 8.9.4 npm 5.6.0 started seeing this when upgraded react-native from 0.55.4 to 0.57.2 => (from our package-lock.json) metro went from 0.30.2 to 0.47.1
I’ve ported most of the tree-shaking implementation from esbuild to a Metro (Babel) plugin and have been running it in production for about a year. Since #632 is closed, I’d like to know Metro’s plans for tree shaking. I’m happy to contribute or upstream my work if that would be useful. https://github.com/xhsfe/thor-x/blob/main/packages/metro-plugin-tree-shaking/DESIGN.md
I'm on the same wifi. emulator works fine. when i make a new build on testflight and run the app i initially get a no bundle urlset error. after that the blue dot on the app name is also lost. When i go to http://localhost:8081/debugger-ui the page won't be loaded on the safari of iphone. on pc it loads up. if i replace localhost with my pc's ip the page will load up. Another thing is that even if it's not a debug build and i install the app via test flight the build crashes. i started a new react native project from scratch and i don't even have changes. let me know what might be the fix. i tried reinstalling xcode, changing provisioning profiles, reinstalling pods and all that. no help.
Many of the TypeScript definitions specify as a type parameter for generic types where the equivalent Flow type definition uses an empty type parameter: TypeScript Type Definition (🤨) https://github.com/facebook/metro/blob/76413561abb3757285e0cb0305f1f9f616fa2b6c/packages/metro/types/IncrementalBundler.d.ts#L25 Flow Type Definition https://github.com/facebook/metro/blob/76413561abb3757285e0cb0305f1f9f616fa2b6c/packages/metro/src/IncrementalBundler.js#L36 I would posit that the TypeScript definition is... mad sus, and I suspect we might just be running into this because the types are hand-written. Am I missing something and believing this is wrong? I'll open a PR to correct assuming this is indeed an incorrect typing.