mirror of
https://github.com/denoland/deno.git
synced 2025-08-04 10:59:13 +00:00
feat(npm): support bare specifiers from package.json in more subcommands and language server (#17891)
This commit is contained in:
parent
214bdbbc2b
commit
344317ec50
41 changed files with 472 additions and 95 deletions
|
@ -2,7 +2,6 @@
|
|||
|
||||
use crate::args::ConfigFlag;
|
||||
use crate::args::Flags;
|
||||
use crate::args::TaskFlags;
|
||||
use crate::util::fs::canonicalize_path;
|
||||
use crate::util::path::specifier_parent;
|
||||
use crate::util::path::specifier_to_file_path;
|
||||
|
@ -508,18 +507,6 @@ impl ConfigFile {
|
|||
return Ok(Some(cf));
|
||||
}
|
||||
}
|
||||
// attempt to resolve the config file from the task subcommand's
|
||||
// `--cwd` when specified
|
||||
if let crate::args::DenoSubcommand::Task(TaskFlags {
|
||||
cwd: Some(path),
|
||||
..
|
||||
}) = &flags.subcommand
|
||||
{
|
||||
let task_cwd = canonicalize_path(&PathBuf::from(path))?;
|
||||
if let Some(path) = Self::discover_from(&task_cwd, &mut checked)? {
|
||||
return Ok(Some(path));
|
||||
}
|
||||
};
|
||||
// From CWD walk up to root looking for deno.json or deno.jsonc
|
||||
Self::discover_from(cwd, &mut checked)
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue