0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/lib
Alex Lamar de1dc0ae2e module: preserve symlinks when requiring
Currently, required modules use the real location of the
package/file as their __filename and __dirname, instead
of the symlinked path if it exists. This behaviour is
undocumented (it even goes against documentation in
certain scenarios), creating hard-to-debug problems
for developers who wish to leverage filesystem abstractions
to lay out their application.

This patch resolves all required modules to their canonical
path while still preserving any symlinks within the path,
instead of resolving to their canonical realpath. The one
special case observed is when the main module is loaded
-- in this case, the realpath does need to be used
in order for the main module to load properly.

PR-URL: https://github.com/nodejs/node/pull/5950
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-04-25 09:24:52 -07:00
..
internal net: Validate port in createServer().listen() 2016-04-20 15:41:18 -07:00
_debug_agent.js lib: refactor code with startsWith/endsWith 2016-03-23 15:58:52 +02:00
_debugger.js debugger: run last command on presssing enter 2016-04-14 10:53:07 -07:00
_http_agent.js https: fix ssl socket leak when keepalive is used 2016-03-17 14:32:49 +02:00
_http_client.js http: skip body and next message of CONNECT res 2016-04-19 11:48:06 -04:00
_http_common.js http: skip body and next message of CONNECT res 2016-04-19 11:48:06 -04:00
_http_incoming.js http: remove old, confusing comment 2016-02-15 07:52:21 -08:00
_http_outgoing.js buffer: add .from(), .alloc() and .allocUnsafe() 2016-03-16 08:34:02 -07:00
_http_server.js http: disallow sending obviously invalid status codes 2016-04-20 16:34:58 -07:00
_linklist.js
_stream_duplex.js
_stream_passthrough.js
_stream_readable.js events: add prependListener() and prependOnceListener() 2016-04-22 09:28:37 -07:00
_stream_transform.js stream: prevent object map change in TransformState 2016-02-02 13:05:04 -06:00
_stream_wrap.js
_stream_writable.js stream: make null an invalid chunk to write in object mode 2016-04-20 13:28:35 -07:00
_tls_common.js tls: scope loop vars with let 2016-01-26 20:53:05 +01:00
_tls_legacy.js crypto: fail early when loading crypto without openssl 2016-03-23 10:34:40 -07:00
_tls_wrap.js crypto: improve error messages 2016-03-26 23:46:32 +05:30
.eslintrc tools: add buffer-constructor eslint rule 2016-03-18 17:05:18 -07:00
assert.js assert: respect assert.doesNotThrow message. 2016-04-18 16:49:26 -07:00
buffer.js buffer: add Buffer.prototype.lastIndexOf() 2016-04-25 08:24:28 -07:00
child_process.js lib,test,tools: alignment on variable assignments 2016-04-18 17:19:11 -07:00
cluster.js lib: refactor code with startsWith/endsWith 2016-03-23 15:58:52 +02:00
console.js console: timeEnd() with no label emits warning 2016-04-25 08:28:23 -07:00
constants.js
crypto.js crypto: fail early when loading crypto without openssl 2016-03-23 10:34:40 -07:00
dgram.js dgram: pass null as error on successful send() 2016-03-28 09:47:13 -04:00
dns.js dns: Use object without protoype for map 2016-03-22 11:13:03 -07:00
domain.js lib: reduce usage of self = this 2016-03-21 15:48:51 -07:00
events.js events: add prependListener() and prependOnceListener() 2016-04-22 09:28:37 -07:00
fs.js buffer: add Buffer.allocUnsafeSlow(size) 2016-04-15 10:36:01 -07:00
http.js
https.js crypto: fail early when loading crypto without openssl 2016-03-23 10:34:40 -07:00
module.js module: preserve symlinks when requiring 2016-04-25 09:24:52 -07:00
net.js net: Validate port in createServer().listen() 2016-04-20 15:41:18 -07:00
os.js os: add userInfo() method 2016-04-12 17:21:29 -04:00
path.js path: fix win32.isAbsolute() inconsistency 2016-04-04 14:45:22 -07:00
process.js
punycode.js
querystring.js querystring: fix comments 2016-04-25 09:56:52 -04:00
readline.js lib: refactor code with startsWith/endsWith 2016-03-23 15:58:52 +02:00
repl.js lib,test,tools: alignment on variable assignments 2016-04-18 17:19:11 -07:00
stream.js
string_decoder.js buffer: add .from(), .alloc() and .allocUnsafe() 2016-03-16 08:34:02 -07:00
sys.js
timers.js timers: fixing API refs to use safe internal refs 2016-03-28 16:18:14 -07:00
tls.js crypto: fail early when loading crypto without openssl 2016-03-23 10:34:40 -07:00
tty.js Revert "tty: don't read from console stream upon creation" 2016-03-29 10:21:46 -05:00
url.js url: use "empty" object for empty query strings 2016-04-20 08:26:06 -07:00
util.js lib,test,tools: alignment on variable assignments 2016-04-18 17:19:11 -07:00
v8.js v8,src: expose statistics about heap spaces 2016-01-18 11:44:00 -05:00
vm.js
zlib.js zlib: fix use after null when calling .close 2016-04-19 08:46:54 +02:00