fix!: remove `nonce` prop
๐ Linked issue
#1654
โ Type of change
- [x] ๐ Documentation (updates to the documentation or readme)
- [x] ๐ 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)
- [x] โ ๏ธ Breaking change (fix or feature that would cause existing functionality to change)
๐ Description
As continuation of #1654 , and with the approach of Nuxt Image v2, I think it is time to drop the nonce attribute.
As stated in the original issue, allowing users to inject their own nonce is very dangerous, as it doesn't enforce the nonce is cryptographically secure, generated according to the spec, or unique across the app. It is much better to let dedicated security modules like Nuxt Security handle the nonce generation.
This PR is marked as breaking as it changes behavior, even though it won't actually break any projects (except maybe failing to load images in certain projects that relied on the nonce prop) because it simply voids the property.
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 7.04%. Comparing base (6022fa8) to head (dc98a9f).
Additional details and impacted files
@@ Coverage Diff @@
## main #1995 +/- ##
=====================================
Coverage 7.03% 7.04%
=====================================
Files 77 77
Lines 3567 3565 -2
Branches 138 138
=====================================
Hits 251 251
+ Misses 3268 3266 -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.