Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[core] Use the src folder as the Metro target #29702

Merged
merged 7 commits into from
Jun 19, 2024

Conversation

tsapeta
Copy link
Member

@tsapeta tsapeta commented Jun 12, 2024

Why

Following up on #29244

How

Followed #29244, but for expo and expo-modules-core packages.

  • replaced build with src in the entry point
  • set emitDeclarationOnly to true in TS configs
  • rebuilt files – this removed .js and .js.map files from the build folder
  • updated relative paths in a few places: mocks in jest-expo, @expo/metro-config and AppEntry

Test Plan

Tested in bare-expo on iOS and web and confirmed that:

  • changing files in src automatically reloads the app without running yarn build
  • stacktrace in the LogBox/RedBox correctly jumps to the right line in the source code

@expo-bot expo-bot added the bot: suggestions ExpoBot has some suggestions label Jun 12, 2024
@expo-bot
Copy link
Collaborator

expo-bot commented Jun 12, 2024

The Pull Request introduced fingerprint changes against the base commit: d8114cd

Fingerprint diff
[
  {
    "type": "dir",
    "filePath": "../../node_modules/expo",
    "reasons": [
      "bareRncliAutolinking"
    ],
    "hash": "e39701ffc215df207db804dc1a44fc5c6363b6e6"
  },
  {
    "type": "dir",
    "filePath": "../../packages/expo",
    "reasons": [
      "expoAutolinkingIos",
      "expoAutolinkingAndroid",
      "expoConfigPlugins",
      "expoConfigPlugins"
    ],
    "hash": "d7e91c582bf1df8ff9e7d22cba3d0bb190a47967"
  },
  {
    "type": "dir",
    "filePath": "../../packages/expo-modules-core",
    "reasons": [
      "expoAutolinkingIos",
      "expoAutolinkingAndroid"
    ],
    "hash": "fbb4351e75bb473a2d79245b7a2a3293acc59290"
  }
]

Generated by PR labeler 🤖

@tsapeta tsapeta force-pushed the @tsapeta/use-src-folder-in-expo-pkg branch 5 times, most recently from cd69b49 to 115eab7 Compare June 13, 2024 21:39
@tsapeta tsapeta force-pushed the @tsapeta/use-src-folder-in-expo-pkg branch 3 times, most recently from 926444e to a165467 Compare June 18, 2024 20:45
@tsapeta tsapeta force-pushed the @tsapeta/use-src-folder-in-expo-pkg branch from a165467 to 31cb425 Compare June 19, 2024 09:08
@expo-bot
Copy link
Collaborator

Hi there! 👋 I'm a bot whose goal is to ensure your contributions meet our guidelines.

I've found some issues in your pull request that should be addressed (click on them for more details) 👇

⚠️ Suggestion: Missing changelog entries


Your changes should be noted in the changelog. Read Updating Changelogs guide and consider adding an appropriate entry to the following changelogs:


Generated by ExpoBot 🤖 against 31cb425

@tsapeta tsapeta marked this pull request as ready for review June 19, 2024 09:57
@tsapeta tsapeta removed the request for review from brentvatne June 19, 2024 09:58
@tsapeta tsapeta merged commit 1bac56a into main Jun 19, 2024
14 checks passed
@tsapeta tsapeta deleted the @tsapeta/use-src-folder-in-expo-pkg branch June 19, 2024 14:48
EvanBacon added a commit that referenced this pull request Jun 25, 2024
# Why

- I noticed in my tree-shaking prototype that the side effects weren't
being recognized. Updating to account for #29702

---------

Co-authored-by: Expo Bot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants