@squide/firefly-webpack-configs 4.2.1 → 4.2.3

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.
package/dist/shared.js ADDED
@@ -0,0 +1,8 @@
1
+
2
+ ;// CONCATENATED MODULE: ./src/shared.ts?__rslib_entry__
3
+ // Hardcoded to "host" because of the "sharedDependenciesResolutionPlugin" plugin.
4
+ const HostApplicationName = "host";
5
+
6
+ export { HostApplicationName };
7
+
8
+ //# sourceMappingURL=shared.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared.js","sources":["webpack://@squide/firefly-webpack-configs/./src/shared.ts"],"sourcesContent":["// Hardcoded to \"host\" because of the \"sharedDependenciesResolutionPlugin\" plugin.\nexport const HostApplicationName = \"host\";\n"],"names":["HostApplicationName"],"mappings":";;AAAA,kFAAkF;AAC3E,MAAMA,sBAAsB,OAAO"}
@@ -0,0 +1,9 @@
1
+ import type { FederationHost, FederationRuntimePlugin } from "@module-federation/enhanced/runtime";
2
+ type Shared = FederationHost["shareScopeMap"][string][string][string];
3
+ interface ResolveSharedDependencyResult {
4
+ resolvedEntry: Shared;
5
+ highestVersionEntry: Shared;
6
+ }
7
+ export declare function resolveSharedDependency(pkgName: string, entries: Shared[], logFct?: (...rest: unknown[]) => void): ResolveSharedDependencyResult;
8
+ declare const plugin: () => FederationRuntimePlugin;
9
+ export default plugin;
@@ -0,0 +1,137 @@
1
+ import * as __WEBPACK_EXTERNAL_MODULE_semver__ from "semver";
2
+ import * as __WEBPACK_EXTERNAL_MODULE__shared_js_cc7b7cda__ from "./shared.js";
3
+
4
+ ;// CONCATENATED MODULE: external "semver"
5
+
6
+ ;// CONCATENATED MODULE: external "./shared.js"
7
+
8
+ ;// CONCATENATED MODULE: ./src/sharedDependenciesResolutionPlugin.ts?__rslib_entry__
9
+ /*
10
+ This custom share dependency resolution strategy ensure that only the host app can ask for a new major version of a library.
11
+ Otherwise, any remote can request for an higher non-major version.
12
+
13
+ Examples:
14
+
15
+ host: 2.0
16
+ remote-1: 2.1 <-----
17
+ remote-2: 2.0
18
+
19
+ host: 2.0 <-----
20
+ remote-1: 3.1
21
+ remote-2: 2.0
22
+
23
+ host: 2.0
24
+ remote-1: 3.1
25
+ remote-2: 2.1 <-----
26
+
27
+ host: >2.0
28
+ remote-1: 3.1
29
+ remote-2: 2.1 <-----
30
+ */
31
+
32
+ // Toggle to "true" to facilitate the debugging of this plugin.
33
+ const isDebug = false;
34
+ function log(...args) {
35
+ if (isDebug) {
36
+ console.log(...args);
37
+ }
38
+ }
39
+ function findHighestVersionForMajor(entries, major) {
40
+ return entries.find((x)=>{
41
+ return (0,__WEBPACK_EXTERNAL_MODULE_semver__.parse)(x.version).major === major;
42
+ });
43
+ }
44
+ // The return type is required otherwise we get the following error: error TS2742: The inferred type of 'resolveSharedDependency' cannot be named without a reference to.
45
+ function resolveSharedDependency(pkgName, entries, logFct = ()=>{}) {
46
+ const cleanedEntries = entries.map((x)=>({
47
+ ...x,
48
+ // Removing any special characters like >,>=,^,~ etc...
49
+ version: (0,__WEBPACK_EXTERNAL_MODULE_semver__.minVersion)(x.version).version
50
+ }));
51
+ // From higher to lower versions.
52
+ const sortedEntries = cleanedEntries.sort((x, y)=>(0,__WEBPACK_EXTERNAL_MODULE_semver__.rcompare)(x.version, y.version));
53
+ logFct("[squide] Sorted the entries by version from higher to lower", sortedEntries);
54
+ const highestVersionEntry = sortedEntries[0];
55
+ logFct(`[squide] ${pkgName} highest requested version is`, highestVersionEntry.version, highestVersionEntry);
56
+ // The host is always right!
57
+ if (highestVersionEntry.from === __WEBPACK_EXTERNAL_MODULE__shared_js_cc7b7cda__.HostApplicationName) {
58
+ logFct("[squide] %cThis is the host version%c, great, resolving to:", "color: black; background-color: pink;", "", highestVersionEntry.version, highestVersionEntry);
59
+ return {
60
+ resolvedEntry: highestVersionEntry,
61
+ highestVersionEntry: highestVersionEntry
62
+ };
63
+ }
64
+ logFct(`[squide] ${pkgName} Highest requested version is not from the host.`);
65
+ const hostEntry = sortedEntries.find((x)=>x.from === __WEBPACK_EXTERNAL_MODULE__shared_js_cc7b7cda__.HostApplicationName);
66
+ // Found nothing, that's odd but let's not break the app for this.
67
+ if (!hostEntry) {
68
+ logFct(`[squide] The host is not requesting any version of ${pkgName}, %caborting%c.`, "color: black; background-color: pink;", "");
69
+ return {
70
+ resolvedEntry: highestVersionEntry,
71
+ highestVersionEntry: highestVersionEntry
72
+ };
73
+ }
74
+ logFct(`[squide] ${pkgName} version requested by the host is:`, hostEntry.version, hostEntry);
75
+ const parsedHighestVersion = (0,__WEBPACK_EXTERNAL_MODULE_semver__.parse)(highestVersionEntry.version);
76
+ const parsedHostVersion = (0,__WEBPACK_EXTERNAL_MODULE_semver__.parse)(hostEntry.version);
77
+ // Major versions should always be introduced by the host application.
78
+ if (parsedHighestVersion.major === parsedHostVersion.major) {
79
+ logFct(`[squide] Resolving to %c${parsedHighestVersion.major}%c.`, "color: black; background-color: pink;", "");
80
+ return {
81
+ resolvedEntry: highestVersionEntry,
82
+ highestVersionEntry: highestVersionEntry
83
+ };
84
+ }
85
+ logFct("[squide] The major number of the highest requested version is higher than the major number of the version requested by the host, looking for another version to resolve to.");
86
+ // Start at the second entry since the first entry is the current higher version entry.
87
+ // The result could either be the actual host entry or any other entry that is higher than the version requested
88
+ // by the host, but match the host entry major version number.
89
+ const fallbackEntry = findHighestVersionForMajor(sortedEntries.splice(1), parsedHostVersion.major);
90
+ logFct(`[squide] The %chighest requested version%c for ${pkgName} that is in-range with the requested host major version number is:`, "color: black; background-color: pink;", "", fallbackEntry.version, fallbackEntry);
91
+ return {
92
+ resolvedEntry: fallbackEntry,
93
+ highestVersionEntry: highestVersionEntry
94
+ };
95
+ }
96
+ const sharedDependenciesResolutionPlugin_rslib_entry_plugin = ()=>{
97
+ return {
98
+ name: "shared-dependencies-resolution-plugin",
99
+ resolveShare: function(args) {
100
+ const { shareScopeMap, scope, pkgName } = args;
101
+ log(`[squide] Resolving ${pkgName}:`, args);
102
+ // This custom strategy only applies to singleton shared dependencies.
103
+ const entries = Object.values(shareScopeMap[scope][pkgName]).filter((x)=>{
104
+ return(// Temporary check until all the remotes on Webpack Module Federation has been updated to Module Federation 2.0.
105
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
106
+ // @ts-ignore
107
+ x.singleton || x.shareConfig && x.shareConfig.singleton);
108
+ });
109
+ // Not a singleton dependency.
110
+ if (entries.length === 0) {
111
+ log(`[squide] ${pkgName} is not a singleton dependency, aborting.`);
112
+ return args;
113
+ }
114
+ // If there's only one version entry, then it means that everyone is requesting the same version
115
+ // of the dependency.
116
+ if (entries.length <= 1) {
117
+ log(`[squide] There's only one version requested for ${pkgName}, resolving to:`, entries[0].version, entries[0]);
118
+ return args;
119
+ }
120
+ args.resolver = ()=>{
121
+ log(`[squide] There's %cmore than one requested version%c for ${pkgName}:`, "color: black; background-color: pink;", "", entries.length, shareScopeMap[scope][pkgName]);
122
+ const { resolvedEntry, highestVersionEntry } = resolveSharedDependency(pkgName, entries, log);
123
+ if (resolvedEntry.version !== highestVersionEntry.version) {
124
+ // eslint-disable-next-line max-len
125
+ console.log(`%c[squide] "${highestVersionEntry.from}" requested version "${highestVersionEntry.version}" of "${pkgName}". This version is higher than the major number of the version requested by the host for this dependency (${resolvedEntry.version}). The version for "${pkgName}" has been forced to "${resolvedEntry.version}".`, "color: white; background-color: red;");
126
+ }
127
+ return resolvedEntry;
128
+ };
129
+ return args;
130
+ }
131
+ };
132
+ };
133
+ /* ESM default export */ const sharedDependenciesResolutionPlugin_rslib_entry_ = (sharedDependenciesResolutionPlugin_rslib_entry_plugin);
134
+
135
+ export { sharedDependenciesResolutionPlugin_rslib_entry_ as default, resolveSharedDependency };
136
+
137
+ //# sourceMappingURL=sharedDependenciesResolutionPlugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sharedDependenciesResolutionPlugin.js","sources":["webpack://@squide/firefly-webpack-configs/./src/sharedDependenciesResolutionPlugin.ts"],"sourcesContent":["/*\nThis custom share dependency resolution strategy ensure that only the host app can ask for a new major version of a library.\nOtherwise, any remote can request for an higher non-major version.\n\nExamples:\n\nhost: 2.0\nremote-1: 2.1 <-----\nremote-2: 2.0\n\nhost: 2.0 <-----\nremote-1: 3.1\nremote-2: 2.0\n\nhost: 2.0\nremote-1: 3.1\nremote-2: 2.1 <-----\n\nhost: >2.0\nremote-1: 3.1\nremote-2: 2.1 <-----\n*/\n\nimport type { FederationHost, FederationRuntimePlugin } from \"@module-federation/enhanced/runtime\";\nimport { minVersion, parse, rcompare, type SemVer } from \"semver\";\nimport { HostApplicationName } from \"./shared.ts\";\n\ntype Shared = FederationHost[\"shareScopeMap\"][string][string][string];\n\n// Toggle to \"true\" to facilitate the debugging of this plugin.\nconst isDebug = false;\n\nfunction log(...args: unknown[]) {\n if (isDebug) {\n console.log(...args);\n }\n}\n\nfunction findHighestVersionForMajor(entries: Shared[], major: number) {\n return entries.find(x => {\n return parse(x.version)!.major === major;\n }) as Shared;\n}\n\ninterface ResolveSharedDependencyResult {\n resolvedEntry: Shared;\n highestVersionEntry: Shared;\n}\n\n// The return type is required otherwise we get the following error: error TS2742: The inferred type of 'resolveSharedDependency' cannot be named without a reference to.\nexport function resolveSharedDependency(pkgName: string, entries: Shared[], logFct: (...rest: unknown[]) => void = () => {}): ResolveSharedDependencyResult {\n const cleanedEntries = entries.map(x => ({\n ...x,\n // Removing any special characters like >,>=,^,~ etc...\n version: minVersion(x.version)!.version\n }));\n\n // From higher to lower versions.\n const sortedEntries = cleanedEntries.sort((x, y) => rcompare(x.version, y.version));\n\n logFct(\"[squide] Sorted the entries by version from higher to lower\", sortedEntries);\n\n const highestVersionEntry = sortedEntries[0];\n\n logFct(`[squide] ${pkgName} highest requested version is`, highestVersionEntry.version, highestVersionEntry);\n\n // The host is always right!\n if (highestVersionEntry.from === HostApplicationName) {\n logFct(\"[squide] %cThis is the host version%c, great, resolving to:\", \"color: black; background-color: pink;\", \"\", highestVersionEntry.version, highestVersionEntry);\n\n return {\n resolvedEntry: highestVersionEntry,\n highestVersionEntry: highestVersionEntry\n };\n }\n\n logFct(`[squide] ${pkgName} Highest requested version is not from the host.`);\n\n const hostEntry = sortedEntries.find(x => x.from === HostApplicationName);\n\n // Found nothing, that's odd but let's not break the app for this.\n if (!hostEntry) {\n logFct(`[squide] The host is not requesting any version of ${pkgName}, %caborting%c.`, \"color: black; background-color: pink;\", \"\");\n\n return {\n resolvedEntry: highestVersionEntry,\n highestVersionEntry: highestVersionEntry\n };\n }\n\n logFct(`[squide] ${pkgName} version requested by the host is:`, hostEntry.version, hostEntry);\n\n const parsedHighestVersion = parse(highestVersionEntry.version) as SemVer;\n const parsedHostVersion = parse(hostEntry.version) as SemVer;\n\n // Major versions should always be introduced by the host application.\n if (parsedHighestVersion.major === parsedHostVersion.major) {\n logFct(`[squide] Resolving to %c${parsedHighestVersion.major}%c.`, \"color: black; background-color: pink;\", \"\");\n\n return {\n resolvedEntry: highestVersionEntry,\n highestVersionEntry: highestVersionEntry\n };\n }\n\n logFct(\"[squide] The major number of the highest requested version is higher than the major number of the version requested by the host, looking for another version to resolve to.\");\n\n // Start at the second entry since the first entry is the current higher version entry.\n // The result could either be the actual host entry or any other entry that is higher than the version requested\n // by the host, but match the host entry major version number.\n const fallbackEntry = findHighestVersionForMajor(sortedEntries.splice(1), parsedHostVersion.major);\n\n logFct(`[squide] The %chighest requested version%c for ${pkgName} that is in-range with the requested host major version number is:`, \"color: black; background-color: pink;\", \"\", fallbackEntry.version, fallbackEntry);\n\n return {\n resolvedEntry: fallbackEntry,\n highestVersionEntry: highestVersionEntry\n };\n}\n\nconst plugin: () => FederationRuntimePlugin = () => {\n return {\n name: \"shared-dependencies-resolution-plugin\",\n resolveShare: function(args) {\n const { shareScopeMap, scope, pkgName } = args;\n\n log(`[squide] Resolving ${pkgName}:`, args);\n\n // This custom strategy only applies to singleton shared dependencies.\n const entries = Object.values(shareScopeMap[scope][pkgName]).filter(x => {\n return (\n // Temporary check until all the remotes on Webpack Module Federation has been updated to Module Federation 2.0.\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n x.singleton ||\n (x.shareConfig && x.shareConfig.singleton)\n );\n });\n\n // Not a singleton dependency.\n if (entries.length === 0) {\n log(`[squide] ${pkgName} is not a singleton dependency, aborting.`);\n\n return args;\n }\n\n // If there's only one version entry, then it means that everyone is requesting the same version\n // of the dependency.\n if (entries.length <= 1) {\n log(`[squide] There's only one version requested for ${pkgName}, resolving to:`, entries[0].version, entries[0]);\n\n return args;\n }\n\n args.resolver = () => {\n log(`[squide] There's %cmore than one requested version%c for ${pkgName}:`, \"color: black; background-color: pink;\", \"\", entries.length, shareScopeMap[scope][pkgName]);\n\n const { resolvedEntry, highestVersionEntry } = resolveSharedDependency(pkgName, entries, log);\n\n if (resolvedEntry.version !== highestVersionEntry.version) {\n // eslint-disable-next-line max-len\n console.log(`%c[squide] \"${highestVersionEntry.from}\" requested version \"${highestVersionEntry.version}\" of \"${pkgName}\". This version is higher than the major number of the version requested by the host for this dependency (${resolvedEntry.version}). The version for \"${pkgName}\" has been forced to \"${resolvedEntry.version}\".`, \"color: white; background-color: red;\");\n }\n\n return resolvedEntry;\n };\n\n return args;\n }\n };\n};\n\nexport default plugin;\n"],"names":["minVersion","parse","rcompare","HostApplicationName","isDebug","log","args","console","findHighestVersionForMajor","entries","major","x","resolveSharedDependency","pkgName","logFct","cleanedEntries","sortedEntries","y","highestVersionEntry","hostEntry","parsedHighestVersion","parsedHostVersion","fallbackEntry","plugin","shareScopeMap","scope","Object","resolvedEntry"],"mappings":";;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;;;AAqBA,GAGkE;AAChB;AAIlD,+DAA+D;AAC/D,MAAMI,UAAU;AAEhB,SAASC,IAAI,GAAGC,IAAe;IAC3B,IAAIF,SAAS;QACTG,QAAQ,GAAG,IAAID;IACnB;AACJ;AAEA,SAASE,2BAA2BC,OAAiB,EAAEC,KAAa;IAChE,OAAOD,QAAQ,IAAI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E,CAAC,OAAO,EAAEA,OAAO,CAAC,EAAE;gBAE/G,OAAOH;YACX;YAEAA,KAAK,QAAQ,GAAG;gBACZD,IAAI,CAAC,yDAAyD,EAAEQ,QAAQ,CAAC,CAAC,EAAE,yCAAyC,IAAIJ,QAAQ,MAAM,EAAEe,aAAa,CAACC,MAAM,CAACZ,QAAQ;gBAEtK,MAAM,EAAEc,aAAa,EAAET,mBAAmB,EAAE,GAAGN,wBAAwBC,SAASJ,SAASJ;gBAEzF,IAAIsB,cAAc,OAAO,KAAKT,oBAAoB,OAAO,EAAE;oBACvD,mCAAmC;oBACnCX,QAAQ,GAAG,CAAC,CAAC,YAAY,EAAEW,oBAAoB,IAAI,CAAC,qBAAqB,EAAEA,oBAAoB,OAAO,CAAC,MAAM,EAAEL,QAAQ,0GAA0G,EAAEc,cAAc,OAAO,CAAC,oBAAoB,EAAEd,QAAQ,sBAAsB,EAAEc,cAAc,OAAO,CAAC,EAAE,CAAC,EAAE;gBAC9U;gBAEA,OAAOA;YACX;YAEA,OAAOrB;QACX;IACJ;AACJ;AAEA,kFAAeiB,qDAAMA,EAAC"}
package/package.json CHANGED
@@ -1,19 +1,19 @@
1
1
  {
2
2
  "name": "@squide/firefly-webpack-configs",
3
3
  "author": "Workleap",
4
- "version": "4.2.1",
4
+ "version": "4.2.3",
5
5
  "description": "Webpack configuration helpers for the Squide firefly technology stack.",
6
6
  "license": "Apache-2.0",
7
7
  "repository": {
8
8
  "type": "git",
9
9
  "url": "git+https://github.com/gsoft-inc/wl-squide.git",
10
- "directory": "packages/firefly-configs"
10
+ "directory": "packages/firefly-webpack-configs"
11
11
  },
12
+ "type": "module",
12
13
  "publishConfig": {
13
14
  "access": "public",
14
15
  "provenance": true
15
16
  },
16
- "type": "module",
17
17
  "exports": {
18
18
  ".": {
19
19
  "types": "./dist/index.d.ts",
@@ -22,7 +22,8 @@
22
22
  }
23
23
  },
24
24
  "files": [
25
- "/dist",
25
+ "src",
26
+ "dist",
26
27
  "CHANGELOG.md",
27
28
  "README.md"
28
29
  ],
@@ -35,32 +36,42 @@
35
36
  "webpack": ">=5.0.0",
36
37
  "webpack-dev-server": ">=5.0.0"
37
38
  },
39
+ "dependencies": {
40
+ "@module-federation/enhanced": "^0.8.9",
41
+ "@types/node": "^22.10.7",
42
+ "@types/semver": "^7.5.8",
43
+ "@workleap/webpack-configs": "^1.5.3",
44
+ "deepmerge": "^4.3.1",
45
+ "html-webpack-plugin": "^5.6.3",
46
+ "semver": "^7.6.3"
47
+ },
38
48
  "devDependencies": {
39
- "@module-federation/enhanced": "0.6.16",
40
- "@swc/core": "1.8.0",
49
+ "@rsbuild/core": "1.1.13",
50
+ "@rslib/core": "0.3.1",
51
+ "@swc/core": "1.10.7",
41
52
  "@swc/jest": "0.2.37",
42
53
  "@types/jest": "29.5.14",
43
- "@workleap/eslint-plugin": "3.2.3",
44
- "@workleap/swc-configs": "2.2.3",
45
- "@workleap/tsup-configs": "3.0.6",
54
+ "@typescript-eslint/parser": "8.20.0",
55
+ "@workleap/eslint-plugin": "3.2.6",
56
+ "@workleap/rslib-configs": "1.0.2",
57
+ "@workleap/swc-configs": "2.2.4",
46
58
  "@workleap/typescript-configs": "3.0.2",
47
59
  "eslint": "8.57.0",
48
60
  "jest": "29.7.0",
49
61
  "jest-environment-jsdom": "29.7.0",
50
- "ts-jest": "29.2.5",
51
- "tsup": "8.3.5",
62
+ "ts-node": "10.9.2",
52
63
  "typescript": "5.5.4",
53
- "webpack": "5.96.1"
54
- },
55
- "dependencies": {
56
- "@workleap/webpack-configs": "1.5.1",
57
- "@squide/webpack-configs": "4.3.1"
64
+ "webpack": "5.97.1",
65
+ "webpack-dev-server": "5.2.0"
58
66
  },
59
67
  "engines": {
60
- "node": ">=20.0.0"
68
+ "node": ">=21.1.0"
61
69
  },
62
70
  "scripts": {
63
- "dev": "tsup --config ./tsup.dev.ts",
64
- "build": "tsup --config ./tsup.build.ts"
71
+ "dev": "rslib build --watch --config ./rslib.dev.ts",
72
+ "build": "rslib build --config ./rslib.build.ts",
73
+ "eslint": "eslint . --max-warnings=-0 --cache --cache-location node_modules/.cache/eslint",
74
+ "typecheck": "tsc",
75
+ "test": "jest"
65
76
  }
66
77
  }