Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
88fbfce
update deps
gcanti Mar 2, 2025
e2e3a22
Replace vitest assert with node:assert/strict in test files
gcanti Mar 2, 2025
772b81a
Simplify generator function syntax in Configuration test
gcanti Mar 2, 2025
2a94457
Remove fences from Example type and update related parsing and genera…
gcanti Mar 2, 2025
92393ab
Support enhanced code block parsing with metadata and titles
gcanti Mar 2, 2025
b41ac33
Remove unnecessary assert import handling in Core module
gcanti Mar 2, 2025
1406b4c
Change "Added in" to "Since" in Markdown generation
gcanti Mar 2, 2025
67bdc07
Reorder signature and example sections in Markdown generation
gcanti Mar 2, 2025
7a65f05
Remove redundant "Example" header in Markdown generation
gcanti Mar 2, 2025
a17fdc0
add changeset
gcanti Mar 2, 2025
86bd4ff
Update Node.js version and GitHub Pages deployment action
gcanti Mar 2, 2025
a7ccb17
Upgrade GitHub Pages artifact upload action to v3
gcanti Mar 2, 2025
cef8400
add snapshot
gcanti Mar 2, 2025
a32e68e
remove Core.replaceProjectName
gcanti Mar 3, 2025
2968116
runExamples is not false by default
gcanti Mar 3, 2025
4eec353
Extract examples from descriptions
gcanti Mar 3, 2025
bad2b0a
Add support for @throws tag in documentation generation
gcanti Mar 3, 2025
c73aeb2
Enhance code block filtering
gcanti Mar 3, 2025
91774a9
Refactor Domain module to use class-based implementation
gcanti Mar 3, 2025
d184b93
Remove File module and integrate File class into Domain module
gcanti Mar 3, 2025
d47a928
Move DocgenError from Error module to Domain module
gcanti Mar 3, 2025
aabd16c
Integrate Process service into Domain module
gcanti Mar 3, 2025
2ccab42
Add documentation category and version tag to CLI export
gcanti Mar 3, 2025
cb823e9
Rename Markdown module to Printer and update related imports
gcanti Mar 3, 2025
3e08a6c
Remove Option usage in Domain
gcanti Mar 3, 2025
78d752d
refactor Printer module
gcanti Mar 7, 2025
2221434
Remove NamedDoc class and update Domain model constructors
gcanti Mar 7, 2025
e573f3f
Refactor Printer module with generic model printing function
gcanti Mar 7, 2025
87ec9d3
Remove Prettier dependency and simplify markdown generation
gcanti Mar 7, 2025
eb0304e
Add Prettier for markdown formatting in Printer module
gcanti Mar 7, 2025
8402dc6
Refactor test utilities and simplify source file handling
gcanti Mar 7, 2025
83c14b5
Refactor markdown generation with improved TOC and front matter handling
gcanti Mar 7, 2025
0599be5
Update dependencies to latest versions
gcanti Mar 7, 2025
2c51807
Add support for @see JSDoc tag in function documentation
gcanti Mar 7, 2025
6966660
Refactor Domain and Parser modules to simplify documentation handling
gcanti Mar 7, 2025
b1554aa
Update documentation module navigation order and remove sorting logic
gcanti Mar 7, 2025
7293550
Add function position tracking and @since tag validation
gcanti Mar 8, 2025
ee0650f
Refactor signature generation and type parsing in Parser module
gcanti Mar 8, 2025
ad3ac6a
Refactor signature handling in Domain and Parser modules
gcanti Mar 8, 2025
72626ac
Refactor Printer module visibility and add front matter documentation
gcanti Mar 8, 2025
abf0c8f
Add source link generation for documentation modules
gcanti Mar 8, 2025
3a451b7
Add configurable source link generation for documentation
gcanti Mar 8, 2025
073cbb9
Refactor Domain module to introduce DocEntry base class
gcanti Mar 8, 2025
97b9f15
update changeset
gcanti Mar 8, 2025
28b1f91
Refactor test source file generation to use consistent filename
gcanti Mar 9, 2025
1fa54d5
Implement comprehensive module checking with configurable validation …
gcanti Mar 9, 2025
bdf507c
fix tests
gcanti Mar 9, 2025
ecfa840
Add theme-specific code block metadata handling
gcanti Mar 9, 2025
1e3501b
Enhance error handling in CLI with domain-specific DocgenError
gcanti Mar 10, 2025
8c59566
Refactor Checker module to improve namespace and test error handling
gcanti Mar 10, 2025
73a3af8
chore
gcanti Mar 10, 2025
57ff897
Add support for generating examples for module exports
gcanti Mar 10, 2025
d2e4320
chore: add doc generation for AI
tim-smart Jun 15, 2023
863c0a7
add sourceUrl to json
tim-smart Mar 13, 2025
d80b45c
improve context for ai files
tim-smart Mar 13, 2025
ad4f2b9
add exports to getModulePrintables
tim-smart May 27, 2025
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
9 changes: 9 additions & 0 deletions .changeset/silly-insects-draw.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"@effect/docgen": minor
---

- **Extracts examples from descriptions** – This can be disabled using `skip-type-checking` metadata on fenced code blocks. `@example` tags still work, but we may remove them in the future.
- **Supports the `@throws` JSDoc tag** – Properly documents possible errors.
- **Basic support for the `@see` JSDoc tag** – Displays only the API name and description.
- **Adds GitHub source links** – Provides direct access to the corresponding source code.
- **Repositions signatures** – Now moved further down, just before the source link and `@since` tag, for better readability.
80 changes: 0 additions & 80 deletions .eslintrc.cjs

This file was deleted.

2 changes: 1 addition & 1 deletion .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ inputs:
node-version:
description: The version of Node.js to install
required: true
default: 20.16.0
default: 23.7.0

runs:
using: composite
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
destination: ./_site
- name: Upload pages artifact
if: github.repository_owner == 'Effect-Ts' && github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: actions/upload-pages-artifact@v2
uses: actions/upload-pages-artifact@v3

deploy:
if: github.repository_owner == 'Effect-Ts' && github.event_name == 'push' && github.ref == 'refs/heads/main'
Expand All @@ -48,4 +48,4 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
uses: actions/deploy-pages@v4
23 changes: 23 additions & 0 deletions .github/workflows/snapshot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Snapshot
on:
pull_request:
branches: [main]
workflow_dispatch:

permissions: {}

jobs:
snapshot:
name: Snapshot
if: github.repository_owner == 'Effect-Ts'
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- name: Install dependencies
uses: ./.github/actions/setup
- name: Build package
run: pnpm build
- name: Create snapshot
id: snapshot
run: pnpx [email protected] publish --pnpm --comment=off
17 changes: 13 additions & 4 deletions docgen.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,18 @@
"exactOptionalPropertyTypes": true,
"moduleResolution": "Bundler",
"target": "ES2022",
"lib": [
"ES2022",
"DOM"
]
"lib": ["ES2022", "DOM"]
},
"examplesCompilerOptions": {
"noEmit": true,
"strict": true,
"skipLibCheck": true,
"exactOptionalPropertyTypes": true,
"moduleResolution": "Bundler",
"target": "ES2022",
"lib": ["ES2022", "DOM"],
"paths": {
"@effect/docgen": ["../../src/index.js"]
}
}
}
31 changes: 27 additions & 4 deletions docs/modules/CLI.ts.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,38 @@
---
title: CLI.ts
nav_order: 1
nav_order: 2
parent: Modules
---

## CLI overview
## CLI.ts overview

Added in v1.0.0
Since v0.6.0

---

<h2 class="text-delta">Table of contents</h2>
## Exports Grouped by Category

- [CLI](#cli)
- [cli](#cli-1)

---

# CLI

## cli

**Signature**

```ts
declare const cli: (
args: ReadonlyArray<string>
) => Effect.Effect<
void,
ValidationError.ValidationError | Domain.DocgenError | PlatformError,
Domain.Process | CommandExecutor | CliApp.Environment
>
```

[Source](https://github.com/effect-ts/docgen/blob/main/src/CLI.ts#L214)

Since v0.6.0
152 changes: 152 additions & 0 deletions docs/modules/Checker.ts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
---
title: Checker.ts
nav_order: 1
parent: Modules
---

## Checker.ts overview

Since v0.6.0

---

## Exports Grouped by Category

- [utils](#utils)
- [checkClasses](#checkclasses)
- [checkConstants](#checkconstants)
- [checkExports](#checkexports)
- [checkFunctions](#checkfunctions)
- [checkInterfaces](#checkinterfaces)
- [checkModule](#checkmodule)
- [checkModules](#checkmodules)
- [checkNamespaces](#checknamespaces)
- [checkTypeAliases](#checktypealiases)

---

# utils

## checkClasses

**Signature**

```ts
declare const checkClasses: (
models: ReadonlyArray<Domain.Class>
) => Effect.Effect<Array<string>, never, Configuration.Configuration | Parser.Source>
```

[Source](https://github.com/effect-ts/docgen/blob/main/src/Checker.ts#L112)

Since v0.6.0

## checkConstants

**Signature**

```ts
declare const checkConstants: (
models: ReadonlyArray<Domain.Constant>
) => Effect.Effect<Array<string>, never, Configuration.Configuration | Parser.Source>
```

[Source](https://github.com/effect-ts/docgen/blob/main/src/Checker.ts#L125)

Since v0.6.0

## checkExports

**Signature**

```ts
declare const checkExports: (
models: ReadonlyArray<Domain.Export>
) => Effect.Effect<Array<string>, never, Configuration.Configuration | Parser.Source>
```

[Source](https://github.com/effect-ts/docgen/blob/main/src/Checker.ts#L185)

Since v0.6.0

## checkFunctions

**Signature**

```ts
declare const checkFunctions: (
models: ReadonlyArray<Domain.Function>
) => Effect.Effect<Array<string>, never, Configuration.Configuration | Parser.Source>
```

[Source](https://github.com/effect-ts/docgen/blob/main/src/Checker.ts#L87)

Since v0.6.0

## checkInterfaces

**Signature**

```ts
declare const checkInterfaces: (
models: ReadonlyArray<Domain.Interface>
) => Effect.Effect<Array<string>, never, Configuration.Configuration | Parser.Source>
```

[Source](https://github.com/effect-ts/docgen/blob/main/src/Checker.ts#L138)

Since v0.6.0

## checkModule

**Signature**

```ts
declare const checkModule: (module: Domain.Module) => Effect.Effect<Array<string>, never, Configuration.Configuration>
```

[Source](https://github.com/effect-ts/docgen/blob/main/src/Checker.ts#L192)

Since v0.6.0

## checkModules

**Signature**

```ts
declare const checkModules: (
modules: ReadonlyArray<Domain.Module>
) => Effect.Effect<Array<string>, never, Configuration.Configuration>
```

[Source](https://github.com/effect-ts/docgen/blob/main/src/Checker.ts#L216)

Since v0.6.0

## checkNamespaces

**Signature**

```ts
declare const checkNamespaces: (
models: ReadonlyArray<Domain.Namespace>
) => Effect.Effect<Array<string>, never, Configuration.Configuration | Parser.Source>
```

[Source](https://github.com/effect-ts/docgen/blob/main/src/Checker.ts#L172)

Since v0.6.0

## checkTypeAliases

**Signature**

```ts
declare const checkTypeAliases: (
models: ReadonlyArray<Domain.TypeAlias>
) => Effect.Effect<Array<string>, never, Configuration.Configuration | Parser.Source>
```

[Source](https://github.com/effect-ts/docgen/blob/main/src/Checker.ts#L151)

Since v0.6.0
Loading
Loading