Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wp-hookdoc Not installable because of Dependency hell #42

Open
carstingaxion opened this issue Oct 3, 2023 · 2 comments
Open

wp-hookdoc Not installable because of Dependency hell #42

carstingaxion opened this issue Oct 3, 2023 · 2 comments
Labels
help wanted Extra attention is needed needs:engineering This requires engineering to resolve. type:enhancement New feature or request.

Comments

@carstingaxion
Copy link

Thank you for sharing this repos code and its ideas! I really appreciate your open-source contributions.


I followed your instrations on how to do this, but was not able to finish the steps due to a vulnerable dependency.

Describe the bug

The console says:

FATAL: Unable to load template: Cannot find module 'taffydb'
Require stack:
- [...]/node_modules/wp-hookdoc/template/publish.js
- [...]/node_modules/jsdoc/cli.js
- [...]/node_modules/jsdoc/jsdoc.js

The taffydb is marked as vulnerable in GHSA-mxhp-79qh-mcx6 why it (propably) was not or can not be installed. Thanks to pure dependency hell, because this is our desired stack.

Steps to Reproduce

  1. Open folder with hookdoc dependencies installed in a terminal and run ...
$ npm run build:docs
  1. See error
$ npm run build:docs

> build:docs
> rm -rf ./docs/dev/hooks && jsdoc -c hookdoc-conf.json plugin.php inc

FATAL: Unable to load template: Cannot find module 'taffydb'
Require stack:
- [...]/node_modules/wp-hookdoc/template/publish.js
- [...]/node_modules/jsdoc/cli.js
- [...]/node_modules/jsdoc/jsdoc.js

Expected behavior

I would love to have my hooks documented.

Additional context

I wrote the little I found at: figuren-theater/ft-admin-ui#17 but I'm unsure this helps.

@carstingaxion carstingaxion changed the title Not installable because of Dependency hell wp-hookdoc Not installable because of Dependency hell Oct 3, 2023
@jeffpaul jeffpaul moved this from Incoming to To Do in Open Source Practice Oct 3, 2023
@faisal-alvi
Copy link
Member

faisal-alvi commented Oct 4, 2023

@carstingaxion Thank you for reaching out.

We are already looking at better alternatives. The following tools have recently undergone testing (and some are still being examined).

1. MK Docs (does not meet our needs)

https://www.mkdocs.org/

Because it does not automatically pick the data from inline coding, MKDocs does not meet our needs.

2. WP Parser (not working with JS files)

https://github.com/WordPress/phpdoc-parser

It appears to only function with PHP code and not the JS code because it parses the inline documentation from PHP files and creates special post type entries in WordPress.

3. WP Hooks Generator (better option so far)

https://github.com/wp-hooks/generator

It seems like (from a quick view) it generates the hooks list from PHP and JS, both types of files, this one appears to be a better choice. It creates a JSON representation of the actions and filters used by WordPress in the code. It is compatible with WordPress core, themes, and plugins. Additionally offers code for using the PHP or JS files' generated hook files.

We'll keep posting new updates here.

@carstingaxion
Copy link
Author

Thank you for reaching out.

Thank you @faisal-alvi for putting this together and pardon me for being a little late.

We'll keep posting new updates here.

👀 Looking forward reading your updates!

@jeffpaul jeffpaul added type:enhancement New feature or request. help wanted Extra attention is needed needs:engineering This requires engineering to resolve. labels Feb 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed needs:engineering This requires engineering to resolve. type:enhancement New feature or request.
Projects
Status: To Do
Development

No branches or pull requests

3 participants