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

Jest expo doesn't transpile pnpm installed node_modules #26126

Closed
byCedric opened this issue Dec 26, 2023 · 4 comments
Closed

Jest expo doesn't transpile pnpm installed node_modules #26126

byCedric opened this issue Dec 26, 2023 · 4 comments
Assignees
Labels
Jest with Expo Pertains to using Jest with an Expo project. jest-expo stale

Comments

@byCedric
Copy link
Member

byCedric commented Dec 26, 2023

Minimal reproducible example

byCedric/expo-monorepo-example@f4afbbc (see CI)

Summary

It seems that jest-expo is not capable of transpiling node_modules from places such as /node_modules/.pnpm/module@version/node_modules/module.

Environment

  expo-env-info 1.0.5 environment info:
    System:
      OS: macOS 14.1.2
      Shell: 5.9 - /opt/homebrew/bin/zsh
    Binaries:
      Node: 20.10.0 - ~/.nvm/versions/node/v20.10.0/bin/node
      Yarn: 1.22.21 - ~/.nvm/versions/node/v20.10.0/bin/yarn
      npm: 10.2.4 - ~/.nvm/versions/node/v20.10.0/bin/npm
    Managers:
      CocoaPods: 1.13.0 - /Users/cedric/.rvm/gems/ruby-2.7.4/bin/pod
    SDKs:
      iOS SDK:
        Platforms: DriverKit 23.0, iOS 17.0, macOS 14.0, tvOS 17.0, watchOS 10.0
      Android SDK:
        API Levels: 31, 33, 33
        Build Tools: 30.0.2, 30.0.3, 31.0.0, 33.0.0, 33.0.1
        System Images: android-30 | Google APIs ARM 64 v8a, android-31 | Google APIs ARM 64 v8a, android-33 | Google APIs ARM 64 v8a
    IDEs:
      Android Studio: 2022.1 AI-221.6008.13.2211.9477386
      Xcode: 15.0.1/15A507 - /usr/bin/xcodebuild
    npmPackages:
      babel-preset-expo: ~10.0.0 => 10.0.0 
      expo: 50.0.0-beta.0 => 50.0.0-beta.0 
      react: 18.2.0 => 18.2.0 
      react-dom: 18.2.0 => 18.2.0 
      react-native: 0.73.0 => 0.73.0 
      react-native-web: ~0.19.6 => 0.19.6 
    npmGlobalPackages:
      eas-cli: 5.9.1
    Expo Workflow: managed
@byCedric byCedric added the needs validation Issue needs to be validated label Dec 26, 2023
@byCedric byCedric self-assigned this Dec 26, 2023
@byCedric byCedric added Jest with Expo Pertains to using Jest with an Expo project. jest-expo and removed needs validation Issue needs to be validated labels Dec 26, 2023
@expo-bot expo-bot added the needs review Issue is ready to be reviewed by a maintainer label Dec 26, 2023
@byCedric byCedric removed the needs review Issue is ready to be reviewed by a maintainer label Dec 26, 2023
@byCedric
Copy link
Member Author

byCedric commented Jan 8, 2024

Seems like the issue is related to the transformIgnorePatterns

image

@byCedric
Copy link
Member Author

byCedric commented Jan 8, 2024

Also related to upstream: facebook/react-native#36765. Fully disabling the "ignore patterns" does work, but also let's babel transpile everything in Jest.

Performance seems ok, but we need to do some RegEx engineering here to filter out /node_modules/.pnpm (pnpm) or /node_modules/.store (npm) patterns.

byCedric added a commit to byCedric/expo-monorepo-example that referenced this issue Jan 8, 2024
Copy link
Contributor

github-actions bot commented Apr 7, 2024

This issue is stale because it has been open for 90 days with no activity. If there is no activity in the next 7 days, the issue will be closed.

@github-actions github-actions bot added the stale label Apr 7, 2024
Copy link
Contributor

This issue was closed because it has been inactive for 7 days since being marked as stale. Please open a new issue if you believe you are encountering a related problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Jest with Expo Pertains to using Jest with an Expo project. jest-expo stale
Projects
None yet
Development

No branches or pull requests

2 participants