Skip to content

feat: improve npm provider docs#344

Merged
danielroe merged 5 commits intomainfrom
docs/npm-provider
Mar 13, 2026
Merged

feat: improve npm provider docs#344
danielroe merged 5 commits intomainfrom
docs/npm-provider

Conversation

@florian-lefebvre
Copy link
Collaborator

@florian-lefebvre florian-lefebvre commented Mar 12, 2026

  • The readme did not have proper docs for the NPM provider
  • I made this docs based on the original jsdocs and the Astro docs, who were based on jsdocs and improved
  • I updated the jsdocs to reflect these uddates

Summary by CodeRabbit

  • Documentation
    • Clarified Fontsource provider description to indicate API usage.
    • Added comprehensive NPM provider docs: initialization, automatic package detection, options (cdn/remote/readFile/root), family settings (package/version/file), and usage examples.
    • Refined related inline documentation for NPM family file parsing guidance.

@coderabbitai
Copy link

coderabbitai bot commented Mar 12, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 2f8bed09-ce56-4a22-b386-766e93bafce7

📥 Commits

Reviewing files that changed from the base of the PR and between 7ea62e4 and bbfba50.

📒 Files selected for processing (2)
  • README.md
  • src/providers/npm.ts

📝 Walkthrough

Walkthrough

This PR expands README npm provider documentation (usage, options, family parameters, examples) and refines a JSDoc line in src/providers/npm.ts; no API or behavioral changes.

Changes

Cohort / File(s) Summary
Documentation Expansion
README.md
Added detailed providers.npm() docs: automatic package detection, Options (cdn, remote, readFile, root) with defaults, Family options (package, version, file) with examples; updated Fontsource description and removed an outdated note.
JSDoc Tweak
src/providers/npm.ts
Minor JSDoc wording change for NpmFamilyOptions.file to clarify: "The entry CSS file to parse from the package." — no signature or behavior changes.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 Readme hops in, all tidy and bright,
npm flags and options set just right.
A tiny doc tweak, a clearer line,
The codebase nibbles — neat and fine! 🥕

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title accurately describes the main change: improving documentation for the npm provider in README.md and updating related JSDoc comments.
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 docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch docs/npm-provider
📝 Coding Plan
  • Generate coding plan for human review comments

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.

@codecov
Copy link

codecov bot commented Mar 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.33%. Comparing base (f33989d) to head (bbfba50).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #344   +/-   ##
=======================================
  Coverage   98.33%   98.33%           
=======================================
  Files          12       12           
  Lines         660      660           
  Branches      172      172           
=======================================
  Hits          649      649           
  Misses         11       11           

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

Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure about the changes to this file

  • npm and NPM are both used
  • @default is moved before the description (why?)
  • in most cases examples and additional docs are removed

(I've reverted these changes but come back to me if there was a reason for these.)

@danielroe danielroe merged commit a6df8cd into main Mar 13, 2026
7 checks passed
@danielroe danielroe deleted the docs/npm-provider branch March 13, 2026 08:34
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.

2 participants