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

How to make v4 work if a v3 is loaded (not used) as a transitive dependency? #78

Open
inukshuk opened this issue Jun 13, 2023 · 0 comments

Comments

@inukshuk
Copy link

I've tracked an issue with Rollup's file watcher to signal-exit; my issue is that via various transitive dependencies an older version of npmlog and gauge get loaded, which pull in signal-exit v3. In my case, gauge isn't even used at all and there's is no exit callback registered, but when I send signals to Rollup they basically end here and the only way to stop the watcher is via KILL.

Now, I understand that probably the best solution here would be to get all the dependencies involved to update so that they're all on v4 instead, but I wonder if this is really the intended behavior for v4 to bail out just because v3 was loaded?

Right now my workaround is to add a custom Rollup plugin that just deletes the global reference process.__signal_exit_emitter__ but judging by the code comments it seems to me that the expectation here is that v3 would remove itself and re-send the signal so that the v4 callback would then handle the signal the next time around. But this is not happening in my case. Maybe we should check the if there are any listeners on the global v3 emitter?

Thanks!

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

1 participant