@module-federation/bridge-react
Advanced tools
Comparing version 0.0.0-next-20241015060033 to 0.0.0-next-20241015065721
# @module-federation/bridge-react | ||
## 0.0.0-next-20241015060033 | ||
## 0.0.0-next-20241015065721 | ||
@@ -11,4 +11,4 @@ ### Patch Changes | ||
- Updated dependencies [3082116] | ||
- @module-federation/runtime@0.0.0-next-20241015060033 | ||
- @module-federation/bridge-shared@0.0.0-next-20241015060033 | ||
- @module-federation/runtime@0.0.0-next-20241015065721 | ||
- @module-federation/bridge-shared@0.0.0-next-20241015065721 | ||
@@ -15,0 +15,0 @@ ## 0.6.6 |
@@ -1117,3 +1117,5 @@ "use strict"; | ||
beforeBridgeRender: new pluginHelper2.SyncHook(), | ||
beforeBridgeDestroy: new pluginHelper2.SyncHook() | ||
afterBridgeRender: new pluginHelper2.SyncHook(), | ||
beforeBridgeDestroy: new pluginHelper2.SyncHook(), | ||
afterBridgeDestroy: new pluginHelper2.SyncHook() | ||
}); | ||
@@ -1151,3 +1153,3 @@ if (host) { | ||
providerInfoRef.current = providerReturn; | ||
const renderProps = { | ||
let renderProps = { | ||
moduleName, | ||
@@ -1166,5 +1168,10 @@ dom: rootRef.current, | ||
if (bridgeHook && ((_a = bridgeHook == null ? void 0 : bridgeHook.lifecycle) == null ? void 0 : _a.beforeBridgeRender)) { | ||
(_b = bridgeHook == null ? void 0 : bridgeHook.lifecycle) == null ? void 0 : _b.beforeBridgeRender.emit({ | ||
const beforeBridgeRenderRes = (_b = bridgeHook == null ? void 0 : bridgeHook.lifecycle) == null ? void 0 : _b.beforeBridgeRender.emit({ | ||
...renderProps | ||
}); | ||
const extraProps = beforeBridgeRenderRes && typeof beforeBridgeRenderRes === "object" && (beforeBridgeRenderRes == null ? void 0 : beforeBridgeRenderRes.extraProps) ? beforeBridgeRenderRes == null ? void 0 : beforeBridgeRenderRes.extraProps : {}; | ||
renderProps = { | ||
...renderProps, | ||
...extraProps | ||
}; | ||
} | ||
@@ -1182,4 +1189,4 @@ providerReturn.render(renderProps); | ||
); | ||
if (bridgeHook && ((_b = bridgeHook == null ? void 0 : bridgeHook.lifecycle) == null ? void 0 : _b.beforeBridgeDestroy)) { | ||
(_c = bridgeHook == null ? void 0 : bridgeHook.lifecycle) == null ? void 0 : _c.beforeBridgeDestroy.emit({ | ||
if (bridgeHook && ((_b = bridgeHook == null ? void 0 : bridgeHook.lifecycle) == null ? void 0 : _b.afterBridgeDestroy)) { | ||
(_c = bridgeHook == null ? void 0 : bridgeHook.lifecycle) == null ? void 0 : _c.afterBridgeDestroy.emit({ | ||
moduleName, | ||
@@ -1387,3 +1394,3 @@ dom: renderDom.current, | ||
const beforeBridgeRenderRes = beforeBridgeRender && beforeBridgeRender(info); | ||
const componentProps = beforeBridgeRenderRes && typeof beforeBridgeRenderRes === "object" && (beforeBridgeRenderRes == null ? void 0 : beforeBridgeRenderRes.extraProps) ? beforeBridgeRenderRes == null ? void 0 : beforeBridgeRenderRes.extraProps : {}; | ||
const extraProps = beforeBridgeRenderRes && typeof beforeBridgeRenderRes === "object" && (beforeBridgeRenderRes == null ? void 0 : beforeBridgeRenderRes.extraProps) ? beforeBridgeRenderRes == null ? void 0 : beforeBridgeRenderRes.extraProps : {}; | ||
const rootComponentWithErrorBoundary = ( | ||
@@ -1399,3 +1406,3 @@ // set ErrorBoundary for RawComponent rendering error, usually caused by user app rendering error | ||
}, | ||
propsInfo: { propsInfo, ...componentProps } | ||
propsInfo: { ...propsInfo, ...extraProps } | ||
} | ||
@@ -1402,0 +1409,0 @@ )) |
@@ -1098,3 +1098,5 @@ import * as React from "react"; | ||
beforeBridgeRender: new pluginHelper2.SyncHook(), | ||
beforeBridgeDestroy: new pluginHelper2.SyncHook() | ||
afterBridgeRender: new pluginHelper2.SyncHook(), | ||
beforeBridgeDestroy: new pluginHelper2.SyncHook(), | ||
afterBridgeDestroy: new pluginHelper2.SyncHook() | ||
}); | ||
@@ -1132,3 +1134,3 @@ if (host) { | ||
providerInfoRef.current = providerReturn; | ||
const renderProps = { | ||
let renderProps = { | ||
moduleName, | ||
@@ -1147,5 +1149,10 @@ dom: rootRef.current, | ||
if (bridgeHook && ((_a = bridgeHook == null ? void 0 : bridgeHook.lifecycle) == null ? void 0 : _a.beforeBridgeRender)) { | ||
(_b = bridgeHook == null ? void 0 : bridgeHook.lifecycle) == null ? void 0 : _b.beforeBridgeRender.emit({ | ||
const beforeBridgeRenderRes = (_b = bridgeHook == null ? void 0 : bridgeHook.lifecycle) == null ? void 0 : _b.beforeBridgeRender.emit({ | ||
...renderProps | ||
}); | ||
const extraProps = beforeBridgeRenderRes && typeof beforeBridgeRenderRes === "object" && (beforeBridgeRenderRes == null ? void 0 : beforeBridgeRenderRes.extraProps) ? beforeBridgeRenderRes == null ? void 0 : beforeBridgeRenderRes.extraProps : {}; | ||
renderProps = { | ||
...renderProps, | ||
...extraProps | ||
}; | ||
} | ||
@@ -1163,4 +1170,4 @@ providerReturn.render(renderProps); | ||
); | ||
if (bridgeHook && ((_b = bridgeHook == null ? void 0 : bridgeHook.lifecycle) == null ? void 0 : _b.beforeBridgeDestroy)) { | ||
(_c = bridgeHook == null ? void 0 : bridgeHook.lifecycle) == null ? void 0 : _c.beforeBridgeDestroy.emit({ | ||
if (bridgeHook && ((_b = bridgeHook == null ? void 0 : bridgeHook.lifecycle) == null ? void 0 : _b.afterBridgeDestroy)) { | ||
(_c = bridgeHook == null ? void 0 : bridgeHook.lifecycle) == null ? void 0 : _c.afterBridgeDestroy.emit({ | ||
moduleName, | ||
@@ -1368,3 +1375,3 @@ dom: renderDom.current, | ||
const beforeBridgeRenderRes = beforeBridgeRender && beforeBridgeRender(info); | ||
const componentProps = beforeBridgeRenderRes && typeof beforeBridgeRenderRes === "object" && (beforeBridgeRenderRes == null ? void 0 : beforeBridgeRenderRes.extraProps) ? beforeBridgeRenderRes == null ? void 0 : beforeBridgeRenderRes.extraProps : {}; | ||
const extraProps = beforeBridgeRenderRes && typeof beforeBridgeRenderRes === "object" && (beforeBridgeRenderRes == null ? void 0 : beforeBridgeRenderRes.extraProps) ? beforeBridgeRenderRes == null ? void 0 : beforeBridgeRenderRes.extraProps : {}; | ||
const rootComponentWithErrorBoundary = ( | ||
@@ -1380,3 +1387,3 @@ // set ErrorBoundary for RawComponent rendering error, usually caused by user app rendering error | ||
}, | ||
propsInfo: { propsInfo, ...componentProps } | ||
propsInfo: { ...propsInfo, ...extraProps } | ||
} | ||
@@ -1383,0 +1390,0 @@ )) |
{ | ||
"name": "@module-federation/bridge-react", | ||
"version": "0.0.0-next-20241015060033", | ||
"version": "0.0.0-next-20241015065721", | ||
"publishConfig": { | ||
@@ -38,3 +38,3 @@ "access": "public" | ||
"react-error-boundary": "^4.0.13", | ||
"@module-federation/bridge-shared": "0.0.0-next-20241015060033" | ||
"@module-federation/bridge-shared": "0.0.0-next-20241015065721" | ||
}, | ||
@@ -45,3 +45,3 @@ "peerDependencies": { | ||
"react-router-dom": ">=4", | ||
"@module-federation/runtime": "0.0.0-next-20241015060033" | ||
"@module-federation/runtime": "0.0.0-next-20241015065721" | ||
}, | ||
@@ -48,0 +48,0 @@ "devDependencies": { |
@@ -8,10 +8,9 @@ import { getInstance } from '@module-federation/runtime'; | ||
const pluginSystem = new pluginHelper.PluginSystem({ | ||
beforeBridgeRender: new pluginHelper.SyncHook< | ||
[Record<string, any>], | ||
void | ||
>(), | ||
beforeBridgeRender: new pluginHelper.SyncHook<[Record<string, any>], any>(), | ||
afterBridgeRender: new pluginHelper.SyncHook<[Record<string, any>], any>(), | ||
beforeBridgeDestroy: new pluginHelper.SyncHook< | ||
[Record<string, any>], | ||
void | ||
any | ||
>(), | ||
afterBridgeDestroy: new pluginHelper.SyncHook<[Record<string, any>], any>(), | ||
}); | ||
@@ -18,0 +17,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
166012
4569
+ Added@module-federation/bridge-shared@0.0.0-next-20241015065721(transitive)
+ Added@module-federation/runtime@0.0.0-next-20241015065721(transitive)
+ Added@module-federation/sdk@0.0.0-next-20241015065721(transitive)
- Removed@module-federation/bridge-shared@0.0.0-next-20241015060033(transitive)
- Removed@module-federation/runtime@0.0.0-next-20241015060033(transitive)
- Removed@module-federation/sdk@0.0.0-next-20241015060033(transitive)
Updated@module-federation/bridge-shared@0.0.0-next-20241015065721