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

saltydb missing inner join used in default template #2103

Closed
lheberlie opened this issue Jan 24, 2024 · 4 comments
Closed

saltydb missing inner join used in default template #2103

lheberlie opened this issue Jan 24, 2024 · 4 comments

Comments

@lheberlie
Copy link

lheberlie commented Jan 24, 2024

TLDR;

When upgrading from version 3 to version 4, the default template is missing some functionality to attachModules since version 3 uses taffydb inner join and version 4 uses saltydb which is missing the inner join.

Request:

Please provide a solution for the existing query

attachModuleSymbols( find({ longname: {left: 'module:'} }), members.modules );

or provide a solution or suggestion to update the attachModuleSymbols function to fix the default template.

Thank you.

Problem

Taffy innerJoin Extension (OCD edition) missing from @jsdoc/salty

The default template uses a left join from the original taffydb to send data to the attachModules function.
This is missing in saltyDB and I'm wondering if you have a solution for the default template or what's the level of effort to bring this into saltyDB so the default template still works properly.

Input code

attachModuleSymbols( find({ longname: {left: 'module:'} }), members.modules );

https://github.com/jsdoc/jsdoc/blob/0b6193f185b66ca7502b145acdc66f4579c63e8d/templates/default/publish.js#L603C5-L603C83

Expected behavior

Version: 3.6.10

taffydb results:

image

code execution

helper.find(data, { kind: ["class", "function"], longname: { left: "module:" } })

Array(7262) [Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, Doclet, ...]

Current behavior

Version: 4.0.2

saltydb data sample since the results are empty:

image

code execution:

helper.find(data, { kind: ["class", "function"], longname: { left: "module:" } })

Array(0) []

Your environment

Software Version
JSDoc 4.0.2
Node.js v20.10.0
npm 10.2.3
Operating system macOS 14.2.1
@lheberlie
Copy link
Author

@hegemonic - curious if you have seen this issue yet?

@lheberlie
Copy link
Author

@hegemonic - hoping this isn't lost in the email abyss.

@hegemonic
Copy link
Contributor

Fixed in @jsdoc/salty@0.2.8. If you reinstall JSDoc, you should pick up the new version automatically.

@lheberlie
Copy link
Author

Thank you @hegemonic

lheberlie pushed a commit to bsvensson/jsdoc that referenced this issue Jun 25, 2024
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

No branches or pull requests

2 participants