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
669
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-canary-1702191364859 to 0.0.0-canary-1702278361811

src/attachShareScopeMap.d.ts

19

index.cjs.js

@@ -25,11 +25,8 @@ 'use strict';

function proxyShareScopeMap(webpackRequire) {
if (!webpackRequire.S || webpackRequire.federation.hasProxyShareScopeMap || !webpackRequire.federation.initOptions) {
function attachShareScopeMap(webpackRequire) {
if (!webpackRequire.S || webpackRequire.federation.hasAttachShareScopeMap || !webpackRequire.federation.instance || !webpackRequire.federation.instance.shareScopeMap) {
return;
}
if (!webpackRequire.g["__FEDERATION__"].__SHARE__[webpackRequire.federation.initOptions.name]) {
return;
}
webpackRequire.S = webpackRequire.g["__FEDERATION__"].__SHARE__[webpackRequire.federation.initOptions.name];
webpackRequire.federation.hasProxyShareScopeMap = true;
webpackRequire.S = webpackRequire.federation.instance.shareScopeMap;
webpackRequire.federation.hasAttachShareScopeMap = true;
}

@@ -85,3 +82,3 @@

var chunkId = options.chunkId, promises = options.promises, chunkMapping = options.chunkMapping, idToExternalAndNameMapping = options.idToExternalAndNameMapping, webpackRequire = options.webpackRequire, idToRemoteMap = options.idToRemoteMap;
proxyShareScopeMap(webpackRequire);
attachShareScopeMap(webpackRequire);
if (webpackRequire.o(chunkMapping, chunkId)) {

@@ -188,3 +185,3 @@ chunkMapping[chunkId].forEach(function(id) {

var chunkId = options.chunkId, promises = options.promises, chunkMapping = options.chunkMapping, installedModules = options.installedModules, moduleToHandlerMapping = options.moduleToHandlerMapping, webpackRequire = options.webpackRequire;
proxyShareScopeMap(webpackRequire);
attachShareScopeMap(webpackRequire);
if (webpackRequire.o(chunkMapping, chunkId)) {

@@ -271,3 +268,3 @@ chunkMapping[chunkId].forEach(function(id) {

var promises = webpackRequire.federation.instance.initializeSharing(shareScopeName);
proxyShareScopeMap(webpackRequire);
attachShareScopeMap(webpackRequire);
var bundlerRuntimeRemotesOptions = webpackRequire.federation.bundlerRuntimeOptions.remotes;

@@ -339,3 +336,3 @@ if (bundlerRuntimeRemotesOptions) {

},
proxyShareScopeMap: proxyShareScopeMap,
attachShareScopeMap: attachShareScopeMap,
bundlerRuntimeOptions: {}

@@ -342,0 +339,0 @@ };

import * as runtime from '@module-federation/runtime';
function proxyShareScopeMap(webpackRequire) {
if (!webpackRequire.S || webpackRequire.federation.hasProxyShareScopeMap || !webpackRequire.federation.initOptions) {
function attachShareScopeMap(webpackRequire) {
if (!webpackRequire.S || webpackRequire.federation.hasAttachShareScopeMap || !webpackRequire.federation.instance || !webpackRequire.federation.instance.shareScopeMap) {
return;
}
if (!webpackRequire.g["__FEDERATION__"].__SHARE__[webpackRequire.federation.initOptions.name]) {
return;
}
webpackRequire.S = webpackRequire.g["__FEDERATION__"].__SHARE__[webpackRequire.federation.initOptions.name];
webpackRequire.federation.hasProxyShareScopeMap = true;
webpackRequire.S = webpackRequire.federation.instance.shareScopeMap;
webpackRequire.federation.hasAttachShareScopeMap = true;
}

@@ -62,3 +59,3 @@

var chunkId = options.chunkId, promises = options.promises, chunkMapping = options.chunkMapping, idToExternalAndNameMapping = options.idToExternalAndNameMapping, webpackRequire = options.webpackRequire, idToRemoteMap = options.idToRemoteMap;
proxyShareScopeMap(webpackRequire);
attachShareScopeMap(webpackRequire);
if (webpackRequire.o(chunkMapping, chunkId)) {

@@ -165,3 +162,3 @@ chunkMapping[chunkId].forEach(function(id) {

var chunkId = options.chunkId, promises = options.promises, chunkMapping = options.chunkMapping, installedModules = options.installedModules, moduleToHandlerMapping = options.moduleToHandlerMapping, webpackRequire = options.webpackRequire;
proxyShareScopeMap(webpackRequire);
attachShareScopeMap(webpackRequire);
if (webpackRequire.o(chunkMapping, chunkId)) {

@@ -248,3 +245,3 @@ chunkMapping[chunkId].forEach(function(id) {

var promises = webpackRequire.federation.instance.initializeSharing(shareScopeName);
proxyShareScopeMap(webpackRequire);
attachShareScopeMap(webpackRequire);
var bundlerRuntimeRemotesOptions = webpackRequire.federation.bundlerRuntimeOptions.remotes;

@@ -316,3 +313,3 @@ if (bundlerRuntimeRemotesOptions) {

},
proxyShareScopeMap: proxyShareScopeMap,
attachShareScopeMap: attachShareScopeMap,
bundlerRuntimeOptions: {}

@@ -319,0 +316,0 @@ };

{
"public": true,
"name": "@module-federation/webpack-bundler-runtime",
"version": "0.0.0-canary-1702191364859",
"version": "0.0.0-canary-1702278361811",
"license": "MIT",

@@ -19,5 +19,5 @@ "description": "Module Federation Runtime for webpack",

"dependencies": {
"@module-federation/runtime": "0.0.0-canary-1702191364859"
"@module-federation/runtime": "0.0.0-canary-1702278361811"
},
"peerDependencies": {}
}
import * as runtime from '@module-federation/runtime';
import { initializeSharing } from './initializeSharing';
import { proxyShareScopeMap } from './proxyShareScopeMap';
import { attachShareScopeMap } from './attachShareScopeMap';
type ExcludeUndefined<T> = T extends undefined ? never : T;

@@ -92,5 +92,5 @@ type NonUndefined<T = Shared> = ExcludeUndefined<T>;

};
proxyShareScopeMap?: typeof proxyShareScopeMap;
hasProxyShareScopeMap?: boolean;
attachShareScopeMap?: typeof attachShareScopeMap;
hasAttachShareScopeMap?: boolean;
}
export {};
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