Skip to content

Fix: V7 - JavaScript V9 - set undefined for updateProd when not set #4740

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

Merged
merged 58 commits into from
May 8, 2025

Conversation

lucas-zimerman
Copy link
Collaborator

@lucas-zimerman lucas-zimerman commented Apr 9, 2025

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 Description

  • Added tests to the wrap function that were missing.
  • Made updateProps always set but with undefined value, avoiding break changes and making the compiler happy.
  • Hide updateProps and children from wrap options.

💡 Motivation and Context

Fixes: #4728

💚 How did you test it?

Unit test, Sample app

📝 Checklist

  • I added tests to verify changes
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • All tests passing
  • No breaking changes

🔮 Next steps

#skip-changelog.

updateProps: {}
updateProps: options?.profilerProps
Copy link
Member

@krystofwoldrich krystofwoldrich Apr 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought we would keep the updateProps: {}? I think just removing the updateProps from the wrap type and here ensuring they will always be {} is enough. I would not delete them in the ReactNativeProfiler class.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, probably a misunderstanding, fixed here 517161c

@lucas-zimerman
Copy link
Collaborator Author

@krystofwoldrich I had to split the mocked and real tests from the wrap due to internal conflicts with the internal libraries when interacting with both on the same file (I can't properly remove the mocks otherwise it breaks the React Native testing hooks).

@lucas-zimerman lucas-zimerman marked this pull request as draft May 8, 2025 13:05
Co-authored-by: Krystof Woldrich <[email protected]>
@krystofwoldrich krystofwoldrich marked this pull request as ready for review May 8, 2025 15:10
Copy link
Member

@krystofwoldrich krystofwoldrich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for all the updates and fixing these props. Looks good.

@krystofwoldrich krystofwoldrich merged commit a1bd56f into v7 May 8, 2025
69 of 70 checks passed
@krystofwoldrich krystofwoldrich deleted the lz/jsv9/fix-props branch May 8, 2025 15:13
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.

3 participants