Skip to content

Commit 2ad3429

Browse files
Apply suggested changes
Apply suggested changes
1 parent 9f537ce commit 2ad3429

File tree

7 files changed

+10
-15
lines changed

7 files changed

+10
-15
lines changed

advanced-api/automatic-vendor-sharing/app1/webpack.prod.config.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
const HtmlWebpackPlugin = require('html-webpack-plugin');
22
const { ModuleFederationPlugin, AutomaticVendorFederation } = require('@module-federation/enhanced');
3-
const path = require('path');
43

54
// Production configuration for optimized builds
65
const deps = require('./package.json').dependencies;

advanced-api/automatic-vendor-sharing/app2/webpack.prod.config.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
const HtmlWebpackPlugin = require('html-webpack-plugin');
22
const { ModuleFederationPlugin, AutomaticVendorFederation } = require('@module-federation/enhanced');
3-
const path = require('path');
43

54
// Production configuration for optimized builds
65
const deps = require('./package.json').dependencies;

advanced-api/automatic-vendor-sharing/e2e/checkAutomaticVendorApps.spec.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,7 @@ async function clickElementWithText(page: Page, selector: string, text: string)
1515
await page.click(`${selector}:has-text("${text}")`);
1616
}
1717

18-
async function checkElementBackgroundColor(page: Page, selector: string, expectedColor: string) {
19-
const element = page.locator(selector);
20-
await element.waitFor({ state: 'visible' });
21-
const backgroundColor = await element.evaluate((el) => {
22-
return window.getComputedStyle(el).backgroundColor;
23-
});
24-
expect(backgroundColor).toBe(expectedColor);
25-
}
18+
2619

2720
const appsData = [
2821
{
@@ -42,7 +35,7 @@ const appsData = [
4235
test.describe('Automatic Vendor Sharing E2E Tests', () => {
4336

4437
appsData.forEach((appData) => {
45-
const { host, appNameText, headerText, buttonColor } = appData;
38+
const { host, appNameText, headerText } = appData;
4639

4740
test.describe(`Check ${appNameText}`, () => {
4841
test(`should display ${appNameText} header and subheader correctly`, async ({ page }) => {

advanced-api/dynamic-remotes-runtime-environment-variables/host/src/hooks/useFederatedComponent.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { lazy, useEffect, useState, useCallback, useRef } from 'react';
1+
import { lazy, useEffect, useState, useCallback, useRef } from 'react';
22
import { registerRemotes, loadRemote } from '@module-federation/runtime';
33

44
// Enhanced loading function with retry logic

advanced-api/dynamic-remotes-runtime-environment-variables/remote/src/hooks/useFetchJson.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ const useFetchJson = (path, options = {}) => {
5757
const response = await Promise.race([fetchPromise, timeoutPromise]);
5858

5959
if (signal.aborted || !isMountedRef.current) {
60+
setIsLoading(false);
6061
return;
6162
}
6263

advanced-api/dynamic-remotes-synchronous-imports/app1/src/components/ErrorBoundary.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,11 @@ export class ErrorBoundary extends Component<Props, State> {
104104

105105
private handleAutoRetry = () => {
106106
this.resetTimeoutId = window.setTimeout(() => {
107-
console.log('[ErrorBoundary] Auto-retrying after error...');
108-
this.handleRetry();
107+
// Check if component is still mounted before retrying
108+
if (this.state.hasError) {
109+
console.log('[ErrorBoundary] Auto-retrying after error...');
110+
this.handleRetry();
111+
}
109112
}, 5000);
110113
};
111114

advanced-api/dynamic-remotes/e2e/checkDynamicRemotesApps.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ async function clickElementWithText(page: Page, selector: string, text: string)
3636
let attempts = 0;
3737
while (attempts < 3) {
3838
try {
39-
await element.click({ timeout: 5000, force: true });
39+
await element.click({ timeout: 5000 });
4040
break;
4141
} catch (error) {
4242
attempts++;

0 commit comments

Comments
 (0)