Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@module-federation/runtime

Package Overview
Dependencies
Maintainers
8
Versions
654
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@module-federation/runtime - npm Package Compare versions

Comparing version 0.0.0-next-20241111073908 to 0.0.0-next-20241112032845

3

dist/embedded.cjs.js

@@ -91,5 +91,2 @@ 'use strict';

}
get bridgeHook() {
return this._getInstance().bridgeHook;
}
initOptions(...args) {

@@ -96,0 +93,0 @@ return this._getInstance().initOptions(...args);

2

dist/package.json
{
"name": "@module-federation/runtime",
"version": "0.7.0",
"version": "0.7.2",
"author": "zhouxiao <codingzx@gmail.com>",

@@ -5,0 +5,0 @@ "main": "./index.cjs.js",

@@ -92,16 +92,2 @@ 'use strict';

}
const processModuleAlias = (name, subPath)=>{
// @host/ ./button -> @host/button
let moduleName;
if (name.endsWith('/')) {
moduleName = name.slice(0, -1);
} else {
moduleName = name;
}
if (subPath.startsWith('.')) {
subPath = subPath.slice(1);
}
moduleName = moduleName + subPath;
return moduleName;
};

@@ -173,2 +159,5 @@ const CurrentGlobal = typeof globalThis === 'object' ? globalThis : window;

CurrentGlobal.__FEDERATION__.__MANIFEST_LOADING__ = {};
Object.keys(globalLoading).forEach((key)=>{
delete globalLoading[key];
});
}

@@ -199,3 +188,3 @@ function getGlobalFederationInstance(name, version) {

CurrentGlobal.__FEDERATION__.__DEBUG_CONSTRUCTOR__ = FederationConstructor;
CurrentGlobal.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__ = "0.7.0";
CurrentGlobal.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__ = "0.7.2";
}

@@ -930,3 +919,2 @@ }

exports.nativeGlobal = nativeGlobal;
exports.processModuleAlias = processModuleAlias;
exports.registerGlobalPlugins = registerGlobalPlugins;

@@ -933,0 +921,0 @@ exports.resetFederationGlobalInfo = resetFederationGlobalInfo;

@@ -69,8 +69,2 @@ import type { CreateScriptHookReturn, ModuleInfo } from '@module-federation/sdk';

}>;
bridgeHook: PluginSystem<{
beforeBridgeRender: SyncHook<[Record<string, any>], void | Record<string, any>>;
afterBridgeRender: SyncHook<[Record<string, any>], void | Record<string, any>>;
beforeBridgeDestroy: SyncHook<[Record<string, any>], void | Record<string, any>>;
afterBridgeDestroy: SyncHook<[Record<string, any>], void | Record<string, any>>;
}>;
constructor(userOptions: UserOptions);

@@ -96,2 +90,3 @@ initOptions(userOptions: UserOptions): Options;

from: CallFrom;
shareScope?: string;
}): Promise<T | null>;

@@ -98,0 +93,0 @@ preloadRemote(preloadOptions: Array<PreloadRemoteArgs>): Promise<void>;

@@ -81,8 +81,2 @@ import type * as IndexModule from './index';

}>;
get bridgeHook(): import("./utils/hooks").PluginSystem<{
beforeBridgeRender: import("./utils/hooks").SyncHook<[Record<string, any>], void | Record<string, any>>;
afterBridgeRender: import("./utils/hooks").SyncHook<[Record<string, any>], void | Record<string, any>>;
beforeBridgeDestroy: import("./utils/hooks").SyncHook<[Record<string, any>], void | Record<string, any>>;
afterBridgeDestroy: import("./utils/hooks").SyncHook<[Record<string, any>], void | Record<string, any>>;
}>;
initOptions(...args: Parameters<IndexModule.FederationHost['initOptions']>): import("./type").Options;

@@ -89,0 +83,0 @@ loadShare<T>(...args: Parameters<IndexModule.FederationHost['loadShare']>): Promise<false | (() => T | undefined)>;

@@ -35,7 +35,2 @@ import { GlobalModuleInfo, Manifest, ModuleInfo } from '@module-federation/sdk';

}>;
afterLoadSnapshot: AsyncWaterfallHook<{
options: Options;
moduleInfo: Remote;
remoteSnapshot: ModuleInfo;
}>;
}>;

@@ -42,0 +37,0 @@ loaderHook: FederationHost['loaderHook'];

@@ -93,2 +93,3 @@ import { ModuleInfo, GlobalModuleInfo } from '@module-federation/sdk';

from: CallFrom;
shareScope?: string;
}): Promise<T | null>;

@@ -95,0 +96,0 @@ preloadRemote(preloadOptions: Array<PreloadRemoteArgs>): Promise<void>;

@@ -7,3 +7,3 @@ import type { RemoteWithEntry, RemoteWithVersion, Module, RemoteEntryType } from '@module-federation/sdk';

};
export interface RemoteInfoCommon {
interface RemoteInfoCommon {
alias?: string;

@@ -10,0 +10,0 @@ shareScope?: string;

@@ -18,6 +18,2 @@ import { FederationHost } from '../core';

}>;
type ModuleBridgeLifeCycle = Module['host']['bridgeHook']['lifecycle'];
type ModuleBridgeLifeCycleCyclePartial = Partial<{
[k in keyof ModuleBridgeLifeCycle]: Parameters<ModuleBridgeLifeCycle[k]['on']>[0];
}>;
type SharedLifeCycle = SharedHandler['hooks']['lifecycle'];

@@ -31,3 +27,3 @@ type SharedLifeCycleCyclePartial = Partial<{

}>;
export type FederationRuntimePlugin = CoreLifeCyclePartial & SnapshotLifeCycleCyclePartial & SharedLifeCycleCyclePartial & RemoteLifeCycleCyclePartial & ModuleLifeCycleCyclePartial & ModuleBridgeLifeCycleCyclePartial & {
export type FederationRuntimePlugin = CoreLifeCyclePartial & SnapshotLifeCycleCyclePartial & SharedLifeCycleCyclePartial & RemoteLifeCycleCyclePartial & ModuleLifeCycleCyclePartial & {
name: string;

@@ -34,0 +30,0 @@ version?: string;

import { FederationHost } from '../core';
import { UserOptions } from '../type';
import { Module } from '../module';
export declare function registerPlugins(plugins: UserOptions['plugins'], hookInstances: Array<FederationHost['hooks'] | FederationHost['snapshotHandler']['hooks'] | FederationHost['sharedHandler']['hooks'] | FederationHost['remoteHandler']['hooks'] | Module['host']['loaderHook'] | Module['host']['bridgeHook']>): import("../type").FederationRuntimePlugin[] | undefined;
export declare function registerPlugins(plugins: UserOptions['plugins'], hookInstances: Array<FederationHost['hooks'] | FederationHost['snapshotHandler']['hooks'] | FederationHost['sharedHandler']['hooks'] | FederationHost['remoteHandler']['hooks'] | Module['host']['loaderHook']>): import("../type").FederationRuntimePlugin[] | undefined;

@@ -18,2 +18,1 @@ import { RemoteWithEntry, ModuleInfo, RemoteEntryType } from '@module-federation/sdk';

};
export declare const processModuleAlias: (name: string, subPath: string) => string;
{
"name": "@module-federation/runtime",
"version": "0.0.0-next-20241111073908",
"version": "0.0.0-next-20241112032845",
"author": "zhouxiao <codingzx@gmail.com>",

@@ -53,5 +53,5 @@ "main": "./dist/index.cjs.js",

"dependencies": {
"@module-federation/sdk": "0.0.0-next-20241111073908",
"@module-federation/error-codes": "0.0.0-next-20241111073908"
"@module-federation/sdk": "0.0.0-next-20241112032845",
"@module-federation/error-codes": "0.0.0-next-20241112032845"
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc