Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .changeset/configurable-navigation.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'@nodejs/doc-kit': patch
'@doc-kit/core': patch
---

Add `web.navigation`, which supplies the sidebar groups (`navigation.sidebar`)
Expand Down
2 changes: 1 addition & 1 deletion .changeset/curvy-items-smile.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'@nodejs/doc-kit': minor
'@doc-kit/core': minor
---

Discover and load configuration files with `cosmiconfig`.
2 changes: 1 addition & 1 deletion .changeset/did-you-know-that-the-world-is-round.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'@nodejs/doc-kit': patch
'@doc-kit/core': patch
---

Close Orama search when the target link is on the same page
2 changes: 1 addition & 1 deletion .changeset/display-name-type-unions.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'@nodejs/doc-kit': patch
'@doc-kit/core': patch
---

Resolve unions and arrays of display-name types (`{HTTP/2 Headers Object | vm.Module}`, `{HTTP/2 Headers Object[]}`), and stop capturing prose such as `U+007B ({), and U+007D (}).` as a type annotation.
12 changes: 7 additions & 5 deletions .changeset/doc-kit-scope-move.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
---
'@nodejs/doc-kit': major
'@doc-kit/core': major
'@doc-kit/cli': major
---

The doc-kit engine and CLI, previously published as `@node-core/doc-kit`,
are now published as `@nodejs/doc-kit`. The `@node-core/doc-kit` name now
contains only the Node.js-specific generators (`api-links`, `addon-verify`,
and `man-page`).
The doc-kit engine and CLI, previously published together as
`@node-core/doc-kit`, are now published as two packages: `@doc-kit/core`
(the engine) and `@doc-kit/cli` (the `doc-kit` command-line interface).
The `@node-core/doc-kit` name now contains only the Node.js-specific
generators (`api-links`, `addon-verify`, and `man-page`).
2 changes: 1 addition & 1 deletion .changeset/fix-relative-parent-path.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'@nodejs/doc-kit': patch
'@doc-kit/core': patch
---

Fix `relative()` URL resolution when the target path is a prefix of the current
Expand Down
10 changes: 5 additions & 5 deletions .changeset/legacy-kitten-package.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
'@nodejs/doc-kit-generator-legacy': major
'@nodejs/doc-kit': major
'@doc-kit/generator-legacy': major
'@doc-kit/core': major
---

The legacy-format generators (`legacy-html`, `legacy-html-all`,
`legacy-json`, and `legacy-json-all`) now live in the new
`@nodejs/doc-kit-generator-legacy` package and are loaded via import specifiers such
as `@nodejs/doc-kit-generator-legacy/legacy-html`. The corresponding
`@nodejs/doc-kit/*` package exports have been removed. The CLI shorthand
`@doc-kit/generator-legacy` package and are loaded via import specifiers such
as `@doc-kit/generator-legacy/legacy-html`. The corresponding
`@doc-kit/core/*` package exports have been removed. The CLI shorthand
names are unchanged.
2 changes: 1 addition & 1 deletion .changeset/monorepo-layout.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'@nodejs/doc-kit': patch
'@doc-kit/core': patch
---

Moved the package into a `packages/core` workspace.
2 changes: 1 addition & 1 deletion .changeset/node-kitten-package.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
'@node-core/doc-kit': major
'@nodejs/doc-kit': major
'@doc-kit/core': major
---

The Node.js-specific generators (`api-links`, `addon-verify`, and
Expand Down
2 changes: 1 addition & 1 deletion .changeset/opt-out-banners.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'@nodejs/doc-kit': minor
'@doc-kit/core': minor
---

Add banner opt-out
4 changes: 2 additions & 2 deletions .changeset/plain-defaults.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
'@nodejs/doc-kit': patch
'@nodejs/doc-kit-generator-react': minor
'@doc-kit/core': patch
'@doc-kit/generator-react': minor
---

Defaults are now project-neutral instead of Node.js-specific
8 changes: 4 additions & 4 deletions .changeset/react-kitten-package.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
'@nodejs/doc-kit-generator-react': minor
'@nodejs/doc-kit': major
'@doc-kit/generator-react': minor
'@doc-kit/core': major
---

The React/JSX-based generators (`html` — previously `web` —, `jsx-ast`,
`llms-txt`, `sitemap`, and `orama-db`) now live in the new
`@nodejs/doc-kit-generator-react` package and are loaded via import specifiers such as
`@nodejs/doc-kit-generator-react/html`. The corresponding `@nodejs/doc-kit/*`
`@doc-kit/generator-react` package and are loaded via import specifiers such as
`@doc-kit/generator-react/html`. The corresponding `@doc-kit/core/*`
package exports have been removed. The `web` generator is renamed to `html`:
the CLI shorthand `web` keeps working as a deprecated alias, but the
configuration key is now `html` instead of `web`.
2 changes: 1 addition & 1 deletion .changeset/riscv64-warning-spacing.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'@nodejs/doc-kit': patch
'@doc-kit/core': patch
---

Fix missing spaces in the riscv64 multithreading warning message, which
Expand Down
2 changes: 1 addition & 1 deletion .changeset/short-deprecation-links.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'@nodejs/doc-kit': patch
'@doc-kit/core': patch
---

Use short `DEP` codes for deprecation heading anchors.
2 changes: 1 addition & 1 deletion .changeset/spaced-union-types.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'@nodejs/doc-kit': patch
'@doc-kit/core': patch
---

Space union separators in type annotation values (`{string|URL}` is now rendered as `string | URL`).
2 changes: 1 addition & 1 deletion .changeset/specifier-generator-loading.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'@nodejs/doc-kit': minor
'@doc-kit/core': minor
---

Generators are now loaded dynamically by import specifier instead of a static
Expand Down
2 changes: 1 addition & 1 deletion .changeset/swc.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'@nodejs/doc-kit': patch
'@doc-kit/core': patch
---

Switches `oxc-parser` for `@swc/wasm`, since `oxc-parser` does not provide the needed bindings.
2 changes: 1 addition & 1 deletion .changeset/tidy-deprecations-smile.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'@nodejs/doc-kit': patch
'@doc-kit/core': patch
---

Preserve deprecation codes in generated table-of-contents labels.
2 changes: 1 addition & 1 deletion .changeset/tidy-donuts-search.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'@nodejs/doc-kit': patch
'@doc-kit/core': patch
---

Sync the URL hash when following same-page search hits
2 changes: 1 addition & 1 deletion .changeset/vite-web-generator.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'@nodejs/doc-kit': minor
'@doc-kit/core': minor
---

Make the `web` generator bundler-neutral through a custom adapter contract,
Expand Down
2 changes: 1 addition & 1 deletion .changeset/yes-i-did-know-that-thank-you.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'@nodejs/doc-kit': patch
'@doc-kit/core': patch
---

Render markdown `code` snippets in the sidebar
2 changes: 1 addition & 1 deletion .github/workflows/generate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ jobs:
/usr/bin/time \
--output out/benchmark.json \
--format '{"elapsedSeconds": %e, "userCpuSeconds": %U, "systemCpuSeconds": %S, "maxRssKiB": %M}' \
node packages/core/bin/cli.mjs generate \
node packages/cli/bin/cli.mjs generate \
-t ${{ matrix.target }} \
-i "${{ matrix.input }}" \
-o out \
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
SLACK_ICON: https://github.com/nodejs.png?size=48
SLACK_TITLE: ':rocket: doc-kit Packages Published'
SLACK_MESSAGE: |
:package: *Packages*: `nodejs/doc-kit` workspace (<https://www.npmjs.com/package/@nodejs/doc-kit|@nodejs/doc-kit on npm>)
:package: *Packages*: `nodejs/doc-kit` workspace (<https://www.npmjs.com/package/@doc-kit/core|@doc-kit/core on npm>)
:bust_in_silhouette: *Published by*: ${{ github.triggering_actor }}
:octocat: *Commit*: <https://github.com/${{ github.repository }}/commit/${{ github.sha }}|${{ github.sha }}>
SLACK_USERNAME: nodejs-bot
Expand Down
17 changes: 9 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# `@nodejs/doc-kit` Contributing Guide
# `doc-kit` Contributing Guide

Thank you for your interest in contributing to the `@nodejs/doc-kit` project! We welcome contributions from everyone, and we appreciate your help in making this project better.
Thank you for your interest in contributing to the `doc-kit` project! We welcome contributions from everyone, and we appreciate your help in making this project better.

## Table of Contents

Expand Down Expand Up @@ -29,7 +29,7 @@ Thank you for your interest in contributing to the `@nodejs/doc-kit` project! We

## Getting Started

The steps below will give you a general idea of how to prepare your local environment for the `@nodejs/doc-kit` project and general steps for getting things done and landing your contribution.
The steps below will give you a general idea of how to prepare your local environment for the `doc-kit` project and general steps for getting things done and landing your contribution.

### Prerequisites

Expand Down Expand Up @@ -77,10 +77,11 @@ This repository is an npm workspaces monorepo. The root package is private and
holds the shared tooling (linting, formatting, tests, changesets); every
published package lives under `packages/`:

- `packages/core`: [`@nodejs/doc-kit`](packages/core) — the doc-kit engine and CLI
- `packages/legacy`: [`@nodejs/doc-kit-generator-legacy`](packages/legacy) — the legacy-format generators
- `packages/cli`: [`@doc-kit/cli`](packages/cli) — the doc-kit command-line interface
- `packages/core`: [`@doc-kit/core`](packages/core) — the doc-kit engine
- `packages/legacy`: [`@doc-kit/generator-legacy`](packages/legacy) — the legacy-format generators

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

imo @avivkeller this should not be under @doc-kit but under @node-core, since this is only for Node.js

@avivkeller avivkeller Aug 7, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I put them separately merely for easy deprecation. We can easily deprecate the legacy package without deprecating the entire node package, but if you disagree I can move it

- `packages/node`: [`@node-core/doc-kit`](packages/node) — the Node.js-specific generators
- `packages/react`: [`@nodejs/doc-kit-generator-react`](packages/react) — the React/JSX-based generators
- `packages/react`: [`@doc-kit/generator-react`](packages/react) — the React/JSX-based generators

Everything else at the root supports the repo rather than shipping to npm:
`docs/` (the reference docs), `www/` (the documentation site), `scripts/` (build
Expand All @@ -106,7 +107,7 @@ and comparison helpers), and `e2e/` (Playwright tests).
For fast iteration during development, target a single Markdown file instead of all API docs:

```bash
node packages/core/bin/cli.mjs generate \
node packages/cli/bin/cli.mjs generate \
-t legacy-html \
-i ../node/doc/api/fs.md \
-o out \
Expand All @@ -127,7 +128,7 @@ and comparison helpers), and `e2e/` (Playwright tests).
Add `--log-level debug` before the `generate` subcommand to see the full pipeline trace:

```bash
node packages/core/bin/cli.mjs --log-level debug generate -t legacy-html -i ../node/doc/api/fs.md -o out
node packages/cli/bin/cli.mjs --log-level debug generate -t legacy-html -i ../node/doc/api/fs.md -o out
```

> [!TIP]
Expand Down
20 changes: 7 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</p>

<p align="center">
<code>@nodejs/doc-kit</code> is a tool to generate API documentation of Node.js. <a href="https://github.com/nodejs/node/issues/52343">See this issue</a> for more information.
<code>doc-kit</code> is a tool to generate API documentation of Node.js. <a href="https://github.com/nodejs/node/issues/52343">See this issue</a> for more information.
</p>

<p align="center">
Expand All @@ -33,18 +33,12 @@

## Usage

Local invocation:

```sh
$ npx doc-kit --help
```

```sh
$ node packages/core/bin/cli.mjs --help
$ npx @doc-kit/cli --help
```

```
Usage: @nodejs/doc-kit [options] [command]
Usage: doc-kit [options] [command]

CLI tool to generate the Node.js API documentation

Expand All @@ -67,7 +61,7 @@ Running `generate` without the required values exits with an error pointing you
to the help output.

```
Usage: @nodejs/doc-kit generate [options]
Usage: doc-kit generate [options]

Generate API docs

Expand All @@ -78,8 +72,8 @@ Options:
(json-simple, legacy-html, legacy-html-all,
man-page, legacy-json, legacy-json-all,
addon-verify, api-links, orama-db, llms-txt,
sitemap, web) or an import specifier for a custom
generator
sitemap, html) or an import specifier for a
custom generator
--ignore <patterns...> Ignore file patterns (glob)
-o, --output <directory> The output directory
-p, --threads <number> Number of threads to use (minimum: 1)
Expand Down Expand Up @@ -111,7 +105,7 @@ npx doc-kit generate \

### Redesigned

To generate [our redesigned documentation pages](https://nodejs-api-docs-tooling.vercel.app), use the `html` and `orama-db` (for search) generators. These generators live in the separate [`@nodejs/doc-kit-generator-react`](packages/react) package, which must be installed alongside this one.
To generate [our redesigned documentation pages](https://nodejs-api-docs-tooling.vercel.app), use the `html` and `orama-db` (for search) generators. These generators live in the separate [`@doc-kit/generator-react`](packages/react) package, which must be installed alongside this one.

```sh
npx doc-kit generate \
Expand Down
10 changes: 5 additions & 5 deletions docs/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ Each command consists of:

### Step 1: Create the Command File

Create a new file in `packages/core/bin/commands/` with your command name:
Create a new file in `packages/cli/bin/commands/` with your command name:

```javascript
// packages/core/bin/commands/my-command.mjs
import logger from '../../src/logger/index.mjs';
// packages/cli/bin/commands/my-command.mjs
import logger from '@doc-kit/core/logger/index.mjs';

/**
* @type {import('./types').Command}
Expand All @@ -53,7 +53,7 @@ export default {

### Step 2: Register the Command

Add your command to the exports in `packages/core/bin/commands/index.mjs`:
Add your command to the exports in `packages/cli/bin/commands/index.mjs`:

```javascript
import generate from './generate.mjs';
Expand All @@ -67,7 +67,7 @@ export default [

### Step 3: Update CLI Entry Point

The CLI in `packages/core/bin/cli.mjs` automatically loads commands from `packages/core/bin/commands/index.mjs`, so no changes are needed there if you followed step 2.
The CLI in `packages/cli/bin/cli.mjs` automatically loads commands from `packages/cli/bin/commands/index.mjs`, so no changes are needed there if you followed step 2.

## Command Options

Expand Down
2 changes: 1 addition & 1 deletion docs/comparators.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Creating Comparators

This guide explains how to create build comparison scripts for `@nodejs/doc-kit`. Comparators help identify differences between documentation builds, useful for CI/CD and regression testing.
This guide explains how to create build comparison scripts for `@doc-kit/core`. Comparators help identify differences between documentation builds, useful for CI/CD and regression testing.

## Comparator Concepts

Expand Down
Loading
Loading