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
682
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-feat-node-support-1702930274548 to 0.0.0-feat-node-support-1703050615268

4

package.json
{
"name": "@module-federation/runtime",
"version": "0.0.0-feat-node-support-1702930274548",
"version": "0.0.0-feat-node-support-1703050615268",
"author": "zhouxiao <codingzx@gmail.com>",

@@ -37,3 +37,3 @@ "main": "./index.cjs.js",

"dependencies": {
"@module-federation/sdk": "0.0.0-feat-node-support-1702930274548",
"@module-federation/sdk": "0.0.0-feat-node-support-1703050615268",
"semver": "7.5.4"

@@ -40,0 +40,0 @@ },

'use strict';
function getBuilderId() {
//@ts-ignore
return typeof FEDERATION_BUILD_IDENTIFIER !== 'undefined' ? FEDERATION_BUILD_IDENTIFIER : '';

@@ -168,3 +167,3 @@ }

Global.__FEDERATION__.__DEBUG_CONSTRUCTOR__ = FederationConstructor;
Global.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__ = '0.0.0-feat-node-support-1702930274548';
Global.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__ = '0.0.0-feat-node-support-1703050615268';
}

@@ -712,5 +711,3 @@ }

// TODO: Implement strictVersion for alignment with module federation.
function getRegisteredShare(instanceName, pkgName, shareInfo, resolveShareHook) {
const globalShares = Global.__FEDERATION__.__SHARE__;
const localShareScopeMap = globalShares[instanceName];
function getRegisteredShare(localShareScopeMap, pkgName, shareInfo, resolveShare) {
if (!localShareScopeMap) {

@@ -754,3 +751,3 @@ return;

};
const resolveShared = resolveShareHook.emit(params) || params;
const resolveShared = resolveShare.emit(params) || params;
return resolveShared.resolver();

@@ -757,0 +754,0 @@ }

function getBuilderId() {
//@ts-ignore
return typeof FEDERATION_BUILD_IDENTIFIER !== 'undefined' ? FEDERATION_BUILD_IDENTIFIER : '';

@@ -166,3 +165,3 @@ }

Global.__FEDERATION__.__DEBUG_CONSTRUCTOR__ = FederationConstructor;
Global.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__ = '0.0.0-feat-node-support-1702930274548';
Global.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__ = '0.0.0-feat-node-support-1703050615268';
}

@@ -710,5 +709,3 @@ }

// TODO: Implement strictVersion for alignment with module federation.
function getRegisteredShare(instanceName, pkgName, shareInfo, resolveShareHook) {
const globalShares = Global.__FEDERATION__.__SHARE__;
const localShareScopeMap = globalShares[instanceName];
function getRegisteredShare(localShareScopeMap, pkgName, shareInfo, resolveShare) {
if (!localShareScopeMap) {

@@ -752,3 +749,3 @@ return;

};
const resolveShared = resolveShareHook.emit(params) || params;
const resolveShared = resolveShare.emit(params) || params;
return resolveShared.resolver();

@@ -755,0 +752,0 @@ }

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

loadShare: AsyncHook<[FederationHost, string, ShareInfos], false | void | Promise<false | void>>;
resolveShare: SyncHook<[{
resolveShare: SyncWaterfallHook<{
shareScopeMap: ShareScopeMap;

@@ -71,4 +71,4 @@ scope: string;

GlobalFederation: Federation;
resolver: () => Shared;
}], void>;
resolver: () => Shared | undefined;
}>;
beforePreloadRemote: AsyncHook<{

@@ -75,0 +75,0 @@ preloadOps: Array<PreloadRemoteArgs>;

import { FederationHost } from '../core';
import { RemoteEntryExports, Options, Remote, ShareInfos, RemoteInfo } from '../type';
import { RemoteEntryExports, Options, Remote, ShareInfos, RemoteInfo, ShareScopeMap } from '../type';
export type ModuleOptions = ConstructorParameters<typeof Module>[0];

@@ -13,3 +13,4 @@ type HostInfo = Remote;

loaderHook: FederationHost['loaderHook'];
constructor({ hostInfo, remoteInfo, shared, loaderHook, }: {
shareScopeMap: ShareScopeMap;
constructor({ hostInfo, remoteInfo, shared, loaderHook, shareScopeMap, }: {
hostInfo: HostInfo;

@@ -20,2 +21,3 @@ remoteInfo: RemoteInfo;

loaderHook: FederationHost['loaderHook'];
shareScopeMap: ShareScopeMap;
});

@@ -22,0 +24,0 @@ getEntry(): Promise<RemoteEntryExports>;

@@ -1,2 +0,4 @@

import { GlobalShareScopeMap, Shared, ShareArgs, ShareInfos } from '../type';
import { Federation } from '../global';
import { GlobalShareScopeMap, Shared, ShareArgs, ShareInfos, ShareScopeMap } from '../type';
import { SyncWaterfallHook } from './hooks';
export declare function formatShare(shareArgs: ShareArgs, from: string): Shared;

@@ -6,3 +8,10 @@ export declare function formatShareConfigs(shareArgs: {

}, from: string): ShareInfos;
export declare function getRegisteredShare(instanceName: string, pkgName: string, shareInfo: ShareInfos[keyof ShareInfos], resolveShareHook: any): Shared | void;
export declare function getRegisteredShare(localShareScopeMap: ShareScopeMap, pkgName: string, shareInfo: ShareInfos[keyof ShareInfos], resolveShare: SyncWaterfallHook<{
shareScopeMap: ShareScopeMap;
scope: string;
pkgName: string;
version: string;
GlobalFederation: Federation;
resolver: () => Shared | undefined;
}>): Shared | void;
export declare function getGlobalShareScope(): GlobalShareScopeMap;

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

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

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