Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
feat: upgrade rn version and fix native first resolution issue
  • Loading branch information
yusufyildirim committed Apr 7, 2025
commit e8ebc4923799ffb64404e463561f32451cd20cd5
2 changes: 1 addition & 1 deletion e2e/addons/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"@playwright/test": "^1.44.1",
"axe-playwright": "^2.0.1",
"cross-env": "^7.0.3",
"expo": "^51.0.26",
"expo": "^52.0.37",
"metro-runtime": "^0.80.10",
"query-string": "^9.0.0",
"react": "^18.3.1",
Expand Down
2 changes: 1 addition & 1 deletion e2e/babel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"@playwright/test": "^1.44.1",
"@vitejs/plugin-react": "^4.3.0",
"cross-env": "^7.0.3",
"expo": "^51.0.26",
"expo": "^52.0.37",
"metro-runtime": "^0.80.10",
"react": "^18.3.1",
"react-dom": "^18.3.1"
Expand Down
2 changes: 1 addition & 1 deletion e2e/baseweb/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"autoprefixer": "^10.4.19",
"baseui": "^14.0.0",
"cross-env": "^7.0.3",
"expo": "^51.0.26",
"expo": "^52.0.37",
"metro-runtime": "^0.80.10",
"postcss": "^8.4.38",
"react": "^18.3.1",
Expand Down
2 changes: 1 addition & 1 deletion e2e/config-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@ladle/react": "workspace:*",
"@playwright/test": "^1.44.1",
"cross-env": "^7.0.3",
"expo": "^51.0.26",
"expo": "^52.0.37",
"metro-runtime": "^0.80.10",
"react": "^18.3.1",
"react-dom": "^18.3.1"
Expand Down
2 changes: 1 addition & 1 deletion e2e/config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@ladle/react": "workspace:*",
"@playwright/test": "^1.44.1",
"cross-env": "^7.0.3",
"expo": "^51.0.26",
"expo": "^52.0.37",
"metro-runtime": "^0.80.10",
"react": "^18.3.1",
"react-dom": "^18.3.1"
Expand Down
2 changes: 1 addition & 1 deletion e2e/css/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"@playwright/test": "^1.44.1",
"autoprefixer": "^10.4.19",
"cross-env": "^7.0.3",
"expo": "^51.0.26",
"expo": "^52.0.37",
"metro-runtime": "^0.80.10",
"postcss": "^8.4.38",
"react": "^18.3.1",
Expand Down
2 changes: 1 addition & 1 deletion e2e/decorators/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@ladle/react": "workspace:*",
"@playwright/test": "^1.44.1",
"cross-env": "^7.0.3",
"expo": "^51.0.26",
"expo": "^52.0.37",
"metro-runtime": "^0.80.10",
"react": "^18.3.1",
"react-dom": "^18.3.1"
Expand Down
2 changes: 1 addition & 1 deletion e2e/msw/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"autoprefixer": "^10.4.19",
"baseui": "^14.0.0",
"cross-env": "^7.0.3",
"expo": "^51.0.26",
"expo": "^52.0.37",
"metro-runtime": "^0.80.10",
"postcss": "^8.4.38",
"react": "^18.3.1",
Expand Down
2 changes: 1 addition & 1 deletion e2e/playwright/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@playwright/test": "^1.44.1",
"@types/sync-fetch": "^0.4.3",
"cross-env": "^7.0.3",
"expo": "^51.0.26",
"expo": "^52.0.37",
"metro-runtime": "^0.80.10",
"react": "^18.3.1",
"react-dom": "^18.3.1",
Expand Down
2 changes: 1 addition & 1 deletion e2e/programmatic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"@ladle/react": "workspace:*",
"@playwright/test": "^1.44.1",
"cross-env": "^7.0.3",
"expo": "^51.0.26",
"expo": "^52.0.37",
"metro-runtime": "^0.80.10",
"react": "^18.3.1",
"react-dom": "^18.3.1"
Expand Down
2 changes: 1 addition & 1 deletion e2e/provider/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@ladle/react": "workspace:*",
"@playwright/test": "^1.44.1",
"cross-env": "^7.0.3",
"expo": "^51.0.26",
"expo": "^52.0.37",
"metro-runtime": "^0.80.10",
"react": "^18.3.1",
"react-dom": "^18.3.1"
Expand Down
17 changes: 9 additions & 8 deletions packages/example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,25 @@
"serve": "ladle serve",
"build": "ladle build",
"lint": "echo 'no lint'",
"test": "echo 'no test'"
"test": "echo 'no test'",
"start": "expo start"
},
"dependencies": {
"@expo/metro-runtime": "^3.2.1",
"@expo/metro-runtime": "^4.0.1",
"@ladle/react": "workspace:*",
"@react-native/assets-registry": "^0.75.2",
"expo": "^51.0.26",
"metro-runtime": "^0.80.10",
"@react-native/assets-registry": "0.77.1",
"expo": "^52.0.37",
"metro-runtime": "^0.81.4",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-native": "^0.74.5",
"react-native": "^0.77.2",
"react-native-svg": "^15.5.0",
"react-native-svg-transformer": "^1.5.0",
"react-native-web": "^0.19.12"
"react-native-web": "^0.19.13"
},
"devDependencies": {
"@babel/core": "7.24.0",
"@babel/runtime": "7.24.0",
"@react-native/metro-config": "^0.74.87"
"@react-native/metro-config": "^0.77.2"
}
}
3 changes: 2 additions & 1 deletion packages/ladle/lib/cli/metro-base.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ export async function getBaseMetroConfig(port, ladleConfig) {
* @param {string} platform
*/
resolveRequest(context, moduleName, platform) {
const newCtx = { ...context, preferNativePlatform: false };
// Redirecting '/ladle.bundle' requests to the actual entry file.
//
// We have a pseudo bundle name called `ladle.bundle`.
Expand Down Expand Up @@ -96,7 +97,7 @@ export async function getBaseMetroConfig(port, ladleConfig) {
}

// Fall back to standard resolution for other modules
return context.resolveRequest(context, moduleName, platform);
return newCtx.resolveRequest(newCtx, moduleName, platform);
},
},
transformer: {
Expand Down
5 changes: 4 additions & 1 deletion packages/ladle/lib/cli/metro-prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,10 @@ const metroProd = async (ladleConfig, configFolder) => {
*/
const { code: bundle } = await metroServer.build({
...Server.DEFAULT_BUNDLE_OPTIONS,
entryFile: path.relative(projectRoot, entryFilePath),
entryFile: path.relative(
metroConfig?.server?.unstable_serverRoot || metroConfig.projectRoot,
entryFilePath,
),
dev: false,
minify: false,
platform: "web",
Expand Down
Loading