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: Bundle names not being reset properly #209

Merged
merged 4 commits into from
Nov 18, 2024

Conversation

nicholas-codecov
Copy link
Collaborator

Description

We noticed that when running the plugins to analyze the plugins the bundle names were not being reset with Unbuild correctly. This resolves the issue, by reseting the bundle name when running.

@codecov-staging
Copy link

codecov-staging bot commented Nov 18, 2024

Codecov Report

Attention: Patch coverage is 40.00000% with 6 lines in your changes missing coverage. Please review.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
packages/bundler-plugin-core/src/utils/Output.ts 66.66% 2 Missing ⚠️
...ndle-analysis/nextJSWebpackBundleAnalysisPlugin.ts 0.00% 1 Missing ⚠️
...llup-bundle-analysis/rollupBundleAnalysisPlugin.ts 0.00% 1 Missing ⚠️
...c/vite-bundle-analysis/viteBundleAnalysisPlugin.ts 0.00% 1 Missing ⚠️
...ack-bundle-analysis/webpackBundleAnalysisPlugin.ts 0.00% 1 Missing ⚠️
Components Coverage Δ
Plugin core 97.02% <66.66%> (-0.05%) ⬇️
Rollup plugin 10.81% <0.00%> (ø)
Vite plugin 11.02% <0.00%> (ø)
Webpack plugin 49.88% <0.00%> (ø)

📢 Thoughts on this report? Let us know!

Copy link

codecov bot commented Nov 18, 2024

Codecov Report

Attention: Patch coverage is 40.00000% with 6 lines in your changes missing coverage. Please review.

Project coverage is 79.06%. Comparing base (c3546ff) to head (4bd7333).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
packages/bundler-plugin-core/src/utils/Output.ts 66.66% 2 Missing ⚠️
...ndle-analysis/nextJSWebpackBundleAnalysisPlugin.ts 0.00% 1 Missing ⚠️
...llup-bundle-analysis/rollupBundleAnalysisPlugin.ts 0.00% 1 Missing ⚠️
...c/vite-bundle-analysis/viteBundleAnalysisPlugin.ts 0.00% 1 Missing ⚠️
...ack-bundle-analysis/webpackBundleAnalysisPlugin.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
Components Coverage Δ
Plugin core 97.02% <66.66%> (-0.05%) ⬇️
Rollup plugin 10.81% <0.00%> (ø)
Vite plugin 11.02% <0.00%> (ø)
Webpack plugin 49.88% <0.00%> (ø)

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

@@ -43,7 +43,7 @@ export const nextJSWebpackBundleAnalysisPlugin: ExtendedBAUploadPlugin<{
stage: webpack.Compilation.PROCESS_ASSETS_STAGE_REPORT,
},
async () => {
output.setBundleName(output.bundleName);
output.setBundleName(output.originalBundleName);
Copy link
Contributor

Choose a reason for hiding this comment

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

is this a function to invoke like output.originalBundleName()?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

so with a get method you don't need to actually call it, it handles that under the hood for you.

@codecov-staging
Copy link

codecov-staging bot commented Nov 18, 2024

Bundle Report

Changes will increase total bundle size by 206 bytes (0.01%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
@codecov/sveltekit-plugin-esm 1.09kB 198 bytes (22.22%) ⬆️
@codecov/nextjs-webpack-plugin-cjs 2.11kB 8 bytes (0.38%) ⬆️

Copy link

codecov bot commented Nov 18, 2024

Bundle Report

Changes will decrease total bundle size by 39.24kB (-0.68%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
@codecov/vite-plugin-cjs 2.8kB 8 bytes (0.29%) ⬆️
@codecov/remix-vite-plugin-esm 957 bytes 133 bytes (-12.2%) ⬇️
@codecov/bundler-plugin-core-cjs 59.01kB 32 bytes (0.05%) ⬆️
@codecov/bundler-plugin-core-esm 12.29kB 40.82kB (-76.86%) ⬇️
@codecov/rollup-plugin-cjs 2.82kB 8 bytes (0.28%) ⬆️
@codecov/rollup-plugin-esm 2.33kB 1.03kB (79.03%) ⬆️
@codecov/sveltekit-plugin-esm 1.09kB 198 bytes (22.22%) ⬆️
@codecov/webpack-plugin-cjs 4.41kB 8 bytes (0.18%) ⬆️
@codecov/webpack-plugin-esm 3.37kB 14 bytes (0.42%) ⬆️
@codecov/example-sveltekit-app-client-esm 715.09kB 2 bytes (-0.0%) ⬇️
@codecov/example-sveltekit-app-server-esm 974.29kB 1 bytes (-0.0%) ⬇️
@codecov/nextjs-webpack-plugin-cjs 2.11kB 8 bytes (0.38%) ⬆️
@codecov/nextjs-webpack-plugin-esm 1.88kB 761 bytes (68.31%) ⬆️
@codecov/bundle-analyzer-esm 3.11kB 347 bytes (-10.05%) ⬇️

@suejung-sentry suejung-sentry merged commit 9968698 into main Nov 18, 2024
58 of 62 checks passed
@suejung-sentry suejung-sentry deleted the fix-bundle-names-not-being-reset branch November 18, 2024 20: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.

2 participants