Skip to content

Conversation

@avivkeller
Copy link
Member

@avivkeller avivkeller commented Jul 26, 2025

This PR fixes the type parsing to:

  • Support [module].some.header syntax (which accounts for several missing types)
  • Support the missing types not encompassed by the above

(In the process of making this, I noticed a slight CSS issue, so this PR also addresses that. I can make a new PR if needed, it's it's so minor I figured it was fine to include)

Copilot AI review requested due to automatic review settings July 26, 2025 21:27
@avivkeller avivkeller requested a review from a team as a code owner July 26, 2025 21:27
@vercel
Copy link

vercel bot commented Jul 26, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
api-docs-tooling ✅ Ready (Inspect) Visit Preview Jul 27, 2025 2:53pm

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR improves type parsing and CSS styling by updating regex patterns for better type matching and fixing header positioning styles.

  • Improved type parsing with more flexible regex patterns and support for module-style types like vm.Something
  • Added support for missing Node.js types and moved shared constants to a central location
  • Minor CSS fix to include h5 and h6 elements in header positioning styles

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/utils/queries/index.mjs Updated regex patterns for more flexible type matching and stricter typed-list validation
src/utils/parser/slugger.mjs New shared slugger utility moved from metadata generator
src/utils/parser/index.mjs Added support for parsing module-style types like vm.Something
src/utils/parser/constants.mjs Added new Node.js types and moved slug replacement constants from metadata
src/generators/web/ui/index.css Extended CSS selector to include h5 and h6 elements
src/generators/metadata/utils/slugger.mjs Removed file (moved to shared location)
src/generators/metadata/utils/parse.mjs Updated import to use shared slugger utility
src/generators/metadata/constants.mjs Removed file (constants moved to parser)

@codecov
Copy link

codecov bot commented Jul 26, 2025

Codecov Report

❌ Patch coverage is 82.75862% with 15 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.28%. Comparing base (7149528) to head (5a04985).
⚠️ Report is 2 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/utils/parser/slugger.mjs 64.10% 14 Missing ⚠️
src/utils/parser/index.mjs 88.88% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #379      +/-   ##
==========================================
- Coverage   74.50%   74.28%   -0.22%     
==========================================
  Files         120      118       -2     
  Lines       11067    11032      -35     
  Branches      694      693       -1     
==========================================
- Hits         8245     8195      -50     
- Misses       2819     2834      +15     
  Partials        3        3              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Member

@ovflowd ovflowd left a comment

Choose a reason for hiding this comment

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

You might have noticed that with doc-kit PRs I tend to be more nitpicky, that's because differently from the Node.js website, where we don't generate things out of thin air, code-changes here can affect Node's documentation and how it structures and generates content. So here, I'll be a bit more extra demanding as we're reaching maturity and getting close to live on nodejs/node 🙇

@ovflowd
Copy link
Member

ovflowd commented Jul 26, 2025

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
186 1 185 0
View the top 1 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard 📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

Tests still failing?

@avivkeller
Copy link
Member Author

Tests still failing?

No. Not sure why Codecov didn't update that comment correctly 🤔

@ovflowd
Copy link
Member

ovflowd commented Jul 27, 2025

Have you updated the tests? 👀

@avivkeller
Copy link
Member Author

Have you updated the tests? 👀

#379 (comment)

@avivkeller avivkeller merged commit a04ad2d into main Jul 28, 2025
18 checks passed
@avivkeller avivkeller deleted the fix/type-parsing-and-css branch July 28, 2025 13:27
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.

4 participants