dresende / node-orm2

Object Relational Mapping
http://github.com/dresende/node-orm2
MIT License
3.07k stars 377 forks source link

ORM is leaking a global: lodash "_" #532

Closed bitsoflogic closed 10 years ago

bitsoflogic commented 10 years ago

This error occurs every time I start running the mocha tests from scratch: Error: global leak detected: _

The test to reproduce:

describe('ORM', function() {
    it('will leak', function() {
        var orm = require('orm');
    });
});

I went one step further to see if lodash was the problem.

describe('Lodash', function() {
    it('will not leak', function() {
        var _ = require('lodash');
    });
});

Only the require('orm') produced the leak.

bitsoflogic commented 10 years ago

Found the source of the leak in Utilities.js. Putting together a PR.

bitsoflogic commented 10 years ago

I see this was resolved a few weeks ago... It's just not available via npm install orm yet.