Will "node-graceful-fs" make it's magic to all third party modules also?

191 views
Skip to first unread message

Filipe Deschamps

unread,
Nov 5, 2013, 5:01:08 PM11/5/13
to nod...@googlegroups.com
Can you guys help me out to understand this? https://github.com/isaacs/node-graceful-fs

Will this module "patch" my node?

Alan Hoffmeister

unread,
Nov 5, 2013, 5:10:56 PM11/5/13
to nodejs
https://github.com/isaacs/node-graceful-fs/blob/master/graceful-fs.js#L1

According to this line, it does patch fs.
This script is just doing minor improvements to fs so it can behave
the same way on all OSs (Windows).
--
Att,
Alan Hoffmeister


2013/11/5 Filipe Deschamps <fil...@gmail.com>:
> Can you guys help me out to understand this?
> https://github.com/isaacs/node-graceful-fs
>
> Will this module "patch" my node?
>
> --
> --
> Job Board: http://jobs.nodejs.org/
> Posting guidelines:
> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> You received this message because you are subscribed to the Google
> Groups "nodejs" group.
> To post to this group, send email to nod...@googlegroups.com
> To unsubscribe from this group, send email to
> nodejs+un...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "nodejs" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to nodejs+un...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

Filipe Deschamps

unread,
Nov 5, 2013, 5:15:16 PM11/5/13
to nod...@googlegroups.com
Alan, I saw this, but I still can't fully understand.

When working with cluster, show I require it in the main app.js file, or inside the worker?


You received this message because you are subscribed to a topic in the Google Groups "nodejs" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/nodejs/wUsdJDRHmpE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to nodejs+un...@googlegroups.com.

Tim Caswell

unread,
Nov 5, 2013, 5:19:29 PM11/5/13
to nod...@googlegroups.com
If it monkey-patched existing modules in the current process, then you need to require it once per process you want patched.  So in the case of cluster, you probably want it in the worker so that worker code gets patched.

Filipe Deschamps

unread,
Nov 5, 2013, 7:38:36 PM11/5/13
to nod...@googlegroups.com
Perfect, thanks!

I will make the tests and post it here.

Filipe Deschamps

unread,
Nov 10, 2013, 2:48:40 PM11/10/13
to nod...@googlegroups.com
Yep, it does patch the worker, and it works :)
Reply all
Reply to author
Forward
0 new messages