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

taffy 2.7.x breaks its own column: {isUndefined: true} filter #159

Open
GerHobbelt opened this issue May 28, 2019 · 0 comments
Open

taffy 2.7.x breaks its own column: {isUndefined: true} filter #159

GerHobbelt opened this issue May 28, 2019 · 0 comments

Comments

@GerHobbelt
Copy link

Taffy releases since 2.7 break query logic like this (as used in jsdoc-to-markdown a.k.a. jsdoc2md npm package):

data({access: {isUndefined: true}}).remove();

Analysis

Good release: 2.6.2
Bad release: 2.7.3

Next, I've done a quick source compare and after a couple of false hunches this bit of Taffy code in matchFunc turns up as the bad egg:

                if (typeof mvalue === 'undefined') {
                  return false;
                }

Killing that bit of code restores the old 2.6.2 behaviour re those jsdoc2md tests which use isUndefined filter code as shown at top.

git bisect + $ grep -i "typeof mvalue === 'undefined'" taffy.js as the good/bad test then quickly lead to this commit being the point where this bug has been introduced:

$ git bisect good
968b5cf9e85ad741e787690a39809fd685070e90 is the first bad commit
commit 968b5cf9e85ad741e787690a39809fd685070e90
Author: typicaljoe <ian@individualist.com>
Date:   Mon Feb 25 22:41:27 2013 -0800

    Update TaffyDB to 2.7 with a large number of changes

    Large number of style changes, bug fixes, and tweaks. Big thanks to everyone who has helped!

:100644 100644 61802b4aa323c38c1945179a67f76059bbf4489a 2212e3b34d9f76fa69f35511ab3c932dae6e7109 M      taffy.js

The new (bad) code results in this bit never being reached:

!TAFFY.isUndefined( mvalue )

and hence the filter code

data({access: {isUndefined: true}}).remove();

is now dead in the water.

Conclusion

For jsdoc2md at least this means it devDependency taffydb cannot be updated to 2.7.x until this bug is fixed.

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
@GerHobbelt and others