Skip to content

Conversation

gcanti
Copy link
Contributor

@gcanti gcanti commented Mar 2, 2025

  • 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.

Copy link

changeset-bot bot commented Mar 2, 2025

🦋 Changeset detected

Latest commit: 49e99a2

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@effect/docgen Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

gcanti added 13 commits March 7, 2025 12:00
- Remove `Example` class and use direct string arrays for examples
- Modify `Doc` class to use arrays for tags like `since`, `deprecated`, `category`
- Update parsing logic to handle multiple tags and remove error-throwing validation
- Simplify function and class parsing by removing redundant error checks
- Remove chalk dependency and related error formatting
- Modify `getDoc` function to return a more flexible `Doc` instance
- Adjust nav_order for documentation modules to maintain correct sequence
- Remove sorting logic from Parser and Printer modules
- Simplify module parsing and printing by removing redundant sorting operations
- Update test cases to remove sorting-related expectations
- Introduce `Position` interface in Domain module to track function source locations
- Update Function constructor to include position information
- Implement function position tracking in Parser module
- Add @SInCE tag validation in Checker module using Babel code frame
- Modify documentation generation to use new position and filename tracking
- Update tests to validate new @SInCE tag checking functionality
- Update type parsing to use more comprehensive type extraction
- Modify function and constant signatures to use `declare const` format
- Remove `stripImportTypes` utility function
- Improve type signature generation for functions, type aliases, and constants
- Update test cases to reflect new signature generation approach
- Change `signatures` property to single `signature` in Function, Method, and related classes
- Update signature generation to use `declare const` format with type information
- Simplify signature printing and parsing logic
- Modify documentation generation to use new signature approach
- Update test cases to reflect new signature format
- Move internal printing functions to module-level scope
- Add documentation for `printFrontMatter` function
- Update documentation to reflect function visibility changes
- Implement source link generation for functions, classes, and other printable entities
- Update Printer module to dynamically generate GitHub source links
- Modify Domain and Parser modules to support source position tracking
- Refactor printing functions to use Effect for source link generation
- Update test cases to validate new source link functionality
- Introduce `srcLink` configuration option in schema and configuration
- Update CLI, Configuration, and Printer modules to support custom source links
- Implement fallback source link generation using project homepage
- Modify test cases to validate new source link configuration
gcanti and others added 14 commits March 8, 2025 18:57
- Create a new `DocEntry` base class to consolidate common properties across documentation entities
- Modify existing classes (Class, Interface, Function, etc.) to extend `DocEntry`
- Update constructors to include position information consistently
- Simplify inheritance and reduce code duplication in Domain module
- Ensure backward compatibility with existing documentation generation logic
- Add `makeSourcefile` utility function to handle source file creation and reuse
- Update `makeSource` to use new utility function for consistent file naming
- Modify test cases to use `test.ts` as the base filename
- Simplify source file management in test parser
…rules

- Add detailed module checking functionality in Checker module
- Implement validation for functions, classes, constants, interfaces, type aliases, namespaces, and exports
- Introduce configurable checks for descriptions, examples, and @SInCE tags
- Update Core module to run module checks before documentation generation
- Modify Domain module to remove redundant @SInCE tag annotations
- Enhance error reporting with precise source location information
- Introduce `DEFAULT_THEME` constant in Configuration module
- Create `removeFenceMetadata` function to strip code block metadata for default theme
- Update `printOptionalDescription` to conditionally remove code block metadata
- Modify CLI and Configuration to use `DEFAULT_THEME`
- Add test case for code block metadata removal
- Update documentation generation to handle theme-specific code block rendering
- Update CLI to catch and transform DocgenError with project-specific context
- Modify error handling to include project name in error message
- Import Domain module to use DocgenError type
- Refactor error propagation in docgen command handler
- Update `checkNamespace` function to recursively check interfaces, type aliases, and nested namespaces
- Modify test cases to use consistent file naming and improve error message formatting
- Remove unused imports and test utilities
- Enhance error reporting for namespaces, exports, and classes
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.

2 participants