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
616
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-20240909073915 to 0.0.0-next-20240909083238

1

dist/helpers.cjs.js
'use strict';
var share = require('./share.cjs.js');
require('./polyfills.cjs.js');
require('@module-federation/sdk');

@@ -6,0 +5,0 @@

import { o as getRegisteredShare, y as getGlobalShareScope, G as Global, I as nativeGlobal, J as resetFederationGlobalInfo, C as getGlobalFederationInstance, F as setGlobalFederationInstance, E as getGlobalFederationConstructor, B as setGlobalFederationConstructor, m as getInfoWithoutType, u as getGlobalSnapshot, K as getTargetSnapshotInfoByModuleInfo, q as getGlobalSnapshotInfoByModuleInfo, t as setGlobalSnapshotInfoByModuleInfo, r as addGlobalSnapshot, c as getRemoteEntryExports, H as registerGlobalPlugins, g as getGlobalHostPlugins, n as getPreloaded, s as setPreloaded } from './share.esm.js';
import './polyfills.esm.js';
import '@module-federation/sdk';

@@ -4,0 +3,0 @@

{
"name": "@module-federation/runtime",
"version": "0.6.1",
"version": "0.6.0",
"author": "zhouxiao <codingzx@gmail.com>",

@@ -32,7 +32,2 @@ "main": "./index.cjs.js",

},
"./embedded": {
"types": "./dist/embedded.cjs.d.ts",
"import": "./dist/embedded.esm.js",
"require": "./dist/embedded.cjs.js"
},
"./*": "./*"

@@ -39,0 +34,0 @@ },

53

dist/share.cjs.js
'use strict';
var polyfills = require('./polyfills.cjs.js');
var sdk = require('@module-federation/sdk');

@@ -91,2 +90,28 @@

function _extends$1() {
_extends$1 = Object.assign || function(target) {
for(var i = 1; i < arguments.length; i++){
var source = arguments[i];
for(var key in source){
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}
return target;
};
return _extends$1.apply(this, arguments);
}
function _object_without_properties_loose(source, excluded) {
if (source == null) return {};
var target = {};
var sourceKeys = Object.keys(source);
var key, i;
for(i = 0; i < sourceKeys.length; i++){
key = sourceKeys[i];
if (excluded.indexOf(key) >= 0) continue;
target[key] = source[key];
}
return target;
}
const nativeGlobal = (()=>{

@@ -179,3 +204,3 @@ try {

globalThis.__FEDERATION__.__DEBUG_CONSTRUCTOR__ = FederationConstructor;
globalThis.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__ = "0.6.1";
globalThis.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__ = "0.6.0";
}

@@ -228,3 +253,3 @@ }

if ('version' in moduleInfo && moduleInfo['version']) {
const { version } = moduleInfo, resModuleInfo = polyfills._object_without_properties_loose(moduleInfo, [
const { version } = moduleInfo, resModuleInfo = _object_without_properties_loose(moduleInfo, [
"version"

@@ -247,3 +272,3 @@ ]);

const addGlobalSnapshot = (moduleInfos)=>{
nativeGlobal.__FEDERATION__.moduleInfo = polyfills._extends({}, nativeGlobal.__FEDERATION__.moduleInfo, moduleInfos);
nativeGlobal.__FEDERATION__.moduleInfo = _extends$1({}, nativeGlobal.__FEDERATION__.moduleInfo, moduleInfos);
return ()=>{

@@ -641,2 +666,16 @@ const keys = Object.keys(moduleInfos);

function _extends() {
_extends = Object.assign || function(target) {
for(var i = 1; i < arguments.length; i++){
var source = arguments[i];
for(var key in source){
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}
return target;
};
return _extends.apply(this, arguments);
}
function formatShare(shareArgs, from, name, shareStrategy) {

@@ -658,3 +697,3 @@ let get;

var _shareArgs_version, _shareArgs_scope, _shareArgs_strategy;
return polyfills._extends({
return _extends({
deps: [],

@@ -665,3 +704,3 @@ useIn: [],

}, shareArgs, {
shareConfig: polyfills._extends({
shareConfig: _extends({
requiredVersion: `^${shareArgs.version}`,

@@ -692,3 +731,3 @@ singleton: false,

}, {});
const shared = polyfills._extends({}, globalOptions.shared);
const shared = _extends({}, globalOptions.shared);
Object.keys(shareInfos).forEach((shareKey)=>{

@@ -695,0 +734,0 @@ if (!shared[shareKey]) {

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

import { a as _object_without_properties_loose, _ as _extends } from './polyfills.esm.js';
import { isBrowserEnv, isDebugMode } from '@module-federation/sdk';

@@ -89,2 +88,28 @@

function _extends$1() {
_extends$1 = Object.assign || function(target) {
for(var i = 1; i < arguments.length; i++){
var source = arguments[i];
for(var key in source){
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}
return target;
};
return _extends$1.apply(this, arguments);
}
function _object_without_properties_loose(source, excluded) {
if (source == null) return {};
var target = {};
var sourceKeys = Object.keys(source);
var key, i;
for(i = 0; i < sourceKeys.length; i++){
key = sourceKeys[i];
if (excluded.indexOf(key) >= 0) continue;
target[key] = source[key];
}
return target;
}
const nativeGlobal = (()=>{

@@ -177,3 +202,3 @@ try {

globalThis.__FEDERATION__.__DEBUG_CONSTRUCTOR__ = FederationConstructor;
globalThis.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__ = "0.6.1";
globalThis.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__ = "0.6.0";
}

@@ -244,3 +269,3 @@ }

const addGlobalSnapshot = (moduleInfos)=>{
nativeGlobal.__FEDERATION__.moduleInfo = _extends({}, nativeGlobal.__FEDERATION__.moduleInfo, moduleInfos);
nativeGlobal.__FEDERATION__.moduleInfo = _extends$1({}, nativeGlobal.__FEDERATION__.moduleInfo, moduleInfos);
return ()=>{

@@ -638,2 +663,16 @@ const keys = Object.keys(moduleInfos);

function _extends() {
_extends = Object.assign || function(target) {
for(var i = 1; i < arguments.length; i++){
var source = arguments[i];
for(var key in source){
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}
return target;
};
return _extends.apply(this, arguments);
}
function formatShare(shareArgs, from, name, shareStrategy) {

@@ -640,0 +679,0 @@ let get;

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

import type { CreateScriptHookReturn, ModuleInfo } from '@module-federation/sdk';
import type { CreateScriptHookReturn } from '@module-federation/sdk';
import { Options, PreloadRemoteArgs, RemoteEntryExports, Remote, Shared, ShareInfos, UserOptions, RemoteInfo, ShareScopeMap, InitScope, RemoteEntryInitOptions, CallFrom } from './type';

@@ -35,4 +35,2 @@ import { Module } from './module';

origin: FederationHost;
id: string;
remoteSnapshot?: ModuleInfo;
}>;

@@ -39,0 +37,0 @@ }>;

@@ -7,3 +7,2 @@ import { FederationHost } from './core';

export { loadScript, loadScriptNode } from '@module-federation/sdk';
export { Module } from './module';
export type { Federation } from './global';

@@ -10,0 +9,0 @@ export type { FederationRuntimePlugin };

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

import { ModuleInfo } from '@module-federation/sdk';
import { FederationHost } from '../core';

@@ -18,5 +17,5 @@ import { RemoteEntryExports, RemoteInfo } from '../type';

loadFactory?: boolean;
}, remoteSnapshot?: ModuleInfo): Promise<any>;
}): Promise<any>;
private wraperFactory;
}
export { Module };

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

}], void>;
handlePreloadModule: SyncHook<[{
handlePreloadModule: SyncHook<{
id: string;

@@ -55,3 +55,3 @@ name: string;

origin: FederationHost;
}], void>;
}, void>;
errorLoadRemote: AsyncHook<[{

@@ -58,0 +58,0 @@ id: string;

@@ -1,3 +0,2 @@

export { isBrowserEnv, isDebugMode } from '@module-federation/sdk';
export declare function isDevelopmentMode(): boolean;
export declare function getBuilderId(): string;
{
"name": "@module-federation/runtime",
"version": "0.0.0-next-20240909073915",
"version": "0.0.0-next-20240909083238",
"author": "zhouxiao <codingzx@gmail.com>",

@@ -32,7 +32,2 @@ "main": "./dist/index.cjs.js",

},
"./embedded": {
"types": "./dist/embedded.cjs.d.ts",
"import": "./dist/embedded.esm.js",
"require": "./dist/embedded.cjs.js"
},
"./*": "./*"

@@ -54,4 +49,4 @@ },

"dependencies": {
"@module-federation/sdk": "0.0.0-next-20240909073915"
"@module-federation/sdk": "0.0.0-next-20240909083238"
}
}

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