mirror of
https://github.com/denoland/deno.git
synced 2025-02-01 12:16:11 -05:00
679902a108
Extracted out of https://github.com/denoland/deno/pull/27838/files Reduces some allocations by accepting either a pathbuf or url for the referrer for resolution and returning either a pathbuf or url at the end, which the caller can then convert into to their preferred state. This is about 4% faster when still converting the final result to a url and 6% faster when keeping the result as a path in a benchmark I ran.
38 lines
1.2 KiB
Rust
38 lines
1.2 KiB
Rust
// Copyright 2018-2025 the Deno authors. MIT license.
|
|
|
|
#![deny(clippy::print_stderr)]
|
|
#![deny(clippy::print_stdout)]
|
|
|
|
pub mod analyze;
|
|
mod builtin_modules;
|
|
pub mod errors;
|
|
mod npm;
|
|
mod package_json;
|
|
mod path;
|
|
mod resolution;
|
|
|
|
mod sync;
|
|
|
|
pub use builtin_modules::DenoIsBuiltInNodeModuleChecker;
|
|
pub use builtin_modules::IsBuiltInNodeModuleChecker;
|
|
pub use builtin_modules::DENO_SUPPORTED_BUILTIN_NODE_MODULES;
|
|
pub use deno_package_json::PackageJson;
|
|
pub use npm::InNpmPackageChecker;
|
|
pub use npm::NpmPackageFolderResolver;
|
|
pub use package_json::PackageJsonCacheRc;
|
|
pub use package_json::PackageJsonResolver;
|
|
pub use package_json::PackageJsonResolverRc;
|
|
pub use package_json::PackageJsonThreadLocalCache;
|
|
pub use path::PathClean;
|
|
pub use path::UrlOrPath;
|
|
pub use path::UrlOrPathRef;
|
|
pub use resolution::parse_npm_pkg_name;
|
|
pub use resolution::resolve_specifier_into_node_modules;
|
|
pub use resolution::ConditionsFromResolutionMode;
|
|
pub use resolution::NodeResolution;
|
|
pub use resolution::NodeResolutionKind;
|
|
pub use resolution::NodeResolver;
|
|
pub use resolution::NodeResolverRc;
|
|
pub use resolution::ResolutionMode;
|
|
pub use resolution::DEFAULT_CONDITIONS;
|
|
pub use resolution::REQUIRE_CONDITIONS;
|