Skip to content

Commit 1ed213f

Browse files
Fix dependencies, create config packages, and implement depcheck --fix-errors (#3948)
* create a more robust depcheck implementation * fix missing eslint config dependencies * apply depcheck fix to directories to fix error level issues * fix missing deps for private packages * applying package updates * JSX runtime (part 2 of 3) - more formal rendering logic for both classic and new jsx runtimes (#3947) * rework jsx helpers for both new and old runtimes * implement both new and old render patterns for classic and jsx-runtimes * Change files * move package README.md files to be next to the source code * update documentation * Change files * prettier format updates to documentation * tweak documentation just a bit * applying package updates * apply more dependency fixes * JSX runtime (part 2 of 3) - more formal rendering logic for both classic and new jsx runtimes (#3947) * rework jsx helpers for both new and old runtimes * implement both new and old render patterns for classic and jsx-runtimes * Change files * move package README.md files to be next to the source code * update documentation * Change files * prettier format updates to documentation * tweak documentation just a bit * applying package updates * switch to pnpm and fix to build stage * fix dependencies up through linting * fix babel and jest configs and add dedicated babel config package * split jest configurations into a separate package * fix more tests * move repo to pnpm, create babel and jest config packages, fix dependencies * Change files * add missing @types/jest devDependency * fix ios/mac pod install * fix align-deps issue * fix more align-deps / depcheck issues * switch back to node-modules temporarily to deal with appium issues as a separate pr * add build fixes for node-modules linking * revert podfiles to non-pnpm behavior, fix prettier issues, respond to PR feedback --------- Co-authored-by: UI-Fabric-RN-Bot <uifrnbot@microsoft.com>
1 parent 06d3374 commit 1ed213f

364 files changed

Lines changed: 2880 additions & 1622 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.yarnrc.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,18 @@ enableGlobalCache: false
44

55
nodeLinker: node-modules
66

7+
packageExtensions:
8+
"@svgr/core@*":
9+
dependencies:
10+
"@svgr/plugin-jsx": "*"
11+
"@svgr/plugin-svgo": "*"
12+
react-native-svg@*:
13+
dependencies:
14+
buffer: "*"
15+
716
plugins:
817
- checksum: 672e525b81762c6162366bd3ffec5e86ab8fac2655ef0267047e86a0f32e79a4bde0f170bc30479663f40aa3f006d91f8dc3289f679dd4dc5ae5a5d12ba3ad0b
918
path: .yarn/plugins/@rnx-kit/yarn-plugin-dynamic-extensions.cjs
10-
spec: 'https://raw.githubusercontent.com/microsoft/rnx-kit/main/incubator/yarn-plugin-dynamic-extensions/index.js'
19+
spec: "https://raw.githubusercontent.com/microsoft/rnx-kit/main/incubator/yarn-plugin-dynamic-extensions/index.js"
1120

1221
yarnPath: .yarn/releases/yarn-4.9.2.cjs

apps/E2E/tsconfig.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
"extends": "@fluentui-react-native/scripts/configs/tsconfig.json",
33
"compilerOptions": {
44
"baseUrl": ".",
5-
"importHelpers": true,
65
"outDir": "lib",
76
"paths": {
87
"*": ["*", "*.win32", "./*"],
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
module.exports = require('@fluentui-react-native/scripts/configs/babel.config');
1+
module.exports = require('@fluentui-react-native/babel-config');
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
const { configureReactNativeJest } = require('@fluentui-react-native/scripts');
1+
const { configureReactNativeJest } = require('@fluentui-react-native/jest-config');
22
module.exports = configureReactNativeJest('android');

apps/component-generator/component-templates/ComponentTemplate/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@
2424
},
2525
"dependencies": {},
2626
"devDependencies": {
27+
"@fluentui-react-native/babel-config": "workspace:*",
2728
"@fluentui-react-native/eslint-config-rules": "workspace:*",
29+
"@fluentui-react-native/jest-config": "workspace:*",
2830
"@fluentui-react-native/test-tools": "workspace:*",
2931
"@fluentui-react-native/scripts": "workspace:*",
3032
"react": "18.2.0",

apps/fluent-tester/ios/Podfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1+
# (pnpm-mode) ENV['REACT_NATIVE_NODE_MODULES_DIR'] = File.join(__dir__, '../node_modules')
2+
3+
# (pnpm-mode) require_relative '../node_modules/react-native-test-app/test_app'
14
require_relative '../../../node_modules/react-native-test-app/test_app'
25

36
workspace 'FluentTester.xcworkspace'
47

8+
# (pnpm-mode) react_native_path = "#{__dir__}/../node_modules/react-native"
59
react_native_path = "#{__dir__}/../../../node_modules/react-native"
610

711
use_test_app! do |target|
812
target.app do
913
platform :ios, '15.0'
10-
11-
# There is a bug where autolinking isn't working, so specify these manually.
12-
pod 'FRNAppearanceAdditions', :path => '../../../packages/experimental/AppearanceAdditions/FRNAppearanceAdditions.podspec'
13-
pod 'FRNFontMetrics', :path => '../../../packages/experimental/NativeFontMetrics/FRNFontMetrics.podspec'
1414
end
1515
end

apps/fluent-tester/ios/Podfile.lock

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ PODS:
33
- DoubleConversion (1.1.6)
44
- FBLazyVector (0.74.7)
55
- fmt (9.1.0)
6-
- FRNAppearanceAdditions (0.7.2):
6+
- FRNAppearanceAdditions (0.7.11):
77
- React
8-
- FRNAvatar (0.21.4):
8+
- FRNAvatar (0.21.13):
99
- MicrosoftFluentUI (= 0.13.1)
1010
- React
11-
- FRNDatePicker (0.11.0):
11+
- FRNDatePicker (0.11.4):
1212
- MicrosoftFluentUI (= 0.13.1)
1313
- React
14-
- FRNFontMetrics (0.6.0):
14+
- FRNFontMetrics (0.6.4):
1515
- React
1616
- glog (0.3.5)
1717
- MicrosoftFluentUI (0.13.1):
@@ -1080,7 +1080,7 @@ PODS:
10801080
- React-debug
10811081
- react-native-menu (0.7.3):
10821082
- React
1083-
- react-native-slider (4.5.3):
1083+
- react-native-slider (4.5.7):
10841084
- DoubleConversion
10851085
- glog
10861086
- RCT-Folly (= 2024.01.01.00)
@@ -1351,10 +1351,10 @@ DEPENDENCIES:
13511351
- DoubleConversion (from `../../../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
13521352
- FBLazyVector (from `../../../node_modules/react-native/Libraries/FBLazyVector`)
13531353
- fmt (from `../../../node_modules/react-native/third-party-podspecs/fmt.podspec`)
1354-
- FRNAppearanceAdditions (from `../../../packages/experimental/AppearanceAdditions/FRNAppearanceAdditions.podspec`)
1355-
- "FRNAvatar (from `../../../node_modules/@fluentui-react-native/experimental-avatar`)"
1356-
- "FRNDatePicker (from `../../../node_modules/@fluentui-react-native/experimental-native-date-picker`)"
1357-
- FRNFontMetrics (from `../../../packages/experimental/NativeFontMetrics/FRNFontMetrics.podspec`)
1354+
- "FRNAppearanceAdditions (from `../node_modules/@fluentui-react-native/experimental-appearance-additions`)"
1355+
- "FRNAvatar (from `../node_modules/@fluentui-react-native/experimental-avatar`)"
1356+
- "FRNDatePicker (from `../node_modules/@fluentui-react-native/experimental-native-date-picker`)"
1357+
- "FRNFontMetrics (from `../node_modules/@fluentui-react-native/experimental-native-font-metrics`)"
13581358
- glog (from `../../../node_modules/react-native/third-party-podspecs/glog.podspec`)
13591359
- RCT-Folly (from `../../../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`)
13601360
- RCT-Folly/Fabric (from `../../../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`)
@@ -1428,13 +1428,13 @@ EXTERNAL SOURCES:
14281428
fmt:
14291429
:podspec: "../../../node_modules/react-native/third-party-podspecs/fmt.podspec"
14301430
FRNAppearanceAdditions:
1431-
:path: "../../../packages/experimental/AppearanceAdditions/FRNAppearanceAdditions.podspec"
1431+
:path: "../node_modules/@fluentui-react-native/experimental-appearance-additions"
14321432
FRNAvatar:
1433-
:path: "../../../node_modules/@fluentui-react-native/experimental-avatar"
1433+
:path: "../node_modules/@fluentui-react-native/experimental-avatar"
14341434
FRNDatePicker:
1435-
:path: "../../../node_modules/@fluentui-react-native/experimental-native-date-picker"
1435+
:path: "../node_modules/@fluentui-react-native/experimental-native-date-picker"
14361436
FRNFontMetrics:
1437-
:path: "../../../packages/experimental/NativeFontMetrics/FRNFontMetrics.podspec"
1437+
:path: "../node_modules/@fluentui-react-native/experimental-native-font-metrics"
14381438
glog:
14391439
:podspec: "../../../node_modules/react-native/third-party-podspecs/glog.podspec"
14401440
RCT-Folly:
@@ -1551,10 +1551,10 @@ SPEC CHECKSUMS:
15511551
DoubleConversion: 76ab83afb40bddeeee456813d9c04f67f78771b5
15521552
FBLazyVector: 04dc972982abebd96d823752c3a426bbe6ac397f
15531553
fmt: 4c2741a687cc09f0634a2e2c72a838b99f1ff120
1554-
FRNAppearanceAdditions: 203a3fb8929b3fe0e1d9256a5a4d88c7116fdcb9
1555-
FRNAvatar: ec4d219c71bfd3d74306a1fcf94f71393b63359f
1556-
FRNDatePicker: 6ddae28f04880d89fc609dc791943943dabba718
1557-
FRNFontMetrics: 2cb281cc763879e4c5e5d3b3ed662181689e8939
1554+
FRNAppearanceAdditions: 9d37ce1ce2df3559d0616234557b024774e59a92
1555+
FRNAvatar: 3616c78fb72770b8d972619cb9d8b9a841e6d07f
1556+
FRNDatePicker: b1dc2056dcb52614e1a1fd4054115a33130d334e
1557+
FRNFontMetrics: 4d90cf418139e1b8ad202cd190b76f36bd027eef
15581558
glog: fdfdfe5479092de0c4bdbebedd9056951f092c4f
15591559
MicrosoftFluentUI: dde98d8ed3fc306d9ddd0a6f0bc0c1f24fe5275e
15601560
RCT-Folly: 5dc73daec3476616d19e8a53f0156176f7b55461
@@ -1582,7 +1582,7 @@ SPEC CHECKSUMS:
15821582
React-logger: 58cd5ca2c3ab03a06b33e6d46a210d2b17ca116d
15831583
React-Mapbuffer: f245095650540b8ddd09ac907a79605f68b1f4d4
15841584
react-native-menu: 166490a809e627736b2dd887a564e8e6f093d128
1585-
react-native-slider: fb9f245bfade8fe24998f88133e06c5110853868
1585+
react-native-slider: ef3da51d021999dc76a1efefae60176ac4910c36
15861586
React-nativeconfig: 3b359be06d9ee8d64c1eacbca4f1040f331573fd
15871587
React-NativeModulesApple: c6259e85e61f211854e632ed3eb21f25e15651f4
15881588
React-perflogger: e9ebfc705cb9f60ef5d471637350ccab7abd0444
@@ -1613,6 +1613,6 @@ SPEC CHECKSUMS:
16131613
SocketRocket: abac6f5de4d4d62d24e11868d7a2f427e0ef940d
16141614
Yoga: 9db4b2da1ed5d8e0c94158f9ac379c8b1b529f59
16151615

1616-
PODFILE CHECKSUM: fae4d25651430550ed89e2c0320a71f5f1d40f44
1616+
PODFILE CHECKSUM: da2b0060460364a6479fbaf8e70713ef63c09b0b
16171617

16181618
COCOAPODS: 1.16.2

apps/fluent-tester/macos/Podfile

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
1+
# (pnpm-mode) ENV['REACT_NATIVE_NODE_MODULES_DIR'] = File.join(__dir__, '../node_modules')
2+
3+
# require_relative '../node_modules/react-native-test-app/macos/test_app'
14
require_relative '../../../node_modules/react-native-test-app/macos/test_app'
25

36
workspace 'FluentTester.xcworkspace'
47

8+
# (pnpm-mode) react_native_path = "#{__dir__}/../node_modules/react-native"
59
react_native_path = "#{__dir__}/../../../node_modules/react-native"
610

711
use_test_app! do |target|
812
target.app do
913
platform :osx, '12'
10-
11-
# There is a bug where autolinking isn't working, do specify these manually.
12-
pod 'FRNAvatar', :path => '../../../packages/experimental/Avatar/FRNAvatar.podspec'
13-
pod 'FRNCheckbox', :path => '../../../packages/experimental/Checkbox/FRNCheckbox.podspec'
14-
pod 'FRNMenuButton', :path => '../../../packages/components/MenuButton/FRNMenuButton.podspec'
15-
pod 'FRNRadioButton', :path => '../../../packages/components/RadioGroup/FRNRadioButton.podspec'
16-
pod 'RCTFocusZone', :path => '../../../packages/components/FocusZone/RCTFocusZone.podspec'
1714
end
1815
end

apps/fluent-tester/macos/Podfile.lock

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ PODS:
33
- DoubleConversion (1.1.6)
44
- FBLazyVector (0.74.30)
55
- fmt (9.1.0)
6-
- FRNAvatar (0.21.11):
6+
- FRNAvatar (0.21.13):
77
- MicrosoftFluentUI (= 0.13.1)
88
- React
9-
- FRNCallout (0.27.9):
9+
- FRNCallout (0.27.11):
1010
- DoubleConversion
1111
- glog
1212
- RCT-Folly (= 2024.01.01.00)
@@ -28,11 +28,11 @@ PODS:
2828
- ReactCommon/turbomodule/bridging
2929
- ReactCommon/turbomodule/core
3030
- Yoga
31-
- FRNCheckbox (0.17.16):
31+
- FRNCheckbox (0.17.18):
3232
- React
33-
- FRNMenuButton (0.13.26):
33+
- FRNMenuButton (0.13.28):
3434
- React
35-
- FRNRadioButton (0.21.23):
35+
- FRNRadioButton (0.21.25):
3636
- React
3737
- FRNVibrancyView (0.3.4):
3838
- React
@@ -123,7 +123,7 @@ PODS:
123123
- fmt (= 9.1.0)
124124
- glog
125125
- RCTDeprecation (0.74.30)
126-
- RCTFocusZone (0.21.7):
126+
- RCTFocusZone (0.21.9):
127127
- React
128128
- RCTRequired (0.74.30)
129129
- RCTTypeSafety (0.74.30):
@@ -1261,17 +1261,17 @@ DEPENDENCIES:
12611261
- DoubleConversion (from `../../../node_modules/react-native-macos/third-party-podspecs/DoubleConversion.podspec`)
12621262
- FBLazyVector (from `../../../node_modules/react-native-macos/Libraries/FBLazyVector`)
12631263
- fmt (from `../../../node_modules/react-native-macos/third-party-podspecs/fmt.podspec`)
1264-
- FRNAvatar (from `../../../packages/experimental/Avatar/FRNAvatar.podspec`)
1264+
- "FRNAvatar (from `../node_modules/@fluentui-react-native/experimental-avatar`)"
12651265
- "FRNCallout (from `../node_modules/@fluentui-react-native/callout`)"
1266-
- FRNCheckbox (from `../../../packages/experimental/Checkbox/FRNCheckbox.podspec`)
1267-
- FRNMenuButton (from `../../../packages/components/MenuButton/FRNMenuButton.podspec`)
1268-
- FRNRadioButton (from `../../../packages/components/RadioGroup/FRNRadioButton.podspec`)
1266+
- "FRNCheckbox (from `../node_modules/@fluentui-react-native/experimental-checkbox`)"
1267+
- "FRNMenuButton (from `../node_modules/@fluentui-react-native/menu-button`)"
1268+
- "FRNRadioButton (from `../node_modules/@fluentui-react-native/radio-group`)"
12691269
- "FRNVibrancyView (from `../node_modules/@fluentui-react-native/vibrancy-view`)"
12701270
- glog (from `../../../node_modules/react-native-macos/third-party-podspecs/glog.podspec`)
12711271
- RCT-Folly (from `../../../node_modules/react-native-macos/third-party-podspecs/RCT-Folly.podspec`)
12721272
- RCT-Folly/Fabric (from `../../../node_modules/react-native-macos/third-party-podspecs/RCT-Folly.podspec`)
12731273
- RCTDeprecation (from `../../../node_modules/react-native-macos/ReactApple/Libraries/RCTFoundation/RCTDeprecation`)
1274-
- RCTFocusZone (from `../../../packages/components/FocusZone/RCTFocusZone.podspec`)
1274+
- "RCTFocusZone (from `../node_modules/@fluentui-react-native/focus-zone`)"
12751275
- RCTRequired (from `../../../node_modules/react-native-macos/Libraries/Required`)
12761276
- RCTTypeSafety (from `../../../node_modules/react-native-macos/Libraries/TypeSafety`)
12771277
- React (from `../../../node_modules/react-native-macos/`)
@@ -1339,15 +1339,15 @@ EXTERNAL SOURCES:
13391339
fmt:
13401340
:podspec: "../../../node_modules/react-native-macos/third-party-podspecs/fmt.podspec"
13411341
FRNAvatar:
1342-
:path: "../../../packages/experimental/Avatar/FRNAvatar.podspec"
1342+
:path: "../node_modules/@fluentui-react-native/experimental-avatar"
13431343
FRNCallout:
13441344
:path: "../node_modules/@fluentui-react-native/callout"
13451345
FRNCheckbox:
1346-
:path: "../../../packages/experimental/Checkbox/FRNCheckbox.podspec"
1346+
:path: "../node_modules/@fluentui-react-native/experimental-checkbox"
13471347
FRNMenuButton:
1348-
:path: "../../../packages/components/MenuButton/FRNMenuButton.podspec"
1348+
:path: "../node_modules/@fluentui-react-native/menu-button"
13491349
FRNRadioButton:
1350-
:path: "../../../packages/components/RadioGroup/FRNRadioButton.podspec"
1350+
:path: "../node_modules/@fluentui-react-native/radio-group"
13511351
FRNVibrancyView:
13521352
:path: "../node_modules/@fluentui-react-native/vibrancy-view"
13531353
glog:
@@ -1357,7 +1357,7 @@ EXTERNAL SOURCES:
13571357
RCTDeprecation:
13581358
:path: "../../../node_modules/react-native-macos/ReactApple/Libraries/RCTFoundation/RCTDeprecation"
13591359
RCTFocusZone:
1360-
:path: "../../../packages/components/FocusZone/RCTFocusZone.podspec"
1360+
:path: "../node_modules/@fluentui-react-native/focus-zone"
13611361
RCTRequired:
13621362
:path: "../../../node_modules/react-native-macos/Libraries/Required"
13631363
RCTTypeSafety:
@@ -1466,17 +1466,17 @@ SPEC CHECKSUMS:
14661466
DoubleConversion: 5b92c4507c560bb62e7aa1acdf2785ea3ff08b3b
14671467
FBLazyVector: 0aa0591844f7fe4736f3aba70d30232edbd21eb5
14681468
fmt: 03574da4b7ba40de39da59677ca66610ce8c4a02
1469-
FRNAvatar: 1eccbe629f3034e2caa11f62e16db120ac3c7836
1470-
FRNCallout: 3eca65ff4ee29de3881a8402842b230626024ff6
1471-
FRNCheckbox: 1d87e81b71e6706b6e94e69ab6923e50755c4a29
1472-
FRNMenuButton: d87749093d3418d9c9377144f9e17e09af707335
1473-
FRNRadioButton: 8b6c2d6c2d5c513ce493568ac0597d114359cb57
1469+
FRNAvatar: 3616c78fb72770b8d972619cb9d8b9a841e6d07f
1470+
FRNCallout: b91d07ae396f69e77b8b2ae71501d6b6494254fa
1471+
FRNCheckbox: 23027d19870f99006ddb8eaa129f0f2af95a374c
1472+
FRNMenuButton: 5c58612fa8480cfc47f299755d5daf410dc1c4e1
1473+
FRNRadioButton: 400c56cbcafe7d2b7df5481fdba963e4ee868edd
14741474
FRNVibrancyView: 0fb5d289c2a4b934596fb26d81166151d66fa28c
14751475
glog: ba31c1afa7dcf1915a109861bccdb4421be6175b
14761476
MicrosoftFluentUI: dde98d8ed3fc306d9ddd0a6f0bc0c1f24fe5275e
14771477
RCT-Folly: f47da9a444aae485a0528b3bccf0336156009d60
14781478
RCTDeprecation: 6c1d8fdaf3e34933c33a56531bd984bc2d22ef9e
1479-
RCTFocusZone: 999b4c2acb2193fd189f9ef6d1e970c2a6676250
1479+
RCTFocusZone: 80f74daff8795ecfe3c7987c99afdd3b7545191c
14801480
RCTRequired: 5266165e3b6c7ca1554c5a75fb4c1ebe1bc60b53
14811481
RCTTypeSafety: ced894df76a17b8f7331d24e2efa862a7a616e89
14821482
React: 620dbf1e10232c8517a8b89d0def5b29e04ad24e
@@ -1529,6 +1529,6 @@ SPEC CHECKSUMS:
15291529
SocketRocket: f6c6249082c011e6de2de60ed641ef8bbe0cfac9
15301530
Yoga: bd03cda842f416ba4c2d4b79fcd0fd27e917b91e
15311531

1532-
PODFILE CHECKSUM: 1c580785758db094d8282f8e1360afc97dfac817
1532+
PODFILE CHECKSUM: 820f3959373af874ba70e1313bf6680f1a037104
15331533

15341534
COCOAPODS: 1.16.2

apps/fluent-tester/metro.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function ensureUniqueModule(moduleName, excludeList, nodeModules) {
2727
}
2828

2929
// build up the added excludes and extraNodeModules
30-
['react-is', 'invariant', '@babel/runtime', 'base64-js'].forEach((moduleName) => ensureUniqueModule(moduleName));
30+
['react-native-svg'].forEach((moduleName) => ensureUniqueModule(moduleName));
3131

3232
const blockList = exclusionList([
3333
// This stops "react-native run-windows" from causing the metro server to

0 commit comments

Comments
 (0)