Skip to content

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

Open
@inukshuk

Description

@inukshuk

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions