@module-federation/sdk 2.9.3 → 2.9.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,67 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ let node_fs = require("node:fs");
3
+ let node_module = require("node:module");
2
4
  let node_path = require("node:path");
5
+ let node_url = require("node:url");
3
6
 
4
7
  //#region src/normalize-webpack-path.ts
8
+ const webpackInternalPaths = {
9
+ "webpack/lib/Module": "webpack/lib/module/Module",
10
+ "webpack/lib/ModuleFactory": "webpack/lib/module/ModuleFactory",
11
+ "webpack/lib/NormalModuleFactory": "webpack/lib/module/NormalModuleFactory",
12
+ "webpack/lib/ExternalModule": "webpack/lib/externals/ExternalModule",
13
+ "webpack/lib/RuntimeModule": "webpack/lib/runtime/RuntimeModule",
14
+ "webpack/lib/RuntimeGlobals": "webpack/lib/runtime/RuntimeGlobals",
15
+ "webpack/lib/RuntimeTemplate": "webpack/lib/template/RuntimeTemplate",
16
+ "webpack/lib/ResolverFactory": "webpack/lib/resolve/ResolverFactory",
17
+ "webpack/lib/ChunkGraph": "webpack/lib/graph/ChunkGraph",
18
+ "webpack/lib/HotUpdateChunk": "webpack/lib/graph/HotUpdateChunk",
19
+ "webpack/lib/dependencies/EntryDependency": "webpack/lib/entry/EntryDependency",
20
+ "webpack/lib/dependencies/ModuleDependency": "webpack/lib/dependencies/core/ModuleDependency",
21
+ "webpack/lib/dependencies/StaticExportsDependency": "webpack/lib/dependencies/core/StaticExportsDependency",
22
+ "webpack/lib/util/extractUrlAndGlobal": "webpack/lib/externals/extractUrlAndGlobal",
23
+ "webpack/lib/util/fs": "webpack/lib/fs/fs",
24
+ "webpack/lib/util/semver": "webpack/lib/sharing/semver"
25
+ };
26
+ let webpackRequire;
27
+ const callerWebpack = /* @__PURE__ */ new Map();
28
+ const createSdkWebpackRequire = () => (0, node_module.createRequire)(__filename);
29
+ const getWebpackRequire = () => {
30
+ if (process.env["FEDERATION_WEBPACK_PATH"]) {
31
+ webpackRequire ??= createSdkWebpackRequire();
32
+ return {
33
+ request: webpackRequire,
34
+ root: void 0
35
+ };
36
+ }
37
+ const prepareStackTrace = Error.prepareStackTrace;
38
+ const stackTraceLimit = Error.stackTraceLimit;
39
+ try {
40
+ Error.prepareStackTrace = (_error, callSites) => callSites;
41
+ Error.stackTraceLimit = Math.max(stackTraceLimit ?? 0, 10);
42
+ const error = /* @__PURE__ */ new Error();
43
+ Error.captureStackTrace(error, getWebpackRequire);
44
+ const callSites = error.stack;
45
+ const caller = (Array.isArray(callSites) ? callSites : []).slice(1).map((callSite) => callSite.getFileName()).find((fileName) => !!fileName && ((0, node_path.isAbsolute)(fileName) || fileName.startsWith("file:")));
46
+ const callerFile = caller?.startsWith("file:") ? (0, node_url.fileURLToPath)(caller) : caller || (0, node_path.resolve)(process.cwd(), "package.json");
47
+ const callerDir = (0, node_path.dirname)(callerFile);
48
+ let located = callerWebpack.get(callerDir);
49
+ if (!located) {
50
+ const request = (0, node_module.createRequire)(callerFile);
51
+ const webpackRoot = findWebpackRoot(request);
52
+ located = {
53
+ request,
54
+ root: webpackRoot ? (0, node_fs.realpathSync)(webpackRoot) + node_path.sep : void 0
55
+ };
56
+ callerWebpack.set(callerDir, located);
57
+ }
58
+ return located;
59
+ } finally {
60
+ Error.prepareStackTrace = prepareStackTrace;
61
+ Error.stackTraceLimit = stackTraceLimit;
62
+ }
63
+ };
5
64
  function getWebpackPath(compiler, options = { framework: "other" }) {
6
- const resolveWithContext = new Function("id", "options", "return typeof require === \"undefined\" ? \"\" : require.resolve(id, options)");
7
65
  try {
8
66
  compiler.webpack();
9
67
  return "";
@@ -13,13 +71,54 @@ function getWebpackPath(compiler, options = { framework: "other" }) {
13
71
  if (webpackPath.endsWith("webpack.js")) return webpackPath.replace("webpack.js", "index.js");
14
72
  return "";
15
73
  }
16
- return resolveWithContext("webpack", { paths: [webpackPath] });
74
+ if (!webpackPath) return "";
75
+ try {
76
+ const entry = (0, node_module.createRequire)(webpackPath).resolve("webpack");
77
+ return webpackPath.startsWith((0, node_path.resolve)(entry, "../..") + node_path.sep) ? entry : "";
78
+ } catch (error) {
79
+ if (error.code !== "MODULE_NOT_FOUND") throw error;
80
+ return "";
81
+ }
17
82
  }
18
83
  }
84
+ const findWebpackRoot = (request) => {
85
+ let entry;
86
+ try {
87
+ entry = request.resolve("webpack");
88
+ } catch (error) {
89
+ if (error.code === "MODULE_NOT_FOUND") return;
90
+ throw error;
91
+ }
92
+ for (let dir = (0, node_path.dirname)(entry); dir !== (0, node_path.dirname)(dir); dir = (0, node_path.dirname)(dir)) {
93
+ const manifest = (0, node_path.join)(dir, "package.json");
94
+ if ((0, node_fs.existsSync)(manifest) && JSON.parse((0, node_fs.readFileSync)(manifest, "utf8")).name === "webpack") return dir;
95
+ }
96
+ };
19
97
  const normalizeWebpackPath = (fullPath) => {
20
98
  if (fullPath === "webpack") return process.env["FEDERATION_WEBPACK_PATH"] || fullPath;
21
- if (process.env["FEDERATION_WEBPACK_PATH"]) return (0, node_path.resolve)(process.env["FEDERATION_WEBPACK_PATH"], fullPath.replace("webpack", "../../"));
22
- return fullPath;
99
+ const normalize = (path) => process.env["FEDERATION_WEBPACK_PATH"] ? (0, node_path.resolve)(process.env["FEDERATION_WEBPACK_PATH"], path.replace("webpack", "../../")) : path;
100
+ const candidate = normalize(fullPath);
101
+ const relocatedPath = webpackInternalPaths[fullPath];
102
+ if (!relocatedPath) return candidate;
103
+ const { request: requestWebpack, root } = getWebpackRequire();
104
+ const resolves = (request, inside) => {
105
+ try {
106
+ const resolved = requestWebpack.resolve(request);
107
+ return !inside || (0, node_fs.realpathSync)(resolved).startsWith(inside);
108
+ } catch (error) {
109
+ const { code } = error;
110
+ if (code === "MODULE_NOT_FOUND" || inside && code === "ERR_PACKAGE_PATH_NOT_EXPORTED") return false;
111
+ throw error;
112
+ }
113
+ };
114
+ if (root) {
115
+ if (resolves(fullPath, root)) return fullPath;
116
+ if (resolves(relocatedPath, root)) return relocatedPath;
117
+ }
118
+ if (resolves(candidate)) return candidate;
119
+ const fallback = normalize(relocatedPath);
120
+ requestWebpack.resolve(fallback);
121
+ return fallback;
23
122
  };
24
123
 
25
124
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"normalize-webpack-path.cjs","names":[],"sources":["../src/normalize-webpack-path.ts"],"sourcesContent":["import type webpack from 'webpack';\nimport { resolve } from 'node:path';\n\nexport function getWebpackPath(\n compiler: webpack.Compiler,\n options: { framework: 'nextjs' | 'other' } = { framework: 'other' },\n): string {\n const resolveWithContext = new Function(\n 'id',\n 'options',\n 'return typeof require === \"undefined\" ? \"\" : require.resolve(id, options)',\n ) as (id: string, options?: { paths?: string[] }) => string;\n\n try {\n // @ts-ignore just throw err\n compiler.webpack();\n return '';\n } catch (err) {\n const trace = (err as Error).stack?.split('\\n') || [];\n const webpackErrLocation =\n trace.find((item) => item.includes('at webpack')) || '';\n const webpackLocationWithDetail = webpackErrLocation\n .replace(/[^\\(\\)]+/, '')\n .slice(1, -1);\n const webpackPath = webpackLocationWithDetail\n .split(':')\n .slice(0, -2)\n .join(':');\n if (options?.framework === 'nextjs') {\n if (webpackPath.endsWith('webpack.js')) {\n return webpackPath.replace('webpack.js', 'index.js');\n }\n return '';\n }\n return resolveWithContext('webpack', { paths: [webpackPath] });\n }\n}\n\nexport const normalizeWebpackPath = (fullPath: string): string => {\n if (fullPath === 'webpack') {\n return process.env['FEDERATION_WEBPACK_PATH'] || fullPath;\n }\n\n if (process.env['FEDERATION_WEBPACK_PATH']) {\n return resolve(\n process.env['FEDERATION_WEBPACK_PATH'],\n fullPath.replace('webpack', '../../'),\n );\n }\n\n return fullPath;\n};\n"],"mappings":";;;;AAGA,SAAgB,eACd,UACA,UAA6C,EAAE,WAAW,SAAS,EAC3D;CACR,MAAM,qBAAqB,IAAI,SAC7B,MACA,WACA,gFACD;AAED,KAAI;AAEF,WAAS,SAAS;AAClB,SAAO;UACA,KAAK;EAOZ,MAAM,gBANS,IAAc,OAAO,MAAM,KAAK,IAAI,EAAE,EAE7C,MAAM,SAAS,KAAK,SAAS,aAAa,CAAC,IAAI,IAEpD,QAAQ,YAAY,GAAG,CACvB,MAAM,GAAG,GAAG,CAEZ,MAAM,IAAI,CACV,MAAM,GAAG,GAAG,CACZ,KAAK,IAAI;AACZ,MAAI,SAAS,cAAc,UAAU;AACnC,OAAI,YAAY,SAAS,aAAa,CACpC,QAAO,YAAY,QAAQ,cAAc,WAAW;AAEtD,UAAO;;AAET,SAAO,mBAAmB,WAAW,EAAE,OAAO,CAAC,YAAY,EAAE,CAAC;;;AAIlE,MAAa,wBAAwB,aAA6B;AAChE,KAAI,aAAa,UACf,QAAO,QAAQ,IAAI,8BAA8B;AAGnD,KAAI,QAAQ,IAAI,2BACd,+BACE,QAAQ,IAAI,4BACZ,SAAS,QAAQ,WAAW,SAAS,CACtC;AAGH,QAAO"}
1
+ {"version":3,"file":"normalize-webpack-path.cjs","names":["sep"],"sources":["../src/normalize-webpack-path.ts"],"sourcesContent":["import type webpack from 'webpack';\nimport { existsSync, readFileSync, realpathSync } from 'node:fs';\nimport { createRequire } from 'node:module';\nimport { dirname, isAbsolute, join, resolve, sep } from 'node:path';\nimport { fileURLToPath } from 'node:url';\n\n// Webpack 5.112 reorganized internals without retaining every old location.\n// Keep the old layout preferred for older installations and patched copies.\nconst webpackInternalPaths: Record<string, string> = {\n 'webpack/lib/Module': 'webpack/lib/module/Module',\n 'webpack/lib/ModuleFactory': 'webpack/lib/module/ModuleFactory',\n 'webpack/lib/NormalModuleFactory': 'webpack/lib/module/NormalModuleFactory',\n 'webpack/lib/ExternalModule': 'webpack/lib/externals/ExternalModule',\n 'webpack/lib/RuntimeModule': 'webpack/lib/runtime/RuntimeModule',\n 'webpack/lib/RuntimeGlobals': 'webpack/lib/runtime/RuntimeGlobals',\n 'webpack/lib/RuntimeTemplate': 'webpack/lib/template/RuntimeTemplate',\n 'webpack/lib/ResolverFactory': 'webpack/lib/resolve/ResolverFactory',\n 'webpack/lib/ChunkGraph': 'webpack/lib/graph/ChunkGraph',\n 'webpack/lib/HotUpdateChunk': 'webpack/lib/graph/HotUpdateChunk',\n 'webpack/lib/dependencies/EntryDependency':\n 'webpack/lib/entry/EntryDependency',\n 'webpack/lib/dependencies/ModuleDependency':\n 'webpack/lib/dependencies/core/ModuleDependency',\n 'webpack/lib/dependencies/StaticExportsDependency':\n 'webpack/lib/dependencies/core/StaticExportsDependency',\n 'webpack/lib/util/extractUrlAndGlobal':\n 'webpack/lib/externals/extractUrlAndGlobal',\n 'webpack/lib/util/fs': 'webpack/lib/fs/fs',\n 'webpack/lib/util/semver': 'webpack/lib/sharing/semver',\n};\n\nlet webpackRequire: NodeRequire | undefined;\nconst callerWebpack = new Map<\n string,\n { request: NodeRequire; root: string | undefined }\n>();\n\nconst createSdkWebpackRequire = (): NodeRequire =>\n createRequire(\n // This entrypoint is emitted as both CJS and ESM.\n // @ts-ignore import.meta is used only in the ESM output.\n process.env.IS_ESM_BUILD === 'true' ? import.meta.url : __filename,\n );\n\nconst getWebpackRequire = (): {\n request: NodeRequire;\n root: string | undefined;\n} => {\n if (process.env['FEDERATION_WEBPACK_PATH']) {\n webpackRequire ??= createSdkWebpackRequire();\n return { request: webpackRequire, root: undefined };\n }\n\n // The SDK has no runtime webpack dependency. Use the calling package's resolver.\n const prepareStackTrace = Error.prepareStackTrace;\n const stackTraceLimit = Error.stackTraceLimit;\n try {\n Error.prepareStackTrace = (_error, callSites) => callSites;\n Error.stackTraceLimit = Math.max(stackTraceLimit ?? 0, 10);\n const error = new Error();\n Error.captureStackTrace(error, getWebpackRequire);\n const callSites = error.stack as unknown;\n const caller = (Array.isArray(callSites) ? callSites : [])\n .slice(1)\n .map((callSite: NodeJS.CallSite) => callSite.getFileName())\n .find(\n (fileName): fileName is string =>\n !!fileName && (isAbsolute(fileName) || fileName.startsWith('file:')),\n );\n const callerFile = caller?.startsWith('file:')\n ? fileURLToPath(caller)\n : caller || resolve(process.cwd(), 'package.json');\n const callerDir = dirname(callerFile);\n let located = callerWebpack.get(callerDir);\n if (!located) {\n const request = createRequire(callerFile);\n const webpackRoot = findWebpackRoot(request);\n located = {\n request,\n root: webpackRoot ? realpathSync(webpackRoot) + sep : undefined,\n };\n callerWebpack.set(callerDir, located);\n }\n return located;\n } finally {\n Error.prepareStackTrace = prepareStackTrace;\n Error.stackTraceLimit = stackTraceLimit;\n }\n};\n\nexport function getWebpackPath(\n compiler: webpack.Compiler,\n options: { framework: 'nextjs' | 'other' } = { framework: 'other' },\n): string {\n try {\n // @ts-ignore just throw err\n compiler.webpack();\n return '';\n } catch (err) {\n const trace = (err as Error).stack?.split('\\n') || [];\n const webpackErrLocation =\n trace.find((item) => item.includes('at webpack')) || '';\n const webpackLocationWithDetail = webpackErrLocation\n .replace(/[^\\(\\)]+/, '')\n .slice(1, -1);\n const webpackPath = webpackLocationWithDetail\n .split(':')\n .slice(0, -2)\n .join(':');\n if (options?.framework === 'nextjs') {\n if (webpackPath.endsWith('webpack.js')) {\n return webpackPath.replace('webpack.js', 'index.js');\n }\n return '';\n }\n if (!webpackPath) {\n return '';\n }\n try {\n const entry = createRequire(webpackPath).resolve('webpack');\n // A bundled compiler resolves to an unrelated installation, or to none.\n // Only report the package that contains the active compiler.\n return webpackPath.startsWith(resolve(entry, '../..') + sep) ? entry : '';\n } catch (error) {\n if ((error as NodeJS.ErrnoException).code !== 'MODULE_NOT_FOUND') {\n throw error;\n }\n return '';\n }\n }\n}\n\nconst findWebpackRoot = (request: NodeRequire): string | undefined => {\n let entry: string;\n try {\n entry = request.resolve('webpack');\n } catch (error) {\n if ((error as NodeJS.ErrnoException).code === 'MODULE_NOT_FOUND') {\n return undefined;\n }\n throw error;\n }\n for (let dir = dirname(entry); dir !== dirname(dir); dir = dirname(dir)) {\n const manifest = join(dir, 'package.json');\n if (\n existsSync(manifest) &&\n JSON.parse(readFileSync(manifest, 'utf8')).name === 'webpack'\n ) {\n return dir;\n }\n }\n return undefined;\n};\n\nexport const normalizeWebpackPath = (fullPath: string): string => {\n if (fullPath === 'webpack') {\n return process.env['FEDERATION_WEBPACK_PATH'] || fullPath;\n }\n\n const normalize = (path: string): string =>\n process.env['FEDERATION_WEBPACK_PATH']\n ? resolve(\n process.env['FEDERATION_WEBPACK_PATH'],\n path.replace('webpack', '../../'),\n )\n : path;\n const candidate = normalize(fullPath);\n const relocatedPath = webpackInternalPaths[fullPath];\n if (!relocatedPath) {\n return candidate;\n }\n\n const { request: requestWebpack, root } = getWebpackRequire();\n const resolves = (request: string, inside?: string): boolean => {\n try {\n // Resolve candidates without executing them.\n const resolved = requestWebpack.resolve(request);\n return !inside || realpathSync(resolved).startsWith(inside);\n } catch (error) {\n const { code } = error as NodeJS.ErrnoException;\n if (\n code === 'MODULE_NOT_FOUND' ||\n (inside && code === 'ERR_PACKAGE_PATH_NOT_EXPORTED')\n ) {\n return false;\n }\n throw error;\n }\n };\n\n if (root) {\n // Bare requests can find an ancestor webpack's internals. Accept only\n // candidates inside the caller's webpack, including PnP and exports maps.\n if (resolves(fullPath, root)) return fullPath;\n if (resolves(relocatedPath, root)) return relocatedPath;\n }\n\n if (resolves(candidate)) {\n return candidate;\n }\n const fallback = normalize(relocatedPath);\n requestWebpack.resolve(fallback);\n return fallback;\n};\n"],"mappings":";;;;;;;AAQA,MAAM,uBAA+C;CACnD,sBAAsB;CACtB,6BAA6B;CAC7B,mCAAmC;CACnC,8BAA8B;CAC9B,6BAA6B;CAC7B,8BAA8B;CAC9B,+BAA+B;CAC/B,+BAA+B;CAC/B,0BAA0B;CAC1B,8BAA8B;CAC9B,4CACE;CACF,6CACE;CACF,oDACE;CACF,wCACE;CACF,uBAAuB;CACvB,2BAA2B;CAC5B;AAED,IAAI;AACJ,MAAM,gCAAgB,IAAI,KAGvB;AAEH,MAAM,+DAIsD,WACzD;AAEH,MAAM,0BAGD;AACH,KAAI,QAAQ,IAAI,4BAA4B;AAC1C,qBAAmB,yBAAyB;AAC5C,SAAO;GAA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SAAS,eAAe,KAAK,CAAE,QAAO;;AAG5C,KAAI,SAAS,UAAU,CACrB,QAAO;CAET,MAAM,WAAW,UAAU,cAAc;AACzC,gBAAe,QAAQ,SAAS;AAChC,QAAO"}
@@ -1,8 +1,66 @@
1
- import { resolve } from "node:path";
1
+ import { existsSync, readFileSync, realpathSync } from "node:fs";
2
+ import { createRequire } from "node:module";
3
+ import { dirname, isAbsolute, join, resolve, sep } from "node:path";
4
+ import { fileURLToPath } from "node:url";
2
5
 
3
6
  //#region src/normalize-webpack-path.ts
7
+ const webpackInternalPaths = {
8
+ "webpack/lib/Module": "webpack/lib/module/Module",
9
+ "webpack/lib/ModuleFactory": "webpack/lib/module/ModuleFactory",
10
+ "webpack/lib/NormalModuleFactory": "webpack/lib/module/NormalModuleFactory",
11
+ "webpack/lib/ExternalModule": "webpack/lib/externals/ExternalModule",
12
+ "webpack/lib/RuntimeModule": "webpack/lib/runtime/RuntimeModule",
13
+ "webpack/lib/RuntimeGlobals": "webpack/lib/runtime/RuntimeGlobals",
14
+ "webpack/lib/RuntimeTemplate": "webpack/lib/template/RuntimeTemplate",
15
+ "webpack/lib/ResolverFactory": "webpack/lib/resolve/ResolverFactory",
16
+ "webpack/lib/ChunkGraph": "webpack/lib/graph/ChunkGraph",
17
+ "webpack/lib/HotUpdateChunk": "webpack/lib/graph/HotUpdateChunk",
18
+ "webpack/lib/dependencies/EntryDependency": "webpack/lib/entry/EntryDependency",
19
+ "webpack/lib/dependencies/ModuleDependency": "webpack/lib/dependencies/core/ModuleDependency",
20
+ "webpack/lib/dependencies/StaticExportsDependency": "webpack/lib/dependencies/core/StaticExportsDependency",
21
+ "webpack/lib/util/extractUrlAndGlobal": "webpack/lib/externals/extractUrlAndGlobal",
22
+ "webpack/lib/util/fs": "webpack/lib/fs/fs",
23
+ "webpack/lib/util/semver": "webpack/lib/sharing/semver"
24
+ };
25
+ let webpackRequire;
26
+ const callerWebpack = /* @__PURE__ */ new Map();
27
+ const createSdkWebpackRequire = () => createRequire(import.meta.url);
28
+ const getWebpackRequire = () => {
29
+ if (process.env["FEDERATION_WEBPACK_PATH"]) {
30
+ webpackRequire ??= createSdkWebpackRequire();
31
+ return {
32
+ request: webpackRequire,
33
+ root: void 0
34
+ };
35
+ }
36
+ const prepareStackTrace = Error.prepareStackTrace;
37
+ const stackTraceLimit = Error.stackTraceLimit;
38
+ try {
39
+ Error.prepareStackTrace = (_error, callSites) => callSites;
40
+ Error.stackTraceLimit = Math.max(stackTraceLimit ?? 0, 10);
41
+ const error = /* @__PURE__ */ new Error();
42
+ Error.captureStackTrace(error, getWebpackRequire);
43
+ const callSites = error.stack;
44
+ const caller = (Array.isArray(callSites) ? callSites : []).slice(1).map((callSite) => callSite.getFileName()).find((fileName) => !!fileName && (isAbsolute(fileName) || fileName.startsWith("file:")));
45
+ const callerFile = caller?.startsWith("file:") ? fileURLToPath(caller) : caller || resolve(process.cwd(), "package.json");
46
+ const callerDir = dirname(callerFile);
47
+ let located = callerWebpack.get(callerDir);
48
+ if (!located) {
49
+ const request = createRequire(callerFile);
50
+ const webpackRoot = findWebpackRoot(request);
51
+ located = {
52
+ request,
53
+ root: webpackRoot ? realpathSync(webpackRoot) + sep : void 0
54
+ };
55
+ callerWebpack.set(callerDir, located);
56
+ }
57
+ return located;
58
+ } finally {
59
+ Error.prepareStackTrace = prepareStackTrace;
60
+ Error.stackTraceLimit = stackTraceLimit;
61
+ }
62
+ };
4
63
  function getWebpackPath(compiler, options = { framework: "other" }) {
5
- const resolveWithContext = new Function("id", "options", "return typeof require === \"undefined\" ? \"\" : require.resolve(id, options)");
6
64
  try {
7
65
  compiler.webpack();
8
66
  return "";
@@ -12,13 +70,54 @@ function getWebpackPath(compiler, options = { framework: "other" }) {
12
70
  if (webpackPath.endsWith("webpack.js")) return webpackPath.replace("webpack.js", "index.js");
13
71
  return "";
14
72
  }
15
- return resolveWithContext("webpack", { paths: [webpackPath] });
73
+ if (!webpackPath) return "";
74
+ try {
75
+ const entry = createRequire(webpackPath).resolve("webpack");
76
+ return webpackPath.startsWith(resolve(entry, "../..") + sep) ? entry : "";
77
+ } catch (error) {
78
+ if (error.code !== "MODULE_NOT_FOUND") throw error;
79
+ return "";
80
+ }
16
81
  }
17
82
  }
83
+ const findWebpackRoot = (request) => {
84
+ let entry;
85
+ try {
86
+ entry = request.resolve("webpack");
87
+ } catch (error) {
88
+ if (error.code === "MODULE_NOT_FOUND") return;
89
+ throw error;
90
+ }
91
+ for (let dir = dirname(entry); dir !== dirname(dir); dir = dirname(dir)) {
92
+ const manifest = join(dir, "package.json");
93
+ if (existsSync(manifest) && JSON.parse(readFileSync(manifest, "utf8")).name === "webpack") return dir;
94
+ }
95
+ };
18
96
  const normalizeWebpackPath = (fullPath) => {
19
97
  if (fullPath === "webpack") return process.env["FEDERATION_WEBPACK_PATH"] || fullPath;
20
- if (process.env["FEDERATION_WEBPACK_PATH"]) return resolve(process.env["FEDERATION_WEBPACK_PATH"], fullPath.replace("webpack", "../../"));
21
- return fullPath;
98
+ const normalize = (path) => process.env["FEDERATION_WEBPACK_PATH"] ? resolve(process.env["FEDERATION_WEBPACK_PATH"], path.replace("webpack", "../../")) : path;
99
+ const candidate = normalize(fullPath);
100
+ const relocatedPath = webpackInternalPaths[fullPath];
101
+ if (!relocatedPath) return candidate;
102
+ const { request: requestWebpack, root } = getWebpackRequire();
103
+ const resolves = (request, inside) => {
104
+ try {
105
+ const resolved = requestWebpack.resolve(request);
106
+ return !inside || realpathSync(resolved).startsWith(inside);
107
+ } catch (error) {
108
+ const { code } = error;
109
+ if (code === "MODULE_NOT_FOUND" || inside && code === "ERR_PACKAGE_PATH_NOT_EXPORTED") return false;
110
+ throw error;
111
+ }
112
+ };
113
+ if (root) {
114
+ if (resolves(fullPath, root)) return fullPath;
115
+ if (resolves(relocatedPath, root)) return relocatedPath;
116
+ }
117
+ if (resolves(candidate)) return candidate;
118
+ const fallback = normalize(relocatedPath);
119
+ requestWebpack.resolve(fallback);
120
+ return fallback;
22
121
  };
23
122
 
24
123
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"normalize-webpack-path.js","names":[],"sources":["../src/normalize-webpack-path.ts"],"sourcesContent":["import type webpack from 'webpack';\nimport { resolve } from 'node:path';\n\nexport function getWebpackPath(\n compiler: webpack.Compiler,\n options: { framework: 'nextjs' | 'other' } = { framework: 'other' },\n): string {\n const resolveWithContext = new Function(\n 'id',\n 'options',\n 'return typeof require === \"undefined\" ? \"\" : require.resolve(id, options)',\n ) as (id: string, options?: { paths?: string[] }) => string;\n\n try {\n // @ts-ignore just throw err\n compiler.webpack();\n return '';\n } catch (err) {\n const trace = (err as Error).stack?.split('\\n') || [];\n const webpackErrLocation =\n trace.find((item) => item.includes('at webpack')) || '';\n const webpackLocationWithDetail = webpackErrLocation\n .replace(/[^\\(\\)]+/, '')\n .slice(1, -1);\n const webpackPath = webpackLocationWithDetail\n .split(':')\n .slice(0, -2)\n .join(':');\n if (options?.framework === 'nextjs') {\n if (webpackPath.endsWith('webpack.js')) {\n return webpackPath.replace('webpack.js', 'index.js');\n }\n return '';\n }\n return resolveWithContext('webpack', { paths: [webpackPath] });\n }\n}\n\nexport const normalizeWebpackPath = (fullPath: string): string => {\n if (fullPath === 'webpack') {\n return process.env['FEDERATION_WEBPACK_PATH'] || fullPath;\n }\n\n if (process.env['FEDERATION_WEBPACK_PATH']) {\n return resolve(\n process.env['FEDERATION_WEBPACK_PATH'],\n fullPath.replace('webpack', '../../'),\n );\n }\n\n return fullPath;\n};\n"],"mappings":";;;AAGA,SAAgB,eACd,UACA,UAA6C,EAAE,WAAW,SAAS,EAC3D;CACR,MAAM,qBAAqB,IAAI,SAC7B,MACA,WACA,gFACD;AAED,KAAI;AAEF,WAAS,SAAS;AAClB,SAAO;UACA,KAAK;EAOZ,MAAM,gBANS,IAAc,OAAO,MAAM,KAAK,IAAI,EAAE,EAE7C,MAAM,SAAS,KAAK,SAAS,aAAa,CAAC,IAAI,IAEpD,QAAQ,YAAY,GAAG,CACvB,MAAM,GAAG,GAAG,CAEZ,MAAM,IAAI,CACV,MAAM,GAAG,GAAG,CACZ,KAAK,IAAI;AACZ,MAAI,SAAS,cAAc,UAAU;AACnC,OAAI,YAAY,SAAS,aAAa,CACpC,QAAO,YAAY,QAAQ,cAAc,WAAW;AAEtD,UAAO;;AAET,SAAO,mBAAmB,WAAW,EAAE,OAAO,CAAC,YAAY,EAAE,CAAC;;;AAIlE,MAAa,wBAAwB,aAA6B;AAChE,KAAI,aAAa,UACf,QAAO,QAAQ,IAAI,8BAA8B;AAGnD,KAAI,QAAQ,IAAI,2BACd,QAAO,QACL,QAAQ,IAAI,4BACZ,SAAS,QAAQ,WAAW,SAAS,CACtC;AAGH,QAAO"}
1
+ {"version":3,"file":"normalize-webpack-path.js","names":[],"sources":["../src/normalize-webpack-path.ts"],"sourcesContent":["import type webpack from 'webpack';\nimport { existsSync, readFileSync, realpathSync } from 'node:fs';\nimport { createRequire } from 'node:module';\nimport { dirname, isAbsolute, join, resolve, sep } from 'node:path';\nimport { fileURLToPath } from 'node:url';\n\n// Webpack 5.112 reorganized internals without retaining every old location.\n// Keep the old layout preferred for older installations and patched copies.\nconst webpackInternalPaths: Record<string, string> = {\n 'webpack/lib/Module': 'webpack/lib/module/Module',\n 'webpack/lib/ModuleFactory': 'webpack/lib/module/ModuleFactory',\n 'webpack/lib/NormalModuleFactory': 'webpack/lib/module/NormalModuleFactory',\n 'webpack/lib/ExternalModule': 'webpack/lib/externals/ExternalModule',\n 'webpack/lib/RuntimeModule': 'webpack/lib/runtime/RuntimeModule',\n 'webpack/lib/RuntimeGlobals': 'webpack/lib/runtime/RuntimeGlobals',\n 'webpack/lib/RuntimeTemplate': 'webpack/lib/template/RuntimeTemplate',\n 'webpack/lib/ResolverFactory': 'webpack/lib/resolve/ResolverFactory',\n 'webpack/lib/ChunkGraph': 'webpack/lib/graph/ChunkGraph',\n 'webpack/lib/HotUpdateChunk': 'webpack/lib/graph/HotUpdateChunk',\n 'webpack/lib/dependencies/EntryDependency':\n 'webpack/lib/entry/EntryDependency',\n 'webpack/lib/dependencies/ModuleDependency':\n 'webpack/lib/dependencies/core/ModuleDependency',\n 'webpack/lib/dependencies/StaticExportsDependency':\n 'webpack/lib/dependencies/core/StaticExportsDependency',\n 'webpack/lib/util/extractUrlAndGlobal':\n 'webpack/lib/externals/extractUrlAndGlobal',\n 'webpack/lib/util/fs': 'webpack/lib/fs/fs',\n 'webpack/lib/util/semver': 'webpack/lib/sharing/semver',\n};\n\nlet webpackRequire: NodeRequire | undefined;\nconst callerWebpack = new Map<\n string,\n { request: NodeRequire; root: string | undefined }\n>();\n\nconst createSdkWebpackRequire = (): NodeRequire =>\n createRequire(\n // This entrypoint is emitted as both CJS and ESM.\n // @ts-ignore import.meta is used only in the ESM output.\n process.env.IS_ESM_BUILD === 'true' ? import.meta.url : __filename,\n );\n\nconst getWebpackRequire = (): {\n request: NodeRequire;\n root: string | undefined;\n} => {\n if (process.env['FEDERATION_WEBPACK_PATH']) {\n webpackRequire ??= createSdkWebpackRequire();\n return { request: webpackRequire, root: undefined };\n }\n\n // The SDK has no runtime webpack dependency. Use the calling package's resolver.\n const prepareStackTrace = Error.prepareStackTrace;\n const stackTraceLimit = Error.stackTraceLimit;\n try {\n Error.prepareStackTrace = (_error, callSites) => callSites;\n Error.stackTraceLimit = Math.max(stackTraceLimit ?? 0, 10);\n const error = new Error();\n Error.captureStackTrace(error, getWebpackRequire);\n const callSites = error.stack as unknown;\n const caller = (Array.isArray(callSites) ? callSites : [])\n .slice(1)\n .map((callSite: NodeJS.CallSite) => callSite.getFileName())\n .find(\n (fileName): fileName is string =>\n !!fileName && (isAbsolute(fileName) || fileName.startsWith('file:')),\n );\n const callerFile = caller?.startsWith('file:')\n ? fileURLToPath(caller)\n : caller || resolve(process.cwd(), 'package.json');\n const callerDir = dirname(callerFile);\n let located = callerWebpack.get(callerDir);\n if (!located) {\n const request = createRequire(callerFile);\n const webpackRoot = findWebpackRoot(request);\n located = {\n request,\n root: webpackRoot ? realpathSync(webpackRoot) + sep : undefined,\n };\n callerWebpack.set(callerDir, located);\n }\n return located;\n } finally {\n Error.prepareStackTrace = prepareStackTrace;\n Error.stackTraceLimit = stackTraceLimit;\n }\n};\n\nexport function getWebpackPath(\n compiler: webpack.Compiler,\n options: { framework: 'nextjs' | 'other' } = { framework: 'other' },\n): string {\n try {\n // @ts-ignore just throw err\n compiler.webpack();\n return '';\n } catch (err) {\n const trace = (err as Error).stack?.split('\\n') || [];\n const webpackErrLocation =\n trace.find((item) => item.includes('at webpack')) || '';\n const webpackLocationWithDetail = webpackErrLocation\n .replace(/[^\\(\\)]+/, '')\n .slice(1, -1);\n const webpackPath = webpackLocationWithDetail\n .split(':')\n .slice(0, -2)\n .join(':');\n if (options?.framework === 'nextjs') {\n if (webpackPath.endsWith('webpack.js')) {\n return webpackPath.replace('webpack.js', 'index.js');\n }\n return '';\n }\n if (!webpackPath) {\n return '';\n }\n try {\n const entry = createRequire(webpackPath).resolve('webpack');\n // A bundled compiler resolves to an unrelated installation, or to none.\n // Only report the package that contains the active compiler.\n return webpackPath.startsWith(resolve(entry, '../..') + sep) ? entry : '';\n } catch (error) {\n if ((error as NodeJS.ErrnoException).code !== 'MODULE_NOT_FOUND') {\n throw error;\n }\n return '';\n }\n }\n}\n\nconst findWebpackRoot = (request: NodeRequire): string | undefined => {\n let entry: string;\n try {\n entry = request.resolve('webpack');\n } catch (error) {\n if ((error as NodeJS.ErrnoException).code === 'MODULE_NOT_FOUND') {\n return undefined;\n }\n throw error;\n }\n for (let dir = dirname(entry); dir !== dirname(dir); dir = dirname(dir)) {\n const manifest = join(dir, 'package.json');\n if (\n existsSync(manifest) &&\n JSON.parse(readFileSync(manifest, 'utf8')).name === 'webpack'\n ) {\n return dir;\n }\n }\n return undefined;\n};\n\nexport const normalizeWebpackPath = (fullPath: string): string => {\n if (fullPath === 'webpack') {\n return process.env['FEDERATION_WEBPACK_PATH'] || fullPath;\n }\n\n const normalize = (path: string): string =>\n process.env['FEDERATION_WEBPACK_PATH']\n ? resolve(\n process.env['FEDERATION_WEBPACK_PATH'],\n path.replace('webpack', '../../'),\n )\n : path;\n const candidate = normalize(fullPath);\n const relocatedPath = webpackInternalPaths[fullPath];\n if (!relocatedPath) {\n return candidate;\n }\n\n const { request: requestWebpack, root } = getWebpackRequire();\n const resolves = (request: string, inside?: string): boolean => {\n try {\n // Resolve candidates without executing them.\n const resolved = requestWebpack.resolve(request);\n return !inside || realpathSync(resolved).startsWith(inside);\n } catch (error) {\n const { code } = error as NodeJS.ErrnoException;\n if (\n code === 'MODULE_NOT_FOUND' ||\n (inside && code === 'ERR_PACKAGE_PATH_NOT_EXPORTED')\n ) {\n return false;\n }\n throw error;\n }\n };\n\n if (root) {\n // Bare requests can find an ancestor webpack's internals. Accept only\n // candidates inside the caller's webpack, including PnP and exports maps.\n if (resolves(fullPath, root)) return fullPath;\n if (resolves(relocatedPath, root)) return relocatedPath;\n }\n\n if (resolves(candidate)) {\n return candidate;\n }\n const fallback = normalize(relocatedPath);\n requestWebpack.resolve(fallback);\n return fallback;\n};\n"],"mappings":";;;;;;AAQA,MAAM,uBAA+C;CACnD,sBAAsB;CACtB,6BAA6B;CAC7B,mCAAmC;CACnC,8BAA8B;CAC9B,6BAA6B;CAC7B,8BAA8B;CAC9B,+BAA+B;CAC/B,+BAA+B;CAC/B,0BAA0B;CAC1B,8BAA8B;CAC9B,4CACE;CACF,6CACE;CACF,oDACE;CACF,wCACE;CACF,uBAAuB;CACvB,2BAA2B;CAC5B;AAED,IAAI;AACJ,MAAM,gCAAgB,IAAI,KAGvB;AAEH,MAAM,gCACJ,cAGwC,OAAO,KAAK,IACnD;AAEH,MAAM,0BAGD;AACH,KAAI,QAAQ,IAAI,4BAA4B;AAC1C,qBAAmB,yBAAyB;AAC5C,SAAO;GAAE,SAAS;GAAgB,MAAM;GAAW;;CAIrD,MAAM,oBAAoB,MAAM;CAChC,MAAM,kBAAkB,MAAM;AAC9B,KAAI;AACF,QAAM,qBAAqB,QAAQ,cAA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ACrB,QAAO;CAET,MAAM,WAAW,UAAU,cAAc;AACzC,gBAAe,QAAQ,SAAS;AAChC,QAAO"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@module-federation/sdk",
3
- "version": "2.9.3",
3
+ "version": "2.9.4",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "description": "A sdk for support module federation",
@@ -63,7 +63,7 @@
63
63
  },
64
64
  "devDependencies": {
65
65
  "@jest/globals": "29.7.0",
66
- "webpack": "^5.0.0"
66
+ "webpack": "5.112.2"
67
67
  },
68
68
  "scripts": {
69
69
  "build": "tsdown --config tsdown.config.ts",