1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-22 15:24:46 -05:00
denoland-deno/ext/node
Bartek Iwańczuk d24c6ea27f
refactor(runtime): conditionally register Extension with source files (#18068)
Since we are snapshotting extension source at build time, there's no
need to define list of sources for the extension at runtime.

This commit changes "deno_node" extension by removing "init_polyfill"
function in favor of "init_polyfill_ops_and_esm()" and "init_polyfill_ops()".

The former is used during snapshot and when "deno_runtime" is compiled
with "dont_create_runtime_snapshot" cargo feature flag. The latter is used
when running a worker from an existing snapshot.

This is a start of a bigger refactor to all extensions - thanks to this
change, we don't have to iterate over all defined source files for extension at
runtime, and because of that we don't have to create a filepath for each of the
source files. It's not a big deal, but we are iterating over 300 files on each start,
and concatenating 3 strings before creating a "PathBuf" for ~200 of them.
This is already visible on the startup flamegraphs and should be avoided.
2023-03-08 12:43:26 +01:00
..
crypto perf(ext/node): improve createHash performance (#18033) 2023-03-06 08:58:04 +05:30
polyfills refactor: Add "deno_fs" extension crate (#18040) 2023-03-07 18:13:44 +09:00
01_node.js test: add unit tests from std/node (#17794) 2023-02-16 14:30:14 +01:00
02_require.js fix(ext/node): fix npm module resolution when --node-modules-dir specified (#17896) 2023-02-23 22:28:12 +09:00
Cargo.toml perf(ext/node): improve createHash performance (#18033) 2023-03-06 08:58:04 +05:30
errors.rs chore: upgrade to Rust 1.67 (#17548) 2023-01-27 10:43:16 -05:00
idna.rs refactor: use ops for idna & punycode (#17817) 2023-02-20 18:47:42 +01:00
lib.rs refactor(runtime): conditionally register Extension with source files (#18068) 2023-03-08 12:43:26 +01:00
module_es_shim.js refactor: allow to provide polyfills for Node modules from the snapshot (#17706) 2023-02-10 11:40:45 +00:00
ops.rs refactor: clean up "cli/node/mod.rs" and "ext/node" (#17713) 2023-02-10 10:26:39 -05:00
package_json.rs feat(npm): support bare specifiers from package.json in more subcommands and language server (#17891) 2023-02-23 10:58:10 -05:00
path.rs chore(ext/node): fix variable name (#17948) 2023-02-27 21:26:02 +01:00
polyfill.rs refactor(core): include_js_files! 'dir' option doesn't change specifiers (#18019) 2023-03-05 02:31:38 +00:00
README.md chore(ext/node): correct publishing for ext/node (#15461) 2022-08-11 17:25:41 -04:00
resolution.rs refactor: simplify to string calls (#18011) 2023-03-04 08:05:07 -04:00
v8.rs feat(ext/node): implement node:v8 (#17806) 2023-02-17 18:48:09 +05:30
winerror.rs perf(ext/node): move winerror binding to rust (#17792) 2023-02-16 19:19:32 +05:30

deno_node

require and other node related functionality for Deno.