docs: replace version badges with versionBadge component - #35872
Conversation
@nuxt/kit
@nuxt/nitro-server
nuxt
@nuxt/rspack-builder
@nuxt/schema
@nuxt/vite-builder
@nuxt/webpack-builder
commit: |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
scripts/_unreleased-version.test.ts (1)
23-86: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winCover the file-stamping workflow.
The suite tests pure transforms but not
stampUnreleasedVersions. Add a temporary-tree test coveringdocs/**/*.md,packages/*/src/**/*.{ts,mts,vue}, file writes, and the returned relative paths.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@scripts/_unreleased-version.test.ts` around lines 23 - 86, Add an integration-style test for stampUnreleasedVersions using a temporary directory containing matching docs/**/*.md and packages/*/src/**/*.{ts,mts,vue} files plus non-matching files. Verify placeholders are stamped, transformed contents are written back, and the returned paths are the expected relative paths; clean up the temporary tree afterward.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/2.directory-structure/1.app/1.utils.md`:
- Line 52: Move the version badges to the end of their complete descriptions: in
docs/2.directory-structure/1.app/1.utils.md lines 52-52, place the 4.6 badge
after the final sentence; in docs/4.api/3.utils/clear-nuxt-state.md lines 26-26,
place the 4.4 badge after the complete reset description. Preserve the existing
wording and links.
In `@docs/5.community/4.contribution.md`:
- Line 316: Add the missing comma after “Until then” in the contribution
documentation sentence, so it reads “Until then, the badge reads …” while
leaving the surrounding release-version guidance unchanged.
---
Nitpick comments:
In `@scripts/_unreleased-version.test.ts`:
- Around line 23-86: Add an integration-style test for stampUnreleasedVersions
using a temporary directory containing matching docs/**/*.md and
packages/*/src/**/*.{ts,mts,vue} files plus non-matching files. Verify
placeholders are stamped, transformed contents are written back, and the
returned paths are the expected relative paths; clean up the temporary tree
afterward.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 3d9b5568-2ab6-4abb-befd-2d82eb269f11
📒 Files selected for processing (31)
docs/1.getting-started/09.transitions.mddocs/2.directory-structure/1.app/1.components.mddocs/2.directory-structure/1.app/1.layouts.mddocs/2.directory-structure/1.app/1.pages.mddocs/2.directory-structure/1.app/1.utils.mddocs/2.directory-structure/1.server.mddocs/3.guide/1.concepts/5.modules.mddocs/3.guide/6.going-further/7.layers.mddocs/4.api/1.components/3.nuxt-layout.mddocs/4.api/1.components/4.nuxt-link.mddocs/4.api/2.composables/use-async-data.mddocs/4.api/2.composables/use-cookie.mddocs/4.api/2.composables/use-fetch.mddocs/4.api/2.composables/use-nuxt-app.mddocs/4.api/3.utils/call-once.mddocs/4.api/3.utils/clear-nuxt-state.mddocs/4.api/3.utils/define-page-meta.mddocs/4.api/3.utils/set-page-layout.mddocs/4.api/4.commands/build.mddocs/4.api/4.commands/dev.mddocs/4.api/4.commands/generate.mddocs/4.api/5.kit/15.builder.mddocs/4.api/5.kit/7.pages.mddocs/4.api/6.advanced/2.import-meta.mddocs/4.api/6.nuxt-config.mddocs/5.community/4.contribution.mddocs/5.community/5.framework-contribution.mdscripts/_unreleased-version.test.tsscripts/_unreleased-version.tsscripts/bump.tsvitest.config.ts
|
|
||
| ::tip | ||
| Types can be auto-imported the same way. Put app-only types in `app/types/`, server-only types in [`server/types/`](/docs/4.x/directory-structure/server#server-types), and types shared between both in [`shared/types/`](/docs/4.x/directory-structure/shared). | ||
| Types can be auto-imported the same way. :versionBadge{version="4.6"} Put app-only types in `app/types/`, server-only types in [`server/types/`](/docs/4.x/directory-structure/server#server-types), and types shared between both in [`shared/types/`](/docs/4.x/directory-structure/shared). |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Place version badges after the complete description.
Both occurrences place the badge before remaining text, conflicting with the documented “badge must be last” rule and risking awkward spacing when hidden.
docs/2.directory-structure/1.app/1.utils.md#L52-L52: move the4.6badge after the final sentence.docs/4.api/3.utils/clear-nuxt-state.md#L26-L26: move the4.4badge after the completeresetdescription.
🧰 Tools
🪛 LanguageTool
[uncategorized] ~52-~52: Loose punctuation mark.
Context: ...ypes can be auto-imported the same way. :versionBadge{version="4.6"} Put app-only...
(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~52-~52: Loose punctuation mark.
Context: ...(/docs/4.x/directory-structure/shared). ::
(UNLIKELY_OPENING_PUNCTUATION)
📍 Affects 2 files
docs/2.directory-structure/1.app/1.utils.md#L52-L52(this comment)docs/4.api/3.utils/clear-nuxt-state.md#L26-L26
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/2.directory-structure/1.app/1.utils.md` at line 52, Move the version
badges to the end of their complete descriptions: in
docs/2.directory-structure/1.app/1.utils.md lines 52-52, place the 4.6 badge
after the final sentence; in docs/4.api/3.utils/clear-nuxt-state.md lines 26-26,
place the 4.4 badge after the complete reset description. Preserve the existing
wording and links.
Merging this PR will not alter performance
Comparing Footnotes
|
🔗 Linked issue
Followup on/waiting for nuxt/nuxt.com#2327
📚 Description
:badges with:versionBadges.(used claude to refactor docs badges)