Skip to content

Comments

Fix Mock exports for external consumers#8215

Merged
markdevocht merged 6 commits intowix:masterfrom
bvonheid:fix/mock-not-available
Feb 4, 2026
Merged

Fix Mock exports for external consumers#8215
markdevocht merged 6 commits intowix:masterfrom
bvonheid:fix/mock-not-available

Conversation

@bvonheid
Copy link
Contributor

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.

@markdevocht markdevocht self-requested a review February 4, 2026 13:53
@markdevocht markdevocht self-assigned this Feb 4, 2026
@markdevocht
Copy link
Contributor

@bvonheid Thank you for your contribution! I was just starting to investigate the same problem when I came accross your PR.

@markdevocht markdevocht mentioned this pull request Feb 4, 2026
@markdevocht markdevocht merged commit 19e3c49 into wix:master Feb 4, 2026
5 checks passed
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.

2 participants