diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 254ef0d..9cc1f7b 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -43,7 +43,7 @@ jobs: fi - name: Checkout - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: ref: ${{ steps.resolve-ref.outputs.ref }} fetch-depth: 0 @@ -57,12 +57,10 @@ jobs: echo "base_sha=$BASE_SHA" >> "$GITHUB_OUTPUT" - name: Setup pnpm - uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9 - with: - version: 11.10.0 + uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0 - name: Setup Node.js - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 + uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 with: node-version: 24 cache: pnpm diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 55c3683..27dfaa8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,17 +22,15 @@ jobs: id-token: write steps: - name: Checkout Repo - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: fetch-depth: 0 - name: Setup pnpm - uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9 - with: - version: 11.10.0 + uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0 - name: Setup Node.js - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 + uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 with: node-version: 24 cache: pnpm diff --git a/README.md b/README.md index 89d9330..a439382 100644 --- a/README.md +++ b/README.md @@ -41,10 +41,10 @@ Framework defaults solve images inside one framework. DeSource Image handles ima - **Built for fast product iterations.** Change image quality, format, crop, or responsive sizes in code. Source files and filenames stay unchanged. - **One source instead of exported variants.** Start with one suitable image and generate the widths and formats each screen needs. - **Deployment-aware provider selection.** Leave `provider` on `auto`. DeSource Image detects Vercel, Netlify, or AWS Amplify and uses IPX for local or other environments. -- **Simplest way to deal with image providers.** CMS URLs need aliases, validation, and provider-specific modifiers. DeSource Image handles provider selection, modifier translation, and URL generation for 46 built-in providers. +- **Simplest way to deal with image providers.** CMS URLs need aliases, validation, and provider-specific modifiers. DeSource Image handles provider selection, modifier translation, and URL generation for built-in providers. - **Native framework APIs.** Use Angular components and directives, React components and hooks, or Svelte components, actions, and attachments. Output remains native `` and `` markup. - **Built-in local optimizer.** React/Vite, Next.js, Angular SSR, and SvelteKit adapters can serve IPX transformations without a separate image service. -- **46 provider modules.** Use Cloudinary, Imgix, ImageKit, Sanity, Contentful, Shopify, Vercel, Netlify, or another built-in provider. Provider subpath imports remain **tree-shakable**. +- **Dozens of built-in provider modules.** Use Cloudinary, Imgix, ImageKit, Sanity, Contentful, Shopify, Vercel, Netlify, or another built-in provider. Provider subpath imports remain **tree-shakable**. - **Responsive images and modern formats.** Generate width or density candidates, breakpoint-aware `sizes`, ordered AVIF/WebP sources, and a fallback image from one input. - **Placeholders and LCP controls.** Generate low-resolution placeholders, preload links, loading hints, and fetch priority without hand-maintained head tags. - **SSR-friendly.** The same inputs generate the same URLs and attributes on the server and client, so hydration does not rewrite image markup. @@ -66,7 +66,7 @@ After adopting the package for your framework, image components need no host-spe | [`@sveltejs/enhanced-img`](https://svelte.dev/docs/kit/images) | Static local assets transformed during the Vite build | Images are processed at build time. The deployment target does not switch them to its runtime image service. | You want local images transformed on demand to save your time. Your images arrive from a CMS, database, API, object store, or CDN, or the same source should use IPX locally and the deployment platform’s optimizer in production. | | [Unpic](https://unpic.pics/) | Cross-framework responsive images already hosted on recognizable CDN or CMS URLs | Detects the provider from each `src` URL. Local or unknown sources need a fallback or explicit provider; the deployment itself is not the selection signal. | Vercel, Netlify, or AWS Amplify should choose the optimizer for every source, including relative paths, and you also need presets, aliases, source rules, ``, or server adapters. | -DeSource Image combines deployment-aware selection and 46 provider modules under one configuration for React/Next.js, Angular, and Svelte/SvelteKit. Nuxt applications should continue to use [`@nuxt/image`](https://image.nuxt.com/). +DeSource Image combines deployment-aware selection and built-in provider modules under one configuration for React/Next.js, Angular, and Svelte/SvelteKit. Nuxt applications should continue to use [`@nuxt/image`](https://image.nuxt.com/). ## Packages @@ -252,7 +252,7 @@ const picture = image.getPicture({ - Picture output: ordered AVIF/WebP/etc. `` elements plus a fallback ``. - Placeholders: generated low-resolution provider URLs, custom URLs, custom `[width, height, quality, blur]` tuples, decode-before-swap behavior, and temporary classes. - Head preloads: responsive `` generation with reference counting in framework packages. -- Providers: 46 built-in modules, a small default registry, tree-shakable subpath imports, and typed custom providers. +- Providers: built-in modules, a small default registry, tree-shakable subpath imports, and typed custom providers. - Presets and aliases: reusable image defaults and clean source aliases for CMS or asset hosts. - Source controls: `domains`, `localPatterns`, `remotePatterns`, and invalid-source policies. - Server adapters: IPX middleware for Angular SSR, React/Vite, Next.js App Router, SvelteKit, Fetch API servers, and Connect/Express-style Node servers. @@ -347,7 +347,7 @@ The default registry is intentionally small: - `netlifyLargeMedia` - `none` -Import all 46 provider modules only when needed: +Import all built-in provider modules only when needed: ```ts import { BUILT_IN_PROVIDER_NAMES, createBuiltInProviders } from '@desource/image/providers'; @@ -363,7 +363,7 @@ import { sanityProvider } from '@desource/image/providers/sanity'; Supported provider modules: -`aliyun`, `awsAmplify`, `builderio`, `bunny`, `caisy`, `cloudflare`, `cloudflareimages`, `cloudimage`, `cloudinary`, `contentful`, `directus`, `edgeonePages`, `fastly`, `filerobot`, `flyimg`, `github`, `glide`, `gumlet`, `hygraph`, `imageengine`, `imagekit`, `imgix`, `imgproxy`, `ipx`, `ipxStatic`, `netlify`, `netlifyImageCdn`, `netlifyLargeMedia`, `none`, `picsum`, `prepr`, `prismic`, `sanity`, `shopify`, `sirv`, `storyblok`, `strapi`, `strapi5`, `supabase`, `twicpics`, `umbraco`, `unsplash`, `uploadcare`, `vercel`, `wagtail`, and `weserv`. +`aliyun`, `awsAmplify`, `builderio`, `bunny`, `caisy`, `cloudflare`, `cloudflareimages`, `cloudimage`, `cloudinary`, `contentful`, `directus`, `edgeonePages`, `fastly`, `filerobot`, `flyimg`, `github`, `glide`, `gumlet`, `hygraph`, `imageengine`, `imagekit`, `imgix`, `imgproxy`, `ipx`, `ipxStatic`, `keycdn`, `netlify`, `netlifyImageCdn`, `netlifyLargeMedia`, `none`, `picsum`, `prepr`, `prismic`, `sanity`, `shopify`, `sirv`, `storyblok`, `strapi`, `strapi5`, `supabase`, `twicpics`, `umbraco`, `unsplash`, `uploadcare`, `vercel`, `wagtail`, and `weserv`. ## Local optimization diff --git a/demo/package.json b/demo/package.json index 91dc7d0..633743a 100644 --- a/demo/package.json +++ b/demo/package.json @@ -20,10 +20,10 @@ }, "devDependencies": { "@sveltejs/adapter-vercel": "^6.3.4", - "@sveltejs/kit": "^2.70.2", + "@sveltejs/kit": "^2.70.3", "@sveltejs/vite-plugin-svelte": "^7.3.0", - "sass": "^1.102.0", - "svelte": "^5.56.9", - "svelte-check": "^4.7.5" + "sass": "^1.104.1", + "svelte": "^5.57.0", + "svelte-check": "^4.7.6" } } diff --git a/demo/src/lib/Gallery.svelte b/demo/src/lib/Gallery.svelte index 4ea6071..0ecdd36 100644 --- a/demo/src/lib/Gallery.svelte +++ b/demo/src/lib/Gallery.svelte @@ -327,7 +327,6 @@ alt={item.alt} draggable={false} loading="lazy" - fetchpriority="low" format="webp" width={60} height={60} diff --git a/demo/src/lib/SiteFooter.svelte b/demo/src/lib/SiteFooter.svelte index aff1c43..27268d3 100644 --- a/demo/src/lib/SiteFooter.svelte +++ b/demo/src/lib/SiteFooter.svelte @@ -1,6 +1,7 @@ @@ -18,7 +19,7 @@ Open image tooling -

One image API for React, Angular, and Svelte, backed by 46 provider modules.

+

One image API for React, Angular, and Svelte, backed by {providerCount} provider modules.

MIT licensed diff --git a/demo/src/lib/home/BenefitsSection.svelte b/demo/src/lib/home/BenefitsSection.svelte index 0d34efd..66c1e33 100644 --- a/demo/src/lib/home/BenefitsSection.svelte +++ b/demo/src/lib/home/BenefitsSection.svelte @@ -1,3 +1,7 @@ + +
Angular 19-22 @@ -26,7 +30,7 @@

Leave provider on auto. DeSource Image detects Vercel, Netlify, or AWS Amplify and uses IPX elsewhere.

-

46 provider modules

+

{providerCount} provider modules

Use Cloudinary, Imgix, ImageKit, Sanity, Contentful, Shopify, or another built-in provider.

diff --git a/demo/src/lib/home/CtaSection.svelte b/demo/src/lib/home/CtaSection.svelte index c8d6631..08b2e64 100644 --- a/demo/src/lib/home/CtaSection.svelte +++ b/demo/src/lib/home/CtaSection.svelte @@ -1,4 +1,5 @@ @@ -46,7 +47,7 @@
deliveryCDN
- 46 providers + {providerCount} providers 3 frameworks
diff --git a/demo/src/lib/home/HeroSection.svelte b/demo/src/lib/home/HeroSection.svelte index 77d1bc2..f0b7519 100644 --- a/demo/src/lib/home/HeroSection.svelte +++ b/demo/src/lib/home/HeroSection.svelte @@ -1,6 +1,7 @@