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

feat: Collect gzip info in bundler plugins #145

Merged

Conversation

nicholas-codecov
Copy link
Collaborator

@nicholas-codecov nicholas-codecov commented Jun 19, 2024

Description

This PR adds in support for directly collect gzip values from a set of specific asset types.

Closes codecov/engineering-team#1820

Notable Changes

  • Add in function to calculate gzip values
  • Update Asset type to include gzipSize field
  • Update Rollup, Vite, and Webpack to collect gzip data
  • Update stats schema version to 2
  • Update unit tests
  • Update integration tests, add more snapshots for meta-frameworks

@codecov-notifications
Copy link

codecov-notifications bot commented Jun 19, 2024

Codecov Report

Attention: Patch coverage is 27.20307% with 190 lines in your changes missing coverage. Please review.

✅ All tests successful. No failed tests found.

Files Patch % Lines
...llup-bundle-analysis/rollupBundleAnalysisPlugin.ts 4.22% 68 Missing ⚠️
...c/vite-bundle-analysis/viteBundleAnalysisPlugin.ts 4.22% 68 Missing ⚠️
...ack-bundle-analysis/webpackBundleAnalysisPlugin.ts 5.40% 35 Missing ⚠️
packages/bundler-plugin-core/src/index.ts 0.00% 12 Missing ⚠️
packages/bundler-plugin-core/src/utils/index.ts 0.00% 6 Missing and 1 partial ⚠️
Components Coverage Δ
Plugin core 97.33% <75.94%> (-0.36%) ⬇️
Rollup plugin 10.81% <4.22%> (+0.44%) ⬆️
Vite plugin 11.02% <4.22%> (+0.49%) ⬆️
Webpack plugin 25.14% <5.40%> (-0.91%) ⬇️

📢 Thoughts on this report? Let us know!

Copy link

codecov bot commented Jun 19, 2024

Codecov Report

Attention: Patch coverage is 27.20307% with 190 lines in your changes missing coverage. Please review.

Project coverage is 76.58%. Comparing base (7597576) to head (1508063).

✅ All tests successful. No failed tests found.

Files Patch % Lines
...llup-bundle-analysis/rollupBundleAnalysisPlugin.ts 4.22% 68 Missing ⚠️
...c/vite-bundle-analysis/viteBundleAnalysisPlugin.ts 4.22% 68 Missing ⚠️
...ack-bundle-analysis/webpackBundleAnalysisPlugin.ts 5.40% 35 Missing ⚠️
packages/bundler-plugin-core/src/index.ts 0.00% 12 Missing ⚠️
packages/bundler-plugin-core/src/utils/index.ts 0.00% 6 Missing and 1 partial ⚠️
Additional details and impacted files
Components Coverage Δ
Plugin core 97.33% <75.94%> (-0.36%) ⬇️
Rollup plugin 10.81% <4.22%> (+0.44%) ⬆️
Vite plugin 11.02% <4.22%> (+0.49%) ⬆️
Webpack plugin 25.14% <5.40%> (-0.91%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@codecov-staging
Copy link

codecov-staging bot commented Jun 19, 2024

Bundle Report

Changes will decrease total bundle size by 588.63kB ⬇️

Bundle name Size Change
@codecov/bundler-plugin-core-cjs 42.71kB 591 bytes ⬆️
@codecov/sveltekit-plugin-esm 909 bytes 0 bytes
@codecov/remix-vite-plugin-esm 1.1kB 123 bytes ⬆️
@codecov/webpack-plugin-cjs 3.77kB 186 bytes ⬆️
@codecov/bundler-plugin-core-esm 7.9kB 580 bytes ⬆️
@codecov/rollup-plugin-cjs 2.82kB 142 bytes ⬇️
@codecov/vite-plugin-esm 1.26kB 0 bytes
@codecov/vite-plugin-cjs 2.8kB 157 bytes ⬇️
@codecov/nuxt-plugin-cjs 1.41kB 6 bytes ⬆️
@codecov/sveltekit-plugin-cjs 1.33kB 6 bytes ⬆️
@codecov/nuxt-plugin-esm 855 bytes 0 bytes
@codecov/webpack-plugin-esm 1.44kB 1.44kB ⬇️
@codecov/example-next-app-client-array-push 907.85kB 0 bytes
@codecov/remix-vite-plugin-cjs 1.32kB 6 bytes ⬆️
@codecov/example-next-app-edge-server-array-push 354 bytes 0 bytes
@codecov/example-webpack-app-array-push 71.19kB 0 bytes
@codecov/rollup-plugin-esm 1.32kB 0 bytes
@codecov/example-next-app-server-cjs (removed) 342.32kB ⬇️
@codecov/example-vite-app-esm (removed) 150.61kB ⬇️
@codecov/example-rollup-app-iife (removed) 95.45kB ⬇️

Copy link

codecov bot commented Jun 19, 2024

Bundle Report

Changes will increase total bundle size by 2.15kB ⬆️

Bundle name Size Change
@codecov/sveltekit-plugin-esm 909 bytes 0 bytes
@codecov/vite-plugin-esm 2.33kB 1.07kB ⬆️
@codecov/webpack-plugin-cjs 3.77kB 186 bytes ⬆️
@codecov/webpack-plugin-esm 1.44kB 0 bytes
@codecov/example-webpack-app-array-push 71.19kB 0 bytes
@codecov/bundler-plugin-core-esm 7.9kB 580 bytes ⬆️
@codecov/example-vite-app-esm 150.61kB 0 bytes
@codecov/nuxt-plugin-cjs 1.41kB 6 bytes ⬆️
@codecov/example-sveltekit-app-client-esm 714.6kB 0 bytes
@codecov/example-sveltekit-app-server-esm 974.58kB 0 bytes
@codecov/example-nuxt-app-client-esm 237.66kB 0 bytes
@codecov/bundler-plugin-core-cjs 42.71kB 591 bytes ⬆️
@codecov/example-nuxt-app-server-esm 347.95kB 0 bytes
@codecov/remix-vite-plugin-cjs 1.32kB 6 bytes ⬆️
@codecov/example-remix-app-client-esm 252.12kB 0 bytes
@codecov/example-next-app-edge-server-array-push 354 bytes 0 bytes
@codecov/example-remix-app-server-esm 12.55kB 0 bytes
@codecov/nuxt-plugin-esm 855 bytes 0 bytes
@codecov/remix-vite-plugin-esm 975 bytes 0 bytes
@codecov/example-next-app-client-array-push 907.85kB 0 bytes
@codecov/rollup-plugin-cjs 2.82kB 142 bytes ⬇️
@codecov/rollup-plugin-esm 1.32kB 0 bytes
@codecov/sveltekit-plugin-cjs 1.33kB 6 bytes ⬆️
@codecov/example-rollup-app-iife 95.46kB 4 bytes ⬆️
@codecov/vite-plugin-cjs 2.8kB 157 bytes ⬇️
@codecov/example-next-app-server-cjs 342.32kB 0 bytes

Copy link
Collaborator

@AbhiPrasad AbhiPrasad left a comment

Choose a reason for hiding this comment

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

im so sorry I forgot to actually send in my review 😭

image

@nicholas-codecov nicholas-codecov merged commit dfb26db into main Jun 24, 2024
39 of 41 checks passed
@nicholas-codecov nicholas-codecov deleted the gh-eng-1820-collect-gzip-info-in-bundler-plugins branch June 24, 2024 13:48
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.

Collect gzip info in bundler plugins
2 participants