feat: add support for all export shapes to package API docs#1728
feat: add support for all export shapes to package API docs#1728
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
71528cc to
bc292b9
Compare
bc292b9 to
f58ffc8
Compare
f58ffc8 to
57c6bd9
Compare
Lunaria Status Overview🌕 This pull request will trigger status changes. Learn moreBy default, every PR changing files present in the Lunaria configuration's You can change this by adding one of the keywords present in the Tracked Files
Warnings reference
|
57c6bd9 to
7204fc8
Compare
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
7204fc8 to
3003b60
Compare
265e942 to
aec760b
Compare
Packages with only subpath exports (no root export) previously got no
docs because esm.sh returns 404 for their root URL. Fix by falling back
to the npm registry field to discover typed subpath entries.
Additionally, multi-entrypoint packages now get separate docs pages per
subpath with an EntrypointSelector dropdown, instead of dumping all
symbols into one flat page. The base URL redirects to the first
entrypoint.
URL structure: /package-docs/{pkg}/v/{version}/{entrypoint}
Closes #1479
3f8424c to
7099e4b
Compare
🔗 Linked issue
Fixes #1479
🧭 Context
There are a couple problems with the current implementation of our "package docs" feature:
./), getting a 404 or no types back, and then rendering nothing, even when a package had other perfectly good typed exports.📚 Description
On the backend, broaden entrypoint discovery so we can find all typed subpath exports from
package.json#exports, including nested condition objects likeimport.types.On the frontend, make the package docs entrypoint-aware:
/package-docs/:pkg/v/:version/:entrypoint.