Skip to content

Commit

Permalink
refactor: Improve placeholder module names (#7430)
Browse files Browse the repository at this point in the history
  • Loading branch information
nayeemrmn committed Sep 12, 2020
1 parent 60dbc6b commit 5276cc8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
8 changes: 4 additions & 4 deletions cli/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ async fn lint_command(

async fn cache_command(flags: Flags, files: Vec<String>) -> Result<(), ErrBox> {
let main_module =
ModuleSpecifier::resolve_url_or_path("./__$deno$fetch.ts").unwrap();
ModuleSpecifier::resolve_url_or_path("./$deno$cache.ts").unwrap();
let global_state = GlobalState::new(flags)?;
let mut worker = MainWorker::create(&global_state, main_module.clone())?;

Expand All @@ -245,7 +245,7 @@ async fn eval_command(
) -> Result<(), ErrBox> {
// Force TypeScript compile.
let main_module =
ModuleSpecifier::resolve_url_or_path("./__$deno$eval.ts").unwrap();
ModuleSpecifier::resolve_url_or_path("./$deno$eval.ts").unwrap();
let global_state = GlobalState::new(flags)?;
let mut worker = MainWorker::create(&global_state, main_module.clone())?;
let main_module_url = main_module.as_url().to_owned();
Expand Down Expand Up @@ -430,7 +430,7 @@ async fn doc_command(

async fn run_repl(flags: Flags) -> Result<(), ErrBox> {
let main_module =
ModuleSpecifier::resolve_url_or_path("./__$deno$repl.ts").unwrap();
ModuleSpecifier::resolve_url_or_path("./$deno$repl.ts").unwrap();
let global_state = GlobalState::new(flags)?;
let mut worker = MainWorker::create(&global_state, main_module)?;
loop {
Expand All @@ -441,7 +441,7 @@ async fn run_repl(flags: Flags) -> Result<(), ErrBox> {
async fn run_from_stdin(flags: Flags) -> Result<(), ErrBox> {
let global_state = GlobalState::new(flags.clone())?;
let main_module =
ModuleSpecifier::resolve_url_or_path("./__$deno$stdin.ts").unwrap();
ModuleSpecifier::resolve_url_or_path("./$deno$stdin.ts").unwrap();
let mut worker =
MainWorker::create(&global_state.clone(), main_module.clone())?;

Expand Down
4 changes: 1 addition & 3 deletions cli/tsc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -216,10 +216,8 @@ fn create_compiler_worker(
global_state: &Arc<GlobalState>,
permissions: Permissions,
) -> CompilerWorker {
// TODO(bartlomieju): these $deno$ specifiers should be unified for all subcommands
// like 'eval', 'repl'
let entry_point =
ModuleSpecifier::resolve_url_or_path("./__$deno$ts_compiler.ts").unwrap();
ModuleSpecifier::resolve_url_or_path("./$deno$compiler.ts").unwrap();
let worker_state =
State::new(&global_state, Some(permissions), entry_point, None, true)
.expect("Unable to create worker state");
Expand Down

0 comments on commit 5276cc8

Please sign in to comment.