mirror of
https://github.com/denoland/deno.git
synced 2025-02-01 12:16:11 -05:00
273ec9fbf2
Allows easily constructing a `DenoResolver` using the exact same logic that we use in the CLI (useful for dnt and for external bundlers). This code is then used in the CLI to ensure the logic is always up-to-date. ```rs use std::rc::Rc; use deno_resolver:🏭:ResolverFactory; use deno_resolver:🏭:WorkspaceFactory; use sys_traits::impls::RealSys; let sys = RealSys; let cwd = sys.env_current_dir()?; let workspace_factory = Rc::new(WorkspaceFactory::new(sys, cwd, Default::default())); let resolver_factory = ResolverFactory::new(workspace_factory.clone(), Default::default()); let deno_resolver = resolver_factory.deno_resolver().await?; ```
45 lines
1.1 KiB
TOML
45 lines
1.1 KiB
TOML
# Copyright 2018-2025 the Deno authors. MIT license.
|
|
|
|
[package]
|
|
name = "deno_resolver"
|
|
version = "0.18.0"
|
|
authors.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
readme = "README.md"
|
|
repository.workspace = true
|
|
description = "Deno resolution algorithm"
|
|
|
|
[lib]
|
|
path = "lib.rs"
|
|
|
|
[features]
|
|
sync = ["dashmap", "deno_package_json/sync", "node_resolver/sync", "deno_config/sync", "deno_cache_dir/sync"]
|
|
|
|
[dependencies]
|
|
anyhow.workspace = true
|
|
async-once-cell.workspace = true
|
|
async-trait.workspace = true
|
|
base32.workspace = true
|
|
boxed_error.workspace = true
|
|
dashmap = { workspace = true, optional = true }
|
|
deno_cache_dir.workspace = true
|
|
deno_config.workspace = true
|
|
deno_error.workspace = true
|
|
deno_media_type.workspace = true
|
|
deno_npm.workspace = true
|
|
deno_package_json.workspace = true
|
|
deno_path_util.workspace = true
|
|
deno_semver.workspace = true
|
|
deno_terminal.workspace = true
|
|
futures.workspace = true
|
|
log.workspace = true
|
|
node_resolver.workspace = true
|
|
once_cell.workspace = true
|
|
parking_lot.workspace = true
|
|
sys_traits.workspace = true
|
|
thiserror.workspace = true
|
|
url.workspace = true
|
|
|
|
[dev-dependencies]
|
|
test_util.workspace = true
|