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

@module-federation/webpack-bundler-runtime

Package Overview
Dependencies
Maintainers
8
Versions
709
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@module-federation/webpack-bundler-runtime - npm Package Compare versions

Comparing version 0.0.0-next-20240104103738 to 0.0.0-next-20240105113752

41

dist/index.cjs.js

@@ -257,3 +257,34 @@ 'use strict';

function isLegacyHost(shareScope) {
function _define_property(obj, key, value) {
if (key in obj) {
Object.defineProperty(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true
});
} else {
obj[key] = value;
}
return obj;
}
function _object_spread(target) {
for(var i = 1; i < arguments.length; i++){
var source = arguments[i] != null ? arguments[i] : {};
var ownKeys = Object.keys(source);
if (typeof Object.getOwnPropertySymbols === "function") {
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
}));
}
ownKeys.forEach(function(key) {
_define_property(target, key, source[key]);
});
}
return target;
}
function isLegacyHost(shareScope, remoteEntryInitOptions) {
if (remoteEntryInitOptions && typeof remoteEntryInitOptions === "object" && remoteEntryInitOptions.hostId) {
return false;
}
if ("version" in shareScope && typeof shareScope["version"] !== "object") {

@@ -268,11 +299,11 @@ return true;

function initContainerEntry(options) {
var webpackRequire = options.webpackRequire, shareScope = options.shareScope, initScope = options.initScope, shareScopeKey = options.shareScopeKey;
var webpackRequire = options.webpackRequire, shareScope = options.shareScope, initScope = options.initScope, shareScopeKey = options.shareScopeKey, remoteEntryInitOptions = options.remoteEntryInitOptions;
if (!webpackRequire.S) return;
if (!webpackRequire.federation || !webpackRequire.federation.instance || !webpackRequire.federation.initOptions) return;
var name = shareScopeKey || "default";
webpackRequire.federation.instance.initOptions({
webpackRequire.federation.instance.initOptions(_object_spread({
name: webpackRequire.federation.initOptions.name,
remotes: []
});
if (isLegacyHost(shareScope)) {
}, remoteEntryInitOptions));
if (isLegacyHost(shareScope, remoteEntryInitOptions)) {
var prevShareScope = globalThis.__FEDERATION__.__SHARE__["default"];

@@ -279,0 +310,0 @@ if (prevShareScope) {

@@ -235,3 +235,34 @@ import * as runtime from '@module-federation/runtime';

function isLegacyHost(shareScope) {
function _define_property(obj, key, value) {
if (key in obj) {
Object.defineProperty(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true
});
} else {
obj[key] = value;
}
return obj;
}
function _object_spread(target) {
for(var i = 1; i < arguments.length; i++){
var source = arguments[i] != null ? arguments[i] : {};
var ownKeys = Object.keys(source);
if (typeof Object.getOwnPropertySymbols === "function") {
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
}));
}
ownKeys.forEach(function(key) {
_define_property(target, key, source[key]);
});
}
return target;
}
function isLegacyHost(shareScope, remoteEntryInitOptions) {
if (remoteEntryInitOptions && typeof remoteEntryInitOptions === "object" && remoteEntryInitOptions.hostId) {
return false;
}
if ("version" in shareScope && typeof shareScope["version"] !== "object") {

@@ -246,11 +277,11 @@ return true;

function initContainerEntry(options) {
var webpackRequire = options.webpackRequire, shareScope = options.shareScope, initScope = options.initScope, shareScopeKey = options.shareScopeKey;
var webpackRequire = options.webpackRequire, shareScope = options.shareScope, initScope = options.initScope, shareScopeKey = options.shareScopeKey, remoteEntryInitOptions = options.remoteEntryInitOptions;
if (!webpackRequire.S) return;
if (!webpackRequire.federation || !webpackRequire.federation.instance || !webpackRequire.federation.initOptions) return;
var name = shareScopeKey || "default";
webpackRequire.federation.instance.initOptions({
webpackRequire.federation.instance.initOptions(_object_spread({
name: webpackRequire.federation.initOptions.name,
remotes: []
});
if (isLegacyHost(shareScope)) {
}, remoteEntryInitOptions));
if (isLegacyHost(shareScope, remoteEntryInitOptions)) {
var prevShareScope = globalThis.__FEDERATION__.__SHARE__["default"];

@@ -257,0 +288,0 @@ if (prevShareScope) {

import * as runtime from '@module-federation/runtime';
import type { RemoteEntryInitOptions } from '@module-federation/runtime/types';
import { initializeSharing } from './initializeSharing';

@@ -89,2 +90,3 @@ import { attachShareScopeMap } from './attachShareScopeMap';

webpackRequire: WebpackRequire;
remoteEntryInitOptions?: RemoteEntryInitOptions;
initScope?: InitializeSharingOptions['initScope'];

@@ -91,0 +93,0 @@ }

6

package.json
{
"public": true,
"name": "@module-federation/webpack-bundler-runtime",
"version": "0.0.0-next-20240104103738",
"version": "0.0.0-next-20240105113752",
"license": "MIT",

@@ -23,4 +23,4 @@ "description": "Module Federation Runtime for webpack",

"dependencies": {
"@module-federation/runtime": "0.0.0-next-20240104103738",
"@module-federation/sdk": "0.0.0-next-20240104103738"
"@module-federation/runtime": "0.0.0-next-20240105113752",
"@module-federation/sdk": "0.0.0-next-20240105113752"
},

@@ -27,0 +27,0 @@ "exports": {

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