Skip to content

refactor(node): extract @node-core/doc-kit package, move core to @nodejs/doc-kit - #961

Merged
avivkeller merged 1 commit into
refactor/legacy-kittenfrom
refactor/node-kitten
Aug 4, 2026
Merged

refactor(node): extract @node-core/doc-kit package, move core to @nodejs/doc-kit#961
avivkeller merged 1 commit into
refactor/legacy-kittenfrom
refactor/node-kitten

Conversation

@avivkeller

@avivkeller avivkeller commented Jul 30, 2026

Copy link
Copy Markdown
Member

The remaining Node.js-specific generators (api-links, addon-verify, and man-page) move into packages/node, and the npm names are re-arranged to match the new layout:

Package npm name Version
packages/core (engine + CLI) @nodejs/doc-kit (previously @node-core/doc-kit) 1.0.0
packages/node (this PR) @node-core/doc-kit 2.0.0

@node-core/doc-kit keeps its npm name because these generators are specific to Node.js core, and the major bump signals the restructuring to existing consumers: v2 contains only the Node.js-specific generators, while the engine and CLI now live in @nodejs/doc-kit.

@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 4, 2026 3:16pm

Request Review

Copilot AI lite review requested due to automatic review settings July 30, 2026 21:30

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.

@codecov

codecov Bot commented Jul 30, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.36957% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.63%. Comparing base (7471891) to head (6bf6bd3).

Files with missing lines Patch % Lines
packages/react/src/jsx-ast/utils/remark.mjs 33.33% 2 Missing ⚠️
packages/core/bin/cli.mjs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@                    Coverage Diff                     @@
##           refactor/legacy-kitten     #961      +/-   ##
==========================================================
- Coverage                   89.64%   89.63%   -0.01%     
==========================================================
  Files                         200      200              
  Lines                       18495    18501       +6     
  Branches                     1729     1729              
==========================================================
+ Hits                        16579    16584       +5     
- Misses                       1909     1910       +1     
  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.

@avivkeller
avivkeller marked this pull request as ready for review July 30, 2026 21:34
@avivkeller
avivkeller requested a review from a team as a code owner July 30, 2026 21:34
@cursor

cursor Bot commented Jul 30, 2026

Copy link
Copy Markdown

PR Summary

High Risk
Major package rename and generator relocation break import paths and npm install graphs for anyone still on @node-core/doc-kit as the engine; consumers must install @nodejs/doc-kit plus optional @node-core/doc-kit for Node targets.

Overview
This PR restructures npm packages so the doc-kit engine and CLI ship as @nodejs/doc-kit (packages/core), while Node.js–specific generators live in @node-core/doc-kit (packages/node).

api-links, addon-verify, and man-page are moved out of core into packages/node; their subpath exports are removed from @nodejs/doc-kit. The CLI shorthand names (man-page, addon-verify, api-links) still resolve via publicGenerators to @node-core/doc-kit/*. Core lists @node-core/doc-kit as an optional peer so installs that only need the engine are not forced to pull Node generators.

Legacy and React generator packages now depend on @nodejs/doc-kit instead of @node-core/doc-kit for configuration, remark utilities, and metadata types. Changesets, CONTRIBUTING/README/docs, publish Slack text, and getting-started install lines are updated for the new names. estree-util-visit moves with the Node package; addon-verify test expectations note the nodejs/node test/addons helper path.

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

Comment thread packages/node/src/addon-verify/utils/generateFileList.mjs Outdated
Comment thread packages/core/src/generators/index.mjs Outdated
@AugustinMauroy

Copy link
Copy Markdown
Member

why doc-kittens instead of doc-kit?

@avivkeller

Copy link
Copy Markdown
Member Author

why doc-kittens instead of doc-kit?

doc-kit is taken, and we can't claim it since we don't own a trademark for the term

@bmuenzenmeyer

bmuenzenmeyer commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

why doc-kittens instead of doc-kit?

doc-kit is taken, and we can't claim it since we don't own a trademark for the term

Is the goal to move away from @node-core scope to communicate its general availability? Cause I don't know if that's worth it. I don't recall if all of this was discussed earlier, or if consensus was reached. Apologies for missing it

edit: #343 was the voted name. I understand the dynamics of the scope and ownership...

edit:

I'd prefer

- `@node-core/doc-kit-legacy` (`legacy-*`)
- `@node-core/doc-kit-react` (`orama-db`, `web` TBR `react-html`, `jsx-ast`)
- `@node-core/doc-kit-web` (`sitemap`, `llms-txt`)
- `@node-core/doc-kit-internal` (`ast-*`, `metadata`)
- `@node-core/doc-kit-extras` (Everything else)

Is this open for revisiting.

@avivkeller

Copy link
Copy Markdown
Member Author

Is the goal to move away from @node-core scope to communicate its general availability

The goal is to put generators in their own scope to avoid cluttering the core scope.

@bmuenzenmeyer

Copy link
Copy Markdown
Contributor

is there such a thing as cluttering? you cannot really see all packages in a scope - i can see them at https://npmx.dev/org/node-core but couldnt figure out an npmjs way to do this. adding a new scope increases our support footprint...

what about @nodejs per nodejs/TSC#1178 and https://github.com/nodejs/admin/blob/main/package-namespace-migration.md

@avivkeller

Copy link
Copy Markdown
Member Author

is there such a thing as cluttering? you cannot really see all packages in a scope - i can see them at npmx.dev/org/node-core but couldnt figure out an npmjs way to do this. adding a new scope increases our support footprint...

https://www.npmjs.com/org/node-core

what about @nodejs per nodejs/TSC#1178 and nodejs/admin@main/package-namespace-migration.md

Sounds good to me, just need to name the packages something like doc-kit-web, etc

@ovflowd

ovflowd commented Aug 1, 2026

Copy link
Copy Markdown
Member

And finally, the remaining Node.js-specific generators are now in @doc-kittens/node

I wonder if people could mistake this as being @doc-kittens repackage FOR nodejs, instead of specific TO nodejs. I feel these should be actually under @node-core/doc-kittens or something @node-core as it is Node.js's specific and not for outer world usage, wdyt?

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.

🟡 Not ready to approve

There are multiple concrete breakages/inconsistencies (missing @doc-kittens/node package manifest/exports, a runtime-invalid require() target, and an extractExports logic bug) that must be addressed before this can safely ship.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.

Review details

Suppressed comments (3)

packages/node/src/addon-verify/utils/generateFileList.mjs:12

  • @node-core/doc-kit/generators/common does not exist in this repo's @node-core/doc-kit package exports (there is no packages/core/src/generators/common), so generated test.js files will fail at runtime when required. Revert to the original relative Node.js test harness import (or introduce and export a real replacement module).
    README.md:101
  • The redesigned docs example now uses -t html, but the preceding sentence still says to use the web generator; this is confusing given the new html target name (with web being an alias). Update the text to match the command shown.
  -t html \

.changeset/node-kitten-package.md:3

  • This changeset marks @node-core/doc-kit as a minor bump, but this PR removes previously exported subpaths like @node-core/doc-kit/man-page, @node-core/doc-kit/api-links, and @node-core/doc-kit/addon-verify from packages/core/package.json, which is a breaking change for consumers. Either keep compatibility exports/re-exports, or bump @node-core/doc-kit to a major release.
'@doc-kittens/node': major
'@node-core/doc-kit': minor
---
  • Files reviewed: 13/40 changed files
  • Comments generated: 1
  • Review effort level: Lite

We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.

Comment thread packages/core/src/generators/index.mjs Outdated

@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 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

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 59787df. Configure here.

Comment thread eslint.config.mjs
Copilot AI review requested due to automatic review settings August 3, 2026 17:01
@avivkeller
avivkeller force-pushed the refactor/node-kitten branch from 59787df to 97cce4e Compare August 3, 2026 17:01

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.

@avivkeller avivkeller changed the title refactor(node): extract @doc-kittens/node package refactor(node): extract @node-core/doc-kit-generators package Aug 3, 2026
Copilot AI review requested due to automatic review settings August 4, 2026 02:43
@avivkeller
avivkeller force-pushed the refactor/node-kitten branch from 97cce4e to 15ba0be Compare August 4, 2026 02:43

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.

@avivkeller avivkeller changed the title refactor(node): extract @node-core/doc-kit-generators package refactor(node): extract @node-core/doc-kit package, move core to @nodejs/doc-kit Aug 4, 2026

@bmuenzenmeyer bmuenzenmeyer 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.

Approving the stack so we can test and iterate

Copilot AI review requested due to automatic review settings August 4, 2026 15:15
@avivkeller
avivkeller force-pushed the refactor/node-kitten branch from 15ba0be to 6bf6bd3 Compare August 4, 2026 15:15

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.

@avivkeller
avivkeller merged commit c334823 into main Aug 4, 2026
16 of 18 checks passed
@avivkeller
avivkeller deleted the refactor/node-kitten branch August 4, 2026 15:17
@github-actions github-actions Bot mentioned this pull request Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants