Skip to content

Commit 51ec645

Browse files
chore: merge main branch and resolve conflicts
- Resolved conflict in .github/workflows/build-and-test.yml - Kept main branch version as requested 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
2 parents db97c4d + a7cf276 commit 51ec645

File tree

37 files changed

+1609
-2230
lines changed

37 files changed

+1609
-2230
lines changed

.changeset/nx-upgrade-21-2-3.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
"@module-federation/runtime": patch
3+
"@module-federation/enhanced": patch
4+
"@module-federation/rspack": patch
5+
"@module-federation/webpack-bundler-runtime": patch
6+
"@module-federation/sdk": patch
7+
"@module-federation/runtime-tools": patch
8+
"@module-federation/managers": patch
9+
"@module-federation/manifest": patch
10+
"@module-federation/dts-plugin": patch
11+
"@module-federation/third-party-dts-extractor": patch
12+
"@module-federation/devtools": patch
13+
"@module-federation/bridge-react": patch
14+
"@module-federation/bridge-vue3": patch
15+
"@module-federation/bridge-shared": patch
16+
"@module-federation/bridge-react-webpack-plugin": patch
17+
"@module-federation/modern-js": patch
18+
"@module-federation/retry-plugin": patch
19+
"@module-federation/data-prefetch": patch
20+
"@module-federation/rsbuild-plugin": patch
21+
"@module-federation/error-codes": patch
22+
"@module-federation/inject-external-runtime-core-plugin": patch
23+
"@module-federation/runtime-core": patch
24+
"create-module-federation": patch
25+
"@module-federation/cli": patch
26+
"@module-federation/rspress-plugin": patch
27+
---
28+
29+
chore: upgrade NX to 21.2.3, Storybook to 9.0.9, and TypeScript to 5.8.3
30+
31+
- Upgraded NX from 21.0.3 to 21.2.3 with workspace configuration updates
32+
- Migrated Storybook from 8.3.5 to 9.0.9 with updated configurations and automigrations
33+
- Upgraded TypeScript from 5.7.3 to 5.8.3 with compatibility fixes
34+
- Fixed package exports and type declaration paths across all packages
35+
- Resolved module resolution issues and TypeScript compatibility problems
36+
- Updated build configurations and dependencies to support latest versions

.github/workflows/build-and-test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,6 @@ jobs:
5555
- name: Print Number of CPU Cores
5656
run: nproc
5757

58-
- name: Build SDK with skip cache to ensure workspace deps available
59-
run: npx nx build sdk --skip-nx-cache
60-
6158
- name: Run Build for All
6259
run: npx nx run-many --targets=build --projects=tag:type:pkg --parallel=4
6360

@@ -76,6 +73,9 @@ jobs:
7673
fi
7774
done
7875
76+
- name: Warm Nx Cache
77+
run: npx nx run-many --targets=build --projects=tag:type:pkg --parallel=4
78+
7979
- name: Run Affected Test
8080
uses: nick-fields/retry@v3
8181
with:

apps/esbuild/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"scripts": {
88
"build:remote": "node build/build-mfe1.js",
99
"build:host": "node build/build-shell.js",
10-
"build": "rm -rf ./node_modules/.cache && npm run build:remote && npm run build:host",
10+
"build": "npm run build:remote && npm run build:host",
1111
"watch": "concurrently \"npm run build:remote -- --watch\" \"npm run build:host -- --watch\"",
1212
"start:remote": "live-server dist/mfe1 --port=3001 --cors",
1313
"start:host": "live-server dist/shell --port=3000",

apps/reactStorybook/.eslintrc.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
{
2-
"extends": ["plugin:@nx/react", "../../.eslintrc.json"],
2+
"extends": [
3+
"plugin:@nx/react",
4+
"../../.eslintrc.json",
5+
"plugin:storybook/recommended"
6+
],
37
"ignorePatterns": ["!**/*"],
48
"overrides": [
59
{

apps/reactStorybook/.storybook/main.js

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,24 @@
1+
const { dirname, join } = require('node:path');
2+
13
const nxModuleFederationConfig = require('../module-federation.config');
24

35
module.exports = {
46
stories: ['../src/app/**/*.mdx', '../src/app/**/*.stories.@(js|jsx|ts|tsx)'],
57

68
addons: [
7-
'@storybook/addon-essentials',
8-
'@nx/react/plugins/storybook',
9+
getAbsolutePath('@nx/react/plugins/storybook'),
910
{
10-
name: '@module-federation/storybook-addon',
11+
name: getAbsolutePath('@module-federation/storybook-addon'),
1112
options: {
1213
nxModuleFederationConfig: { ...nxModuleFederationConfig },
1314
},
1415
},
15-
'@chromatic-com/storybook',
16+
getAbsolutePath('@chromatic-com/storybook'),
17+
getAbsolutePath('@storybook/addon-docs'),
1618
],
1719

1820
framework: {
19-
name: '@storybook/nextjs',
21+
name: getAbsolutePath('@storybook/nextjs'),
2022
options: {},
2123
},
2224

@@ -30,3 +32,7 @@ module.exports = {
3032
// To customize your webpack configuration you can use the webpackFinal field.
3133
// Check https://storybook.js.org/docs/react/builders/webpack#extending-storybooks-webpack-config
3234
// and https://nx.dev/packages/storybook/documents/custom-builder-configs
35+
36+
function getAbsolutePath(value) {
37+
return dirname(require.resolve(join(value, 'package.json')));
38+
}

apps/reactStorybook/src/app/RemoteButton.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, { Suspense } from 'react';
2-
import { Meta, Story } from '@storybook/react';
2+
import { Meta, Story } from '@storybook/nextjs';
33

44
// @ts-ignore
55
const LazyButton = React.lazy(() => import('reactRemoteUI/Button'));

apps/rslib-module/.storybook/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const config: StorybookConfig = {
2525
},
2626
},
2727
{
28-
name: '@module-federation/storybook-addon/preset',
28+
name: getAbsolutePath('@module-federation/storybook-addon/preset'),
2929
options: {
3030
remotes: {
3131
'rslib-module':

package.json

Lines changed: 25 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@
7171
}
7272
},
7373
"dependencies": {
74-
"@storybook/addon-interactions": "8.6.12",
7574
"adm-zip": "0.5.16",
7675
"ansi-colors": "4.1.3",
7776
"antd": "5.19.1",
@@ -89,7 +88,7 @@
8988
"react-router-dom": "6.26.2",
9089
"regenerator-runtime": "0.14.1",
9190
"sharp": "^0.33.4",
92-
"storybook": "8.3.5",
91+
"storybook": "9.0.9",
9392
"tapable": "2.2.1",
9493
"typedoc": "0.25.8",
9594
"undici": "5.28.5",
@@ -107,24 +106,24 @@
107106
"@commitlint/cz-commitlint": "19.5.0",
108107
"@fontsource/roboto": "5.1.0",
109108
"@fontsource/roboto-mono": "5.1.0",
110-
"@nx/cypress": "21.0.3",
111-
"@nx/devkit": "21.0.3",
112-
"@nx/esbuild": "21.0.3",
113-
"@nx/eslint": "21.0.3",
114-
"@nx/eslint-plugin": "21.0.3",
115-
"@nx/express": "21.0.3",
116-
"@nx/jest": "21.0.3",
117-
"@nx/js": "21.0.3",
118-
"@nx/module-federation": "21.0.3",
119-
"@nx/next": "21.0.3",
120-
"@nx/node": "21.0.3",
121-
"@nx/react": "21.0.3",
122-
"@nx/rollup": "21.0.3",
123-
"@nx/rspack": "21.0.3",
124-
"@nx/storybook": "21.0.3",
125-
"@nx/vite": "21.0.3",
126-
"@nx/web": "21.0.3",
127-
"@nx/webpack": "21.0.3",
109+
"@nx/cypress": "21.2.3",
110+
"@nx/devkit": "21.2.3",
111+
"@nx/esbuild": "21.2.3",
112+
"@nx/eslint": "21.2.3",
113+
"@nx/eslint-plugin": "21.2.3",
114+
"@nx/express": "21.2.3",
115+
"@nx/jest": "21.2.3",
116+
"@nx/js": "21.2.3",
117+
"@nx/module-federation": "21.2.3",
118+
"@nx/next": "21.2.3",
119+
"@nx/node": "21.2.3",
120+
"@nx/react": "21.2.3",
121+
"@nx/rollup": "21.2.3",
122+
"@nx/rspack": "21.2.3",
123+
"@nx/storybook": "21.2.3",
124+
"@nx/vite": "21.2.3",
125+
"@nx/web": "21.2.3",
126+
"@nx/webpack": "21.2.3",
128127
"@pmmmwh/react-refresh-webpack-plugin": "0.5.15",
129128
"@rollup/plugin-alias": "5.1.1",
130129
"@rollup/plugin-replace": "6.0.1",
@@ -135,12 +134,7 @@
135134
"@semantic-release/git": "^10.0.1",
136135
"@semantic-release/github": "^11.0.1",
137136
"@semantic-release/npm": "^11.0.0",
138-
"@storybook/addon-essentials": "8.6.12",
139-
"@storybook/core-common": "8.6.12",
140-
"@storybook/core-server": "8.6.12",
141-
"@storybook/nextjs": "8.6.12",
142-
"@storybook/node-logger": "8.1.11",
143-
"@storybook/react": "8.6.12",
137+
"@storybook/nextjs": "9.0.9",
144138
"@svgr/webpack": "8.1.0",
145139
"@swc-node/register": "1.10.10",
146140
"@swc/cli": "0.6.0",
@@ -203,7 +197,7 @@
203197
"mime-types": "2.1.35",
204198
"msw": "^1.2.1",
205199
"node-fetch": "~3.3.2",
206-
"nx": "21.0.3",
200+
"nx": "21.2.3",
207201
"open": "^10.1.0",
208202
"postcss-calc": "9.0.1",
209203
"postcss-custom-properties": "13.3.12",
@@ -223,7 +217,7 @@
223217
"ts-jest": "29.1.5",
224218
"tslib": "2.8.1",
225219
"tsup": "7.3.0",
226-
"typescript": "5.7.3",
220+
"typescript": "5.8.3",
227221
"url-loader": "4.1.1",
228222
"verdaccio": "6.1.2",
229223
"vite": "6.3.5",
@@ -236,7 +230,9 @@
236230
"webpack-cli": "^5.1.4",
237231
"webpack-virtual-modules": "0.6.2",
238232
"whatwg-fetch": "^3.6.20",
239-
"yargs": "^17.7.2"
233+
"yargs": "^17.7.2",
234+
"eslint-plugin-storybook": "9.0.9",
235+
"@storybook/addon-docs": "9.0.17"
240236
},
241237
"config": {
242238
"commitizen": {

packages/bridge/bridge-react/src/lazy/data-fetch/runtime-plugin.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ import {
1818
} from '../constant';
1919

2020
import type { MF_DATA_FETCH_MAP_VALUE } from '../types';
21-
import type { FederationRuntimePlugin } from '@module-federation/runtime';
21+
import type { ModuleFederationRuntimePlugin } from '@module-federation/runtime';
2222

23-
const autoFetchData: () => FederationRuntimePlugin = () => {
23+
const autoFetchData: () => ModuleFederationRuntimePlugin = () => {
2424
initDataFetchMap();
2525
injectDataFetch();
2626
return {
2727
name: 'auto-fetch-data-plugin',
28-
afterLoadSnapshot(args) {
28+
afterLoadSnapshot(args: any) {
2929
const { id, moduleInfo, remoteSnapshot, host } = args;
3030
if (typeof id === 'string' && isDataLoaderExpose(id)) {
3131
return args;
@@ -68,7 +68,7 @@ const autoFetchData: () => FederationRuntimePlugin = () => {
6868
const hasSSRAsset = Boolean(remoteSnapshot.ssrRemoteEntry);
6969
const hasDataFetchClient = Boolean(
7070
remoteSnapshot.modules.find(
71-
(module) =>
71+
(module: any) =>
7272
module.moduleName === `${dataFetchName}${DATA_FETCH_CLIENT_SUFFIX}`,
7373
),
7474
);

packages/bridge/bridge-react/src/plugins/lazy-load-component-plugin.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type {
22
ModuleFederation,
3-
FederationRuntimePlugin,
3+
ModuleFederationRuntimePlugin,
44
} from '@module-federation/runtime';
55
import {
66
createLazyComponent,
@@ -24,7 +24,7 @@ declare module '@module-federation/runtime-core' {
2424
}
2525
}
2626

27-
export function lazyLoadComponentPlugin(): FederationRuntimePlugin {
27+
export function lazyLoadComponentPlugin(): ModuleFederationRuntimePlugin {
2828
return {
2929
name: 'lazy-load-component-plugin',
3030
apply(instance: ModuleFederation) {

0 commit comments

Comments
 (0)