Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@danielroe
Copy link
Member

@danielroe danielroe commented Apr 8, 2025

πŸ”— Linked issue

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

spotted an issue when testing nuxi generate playground - one of the URLs was invalid (caused by passing 30% as a value). You can test with decodeURIComponent("https://demo.sirv.com/t-shirt-man.jpg?watermark=/watermark-v1.png&watermark.position=center&watermark.scale.width=30%&h=500")`

This PR switches across to using URLSearchParams to handle encodings across all providers. If a user wants to provide a custom joinWith they now must provide a custom formatter (to avoid unnecessary bundling)

I think it should be safe - but @pi0 may have other thoughts.

@danielroe danielroe requested a review from pi0 April 8, 2025 17:44
@pkg-pr-new
Copy link

pkg-pr-new bot commented Apr 8, 2025

Open in StackBlitz

npm i https://pkg.pr.new/@nuxt/image@1813

commit: c46221f

@codecov-commenter
Copy link

codecov-commenter commented Apr 8, 2025

Codecov Report

Attention: Patch coverage is 89.28571% with 3 lines in your changes missing coverage. Please review.

Project coverage is 63.03%. Comparing base (3041371) to head (c46221f).

Files with missing lines Patch % Lines
src/runtime/providers/directus.ts 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1813      +/-   ##
==========================================
- Coverage   63.12%   63.03%   -0.10%     
==========================================
  Files          77       77              
  Lines        3824     3793      -31     
  Branches      442      432      -10     
==========================================
- Hits         2414     2391      -23     
+ Misses       1384     1376       -8     
  Partials       26       26              

β˜” View full report in Codecov by Sentry.
πŸ“’ Have feedback on the report? Share it here.

πŸš€ New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • πŸ“¦ JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Apr 8, 2025

Deploying nuxt-image with Β Cloudflare Pages Β Cloudflare Pages

Latest commit: c46221f
Status:Β βœ…Β  Deploy successful!
Preview URL: https://f5025adc.nuxt-image.pages.dev
Branch Preview URL: https://fix-encoded-sirv.nuxt-image.pages.dev

View logs

@danielroe danielroe changed the title fix: use encodePath in provider formatters fix: use URLSearchParams as default formatter Apr 8, 2025
@danielroe danielroe changed the title fix: use URLSearchParams as default formatter fix:! use URLSearchParams as default formatter Apr 9, 2025
@danielroe danielroe changed the title fix:! use URLSearchParams as default formatter fix!: use URLSearchParams as default formatter Apr 9, 2025
@danielroe danielroe merged commit 3d79060 into main Apr 10, 2025
7 checks passed
@danielroe danielroe deleted the fix/encoded-sirv branch April 10, 2025 18:36
@github-actions github-actions bot mentioned this pull request Apr 10, 2025
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