Thanks to visit codestin.com
Credit goes to github.com

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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
- Simplify `AppDelegate.m` logic in to align with Expo's template. ([#263](https://github.com/expo/orbit/pull/263) by [@gabrieldonadel](https://github.com/gabrieldonadel))
- Migrate AppDelegate to Swift. ([#264](https://github.com/expo/orbit/pull/264) by [@gabrieldonadel](https://github.com/gabrieldonadel))
- Enable react compiler. ([#272](https://github.com/expo/orbit/pull/272) by [@gabrieldonadel](https://github.com/gabrieldonadel))
- Upgrade `react-native-svg-transformer` to 1.5.1 ([#273](https://github.com/expo/orbit/pull/273) by [@gabrieldonadel](https://github.com/gabrieldonadel))

## 2.0.4 — 2025-06-02

Expand Down
20 changes: 9 additions & 11 deletions apps/menu-bar/macos/ExpoMenuBar.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "if [[ -f \"$PODS_ROOT/../.xcode.env\" ]]; then\n source \"$PODS_ROOT/../.xcode.env\"\nfi\nif [[ -f \"$PODS_ROOT/../.xcode.env.local\" ]]; then\n source \"$PODS_ROOT/../.xcode.env.local\"\nfi \n\nexport PROJECT_ROOT=\"$PODS_ROOT/../../\"\n\nif [[ -z \"$ENTRY_FILE\" ]]; then \n # Set the entry JS file using the bundler's entry resolution.\n export ENTRY_FILE=\"$(\"$NODE_BINARY\" -e \"require('expo/scripts/resolveAppEntry')\" \"$PROJECT_ROOT\" ios absolute | tail -n 1)\"\nfi\n\npath=\"$($NODE_BINARY --print \"require.resolve('react-native-macos/package.json')\")\"\n$(dirname \"$path\")/scripts/react-native-xcode.sh\n";
shellScript = "if [[ -f \"$PODS_ROOT/../.xcode.env\" ]]; then\n source \"$PODS_ROOT/../.xcode.env\"\nfi\nif [[ -f \"$PODS_ROOT/../.xcode.env.local\" ]]; then\n source \"$PODS_ROOT/../.xcode.env.local\"\nfi \n\n# The project root by default is one level up from the ios directory\nexport PROJECT_ROOT=\"$PROJECT_DIR\"/..\n\nif [[ \"$CONFIGURATION\" = *Debug* ]]; then\n export SKIP_BUNDLING=1\nfi\n\n\nif [[ -z \"$ENTRY_FILE\" ]]; then\n # Set the entry JS file using the bundler's entry resolution.\n export ENTRY_FILE=\"$(\"$NODE_BINARY\" -e \"require('expo/scripts/resolveAppEntry')\" \"$PROJECT_ROOT\" ios absolute | tail -n 1)\"\nfi\n\nif [[ -z \"$CLI_PATH\" ]]; then\n # Use Expo CLI\n export CLI_PATH=\"$(\"$NODE_BINARY\" --print \"require.resolve('@expo/cli', { paths: [require.resolve('expo/package.json')] })\")\"\nfi\nif [[ -z \"$BUNDLE_COMMAND\" ]]; then\n # Default Expo CLI command for bundling\n export BUNDLE_COMMAND=\"export:embed\"\nfi\n \n`\"$NODE_BINARY\" --print \"require('path').dirname(require.resolve('react-native-macos/package.json')) + '/scripts/react-native-xcode.sh'\"`\n";
};
381D8A6F24576A6C00465D17 /* Start Packager */ = {
isa = PBXShellScriptBuildPhase;
Expand Down Expand Up @@ -432,14 +432,10 @@
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-ExpoMenuBar-macOS/Pods-ExpoMenuBar-macOS-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
inputPaths = (
);
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-ExpoMenuBar-macOS/Pods-ExpoMenuBar-macOS-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-ExpoMenuBar-macOS/Pods-ExpoMenuBar-macOS-frameworks.sh\"\n";
Expand Down Expand Up @@ -491,14 +487,10 @@
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-ExpoMenuBar-macOS/Pods-ExpoMenuBar-macOS-resources-${CONFIGURATION}-input-files.xcfilelist",
);
inputPaths = (
);
name = "[CP] Copy Pods Resources";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-ExpoMenuBar-macOS/Pods-ExpoMenuBar-macOS-resources-${CONFIGURATION}-output-files.xcfilelist",
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-ExpoMenuBar-macOS/Pods-ExpoMenuBar-macOS-resources.sh\"\n";
Expand Down Expand Up @@ -570,7 +562,10 @@
"@executable_path/Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
OTHER_CFLAGS = "$(inherited) ";
OTHER_CFLAGS = (
"$(inherited)",
" ",
);
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand Down Expand Up @@ -608,7 +603,10 @@
"@executable_path/Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
OTHER_CFLAGS = "$(inherited) ";
OTHER_CFLAGS = (
"$(inherited)",
" ",
);
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand Down
93 changes: 45 additions & 48 deletions apps/menu-bar/metro.config.js
Original file line number Diff line number Diff line change
@@ -1,57 +1,54 @@
// Learn more https://docs.expo.dev/guides/customizing-metro/
const { getDefaultConfig } = require('expo/metro-config');
const path = require('path');

const projectRoot = __dirname;
const workspaceRoot = path.resolve(projectRoot, '../..');

/** @type {import('expo/metro-config').MetroConfig} */
const config = getDefaultConfig(__dirname);
const {
resolver: { sourceExts, assetExts },
} = config;
const monorepoRoot = path.join(__dirname, '../..');

module.exports = {
...config,
watchFolders: [workspaceRoot],
resolver: {
...config.resolver,
disableHierarchicalLookup: true,
nodeModulesPaths: [
path.resolve(projectRoot, 'node_modules'),
path.resolve(workspaceRoot, 'node_modules'),
],
assetExts: assetExts.filter((ext) => ext !== 'svg'),
sourceExts: [...sourceExts, 'svg'],
// Minimize the "watched" folders that Metro crawls through to speed up Metro in big monorepos.
// Note, omitting folders disables Metro from resolving files within these folders
// This also happens when symlinks falls within these folders, but the real location doesn't.
config.watchFolders = [
__dirname, // Allow Metro to resolve all files within this project
path.join(monorepoRoot, 'packages'), // Allow Metro to resolve all workspace files of the monorepo
path.join(monorepoRoot, 'node_modules'), // Allow Metro to resolve "shared" `node_modules` of the monorepo
];

resolveRequest: (context, moduleName, platform) => {
if (
platform === 'macos' &&
(moduleName === 'react-native' || moduleName.startsWith('react-native/'))
) {
const newModuleName = moduleName.replace('react-native', 'react-native-macos');
return context.resolveRequest(context, newModuleName, platform);
}
return context.resolveRequest(context, moduleName, platform);
},
},
transformer: {
...config.transformer,
babelTransformerPath: require.resolve('react-native-svg-transformer'),
getTransformOptions: async () => ({
transform: {
experimentalImportSupport: true,
inlineRequires: true,
},
}),
},
serializer: {
...config.serializer,
getModulesRunBeforeMainModule() {
return [
require.resolve('react-native/Libraries/Core/InitializeCore'),
require.resolve('react-native-macos/Libraries/Core/InitializeCore'),
...config.serializer.getModulesRunBeforeMainModule(),
];
},
config.resolver.assetExts = config.resolver.assetExts.filter((ext) => ext !== 'svg');
config.resolver.sourceExts = [
...config.resolver.sourceExts,
'svg', // react-native-svg-transformer
];

config.resolver.resolveRequest = (context, moduleName, platform) => {
if (
platform === 'macos' &&
(moduleName === 'react-native' || moduleName.startsWith('react-native/'))
) {
const newModuleName = moduleName.replace('react-native', 'react-native-macos');
return context.resolveRequest(context, newModuleName, platform);
}
return context.resolveRequest(context, moduleName, platform);
};

config.transformer.babelTransformerPath = require.resolve('react-native-svg-transformer/expo');
config.transformer.getTransformOptions = async () => ({
transform: {
experimentalImportSupport: true,
inlineRequires: true,
},
});

const originalGetModulesRunBeforeMainModule = config.serializer.getModulesRunBeforeMainModule;
config.serializer.getModulesRunBeforeMainModule = () => {
try {
return [
require.resolve('react-native/Libraries/Core/InitializeCore'),
require.resolve('react-native-macos/Libraries/Core/InitializeCore'),
];
} catch {}
return originalGetModulesRunBeforeMainModule();
};

module.exports = config;
2 changes: 1 addition & 1 deletion apps/menu-bar/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"jest": "^29.6.3",
"jest-expo": "~53.0.5",
"prettier": "^3.0.2",
"react-native-svg-transformer": "^1.3.0",
"react-native-svg-transformer": "^1.5.1",
"react-test-renderer": "18.2.0",
"typescript": "~5.8.3"
},
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11941,10 +11941,10 @@ react-native-mmkv@^2.10.2:
resolved "https://registry.yarnpkg.com/react-native-mmkv/-/react-native-mmkv-2.12.2.tgz#4bba0f5f04e2cf222494cce3a9794ba6a4894dee"
integrity sha512-6058Aq0p57chPrUutLGe9fYoiDVDNMU2PKV+lLFUJ3GhoHvUrLdsS1PDSCLr00yqzL4WJQ7TTzH+V8cpyrNcfg==

react-native-svg-transformer@^1.3.0:
version "1.5.0"
resolved "https://registry.yarnpkg.com/react-native-svg-transformer/-/react-native-svg-transformer-1.5.0.tgz#75ae4dbdc4b1a1508e75282d54d66900ee5fe3c2"
integrity sha512-RG5fSWJT7mjCQYocgYFUo1KYPLOoypPVG5LQab+pZZO7m4ciGaQIe0mhok3W4R5jLQsEXKo0u+aQGkZV/bZG7w==
react-native-svg-transformer@^1.5.1:
version "1.5.1"
resolved "https://registry.yarnpkg.com/react-native-svg-transformer/-/react-native-svg-transformer-1.5.1.tgz#04467563becbea65b8e576df7e33c9a9a86961e8"
integrity sha512-dFvBNR8A9VPum9KCfh+LE49YiJEF8zUSnEFciKQroR/bEOhlPoZA0SuQ0qNk7m2iZl2w59FYjdRe0pMHWMDl0Q==
dependencies:
"@svgr/core" "^8.1.0"
"@svgr/plugin-jsx" "^8.1.0"
Expand Down