Skip to content

Conversation

@OrbisK
Copy link
Member

@OrbisK OrbisK commented Aug 14, 2025

fixes #32956

🔗 Linked issue

📚 Description

This PR marks asyncData.pending as deprecated and to be removed with v5.

@OrbisK OrbisK requested a review from danielroe as a code owner August 14, 2025 07:56
@bolt-new-by-stackblitz
Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@coderabbitai
Copy link

coderabbitai bot commented Aug 14, 2025

Walkthrough

A deprecation JSDoc was added above the pending property in the _AsyncData<DataT, ErrorT> interface in packages/nuxt/src/app/composables/asyncData.ts. The pending property signature remains pending: Ref<boolean>. The comment advises using status instead and states pending will be removed in Nuxt 5. No runtime or behavioural changes were made, and no exported signatures changed.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.


📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between c1efabb and 16f13e1.

📒 Files selected for processing (1)
  • packages/nuxt/src/app/composables/asyncData.ts (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • packages/nuxt/src/app/composables/asyncData.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (19)
  • GitHub Check: test-fixtures (windows-latest, built, vite, default, manifest-on, json, lts/-1)
  • GitHub Check: test-fixtures (windows-latest, built, rspack, async, manifest-on, json, lts/-1)
  • GitHub Check: test-fixtures (windows-latest, built, webpack, async, manifest-on, json, lts/-1)
  • GitHub Check: test-fixtures (ubuntu-latest, dev, vite, async, manifest-on, js, lts/-1)
  • GitHub Check: test-fixtures (windows-latest, built, vite, default, manifest-off, json, lts/-1)
  • GitHub Check: test-fixtures (ubuntu-latest, built, rspack, async, manifest-on, json, lts/-1)
  • GitHub Check: test-fixtures (ubuntu-latest, built, vite, async, manifest-off, json, lts/-1)
  • GitHub Check: test-fixtures (ubuntu-latest, built, webpack, default, manifest-on, json, lts/-1)
  • GitHub Check: test-fixtures (windows-latest, built, vite, async, manifest-on, json, lts/-1)
  • GitHub Check: test-fixtures (windows-latest, dev, vite, async, manifest-on, json, lts/-1)
  • GitHub Check: test-fixtures (ubuntu-latest, built, rspack, default, manifest-on, json, lts/-1)
  • GitHub Check: test-fixtures (ubuntu-latest, built, vite, async, manifest-on, js, lts/-1)
  • GitHub Check: test-fixtures (ubuntu-latest, dev, vite, async, manifest-off, json, lts/-1)
  • GitHub Check: test-fixtures (ubuntu-latest, dev, vite, default, manifest-off, json, lts/-1)
  • GitHub Check: release-pkg-pr-new
  • GitHub Check: typecheck (windows-latest, bundler)
  • GitHub Check: test-benchmark
  • GitHub Check: test-size
  • GitHub Check: code
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

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: 0

🧹 Nitpick comments (1)
packages/nuxt/src/app/composables/asyncData.ts (1)

119-122: Enrich the deprecation JSDoc with migration guidance and a reference link

Include a short usage hint and a @see to guide users. This improves DX without changing behaviour.

   /**
-   * @deprecated Use `status` instead. `pending` will be removed in Nuxt 5.
+   * @deprecated Use `status` instead (e.g. `status.value === 'pending'`). This property will be removed in Nuxt 5.
+   * @see https://nuxt.com/docs/api/composables/use-async-data#status
    */
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c5c1364 and c1efabb.

📒 Files selected for processing (1)
  • packages/nuxt/src/app/composables/asyncData.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx}

📄 CodeRabbit Inference Engine (.github/copilot-instructions.md)

Follow standard TypeScript conventions and best practices

Files:

  • packages/nuxt/src/app/composables/asyncData.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: build
  • GitHub Check: codeql (javascript-typescript)
  • GitHub Check: code
🔇 Additional comments (2)
packages/nuxt/src/app/composables/asyncData.ts (2)

119-122: Deprecation notice is clear and non-breaking

The JSDoc succinctly communicates the deprecation and the recommended alternative, with no runtime or type signature changes. This is safe to ship.


119-122: Confirm docs and migration notes are updated to reflect deprecation

Since users often rely on pending, please ensure the docs for useAsyncData explicitly show the replacement pattern (status.value === 'pending') and call out the Nuxt 5 removal, so consumers aren’t caught off guard.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Aug 14, 2025

Open in StackBlitz

@nuxt/kit

npm i https://pkg.pr.new/@nuxt/kit@32959

nuxt

npm i https://pkg.pr.new/nuxt@32959

@nuxt/rspack-builder

npm i https://pkg.pr.new/@nuxt/rspack-builder@32959

@nuxt/schema

npm i https://pkg.pr.new/@nuxt/schema@32959

@nuxt/vite-builder

npm i https://pkg.pr.new/@nuxt/vite-builder@32959

@nuxt/webpack-builder

npm i https://pkg.pr.new/@nuxt/webpack-builder@32959

commit: 16f13e1

@codspeed-hq
Copy link

codspeed-hq bot commented Aug 14, 2025

CodSpeed Performance Report

Merging #32959 will not alter performance

Comparing OrbisK:docs/async-data-pending-deprecation (16f13e1) with main (6501f62)

Summary

✅ 10 untouched benchmarks

Copy link
Member

@huang-julien huang-julien left a comment

Choose a reason for hiding this comment

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

I think we've decided to keep it, even for V5 🤔

@OrbisK
Copy link
Member Author

OrbisK commented Aug 14, 2025

Sure.

I have added #32960 as place to discuss this :)

@OrbisK
Copy link
Member Author

OrbisK commented Aug 25, 2025

#32960 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The pending field for AsyncData is undocumented

2 participants