Skip to content

fix(shopify): merge preexisting query params with modifiers#2135

Merged
danielroe merged 1 commit into
mainfrom
fix/shopify-img-src-with-query
Feb 24, 2026
Merged

fix(shopify): merge preexisting query params with modifiers#2135
danielroe merged 1 commit into
mainfrom
fix/shopify-img-src-with-query

Conversation

@DamianGlowala
Copy link
Copy Markdown
Member

🔗 Linked issue

resolves #2047

❓ 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

It correctly merges preexisting query params with any modifiers for Shopify provider.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Feb 24, 2026

Open in StackBlitz

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

commit: d2ec1fa

@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying nuxt-image with  Cloudflare Pages  Cloudflare Pages

Latest commit: d2ec1fa
Status: ✅  Deploy successful!
Preview URL: https://3fc0ddcd.nuxt-image.pages.dev
Branch Preview URL: https://fix-shopify-img-src-with-que.nuxt-image.pages.dev

View logs

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Feb 24, 2026

📝 Walkthrough

Walkthrough

The changes refactor the Shopify provider's URL construction method to properly handle pre-existing query parameters in source URLs. The implementation replaces manual string concatenation with parseQuery and withQuery functions from the ufo library. This addresses a bug where URLs containing existing parameters (e.g., ?v=1763534395) would result in malformed output with double question marks (e.g., ?v=1763534395?width=200). Test files are updated to include URLs with version query parameters to validate the fix.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description check ✅ Passed The description is directly related to the changeset, explaining that it fixes how the Shopify provider merges preexisting query parameters.
Linked Issues check ✅ Passed The implementation successfully addresses issue #2047 by using parseQuery and withQuery to properly merge existing query parameters with modifier-generated parameters, avoiding malformed double-question-mark URLs.
Out of Scope Changes check ✅ Passed All changes are scoped to fixing the Shopify provider's query parameter handling and updating corresponding tests; no out-of-scope modifications detected.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title accurately describes the main change: fixing how the Shopify provider merges preexisting query parameters with modifiers, which is the core objective addressed in the pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/shopify-img-src-with-query

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@DamianGlowala DamianGlowala changed the title fix(shopify): correctly merge preexisting query params fix(shopify): merge preexisting query params with modifiers Feb 24, 2026
@danielroe danielroe merged commit 191cec7 into main Feb 24, 2026
9 checks passed
@danielroe danielroe deleted the fix/shopify-img-src-with-query branch February 24, 2026 22:16
@github-actions github-actions Bot mentioned this pull request Feb 24, 2026
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 6.83%. Comparing base (07fd47d) to head (d2ec1fa).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/runtime/providers/shopify.ts 0.00% 4 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##            main   #2135      +/-   ##
========================================
- Coverage   6.83%   6.83%   -0.01%     
========================================
  Files         80      80              
  Lines       3729    3732       +3     
  Branches     142     142              
========================================
  Hits         255     255              
- Misses      3424    3427       +3     
  Partials      50      50              

☔ 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.

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.

Shopify Provider - Broken sources when preexisting URL params

3 participants