Skip to content

fix: Legacy Vite build hashes not being normalized#247

Merged
nicholas-codecov merged 13 commits intomainfrom
fix-legacy-vite-build-hashes-not-being-normalized
Feb 10, 2025
Merged

fix: Legacy Vite build hashes not being normalized#247
nicholas-codecov merged 13 commits intomainfrom
fix-legacy-vite-build-hashes-not-being-normalized

Conversation

@nicholas-codecov
Copy link

Description

This PR fixes an issue where if you're using the @vitejs/plugin-legacy in your Vite application, it is not currently normalizing the asset path names, this PR updates the normalizePath function to handle those cases.

As well, this PR includes and update to bring Vitest up to date.

Notable Changes

  • Update normalizePath to handle Vite legacy builds
  • Add in test case
  • Update Vitest
  • Added in changeset

@nicholas-codecov nicholas-codecov changed the title fix Legacy Vite build hashes not being normalized fix: Legacy Vite build hashes not being normalized Feb 7, 2025
@codecov
Copy link

codecov bot commented Feb 7, 2025

Bundle Report

Changes will increase total bundle size by 109.45kB (1.7%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
@codecov/vite-plugin-cjs 3.23kB 88 bytes (2.8%) ⬆️
@codecov/remix-vite-plugin-cjs 1.7kB 28 bytes (1.67%) ⬆️
@codecov/vite-plugin-esm 2.74kB 1.5kB (120.82%) ⬆️
@codecov/remix-vite-plugin-esm 957 bytes -474 bytes (-33.12%) ⬇️
@codecov/bundler-plugin-core-cjs 138.02kB 281 bytes (0.2%) ⬆️
@codecov/bundler-plugin-core-esm 117.29kB 102.92kB (716.01%) ⬆️
@codecov/rollup-plugin-cjs 3.25kB 84 bytes (2.65%) ⬆️
@codecov/nuxt-plugin-cjs 1.77kB 28 bytes (1.61%) ⬆️
@codecov/rollup-plugin-esm 2.75kB 1.44kB (110.91%) ⬆️
@codecov/nuxt-plugin-esm 1.57kB 715 bytes (83.63%) ⬆️
@codecov/sveltekit-plugin-cjs 1.72kB 28 bytes (1.66%) ⬆️
@codecov/sveltekit-plugin-esm 1.46kB 571 bytes (64.09%) ⬆️
@codecov/webpack-plugin-cjs 5.03kB 76 bytes (1.53%) ⬆️
@codecov/webpack-plugin-esm 3.96kB 76 bytes (1.96%) ⬆️
@codecov/solidstart-plugin-cjs 1.72kB 28 bytes (1.65%) ⬆️
@codecov/solidstart-plugin-esm 1.47kB 28 bytes (1.95%) ⬆️
@codecov/nextjs-webpack-plugin-cjs 2.64kB 58 bytes (2.25%) ⬆️
@codecov/nextjs-webpack-plugin-esm 2.36kB 1.25kB (112.03%) ⬆️
@codecov/bundle-analyzer-cjs 4.39kB 52 bytes (1.2%) ⬆️
@codecov/astro-plugin-esm 1.51kB 647 bytes (75.06%) ⬆️
@codecov/astro-plugin-cjs 1.71kB 28 bytes (1.66%) ⬆️

Affected Assets, Files, and Routes:

view changes for bundle: @codecov/sveltekit-plugin-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
index.mjs (New) 1.46kB 1.46kB 100.0% 🚀
index.d.mts (Deleted) -891 bytes 0 bytes -100.0% 🗑️

Files in index.mjs:

  • ./src/index.ts → Total Size: 750 bytes
view changes for bundle: @codecov/astro-plugin-cjs

Assets Changed:

Asset Name Size Change Total Size Change (%)
index.cjs 28 bytes 1.71kB 1.66%

Files in index.cjs:

  • ./src/index.ts → Total Size: 987 bytes
view changes for bundle: @codecov/solidstart-plugin-cjs

Assets Changed:

Asset Name Size Change Total Size Change (%)
index.cjs 28 bytes 1.72kB 1.65%

Files in index.cjs:

  • ./src/index.ts → Total Size: 882 bytes
view changes for bundle: @codecov/rollup-plugin-cjs

Assets Changed:

Asset Name Size Change Total Size Change (%)
index.cjs 84 bytes 3.25kB 2.65%

Files in index.cjs:

  • ./src/index.ts → Total Size: 822 bytes
view changes for bundle: @codecov/webpack-plugin-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
index.mjs 76 bytes 3.96kB 1.96%

Files in index.mjs:

  • ./src/index.ts → Total Size: 875 bytes
view changes for bundle: @codecov/astro-plugin-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
index.mjs (New) 1.51kB 1.51kB 100.0% 🚀
index.d.ts (Deleted) -862 bytes 0 bytes -100.0% 🗑️

Files in index.mjs:

  • ./src/index.ts → Total Size: 859 bytes
view changes for bundle: @codecov/rollup-plugin-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
index.mjs (New) 2.75kB 2.75kB 100.0% 🚀
index.d.mts (Deleted) -1.3kB 0 bytes -100.0% 🗑️

Files in index.mjs:

  • ./src/index.ts → Total Size: 705 bytes
view changes for bundle: @codecov/nuxt-plugin-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
index.mjs (New) 1.57kB 1.57kB 100.0% 🚀
index.d.ts (Deleted) -855 bytes 0 bytes -100.0% 🗑️

Files in index.mjs:

  • ./src/index.ts → Total Size: 805 bytes
view changes for bundle: @codecov/webpack-plugin-cjs

Assets Changed:

Asset Name Size Change Total Size Change (%)
index.cjs 76 bytes 5.03kB 1.53%

Files in index.cjs:

  • ./src/index.ts → Total Size: 992 bytes
view changes for bundle: @codecov/nextjs-webpack-plugin-cjs

Assets Changed:

Asset Name Size Change Total Size Change (%)
index.cjs 58 bytes 2.64kB 2.25%

Files in index.cjs:

  • ./src/index.ts → Total Size: 832 bytes
view changes for bundle: @codecov/bundler-plugin-core-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
index.mjs (New) 117.29kB 117.29kB 100.0% 🚀
index.d.ts (Deleted) -14.37kB 0 bytes -100.0% 🗑️

Files in index.mjs:

  • ./src/utils/createRollupAsset.ts → Total Size: 267 bytes

  • ./src/utils/Output.ts → Total Size: 5.18kB

  • ./src/index.ts → Total Size: 0 bytes

  • ./src/utils/normalizePath.ts → Total Size: 863 bytes

view changes for bundle: @codecov/example-next-15-app-client-array-push

Assets Changed:

Asset Name Size Change Total Size Change (%)
server/middleware-*.js -873 bytes 36 bytes -96.04%
server/middleware-*.js 873 bytes 909 bytes 2425.0% ⚠️
static/3XnNwbd9xxY_Bm4lBB5wq/_buildManifest.js (New) 540 bytes 540 bytes 100.0% 🚀
static/3XnNwbd9xxY_Bm4lBB5wq/_ssgManifest.js (New) 77 bytes 77 bytes 100.0% 🚀
static/DfoepZxpNoezWQ7Tdqi7Q/_buildManifest.js (Deleted) -540 bytes 0 bytes -100.0% 🗑️
static/DfoepZxpNoezWQ7Tdqi7Q/_ssgManifest.js (Deleted) -77 bytes 0 bytes -100.0% 🗑️
view changes for bundle: @codecov/example-next-app-client-array-push

Assets Changed:

Asset Name Size Change Total Size Change (%)
static/S1fHjcEqS0PonV1ag4uke/_buildManifest.js (New) 224 bytes 224 bytes 100.0% 🚀
static/S1fHjcEqS0PonV1ag4uke/_ssgManifest.js (New) 77 bytes 77 bytes 100.0% 🚀
static/zTSOBTUFl7J403m2iLvK7/_buildManifest.js (Deleted) -224 bytes 0 bytes -100.0% 🗑️
static/zTSOBTUFl7J403m2iLvK7/_ssgManifest.js (Deleted) -77 bytes 0 bytes -100.0% 🗑️
view changes for bundle: @codecov/sveltekit-plugin-cjs

Assets Changed:

Asset Name Size Change Total Size Change (%)
index.cjs 28 bytes 1.72kB 1.66%

Files in index.cjs:

  • ./src/index.ts → Total Size: 878 bytes
view changes for bundle: @codecov/nuxt-plugin-cjs

Assets Changed:

Asset Name Size Change Total Size Change (%)
index.cjs 28 bytes 1.77kB 1.61%

Files in index.cjs:

  • ./src/index.ts → Total Size: 941 bytes
view changes for bundle: @codecov/bundle-analyzer-cjs

Assets Changed:

Asset Name Size Change Total Size Change (%)
index.cjs 52 bytes 2.07kB 2.58%

Files in index.cjs:

  • ./src/assets.ts → Total Size: 782 bytes

  • ./src/index.ts → Total Size: 649 bytes

view changes for bundle: @codecov/solidstart-plugin-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
index.mjs 28 bytes 1.47kB 1.95%

Files in index.mjs:

  • ./src/index.ts → Total Size: 754 bytes
view changes for bundle: @codecov/vite-plugin-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
index.mjs (New) 2.74kB 2.74kB 100.0% 🚀
index.d.cts (Deleted) -1.24kB 0 bytes -100.0% 🗑️

Files in index.mjs:

  • ./src/index.ts → Total Size: 693 bytes
view changes for bundle: @codecov/vite-plugin-cjs

Assets Changed:

Asset Name Size Change Total Size Change (%)
index.cjs 88 bytes 3.23kB 2.8%

Files in index.cjs:

  • ./src/index.ts → Total Size: 810 bytes
view changes for bundle: @codecov/remix-vite-plugin-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
index.d.cts (New) 957 bytes 957 bytes 100.0% 🚀
index.mjs (Deleted) -1.43kB 0 bytes -100.0% 🗑️

Files in index.d.cts:

  • ./src/index.ts → Total Size: 824 bytes
view changes for bundle: @codecov/remix-vite-plugin-cjs

Assets Changed:

Asset Name Size Change Total Size Change (%)
index.cjs 28 bytes 1.7kB 1.67%

Files in index.cjs:

  • ./src/index.ts → Total Size: 871 bytes
view changes for bundle: @codecov/bundler-plugin-core-cjs

Assets Changed:

Asset Name Size Change Total Size Change (%)
index.cjs 281 bytes 138.02kB 0.2%

Files in index.cjs:

  • ./src/utils/Output.ts → Total Size: 5.18kB

  • ./src/index.ts → Total Size: 0 bytes

  • ./src/utils/normalizePath.ts → Total Size: 863 bytes

  • ./src/utils/createRollupAsset.ts → Total Size: 267 bytes

view changes for bundle: @codecov/nextjs-webpack-plugin-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
index.mjs (New) 2.36kB 2.36kB 100.0% 🚀
index.d.mts (Deleted) -1.11kB 0 bytes -100.0% 🗑️

Files in index.mjs:

  • ./src/index.ts → Total Size: 715 bytes
view changes for bundle: @codecov/bundle-analyzer-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
index.d.cts (New) 2.77kB 2.77kB 100.0% 🚀
cli.d.cts (New) 342 bytes 342 bytes 100.0% 🚀
index.d.mts (Deleted) -2.77kB 0 bytes -100.0% 🗑️
cli.d.mts (Deleted) -342 bytes 0 bytes -100.0% 🗑️

Files in index.d.cts:

  • ./src/index.ts → Total Size: 1.66kB

@codecov-staging
Copy link

codecov-staging bot commented Feb 7, 2025

Bundle Report

Changes will increase total bundle size by 106.36kB (1.69%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
@codecov/bundler-plugin-core-cjs 138.02kB 281 bytes (0.2%) ⬆️
@codecov/bundler-plugin-core-esm 117.29kB 102.92kB (716.01%) ⬆️
@codecov/vite-plugin-cjs 3.23kB 88 bytes (2.8%) ⬆️
@codecov/bundle-analyzer-esm 3.51kB 52 bytes (1.51%) ⬆️
@codecov/nextjs-webpack-plugin-esm 2.36kB 58 bytes (2.52%) ⬆️
@codecov/rollup-plugin-esm 2.75kB 1.44kB (110.91%) ⬆️
@codecov/webpack-plugin-cjs 5.03kB 76 bytes (1.53%) ⬆️
@codecov/bundle-analyzer-cjs 4.39kB 52 bytes (1.2%) ⬆️
@codecov/solidstart-plugin-cjs 1.72kB 28 bytes (1.65%) ⬆️
@codecov/sveltekit-plugin-cjs 1.72kB 28 bytes (1.66%) ⬆️
@codecov/solidstart-plugin-esm 1.47kB 516 bytes (54.37%) ⬆️
@codecov/remix-vite-plugin-esm 1.46kB 502 bytes (52.46%) ⬆️
@codecov/nuxt-plugin-cjs 1.77kB 28 bytes (1.61%) ⬆️
@codecov/nextjs-webpack-plugin-cjs 2.64kB 58 bytes (2.25%) ⬆️
@codecov/webpack-plugin-esm 3.45kB 64 bytes (1.89%) ⬆️
@codecov/rollup-plugin-cjs 3.25kB 84 bytes (2.65%) ⬆️
@codecov/remix-vite-plugin-cjs 1.7kB 28 bytes (1.67%) ⬆️
@codecov/astro-plugin-cjs 1.71kB 28 bytes (1.66%) ⬆️
@codecov/astro-plugin-esm 1.51kB 28 bytes (1.89%) ⬆️
@codecov/example-sveltekit-app-client-esm 727.49kB -2 bytes (-0.0%) ⬇️
@codecov/example-sveltekit-app-server-esm 984.45kB -1 bytes (-0.0%) ⬇️

Affected Assets, Files, and Routes:

view changes for bundle: @codecov/bundle-analyzer-cjs

Assets Changed:

Asset Name Size Change Total Size Change (%)
index.cjs 52 bytes 2.07kB 2.58%

Files in index.cjs:

  • ./src/index.ts → Total Size: 649 bytes

  • ./src/assets.ts → Total Size: 782 bytes

view changes for bundle: @codecov/bundler-plugin-core-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
index.mjs (New) 117.29kB 117.29kB 100.0% 🚀
index.d.ts (Deleted) -14.37kB 0 bytes -100.0% 🗑️

Files in index.mjs:

  • ./src/utils/createRollupAsset.ts → Total Size: 267 bytes

  • ./src/utils/Output.ts → Total Size: 5.18kB

  • ./src/index.ts → Total Size: 0 bytes

  • ./src/utils/normalizePath.ts → Total Size: 863 bytes

view changes for bundle: @codecov/rollup-plugin-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
index.mjs (New) 2.75kB 2.75kB 100.0% 🚀
index.d.mts (Deleted) -1.3kB 0 bytes -100.0% 🗑️

Files in index.mjs:

  • ./src/index.ts → Total Size: 705 bytes
view changes for bundle: @codecov/rollup-plugin-cjs

Assets Changed:

Asset Name Size Change Total Size Change (%)
index.cjs 84 bytes 3.25kB 2.65%

Files in index.cjs:

  • ./src/index.ts → Total Size: 822 bytes
view changes for bundle: @codecov/example-sveltekit-app-client-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
_app/immutable/chunks/entry.*.js -2 bytes 31.45kB -0.01%
view changes for bundle: @codecov/remix-vite-plugin-cjs

Assets Changed:

Asset Name Size Change Total Size Change (%)
index.cjs 28 bytes 1.7kB 1.67%

Files in index.cjs:

  • ./src/index.ts → Total Size: 871 bytes
view changes for bundle: @codecov/example-sveltekit-app-server-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
chunks/internal.js -1 bytes 18.48kB -0.01%
view changes for bundle: @codecov/webpack-plugin-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
index.d.ts (New) 3.45kB 3.45kB 100.0% 🚀
index.d.mts (Deleted) -3.39kB 0 bytes -100.0% 🗑️

Files in index.d.ts:

  • ./src/index.ts → Total Size: 2.46kB
view changes for bundle: @codecov/nuxt-plugin-cjs

Assets Changed:

Asset Name Size Change Total Size Change (%)
index.cjs 28 bytes 1.77kB 1.61%

Files in index.cjs:

  • ./src/index.ts → Total Size: 941 bytes
view changes for bundle: @codecov/solidstart-plugin-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
index.mjs (New) 1.47kB 1.47kB 100.0% 🚀
index.d.ts (Deleted) -949 bytes 0 bytes -100.0% 🗑️

Files in index.mjs:

  • ./src/index.ts → Total Size: 754 bytes
view changes for bundle: @codecov/nextjs-webpack-plugin-cjs

Assets Changed:

Asset Name Size Change Total Size Change (%)
index.cjs 58 bytes 2.64kB 2.25%

Files in index.cjs:

  • ./src/index.ts → Total Size: 832 bytes
view changes for bundle: @codecov/nuxt-plugin-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
index.d.mts (New) 855 bytes 855 bytes 100.0% 🚀
index.d.ts (Deleted) -855 bytes 0 bytes -100.0% 🗑️

Files in index.d.mts:

  • ./src/index.ts → Total Size: 713 bytes
view changes for bundle: @codecov/example-next-15-app-client-array-push

Assets Changed:

Asset Name Size Change Total Size Change (%)
static/OZsb2Mhn5quI84e6PGMSH/_buildManifest.js (New) 540 bytes 540 bytes 100.0% 🚀
static/OZsb2Mhn5quI84e6PGMSH/_ssgManifest.js (New) 77 bytes 77 bytes 100.0% 🚀
static/mMq61-*.js (Deleted) -540 bytes 0 bytes -100.0% 🗑️
static/mMq61-*.js (Deleted) -77 bytes 0 bytes -100.0% 🗑️
view changes for bundle: @codecov/bundler-plugin-core-cjs

Assets Changed:

Asset Name Size Change Total Size Change (%)
index.cjs 281 bytes 138.02kB 0.2%

Files in index.cjs:

  • ./src/utils/normalizePath.ts → Total Size: 863 bytes

  • ./src/utils/Output.ts → Total Size: 5.18kB

  • ./src/index.ts → Total Size: 0 bytes

  • ./src/utils/createRollupAsset.ts → Total Size: 267 bytes

view changes for bundle: @codecov/sveltekit-plugin-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
index.d.cts (New) 891 bytes 891 bytes 100.0% 🚀
index.d.ts (Deleted) -891 bytes 0 bytes -100.0% 🗑️

Files in index.d.cts:

  • ./src/index.ts → Total Size: 758 bytes
view changes for bundle: @codecov/astro-plugin-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
index.mjs 28 bytes 1.51kB 1.89%

Files in index.mjs:

  • ./src/index.ts → Total Size: 859 bytes
view changes for bundle: @codecov/astro-plugin-cjs

Assets Changed:

Asset Name Size Change Total Size Change (%)
index.cjs 28 bytes 1.71kB 1.66%

Files in index.cjs:

  • ./src/index.ts → Total Size: 987 bytes
view changes for bundle: @codecov/nextjs-webpack-plugin-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
index.mjs 58 bytes 2.36kB 2.52%

Files in index.mjs:

  • ./src/index.ts → Total Size: 715 bytes
view changes for bundle: @codecov/webpack-plugin-cjs

Assets Changed:

Asset Name Size Change Total Size Change (%)
index.cjs 76 bytes 5.03kB 1.53%

Files in index.cjs:

  • ./src/index.ts → Total Size: 992 bytes
view changes for bundle: @codecov/solidstart-plugin-cjs

Assets Changed:

Asset Name Size Change Total Size Change (%)
index.cjs 28 bytes 1.72kB 1.65%

Files in index.cjs:

  • ./src/index.ts → Total Size: 882 bytes
view changes for bundle: @codecov/remix-vite-plugin-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
index.mjs (New) 1.46kB 1.46kB 100.0% 🚀
index.d.ts (Deleted) -957 bytes 0 bytes -100.0% 🗑️

Files in index.mjs:

  • ./src/index.ts → Total Size: 743 bytes
view changes for bundle: @codecov/example-next-app-client-array-push

Assets Changed:

Asset Name Size Change Total Size Change (%)
server/middleware-*.js -852 bytes 36 bytes -95.95%
server/middleware-*.js 852 bytes 888 bytes 2366.67% ⚠️
static/DcxKiMSoJrxxzCPkpiZ5G/_buildManifest.js (New) 224 bytes 224 bytes 100.0% 🚀
static/DcxKiMSoJrxxzCPkpiZ5G/_ssgManifest.js (New) 77 bytes 77 bytes 100.0% 🚀
static/amrrPoFtRGd9qnQaXBIHs/_buildManifest.js (Deleted) -224 bytes 0 bytes -100.0% 🗑️
static/amrrPoFtRGd9qnQaXBIHs/_ssgManifest.js (Deleted) -77 bytes 0 bytes -100.0% 🗑️
view changes for bundle: @codecov/bundle-analyzer-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
index.mjs 52 bytes 1.52kB 3.54%

Files in index.mjs:

  • ./src/index.ts → Total Size: 613 bytes

  • ./src/assets.ts → Total Size: 692 bytes

view changes for bundle: @codecov/vite-plugin-cjs

Assets Changed:

Asset Name Size Change Total Size Change (%)
index.cjs 88 bytes 3.23kB 2.8%

Files in index.cjs:

  • ./src/index.ts → Total Size: 810 bytes
view changes for bundle: @codecov/sveltekit-plugin-cjs

Assets Changed:

Asset Name Size Change Total Size Change (%)
index.cjs 28 bytes 1.72kB 1.66%

Files in index.cjs:

  • ./src/index.ts → Total Size: 878 bytes

@codecov
Copy link

codecov bot commented Feb 7, 2025

Codecov Report

Attention: Patch coverage is 42.69663% with 51 lines in your changes missing coverage. Please review.

Project coverage is 80.72%. Comparing base (392003d) to head (bbce28d).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
packages/astro-plugin/src/index.ts 0.00% 5 Missing ⚠️
packages/nextjs-webpack-plugin/src/index.ts 0.00% 5 Missing ⚠️
packages/nuxt-plugin/src/index.ts 0.00% 5 Missing ⚠️
packages/remix-vite-plugin/src/index.ts 0.00% 5 Missing ⚠️
packages/rollup-plugin/src/index.ts 0.00% 5 Missing ⚠️
packages/solidstart-plugin/src/index.ts 0.00% 5 Missing ⚠️
packages/sveltekit-plugin/src/index.ts 0.00% 5 Missing ⚠️
packages/vite-plugin/src/index.ts 0.00% 5 Missing ⚠️
packages/webpack-plugin/src/index.ts 0.00% 5 Missing ⚠️
...llup-bundle-analysis/rollupBundleAnalysisPlugin.ts 0.00% 2 Missing ⚠️
... and 3 more
Additional details and impacted files
Components Coverage Δ
Plugin core 98.05% <100.00%> (+0.01%) ⬆️
Rollup plugin 8.42% <0.00%> (-0.28%) ⬇️
Vite plugin 8.42% <0.00%> (-0.28%) ⬇️
Webpack plugin 56.84% <25.00%> (-0.85%) ⬇️

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

@codecov-notifications
Copy link

codecov-notifications bot commented Feb 7, 2025

Codecov Report

Attention: Patch coverage is 42.69663% with 51 lines in your changes missing coverage. Please review.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
packages/astro-plugin/src/index.ts 0.00% 5 Missing ⚠️
packages/nextjs-webpack-plugin/src/index.ts 0.00% 5 Missing ⚠️
packages/nuxt-plugin/src/index.ts 0.00% 5 Missing ⚠️
packages/remix-vite-plugin/src/index.ts 0.00% 5 Missing ⚠️
packages/rollup-plugin/src/index.ts 0.00% 5 Missing ⚠️
packages/solidstart-plugin/src/index.ts 0.00% 5 Missing ⚠️
packages/sveltekit-plugin/src/index.ts 0.00% 5 Missing ⚠️
packages/vite-plugin/src/index.ts 0.00% 5 Missing ⚠️
packages/webpack-plugin/src/index.ts 0.00% 5 Missing ⚠️
...llup-bundle-analysis/rollupBundleAnalysisPlugin.ts 0.00% 2 Missing ⚠️
... and 3 more
Components Coverage Δ
Plugin core 98.05% <100.00%> (+0.01%) ⬆️
Rollup plugin 8.42% <0.00%> (-0.28%) ⬇️
Vite plugin 8.42% <0.00%> (-0.28%) ⬇️
Webpack plugin 56.84% <25.00%> (-0.85%) ⬇️

📢 Thoughts on this report? Let us know!

Copy link

@suejung-sentry suejung-sentry left a comment

Choose a reason for hiding this comment

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

Approved this as seems we are looking for a fast solution, but ideally there can be another way to identify that we are in a vite legacy build

}

// handle vite legacy builds
if (normalizedPath === path && path.includes("legacy")) {

Choose a reason for hiding this comment

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

I am probably missing something but seems a little brittle to try to identify the vite legacy build just by looking for the word "legacy" in the path? As in any other bundler technology can have a name containing "legacy" and this may behave incorrectly.

Are there other ways to identify that this is a vite legacy build and only apply this regex in those cases?

Copy link
Author

Choose a reason for hiding this comment

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

Okay, updated things to make sure it's Vite that's doing the bundling

Copy link
Author

Choose a reason for hiding this comment

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

Thoooo it may have increased the size of the PR by a lot (mainly tests)

Copy link

@suejung-sentry suejung-sentry left a comment

Choose a reason for hiding this comment

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

I like this solution! And it seems useful to have this param available at that level for any future extensions of the product, as well. Thanks for all the work on it!

@nicholas-codecov nicholas-codecov merged commit 043b250 into main Feb 10, 2025
65 of 69 checks passed
@nicholas-codecov nicholas-codecov deleted the fix-legacy-vite-build-hashes-not-being-normalized branch February 10, 2025 18: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.

3 participants