node/lib/internal
Joyee Cheung 2a9eb316a1
src: move internal loaders out of bootstrap_node.js
- Moves the creation of `process.binding()`, `process._linkedBinding()`
  `internalBinding()` and `NativeModule` into a separate file
  `lib/internal/bootstrap_loaders.js`, and documents them there.
  This file will be compiled and run before `bootstrap_node.js`, which
  means we now bootstrap the internal module & binding system before
  actually bootstrapping Node.js.
- Rename the special ID that can be used to require `NativeModule`
  as `internal/bootstrap_loaders` since it is setup there. Also put
  `internalBinding` in the object exported by `NativeModule.require`
  instead of putting it inside the `NativeModule.wrapper`
- Use the original `getBinding()` to get the source code of native
  modules instead of getting it from `process.binding('native')`
  so that users cannot fake native modules by modifying the binding
  object.
- Names the bootstrapping functions so their names show up
  in the stack trace.

PR-URL: https://github.com/nodejs/node/pull/19112
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
2018-03-06 22:12:46 +08:00
..
cluster cluster: fix inspector port assignment 2018-02-22 11:06:21 +01:00
crypto lib: switch to Number.isNaN 2018-02-16 18:09:56 +01:00
http2 stream: updated streams error handling 2018-03-06 13:31:56 +01:00
loader src: move internal loaders out of bootstrap_node.js 2018-03-06 22:12:46 +08:00
process src: move internal loaders out of bootstrap_node.js 2018-03-06 22:12:46 +08:00
repl repl: support top-level await 2017-11-16 15:42:46 -08:00
streams stream: updated streams error handling 2018-03-06 13:31:56 +01:00
test src: move internal loaders out of bootstrap_node.js 2018-03-06 22:12:46 +08:00
util src: move internal loaders out of bootstrap_node.js 2018-03-06 22:12:46 +08:00
vm src: move internal loaders out of bootstrap_node.js 2018-03-06 22:12:46 +08:00
async_hooks.js lib: change hook -> hooks in code comment 2018-03-02 08:54:32 +01:00
bootstrap_loaders.js src: move internal loaders out of bootstrap_node.js 2018-03-06 22:12:46 +08:00
bootstrap_node.js src: move internal loaders out of bootstrap_node.js 2018-03-06 22:12:46 +08:00
buffer.js buffer: refactor all read/write functions 2018-03-02 19:29:46 +00:00
child_process.js child_process: fix stdio sockets creation 2018-02-16 19:11:03 +01:00
constants.js module: replace "magic" numbers by constants 2018-02-22 15:15:43 +00:00
encoding.js src: move internal loaders out of bootstrap_node.js 2018-03-06 22:12:46 +08:00
errors.js stream: updated streams error handling 2018-03-06 13:31:56 +01:00
freelist.js lib: update indentation of ternaries 2017-07-17 22:09:46 -07:00
fs.js fs: support as and as+ flags in stringToFlags() 2018-02-22 12:12:51 +01:00
http.js http: convert utcDate to use setTimeout 2017-12-29 00:08:54 +01:00
inspector_async_hook.js inspector: no async tracking for promises 2017-11-21 13:57:05 +01:00
linkedlist.js linkedlist: correct grammar in comments 2017-07-31 08:03:19 +08:00
module.js module: replace "magic" numbers by constants 2018-02-22 15:15:43 +00:00
net.js net: fix usage of writeBuffer in makeSyncWrite 2018-03-03 18:34:09 +08:00
os.js os: add CIDR support 2017-08-14 15:43:10 -04:00
process.js lib: allow process kill by signal number 2018-02-17 17:09:25 +01:00
querystring.js lib: use Object.create(null) directly 2017-03-24 15:25:49 -07:00
readline.js lib,test: remove yoda statements 2018-03-04 15:33:18 +01:00
readme.md doc: limit lines to 80 cols in internal README 2017-04-13 15:30:10 -07:00
repl.js lib: switch to Number.isNaN 2018-02-16 18:09:56 +01:00
safe_globals.js module: Allow runMain to be ESM 2017-09-07 15:18:32 -05:00
socket_list.js child_process: fix memory leak in .fork() 2017-09-30 22:18:29 -07:00
timers.js timers: add helper fn for async init 2018-02-19 07:02:21 -05:00
tls.js tls: deprecate parseCertString & move to internal 2017-09-13 16:54:35 -03:00
trace_events_async_hooks.js lib: fix typo in trace_events_async_hooks.js 2018-01-21 17:39:44 +02:00
url.js url: simplify constructor URLSearchParams. Remove needless check null 2018-02-11 09:32:48 -06:00
util.js events: show throw stack trace for uncaught exception 2018-03-04 21:20:43 +00:00
v8.js lib: remove use of Debug.MakeMirror() 2017-11-24 00:13:44 +01:00
v8_prof_polyfill.js tools, test: fix prof polyfill readline 2018-02-17 10:06:53 -02:00
v8_prof_processor.js lib: re-fix v8_prof_processor 2018-03-05 09:16:18 +00:00
wrap_js_stream.js src: refactor WriteWrap and ShutdownWraps 2018-02-14 10:00:29 +01:00

readme.md

Internal Modules

The modules in lib/internal are intended for internal use in Node.js core only, and are not accessible with require() from user modules. These are subject to change at any time. Reliance on these modules outside of core is not supported in any way.