jduncanator / node-diskusage

Node.js bindings around platform specific disk usage interfaces.
MIT License
152 stars 50 forks source link

Make diskusage Context Aware #49

Open larssvensby opened 4 years ago

larssvensby commented 4 years ago

We use diskusage in an Electron application and Electron is soon requiring Native Modules in the Renderer Process to be NAPI or Context Aware.

Is it possible to make diskusage Context Aware? See https://github.com/electron/electron/issues/18397 and an example https://github.com/atom/node-keytar/pull/182/files

Thanks

jduncanator commented 4 years ago

This looks relatively low cost, should be straightforward to add as well. I'll take a look at this over the next week, thanks!

larssvensby commented 4 years ago

Thanks! I also saw this https://github.com/blagoev/node-diskusage/commit/d55db9d369b6c7728b97a2972232e66225c69bb4

aleksey-hoffman commented 4 years ago

@jduncanator hey mate, any progress on making this context aware on NAPI? What do you think about https://github.com/blagoev/node-diskusage/commit/d55db9d ?

xiaoxiangmoe commented 4 years ago

@aleksey-hoffman Good Job!