summaryrefslogtreecommitdiff
path: root/cli/tools/init/mod.rs
diff options
context:
space:
mode:
authorBartek Iwańczuk <biwanczuk@gmail.com>2024-03-27 17:51:52 +0000
committerGitHub <noreply@github.com>2024-03-27 18:51:52 +0100
commit0e4d1cb5f9a3645f6da480b2b8540568fa69d675 (patch)
tree8d2a029a40d86f93110a825ab5d05c9bd28135da /cli/tools/init/mod.rs
parent624e3a04e7eb92d5ce3536cec653d7aae92df5b5 (diff)
feat(init): use jsr specifier for @std/assert (#23073)
This commit changes "deno init" subcommand to use "jsr:" specifier for standard library "assert" module. It is unversioned, but we will change it to `@^1` once `@std/assert` release version 1.0. This allows us to start decoupling `deno` and `deno_std` release. The release scripts have been updated to take that into account.
Diffstat (limited to 'cli/tools/init/mod.rs')
-rw-r--r--cli/tools/init/mod.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/cli/tools/init/mod.rs b/cli/tools/init/mod.rs
index 7222a762f..fb2e6e7af 100644
--- a/cli/tools/init/mod.rs
+++ b/cli/tools/init/mod.rs
@@ -2,7 +2,6 @@
use crate::args::InitFlags;
use crate::colors;
-use crate::deno_std;
use deno_core::anyhow::Context;
use deno_core::error::AnyError;
use log::info;
@@ -46,9 +45,11 @@ pub fn init_project(init_flags: InitFlags) -> Result<(), AnyError> {
let main_ts = include_str!("./templates/main.ts");
create_file(&dir, "main.ts", main_ts)?;
- let main_test_ts = include_str!("./templates/main_test.ts")
- .replace("{CURRENT_STD_URL}", deno_std::CURRENT_STD_URL_STR);
- create_file(&dir, "main_test.ts", &main_test_ts)?;
+ create_file(
+ &dir,
+ "main_test.ts",
+ include_str!("./templates/main_test.ts"),
+ )?;
create_file(&dir, "deno.json", include_str!("./templates/deno.json"))?;
info!("✅ {}", colors::green("Project initialized"));