@module-federation/metro 0.0.0-perf-devtools-20260107043700 → 0.0.0-perf-website-code-usage-20260914033703

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. package/babel-plugin/patch-initialize-core.js +3 -3
  2. package/babel-plugin/patch-require.js +3 -3
  3. package/dist/babel/transformer.js +1 -1
  4. package/dist/commands/bundle-host/index.js +17 -12
  5. package/dist/commands/bundle-host/index.mjs +8 -30
  6. package/dist/commands/bundle-host/options.js +12 -8
  7. package/dist/commands/bundle-host/options.mjs +2 -3
  8. package/dist/commands/bundle-host/types.js +2 -2
  9. package/dist/commands/bundle-host/types.mjs +1 -2
  10. package/dist/commands/bundle-remote/index.js +34 -19
  11. package/dist/commands/bundle-remote/index.mjs +28 -38
  12. package/dist/commands/bundle-remote/options.js +15 -11
  13. package/dist/commands/bundle-remote/options.mjs +4 -5
  14. package/dist/commands/bundle-remote/types.js +2 -2
  15. package/dist/commands/bundle-remote/types.mjs +1 -2
  16. package/dist/commands/index.js +14 -10
  17. package/dist/commands/index.mjs +3 -3
  18. package/dist/commands/types.js +2 -2
  19. package/dist/commands/types.mjs +1 -2
  20. package/dist/commands/utils/create-module-path-remapper.js +15 -11
  21. package/dist/commands/utils/create-module-path-remapper.mjs +1 -2
  22. package/dist/commands/utils/create-resolver.d.ts +1 -1
  23. package/dist/commands/utils/create-resolver.js +15 -11
  24. package/dist/commands/utils/create-resolver.mjs +1 -2
  25. package/dist/commands/utils/get-community-plugin.d.ts +1 -2
  26. package/dist/commands/utils/get-community-plugin.js +15 -12
  27. package/dist/commands/utils/get-community-plugin.mjs +5 -6
  28. package/dist/commands/utils/load-metro-config.js +15 -14
  29. package/dist/commands/utils/load-metro-config.mjs +9 -11
  30. package/dist/commands/utils/path-utils.d.ts +2 -0
  31. package/dist/commands/utils/path-utils.js +51 -0
  32. package/dist/commands/utils/path-utils.mjs +11 -0
  33. package/dist/commands/utils/save-bundle-and-map.d.ts +1 -1
  34. package/dist/commands/utils/save-bundle-and-map.js +14 -11
  35. package/dist/commands/utils/save-bundle-and-map.mjs +3 -27
  36. package/dist/index.js +14 -10
  37. package/dist/index.mjs +3 -5
  38. package/dist/logger.d.ts +2 -0
  39. package/dist/logger.js +43 -0
  40. package/dist/logger.mjs +6 -0
  41. package/dist/modules/asyncRequire.ts +41 -10
  42. package/dist/modules/metroCorePlugin.ts +2 -3
  43. package/dist/plugin/babel-transformer.js +13 -9
  44. package/dist/plugin/babel-transformer.mjs +3 -3
  45. package/dist/plugin/constants.d.ts +1 -0
  46. package/dist/plugin/constants.js +27 -19
  47. package/dist/plugin/constants.mjs +3 -3
  48. package/dist/plugin/generators.js +28 -21
  49. package/dist/plugin/generators.mjs +14 -11
  50. package/dist/plugin/helpers.d.ts +1 -0
  51. package/dist/plugin/helpers.js +28 -20
  52. package/dist/plugin/helpers.mjs +9 -9
  53. package/dist/plugin/index.d.ts +2 -0
  54. package/dist/plugin/index.js +64 -13
  55. package/dist/plugin/index.mjs +54 -7
  56. package/dist/plugin/manifest-middleware.d.ts +12 -0
  57. package/dist/plugin/manifest-middleware.js +217 -0
  58. package/dist/plugin/manifest-middleware.mjs +170 -0
  59. package/dist/plugin/manifest.d.ts +15 -2
  60. package/dist/plugin/manifest.js +126 -26
  61. package/dist/plugin/manifest.mjs +107 -22
  62. package/dist/plugin/normalize-extra-options.js +16 -12
  63. package/dist/plugin/normalize-extra-options.mjs +2 -3
  64. package/dist/plugin/normalize-options.js +70 -20
  65. package/dist/plugin/normalize-options.mjs +60 -14
  66. package/dist/plugin/resolver.d.ts +1 -1
  67. package/dist/plugin/resolver.js +16 -12
  68. package/dist/plugin/resolver.mjs +10 -11
  69. package/dist/plugin/rewrite-request.d.ts +5 -1
  70. package/dist/plugin/rewrite-request.js +23 -10
  71. package/dist/plugin/rewrite-request.mjs +13 -5
  72. package/dist/plugin/serializer.d.ts +2 -1
  73. package/dist/plugin/serializer.js +59 -39
  74. package/dist/plugin/serializer.mjs +48 -55
  75. package/dist/plugin/validate-options.js +116 -12
  76. package/dist/plugin/validate-options.mjs +95 -7
  77. package/dist/types.d.ts +15 -15
  78. package/dist/types.js +2 -2
  79. package/dist/types.mjs +1 -2
  80. package/dist/utils/errors.js +16 -12
  81. package/dist/utils/errors.mjs +1 -2
  82. package/dist/utils/federated-remote-types.d.ts +12 -0
  83. package/dist/utils/federated-remote-types.js +140 -0
  84. package/dist/utils/federated-remote-types.mjs +90 -0
  85. package/dist/utils/index.js +14 -10
  86. package/dist/utils/index.mjs +3 -5
  87. package/dist/utils/metro-compat.d.ts +23 -0
  88. package/dist/utils/metro-compat.js +74 -0
  89. package/dist/utils/metro-compat.mjs +26 -0
  90. package/dist/utils/vm-manager.d.ts +1 -1
  91. package/dist/utils/vm-manager.js +14 -12
  92. package/dist/utils/vm-manager.mjs +3 -6
  93. package/package.json +22 -7
  94. package/dist/babel/transformer.d.ts +0 -2
  95. package/dist/runtime/host-entry.d.ts +0 -1
  96. package/dist/runtime/init-host.d.ts +0 -1
  97. package/dist/runtime/remote-entry.d.ts +0 -1
  98. package/dist/runtime/remote-hmr.d.ts +0 -1
  99. package/dist/runtime/remote-module-registry.d.ts +0 -7
  100. package/dist/runtime/remote-module.d.ts +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@module-federation/metro",
3
- "version": "0.0.0-perf-devtools-20260107043700",
3
+ "version": "0.0.0-perf-website-code-usage-20260914033703",
4
4
  "description": "Module Federation for Metro bundler",
5
5
  "keywords": [
6
6
  "module-federation",
@@ -57,8 +57,9 @@
57
57
  },
58
58
  "dependencies": {
59
59
  "@expo/metro-runtime": "^5.0.4",
60
- "@module-federation/runtime": "0.0.0-perf-devtools-20260107043700",
61
- "@module-federation/sdk": "0.0.0-perf-devtools-20260107043700"
60
+ "@module-federation/dts-plugin": "0.0.0-perf-website-code-usage-20260914033703",
61
+ "@module-federation/runtime": "0.0.0-perf-website-code-usage-20260914033703",
62
+ "@module-federation/sdk": "0.0.0-perf-website-code-usage-20260914033703"
62
63
  },
63
64
  "peerDependencies": {
64
65
  "@babel/types": "^7.25.0",
@@ -70,10 +71,21 @@
70
71
  "react": ">=19.0.0",
71
72
  "react-native": ">=0.79.0"
72
73
  },
74
+ "peerDependenciesMeta": {
75
+ "react": {
76
+ "optional": true
77
+ },
78
+ "react-native": {
79
+ "optional": true
80
+ }
81
+ },
73
82
  "devDependencies": {
74
- "@rslib/core": "^0.10.0",
75
- "@types/node": "^20.0.0",
83
+ "@rslib/core": "^0.23.2",
84
+ "@typescript-eslint/eslint-plugin": "8.56.1",
85
+ "@typescript-eslint/parser": "8.56.1",
86
+ "@types/node": "^20.19.5",
76
87
  "@types/react": "^19.1.0",
88
+ "memfs": "4.46.0",
77
89
  "metro": "^0.82.1",
78
90
  "metro-config": "^0.82.1",
79
91
  "metro-file-map": "^0.82.1",
@@ -82,10 +94,13 @@
82
94
  "react": "19.1.0",
83
95
  "react-native": "0.80.0",
84
96
  "ts-node": "^10.9.2",
85
- "typescript": "^5.8.3"
97
+ "typescript": "^6.0.3"
86
98
  },
87
99
  "scripts": {
88
100
  "build": "rslib build",
89
- "typecheck": "tsc --noEmit"
101
+ "test": "rstest",
102
+ "test:watch": "rstest --watch",
103
+ "typecheck": "tsc --noEmit",
104
+ "lint": "ESLINT_USE_FLAT_CONFIG=false pnpm exec eslint --ignore-pattern node_modules \"**/*.{ts,tsx,js,jsx}\""
90
105
  }
91
106
  }
@@ -1,2 +0,0 @@
1
- declare const _exports: any;
2
- export = _exports;
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export function setup(): void;
@@ -1,7 +0,0 @@
1
- export function loadAndGetShared(id: any): Promise<any>;
2
- export function loadAndGetRemote(id: any): Promise<any>;
3
- export function loadRemoteToRegistry(id: any): Promise<void>;
4
- export function loadSharedToRegistry(id: any): void | Promise<void>;
5
- export function loadSharedToRegistryAsync(id: any): Promise<void>;
6
- export function loadSharedToRegistrySync(id: any): void;
7
- export function getModuleFromRegistry(id: any): any;
@@ -1 +0,0 @@
1
- export {};