Skip to content

feat(runtime): export Picture and Image props types#2115

Open
huang-julien wants to merge 3 commits intomainfrom
feat/export_props_types
Open

feat(runtime): export Picture and Image props types#2115
huang-julien wants to merge 3 commits intomainfrom
feat/export_props_types

Conversation

@huang-julien
Copy link
Member

🔗 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

this PR exports ImageProps and PictureProps in @nuxt/image/runtime

@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 9, 2026

Open in StackBlitz

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

commit: a8df8ec

@coderabbitai
Copy link

coderabbitai bot commented Feb 9, 2026

📝 Walkthrough

Walkthrough

Added two public type exports in src/runtime/index.ts: PictureProps (from ./components/NuxtPicture.vue) and ImageProps (from ./components/NuxtImg.vue). Introduced DataAttributes in src/runtime/types.ts as Record<\data-${string}`, string>, removed the same export from src/types/image.ts, and updated src/runtime/components/NuxtPicture.vueto importDataAttributesfrom the new../types` path.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: exporting Picture and Image props types from the runtime module.
Description check ✅ Passed The description directly relates to the changeset, stating the intent to export ImageProps and PictureProps from @nuxt/image/runtime, which aligns with the actual code changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/export_props_types

No actionable comments were generated in the recent review. 🎉

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


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.

@danielroe
Copy link
Member

would you take a look at the failing tests?

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@src/runtime/types.ts`:
- Around line 1-2: Remove the leading blank line at the top of the types file
and ensure the file ends with a single trailing newline to satisfy ESLint rules;
update the declaration for the DataAttributes type (export type DataAttributes =
Record<`data-${string}`, string>) so there is no blank line before it and the
file terminates with a newline character.

@codecov-commenter
Copy link

codecov-commenter commented Feb 10, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 6.86%. Comparing base (6710499) to head (a8df8ec).

Additional details and impacted files
@@           Coverage Diff            @@
##            main   #2115      +/-   ##
========================================
+ Coverage   6.83%   6.86%   +0.02%     
========================================
  Files         80      81       +1     
  Lines       3729    3730       +1     
  Branches     142     143       +1     
========================================
+ Hits         255     256       +1     
  Misses      3424    3424              
  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.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Feb 10, 2026

Deploying nuxt-image with  Cloudflare Pages  Cloudflare Pages

Latest commit: a8df8ec
Status: ✅  Deploy successful!
Preview URL: https://728ee73b.nuxt-image.pages.dev
Branch Preview URL: https://feat-export-props-types.nuxt-image.pages.dev

View logs

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