1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-11 10:07:54 -05:00
denoland-deno/ext/node/polyfills/internal_binding
Bartek Iwańczuk ce75e31625 refactor(core): include_js_files! 'dir' option doesn't change specifiers (#18019)
This commit changes "include_js_files!" macro from "deno_core"
in a way that "dir" option doesn't cause specifiers to be rewritten 
to include it.

Example:
```
include_js_files! {
  dir "js",
  "hello.js",
}
```

The above definition required embedders to use:
`import ... from "internal:<ext_name>/js/hello.js"`. 
But with this change, the "js" directory in which the files are stored
is an implementation detail, which for embedders results in: 
`import ... from "internal:<ext_name>/hello.js"`.

The directory the files are stored in, is an implementation detail and 
in some cases might result in a significant size difference for the 
snapshot. As an example, in "deno_node" extension, we store the 
source code in "polyfills" directory; which resulted in each specifier 
to look like "internal:deno_node/polyfills/<module_name>", but with 
this change it's "internal:deno_node/<module_name>". 

Given that "deno_node" has over 100 files, many of them having 
several import specifiers to the same extension, this change removes
10 characters from each import specifier.
2023-03-10 12:47:26 +09:00
..
_libuv_winerror.ts perf(ext/node): move winerror binding to rust (#17792) 2023-02-16 19:19:32 +05:30
_listen.ts feat(ext/node): embed std/node into the snapshot (#17724) 2023-02-14 17:38:45 +01:00
_node.ts feat(ext/node): embed std/node into the snapshot (#17724) 2023-02-14 17:38:45 +01:00
_timingSafeEqual.ts refactor(core): include_js_files! 'dir' option doesn't change specifiers (#18019) 2023-03-10 12:47:26 +09:00
_utils.ts feat(ext/node): embed std/node into the snapshot (#17724) 2023-02-14 17:38:45 +01:00
ares.ts feat(ext/node): embed std/node into the snapshot (#17724) 2023-02-14 17:38:45 +01:00
async_wrap.ts feat(ext/node): embed std/node into the snapshot (#17724) 2023-02-14 17:38:45 +01:00
buffer.ts refactor(core): include_js_files! 'dir' option doesn't change specifiers (#18019) 2023-03-10 12:47:26 +09:00
cares_wrap.ts refactor(core): include_js_files! 'dir' option doesn't change specifiers (#18019) 2023-03-10 12:47:26 +09:00
config.ts feat(ext/node): embed std/node into the snapshot (#17724) 2023-02-14 17:38:45 +01:00
connection_wrap.ts refactor(core): include_js_files! 'dir' option doesn't change specifiers (#18019) 2023-03-10 12:47:26 +09:00
constants.ts feat(ext/node): embed std/node into the snapshot (#17724) 2023-02-14 17:38:45 +01:00
contextify.ts feat(ext/node): embed std/node into the snapshot (#17724) 2023-02-14 17:38:45 +01:00
credentials.ts feat(ext/node): embed std/node into the snapshot (#17724) 2023-02-14 17:38:45 +01:00
crypto.ts refactor(core): include_js_files! 'dir' option doesn't change specifiers (#18019) 2023-03-10 12:47:26 +09:00
errors.ts feat(ext/node): embed std/node into the snapshot (#17724) 2023-02-14 17:38:45 +01:00
fs.ts feat(ext/node): embed std/node into the snapshot (#17724) 2023-02-14 17:38:45 +01:00
fs_dir.ts feat(ext/node): embed std/node into the snapshot (#17724) 2023-02-14 17:38:45 +01:00
fs_event_wrap.ts feat(ext/node): embed std/node into the snapshot (#17724) 2023-02-14 17:38:45 +01:00
handle_wrap.ts refactor(core): include_js_files! 'dir' option doesn't change specifiers (#18019) 2023-03-10 12:47:26 +09:00
heap_utils.ts feat(ext/node): embed std/node into the snapshot (#17724) 2023-02-14 17:38:45 +01:00
http_parser.ts feat(ext/node): embed std/node into the snapshot (#17724) 2023-02-14 17:38:45 +01:00
icu.ts feat(ext/node): embed std/node into the snapshot (#17724) 2023-02-14 17:38:45 +01:00
inspector.ts feat(ext/node): embed std/node into the snapshot (#17724) 2023-02-14 17:38:45 +01:00
js_stream.ts feat(ext/node): embed std/node into the snapshot (#17724) 2023-02-14 17:38:45 +01:00
messaging.ts feat(ext/node): embed std/node into the snapshot (#17724) 2023-02-14 17:38:45 +01:00
mod.ts refactor(core): include_js_files! 'dir' option doesn't change specifiers (#18019) 2023-03-10 12:47:26 +09:00
module_wrap.ts feat(ext/node): embed std/node into the snapshot (#17724) 2023-02-14 17:38:45 +01:00
native_module.ts feat(ext/node): embed std/node into the snapshot (#17724) 2023-02-14 17:38:45 +01:00
natives.ts feat(ext/node): embed std/node into the snapshot (#17724) 2023-02-14 17:38:45 +01:00
node_file.ts refactor(core): include_js_files! 'dir' option doesn't change specifiers (#18019) 2023-03-10 12:47:26 +09:00
node_options.ts feat(ext/node): embed std/node into the snapshot (#17724) 2023-02-14 17:38:45 +01:00
options.ts feat(ext/node): embed std/node into the snapshot (#17724) 2023-02-14 17:38:45 +01:00
os.ts feat(ext/node): embed std/node into the snapshot (#17724) 2023-02-14 17:38:45 +01:00
performance.ts feat(ext/node): embed std/node into the snapshot (#17724) 2023-02-14 17:38:45 +01:00
pipe_wrap.ts refactor(core): include_js_files! 'dir' option doesn't change specifiers (#18019) 2023-03-10 12:47:26 +09:00
process_methods.ts feat(ext/node): embed std/node into the snapshot (#17724) 2023-02-14 17:38:45 +01:00
README.md feat(ext/node): embed std/node into the snapshot (#17724) 2023-02-14 17:38:45 +01:00
report.ts feat(ext/node): embed std/node into the snapshot (#17724) 2023-02-14 17:38:45 +01:00
serdes.ts feat(ext/node): embed std/node into the snapshot (#17724) 2023-02-14 17:38:45 +01:00
signal_wrap.ts feat(ext/node): embed std/node into the snapshot (#17724) 2023-02-14 17:38:45 +01:00
spawn_sync.ts feat(ext/node): embed std/node into the snapshot (#17724) 2023-02-14 17:38:45 +01:00
stream_wrap.ts refactor(core): include_js_files! 'dir' option doesn't change specifiers (#18019) 2023-03-10 12:47:26 +09:00
string_decoder.ts refactor(core): include_js_files! 'dir' option doesn't change specifiers (#18019) 2023-03-10 12:47:26 +09:00
symbols.ts feat(ext/node): embed std/node into the snapshot (#17724) 2023-02-14 17:38:45 +01:00
task_queue.ts feat(ext/node): embed std/node into the snapshot (#17724) 2023-02-14 17:38:45 +01:00
tcp_wrap.ts refactor(core): include_js_files! 'dir' option doesn't change specifiers (#18019) 2023-03-10 12:47:26 +09:00
timers.ts feat(ext/node): embed std/node into the snapshot (#17724) 2023-02-14 17:38:45 +01:00
tls_wrap.ts feat(ext/node): embed std/node into the snapshot (#17724) 2023-02-14 17:38:45 +01:00
trace_events.ts feat(ext/node): embed std/node into the snapshot (#17724) 2023-02-14 17:38:45 +01:00
tty_wrap.ts feat(ext/node): embed std/node into the snapshot (#17724) 2023-02-14 17:38:45 +01:00
types.ts refactor(core): include_js_files! 'dir' option doesn't change specifiers (#18019) 2023-03-10 12:47:26 +09:00
udp_wrap.ts refactor(core): include_js_files! 'dir' option doesn't change specifiers (#18019) 2023-03-10 12:47:26 +09:00
url.ts feat(ext/node): embed std/node into the snapshot (#17724) 2023-02-14 17:38:45 +01:00
util.ts refactor(core): include_js_files! 'dir' option doesn't change specifiers (#18019) 2023-03-10 12:47:26 +09:00
uv.ts refactor(core): include_js_files! 'dir' option doesn't change specifiers (#18019) 2023-03-10 12:47:26 +09:00
v8.ts feat(ext/node): embed std/node into the snapshot (#17724) 2023-02-14 17:38:45 +01:00
worker.ts feat(ext/node): embed std/node into the snapshot (#17724) 2023-02-14 17:38:45 +01:00
zlib.ts feat(ext/node): embed std/node into the snapshot (#17724) 2023-02-14 17:38:45 +01:00

Internal Bindings

The modules in this directory implement (simulate) C++ bindings implemented in the ./src/ directory of the Node.js repository.

These bindings are created in the Node.js source code by using NODE_MODULE_CONTEXT_AWARE_INTERNAL.

Please refer to https://github.com/nodejs/node/blob/master/src/README.md for further information.