Skip to content

Commit e15d158

Browse files
ScriptedAlchemy2heal1claudecursoragent
authored
App router share filter (#3745)
Co-authored-by: Hanric <hanric.zhang@gmail.com> Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Cursor Agent <cursoragent@cursor.com>
1 parent e472278 commit e15d158

File tree

18 files changed

+1766
-1897
lines changed

18 files changed

+1766
-1897
lines changed

apps/runtime-demo/3008-runtime-remote/package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@
88
"preview": "rsbuild preview"
99
},
1010
"dependencies": {
11-
"@module-federation/enhanced": "workspace:*",
12-
"react": "^18.3.1",
13-
"react-dom": "^18.3.1"
11+
"@module-federation/enhanced": "workspace:*"
1412
},
1513
"devDependencies": {
1614
"@rsbuild/core": "^1.3.21",

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,6 @@
8888
"lodash.get": "4.4.2",
8989
"openai": "^4.72.0",
9090
"rambda": "7.5.0",
91-
"react": "19.0.0",
92-
"react-dom": "19.0.0",
9391
"react-router-dom": "6.26.2",
9492
"regenerator-runtime": "0.14.1",
9593
"sharp": "^0.33.4",
@@ -151,6 +149,8 @@
151149
"@swc/jest": "0.2.36",
152150
"@tailwindcss/forms": "0.5.9",
153151
"@testing-library/react": "16.1.0",
152+
"@types/react": "18.3.11",
153+
"@types/react-dom": "18.3.0",
154154
"@types/adm-zip": "0.5.5",
155155
"@types/chrome": "0.0.277",
156156
"@types/download": "8.0.5",
@@ -163,8 +163,6 @@
163163
"@types/node": "18.16.9",
164164
"@types/node-fetch": "2.6.11",
165165
"@types/pidusage": "2.0.5",
166-
"@types/react": "19.0.0",
167-
"@types/react-dom": "19.0.0",
168166
"@types/webpack-sources": "3.2.3",
169167
"@typescript-eslint/eslint-plugin": "7.18.0",
170168
"@typescript-eslint/parser": "7.18.0",
@@ -215,6 +213,8 @@
215213
"prettier-eslint": "16.3.0",
216214
"publint": "^0.2.12",
217215
"qwik-nx": "^3.1.1",
216+
"react": "18.3.1",
217+
"react-dom": "18.3.1",
218218
"react-refresh": "0.14.2",
219219
"rimraf": "^6.0.1",
220220
"rollup-plugin-copy": "3.5.0",

packages/bridge/bridge-react/package.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,10 @@
7070
},
7171
"devDependencies": {
7272
"@testing-library/react": "15.0.7",
73-
"@types/react": "19.0.0",
74-
"@types/react-dom": "19.0.0",
7573
"@vitejs/plugin-react": "^4.3.3",
7674
"@vitejs/plugin-vue": "^5.0.4",
7775
"@vitejs/plugin-vue-jsx": "^4.0.0",
7876
"jsdom": "^24.1.0",
79-
"react": "19.0.0",
80-
"react-dom": "19.0.0",
8177
"react-router-dom": "6.22.3",
8278
"typescript": "^5.2.2",
8379
"vite": "^5.4.18",

packages/chrome-devtools/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@
5959
"@module-federation/sdk": "workspace:*",
6060
"ahooks": "^3.7.10",
6161
"dagre": "^0.8.5",
62-
"react": "~19.0.0",
63-
"react-dom": "~19.0.0",
62+
"react": "^18.3.1",
63+
"react-dom": "^18.3.1",
6464
"reactflow": "11.11.4"
6565
},
6666
"devDependencies": {
@@ -77,8 +77,8 @@
7777
"@types/dagre": "^0.7.52",
7878
"@types/jest": "~29.2.4",
7979
"@types/node": "~20.12.12",
80-
"@types/react": "~19.0.0",
81-
"@types/react-dom": "~19.0.0",
80+
"@types/react": "^18.3.11",
81+
"@types/react-dom": "^18.3.1",
8282
"lint-staged": "~13.1.0",
8383
"prettier": "~3.3.3",
8484
"rimraf": "~6.0.1",

packages/data-prefetch/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,12 @@
7979
"@types/fs-extra": "9.0.6",
8080
"@types/jest": "^29.5.11",
8181
"@types/node": "^17.0.45",
82-
"@types/react": "~19.0.0",
82+
"@types/react": "^18.3.11",
8383
"jest": "^29.7.0",
8484
"jest-environment-jsdom": "^29.7.0",
8585
"minimist": "^1.2.8",
86-
"react": "19.0.0",
87-
"react-dom": "19.0.0",
86+
"react": "^18.3.1",
87+
"react-dom": "^18.3.1",
8888
"react-router": "^6.21.3",
8989
"react-test-renderer": "^18.2.0",
9090
"ts-jest": "29.0.1",

packages/modernjs/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,9 @@
138138
"@modern-js/server-runtime": "2.67.6",
139139
"@modern-js/module-tools": "2.67.6",
140140
"@modern-js/runtime": "2.67.6",
141-
"@modern-js/tsconfig": "2.67.6"
141+
"@modern-js/tsconfig": "2.67.6",
142+
"@types/react": "^18.3.11",
143+
"@types/react-dom": "^18.3.1"
142144
},
143145
"peerDependencies": {
144146
"react": ">=17",

packages/modernjs/src/runtime/AwaitDataFetch.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,9 @@ export function AwaitDataFetch<T>({
8585
}: AwaitProps<T>) {
8686
const dataRef = useRef<T | undefined>(undefined);
8787
const data = dataRef.current || resolve;
88-
const getData = isPromise(data) ? fetchData(data, dataRef) : () => data;
88+
const getData = isPromise(data)
89+
? fetchData(data as Promise<T>, dataRef)
90+
: () => data;
8991

9092
return (
9193
<AwaitSuspense

packages/modernjs/src/runtime/createRemoteComponent.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ export function createRemoteComponent<T, E extends keyof T>(
285285
id: moduleId,
286286
});
287287

288-
const Com = m[exportName] as React.FC<ComponentType>;
288+
const Com = m[exportName as string] as React.FC<ComponentType>;
289289
if (exportName in m && typeof Com === 'function') {
290290
return {
291291
default: (props: Omit<ComponentType, 'key'> & { mfData?: unknown }) => (

packages/modernjs/src/ssr-runtime/SSRLiveReload.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export function SSRLiveReload() {
1+
export function SSRLiveReload(): JSX.Element | null {
22
if (process.env.NODE_ENV !== 'development') {
33
return null;
44
}

packages/nextjs-mf/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@
4949
"@module-federation/webpack-bundler-runtime": "workspace:*"
5050
},
5151
"devDependencies": {
52-
"@types/btoa": "^1.2.5"
52+
"@types/btoa": "^1.2.5",
53+
"@types/react": "^18.3.11",
54+
"@types/react-dom": "^18.3.1"
5355
},
5456
"peerDependencies": {
5557
"next": "^15 || ^14 || ^13 || ^12",

0 commit comments

Comments
 (0)