On Mon, Jun 2, 2014 at 10:48 AM, CoolAJ86 <[email protected]> wrote:
In my wildest dreams there is a universe in which a future version of npm > versions packages in a global node_modules folder like this: > > node_modules/[email protected]+aef123/package.json > > But with the way many authors currently treat modules, there's still a > problem there: > Many modules give you singletons by default and some have no way of > creating instances, which means that the only true way to create an > instance is to have a separate copy of the code. > This isn’t really npm’s call to make. The only way to make require("thingy") map to node_modules/[email protected]+aef123 would be to make fairly invasive changes to the Node module loader, which has to be one of the most most locked-down chunks of Node’s API. I definitely want to see npm dedupe work properly, but a flat module structure seems extremely unlikely in Node as long as it’s still called Node. F -- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md Old group rules: 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 unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/CAHG3qKoPKTPb%3DvXiCn2kTh3A%2BNnCLmnAs76-Xi2%3DCBJggP5KhA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
