Skip to content

Commit 3f736b6

Browse files
2heal1rutchanaiScriptedAlchemycursoragent
authored
feat: add createInstance api (#3874)
Co-authored-by: Rutchanai <[email protected]> Co-authored-by: Zack Jackson <[email protected]> Co-authored-by: Cursor Agent <[email protected]>
1 parent e874c64 commit 3f736b6

File tree

105 files changed

+2425
-2308
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+2425
-2308
lines changed

.changeset/cuddly-spoons-grin.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@module-federation/runtime': patch
3+
---
4+
5+
chore(runtime): add RUNTIME-009 error code

.changeset/few-games-obey.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@module-federation/runtime': patch
3+
---
4+
5+
refactor(runtime): rename FederationRuntimePlugin to ModuleFederationRuntimePlugin

.changeset/good-apricots-own.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@module-federation/runtime': minor
3+
---
4+
5+
feat(runtime): add createInstance api and deprecate init

.changeset/poor-pillows-study.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
'@module-federation/webpack-bundler-runtime': patch
3+
'@module-federation/bridge-react': patch
4+
'@module-federation/data-prefetch': patch
5+
'@module-federation/runtime-core': patch
6+
'@module-federation/modern-js': patch
7+
'@module-federation/runtime': patch
8+
'@module-federation/node': patch
9+
---
10+
11+
chore: rename FederationHost to ModuleFederation

apps/manifest-demo/webpack-host/runtimePlugin.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { FederationRuntimePlugin } from '@module-federation/runtime/types';
1+
import { ModuleFederationRuntimePlugin } from '@module-federation/runtime/types';
22

3-
export default function (): FederationRuntimePlugin {
3+
export default function (): ModuleFederationRuntimePlugin {
44
return {
55
name: 'custom-plugin-build',
66
beforeInit(args) {

apps/manifest-demo/webpack-host/src/runtimePlugin.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { FederationRuntimePlugin } from '@module-federation/runtime/types';
2-
export default function (): FederationRuntimePlugin {
1+
import { ModuleFederationRuntimePlugin } from '@module-federation/runtime/types';
2+
export default function (): ModuleFederationRuntimePlugin {
33
return {
44
name: 'custom-plugin',
55
beforeInit(args) {

apps/node-host/runtimePlugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { FederationRuntimePlugin } from '@module-federation/runtime/types';
1+
import { ModuleFederationRuntimePlugin } from '@module-federation/runtime/types';
22

33
export default function () {
44
return {

apps/router-demo/router-host-2000/src/App.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ import './App.css';
1515
import BridgeReactPlugin from '@module-federation/bridge-react/plugin';
1616
import { ErrorBoundary } from 'react-error-boundary';
1717
import Remote1AppNew from 'remote1/app';
18-
import type { FederationRuntimePlugin } from '@module-federation/enhanced/runtime';
18+
import type { ModuleFederationRuntimePlugin } from '@module-federation/enhanced/runtime';
1919
import { Spin } from 'antd';
2020

21-
const fallbackPlugin: () => FederationRuntimePlugin = function () {
21+
const fallbackPlugin: () => ModuleFederationRuntimePlugin = function () {
2222
return {
2323
name: 'fallback-plugin',
2424
errorLoadRemote(args) {

apps/router-demo/router-host-2000/src/runtime-plugin/error-handling/lifecycle-based.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* 2. Entry File Loading (afterResolve): Attempts to load from a backup service
1010
*/
1111

12-
import type { FederationRuntimePlugin } from '@module-federation/enhanced/runtime';
12+
import type { ModuleFederationRuntimePlugin } from '@module-federation/enhanced/runtime';
1313

1414
interface LifecycleBasedConfig {
1515
backupEntryUrl?: string;
@@ -18,7 +18,7 @@ interface LifecycleBasedConfig {
1818

1919
export const createLifecycleBasedPlugin = (
2020
config: LifecycleBasedConfig = {},
21-
): FederationRuntimePlugin => {
21+
): ModuleFederationRuntimePlugin => {
2222
const {
2323
backupEntryUrl = 'http://localhost:2002/mf-manifest.json',
2424
errorMessage = 'Module loading failed, please try again later',

apps/router-demo/router-host-2000/src/runtime-plugin/error-handling/simple.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@
1212
* Use this when you don't need different handling strategies for different error types.
1313
*/
1414

15-
import type { FederationRuntimePlugin } from '@module-federation/enhanced/runtime';
15+
import type { ModuleFederationRuntimePlugin } from '@module-federation/enhanced/runtime';
1616

1717
interface SimpleConfig {
1818
errorMessage?: string;
1919
}
2020

2121
export const createSimplePlugin = (
2222
config: SimpleConfig = {},
23-
): FederationRuntimePlugin => {
23+
): ModuleFederationRuntimePlugin => {
2424
const { errorMessage = 'Module loading failed, please try again later' } =
2525
config;
2626

0 commit comments

Comments
 (0)