withastro
astro
Blog
Docs
Changelog
Blog
Docs
Changelog
Overview
Branches
Benchmarks
Runs
Performance History
Latest Results
Fix/16633 noimagemetadata for svg with either zero height or width (#16681) * test: when dimmension is 0 * allow svg impoerts with zero dimmention * fix(assets): treat SVG width/height of zero as valid dimensions When an SVG has explicit width="0" or height="0" attributes, the image metadata extraction threw a NoImageMetadata error because both check sites used JavaScript truthiness tests where 0 is falsy. In vendor/image-size/types/svg.ts, the calculate() function fell through the explicit-dimensions path when either dimension was 0 and then hit the TypeError('Invalid SVG') throw. In assets/utils/metadata.ts, the post-probe guard also rejected 0 via the !result.height || !result.width condition. Using 0 for width/height is a valid and recommended pattern for SVG filter containers that should be hidden from screen readers: <svg width="0" height="0" aria-hidden="true"></svg> Fix: change both truthiness checks to null checks so that 0 is accepted as an explicit dimension while null/undefined still signal a missing value. Fixes #16633 * chore: add changeset for SVG zero-dimension fix * fix indentations in test file --------- Co-authored-by: fkatsuhiro <nakayoshiryutokatsu@gmail.com> Co-authored-by: OfirHaf <ofir135001@gmail.com>
main
6 minutes ago
fix(astro): fix broken `Map` and `Set` in content collections (#16682) (#16701) The `updateImageReferencesInData` function uses `Traverse.map` which uses a custom cloning algorithm and as such does not copy correctly instances of native objects such as `Map` and `Set` rendering them unusable. Instead `Travserse.forEach` can be used after cloning the data object beforehand with the native `structuredClone` function. Closes #16682
main
28 minutes ago
Convert build config integration tests to unit tests Move createViteBuildConfig tests to dedicated vite-build-config.test.ts. Restore static-build.test.ts to its original state. Remove integration tests replaced by unit tests: - entry-file-names.test.ts + fixture (client entryFileNames override) - astro-assets-dir.test.ts + fixture (build.assets prefix) - config-vite.test.ts first describe (prerender rollup output override) - astro-css-bundling.test.ts custom assetFileNames section (prerender assetFileNames override)
vite-build-config-extract
28 minutes ago
Extract createViteBuildConfig() for unit testability Move the Vite build config assembly from buildEnvironments() into a standalone createViteBuildConfig() function in a new file. This makes the config merging logic (rollup output overrides, env settings, etc.) directly testable without running a full build. Replace the custom-assets-name integration test with unit tests that verify user rollup output overrides are preserved.
vite-build-config-extract
37 minutes ago
Review comments
advanced-routing-types
3 hours ago
Remove useless URL
ocavue-forks:ocavue/img-test
5 hours ago
Merge branch 'main' into ocavue/img-test
ocavue-forks:ocavue/img-test
5 hours ago
Merge branch 'main' into advanced-routing-types
advanced-routing-types
6 hours ago
Latest Branches
CodSpeed Performance Gauge
0%
Extract Vite build config assembly into testable function
#16741
32 minutes ago
51f48f3
vite-build-config-extract
CodSpeed Performance Gauge
0%
feat: advanced routing types and config gaps
#16723
3 hours ago
3655b4d
advanced-routing-types
CodSpeed Performance Gauge
0%
fix: throw image generation errors
#16731
5 hours ago
771537f
ocavue-forks:ocavue/img-test
© 2026 CodSpeed Technology
Home
Terms
Privacy
Docs