Skip to content

build: Add codecov bundle analysis for npm packages #11276

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 7 commits into from
Mar 26, 2024

Conversation

AbhiPrasad
Copy link
Member

@AbhiPrasad AbhiPrasad commented Mar 25, 2024

Given our bundling setup is a little more complicated, this patch adds codecov bundle analysis for our just our npm builds (ESM and CJS). It generates the bundle name from the package.json

Previous attempt: #10682

https://docs.codecov.com/docs/rollup-quick-start

https://app.codecov.io/gh/getsentry/sentry-javascript/bundles

Given our bundling setup is a little more complicated, this patch adds
codecov bundle analysis for our npm builds (ESM and CJS). It generates
the bundle name from the package.json
@AbhiPrasad AbhiPrasad requested a review from a team March 25, 2024 20:47
@AbhiPrasad AbhiPrasad self-assigned this Mar 25, 2024
@AbhiPrasad AbhiPrasad requested review from lforst and Lms24 and removed request for a team March 25, 2024 20:47
Copy link
Contributor

github-actions bot commented Mar 25, 2024

size-limit report 📦

Path Size
@sentry/browser (incl. Tracing, Replay, Feedback) 80.52 KB (added)
@sentry/browser (incl. Tracing, Replay) 71.87 KB (added)
@sentry/browser (incl. Tracing, Replay with Canvas) 75.67 KB (added)
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 65.42 KB (added)
@sentry/browser (incl. Tracing) 36.69 KB (added)
@sentry/browser (incl. browserTracingIntegration) 36.69 KB (added)
@sentry/browser (incl. feedbackIntegration) 31.33 KB (added)
@sentry/browser (incl. feedbackModalIntegration) 31.44 KB (added)
@sentry/browser (incl. feedbackScreenshotIntegration) 31.45 KB (added)
@sentry/browser (incl. sendFeedback) 27.4 KB (added)
@sentry/browser 22.56 KB (added)
CDN Bundle (incl. Tracing, Replay, Feedback) 74.87 KB (added)
CDN Bundle (incl. Tracing, Replay) 69.71 KB (added)
CDN Bundle (incl. Tracing) 36.28 KB (added)
CDN Bundle 23.92 KB (added)
CDN Bundle (incl. Tracing, Replay) - uncompressed 218.94 KB (added)
CDN Bundle (incl. Tracing) - uncompressed 109.5 KB (added)
CDN Bundle - uncompressed 70.85 KB (added)
@sentry/react (incl. Tracing, Replay) 71.84 KB (added)
@sentry/react 22.59 KB (added)

@AbhiPrasad
Copy link
Member Author

This works! although is a little jank. Let's get it merged in so that we can collect results from develop for a while, I'll come back and slowly optimize this setup.

@@ -26,7 +26,7 @@
"yaml": "2.2.2"
},
"volta": {
"node": "18.17.1",
Copy link
Contributor

Choose a reason for hiding this comment

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

Why the bump?

Copy link
Member Author

Choose a reason for hiding this comment

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

Codecov plugins require min Node version of 18.18.0.

@mydea
Copy link
Member

mydea commented Mar 26, 2024

Do you have a link to where I can see the result of this (as an example)? :)

@AbhiPrasad
Copy link
Member Author

AbhiPrasad commented Mar 26, 2024

Do you have a link to where I can see the result of this (as an example)? :)

I did have a link, but it's stopped showing up :/ https://app.codecov.io/gh/getsentry/sentry-javascript/bundles/abhi-codecov-npm

let me dig into why

@AbhiPrasad
Copy link
Member Author

@AbhiPrasad AbhiPrasad merged commit 3ae830c into develop Mar 26, 2024
@AbhiPrasad AbhiPrasad deleted the abhi-codecov-npm branch March 26, 2024 14:07
cadesalaberry pushed a commit to cadesalaberry/sentry-javascript that referenced this pull request Apr 19, 2024
Given our bundling setup is a little more complicated, this patch adds
codecov bundle analysis for our just our npm builds (ESM and CJS). It
generates the bundle name from the package.json

Previous attempt:
getsentry#10682

https://docs.codecov.com/docs/rollup-quick-start

https://app.codecov.io/gh/getsentry/sentry-javascript/bundles
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