{"action":"created","issue":{"url":"https://api.github.com/repos/atom/electron/issues/2035","labels_url":"https://api.github.com/repos/atom/electron/issues/2035/labels{/name}","comments_url":"https://api.github.com/repos/atom/electron/issues/2035/comments","events_url":"https://api.github.com/repos/atom/electron/issues/2035/events","html_url":"https://github.com/atom/electron/issues/2035","id":90287757,"number":2035,"title":"How to allow external packages to use original-fs","user":{"login":"Gregg8","id":3037372,"avatar_url":"https://avatars.githubusercontent.com/u/3037372?v=3","gravatar_id":"","url":"https://api.github.com/users/Gregg8","html_url":"https://github.com/Gregg8","followers_url":"https://api.github.com/users/Gregg8/followers","following_url":"https://api.github.com/users/Gregg8/following{/other_user}","gists_url":"https://api.github.com/users/Gregg8/gists{/gist_id}","starred_url":"https://api.github.com/users/Gregg8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gregg8/subscriptions","organizations_url":"https://api.github.com/users/Gregg8/orgs","repos_url":"https://api.github.com/users/Gregg8/repos","events_url":"https://api.github.com/users/Gregg8/events{/privacy}","received_events_url":"https://api.github.com/users/Gregg8/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-06-23T04:54:32Z","updated_at":"2015-07-09T22:00:16Z","closed_at":"2015-06-25T11:44:15Z","body":"Updated description in next comment..."},"comment":{"url":"https://api.github.com/repos/atom/electron/issues/comments/120159182","html_url":"https://github.com/atom/electron/issues/2035#issuecomment-120159182","issue_url":"https://api.github.com/repos/atom/electron/issues/2035","id":120159182,"user":{"login":"marwanhilmi","id":1442356,"avatar_url":"https://avatars.githubusercontent.com/u/1442356?v=3","gravatar_id":"","url":"https://api.github.com/users/marwanhilmi","html_url":"https://github.com/marwanhilmi","followers_url":"https://api.github.com/users/marwanhilmi/followers","following_url":"https://api.github.com/users/marwanhilmi/following{/other_user}","gists_url":"https://api.github.com/users/marwanhilmi/gists{/gist_id}","starred_url":"https://api.github.com/users/marwanhilmi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marwanhilmi/subscriptions","organizations_url":"https://api.github.com/users/marwanhilmi/orgs","repos_url":"https://api.github.com/users/marwanhilmi/repos","events_url":"https://api.github.com/users/marwanhilmi/events{/privacy}","received_events_url":"https://api.github.com/users/marwanhilmi/received_events","type":"User","site_admin":false},"created_at":"2015-07-09T22:00:16Z","updated_at":"2015-07-09T22:00:16Z","body":"Apologies to revive a closed issue, @zcbenz, I tried your suggestion but get an error:\r\n`TypeError: Cannot assign to read only property 'F_OK' of #<Object>` when attempting to do `fs[name] = method`, am I missing something obvious?\r\n\r\nIf do a monkey-patch like this - what is a good practice to ensure you aren't breaking something else? Do you need to revert the monkey-patch after including the modules that need `original-fs`? For example, if I do something like:\r\n```\r\n// monkey patch fs\r\nvar rimraf = require('rimraf') // needs 'original-fs'\r\n// then something else that requires Electron's fs happens, is it broken now?\r\n// should I revert monkey patch now?\r\n```\r\n\r\nAny suggestions for best practice around this? This has definitely been problematic for me - I've been forking modules and adding `var fs = process.versions.electron ? require('original-fs') : require('fs')` which is obviously not ideal."}}