Skip to content

Conversation

@bvonheid
Copy link

Context / Problem

External consumers could not use the Mock anymore because react-native-builder-bob wasn’t compiling the Mock files in their previous location. In practice that meant the published package didn’t contain a usable, compiled Mock entry for downstream projects, even though the repository had the implementation.

Summary

This PR makes the Mock implementation consumable from the published package by ensuring it’s included in the build output, cleaning up a legacy entry file, and aligning package export mappings for different toolchains (including React Native).


Changes included

  • Move Mock directory into src

    • Relocated Mock implementation under src/Mock
    • Updated imports across the module to match the new location
  • Remove legacy Mock entry file + adjust Jest

    • Deleted the unused Mock.ts
    • Updated jest.config.js (and related config) to reflect the new structure
  • Update package.json export mappings

    • Added/updated react-native and source mappings for ./Mock to ensure correct resolution for different bundlers/tooling

Testing / Verification

  • Run unit tests (Jest) to confirm config changes and paths are correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant