Skip to content

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

Merged
danielroe merged 4 commits intomainfrom
feat/export_props_types
Apr 1, 2026
Merged

feat(runtime): export Picture and Image props types#2115
danielroe merged 4 commits intomainfrom
feat/export_props_types

Conversation

@huang-julien
Copy link
Copy Markdown
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
Copy Markdown

pkg-pr-new bot commented Feb 9, 2026

Open in StackBlitz

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

commit: 766e179

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Feb 9, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b5b06904-8806-4b30-afa6-42d698a4057f

📥 Commits

Reviewing files that changed from the base of the PR and between a8df8ec and 766e179.

📒 Files selected for processing (1)
  • src/runtime/components/NuxtPicture.vue
✅ Files skipped from review due to trivial changes (1)
  • src/runtime/components/NuxtPicture.vue

📝 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 concisely summarizes the main change: exporting Picture and Image props types from the runtime package.
Description check ✅ Passed The description directly states the purpose of the PR: exporting ImageProps and PictureProps in @nuxt/image/runtime, which aligns with the changeset.
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 unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/export_props_types

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
Copy Markdown
Member

would you take a look at the failing tests?

Copy link
Copy Markdown

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

Comment thread src/runtime/types.ts Outdated
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Feb 10, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 32.52%. Comparing base (de473d2) to head (766e179).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2115   +/-   ##
=======================================
  Coverage   32.52%   32.52%           
=======================================
  Files           7        7           
  Lines         372      372           
  Branches      131      131           
=======================================
  Hits          121      121           
  Misses        194      194           
  Partials       57       57           

☔ 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
Copy Markdown

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

Deploying nuxt-image with  Cloudflare Pages  Cloudflare Pages

Latest commit: 766e179
Status: ✅  Deploy successful!
Preview URL: https://7141f96f.nuxt-image.pages.dev
Branch Preview URL: https://feat-export-props-types.nuxt-image.pages.dev

View logs

@danielroe danielroe added this pull request to the merge queue Apr 1, 2026
Merged via the queue into main with commit 04ce48b Apr 1, 2026
11 checks passed
@danielroe danielroe deleted the feat/export_props_types branch April 1, 2026 13:42
@github-actions github-actions bot mentioned this pull request Apr 1, 2026
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