soyuka / pidusage

Cross-platform process cpu % and memory usage of a PID
MIT License
512 stars 55 forks source link

Added compatibility to bundlers (closes #144 #152 #153) #154

Closed tabarra closed 1 year ago

tabarra commented 2 years ago
Q A
Branch? main
Bug fix? yes
New feature? yes
Deprecations? no
Tickets Fix #144 #152 #153
License MIT
Doc PR not required
simonepri commented 2 years ago

Hi tabara@ thank you for the PR.

I think the change should look like more like this (i.e. we need to introduce a methodToRequireFn function): https://github.com/simonepri/pidtree/commit/d3fb048078b4bacf96cd831226fb6c80fc341cc1

tabarra commented 2 years ago

@simonepri Maybe, but that's fine because node caches modules so it's only actually included once.
I had to rush it just to be able to ship an update in my project, but might revisit it in the future.

soyuka commented 1 year ago

thanks kept your commits in #163 and added the change with as we'll need probably need it in https://github.com/soyuka/pidusage/pull/143