Skip to content

Commit

Permalink
Update to react-native 0.72 (#3216)
Browse files Browse the repository at this point in the history
* Update to react-native 0.72

* Change files

* fix metro config

* fix
  • Loading branch information
acoates-ms authored Nov 9, 2023
1 parent 9f26e83 commit 4a6a9cd
Show file tree
Hide file tree
Showing 192 changed files with 2,497 additions and 1,351 deletions.
9 changes: 5 additions & 4 deletions apps/E2E/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,15 @@
],
"dependencies": {
"react": "18.2.0",
"react-native": "^0.71.0"
"react-native": "^0.72.0"
},
"devDependencies": {
"@babel/core": "^7.8.0",
"@babel/runtime": "^7.8.0",
"@fluentui-react-native/eslint-config-rules": "^0.1.1",
"@fluentui-react-native/focus-zone": "^0.15.0",
"@fluentui-react-native/scripts": "^0.1.1",
"@react-native/metro-config": "^0.72.0",
"@rnx-kit/metro-config": "^1.3.1",
"@types/jasmine": "3.10.3",
"@types/react": "^18.2.0",
Expand All @@ -44,8 +45,8 @@
"appium-uiautomator2-driver": "^2.29.0",
"appium-windows-driver": "^2.12.0",
"appium-xcuitest-driver": "^5.6.0",
"metro-config": "^0.73.7",
"metro-react-native-babel-preset": "^0.73.7",
"metro-config": "^0.76.5",
"metro-react-native-babel-preset": "^0.76.5",
"rimraf": "^5.0.1",
"ts-node": "^8.10.1",
"typescript": "4.9.4",
Expand All @@ -61,7 +62,7 @@
"microsoft/react-native"
],
"requirements": [
"react-native@0.71"
"react-native@0.72"
],
"capabilities": [
"core",
Expand Down
44 changes: 16 additions & 28 deletions apps/fluent-tester/metro.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
*/

const path = require('path');
const { defaultWatchFolders, exclusionList, resolveUniqueModule } = require('@rnx-kit/metro-config');
const { getDefaultConfig } = require('metro-config');
const { exclusionList, makeMetroConfig, resolveUniqueModule } = require('@rnx-kit/metro-config');

const [reactIs, reactIsExcludePattern] = resolveUniqueModule('react-is');

Expand Down Expand Up @@ -37,30 +36,19 @@ const blockList = exclusionList([
reactIsExcludePattern,
]);

module.exports = (async () => {
const {
resolver: { sourceExts, assetExts },
} = await getDefaultConfig();
return {
watchFolders: defaultWatchFolders(),
resolver: {
assetExts: [...assetExts.filter((ext) => ext !== 'svg'), 'ttf', 'otf', 'png'],
sourceExts: [...sourceExts, 'svg'],
blacklistRE: blockList,
blockList,
extraNodeModules: {
'react-is': reactIs,
},
let config = makeMetroConfig({
resolver: {
blockList,
extraNodeModules: {
'react-is': reactIs,
},
transformer: {
// This transformer selects between the regular transformer and svg transformer depending on the file type
babelTransformerPath: require.resolve('react-native-svg-transformer'),
getTransformOptions: async () => ({
transform: {
experimentalImportSupport: false,
inlineRequires: false,
},
}),
},
};
})();
},
transformer: {
// This transformer selects between the regular transformer and svg transformer depending on the file type
babelTransformerPath: require.resolve('react-native-svg-transformer'),
},
});

(config.resolver.assetExts = [...config.resolver.assetExts.filter((ext) => ext !== 'svg'), 'ttf', 'otf', 'png']),
(config.resolver.sourceExts = [...config.resolver.sourceExts, 'svg']),
(module.exports = config);
19 changes: 10 additions & 9 deletions apps/fluent-tester/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,10 @@
"@react-native-picker/picker": "^2.2.1",
"@warren-ms/react-native-icons": "^0.0.13",
"react": "18.2.0",
"react-native": "^0.71.0",
"react-native-macos": "^0.71.0",
"react-native-svg": "^13.9.0",
"react-native-windows": "^0.71.0",
"react-native": "^0.72.0",
"react-native-macos": "^0.72.0",
"react-native-svg": "^13.14.0",
"react-native-windows": "^0.72.0",
"tslib": "^2.3.1"
},
"devDependencies": {
Expand All @@ -101,20 +101,21 @@
"@fluentui-react-native/eslint-config-rules": "^0.1.1",
"@fluentui-react-native/focus-zone": "^0.15.0",
"@fluentui-react-native/scripts": "^0.1.1",
"@react-native/metro-config": "^0.72.0",
"@rnx-kit/cli": "^0.16.2",
"@rnx-kit/metro-config": "^1.3.1",
"@types/jasmine": "3.10.3",
"@wdio/jasmine-framework": "7.26.0",
"flow-bin": "^0.113.0",
"metro-config": "^0.73.7",
"metro-react-native-babel-preset": "^0.73.7",
"metro-config": "^0.76.5",
"metro-react-native-babel-preset": "^0.76.5",
"react-native-svg-transformer": "^1.0.0",
"react-native-test-app": "^2.5.15",
"react-native-test-app": "^2.5.5",
"react-test-renderer": "18.2.0",
"webdriverio": "7.30.1"
},
"peerDependencies": {
"@office-iss/react-native-win32": "^0.71.0"
"@office-iss/react-native-win32": "^0.72.0"
},
"jest": {
"preset": "react-native"
Expand Down Expand Up @@ -173,7 +174,7 @@
"@fluentui-react-native/scripts/align-deps-preset.js"
],
"requirements": [
"react-native@0.71"
"react-native@0.72"
],
"capabilities": [
"core-android",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import type { TestSection, PlatformStatus } from '../Test';
import { Test } from '../Test';

const BasicUsage: React.FunctionComponent = () => {
function spacingExample(tokenName: string, spacing?: number | string) {
function spacingExample(tokenName: string, spacing?: number) {
return (
<View>
<Text>
Expand Down
13 changes: 7 additions & 6 deletions apps/win32/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,21 @@
"dependencies": {
"@fluentui-react-native/tester": "^0.157.10",
"react": "18.2.0",
"react-native": "^0.71.0",
"react-native-svg": "^13.9.0",
"react-native": "^0.72.0",
"react-native-svg": "^13.14.0",
"tslib": "^2.3.1"
},
"devDependencies": {
"@fluentui-react-native/eslint-config-rules": "^0.1.1",
"@fluentui-react-native/scripts": "^0.1.1",
"@office-iss/react-native-win32": "^0.71.0",
"@office-iss/react-native-win32": "^0.72.0",
"@office-iss/rex-win32": "0.71.41-devmain.17024.10000",
"@react-native/metro-config": "^0.72.0",
"@rnx-kit/cli": "^0.16.2",
"@rnx-kit/metro-config": "^1.3.1",
"@types/react": "^18.2.0",
"metro-config": "^0.73.7",
"metro-react-native-babel-preset": "^0.73.7",
"metro-config": "^0.76.5",
"metro-react-native-babel-preset": "^0.76.5",
"react-native-svg-transformer": "^1.0.0",
"react-test-renderer": "18.2.0",
"rimraf": "^5.0.1",
Expand Down Expand Up @@ -90,7 +91,7 @@
"microsoft/react-native"
],
"requirements": [
"react-native@0.71"
"react-native@0.72"
],
"capabilities": [
"babel-preset-react-native",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "Update to react-native 0.72",
"packageName": "@fluentui-react-native/adapters",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "Update to react-native 0.72",
"packageName": "@fluentui-react-native/android-theme",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "Update to react-native 0.72",
"packageName": "@fluentui-react-native/apple-theme",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "Update to react-native 0.72",
"packageName": "@fluentui-react-native/avatar",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "Update to react-native 0.72",
"packageName": "@fluentui-react-native/badge",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "Update to react-native 0.72",
"packageName": "@fluentui-react-native/button",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "Update to react-native 0.72",
"packageName": "@fluentui/react-native",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "Update to react-native 0.72",
"packageName": "@fluentui-react-native/callout",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "Update to react-native 0.72",
"packageName": "@fluentui-react-native/checkbox",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "Update to react-native 0.72",
"packageName": "@fluentui-react-native/chip",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "Update to react-native 0.72",
"packageName": "@fluentui-react-native/component-cache",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "Update to react-native 0.72",
"packageName": "@fluentui-react-native/composition",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "Update to react-native 0.72",
"packageName": "@fluentui-react-native/contextual-menu",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "Update to react-native 0.72",
"packageName": "@fluentui-react-native/default-theme",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "Update to react-native 0.72",
"packageName": "@fluentui-react-native/dependency-profiles",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "Update to react-native 0.72",
"packageName": "@fluentui-react-native/divider",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "Update to react-native 0.72",
"packageName": "@fluentui-react-native/drawer",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "Update to react-native 0.72",
"packageName": "@fluentui-react-native/dropdown",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "Update to react-native 0.72",
"packageName": "@fluentui-react-native/e2e-testing",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "Update to react-native 0.72",
"packageName": "@fluentui-react-native/experimental-activity-indicator",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "Update to react-native 0.72",
"packageName": "@fluentui-react-native/experimental-appearance-additions",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "Update to react-native 0.72",
"packageName": "@fluentui-react-native/experimental-avatar",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "Update to react-native 0.72",
"packageName": "@fluentui-react-native/experimental-button",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "Update to react-native 0.72",
"packageName": "@fluentui-react-native/experimental-checkbox",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "Update to react-native 0.72",
"packageName": "@fluentui-react-native/experimental-expander",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "Update to react-native 0.72",
"packageName": "@fluentui-react-native/experimental-link",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Loading

0 comments on commit 4a6a9cd

Please sign in to comment.