0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/lib
Ruben Bridgewater 115f0f5a57
module: throw an error for invalid package.json main entries
We currently ignore invalid `main` entries in package.json files.
This does not seem to be very user friendly as it's certainly an
error if the `main` entry is not a valid file name. So instead of
trying to resolve the file otherwise, throw an error immediately to
improve the user experience.
To keep it backwards compatible `index.js` files in the same directory
as the `package.json` will continue to be resolved instead but that
behavior is now deprecated.

PR-URL: https://github.com/nodejs/node/pull/26823
Fixes: https://github.com/nodejs/node/issues/26588
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2019-03-27 17:11:53 +01:00
..
internal module: throw an error for invalid package.json main entries 2019-03-27 17:11:53 +01:00
_http_agent.js http: reduce usage of public util 2019-03-12 06:40:57 +01:00
_http_client.js timers: rename validateTimerDuration to getTimerDuration 2019-03-27 17:05:14 +01:00
_http_common.js http: reduce usage of public util 2019-03-12 06:40:57 +01:00
_http_incoming.js http: improve performance for incoming headers 2019-02-13 21:25:20 +08:00
_http_outgoing.js lib: refactor Error.captureStackTrace() usage 2019-03-23 02:55:54 +01:00
_http_server.js lib: move DTRACE_* probes out of global scope 2019-03-12 14:19:36 +00:00
_stream_duplex.js benchmark,doc,lib,test: capitalize comments 2019-03-10 00:44:40 +01:00
_stream_passthrough.js lib: use ES6 class inheritance style 2018-12-05 16:55:00 +01:00
_stream_readable.js lib: move extra properties into error creation 2019-03-21 22:52:08 +01:00
_stream_transform.js stream: make sure 'readable' is emitted before ending the stream 2019-03-06 08:38:29 +00:00
_stream_wrap.js lib: assign missed deprecation code 2019-03-07 15:48:55 +01:00
_stream_writable.js benchmark,doc,lib,test: capitalize comments 2019-03-10 00:44:40 +01:00
_tls_common.js tls: support TLSv1.3 2019-03-20 07:48:25 -07:00
_tls_wrap.js tls: remove usage of public require('util') 2019-03-25 00:15:39 +01:00
.eslintrc.yaml tools: remove eslint rule no-let-in-for-declaration 2019-03-26 09:46:41 -07:00
assert.js lib: validate Error.captureStackTrace() calls 2019-03-23 02:55:55 +01:00
async_hooks.js async_hooks: remove deprecated emitBefore and emitAfter 2019-03-18 11:36:48 +01:00
buffer.js lib: refactor Error.captureStackTrace() usage 2019-03-23 02:55:54 +01:00
child_process.js child_process: rename _validateStdtio to getValidStdio 2019-03-27 17:05:15 +01:00
cluster.js
console.js console: split console into global.js and constructor.js 2018-12-02 04:51:18 +08:00
constants.js
crypto.js crypto: expose KeyObject class 2019-03-17 10:53:58 +01:00
dgram.js dgram: remove usage of public require('util') 2019-03-23 18:37:39 +05:30
dns.js dns: use IDNA 2008 to encode non-ascii hostnames 2019-01-28 20:42:44 +01:00
domain.js domain: set .domain non-enumerable on resources 2019-03-13 00:07:42 +00:00
events.js lib: validate Error.captureStackTrace() calls 2019-03-23 02:55:55 +01:00
fs.js lib: consolidate arrayBufferView validation 2019-03-27 17:05:19 +01:00
http2.js http2: order declarations in http2.js 2018-11-20 10:42:31 -08:00
http.js lib: support overriding http\s.globalAgent 2019-01-08 00:10:36 +01:00
https.js https: remove usage of public require('util') 2019-03-23 18:40:24 +05:30
inspector.js inspector: return Error objects on error 2019-02-26 16:44:47 -05:00
module.js
net.js tools: enable getter-return lint rule 2019-03-25 20:02:10 -04:00
os.js lib: refactor Error.captureStackTrace() usage 2019-03-23 02:55:54 +01:00
path.js path: refactor code for clarity 2019-03-01 14:55:33 +01:00
perf_hooks.js perf_hooks: load internal/errors eagerly 2019-03-22 00:41:09 +01:00
process.js
punycode.js
querystring.js benchmark,doc,lib,test: capitalize comments 2019-02-28 18:31:10 +01:00
readline.js readline: remove usage of require('util') 2019-03-23 12:18:32 +08:00
repl.js repl: fix terminal default setting 2019-03-25 16:28:07 +01:00
stream.js stream: reduce internal usage of public require of util 2019-03-22 00:48:32 +01:00
string_decoder.js
sys.js benchmark,doc,lib,test: capitalize comments 2019-03-10 00:44:40 +01:00
timers.js timers: rename validateTimerDuration to getTimerDuration 2019-03-27 17:05:14 +01:00
tls.js lib: move extra properties into error creation 2019-03-21 22:52:08 +01:00
trace_events.js trace_events: remove usage of require('util') 2019-03-24 18:28:07 +08:00
tty.js tty: remove util.inherits usage 2019-03-25 00:26:49 +01:00
url.js url: refactor validateHostname 2019-03-27 17:05:17 +01:00
util.js lib: refactor Error.captureStackTrace() usage 2019-03-23 02:55:54 +01:00
v8.js v8: integrate node-heapdump into core 2019-03-13 15:50:32 +00:00
vm.js inspector,vm: remove --eval wrapper 2019-02-03 20:40:16 +01:00
worker_threads.js worker: implement worker.moveMessagePortToContext() 2019-03-15 16:54:19 +01:00
zlib.js lib: refactor Error.captureStackTrace() usage 2019-03-23 02:55:54 +01:00