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

fix(expo-modules-autolinking): resolve packages from expo package context #25817

Merged
merged 6 commits into from
Dec 11, 2023

Conversation

byCedric
Copy link
Member

@byCedric byCedric commented Dec 8, 2023

Why

This is the same as #25717, but with additional changes for CI.

How

  • Added { paths: require.resolve('expo/package.json') } to the generated project integrator script
  • Updated Bundle React Native code and images buildphase to resolve @expo/cli from expo

Once everything is running correctly, I'll make some tweaks to avoid the double-resolves we are doing in most places. We can change things like:

require(require.resolve('expo-modules-autolinking', { paths: [require.resolve('expo/package.json')] }))

With

require('expo/autolinking')

This is because expo is a direct project dependency, and thus always resolve-able from the project root (or <projectRoot>/ios/Pods directories). But let's do this after it works.

Test Plan

TBD

Checklist

@expo-bot expo-bot added the bot: suggestions ExpoBot has some suggestions label Dec 8, 2023
@byCedric byCedric force-pushed the @bycedric/autolinking/fix-isolated-module-issues branch 2 times, most recently from 6208c04 to 18360a3 Compare December 8, 2023 15:09
@byCedric byCedric force-pushed the @bycedric/autolinking/fix-isolated-module-issues branch from 18360a3 to 524dacb Compare December 9, 2023 14:13
@expo-bot

This comment was marked as off-topic.

@byCedric byCedric merged commit 5310bc2 into main Dec 11, 2023
17 checks passed
@byCedric byCedric deleted the @bycedric/autolinking/fix-isolated-module-issues branch December 11, 2023 11:19
onizam95 pushed a commit to onizam95/expo-av-drm that referenced this pull request Jan 15, 2024
…ontext (expo#25817)

# Why

This is the same as expo#25717, but with additional changes for CI.

# How

- Added `{ paths: require.resolve('expo/package.json') }` to the
generated project integrator script
- Updated `Bundle React Native code and images` buildphase to resolve
`@expo/cli` from `expo`

Once everything is running correctly, I'll make some tweaks to avoid the
double-resolves we are doing in most places. We can change things like:

```js
require(require.resolve('expo-modules-autolinking', { paths: [require.resolve('expo/package.json')] }))
```

With

```js
require('expo/autolinking')
```

This is because `expo` is a direct project dependency, and thus always
resolve-able from the project root (or `<projectRoot>/ios/Pods`
directories). But let's do this _after_ it works.

# Test Plan

TBD

# Checklist

<!--
Please check the appropriate items below if they apply to your diff.
This is required for changes to Expo modules.
-->

- [x] 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` & EAS Build
(eg: updated a module plugin).

---------

Co-authored-by: franksmule <ollie@lunak.uk>
Co-authored-by: Expo Bot <34669131+expo-bot@users.noreply.github.com>
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.

None yet

3 participants