summaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
authorDivy Srivastava <dj.srivastava23@gmail.com>2024-07-05 05:17:53 -0700
committerGitHub <noreply@github.com>2024-07-05 17:47:53 +0530
commit233e5f6feae62e2ddc4d4046479759bd0a09b3aa (patch)
treec7879ebaa3e8d30748ff196c5e46ddb0909fd81e /cli
parent08e5606c3400d3a993c0ce6748901c56fc3db35b (diff)
chore: rename `__runtime_js_source` to `hmr` (#24442)
Saves some keystrokes and easy to remember ``` cargo b --features hmr ```
Diffstat (limited to 'cli')
-rw-r--r--cli/Cargo.toml2
-rw-r--r--cli/build.rs4
-rw-r--r--cli/js.rs6
3 files changed, 6 insertions, 6 deletions
diff --git a/cli/Cargo.toml b/cli/Cargo.toml
index 31232e093..144de919d 100644
--- a/cli/Cargo.toml
+++ b/cli/Cargo.toml
@@ -44,7 +44,7 @@ default = ["upgrade", "__vendored_zlib_ng"]
upgrade = []
# A dev feature to disable creations and loading of snapshots in favor of
# loading JS sources at runtime.
-__runtime_js_sources = ["deno_runtime/__runtime_js_sources"]
+hmr = ["deno_runtime/hmr"]
# Vendor zlib as zlib-ng
__vendored_zlib_ng = ["flate2/zlib-ng-compat", "libz-sys/zlib-ng"]
diff --git a/cli/build.rs b/cli/build.rs
index eca254fa2..4fe6fd1ea 100644
--- a/cli/build.rs
+++ b/cli/build.rs
@@ -325,7 +325,7 @@ mod ts {
}
}
-#[cfg(not(feature = "__runtime_js_sources"))]
+#[cfg(not(feature = "hmr"))]
fn create_cli_snapshot(snapshot_path: PathBuf) {
use deno_runtime::ops::bootstrap::SnapshotOptions;
@@ -469,7 +469,7 @@ fn main() {
let compiler_snapshot_path = o.join("COMPILER_SNAPSHOT.bin");
ts::create_compiler_snapshot(compiler_snapshot_path, &c);
- #[cfg(not(feature = "__runtime_js_sources"))]
+ #[cfg(not(feature = "hmr"))]
{
let cli_snapshot_path = o.join("CLI_SNAPSHOT.bin");
create_cli_snapshot(cli_snapshot_path);
diff --git a/cli/js.rs b/cli/js.rs
index 85485689b..2c93f004c 100644
--- a/cli/js.rs
+++ b/cli/js.rs
@@ -2,17 +2,17 @@
use log::debug;
-#[cfg(not(feature = "__runtime_js_sources"))]
+#[cfg(not(feature = "hmr"))]
static CLI_SNAPSHOT: &[u8] =
include_bytes!(concat!(env!("OUT_DIR"), "/CLI_SNAPSHOT.bin"));
pub fn deno_isolate_init() -> Option<&'static [u8]> {
debug!("Deno isolate init with snapshots.");
- #[cfg(not(feature = "__runtime_js_sources"))]
+ #[cfg(not(feature = "hmr"))]
{
Some(CLI_SNAPSHOT)
}
- #[cfg(feature = "__runtime_js_sources")]
+ #[cfg(feature = "hmr")]
{
None
}