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(nextjs): Export isomorphic data fetching wrappers from client SDK #6790

Merged
merged 16 commits into from Jan 16, 2023

Conversation

lforst
Copy link
Member

@lforst lforst commented Jan 16, 2023

This PR fixes some issue I can't find anymore where when our wrappers are used manually on isomorphic data fetchers (getInitialProps), they throw an error.

We're fixing this by exporting pass-through wrappers from the client SDK. The typing file was also updated so the server and client SDK types don't collide.

AbhiPrasad added a commit that referenced this pull request Jan 16, 2023
type AppGetInitialProps = typeof App['getInitialProps'];

/**
* A passthrough function in case this function is used on the clientside. We need to make the returned function async
Copy link
Member

Choose a reason for hiding this comment

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

could we theoretically create spans instead of transactions here?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah we definitely could in the future!

Base automatically changed from lforst-rename-wrapping-methods to master January 16, 2023 14:00
@github-actions
Copy link
Contributor

size-limit report 📦

Path Size
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 19.84 KB (+0.01% 🔺)
@sentry/browser - ES5 CDN Bundle (minified) 61.46 KB (0%)
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 18.61 KB (+0.03% 🔺)
@sentry/browser - ES6 CDN Bundle (minified) 55 KB (0%)
@sentry/browser - Webpack (gzipped + minified) 20.37 KB (0%)
@sentry/browser - Webpack (minified) 66.54 KB (0%)
@sentry/react - Webpack (gzipped + minified) 20.4 KB (0%)
@sentry/nextjs Client - Webpack (gzipped + minified) 47.69 KB (+0.05% 🔺)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 26.83 KB (+0.03% 🔺)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified) 25.28 KB (0%)
@sentry/replay ES6 CDN Bundle (gzipped + minified) 43.43 KB (-0.82% 🔽)
@sentry/replay - Webpack (gzipped + minified) 38.65 KB (-0.96% 🔽)

@lforst lforst enabled auto-merge (squash) January 16, 2023 14:22
@lforst lforst merged commit f29f4b1 into master Jan 16, 2023
@lforst lforst deleted the lforst-fix-clientside-data-fetcher-export branch January 16, 2023 14:25
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.

None yet

2 participants