Skip to content

Allow to pass a fs module#6

Open
mszczepanczyk wants to merge 1 commit into
toolness:masterfrom
mszczepanczyk:master
Open

Allow to pass a fs module#6
mszczepanczyk wants to merge 1 commit into
toolness:masterfrom
mszczepanczyk:master

Conversation

@mszczepanczyk

Copy link
Copy Markdown

No description provided.

@emschwartz

Copy link
Copy Markdown

Is this for testing or production? Could you use something like mock-require instead?

@toolness

Copy link
Copy Markdown
Owner

Oh I think this is for production, so that a custom fs module can be passed in if the user is running on a JS unikernel or something? Or maybe I'm confusing this with a different PR...

@mszczepanczyk

Copy link
Copy Markdown
Author

@emschwartz @toolness yup I'm thinking about using this in production. It's viable to monkey patch the node fs module and replace it with a custom one but it's not very elegant and kinda dodgy.

If there's a will to merge this pr I'll rebase it against newest changes and fix tests.

@toolness

Copy link
Copy Markdown
Owner

Cool, I'm fine with merging it, though can you also document it in the README and explain a bit abut how/why one would use it?

@mszczepanczyk

Copy link
Copy Markdown
Author

@toolness ok sure

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

Successfully merging this pull request may close these issues.

3 participants