Skip to content

docs: correct the fallback wording and the install commands - #36

Merged
dangreen merged 1 commit into
mainfrom
docs/package-readmes
Sep 2, 2026
Merged

docs: correct the fallback wording and the install commands#36
dangreen merged 1 commit into
mainfrom
docs/package-readmes

Conversation

@dangreen

@dangreen dangreen commented Sep 2, 2026

Copy link
Copy Markdown
Member

Three corrections across the package READMEs.

The fallback. // First format is the fallback: default export and src was wrong as stated. The default export points at the variant in the source format at the source width; the first format of the list takes that role only when the source format is not in the list. Verified by running the cli: -f avif,jpg on a jpg source yields the jpg, -f webp,avif yields the webp. The comment now says why jpg is in the list rather than why it is first.

@srcset/runtime is not a dev dependency. It is a peer dependency of every integration and adapter, and it ships to the browser, so pnpm add -D @srcset/vite-plugin @srcset/runtime was wrong. The plugin and loader READMEs now install them separately, with a line saying why. The other six READMEs already had it right.

Two links. The component packages pointed at /components/react/, /components/preact/ and /components/svelte/; the documentation has one /components/ page for all three. @srcset/bundler-utils pointed at /api/bundler-utils/, which will not exist - it is internal to the integrations and gets no page.

The `format` order decides the fallback only when the source format is
not in the list, so a jpg source with `["avif", "jpg"]` still hands out
the jpg. `@srcset/runtime` is a peer dependency that ships to the
browser, so the plugin and the loader install it as a regular one rather
than a dev one. The component packages link to the single `/components/`
page, and `@srcset/bundler-utils` to the site root: it is internal to the integrations and has no page of its own.
@dangreen
dangreen merged commit f968ed1 into main Sep 2, 2026
7 checks passed
@dangreen
dangreen deleted the docs/package-readmes branch September 2, 2026 12:34
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown

Coverage Report for CI Build 33630561742

Coverage remained the same at 93.871%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 890
Covered Lines: 843
Line Coverage: 94.72%
Relevant Branches: 660
Covered Branches: 612
Branch Coverage: 92.73%
Branches in Coverage %: Yes
Coverage Strength: 79355.96 hits per line

💛 - Coveralls

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.

1 participant