Skip to content

API Documentation, Public Type Annotations and Workflow Updates#29

Merged
mehmet-kozan merged 4 commits intomainfrom
development
Oct 18, 2025
Merged

API Documentation, Public Type Annotations and Workflow Updates#29
mehmet-kozan merged 4 commits intomainfrom
development

Conversation

@mehmet-kozan
Copy link
Copy Markdown
Owner

This pull request introduces improvements across workflow configuration, API documentation, and exception handling. The most significant changes include enhanced public API documentation for core types and exceptions, more robust and descriptive error classes, and updates to GitHub Actions workflows for better caching and triggering. These updates improve maintainability, developer experience, and the clarity of the public API.

API Documentation and Public Type Annotations

  • Added @public JSDoc annotations to all major exception classes, result containers, and type definitions in src/Exception.ts, src/ImageResult.ts, src/InfoResult.ts, and src/PDFParse.ts, ensuring clear documentation and public visibility for consumers. (F9dc440bL3R3, [1] [2] [3]
  • Updated docs/README.api.md to reflect new public annotations, improving the generated API reference for all exported classes and interfaces. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]

Exception Handling Improvements

  • Rewrote all exception classes in src/Exception.ts with detailed JSDoc comments, constructor documentation, and improved error messaging, making error handling more robust and developer-friendly. (F9dc440bL3R3, [1] [2] [3] [4] [5] [6]
  • Enhanced the getException utility to normalize thrown values and preserve type information, improving error mapping and diagnostics.

GitHub Actions Workflow Updates

  • Improved caching and dependency management in .github/workflows/test.yml, switching to lts/* Node.js, enabling npm caching, and optimizing install commands for faster and more reliable CI runs.
  • Refined workflow triggers for test and deployment workflows to better match release and branch policies, and added explicit empty objects for workflow_dispatch where needed. [1] [2] [3] [4]

Tooling and Configuration

  • Updated api-extractor.json to include forgotten exports and adjust report folder location, ensuring the API extractor outputs more complete documentation. [1] [2] [3]
  • Added tsdoc-metadata.json association to .vscode/settings.json for improved editor support for JSONC files.

Minor Documentation and Typo Fixes

  • Improved parameter documentation in PDFParse constructor for clarity and consistency.
  • Fixed HTML entity encoding in JSDoc comments for types.

Let me know if you want to discuss any specific part of these changes in more detail!

Renamed several workflow files for backup purposes. Updated triggers for test, integration, and unsupported test workflows to run on push to main, pull requests, and workflow_dispatch. Enabled package-manager cache in test workflow and commented out NPM cache cleaning step.
Added climate-change.pdf and climate.pdf to reports/pdf. Updated test cases in large-file.test.ts and url.test.ts to use local GitHub Pages PDF assets instead of external URLs for more reliable and consistent testing. Added @public JSDoc annotations to exception classes in src/Exception.ts for improved documentation. Minor workflow improvements in test.yml for Node.js setup and npm install.
Added and refined JSDoc @public annotations and documentation for exported classes, interfaces, and types across core modules. This improves API clarity and TypeScript documentation, making public API surfaces explicit for consumers.
Associate tsdoc-metadata.json with JSONC in VS Code settings. Enable 'includeForgottenExports' and update reportFolder in api-extractor.json for improved API documentation output.
@mehmet-kozan mehmet-kozan self-assigned this Oct 18, 2025
@mehmet-kozan mehmet-kozan added documentation Improvements or additions to documentation ci labels Oct 18, 2025
@mehmet-kozan mehmet-kozan merged commit dd1c603 into main Oct 18, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant