| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 8853388 commit 6ad458b
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -389,20 +389,10 @@ Module.prototype._compile = function(content, filename) { | |||
| 389 | 389 | return Module._resolveFilename(request, self); | |
| 390 | 390 | }; | |
| 391 | 391 | ||
| 392 | - Object.defineProperty(require, 'paths', { get: function() { | ||
| 393 | - throw new Error('require.paths is removed. Use ' + | ||
| 394 | - 'node_modules folders, or the NODE_PATH ' + | ||
| 395 | - 'environment variable instead.'); | ||
| 396 | - }}); | ||
| 397 | - | ||
| 398 | 392 | require.main = process.mainModule; | |
| 399 | 393 | ||
| 400 | 394 | // Enable support to add extra extension types | |
| 401 | 395 | require.extensions = Module._extensions; | |
| 402 | - require.registerExtension = function() { | ||
| 403 | - throw new Error('require.registerExtension() removed. Use ' + | ||
| 404 | - 'require.extensions instead.'); | ||
| 405 | - }; | ||
| 406 | 396 | ||
| 407 | 397 | require.cache = Module._cache; | |
| 408 | 398 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -127,10 +127,6 @@ assert.equal(require('../fixtures/registerExt2').custom, 'passed'); | |||
| 127 | 127 | assert.equal(require('../fixtures/foo').foo, 'ok', | |
| 128 | 128 | 'require module with no extension'); | |
| 129 | 129 | ||
| 130 | - assert.throws(function() { | ||
| 131 | - require.paths; | ||
| 132 | - }, /removed/, 'Accessing require.paths should throw.'); | ||
| 133 | - | ||
| 134 | 130 | // Should not attempt to load a directory | |
| 135 | 131 | try { | |
| 136 | 132 | require('../fixtures/empty'); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments