An open-source framework for making universal native apps with React. Expo runs on Android, iOS, and the web.
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
chore: Update markdown files for Turborepo (#47164) This comes down to three main changes: - the npm scripts are more unified and can be documented - the `build/` outputs aren't committed anymore - there's a few ways users may validate changes, e.g. with `et check-packages` --------- Co-authored-by: Tomasz Sapeta <tsapeta@expo.dev> | 9 天前 | |
[gha] Bump SDK branch for template sync workflow (#47407) # Why <!-- Please describe the motivation for this PR, and link to relevant GitHub issues, forums posts, or feature requests. --> Fix ENG-22290 # How <!-- How did you build this feature or fix this bug and why? --> - Update sync-template.yml to trigger on sdk-57 instead of sdk-56 - This syncs the changes to https://github.com/expo/expo-template-default # Test Plan <!-- 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. --> We should see the template [`expo/expo-template-default`](https://github.com/expo/expo-template-default) sync to the latest version once this is bumped. # Checklist <!-- Please check the appropriate items below if they apply to your diff. --> - [ ] I added a `changelog.md` entry and rebuilt the package sources according to [this short guide](https://github.com/expo/expo/blob/main/CONTRIBUTING.md#-before-submitting) - [ ] This diff will work correctly for `npx expo prebuild` & EAS Build (eg: updated a module plugin). - [ ] Conforms with the [Documentation Writing Style Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md) | 1 天前 | |
[vscode] Add defaultFormatter `oxc` to .vscode (#47220) # Why It might be useful to tell vscode to use oxc instead of eslint formatter after migration to `oxc` #47096 # How Added `"editor.defaultFormatter": "oxc.oxc-vscode",` to `settings.json` | 8 天前 | |
[fix][bare-expo] Fix inline modules screen on bare-expo (#47459) | 8 小时前 | |
[ci] fixed working dir in expotools wrapper (#41230) # Why Instead of running with the workingdir "tools" which caused an error to happen: https://github.com/expo/expo/actions/runs/19677257528/job/56361818155?pr=41229 # How This commit fixes it by setting `repositoryRoot` instad of the tools direcory as the current working directory for expotools. # Test Plan CI Green | 7 个月前 | |
[docs] Surface llms.txt directive near the top of page HTML (#47471) # Why <!-- Please describe the motivation for this PR, and link to relevant GitHub issues, forums posts, or feature requests. --> Fix ENG-22584 # How <!-- How did you build this feature or fix this bug and why? --> Add an `sr-only` directive paragraph as the first child of `<main>` in `components/DocumentationPage.tsx`, linking /llms.txt and mentioning that .md is available by appending it to any URL. # Test Plan <!-- 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. --> See diff. # Checklist <!-- Please check the appropriate items below if they apply to your diff. --> - [ ] I added a `changelog.md` entry and rebuilt the package sources according to [this short guide](https://github.com/expo/expo/blob/main/CONTRIBUTING.md#-before-submitting) - [ ] This diff will work correctly for `npx expo prebuild` & EAS Build (eg: updated a module plugin). - [ ] Conforms with the [Documentation Writing Style Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md) | 1 小时前 | |
[ci] bump xcode to 26.4, use maestro 2.4.0 on android (#46160) # Why The new minimum as claimed in https://expo.dev/changelog/sdk-56-beta#tool-version-bumps is 26.4. I'd like to bump so that CI can build some features that depend on using xcode 26 without workarounds (not critical though in case we want to keep mac 15 runners longer for some reason). <!-- Please describe the motivation for this PR, and link to relevant GitHub issues, forums posts, or feature requests. --> # How <!-- How did you build this feature or fix this bug and why? --> # Test Plan - green CI # Checklist <!-- Please check the appropriate items below if they apply to your diff. --> - [ ] I added a `changelog.md` entry and rebuilt the package sources according to [this short guide](https://github.com/expo/expo/blob/main/CONTRIBUTING.md#-before-submitting) - [ ] This diff will work correctly for `npx expo prebuild` & EAS Build (eg: updated a module plugin). - [ ] Conforms with the [Documentation Writing Style Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md) | 1 个月前 | |
[guides] Update Release Workflow to add `pnpm versions-schema-sync` (#47280) # Why <!-- Please describe the motivation for this PR, and link to relevant GitHub issues, forums posts, or feature requests. --> Add missing step about generating `native-modules.json` for the sdk cut off release here: https://github.com/expo/expo/blob/main/guides/releasing/Release%20Workflow.md?rgh-link-date=2026-01-21T12%3A47%3A46Z#09-generate-new-sdk-docs # Test Plan <!-- 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. --> Proofread. # Checklist <!-- Please check the appropriate items below if they apply to your diff. --> - [ ] I added a `changelog.md` entry and rebuilt the package sources according to [this short guide](https://github.com/expo/expo/blob/main/CONTRIBUTING.md#-before-submitting) - [ ] This diff will work correctly for `npx expo prebuild` & EAS Build (eg: updated a module plugin). - [ ] Conforms with the [Documentation Writing Style Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md) | 3 天前 | |
[brownfield] fix flaky cli e2e (#47431) (#47464) | 2 小时前 | |
Update react-native to 0.86.0 (#46950) | 15 天前 | |
[expo-go] Fix cli commands not responding (#47424) | 1 天前 | |
proposal: Add pre-commit hook running `oxfmt` (#47221) # Why **Proposal:** We know we'd like to format all files with `oxfmt`. With eslint+prettier this is usually a slow process, but with `oxfmt`, this can be quite fast, and shouldn't be disruptive. If we don't include lints in this pre-commit hook it should be relatively uncontroversial and not very disruptive. This can still be skipped with `--no-verify`, as usual, and formatting on pre-commit is a pretty common pattern. Assuming that `oxfmt` basically almost never fails/exits with an error, this shouldn't be all that disruptive and just ensure that formatting is unlikely to fail in PRs. It specifically should reduce the work agents would have to do, and ensure we won't have to add a note for agents for this. # How - Add a `scripts/prepare.js` hook that sets up the `pre-commit` hook - Add direnv tweak to enable `core.untrackedCache` and `core.fsmonitor` for Git The direnv tweak is to speed up the `lint-staged` run which invokes a few git commands. Git in general is slowing down already on our repo, since the history and the blobs it tracks are quite large. These two options should keep this within reason. We're activating them in direnv, since they're not always safe on certain filesystems. For expo internally, they should be fine. The `.git/hooks/pre-commit` script is written in `preprepare` via `pnpm` in a script, since it's not guaranteed that external contributors will have direnv set up. # Test Plan - Manually checked against commits - Validated that editing nested files invokes the formatter correctly # Checklist <!-- Please check the appropriate items below if they apply to your diff. --> - [ ] I added a `changelog.md` entry and rebuilt the package sources according to [this short guide](https://github.com/expo/expo/blob/main/CONTRIBUTING.md#-before-submitting) - [ ] This diff will work correctly for `npx expo prebuild` & EAS Build (eg: updated a module plugin). - [ ] Conforms with the [Documentation Writing Style Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md) | 7 天前 | |
[ci] migrate git-crypt to GCP secret manager (#40224) # Why <!-- Please describe the motivation for this PR, and link to relevant GitHub issues, forums posts, or feature requests. --> closes https://linear.app/expo/issue/ENG-12093 # How <!-- How did you build this feature or fix this bug and why? --> # Test Plan - `et eas ios-simulator-build` # Checklist <!-- Please check the appropriate items below if they apply to your diff. --> - [ ] I added a `changelog.md` entry and rebuilt the package sources according to [this short guide](https://github.com/expo/expo/blob/main/CONTRIBUTING.md#-before-submitting) - [ ] This diff will work correctly for `npx expo prebuild` & EAS Build (eg: updated a module plugin). - [ ] Conforms with the [Documentation Writing Style Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md) | 7 个月前 | |
[create-expo-module] Merge `expo-module-template-local` into `expo-module-template` (#44673) # Why We currently have two marginally different packages: `expo-module-template-local` and `expo-module-template`. We can actually merge them into one with not a lot of work # How Delete `expo-module-template-local` and all references. Use ejs to conditionally add the files that were only used in the non-local template. # Test Plan Tested by making a bunch of modules on MacOS | 2 个月前 | |
[android][templates] Add assetsPaths to MainActivity configChanges to avoid recreation on dynamic-color changes (#47423) # Why On Android, a Material You **dynamic-color change** and any runtime resource-overlay swap — reports the `CONFIG_ASSETS_PATHS` (`0x80000000`) configuration change. `MainActivity` doesn't declare it in `configChanges`, so the OS **recreates the activity while the JS process survives**, resetting navigation state on Android 12+. This is the root cause behind reports like #42500. `assetsPaths` was added as a `configChanges` token in **API 36**. Declaring it makes the OS deliver the change to the running app instead of relaunching the activity. # How Add `assetsPaths` to `MainActivity`'s `android:configChanges` in the prebuild template manifest (`expo-template-bare-minimum`). # Test Plan - router-e2e Co-authored-by: Jakub Agent <jakubagent@Jakubs-Mac-mini.attlocal.net> | 14 小时前 | |
[tools] Add label author to cherry picks (#47401) | 14 小时前 | |
Better Rockerfile for android-base fbshipit-source-id: 4827683 | 9 年前 | |
refactor: Drop committed build outputs and migrate to Turborepo (#46801) Resolves [ENG-20741](https://linear.app/expo/issue/ENG-20741) ## Summary This PR implements four groups of refactor tasks: - Cross-repo JS build tasks with Turbobuild - `**/build/**` output folders removed from tracked files - JS build scripts switched to an `expo-build` script (SWC-based) - `package.json:exports` added with `source` conditions for `src` TS files This, as a consequence means: - `turbo build` is necessary to build source files for many tasks; to make this easier it's been added as a repo `prepare` task (on `pnpm i`) for now - TypeScript `tsc` is not used as a pre-publish build tool anymore, and we're free to use it for type-checking only - The `expo-build` script loosely encompasses all of our usual build configurations and skips type-checking during `turbo build` (manual `pnpm build` invocations will still type check) - Many changes for type checks reflect immediately due to `customConditions: ["source"]` in the `tsconfig.base.json` - "Sub-task" builds are now gone, `expo-module build plugin` et al are replaced with focused `package.json:scripts` in the root package - Many packages that published raw TypeScript source files either have already been switched over to use `build` outputs, or should be switched over As a secondary consequence for future refactors: - We can update `tsconfig.json` files to include test files - We can update Jest's handling of TypeScript files to not type check (and update it to Jest 30, and do other various refactors) - We can automate secondary task tooling, like updating lint runs, replacing `check-packages`, publishing, etc more easily - We can potentially cut `main`'s git history to speed up the repo again (needs to be coordinated with GitHub Support most likely in ~3 SDK cycles) ### Usage Guide `pnpm i` will (for now) run `turbo build` automatically and will build all sources. The resulting repository structure should be vaguely the same as before the PR (except build outputs won't be tracked by Git) You can also run focused builds with `turbo build --filter [pkg]` or with `pnpm turbo build` from an individual package, which not only builds that individual package but all its transitive dependencies too. If you have direnv set up and activated, the read-only remote build cache for Turborepo is already activated, and most packages won't build on your machine. Turborepo will instead pull cached build outputs that CI has produced from the remote build cache on Cloudflare. (Check `.env` for the public env vars that activate the remote build cache) ## Set of changes - Add Turbo repo - Add `expo-build` script - Update various `package.json` scripts, exports, entrypoints - Add `source` condition to various `exports` on packages that are used as dependencies - `shellEmulator: true` in `pnpm-workspace.yaml` to allow sh syntax in pnpm scripts for Windows --------- Co-authored-by: Hassan Khan <hassan@expo.dev> Co-authored-by: kitten-agent <phil+agent@kitten.sh> | 15 天前 | |
proposal: Add pre-commit hook running `oxfmt` (#47221) # Why **Proposal:** We know we'd like to format all files with `oxfmt`. With eslint+prettier this is usually a slow process, but with `oxfmt`, this can be quite fast, and shouldn't be disruptive. If we don't include lints in this pre-commit hook it should be relatively uncontroversial and not very disruptive. This can still be skipped with `--no-verify`, as usual, and formatting on pre-commit is a pretty common pattern. Assuming that `oxfmt` basically almost never fails/exits with an error, this shouldn't be all that disruptive and just ensure that formatting is unlikely to fail in PRs. It specifically should reduce the work agents would have to do, and ensure we won't have to add a note for agents for this. # How - Add a `scripts/prepare.js` hook that sets up the `pre-commit` hook - Add direnv tweak to enable `core.untrackedCache` and `core.fsmonitor` for Git The direnv tweak is to speed up the `lint-staged` run which invokes a few git commands. Git in general is slowing down already on our repo, since the history and the blobs it tracks are quite large. These two options should keep this within reason. We're activating them in direnv, since they're not always safe on certain filesystems. For expo internally, they should be fine. The `.git/hooks/pre-commit` script is written in `preprepare` via `pnpm` in a script, since it's not guaranteed that external contributors will have direnv set up. # Test Plan - Manually checked against commits - Validated that editing nested files invokes the formatter correctly # Checklist <!-- Please check the appropriate items below if they apply to your diff. --> - [ ] I added a `changelog.md` entry and rebuilt the package sources according to [this short guide](https://github.com/expo/expo/blob/main/CONTRIBUTING.md#-before-submitting) - [ ] This diff will work correctly for `npx expo prebuild` & EAS Build (eg: updated a module plugin). - [ ] Conforms with the [Documentation Writing Style Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md) | 7 天前 | |
update lint stacks for workspace, docs and tools, reformat files (#26370) | 2 年前 | |
[module-scripts] rewrite to Node for cross-platform support (#36296) # Why close ENG-15505 # How rewrite using node.js to support windows --------- Co-authored-by: Bartosz Kaszubowski <gosimek@gmail.com> | 7 个月前 | |
[expo-updates-gradle-plugin] Remove accidentally committed Kotlin session file A zero-byte Kotlin compiler session marker was swept into a version-bump commit. Removed it and added .kotlin/ to gitignore so build artifacts can't be tracked again. | 2 天前 | |
[docs] remove React Native docs and docs submodule (#19287) Co-authored-by: Brent Vatne <brentvatne@gmail.com> | 3 年前 | |
chore: use `oxfmt` and `oxlint` (#47096) # Why We want to evaluate replacing ESLint with [oxlint](https://oxc.rs) and Prettier with [oxfmt](https://oxc.rs/docs/guide/usage/formatter.html) for speed/performance improvements. # How - Added `oxlint` and `oxfmt` and per-package `lint`/`format` scripts; lint uses [`oxlint-config-universe`](https://github.com/expo/oxlint-config-universe). - Created a shared base config (`expo-module-scripts/oxlint.config.base`) extending the preset and documented any differences from it. - Replaced ESLint's `import/order` with Oxfmt's `sortImports` - Removed ESLint and Prettier from nearly all packages (`apps/`, `docs/` and `tools/` haven't been changed) - Added an `expo-module format` command to wrap `oxfmt`; this only performs checks in a CI environment, but modifies files when run locally - Ran `oxfmt --write` across the monorepo - Updated CI workflows to run linter + formatter (in that order) - Fixed a few minor bugs/issues surfaced by linter - `@expo/cli`: `maxWarnings` evaluating to `NaN` when `undefined` - `expo-router`: missing `key` props on `<Screen>` components - `native-component-list`: a JSX `style` using the comma operator instead of an array, resulting in one style silently never being applied - `expo-camera`: a minor improvement for `no-unsafe-finally` (thanks @zoontek!) - smaller style/refactor cleanups across `@expo/cli`, `@expo/metro-file-map`, `expo-image-picker` and `expo-network` ``` ## on main $ turbo run lint --filter="./packages/**" Tasks: 130 successful, 130 total Cached: 0 cached, 130 total Time: 33.358s ## on this PR $ turbo run format lint --filter="./packages/**" Tasks: 258 successful, 258 total Cached: 0 cached, 258 total Time: 19.437s ``` # Test Plan - Run `turbo run format lint` locally (use the `--output-logs=errors-only` flag to only see errors) - Run `pnpm --filter <PACKAGE_NAME> lint` and/or `pnpm --filter <PACKAGE_NAME> format` to run oxlint/oxfmt on a particular package # Checklist - [ ] I added a `changelog.md` entry and rebuilt the package sources according to [this short guide](https://github.com/expo/expo/blob/main/CONTRIBUTING.md#-before-submitting) - [x] This diff will work correctly for `npx expo prebuild` & EAS Build (eg: updated a module plugin). - [ ] Conforms with the [Documentation Writing Style Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md) | 8 天前 | |
Adopt swift-format in expo-modules-jsi (#45803) | 1 个月前 | |
[create-expo-module] Merge `expo-module-template-local` into `expo-module-template` (#44673) # Why We currently have two marginally different packages: `expo-module-template-local` and `expo-module-template`. We can actually merge them into one with not a lot of work # How Delete `expo-module-template-local` and all references. Use ejs to conditionally add the files that were only used in the non-local template. # Test Plan Tested by making a bunch of modules on MacOS | 2 个月前 | |
Initial commit fbshipit-source-id: ddcb55df54d1382bb3f003f7e62f0bfc195fb9b7 | 9 年前 | |
[go] Add Brewfile + instructions to Expo Go readme (#38386) Why === Expo Go builds Hermes from source, which requires cmake and ninja (and git, but that's obviously installed in order to clone this repo - so we don't want to touch that). Other projects under `apps` do not link to react-native-lab the same way Expo Go does so I updated only the Expo Go instructions. How === Updated the Expo Go readme to tell people to install tools using Homebrew with `brew bundle`. This uses the dependencies specified in a Brewfile introduced by this commit, which documents why we're adding cmake and ninja in a way that is aligned with the Hermes build instructions. Test Plan === Ran `brew bundle` in the root directory. I didn't try building Expo Go but Hirbod mentioned that installing cmake 4.0.3 (latest in the brew tap) got Expo Go building for him successfully. | 10 个月前 | |
[changelog] Cut off SDK 56 | 1 个月前 | |
chore: use `oxfmt` and `oxlint` (#47096) # Why We want to evaluate replacing ESLint with [oxlint](https://oxc.rs) and Prettier with [oxfmt](https://oxc.rs/docs/guide/usage/formatter.html) for speed/performance improvements. # How - Added `oxlint` and `oxfmt` and per-package `lint`/`format` scripts; lint uses [`oxlint-config-universe`](https://github.com/expo/oxlint-config-universe). - Created a shared base config (`expo-module-scripts/oxlint.config.base`) extending the preset and documented any differences from it. - Replaced ESLint's `import/order` with Oxfmt's `sortImports` - Removed ESLint and Prettier from nearly all packages (`apps/`, `docs/` and `tools/` haven't been changed) - Added an `expo-module format` command to wrap `oxfmt`; this only performs checks in a CI environment, but modifies files when run locally - Ran `oxfmt --write` across the monorepo - Updated CI workflows to run linter + formatter (in that order) - Fixed a few minor bugs/issues surfaced by linter - `@expo/cli`: `maxWarnings` evaluating to `NaN` when `undefined` - `expo-router`: missing `key` props on `<Screen>` components - `native-component-list`: a JSX `style` using the comma operator instead of an array, resulting in one style silently never being applied - `expo-camera`: a minor improvement for `no-unsafe-finally` (thanks @zoontek!) - smaller style/refactor cleanups across `@expo/cli`, `@expo/metro-file-map`, `expo-image-picker` and `expo-network` ``` ## on main $ turbo run lint --filter="./packages/**" Tasks: 130 successful, 130 total Cached: 0 cached, 130 total Time: 33.358s ## on this PR $ turbo run format lint --filter="./packages/**" Tasks: 258 successful, 258 total Cached: 0 cached, 258 total Time: 19.437s ``` # Test Plan - Run `turbo run format lint` locally (use the `--output-logs=errors-only` flag to only see errors) - Run `pnpm --filter <PACKAGE_NAME> lint` and/or `pnpm --filter <PACKAGE_NAME> format` to run oxlint/oxfmt on a particular package # Checklist - [ ] I added a `changelog.md` entry and rebuilt the package sources according to [this short guide](https://github.com/expo/expo/blob/main/CONTRIBUTING.md#-before-submitting) - [x] This diff will work correctly for `npx expo prebuild` & EAS Build (eg: updated a module plugin). - [ ] Conforms with the [Documentation Writing Style Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md) | 8 天前 | |
Update fastlane to 2.232.2 (#44093) | 3 个月前 | |
Bump addressable from 2.8.9 to 2.9.0 (#45342) | 1 个月前 | |
Move from BSD to MIT license for consistency This moves the Expo client project as well as several of our other projects from the BSD license to the MIT license. The licenses are fairly comparable and are compatible. This (a) consistently licenses our latest code using the same license and (b) uses the same license as React and React Native. There should be no material impact to developers using Expo aside from one fewer license type they need to think about; generally standard BSD and MIT are well-accepted. fbshipit-source-id: 020b49e | 7 年前 | |
[README.md] fix: alt on images (#36316) # Why <!-- Please describe the motivation for this PR, and link to relevant GitHub issues, forums posts, or feature requests. --> Fixing accessibility issues # How N/A # Test Plan N/A # Checklist N/A | 1 年前 | |
Update SECURITY.md | 10 个月前 | |
[github] add support resources (#5580) * [github] add support resources * wording changes Co-Authored-By: James Ide <ide@users.noreply.github.com> * spelling Co-Authored-By: James Ide <ide@users.noreply.github.com> * wording changes Co-Authored-By: James Ide <ide@users.noreply.github.com> | 6 年前 | |
[image-picker][Android][plugin] Migrate to `com.github.CanHub:Android-Image-Cropper` (#16122) | 4 年前 | |
[changelog] Cut off SDK 56 | 1 个月前 | |
Publish dev home | 7 个月前 | |
[gh] Fix canaries workflow (#47326) # Why The nightly Publish Canaries workflow is failing with `Process 'command 'pnpm'' finished with non-zero exit value 254` on the `:expoPublish` Gradle tasks. The publish flow shells out to `pnpm prettier --write expo-module.config.json` from each package directory (in the `expo-module-gradle-plugin` and in `publishAndroidPackages`). `pnpm <bin>` resolves a binary by walking up to the workspace-root `node_modules/.bin`, so this only works when `prettier` is hoisted there. The root cause was the removal `"prettier"` from the root `package.json`. `prettier` is otherwise only a transitive dependency, and pnpm's isolated node_modules layout does not expose transitives at the workspace root, so the publish task could no longer find it. # How Restored `prettier` as a direct root dev dependency # Test Plan CI should be green | 3 天前 | |
[expo-image] add expo-observe integration (#47145) # Why Using the image loaded event from previous PR, this PR logs event when image is too big # How 1. Subscribe to image loaded 2. When `img.w * img.h > screen.w * screen.h * pixelRatio * userDefinedRation` log `expo-image.oversized` event (user defined ratio defaults to `2`) 3. Extend observe configuration in ts to include `expo-image` property # Test Plan <!-- 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. --> # Checklist <!-- Please check the appropriate items below if they apply to your diff. --> - [ ] I added a `changelog.md` entry and rebuilt the package sources according to [this short guide](https://github.com/expo/expo/blob/main/CONTRIBUTING.md#-before-submitting) - [ ] This diff will work correctly for `npx expo prebuild` & EAS Build (eg: updated a module plugin). - [ ] Conforms with the [Documentation Writing Style Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md) | 8 小时前 | |
refactor: Drop committed build outputs and migrate to Turborepo (#46801) Resolves [ENG-20741](https://linear.app/expo/issue/ENG-20741) ## Summary This PR implements four groups of refactor tasks: - Cross-repo JS build tasks with Turbobuild - `**/build/**` output folders removed from tracked files - JS build scripts switched to an `expo-build` script (SWC-based) - `package.json:exports` added with `source` conditions for `src` TS files This, as a consequence means: - `turbo build` is necessary to build source files for many tasks; to make this easier it's been added as a repo `prepare` task (on `pnpm i`) for now - TypeScript `tsc` is not used as a pre-publish build tool anymore, and we're free to use it for type-checking only - The `expo-build` script loosely encompasses all of our usual build configurations and skips type-checking during `turbo build` (manual `pnpm build` invocations will still type check) - Many changes for type checks reflect immediately due to `customConditions: ["source"]` in the `tsconfig.base.json` - "Sub-task" builds are now gone, `expo-module build plugin` et al are replaced with focused `package.json:scripts` in the root package - Many packages that published raw TypeScript source files either have already been switched over to use `build` outputs, or should be switched over As a secondary consequence for future refactors: - We can update `tsconfig.json` files to include test files - We can update Jest's handling of TypeScript files to not type check (and update it to Jest 30, and do other various refactors) - We can automate secondary task tooling, like updating lint runs, replacing `check-packages`, publishing, etc more easily - We can potentially cut `main`'s git history to speed up the repo again (needs to be coordinated with GitHub Support most likely in ~3 SDK cycles) ### Usage Guide `pnpm i` will (for now) run `turbo build` automatically and will build all sources. The resulting repository structure should be vaguely the same as before the PR (except build outputs won't be tracked by Git) You can also run focused builds with `turbo build --filter [pkg]` or with `pnpm turbo build` from an individual package, which not only builds that individual package but all its transitive dependencies too. If you have direnv set up and activated, the read-only remote build cache for Turborepo is already activated, and most packages won't build on your machine. Turborepo will instead pull cached build outputs that CI has produced from the remote build cache on Cloudflare. (Check `.env` for the public env vars that activate the remote build cache) ## Set of changes - Add Turbo repo - Add `expo-build` script - Update various `package.json` scripts, exports, entrypoints - Add `source` condition to various `exports` on packages that are used as dependencies - `shellEmulator: true` in `pnpm-workspace.yaml` to allow sh syntax in pnpm scripts for Windows --------- Co-authored-by: Hassan Khan <hassan@expo.dev> Co-authored-by: kitten-agent <phil+agent@kitten.sh> | 15 天前 | |
Switch to pnpm (#44057) ## Summary This migrates the `expo/expo` repo to pnpm. Many changes were pulled out into separate PRs first, but smaller fixes are in individual commits on this branch. ### Notable changes for maintainers - Dependencies, by convention, that are packages in the monorepo, are now typically defined with `workspace:` prefixes to enforce that they're installed from the monorepo - However, not specifying `workspace:` will still prefer the monorepo version of a package, since we changed the default setting for this - `pnpm install` is runnable in any package, and unlike Yarn v1, doesn't necessarily have to be run from the root manually - Subsequent installs can be sped up (if you're confident nothing changed) using `pnpm install --ignore-scripts` - Patches are now handled by pnpm and not by `patch-package`. They must be listed in the `pnpm-workspace.yaml` file - `tools` is now part of the main monorepo and builds on install using the `prepare` script automatically for simplicity and easier maintenance - `prepare` scripts **must** only be used if you intend for an action to happen during install; use `prepublishOnly` otherwise. `expo-module-scripts` has been updated accordingly. This might change in the future if/when we'll stop committing build files - E2E tests now mostly **don't** use packaged tarballs, and instead will often use `link:` references (direct symlinks) into the monorepo. This has some caveats but is mostly safe with `autolinkingModuleResolution: true` enabled and other fixes - Please don't create more tests, scripts, or E2E tests that are "detached" from the monorepo, since these are hard to maintain and won't guarantee consistency - Self-referential requires and imports are **unreliable** without `package.json:exports`. This was the case before, but is more obvious now due to the isolated dependencies. Prefer relative requires whenever possible. ### Known issues - `expo start` in our monorepo will temporarily take longer to start up until we improve the `watchFolders` listing/detection --------- Co-authored-by: Vojtech Novak <vonovak@gmail.com> | 3 个月前 | |
chore: Update to `turbo@2.10.0` (#47231) | 8 天前 |
以下内容由 AI 翻译,如有问题请 点此提交 issue 反馈
Expo
在浏览器中尝试 Expo • 阅读文档 • 在我们的博客上了解更多 • 请求一个功能
关注我们
简介
Expo 是一个开源平台,用于制作可在 Android、iOS 和网页上运行的通用原生应用。它包含了一个通用运行时和一系列库,让你可以通过编写 React 和 JavaScript 来构建原生应用。
这个仓库包含了 Expo SDK、模块 API、Go 应用、命令行工具、路由器、文档和各种支持工具。 Expo 应用服务 (EAS) 是一个与 Expo 开源工具深度集成的托管服务平台。EAS 帮助您作为个人或团队构建、发布和迭代您的应用。
在与仓库互动之前,请阅读 Expo 社区准则。感谢您帮助保持 Expo 社区的开放和欢迎!
目录
📚 文档
了解如何构建和部署通用应用,请查阅我们的官方文档!
🗺 项目结构
packages包含所有 Expo 模块的源代码,如果你想要编辑一个库或者只是查看它是如何工作,这里可以找到。apps这里可以找到链接到开发模块的 Expo 项目。你将在这里进行大部分测试。apps/expo-go这里可以找到 Expo Go 的源代码。apps/expo-go/ios/Exponent.xcworkspace是 Xcode 工作区。开发 iOS 时,总是打开这个而不是Exponent.xcodeproj,因为工作区还会加载 CocoaPods 依赖。docshttps://docs.expo.dev 的源代码。templates当你运行npx create-expo-app时得到的模板项目。react-native-lab我们对react-native的分叉,用于构建 Expo Go。guides针对高级主题的深入教程,例如如何为客户端贡献。tools包含构建和配置工具。template-files包含需要私有密钥的文件模板。它们使用template-files/keys.json中的密钥填充。template-files/ios/dependencies.json指定了应用依赖的 CocoaPods。
[](https://expo.dev/client)
[](https://expo.dev/client)
👏 贡献指南
如果您喜欢 Expo 并希望帮助它变得更好,请查阅我们的贡献指南!如果您想对 Expo 命令行界面(CLI)进行开发,请查看我们的CLI 包。
❓ 常见问题
如果您对 Expo 有疑问并希望得到解答,请查阅我们的常见问题解答!
如果您仍有问题,可以在我们的Discord 和论坛上提问,或者通过 X平台关注@expo。
💙 团队介绍
您想知道是谁创造了 Expo 吗?以下是我们的团队成员!
许可协议
Expo 的源代码遵循MIT许可协议发布。某些依赖项采用不同的许可协议,例如BSD许可协议。
