image
image copied to clipboard
feat: Add support for custom provider modifiers in ImageModifiers int…
🔗 Linked issue
(https://github.com/nuxt/image/issues/1843)
❓ 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)
- [x] ✨ 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
This modifies the ImageModifiers interface to support custom provider modifiers by adding an index signature.
I think instead of this (which removes type safety for modifiers) we should amend useImage to respect the generic provider type.
Ok, I've updated the PR to preserve type-safety based on the selected provider. Please review and let me know what you think! Thanks, @danielroe!
Codecov Report
:x: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 7.02%. Comparing base (7c0555d) to head (ca0a20f).
| Files with missing lines | Patch % | Lines |
|---|---|---|
| src/module.ts | 0.00% | 2 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## main #1844 +/- ##
========================================
- Coverage 7.02% 7.02% -0.01%
========================================
Files 77 77
Lines 3573 3575 +2
Branches 138 138
========================================
Hits 251 251
- Misses 3274 3276 +2
Partials 48 48
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.