Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[0.72] Bump Metro to 0.76.2, cherry pick Metro config updates #36976

Merged
merged 3 commits into from
Apr 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@
"jest": "^29.2.1",
"jest-junit": "^10.0.0",
"jscodeshift": "^0.14.0",
"metro-babel-register": "0.75.1",
"metro-memory-fs": "0.75.1",
"metro-react-native-babel-transformer": "0.75.1",
"metro-babel-register": "0.76.2",
"metro-memory-fs": "0.76.2",
"metro-react-native-babel-transformer": "0.76.2",
"mkdirp": "^0.5.1",
"mock-fs": "^5.1.4",
"prettier": "^2.4.1",
Expand Down
15 changes: 5 additions & 10 deletions packages/metro-config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
* @noformat
*/

/*:: import type {ConfigT} from 'metro-config'; */
/*:: import type {MetroConfig} from 'metro-config'; */

const {getDefaultConfig: getBaseConfig, mergeConfig} = require('metro-config');
const {mergeConfig} = require('metro-config');

const INTERNAL_CALLSITES_REGEX = new RegExp(
[
Expand All @@ -37,12 +37,12 @@ const INTERNAL_CALLSITES_REGEX = new RegExp(
*/
function getDefaultConfig(
projectRoot /*: string */
) /*: ConfigT */ {
const config = {
) /*: MetroConfig */ {
return {
resolver: {
resolverMainFields: ['react-native', 'browser', 'main'],
platforms: ['android', 'ios'],
unstable_conditionNames: ['require', 'react-native'],
unstable_conditionNames: ['require', 'import', 'react-native'],
},
serializer: {
getPolyfills: () => require('@react-native/js-polyfills')(),
Expand Down Expand Up @@ -76,11 +76,6 @@ function getDefaultConfig(
},
watchFolders: [],
};

return mergeConfig(
getBaseConfig.getDefaultValues(projectRoot),
config,
);
}

module.exports = {getDefaultConfig, mergeConfig};
8 changes: 4 additions & 4 deletions packages/metro-config/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native/metro-config",
"version": "0.72.1",
"version": "0.72.2",
"description": "Metro configuration for React Native.",
"repository": {
"type": "git",
Expand All @@ -11,8 +11,8 @@
"exports": "./index.js",
"dependencies": {
"@react-native/js-polyfills": "^0.72.1",
"metro-config": "0.76.0",
"metro-react-native-babel-transformer": "0.76.0",
"metro-runtime": "0.76.0"
"metro-config": "0.76.2",
"metro-react-native-babel-transformer": "0.76.2",
"metro-runtime": "0.76.2"
}
}
10 changes: 5 additions & 5 deletions packages/react-native/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@
},
"dependencies": {
"@jest/create-cache-key-function": "^29.2.1",
"@react-native-community/cli": "11.1.1",
"@react-native-community/cli-platform-android": "11.1.1",
"@react-native-community/cli-platform-ios": "11.1.1",
"@react-native-community/cli": "11.2.0",
"@react-native-community/cli-platform-android": "11.2.0",
"@react-native-community/cli-platform-ios": "11.2.0",
"@react-native/assets-registry": "^0.72.0",
"@react-native/codegen": "^0.72.4",
"@react-native/gradle-plugin": "^0.72.6",
Expand All @@ -98,8 +98,8 @@
"jest-environment-node": "^29.2.1",
"jsc-android": "^250231.0.0",
"memoize-one": "^5.0.0",
"metro-runtime": "0.76.0",
"metro-source-map": "0.76.0",
"metro-runtime": "0.76.2",
"metro-source-map": "0.76.2",
"mkdirp": "^0.5.1",
"nullthrows": "^1.1.1",
"pretty-format": "^26.5.2",
Expand Down
5 changes: 2 additions & 3 deletions packages/react-native/template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,14 @@
"@babel/preset-env": "^7.20.0",
"@babel/runtime": "^7.12.5",
"@react-native/eslint-config": "^0.72.1",
"@react-native/metro-config": "^0.72.1",
"@react-native/metro-config": "^0.72.2",
"@tsconfig/react-native": "^2.0.2",
"@types/metro-config": "^0.76.1",
"@types/react": "^18.0.24",
"@types/react-test-renderer": "^18.0.0",
"babel-jest": "^29.2.1",
"eslint": "^8.19.0",
"jest": "^29.2.1",
"metro-react-native-babel-preset": "0.76.0",
"metro-react-native-babel-preset": "0.76.2",
"prettier": "^2.4.1",
"react-test-renderer": "18.2.0",
"typescript": "4.8.4"
Expand Down
Loading