You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 12, 2025. It is now read-only.
data(typeId, patterns) fails in Node 5.x (v8 4.6.85.x) due to a bug in the optimising compiler. This bug has since been fixed (Node 6+ versions are okay), and does not affect older v8 versions (Node 4.x is also okay).
What's happening here?
Folktale uses an extend function to define properties on objects:
This function is then invoked in the defineVariants function to construct Variant objects. Certain optimisations to these two functions cause the expression:
Thus causing the native defineProperty function to fail.
What we're doing?
These optimisations can be prevented by using something like eval('true') somewhere in the defineVariants function. They might also not kick in if the code is written in a different way. Because these are unpredictable optimisation bugs, and because Node 5.x isn't a stable Node version anymore, we're dropping support for it — as optimisations in that version are not generally safe.
What platforms are affected?
The entire Node 5.x branch (v8 4.6.85.x) is affected by this issue.
Recommended action for affected users
If you're using Node 5.x, you should upgrade to Node 6.x (latest stable branch), or downgrade to Node 4.x (LTS version)