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

[Bug] Project dist entry points missing/unaligned since 11.9.0 #930

Closed
tomwanzek opened this issue Feb 26, 2023 · 3 comments · Fixed by #931 or #932
Closed

[Bug] Project dist entry points missing/unaligned since 11.9.0 #930

tomwanzek opened this issue Feb 26, 2023 · 3 comments · Fixed by #931 or #932
Assignees

Comments

@tomwanzek
Copy link

Steps to Reproduce the Problem

  • Upgrade a typescript-based project to use Instabug RN to 11.9.0

Expected Behavior

  • Project can be compiled with typescript compiler finding the instabug modules/exports

Actual Behavior

  • Compilation fails to compile because of:

Cannot find module 'instabug-reactnative' or its corresponding type declarations.

The issue manifests, it appears, as the instabug-reactnative version 11.9.0 package.json contains:

"main": "dist/index",
"types": "dist/index.d.ts"

However, the dist directory actually does not contain these entry points. Instead, they are found under dist/src/... and the

/dist directory also includes a subdirectory /tests, which is likely unintentional

In short, it seems, the build -> distribution pipeline is misaligned in terms of what gets moved to /dist and where.

By implication, we used to have an import of

import type { NetworkData } from "instabug-reactnative/dist/utils/XhrNetworkInterceptor";

which is broken for the same reason.

Preferably, we should be able to import type { NetworkData } from "instabug-reactnative" to begin with. I.e. there should be re-exports to the top-level index file, so it can be used more "offically" in network obfuscator logic.

Instabug integration code

Not needed, see explanation under "Expected Behavior"

SDK Version

Issue introduced with version 11.9.0.

React Native, iOS and Android Versions

Affects react native level irrespective of native versions

Device Model

n/a

[Optional] Project That Reproduces the Issue

@DavidMina96
Copy link
Contributor

Hi @tomwanzek,

Thank you for reporting this issue and providing a detailed description as always. We'll look into it and get back to you.

@DavidMina96 DavidMina96 self-assigned this Feb 27, 2023
This was linked to pull requests Feb 27, 2023
@DavidMina96
Copy link
Contributor

@tomwanzek Glad to inform you, and anyone else who is facing this issue, that a new version 11.9.1 is now released, which addresses the compilation error and re-exports the NetworkData type as well. 🎉

Thanks again for catching this issue early on and reporting it. Please feel free to let us know if you have any further feedback anytime.

@tomwanzek
Copy link
Author

@DavidMina96 Wonderful 🥇 Thanks for the quick fix 🙇 Lovely to get NetworkData from top-level now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants