@bleedingdev/modern-js-ultramodern-app-tools 3.9.3-ultramodern.10 → 3.9.3-ultramodern.12

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.
@@ -122,10 +122,11 @@ class NativeFederationDevAssetsPlugin {
122
122
  if (!safeAssetPathname(`/${manifestFile}`)) throw new Error('Unsafe native development federation manifest path');
123
123
  const publicPath = compilation.outputOptions.publicPath;
124
124
  if ('string' != typeof publicPath) throw new Error('Native development federation requires an explicit browser publicPath');
125
- const graphPrefix = (0, external_native_federation_dev_public_path_js_namespaceObject.nativeFederationDevGraphPublicPath)(publicPath);
125
+ const graphPublicPath = publicPath;
126
126
  class GraphPublicPathRuntimeModule extends core_namespaceObject.rspack.RuntimeModule {
127
127
  generate() {
128
- return `/* graph ${this.compilation?.fullHash ?? 'pending'} */\n${core_namespaceObject.rspack.RuntimeGlobals.publicPath} = ${JSON.stringify(graphPrefix)} + ${core_namespaceObject.rspack.RuntimeGlobals.getFullHash}() + "/";`;
128
+ const graph = (0, external_native_federation_dev_public_path_js_namespaceObject.nativeFederationDevGraphPublicPath)(graphPublicPath, this.compilation?.fullHash || void 0);
129
+ return `${core_namespaceObject.rspack.RuntimeGlobals.publicPath} = ${JSON.stringify(graph)};`;
129
130
  }
130
131
  constructor(){
131
132
  super('native federation graph publicPath', core_namespaceObject.rspack.RuntimeModule.STAGE_ATTACH);
@@ -134,7 +135,6 @@ class NativeFederationDevAssetsPlugin {
134
135
  }
135
136
  compilation.hooks.additionalTreeRuntimeRequirements.tap(name, (chunk, requirements)=>{
136
137
  if (chunk.name !== this.container) return;
137
- requirements.add(core_namespaceObject.rspack.RuntimeGlobals.getFullHash);
138
138
  requirements.add(core_namespaceObject.rspack.RuntimeGlobals.publicPath);
139
139
  compilation.addRuntimeModule(chunk, new GraphPublicPathRuntimeModule());
140
140
  });
@@ -72,10 +72,11 @@ class NativeFederationDevAssetsPlugin {
72
72
  if (!safeAssetPathname(`/${manifestFile}`)) throw new Error('Unsafe native development federation manifest path');
73
73
  const publicPath = compilation.outputOptions.publicPath;
74
74
  if ('string' != typeof publicPath) throw new Error('Native development federation requires an explicit browser publicPath');
75
- const graphPrefix = nativeFederationDevGraphPublicPath(publicPath);
75
+ const graphPublicPath = publicPath;
76
76
  class GraphPublicPathRuntimeModule extends rspack.RuntimeModule {
77
77
  generate() {
78
- return `/* graph ${this.compilation?.fullHash ?? 'pending'} */\n${rspack.RuntimeGlobals.publicPath} = ${JSON.stringify(graphPrefix)} + ${rspack.RuntimeGlobals.getFullHash}() + "/";`;
78
+ const graph = nativeFederationDevGraphPublicPath(graphPublicPath, this.compilation?.fullHash || void 0);
79
+ return `${rspack.RuntimeGlobals.publicPath} = ${JSON.stringify(graph)};`;
79
80
  }
80
81
  constructor(){
81
82
  super('native federation graph publicPath', rspack.RuntimeModule.STAGE_ATTACH);
@@ -84,7 +85,6 @@ class NativeFederationDevAssetsPlugin {
84
85
  }
85
86
  compilation.hooks.additionalTreeRuntimeRequirements.tap(name, (chunk, requirements)=>{
86
87
  if (chunk.name !== this.container) return;
87
- requirements.add(rspack.RuntimeGlobals.getFullHash);
88
88
  requirements.add(rspack.RuntimeGlobals.publicPath);
89
89
  compilation.addRuntimeModule(chunk, new GraphPublicPathRuntimeModule());
90
90
  });
@@ -73,10 +73,11 @@ class NativeFederationDevAssetsPlugin {
73
73
  if (!safeAssetPathname(`/${manifestFile}`)) throw new Error('Unsafe native development federation manifest path');
74
74
  const publicPath = compilation.outputOptions.publicPath;
75
75
  if ('string' != typeof publicPath) throw new Error('Native development federation requires an explicit browser publicPath');
76
- const graphPrefix = nativeFederationDevGraphPublicPath(publicPath);
76
+ const graphPublicPath = publicPath;
77
77
  class GraphPublicPathRuntimeModule extends rspack.RuntimeModule {
78
78
  generate() {
79
- return `/* graph ${this.compilation?.fullHash ?? 'pending'} */\n${rspack.RuntimeGlobals.publicPath} = ${JSON.stringify(graphPrefix)} + ${rspack.RuntimeGlobals.getFullHash}() + "/";`;
79
+ const graph = nativeFederationDevGraphPublicPath(graphPublicPath, this.compilation?.fullHash || void 0);
80
+ return `${rspack.RuntimeGlobals.publicPath} = ${JSON.stringify(graph)};`;
80
81
  }
81
82
  constructor(){
82
83
  super('native federation graph publicPath', rspack.RuntimeModule.STAGE_ATTACH);
@@ -85,7 +86,6 @@ class NativeFederationDevAssetsPlugin {
85
86
  }
86
87
  compilation.hooks.additionalTreeRuntimeRequirements.tap(name, (chunk, requirements)=>{
87
88
  if (chunk.name !== this.container) return;
88
- requirements.add(rspack.RuntimeGlobals.getFullHash);
89
89
  requirements.add(rspack.RuntimeGlobals.publicPath);
90
90
  compilation.addRuntimeModule(chunk, new GraphPublicPathRuntimeModule());
91
91
  });
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "directory": "packages/solutions/ultramodern-app-tools"
12
12
  },
13
13
  "license": "MIT",
14
- "version": "3.9.3-ultramodern.10",
14
+ "version": "3.9.3-ultramodern.12",
15
15
  "files": [
16
16
  "dist",
17
17
  "src",
@@ -149,36 +149,36 @@
149
149
  "node": ">=26.12.0"
150
150
  },
151
151
  "dependencies": {
152
- "@modern-js/app-tools": "npm:@bleedingdev/modern-js-app-tools@3.9.3-ultramodern.10",
153
- "@modern-js/app-tools-extensions": "npm:@bleedingdev/modern-js-app-tools-extensions@3.9.3-ultramodern.10",
154
- "@modern-js/backend-federation-contracts": "npm:@bleedingdev/modern-js-backend-federation-contracts@3.9.3-ultramodern.10",
155
- "@modern-js/builder": "npm:@bleedingdev/modern-js-builder@3.9.3-ultramodern.10",
156
- "@modern-js/federation-runtime": "npm:@bleedingdev/modern-js-federation-runtime@3.9.3-ultramodern.10",
157
- "@modern-js/plugin": "npm:@bleedingdev/modern-js-plugin@3.9.3-ultramodern.10",
158
- "@modern-js/plugin-bff-build-extensions": "npm:@bleedingdev/modern-js-plugin-bff-build-extensions@3.9.3-ultramodern.10",
159
- "@modern-js/renderer-core": "npm:@bleedingdev/modern-js-renderer-core@3.9.3-ultramodern.10",
160
- "@modern-js/runtime-extensions": "npm:@bleedingdev/modern-js-runtime-extensions@3.9.3-ultramodern.10",
161
- "@modern-js/runtime-utils": "npm:@bleedingdev/modern-js-runtime-utils@3.9.3-ultramodern.10",
162
- "@modern-js/server-core": "npm:@bleedingdev/modern-js-server-core@3.9.3-ultramodern.10",
163
- "@modern-js/server-runtime-extensions": "npm:@bleedingdev/modern-js-server-runtime-extensions@3.9.3-ultramodern.10",
164
- "@modern-js/surface-resolution": "npm:@bleedingdev/modern-js-surface-resolution@3.9.3-ultramodern.10",
165
- "@modern-js/types": "npm:@bleedingdev/modern-js-types@3.9.3-ultramodern.10",
166
- "@modern-js/utils": "npm:@bleedingdev/modern-js-utils@3.9.3-ultramodern.10",
152
+ "@modern-js/app-tools": "npm:@bleedingdev/modern-js-app-tools@3.9.3-ultramodern.12",
153
+ "@modern-js/app-tools-extensions": "npm:@bleedingdev/modern-js-app-tools-extensions@3.9.3-ultramodern.12",
154
+ "@modern-js/backend-federation-contracts": "npm:@bleedingdev/modern-js-backend-federation-contracts@3.9.3-ultramodern.12",
155
+ "@modern-js/builder": "npm:@bleedingdev/modern-js-builder@3.9.3-ultramodern.12",
156
+ "@modern-js/federation-runtime": "npm:@bleedingdev/modern-js-federation-runtime@3.9.3-ultramodern.12",
157
+ "@modern-js/plugin": "npm:@bleedingdev/modern-js-plugin@3.9.3-ultramodern.12",
158
+ "@modern-js/plugin-bff-build-extensions": "npm:@bleedingdev/modern-js-plugin-bff-build-extensions@3.9.3-ultramodern.12",
159
+ "@modern-js/renderer-core": "npm:@bleedingdev/modern-js-renderer-core@3.9.3-ultramodern.12",
160
+ "@modern-js/runtime-extensions": "npm:@bleedingdev/modern-js-runtime-extensions@3.9.3-ultramodern.12",
161
+ "@modern-js/runtime-utils": "npm:@bleedingdev/modern-js-runtime-utils@3.9.3-ultramodern.12",
162
+ "@modern-js/server-core": "npm:@bleedingdev/modern-js-server-core@3.9.3-ultramodern.12",
163
+ "@modern-js/server-runtime-extensions": "npm:@bleedingdev/modern-js-server-runtime-extensions@3.9.3-ultramodern.12",
164
+ "@modern-js/surface-resolution": "npm:@bleedingdev/modern-js-surface-resolution@3.9.3-ultramodern.12",
165
+ "@modern-js/types": "npm:@bleedingdev/modern-js-types@3.9.3-ultramodern.12",
166
+ "@modern-js/utils": "npm:@bleedingdev/modern-js-utils@3.9.3-ultramodern.12",
167
167
  "@rsbuild/core": "2.2.13",
168
168
  "@types/babel__core": "^7.20.5",
169
169
  "prettier": "~3.9.10"
170
170
  },
171
171
  "devDependencies": {
172
- "@modern-js/i18n-integration": "npm:@bleedingdev/modern-js-i18n-integration@3.9.3-ultramodern.10",
173
- "@modern-js/plugin-bff": "npm:@bleedingdev/modern-js-plugin-bff@3.9.3-ultramodern.10",
174
- "@modern-js/plugin-tanstack": "npm:@bleedingdev/modern-js-plugin-tanstack@3.9.3-ultramodern.10",
175
- "@modern-js/prod-server": "npm:@bleedingdev/modern-js-prod-server@3.9.3-ultramodern.10",
176
- "@modern-js/renderer-octane": "npm:@bleedingdev/modern-js-renderer-octane@3.9.3-ultramodern.10",
177
- "@modern-js/renderer-solid": "npm:@bleedingdev/modern-js-renderer-solid@3.9.3-ultramodern.10",
178
- "@modern-js/runtime": "npm:@bleedingdev/modern-js-runtime@3.9.3-ultramodern.10",
179
- "@modern-js/runtime-renderer-extensions": "npm:@bleedingdev/modern-js-runtime-renderer-extensions@3.9.3-ultramodern.10",
180
- "@modern-js/server": "npm:@bleedingdev/modern-js-server@3.9.3-ultramodern.10",
181
- "@modern-js/tsconfig": "npm:@bleedingdev/modern-js-tsconfig@3.9.3-ultramodern.10",
172
+ "@modern-js/i18n-integration": "npm:@bleedingdev/modern-js-i18n-integration@3.9.3-ultramodern.12",
173
+ "@modern-js/plugin-bff": "npm:@bleedingdev/modern-js-plugin-bff@3.9.3-ultramodern.12",
174
+ "@modern-js/plugin-tanstack": "npm:@bleedingdev/modern-js-plugin-tanstack@3.9.3-ultramodern.12",
175
+ "@modern-js/prod-server": "npm:@bleedingdev/modern-js-prod-server@3.9.3-ultramodern.12",
176
+ "@modern-js/renderer-octane": "npm:@bleedingdev/modern-js-renderer-octane@3.9.3-ultramodern.12",
177
+ "@modern-js/renderer-solid": "npm:@bleedingdev/modern-js-renderer-solid@3.9.3-ultramodern.12",
178
+ "@modern-js/runtime": "npm:@bleedingdev/modern-js-runtime@3.9.3-ultramodern.12",
179
+ "@modern-js/runtime-renderer-extensions": "npm:@bleedingdev/modern-js-runtime-renderer-extensions@3.9.3-ultramodern.12",
180
+ "@modern-js/server": "npm:@bleedingdev/modern-js-server@3.9.3-ultramodern.12",
181
+ "@modern-js/tsconfig": "npm:@bleedingdev/modern-js-tsconfig@3.9.3-ultramodern.12",
182
182
  "@octanejs/rspack-plugin": "https://github.com/BleedingDev/octane/releases/download/ultramodern-octane-2383d2ab1e70/octanejs-rspack-plugin-0.2.4.tgz",
183
183
  "@rsbuild/plugin-svgr": "2.0.5",
184
184
  "@rslib/core": "1.0.3",
@@ -238,11 +238,11 @@
238
238
  "ultramodern": "bin/ultramodern.mjs"
239
239
  },
240
240
  "peerDependencies": {
241
- "@modern-js/i18n-integration": "3.9.3-ultramodern.10",
242
- "@modern-js/renderer-octane": "3.9.3-ultramodern.10",
243
- "@modern-js/renderer-solid": "3.9.3-ultramodern.10",
244
- "@modern-js/runtime": "3.9.3-ultramodern.10",
245
- "@modern-js/runtime-renderer-extensions": "3.9.3-ultramodern.10",
241
+ "@modern-js/i18n-integration": "3.9.3-ultramodern.12",
242
+ "@modern-js/renderer-octane": "3.9.3-ultramodern.12",
243
+ "@modern-js/renderer-solid": "3.9.3-ultramodern.12",
244
+ "@modern-js/runtime": "3.9.3-ultramodern.12",
245
+ "@modern-js/runtime-renderer-extensions": "3.9.3-ultramodern.12",
246
246
  "@rsbuild/plugin-svgr": "2.0.5",
247
247
  "typescript": "7.0.2"
248
248
  },
@@ -151,7 +151,7 @@ export class NativeFederationDevAssetsPlugin {
151
151
  throw new Error(
152
152
  'Native development federation requires an explicit browser publicPath',
153
153
  );
154
- const graphPrefix = nativeFederationDevGraphPublicPath(publicPath);
154
+ const graphPublicPath = publicPath;
155
155
  class GraphPublicPathRuntimeModule extends rspack.RuntimeModule {
156
156
  constructor() {
157
157
  super(
@@ -164,17 +164,20 @@ export class NativeFederationDevAssetsPlugin {
164
164
  }
165
165
  generate() {
166
166
  // Rspack generates once before its full hash exists, then regenerates
167
- // fullHash modules during final hashing. Keep the native hash getter
168
- // in the executable path; the completed hash changes this module's
169
- // source so HMR includes and re-executes it on every changed graph.
170
- return `/* graph ${this.compilation?.fullHash ?? 'pending'} */\n${rspack.RuntimeGlobals.publicPath} = ${JSON.stringify(graphPrefix)} + ${rspack.RuntimeGlobals.getFullHash}() + "/";`;
167
+ // fullHash modules during final hashing. Emit that completed graph
168
+ // directly: HMR may execute this module before installing its new
169
+ // hash getter, so reading the getter can address a different graph.
170
+ const graph = nativeFederationDevGraphPublicPath(
171
+ graphPublicPath,
172
+ this.compilation?.fullHash || undefined,
173
+ );
174
+ return `${rspack.RuntimeGlobals.publicPath} = ${JSON.stringify(graph)};`;
171
175
  }
172
176
  }
173
177
  compilation.hooks.additionalTreeRuntimeRequirements.tap(
174
178
  name,
175
179
  (chunk, requirements) => {
176
180
  if (chunk.name !== this.container) return;
177
- requirements.add(rspack.RuntimeGlobals.getFullHash);
178
181
  requirements.add(rspack.RuntimeGlobals.publicPath);
179
182
  compilation.addRuntimeModule(
180
183
  chunk,