Skip to content

refactor(react): extract @doc-kittens/react package - #959

Open
avivkeller wants to merge 1 commit into
mainfrom
refactor/react-kitten
Open

refactor(react): extract @doc-kittens/react package#959
avivkeller wants to merge 1 commit into
mainfrom
refactor/react-kitten

Conversation

@avivkeller

@avivkeller avivkeller commented Jul 30, 2026

Copy link
Copy Markdown
Member

The React/JSX-based generators (html, renamed from web), jsx-ast, llms-txt, sitemap, and orama-db have moved into the new @doc-kittens/react package, and are loaded via import specifiers such as @doc-kittens/react/html.

To avoid breaking existing CLIs, the html generator can be referred to by the web specifier.

@vercel

vercel Bot commented Jul 30, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
api-docs-tooling Ready Ready Preview Aug 1, 2026 3:27pm

Request Review

@avivkeller
avivkeller marked this pull request as ready for review July 30, 2026 21:33
@avivkeller
avivkeller requested a review from a team as a code owner July 30, 2026 21:33
Copilot AI review requested due to automatic review settings July 30, 2026 21:33
@cursor

cursor Bot commented Jul 30, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Packaging and public API changes affect anyone importing removed @node-core/doc-kit generator paths or using the web config key without migration; runtime behavior should be preserved via registry aliases and unchanged generator logic moved to the new package.

Overview
React/JSX doc generators move out of @node-core/doc-kit into @doc-kittens/react, with core’s generator registry pointing html, jsx-ast, llms-txt, sitemap, and orama-db at @doc-kittens/react/* instead of local paths. @node-core/doc-kit drops the old package exports and most UI/bundler dependencies (Preact, Vite, Orama, fonts, etc.); the new package depends on doc-kit for shared utilities.

The former web generator is renamed html: config and CLI targets use html, while web remains a deprecated alias that still resolves to the same implementation. The Recma/JSX remark pipeline (getRemarkRecma) leaves packages/core/src/utils/remark.mjs and lives under packages/react/src/jsx-ast/utils/remark.mjs.

Tests, ESLint browser paths, and scripts/vercel-build.sh are updated for the html target and the new package layout.

Reviewed by Cursor Bugbot for commit f8d1d66. Bugbot is set up for automated code reviews on this repo. Configure here.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI review requested due to automatic review settings August 1, 2026 10:36
@ovflowd
ovflowd force-pushed the refactor/react-kitten branch from 316965a to fbba838 Compare August 1, 2026 10:36
@ovflowd

ovflowd commented Aug 1, 2026

Copy link
Copy Markdown
Member

The React/JSX-based generators (html, renamed from web), jsx-ast, llms-txt, sitemap, and orama-db have moved into the new @doc-kittens/react package, and are loaded via import specifiers such as @doc-kittens/react/html.

@avivkeller ensure documentation is up to date!

@codecov

codecov Bot commented Aug 1, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 99.28571% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.64%. Comparing base (0bd347d) to head (f8d1d66).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...ges/react/src/html/ui/utils/relativeOrAbsolute.mjs 0.00% 1 Missing ⚠️
packages/react/src/jsx-ast/utils/remark.mjs 98.75% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #959      +/-   ##
==========================================
- Coverage   88.94%   85.64%   -3.31%     
==========================================
  Files         197      212      +15     
  Lines       18106    18887     +781     
  Branches     1664     1668       +4     
==========================================
+ Hits        16105    16175      +70     
- Misses       1994     2705     +711     
  Partials        7        7              

☔ View full report in Codecov by Harness.
📢 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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 45 out of 103 changed files in this pull request and generated no new comments.

Suppressed comments (2)

packages/react/src/sitemap/utils/createPageSitemapEntry.mjs:7

  • The function accepts a lastmod argument but the JSDoc doesn’t document it, which makes the generated typings/docs incomplete and misleading.
    packages/react/package.json:4
  • packages/react/package.json declares version 0.0.0, but package-lock.json records this workspace as 1.0.0 (see package-lock.json:11385). This inconsistency can cause confusing installs/publishes; the lockfile should reflect the package.json version.
  "version": "0.0.0",

Base automatically changed from refactor/specifier-loading to main August 1, 2026 15:26

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit f8d1d66. Configure here.

Comment thread scripts/vercel-build.sh
-t legacy-json \
-t llms-txt \
-t web \
-t html \

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Beta config still uses web key

High Severity

beta/doc-kit.config.mjs still configures the generator under web, but the generator name is now html and all lookups use getConfig('html'). The Vercel build passes -t html with this file, so the custom remoteConfigUrl never merges into the active config and the beta site keeps the default Node.js banner endpoint.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit f8d1d66. Configure here.

"./orama-db": "./src/orama-db/index.mjs",
"./sitemap": "./src/sitemap/index.mjs",
"./package.json": "./package.json"
},

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Vite bundler export missing

Medium Severity

@doc-kittens/react only exports the generator entrypoints, with no path for createViteBundler. Previously consumers could import the adapter through @node-core/doc-kit's src/* export; after the move that public customization path is gone and deep imports are blocked by the exports map.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit f8d1d66. Configure here.

@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

api-links Generator

Output: 1 file differs

apilinks.json
Expected values to be strictly deep-equal:
+ actual - expected
... Skipped lines

  {
    'Agent.defaultMaxSockets': 'https://github.com/nodejs/node/blob/HEAD/lib/_http_agent.js#L291',
    'Buffer.alloc': 'https://github.com/nodejs/node/blob/HEAD/lib/buffer.js#L435',
    'Buffer.allocUnsafe': 'https://github.com/nodejs/node/blob/HEAD/lib/buffer.js#L449',
    'Buffer.allocUnsafeSlow': 'https://github.com/nodejs/node/blob/HEAD/lib/buffer.js#L461',
...
    'agent.addRequest': 'https://github.com/nodejs/node/blob/HEAD/lib/_http_agent.js#L356',
+   'agent.createConnection': 'https://github.com/nodejs/node/blob/HEAD/lib/_http_agent.js#L295',
-   'agent.createConnection': 'https://github.com/nodejs/node/blob/HEAD/lib/https.js#L332',
    'agent.createSocket': 'https://github.com/nodejs/node/blob/HEAD/lib/_http_agent.js#L427',
    'agent.destroy': 'https://github.com/nodejs/node/blob/HEAD/lib/_http_agent.js#L660',
+   'agent.getName': 'https://github.com/nodejs/node/blob/HEAD/lib/_http_agent.js#L325',
+   'agent.keepSocketAlive': 'https://github.com/nodejs/node/blob/HEAD/lib/_http_agent.js#L616',
-   'agent.getName': 'https://github.com/nodejs/node/blob/HEAD/lib/https.js#L515',
-   'agent.keepSocketAlive': 'https://github.com/nodejs/node/blob/HEAD/lib/https.js#L484',
    'agent.removeSocket': 'https://github.com/nodejs/node/blob/HEAD/lib/_http_agent.js#L555',
    'agent.reuseSocket': 'https://github.com/nodejs/node/blob/HEAD/lib/_http_agent.js#L652',
    'assert.assert': 'https://github.com/nodejs/node/blob/HEAD/lib/assert.js#L185',
    'asyncResource.asyncId': 'https://github.com/nodejs/node/blob/HEAD/lib/async_hooks.js#L243',
    'asyncResource.bind': 'https://github.com/nodejs/node/blob/HEAD/lib/async_hooks.js#L275',
...
    'server.address': 'https://github.com/nodejs/node/blob/HEAD/lib/net.js#L2680',
+   'server.close': 'https://github.com/nodejs/node/blob/HEAD/lib/_http_server.js#L674',
+   'server.closeAllConnections': 'https://github.com/nodejs/node/blob/HEAD/lib/_http_server.js#L684',
+   'server.closeIdleConnections': 'https://github.com/nodejs/node/blob/HEAD/lib/_http_server.js#L696',
-   'server.close': 'https://github.com/nodejs/node/blob/HEAD/lib/net.js#L2813',
-   'server.closeAllConnections': 'https://github.com/nodejs/node/blob/HEAD/lib/https.js#L124',
-   'server.closeIdleConnections': 'https://github.com/nodejs/node/blob/HEAD/lib/https.js#L126',
    'server.getConnections': 'https://github.com/nodejs/node/blob/HEAD/lib/net.js#L2775',
    'server.listen': 'https://github.com/nodejs/node/blob/HEAD/lib/net.js#L2477',
    'server.ref': 'https://github.com/nodejs/node/blob/HEAD/lib/net.js#L2926',
+   'server.setTimeout': 'https://github.com/nodejs/node/blob/HEAD/lib/_http_server.js#L712',
-   'server.setTimeout': 'https://github.com/nodejs/node/blob/HEAD/lib/https.js#L128',
    'server.unref': 'https://github.com/nodejs/node/blob/HEAD/lib/net.js#L2935',
+   'server[SymbolAsyncDispose]': 'https://github.com/nodejs/node/blob/HEAD/lib/_http_server.js#L680',
-   'server[SymbolAsyncDispose]': 'https://github.com/nodejs/node/blob/HEAD/lib/net.js#L2853',
    'server[SymbolAsyncIterator]': 'https://github.com/nodejs/node/blob/HEAD/lib/net.js#L2860',
    'server[kDeserialize]': 'https://github.com/nodejs/node/blob/HEAD/lib/net.js#L2398',
    'server[kTransferList]': 'https://github.com/nodejs/node/blob/HEAD/lib/net.js#L2371',
    'server[kTransfer]': 'https://github.com/nodejs/node/blob/HEAD/lib/net.js#L2376',
+   'server[undefined]': 'https://github.com/nodejs/node/blob/HEAD/lib/_http_server.js#L719',
-   'server[undefined]': 'https://github.com/nodejs/node/blob/HEAD/lib/net.js#L2890',
    'serverresponse._finish': 'https://github.com/nodejs/node/blob/HEAD/lib/_http_server.js#L249',
    'serverresponse._implicitHeader': 'https://github.com/nodejs/node/blob/HEAD/lib/_http_server.js#L406',
    'serverresponse.assignSocket': 'https://github.com/nodejs/node/blob/HEAD/lib/_http_server.js#L299',
    'serverresponse.detachSocket': 'https://github.com/nodejs/node/blob/HEAD/lib/_http_server.js#L310',
    'serverresponse.statusCode': 'https://github.com/nodejs/node/blob/HEAD/lib/_http_server.js#L272',

Performance estimate (single CI run)

  • Generation time: 8.2% faster (1.47 s → 1.35 s)
  • Peak memory: 2.6% higher (345.25 MB → 354.19 MB)

legacy-html Generator

Performance estimate (single CI run)

  • Generation time: 6.9% faster (20.47 s → 19.05 s)
  • Peak memory: 8.6% lower (2.32 GB → 2.12 GB)

legacy-json Generator

Performance estimate (single CI run)

  • Generation time: 3.1% slower (9.14 s → 9.42 s)
  • Peak memory: 2.5% lower (1.74 GB → 1.69 GB)

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.

3 participants