diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2023-02-20 01:11:56 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-20 01:11:56 +0100 |
commit | a1cd2a5915c13f6a9b8eafa3807e143a02616bc1 (patch) | |
tree | f99a6983e790797abb143d333ca3551d0b414552 /ext/node/lib.rs | |
parent | a01af067d79e78ea8e2c21cf0ef92d86d425f8eb (diff) |
refactor(core): definition of "ExtensionFileSource" (#17823)
This commit changes definition of "ExtensionFileSource", by changing
"code" field to being "ExtensionFileSourceCode" enum. Currently the enum
has only a single variant "IncludedInBinary". It is done in preparation
to allow embedders to decide if they want to include the source code in the
binary when snapshotting (in most cases they shouldn't do that).
In the follow up commit we'll add more variants to
"ExtensionFileSourceCode".
"include_js_files_dir!" macro was removed in favor "include_js_files!"
macro which can now accept "dir" option.
Diffstat (limited to 'ext/node/lib.rs')
-rw-r--r-- | ext/node/lib.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/ext/node/lib.rs b/ext/node/lib.rs index 43861ef46..697100c8f 100644 --- a/ext/node/lib.rs +++ b/ext/node/lib.rs @@ -2,7 +2,6 @@ use deno_core::error::AnyError; use deno_core::include_js_files; -use deno_core::include_js_files_dir; use deno_core::located_script_name; use deno_core::op; use deno_core::Extension; @@ -96,7 +95,7 @@ fn op_node_build_os() -> String { } pub fn init_polyfill() -> Extension { - let esm_files = include_js_files_dir!( + let esm_files = include_js_files!( dir "polyfills", "_core.ts", "_crypto/crypto_browserify/asn1.js/base/buffer.js", |