<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="/rss.xsl.xml"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
    <title>Changes in resolveFromProject.ts</title>
    <description></description>
    <language>en</language>
    <copyright>Copyright 2015</copyright>
    <generator>Java</generator><item>
        <title>edeec536 - chore(cli): delete @expo/dev-server (#24272)</title>
        <link>http://172.16.0.5:8080/history/expo/packages/@expo/cli/src/start/server/metro/resolveFromProject.ts#edeec536</link>
        <description>chore(cli): delete @expo/dev-server (#24272)# Why- I tried this before but the logs endpoint was blocking it.- I forked the dev server when I wrote the original `expo/cli`, beenmeaning to delete the original for a while. The duplicate code andindirection is making the new server features harder to implement.&lt;!--Please describe the motivation for this PR, and link to relevant GitHubissues, forums posts, or feature requests.--&gt;# How- Copy/paste remaining code from `@expo/dev-server` in to `@expo/cli`.- Delete `@expo/dev-server`.- Drop unused `/logs` and json parser middleware.- Drop logging mocks.- Drop experimental Webpack native support.- Drop legacy react-native middleware support (no longer needed sinceeverything is versioned).&lt;!--How did you build this feature or fix this bug and why?--&gt;# Test Plan- Tests should keep passing.- Need to do some actual runs since there aren&apos;t any e2e tests forvarious parts of dev-server.&lt;!--Please describe how you tested this change and how a reviewer couldreproduce your test, especially if this PR does not include automatedtests! If possible, please also provide terminal output and/orscreenshots demonstrating your test/reproduction.--&gt;# Checklist&lt;!--Please check the appropriate items below if they apply to your diff.This is required for changes to Expo modules.--&gt;- [ ] Documentation is up to date to reflect these changes (eg:https://docs.expo.dev and README.md).- [ ] Conforms with the [Documentation Writing StyleGuide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)- [ ] This diff will work correctly for `npx expo prebuild` &amp; EAS Build(eg: updated a module plugin).---------Co-authored-by: Expo Bot &lt;34669131+expo-bot@users.noreply.github.com&gt;

            List of files:
            /expo/packages/@expo/cli/src/start/server/metro/resolveFromProject.ts</description>
        <pubDate>Wed, 06 Sep 2023 17:37:08 +0000</pubDate>
        <dc:creator>Evan Bacon &lt;bacon@expo.io&gt;</dc:creator>
    </item>
<item>
        <title>fd2402c1 - feat(cli): add monorepo asset support for export:embed (#24095)</title>
        <link>http://172.16.0.5:8080/history/expo/packages/@expo/cli/src/start/server/metro/resolveFromProject.ts#fd2402c1</link>
        <description>feat(cli): add monorepo asset support for export:embed (#24095)# Why- Pull in support for using the forked getAssets which supports`EXPO_USE_METRO_WORKSPACE_ROOT` fromhttps://github.com/expo/expo/issues/24027&lt;!--Please describe the motivation for this PR, and link to relevant GitHubissues, forums posts, or feature requests.--&gt;# How- Drop unused `--generate-static-view-configs`https://github.com/react-native-community/cli/pull/1970- Update tests to use e2e fixture which has the expo package linked to`packages`.- Disable `watch` mode on metro when bundling for embed (we do this with`npx expo export`).- Use forked `getAssets` to support `EXPO_USE_METRO_WORKSPACE_ROOT`correctly.- Drop a bunch of unused option parsing.&lt;!--How did you build this feature or fix this bug and why?--&gt;# Test Plan- E2E bundling test.&lt;!--Please describe how you tested this change and how a reviewer couldreproduce your test, especially if this PR does not include automatedtests! If possible, please also provide terminal output and/orscreenshots demonstrating your test/reproduction.--&gt;# Checklist&lt;!--Please check the appropriate items below if they apply to your diff.This is required for changes to Expo modules.--&gt;- [ ] Documentation is up to date to reflect these changes (eg:https://docs.expo.dev and README.md).- [ ] Conforms with the [Documentation Writing StyleGuide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)- [ ] This diff will work correctly for `npx expo prebuild` &amp; EAS Build(eg: updated a module plugin).---------Co-authored-by: Expo Bot &lt;34669131+expo-bot@users.noreply.github.com&gt;

            List of files:
            /expo/packages/@expo/cli/src/start/server/metro/resolveFromProject.ts</description>
        <pubDate>Thu, 24 Aug 2023 18:25:01 +0000</pubDate>
        <dc:creator>Evan Bacon &lt;bacon@expo.io&gt;</dc:creator>
    </item>
<item>
        <title>036e9444 - feat(metro-config): support any entry file in development builds that don&apos;t use Expo dev client (#21643)</title>
        <link>http://172.16.0.5:8080/history/expo/packages/@expo/cli/src/start/server/metro/resolveFromProject.ts#036e9444</link>
        <description>feat(metro-config): support any entry file in development builds that don&apos;t use Expo dev client (#21643)# Why- React Native enforces that apps must use `index.js` as the entry file,this is highly inconvenient and forces us to change the app entry on`expo prebuild` (cite: [prebuild sideeffects](https://github.com/expo/expo/blob/4d2795e/docs/pages/workflow/prebuild.mdx#side-effects)(`index.js` and `package.json` `scripts`)).- In #14964 I added support for production Android apps to use any entrypoint.- In #18381 I added the same support to iOS apps in production.- Development builds using `expo-dev-client` and Expo Go both use amanifest which support arbitrary entry points.- This just leaves development builds that don&apos;t have Expo code-loadingsupport (e.g. no manifest/index.html where the script can be changeddynamically).# How- This PR introduces the virtual entry file `.expo/.virtual-metro-entry`which should never physically exist. When this endpoint is pinged, ExpoCLI will rewrite the the URL to the correct entry point based on theproject configuration. This enables us to fully drop the prebuildside-effect as no case will require an `index.js` (`index.bundle`) asthe entry file.- The rewrite means Metro will never support a physical file located at`.expo/.virtual-metro-entry.js` as this will always be ignored. We couldsupport forwarding the request if this file exists but we&apos;ll probably gothe other way and assert if this file exists to mitigate possibleconfusion.- The name `.expo/.virtual-metro-entry.js` was chosen to be clear andlong enough that users wouldn&apos;t try to actually create this file.- I originally tried using a middleware to perform the redirect but thiswouldn&apos;t work with the HMR server which emulates pinging the endpointin-memory. Because of this, I went with the metro`server.rewriteRequestUrl` function.&gt; This feature is implemented in Expo&apos;s Metro configuration, meaning itshould apply to `npx react-native start` (but this is untested and notofficially supported).## New Setup Instructions for non-prebuild usersNon-prebuild projects will need to modify their `AppDelegate.mm` asfollows:```diff- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge{#if DEBUG-  return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@&quot;index&quot;];+  return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@&quot;.expo/.virtual-metro-entry&quot;];#else  return [[NSBundle mainBundle] URLForResource:@&quot;main&quot; withExtension:@&quot;jsbundle&quot;];#endif}```And their `android/app/src/main/java/***/MainApplication.java`:```diff      @Override      protected String getJSMainModuleName() {-        return &quot;index&quot;;+        return &quot;.expo/.virtual-metro-entry&quot;;      }```This is of course in addition to the `android/app/build.gradle`:```groovy    entryFile = file([&quot;node&quot;, &quot;-e&quot;, &quot;require(&apos;expo/scripts/resolveAppEntry&apos;)&quot;, projectRoot, &quot;android&quot;, &quot;absolute&quot;].execute(null, rootDir).text.trim())```And iOS production change:```shellScript = &quot;if [[ -f \&quot;$PODS_ROOT/../.xcode.env\&quot; ]]; then\n  source \&quot;$PODS_ROOT/../.xcode.env\&quot;\nfi\nif [[ -f \&quot;$PODS_ROOT/../.xcode.env.local\&quot; ]]; then\n  source \&quot;$PODS_ROOT/../.xcode.env.local\&quot;\nfi\n\n# The project root by default is one level up from the ios directory\nexport PROJECT_ROOT=\&quot;$PROJECT_DIR\&quot;/..\n\nif [[ \&quot;$CONFIGURATION\&quot; = *Debug* ]]; then\n  export SKIP_BUNDLING=1\nfi\nif [[ -z \&quot;$ENTRY_FILE\&quot; ]]; then\n  # Set the entry JS file using the bundler&apos;s entry resolution.\n  export ENTRY_FILE=\&quot;$(\&quot;$NODE_BINARY\&quot; -e \&quot;require(&apos;expo/scripts/resolveAppEntry&apos;)\&quot; $PROJECT_ROOT ios relative | tail -n 1)\&quot;\nfi\n\n`\&quot;$NODE_BINARY\&quot; --print \&quot;require(&apos;path&apos;).dirname(require.resolve(&apos;react-native/package.json&apos;)) + &apos;/scripts/react-native-xcode.sh&apos;\&quot;`\n\n&quot;;```# Test Plan### Continuous(-ish)- Updated the templates to use this new format.### Quick test- Start the dev server and ping the entry URL directly:-`http://localhost:8081/.expo/.virtual-metro-entry.bundle?platform=web&amp;dev=true&amp;minify=false&amp;modulesOnly=true&amp;runModule=false&amp;shallow=true`- The redirected URL should show in the `sourceURL` at the end of thefile.### E2E- Prebuild, then apply the native changes in a local projects - Use the following `metro.config.js` (you don&apos;t need to use the latestExpo CLI for this to work):```js// Learn more https://docs.expo.io/guides/customizing-metroconst { getDefaultConfig } = require(&quot;../../expo/packages/@expo/metro-config&quot;);// const { getDefaultConfig } = require(&apos;expo/metro-config&apos;);module.exports = getDefaultConfig(__dirname);```- `npx expo run:ios` and `npx expo run:android` should point to`index.bundle`- Changing the `main` field in the package.json or deleting `index.js`should continue to work when you reload the app.# Checklist&lt;!--Please check the appropriate items below if they apply to your diff.This is required for changes to Expo modules.--&gt;- [ ] Documentation is up to date to reflect these changes (eg:https://docs.expo.dev and README.md).- [ ] Conforms with the [Documentation Writing StyleGuide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)- [ ] This diff will work correctly for `expo prebuild` &amp; EAS Build (eg:updated a module plugin).---------Co-authored-by: Expo Bot &lt;34669131+expo-bot@users.noreply.github.com&gt;

            List of files:
            /expo/packages/@expo/cli/src/start/server/metro/resolveFromProject.ts</description>
        <pubDate>Tue, 28 Mar 2023 18:51:07 +0000</pubDate>
        <dc:creator>Evan Bacon &lt;bacon@expo.io&gt;</dc:creator>
    </item>
<item>
        <title>5234fe38 - feature(cli): add custom inspector proxy based on `metro-inspector-proxy` (#21449)</title>
        <link>http://172.16.0.5:8080/history/expo/packages/@expo/cli/src/start/server/metro/resolveFromProject.ts#5234fe38</link>
        <description>feature(cli): add custom inspector proxy based on `metro-inspector-proxy` (#21449)# WhyFixes ENG-7467Related #21265This is an initial draft to extend the CDP functionality of`metro-inspector-proxy`.# HowThe implementation is slightly wonky around the `ExpoInspectorDevice`.We want to reuse as much as possible from `metro-inspector-proxy`, butwe need to add stateful data per device.In order to achieve that, we generate a new class type, based on theuser&apos;s installed `metro-inspector-proxy`. This makes everything lessreadable but should include future updates in these classes.As for the `ExpoInspectorProxy`, to avoid having to do the same thing,we just wrap the whole inspector class and reuse what we can. The devicemap is &quot;linked&quot; within the original inspector proxy instance, making thedata available to all methods that need it.# Test PlanEnable this feature with `EXPO_USE_CUSTOM_INSPECTOR_PROXY=1`- [x] See tests for the actual CDP events we handle.- [ ] See tests on the &quot;bootstrapping code&quot; to create the inspector anddevices.# Checklist&lt;!--Please check the appropriate items below if they apply to your diff.This is required for changes to Expo modules.--&gt;- [ ] Documentation is up to date to reflect these changes (eg:https://docs.expo.dev and README.md).- [ ] Conforms with the [Documentation Writing StyleGuide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)- [ ] This diff will work correctly for `expo prebuild` &amp; EAS Build (eg:updated a module plugin).---------Co-authored-by: Evan Bacon &lt;bacon@expo.io&gt;

            List of files:
            /expo/packages/@expo/cli/src/start/server/metro/resolveFromProject.ts</description>
        <pubDate>Wed, 08 Mar 2023 17:16:56 +0000</pubDate>
        <dc:creator>Cedric van Putten &lt;me@bycedric.com&gt;</dc:creator>
    </item>
<item>
        <title>b6b91c50 - feat(cli)!: use Expo CLI to bundle production apps (#21396)</title>
        <link>http://172.16.0.5:8080/history/expo/packages/@expo/cli/src/start/server/metro/resolveFromProject.ts#b6b91c50</link>
        <description>feat(cli)!: use Expo CLI to bundle production apps (#21396)# WhyMost of our new Metro bundler features won&apos;t work unless we use Expo CLIfor every bundler operation (ex:[aliases](https://github.com/expo/expo/pull/21262)). Right now this isthe case when building for production on both platforms or building fordevelopment on iOS.&gt; Using `npx expo start` when building from Xcode will be added inanother PR.# HowThis PR introduces a new &quot;export:embed&quot; command which is hidden from the`--help` prompt. `npx expo export:embed` accepts the same arguments as`npx react-native bundle` and passes them to the same internal function,but it ensures we use the correct variation of Metro before doing such.This change (and `start` PR) will add more steps for migrating to &quot;ExpoCLI&quot; but it will also remove the need for us to generate the`metro.config.js` file in the project on `npx expo prebuild` since wecan now reliably default to `@expo/metro-config`.The change should only apply to Metro bundler features (all applicationcode could be affected), but it won&apos;t obstruct Expo Modules Core orusing Expo CLI.&lt;!--How did you build this feature or fix this bug and why?--&gt;# Test Plan- All of our existing E2E tests should use the new command, if theycontain features like aliases then they&apos;ll work.- Copied the changes from `@expo/cli` into a new project&apos;s node_modules,added template changes:  - Built for production from Android Studio and Xcode.&lt;!--Please describe how you tested this change and how a reviewer couldreproduce your test, especially if this PR does not include automatedtests! If possible, please also provide terminal output and/orscreenshots demonstrating your test/reproduction.--&gt;# Checklist&lt;!--Please check the appropriate items below if they apply to your diff.This is required for changes to Expo modules.--&gt;- [ ] Documentation is up to date to reflect these changes (eg:https://docs.expo.dev and README.md).- [ ] Conforms with the [Documentation Writing StyleGuide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)- [ ] This diff will work correctly for `expo prebuild` &amp; EAS Build (eg:updated a module plugin).---------Co-authored-by: Expo Bot &lt;34669131+expo-bot@users.noreply.github.com&gt;Co-authored-by: James Ide &lt;ide@users.noreply.github.com&gt;

            List of files:
            /expo/packages/@expo/cli/src/start/server/metro/resolveFromProject.ts</description>
        <pubDate>Mon, 06 Mar 2023 18:28:50 +0000</pubDate>
        <dc:creator>Evan Bacon &lt;bacon@expo.io&gt;</dc:creator>
    </item>
<item>
        <title>33643b60 - feat(cli): auto setup typescript during start (#21475)</title>
        <link>http://172.16.0.5:8080/history/expo/packages/@expo/cli/src/start/server/metro/resolveFromProject.ts#33643b60</link>
        <description>feat(cli): auto setup typescript during start (#21475)# Why- Some users are confused about how to use the fully automatedTypeScript setup. It currently runs when you run `npx expo start` in aproject with `tsconfig.json` or any TypeScript file in the project.- This change will run the TypeScript check continuously untilTypeScript is setup. This only applies to projects using Metro, andcurrently is only run in `npx expo start`, and the run commands (whenthe server is started in the current window, e.g. not headless mode).&lt;!--Please describe the motivation for this PR, and link to relevant GitHubissues, forums posts, or feature requests.--&gt;# How- Fork the `runServer` function from Metro into the CLI so we can accessthe Metro bundler instance directly.- Use Metro&apos;s native file watching to observe new TypeScript files beingadded to the project (within the observable files). This is fast andensures we don&apos;t accidentally block a thread that otherwise could&apos;vebeen used for bundling.- The TypeScript continuous check only runs once, if you removeTypeScript and add it back in the same process, then nothing happens.This is a performance optimization.- If TypeScript is enabled while the process is running, the user willnot be prompted to install, the packages will just install in theproject. Failures will be displayed in the running process, and no moreattempts will be made.- If TypeScript is detected on start then the existing system will beused and the continuous check will be skipped, this means projectsalready using TypeScript won&apos;t have any technical performance hit.&lt;!--How did you build this feature or fix this bug and why?--&gt;# Test Plan- In a project without TypeScript:  - `npx expo`  - `touch tsconfig.json` or `mv index.js index.tsx` or `touch foo.tsx`  - TypeScript is automatically installed for the project.  - `EXPO_NO_TYPESCRIPT_SETUP` voids this behavior- Added unit tests.&lt;!--Please describe how you tested this change and how a reviewer couldreproduce your test, especially if this PR does not include automatedtests! If possible, please also provide terminal output and/orscreenshots demonstrating your test/reproduction.--&gt;# Checklist&lt;!--Please check the appropriate items below if they apply to your diff.This is required for changes to Expo modules.--&gt;- [ ] Documentation is up to date to reflect these changes (eg:https://docs.expo.dev and README.md).- [ ] Conforms with the [Documentation Writing StyleGuide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)- [ ] This diff will work correctly for `expo prebuild` &amp; EAS Build (eg:updated a module plugin).---------Co-authored-by: Expo Bot &lt;34669131+expo-bot@users.noreply.github.com&gt;Co-authored-by: Cedric van Putten &lt;me@bycedric.com&gt;

            List of files:
            /expo/packages/@expo/cli/src/start/server/metro/resolveFromProject.ts</description>
        <pubDate>Sat, 04 Mar 2023 02:26:10 +0000</pubDate>
        <dc:creator>Evan Bacon &lt;bacon@expo.io&gt;</dc:creator>
    </item>
<item>
        <title>d42dd5d4 - feature(cli): add experimental metro config telemetry (#20885)</title>
        <link>http://172.16.0.5:8080/history/expo/packages/@expo/cli/src/start/server/metro/resolveFromProject.ts#d42dd5d4</link>
        <description>feature(cli): add experimental metro config telemetry (#20885)# WhyWe need to have visibility on what experimental features are being used,in order to prioritize supporting or finishing these features.# HowAdded a telemetry event when instantiating Metro, for both `npx expostart` and `npx expo export`.# Test PlanSee added test, if a property isn&apos;t available, it doesn&apos;t matter.# Checklist&lt;!--Please check the appropriate items below if they apply to your diff.This is required for changes to Expo modules.--&gt;- [ ] Documentation is up to date to reflect these changes (eg:https://docs.expo.dev and README.md).- [ ] Conforms with the [Documentation Writing StyleGuide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)- [ ] This diff will work correctly for `expo prebuild` &amp; EAS Build (eg:updated a module plugin).---------Co-authored-by: Expo Bot &lt;34669131+expo-bot@users.noreply.github.com&gt;

            List of files:
            /expo/packages/@expo/cli/src/start/server/metro/resolveFromProject.ts</description>
        <pubDate>Thu, 09 Feb 2023 14:06:41 +0000</pubDate>
        <dc:creator>Cedric van Putten &lt;me@bycedric.com&gt;</dc:creator>
    </item>
<item>
        <title>6d6b81f9 - feat(cli): add web support to metro (#17927)</title>
        <link>http://172.16.0.5:8080/history/expo/packages/@expo/cli/src/start/server/metro/resolveFromProject.ts#6d6b81f9</link>
        <description>feat(cli): add web support to metro (#17927)* feat: add web support for metro* undo patch* Update index.js* Update MetroBundlerDevServer.ts* Add second bundler dev server* Add dev loading view to web* Put feature behind EXPO_USE_METRO_WEB flag* Move custom config into CLI* Add support for assets across platforms* reduce* Added upstream web support* Update webTemplate.ts* Update CHANGELOG.md* Update instantiateMetro.ts* Update instantiateMetro.ts* Update index.js* Added bundle splitting support* Update startAsync.ts* Fixed default settings* Add ability to copy from public folder* wip: redirect unmatched routes to `/` on web* fix fallback api* Update exportApp.ts* Update instantiateMetro.ts* Update exportApp.ts* clean up handler* fixup* clean up* add web to export test* Update start-test.ts* added static serving for web* Update packages/@expo/cli/CHANGELOG.mdCo-authored-by: Expo Bot &lt;34669131+expo-bot@users.noreply.github.com&gt;* Update yarn.locklint fixfix tests* Update export-test.ts* added template tests* Create HistoryFallbackMiddleware-test.ts* test ManifestMiddleware* Create ServeStaticMiddleware-test.ts* refactor multiplatform* Update ManifestMiddleware-test.ts* Update withMetroMultiPlatform.ts* Update for latest metro* Update packages/@expo/cli/src/export/resolveOptions.tsCo-authored-by: Expo Bot &lt;34669131+expo-bot@users.noreply.github.com&gt;

            List of files:
            /expo/packages/@expo/cli/src/start/server/metro/resolveFromProject.ts</description>
        <pubDate>Thu, 23 Jun 2022 11:51:00 +0000</pubDate>
        <dc:creator>Evan Bacon &lt;bacon@expo.io&gt;</dc:creator>
    </item>
<item>
        <title>8d307f52 - chore: refactor `expo/cli` to `@expo/cli` package (#16717)</title>
        <link>http://172.16.0.5:8080/history/expo/packages/@expo/cli/src/start/server/metro/resolveFromProject.ts#8d307f52</link>
        <description>chore: refactor `expo/cli` to `@expo/cli` package (#16717)* chore: refactor `expo/cli` to `@expo/cli` package* Update CODEOWNERS* fix linking* fix lint script* fix build file* fix e2e tests* lint before build* use mock version

            List of files:
            /expo/packages/@expo/cli/src/start/server/metro/resolveFromProject.ts</description>
        <pubDate>Wed, 23 Mar 2022 16:50:13 +0000</pubDate>
        <dc:creator>Evan Bacon &lt;bacon@expo.io&gt;</dc:creator>
    </item>
</channel>
</rss>
