react-blessed-contrib
react-blessed-contrib copied to clipboard
Support for neo-blessed possible?
(Sorry for spamming you with so many issues)
Is there any way you can think of to get this to work when using a blessed fork like neo-blessed
?
I noticed that the way this interacts with react-blessed is by patching the blessed
object with a fake element type. I don't know if there's a cleaner way than making it an optional peer dependency and using something like require.resolve
to see if neo-blessed
is being used.
I know it's a less probable use case, but unfortunately the standard blessed
has strange bugs that will probably never be fixed.
Thanks, no problem, I appreciate the input!
I didn't know about neo-blessed
. It sounds like a good idea to support it, too. I think it should be possible by trying to patch both by wrapping that in try/catch. I will give it a try.
I gave it some more thought. I think the trouble is that both react-blessed
and blessed-contrib
load blessed
internally. So even if we patched neo-blessed
the original blessed
would be still used.
So the question is if there is a way to override blessed
in react-blessed
and blessed-contrib
. If that is somehow possible then adding support to react-blessed-contrib
would be then pretty simple.
https://github.com/Yomguithereal/react-blessed/blob/master/README.md#using-blessed-forks
This is the supported way to override which blessed is being used, so at least on that side it is possible.
Oh, that's neat. Now only if there would be a similar approach for blessed-contrib
.
@dundalek I have access to blessed-contrib
and can merge and push releases as required.
It would be helpful though if you or others could help triage PRs there as I'm less informed on the internals.
I'm really hoping this happens some day.
@dustinlacewell It looks like there is another option now since npm v6.9.0 introduced support for module aliases. You should be able to install neo-blessed as blessed with npm install blessed@npm:neo-blessed
and things should just work.
☝️ love this hack idea!
@dustinlacewell - are there any specific updates in neo-blessed
that you are looking for?