Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Improve placeholder module names #7430

Merged
merged 1 commit into from
Sep 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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