Skip to content

Conversation

@danielroe
Copy link
Member

🔗 Linked issue

closes #33497

📚 Description

this adds some missing docs for the moduleDependencies feature (#33063)

@danielroe danielroe requested a review from atinux October 16, 2025 21:32
@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 Oct 16, 2025

Walkthrough

Documentation updates to introduce and explain the new moduleDependencies option for defineNuxtModule. The changes document a shift from using installModule to a new declarative moduleDependencies approach, which supports static or function-based dependency configuration with version constraints, property overrides, and default settings. The guide and API documentation are updated with examples showing the new meta section and moduleDependencies configuration block, alongside a deprecation notice for installModule.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Rationale: Pure documentation changes across two related files following a consistent pattern. Changes are homogeneous—both files document the same feature transition with similar examples and structure. No implementation logic, runtime behaviour, or type definitions to verify; reviewers need only confirm documentation clarity, example correctness, and consistency between guide and API reference sections.

Pre-merge checks and finishing touches

✅ Passed checks (4 passed)
Check name Status Explanation
Title Check ✅ Passed The pull request title "docs: add docs for moduleDependencies" directly and clearly describes the main change in the changeset. The raw summary confirms that the modifications are entirely focused on adding documentation for the moduleDependencies feature across two documentation files, with examples showing the new usage pattern. The title is concise, specific, and would enable a team member scanning the commit history to immediately understand that this PR introduces documentation for a specific feature.
Linked Issues Check ✅ Passed The linked issue #33497 requests updated documentation to explain the alternative to the deprecated installModule function. The raw summary demonstrates that the PR directly addresses this requirement by introducing comprehensive documentation for moduleDependencies in both the guide (docs/2.guide/3.going-further/3.modules.md) and API reference (docs/3.api/5.kit/1.modules.md) documentation files, including practical examples, type information, and a deprecation callout indicating that installModule will be removed in favour of moduleDependencies. The documented changes show the new moduleDependencies configuration structure with meta, version constraints, overrides, and defaults, providing clear guidance on the recommended pattern for module dependency management.
Out of Scope Changes Check ✅ Passed All changes in the pull request are directly scoped to the stated objectives and linked issue requirements. The modifications comprise two documentation files that explain and demonstrate the moduleDependencies feature, including deprecation guidance for installModule. No implementation code changes or unrelated modifications are present. The changes remain focused on addressing the documentation gap identified in issue #33497 regarding the deprecation of installModule and the proper alternative pattern.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch docs/mod-deps

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.

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)
docs/3.api/5.kit/1.modules.md (1)

65-65: Minor grammar improvement in table description. The description "Can be an object or a function..." would read more clearly as "Either an object or a function...". This is a minor style point; the current phrasing is acceptable in table context.

Consider applying this diff:

-| `moduleDependencies` | `Record<string, ModuleDependency> \| ((nuxt: Nuxt) => Record<string, ModuleDependency>)`{lang="ts"} | `false`  | Dependencies on other modules with version constraints and configuration. Can be an object or a function that receives the Nuxt instance. See [example](#specifying-module-dependencies). |
+| `moduleDependencies` | `Record<string, ModuleDependency> \| ((nuxt: Nuxt) => Record<string, ModuleDependency>)`{lang="ts"} | `false`  | Dependencies on other modules with version constraints and configuration. Either an object or a function that receives the Nuxt instance. See [example](#specifying-module-dependencies). |
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e79f117 and 92fb451.

📒 Files selected for processing (2)
  • docs/2.guide/3.going-further/3.modules.md (1 hunks)
  • docs/3.api/5.kit/1.modules.md (3 hunks)
🧰 Additional context used
🪛 LanguageTool
docs/3.api/5.kit/1.modules.md

[uncategorized] ~11-~11: Possible missing article found.
Context: ...odules are the building blocks of Nuxt. Kit provides a set of utilities to help you...

(AI_HYDRA_LEO_MISSING_THE)


[style] ~65-~65: To form a complete sentence, be sure to include a subject or ‘there’.
Context: ... version constraints and configuration. Can be an object or a function that receive...

(MISSING_IT_THERE)


[uncategorized] ~325-~325: Loose punctuation mark.
Context: ...alized }, }) ``` ## installModule ::callout{type="warning"} Deprecated:...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~327-~327: Loose punctuation mark.
Context: ...come non-blocking) in a future version. :: Install specified Nuxt module program...

(UNLIKELY_OPENING_PUNCTUATION)

docs/2.guide/3.going-further/3.modules.md

[uncategorized] ~544-~544: Loose punctuation mark.
Context: ...ntime/assets/styles.css')) }, }) ``` ::callout{type="info"} The `moduleDepende...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~546-~546: Loose punctuation mark.
Context: ... setup order and configuration merging. :: #### Using Hooks [Lifecycle hooks](/...

(UNLIKELY_OPENING_PUNCTUATION)

🔇 Additional comments (5)
docs/3.api/5.kit/1.modules.md (3)

11-11: Well-integrated introduction to moduleDependencies. The reference naturally introduces the new feature alongside existing module utilities.


243-322: Excellent comprehensive examples for moduleDependencies. Both static and dynamic approaches are thoroughly documented with clear comments explaining version constraints, configuration overrides, defaults, and optional dependency handling. The function-based example with conditional logic is particularly helpful for real-world scenarios.


326-328: Clear and actionable deprecation notice. The warning effectively communicates the shift to moduleDependencies and directs developers to relevant examples.

docs/2.guide/3.going-further/3.modules.md (2)

504-542: Well-structured example demonstrating the new moduleDependencies pattern. The example effectively shows version constraints, configuration merging (overrides and defaults), and resolver-based asset injection. The pattern is clearer and more maintainable than the previous installModule approach.


545-547: Effective reinforcement of best practices. The informational callout succinctly communicates the key benefits of moduleDependencies over the deprecated approach.

@danielroe danielroe merged commit 39dd9b6 into main Oct 17, 2025
8 of 9 checks passed
@danielroe danielroe deleted the docs/mod-deps branch October 17, 2025 07:18
This was referenced Oct 17, 2025
danielroe added a commit that referenced this pull request Oct 25, 2025
@github-actions github-actions bot mentioned this pull request Oct 25, 2025
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.

installModule is deprecated, docs haven't been updated to provide alternative

3 participants