mirror of
https://github.com/denoland/deno.git
synced 2024-12-01 16:51:13 -05:00
refactor: Improve placeholder module names (#7430)
This commit is contained in:
parent
60dbc6b294
commit
5276cc8592
2 changed files with 5 additions and 7 deletions
|
@ -223,7 +223,7 @@ async fn lint_command(
|
||||||
|
|
||||||
async fn cache_command(flags: Flags, files: Vec<String>) -> Result<(), ErrBox> {
|
async fn cache_command(flags: Flags, files: Vec<String>) -> Result<(), ErrBox> {
|
||||||
let main_module =
|
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 global_state = GlobalState::new(flags)?;
|
||||||
let mut worker = MainWorker::create(&global_state, main_module.clone())?;
|
let mut worker = MainWorker::create(&global_state, main_module.clone())?;
|
||||||
|
|
||||||
|
@ -245,7 +245,7 @@ async fn eval_command(
|
||||||
) -> Result<(), ErrBox> {
|
) -> Result<(), ErrBox> {
|
||||||
// Force TypeScript compile.
|
// Force TypeScript compile.
|
||||||
let main_module =
|
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 global_state = GlobalState::new(flags)?;
|
||||||
let mut worker = MainWorker::create(&global_state, main_module.clone())?;
|
let mut worker = MainWorker::create(&global_state, main_module.clone())?;
|
||||||
let main_module_url = main_module.as_url().to_owned();
|
let main_module_url = main_module.as_url().to_owned();
|
||||||
|
@ -430,7 +430,7 @@ async fn doc_command(
|
||||||
|
|
||||||
async fn run_repl(flags: Flags) -> Result<(), ErrBox> {
|
async fn run_repl(flags: Flags) -> Result<(), ErrBox> {
|
||||||
let main_module =
|
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 global_state = GlobalState::new(flags)?;
|
||||||
let mut worker = MainWorker::create(&global_state, main_module)?;
|
let mut worker = MainWorker::create(&global_state, main_module)?;
|
||||||
loop {
|
loop {
|
||||||
|
@ -441,7 +441,7 @@ async fn run_repl(flags: Flags) -> Result<(), ErrBox> {
|
||||||
async fn run_from_stdin(flags: Flags) -> Result<(), ErrBox> {
|
async fn run_from_stdin(flags: Flags) -> Result<(), ErrBox> {
|
||||||
let global_state = GlobalState::new(flags.clone())?;
|
let global_state = GlobalState::new(flags.clone())?;
|
||||||
let main_module =
|
let main_module =
|
||||||
ModuleSpecifier::resolve_url_or_path("./__$deno$stdin.ts").unwrap();
|
ModuleSpecifier::resolve_url_or_path("./$deno$stdin.ts").unwrap();
|
||||||
let mut worker =
|
let mut worker =
|
||||||
MainWorker::create(&global_state.clone(), main_module.clone())?;
|
MainWorker::create(&global_state.clone(), main_module.clone())?;
|
||||||
|
|
||||||
|
|
|
@ -216,10 +216,8 @@ fn create_compiler_worker(
|
||||||
global_state: &Arc<GlobalState>,
|
global_state: &Arc<GlobalState>,
|
||||||
permissions: Permissions,
|
permissions: Permissions,
|
||||||
) -> CompilerWorker {
|
) -> CompilerWorker {
|
||||||
// TODO(bartlomieju): these $deno$ specifiers should be unified for all subcommands
|
|
||||||
// like 'eval', 'repl'
|
|
||||||
let entry_point =
|
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 =
|
let worker_state =
|
||||||
State::new(&global_state, Some(permissions), entry_point, None, true)
|
State::new(&global_state, Some(permissions), entry_point, None, true)
|
||||||
.expect("Unable to create worker state");
|
.expect("Unable to create worker state");
|
||||||
|
|
Loading…
Reference in a new issue