Skip to content
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
30 changes: 10 additions & 20 deletions apps/fluent-tester/metro.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @format
*/

const path = require('path');
const path = require('node:path');
const { exclusionList, makeMetroConfig, resolveUniqueModule } = require('@rnx-kit/metro-config');
const MetroSymlinksResolver = require('@rnx-kit/metro-resolver-symlinks');

Expand All @@ -20,7 +20,8 @@ function pathForRegex(...parts) {

const excludeMixins = [];
const extraNodeModules = {};
function ensureUniqueModule(moduleName, excludeList, nodeModules) {

function ensureUniqueModule(moduleName) {
const [nmEntry, excludePattern] = resolveUniqueModule(moduleName);
excludeMixins.push(excludePattern);
extraNodeModules[moduleName] = nmEntry;
Expand All @@ -30,31 +31,19 @@ function ensureUniqueModule(moduleName, excludeList, nodeModules) {
['react-native-svg'].forEach((moduleName) => ensureUniqueModule(moduleName));

const blockList = exclusionList([
// This stops "react-native run-windows" from causing the metro server to
// crash if its already running. This should also cover /.*\/.vs\/.*/, as .vs folders go next to the .sln file
new RegExp(`${pathForRegex(__dirname, 'windows')}.*`),

// Workaround for `EPERM: operation not permitted, lstat '~\midl-MIDLRT-cl.read.1.tlog'`
/.*\.tlog$/,

// Workaround for `EBUSY: resource busy or locked, open '~\msbuild.ProjectImports.zip'`
/.*\.ProjectImports\.zip$/,

// Exclude other test apps
new RegExp(`${pathForRegex(__dirname, '../win32')}.*`),
new RegExp(pathForRegex(__dirname, '../win32')),

// Exclude build output directory
new RegExp(`${pathForRegex(__dirname, 'dist')}.*`),
new RegExp(pathForRegex(__dirname, 'dist')),

...excludeMixins,
]);

let config = makeMetroConfig({
resolver: {
blockList,
extraNodeModules: {
...extraNodeModules,
},
extraNodeModules,
resolveRequest: MetroSymlinksResolver(),
},
transformer: {
Expand All @@ -63,6 +52,7 @@ let config = makeMetroConfig({
},
});

(config.resolver.assetExts = [...config.resolver.assetExts.filter((ext) => ext !== 'svg'), 'ttf', 'otf', 'png']),
(config.resolver.sourceExts = [...config.resolver.sourceExts, 'svg']),
(module.exports = config);
config.resolver.assetExts = [...config.resolver.assetExts.filter((ext) => ext !== 'svg'), 'ttf', 'otf', 'png'];
config.resolver.sourceExts = [...config.resolver.sourceExts, 'svg'];

module.exports = config;
22 changes: 11 additions & 11 deletions apps/fluent-tester/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,22 @@
}
},
"scripts": {
"android": "react-native run-android",
"android": "rnx-cli run --platform android",
"build": "fluentui-scripts build",
"bundle": "react-native rnx-bundle --dev false",
"bundle:android": "react-native rnx-bundle --dev false --platform android",
"bundle:ios": "react-native rnx-bundle --dev false --platform ios",
"bundle:macos": "react-native rnx-bundle --dev false --platform macos",
"bundle:windows": "react-native rnx-bundle --dev false --platform windows",
"bundle": "rnx-cli bundle --dev false",
"bundle:android": "rnx-cli bundle --dev false --platform android",
"bundle:ios": "rnx-cli bundle --dev false --platform ios",
"bundle:macos": "rnx-cli bundle --dev false --platform macos",
"bundle:windows": "rnx-cli bundle --dev false --platform windows",
"clean": "fluentui-scripts clean",
"depcheck": "fluentui-scripts depcheck",
"ios": "react-native run-ios",
"ios": "rnx-cli run --platform ios",
"just": "fluentui-scripts",
"lint": "fluentui-scripts eslint",
"macos": "react-native run-macos --scheme FluentTester",
"macos": "rnx-cli run --platform macos",
"prettier": "fluentui-scripts prettier",
"prettier-fix": "fluentui-scripts prettier --fix true",
"start": "react-native rnx-start",
"start": "rnx-cli start",
"windows": "react-native run-windows --arch x64 --sln windows/FluentTester.sln"
},
"repository": {
Expand Down Expand Up @@ -99,7 +99,7 @@
"react": "18.2.0",
"react-native": "^0.74.0",
"react-native-macos": "^0.74.0",
"react-native-svg": "^15.4.0",
"react-native-svg": ">=15.4.0 <15.13.0",
"react-native-windows": "^0.74.0"
},
"devDependencies": {
Expand All @@ -116,7 +116,7 @@
"@react-native/babel-preset": "^0.74.0",
"@react-native/metro-babel-transformer": "^0.74.0",
"@react-native/metro-config": "^0.74.0",
"@rnx-kit/cli": "^0.18.9",
"@rnx-kit/cli": "^0.18.14",
"@rnx-kit/metro-config": "^2.1.0",
"@rnx-kit/metro-resolver-symlinks": "^0.2.5",
"@types/jasmine": "5.1.4",
Expand Down
10 changes: 5 additions & 5 deletions apps/win32/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
"clean": "fluentui-scripts clean",
"depcheck": "fluentui-scripts depcheck",
"lint": "fluentui-scripts eslint",
"start": "react-native rnx-start",
"bundle": "react-native rnx-bundle --dev false",
"bundle-dev": "react-native rnx-bundle",
"start": "rnx-cli start",
"bundle": "rnx-cli bundle --dev false",
"bundle-dev": "rnx-cli bundle",
"run-win32": "rex-win32 --bundle index.win32 --component FluentTester --basePath ./dist --useDirectDebugger --windowTitle \"FluentUI Tester\" --pluginProps --debugBundlePath index --jsEngine v8",
"run-win32-dev": "rex-win32 --bundle index --component FluentTester --basePath ./dist --useDirectDebugger --windowTitle \"FluentUI Tester\" --pluginProps --debugBundlePath index --jsEngine v8 --useFastRefresh",
"run-win32-devmain-dev": "rex-win32 --bundle index --component FluentTester --basePath ./dist --useDirectDebugger --windowTitle \"FluentUI Tester\" --pluginProps --debugBundlePath index --jsEngine v8 --useFastRefresh --useDevMain",
Expand All @@ -37,7 +37,7 @@
"@fluentui-react-native/tester": "workspace:*",
"react": "18.2.0",
"react-native": "^0.74.0",
"react-native-svg": "^15.4.0"
"react-native-svg": ">=15.4.0 <15.13.0"
},
"devDependencies": {
"@babel/core": "^7.20.0",
Expand All @@ -48,7 +48,7 @@
"@react-native/babel-preset": "^0.74.0",
"@react-native/metro-babel-transformer": "^0.74.0",
"@react-native/metro-config": "^0.74.0",
"@rnx-kit/cli": "^0.18.9",
"@rnx-kit/cli": "^0.18.14",
"@rnx-kit/metro-config": "^2.1.0",
"@rnx-kit/metro-resolver-symlinks": "^0.2.5",
"@types/react": "^18.2.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "Migrate to `@rnx-kit/cli`",
"packageName": "@fluentui/react-native",
"email": "4123478+tido64@users.noreply.github.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "Lock down `react-native-svg` version to avoid breaking changes",
"packageName": "@fluentui-react-native/avatar",
"email": "4123478+tido64@users.noreply.github.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "Lock down `react-native-svg` version to avoid breaking changes",
"packageName": "@fluentui-react-native/badge",
"email": "4123478+tido64@users.noreply.github.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "Lock down `react-native-svg` version to avoid breaking changes",
"packageName": "@fluentui-react-native/button",
"email": "4123478+tido64@users.noreply.github.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "Lock down `react-native-svg` version to avoid breaking changes",
"packageName": "@fluentui-react-native/checkbox",
"email": "4123478+tido64@users.noreply.github.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "Lock down `react-native-svg` version to avoid breaking changes",
"packageName": "@fluentui-react-native/chip",
"email": "4123478+tido64@users.noreply.github.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "Lock down `react-native-svg` version to avoid breaking changes",
"packageName": "@fluentui-react-native/contextual-menu",
"email": "4123478+tido64@users.noreply.github.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "Lock down `react-native-svg` version to avoid breaking changes",
"packageName": "@fluentui-react-native/dependency-profiles",
"email": "4123478+tido64@users.noreply.github.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "Lock down `react-native-svg` version to avoid breaking changes",
"packageName": "@fluentui-react-native/divider",
"email": "4123478+tido64@users.noreply.github.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "Lock down `react-native-svg` version to avoid breaking changes",
"packageName": "@fluentui-react-native/dropdown",
"email": "4123478+tido64@users.noreply.github.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "Lock down `react-native-svg` version to avoid breaking changes",
"packageName": "@fluentui-react-native/experimental-activity-indicator",
"email": "4123478+tido64@users.noreply.github.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "Lock down `react-native-svg` version to avoid breaking changes",
"packageName": "@fluentui-react-native/experimental-checkbox",
"email": "4123478+tido64@users.noreply.github.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "Lock down `react-native-svg` version to avoid breaking changes",
"packageName": "@fluentui-react-native/experimental-menu-button",
"email": "4123478+tido64@users.noreply.github.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "Lock down `react-native-svg` version to avoid breaking changes",
"packageName": "@fluentui-react-native/experimental-shimmer",
"email": "4123478+tido64@users.noreply.github.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "Migrate to `@rnx-kit/cli`",
"packageName": "@fluentui-react-native/framework",
"email": "4123478+tido64@users.noreply.github.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "Lock down `react-native-svg` version to avoid breaking changes",
"packageName": "@fluentui-react-native/icon",
"email": "4123478+tido64@users.noreply.github.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "Lock down `react-native-svg` version to avoid breaking changes",
"packageName": "@fluentui-react-native/input",
"email": "4123478+tido64@users.noreply.github.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "Lock down `react-native-svg` version to avoid breaking changes",
"packageName": "@fluentui-react-native/menu",
"email": "4123478+tido64@users.noreply.github.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "Lock down `react-native-svg` version to avoid breaking changes",
"packageName": "@fluentui-react-native/menu-button",
"email": "4123478+tido64@users.noreply.github.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "Lock down `react-native-svg` version to avoid breaking changes",
"packageName": "@fluentui-react-native/notification",
"email": "4123478+tido64@users.noreply.github.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "Lock down `react-native-svg` version to avoid breaking changes",
"packageName": "@fluentui-react-native/overflow",
"email": "4123478+tido64@users.noreply.github.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "Lock down `react-native-svg` version to avoid breaking changes",
"packageName": "@fluentui-react-native/radio-group",
"email": "4123478+tido64@users.noreply.github.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "Lock down `react-native-svg` version to avoid breaking changes",
"packageName": "@fluentui-react-native/spinner",
"email": "4123478+tido64@users.noreply.github.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "Lock down `react-native-svg` version to avoid breaking changes",
"packageName": "@fluentui-react-native/tablist",
"email": "4123478+tido64@users.noreply.github.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "Migrate to `@rnx-kit/cli`",
"packageName": "@fluentui-react-native/tester",
"email": "4123478+tido64@users.noreply.github.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "Migrate to `@rnx-kit/cli`",
"packageName": "@fluentui-react-native/tester-win32",
"email": "4123478+tido64@users.noreply.github.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "Lock down `react-native-svg` version to avoid breaking changes",
"packageName": "@fluentui-react-native/tooltip",
"email": "4123478+tido64@users.noreply.github.com",
"dependentChangeType": "none"
}
4 changes: 2 additions & 2 deletions packages/components/Avatar/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"react": "18.2.0",
"react-native": "^0.74.0",
"react-native-macos": "^0.74.0",
"react-native-svg": "^15.4.0",
"react-native-svg": ">=15.4.0 <15.13.0",
"react-native-windows": "^0.74.0",
"react-test-renderer": "18.2.0"
},
Expand All @@ -65,7 +65,7 @@
"react": "18.2.0",
"react-native": "^0.73.0 || ^0.74.0",
"react-native-macos": "^0.73.0 || ^0.74.0",
"react-native-svg": "^15.0.0 || ^15.4.0",
"react-native-svg": ">=15.0.0 <15.13.0 || >=15.4.0 <15.13.0",
"react-native-windows": "^0.73.0 || ^0.74.0"
},
"rnx-kit": {
Expand Down
4 changes: 2 additions & 2 deletions packages/components/Badge/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"react": "18.2.0",
"react-native": "^0.74.0",
"react-native-macos": "^0.74.0",
"react-native-svg": "^15.4.0",
"react-native-svg": ">=15.4.0 <15.13.0",
"react-native-windows": "^0.74.0",
"react-test-renderer": "18.2.0"
},
Expand All @@ -63,7 +63,7 @@
"react": "18.2.0",
"react-native": "^0.73.0 || ^0.74.0",
"react-native-macos": "^0.73.0 || ^0.74.0",
"react-native-svg": "^15.0.0 || ^15.4.0",
"react-native-svg": ">=15.0.0 <15.13.0 || >=15.4.0 <15.13.0",
"react-native-windows": "^0.73.0 || ^0.74.0"
},
"sideEffects": false,
Expand Down
Loading