Skip to content

feat: stats page#2872

Open
alexdln wants to merge 13 commits into
npmx-dev:mainfrom
alexdln:feat/stats-page
Open

feat: stats page#2872
alexdln wants to merge 13 commits into
npmx-dev:mainfrom
alexdln:feat/stats-page

Conversation

@alexdln
Copy link
Copy Markdown
Member

@alexdln alexdln commented Jun 7, 2026

🧭 Context

Adding a page with all the statistics - a table with key data and graphs of downloads and likes

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Jun 7, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
npmx.dev Ready Ready Preview, Comment Jun 7, 2026 8:44pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Preview Jun 7, 2026 8:44pm
npmx-lunaria Ignored Ignored Jun 7, 2026 8:44pm

Request Review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 7, 2026

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds a package statistics page with version-spec parsing and resolution, version-aware comparison fetches, routing (packageStatsRoute), header/command-palette/keyboard-shortcut navigation integration, localisation keys/schema updates, and tests covering pinned, dist-tag and unresolved versions.

Changes

Package Stats Feature

Layer / File(s) Summary
Version parsing & comparison resolution
shared/utils/parse-package-param.ts, app/composables/usePackageComparison.ts, modules/runtime/server/cache.ts, test/nuxt/composables/use-package-comparison.spec.ts
Adds parsePackageSpec and updates comparison logic to parse requested specs, resolve pinned versions/dist-tags against npm packuments, use /v/<version> endpoints where applicable, return resolved version and lastUpdated, update server fixtures and tests for pinned/dist-tag/unresolved cases.
Stats page and routing
app/pages/package-stats/[[org]]/[packageName].vue, app/utils/router.ts
New stats page SFC deriving route params, loading package data, computing facetRows, rendering facet grid, trends and version-distribution charts, sidebar with versions/maintainers, setting SEO meta; adds packageStatsRoute helper.
Navigation, shortcuts & command palette
app/components/Package/Header.vue, app/components/AppFooter.vue, app/composables/useCommandPalettePackageCommands.ts, docs/content/2.guide/2.keyboard-shortcuts.md
Header supports stats page and statsLink, s keyboard shortcut navigates to stats, command palette gets package-stats entry, keyboard-shortcuts modal and docs updated to include s.
Localisation and schema
i18n/locales/en.json, i18n/schema.json, docs/*, README.md
Adds shortcuts.open_stats, command_palette.package.stats, package.stats.main_information, package.stats.trends, package.stats.version_distribution, and package.links.stats keys; extends i18n schema to validate the new keys; updates docs and README to document stats URLs and URL-driven shareable views.

Suggested reviewers

  • graphieros
  • ghostdevv
  • MatteoGabriele
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat: stats page' directly and clearly describes the main change: adding a new statistics page feature.
Description check ✅ Passed The description is related to the changeset, explaining that the stats page includes a table with key data and graphs for downloads and likes.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 7, 2026

Lunaria Status Overview

🌕 This pull request will trigger status changes.

Learn more

By default, every PR changing files present in the Lunaria configuration's files property will be considered and trigger status changes accordingly.

You can change this by adding one of the keywords present in the ignoreKeywords property in your Lunaria configuration file in the PR's title (ignoring all files) or by including a tracker directive in the merged commit's description.

Tracked Files

File Note
i18n/locales/ar.json Localization changed, will be marked as complete.
i18n/locales/az-AZ.json Localization changed, will be marked as complete.
i18n/locales/bg-BG.json Localization changed, will be marked as complete.
i18n/locales/bn-IN.json Localization changed, will be marked as complete.
i18n/locales/cs-CZ.json Localization changed, will be marked as complete.
i18n/locales/de.json Localization changed, will be marked as complete.
i18n/locales/en.json Source changed, localizations will be marked as outdated.
i18n/locales/es.json Localization changed, will be marked as complete.
i18n/locales/fr-FR.json Localization changed, will be marked as complete.
i18n/locales/hi-IN.json Localization changed, will be marked as complete.
i18n/locales/hu-HU.json Localization changed, will be marked as complete.
i18n/locales/id-ID.json Localization changed, will be marked as complete.
i18n/locales/ja-JP.json Localization changed, will be marked as complete.
i18n/locales/mr-IN.json Localization changed, will be marked as complete.
i18n/locales/nb-NO.json Localization changed, will be marked as complete.
i18n/locales/nl.json Localization changed, will be marked as complete.
i18n/locales/pl-PL.json Localization changed, will be marked as complete.
i18n/locales/pt-BR.json Localization changed, will be marked as complete.
i18n/locales/pt-PT.json Localization changed, will be marked as complete.
i18n/locales/ro-RO.json Localization changed, will be marked as complete.
i18n/locales/ru-RU.json Localization changed, will be marked as complete.
i18n/locales/sr-Latn-RS.json Localization changed, will be marked as complete.
i18n/locales/tr-TR.json Localization changed, will be marked as complete.
i18n/locales/uk-UA.json Localization changed, will be marked as complete.
i18n/locales/vi-VN.json Localization changed, will be marked as complete.
i18n/locales/zh-CN.json Localization changed, will be marked as complete.
i18n/locales/zh-TW.json Localization changed, will be marked as complete.
Warnings reference
Icon Description
🔄️ The source for this localization has been updated since the creation of this pull request, make sure all changes in the source have been applied.

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

@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

🤖 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 `@app/pages/package-stats/`[[org]]/[packageName].vue:
- Line 106: The template forces locale-insensitive lowercasing by calling
row.label.toLowerCase(); remove the programmatic lowercasing and render the
translated label as-is (i.e., use row.label without .toLowerCase()) so
translator-defined casing is preserved; if visual lowercase is required for
styling, apply CSS text-transform: lowercase on the surrounding element/class
instead of altering the string in the template (refer to the dt element
rendering row.label).
🪄 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: e1dfe9d7-98fe-40b6-8470-8d2d5731b100

📥 Commits

Reviewing files that changed from the base of the PR and between 0ad3d62 and 4f173c9.

📒 Files selected for processing (12)
  • app/components/AppFooter.vue
  • app/components/Package/Header.vue
  • app/composables/useCommandPalettePackageCommands.ts
  • app/composables/usePackageComparison.ts
  • app/pages/package-stats/[[org]]/[packageName].vue
  • app/utils/router.ts
  • docs/content/2.guide/2.keyboard-shortcuts.md
  • i18n/locales/en.json
  • i18n/schema.json
  • modules/runtime/server/cache.ts
  • shared/utils/parse-package-param.ts
  • test/nuxt/composables/use-package-comparison.spec.ts

Comment thread app/pages/package-stats/[[org]]/[packageName].vue Outdated
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.

1 participant