
Security News
New React Server Components Vulnerabilities: DoS and Source Code Exposure
New DoS and source code exposure bugs in React Server Components and Next.js: what’s affected and how to update safely.
@electron/docs-parser
Advanced tools
Generate a structured JSON API file from Electron's free-form documentation
yarn global add @electron/docs-parser
cd ~/projects/path/to/electron/repo
electron-docs-parser --dir ./
# You now have ./electron-api.json with the entire Electron API
Options:
--useReadme - Assume all documentation is in the module's base README.md file--dir - The base directory where documentation is located.
/docs/api within the specified base directory./docs/api/structures within the specified base directory.--packageMode - Can be single or multi; default single. Specifying multi allows exporting multiple packages from an API instead of multiple modules from a single package.We generate a markdown AST for every documentation file and search for "Modules", "Classes" and "Structures". We then use the well documented and enforced Electron docs style guide to pull the required information about methods, properties and events from the generated AST.
For more information you should start your code dive in
DocsParser.ts and then probably
block-parsers.ts.
The output of this module is used to generate TypeScript definitions for the Electron API. This module itself is not used to generate those definitions - @electron/typescript-definitions is.
Further, if you're looking for tooling that automatically surfaces typings in GitHub PRs, you're probably looking for Archaeologist.
MIT
FAQs
Parse Electron documentation into a machine readable JSON file
We found that @electron/docs-parser demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
New DoS and source code exposure bugs in React Server Components and Next.js: what’s affected and how to update safely.

Security News
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.

Security News
GitHub has revoked npm classic tokens for publishing; maintainers must migrate, but OpenJS warns OIDC trusted publishing still has risky gaps for critical projects.