Commit 4e5261c
Remove module name from asyncRequire calls in release builds
Summary:
Changelog:
**[Experimental]**: Reorder `asyncRequire`'s parameters and make module name optional
Changes the dependency collector in Metro to remove the `moduleName` parameter from `asyncRequire` calls in release builds. This aligns `asyncRequire` with `require` and other core runtime dependency APIs, where the module name parameter is passed last, and is only present for debugging purposes.
Reviewed By: jacdebug
Differential Revision: D42632385
fbshipit-source-id: a7e23e607b3a4bbd2c7933c884053d2c43f9af751 parent 20c4a65 commit 4e5261c
File tree
2 files changed
+83
-26
lines changed- packages/metro/src/ModuleGraph/worker
- __tests__
2 files changed
+83
-26
lines changedLines changed: 45 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
815 | 815 | | |
816 | 816 | | |
817 | 817 | | |
818 | | - | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
819 | 838 | | |
820 | 839 | | |
821 | 840 | | |
| |||
834 | 853 | | |
835 | 854 | | |
836 | 855 | | |
837 | | - | |
| 856 | + | |
838 | 857 | | |
839 | 858 | | |
840 | 859 | | |
| |||
852 | 871 | | |
853 | 872 | | |
854 | 873 | | |
855 | | - | |
| 874 | + | |
856 | 875 | | |
857 | 876 | | |
858 | 877 | | |
| |||
873 | 892 | | |
874 | 893 | | |
875 | 894 | | |
876 | | - | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
877 | 918 | | |
878 | 919 | | |
879 | 920 | | |
| |||
Lines changed: 38 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
626 | 626 | | |
627 | 627 | | |
628 | 628 | | |
629 | | - | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
630 | 634 | | |
631 | 635 | | |
632 | 636 | | |
633 | | - | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
634 | 642 | | |
635 | 643 | | |
636 | 644 | | |
| |||
661 | 669 | | |
662 | 670 | | |
663 | 671 | | |
664 | | - | |
665 | | - | |
666 | | - | |
667 | | - | |
668 | | - | |
669 | | - | |
670 | | - | |
671 | | - | |
672 | | - | |
673 | | - | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
674 | 686 | | |
675 | 687 | | |
676 | 688 | | |
677 | 689 | | |
678 | 690 | | |
679 | 691 | | |
680 | 692 | | |
681 | | - | |
682 | | - | |
683 | | - | |
684 | | - | |
685 | | - | |
686 | | - | |
687 | | - | |
688 | | - | |
689 | | - | |
690 | | - | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
691 | 707 | | |
692 | 708 | | |
693 | 709 | | |
| |||
0 commit comments