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

fix: Make redux integration be configurable via normalizeDepth #7379

Merged
merged 2 commits into from Mar 8, 2023

Conversation

lforst
Copy link
Member

@lforst lforst commented Mar 8, 2023

Attempts to fix #7376

Makes the normalize function overridable via a non-enumerable property on the normalization target.

@lforst lforst requested review from mydea and AbhiPrasad March 8, 2023 13:39
@github-actions
Copy link
Contributor

github-actions bot commented Mar 8, 2023

size-limit report 📦

Path Size
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 20.15 KB (+0.17% 🔺)
@sentry/browser - ES5 CDN Bundle (minified) 62.63 KB (+0.18% 🔺)
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 18.79 KB (+0.17% 🔺)
@sentry/browser - ES6 CDN Bundle (minified) 55.61 KB (+0.21% 🔺)
@sentry/browser - Webpack (gzipped + minified) 20.53 KB (+0.18% 🔺)
@sentry/browser - Webpack (minified) 67.1 KB (+0.17% 🔺)
@sentry/react - Webpack (gzipped + minified) 20.56 KB (+0.17% 🔺)
@sentry/nextjs Client - Webpack (gzipped + minified) 48.3 KB (+0.07% 🔺)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 27.29 KB (+0.12% 🔺)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified) 25.55 KB (+0.14% 🔺)
@sentry/replay ES6 CDN Bundle (gzipped + minified) 43.15 KB (+0.08% 🔺)
@sentry/replay - Webpack (gzipped + minified) 37.16 KB (0%)
@sentry/browser + @sentry/tracing + @sentry/replay - ES6 CDN Bundle (gzipped + minified) 60.94 KB (+0.06% 🔺)
@sentry/browser + @sentry/replay - ES6 CDN Bundle (gzipped + minified) 54.26 KB (+0.06% 🔺)

// have already been normalized.
let overriddenDepth = depth;

if ((value as ObjOrArray<unknown>)['__sentry_override_normalization_depth__']) {
Copy link
Member

Choose a reason for hiding this comment

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

l: Maybe if typeof value['...'] === 'number'? Then we can remove the type cast below (I think?) and at least avoid this being incorrect. maybe overkill, though...

Copy link
Member Author

Choose a reason for hiding this comment

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

sadly doesn't work because of the other type cast :(

Copy link
Member

@mydea mydea left a comment

Choose a reason for hiding this comment

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

:shipit:

@lforst lforst merged commit 2b44452 into develop Mar 8, 2023
@lforst lforst deleted the lforst-redux-normalize-depth-option-stuff branch March 8, 2023 15:52
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.

When normalizeDepth is not provided, Redux store is just [object]
3 participants