mirror of
https://github.com/denoland/deno.git
synced 2025-09-26 20:29:11 +00:00
fix(cache): cache excluded modules explicitly provided on the command line (#30442)
Some checks are pending
ci / test release linux-x86_64 (push) Blocked by required conditions
ci / test debug macos-x86_64 (push) Blocked by required conditions
ci / test release macos-x86_64 (push) Blocked by required conditions
ci / test debug windows-x86_64 (push) Blocked by required conditions
ci / test release windows-x86_64 (push) Blocked by required conditions
ci / build libs (push) Blocked by required conditions
ci / test release macos-aarch64 (push) Blocked by required conditions
ci / bench release linux-x86_64 (push) Blocked by required conditions
ci / lint debug linux-x86_64 (push) Blocked by required conditions
ci / lint debug macos-x86_64 (push) Blocked by required conditions
ci / lint debug windows-x86_64 (push) Blocked by required conditions
ci / test debug linux-x86_64 (push) Blocked by required conditions
ci / pre-build (push) Waiting to run
ci / test debug linux-aarch64 (push) Blocked by required conditions
ci / test release linux-aarch64 (push) Blocked by required conditions
ci / test debug macos-aarch64 (push) Blocked by required conditions
ci / publish canary (push) Blocked by required conditions
Some checks are pending
ci / test release linux-x86_64 (push) Blocked by required conditions
ci / test debug macos-x86_64 (push) Blocked by required conditions
ci / test release macos-x86_64 (push) Blocked by required conditions
ci / test debug windows-x86_64 (push) Blocked by required conditions
ci / test release windows-x86_64 (push) Blocked by required conditions
ci / build libs (push) Blocked by required conditions
ci / test release macos-aarch64 (push) Blocked by required conditions
ci / bench release linux-x86_64 (push) Blocked by required conditions
ci / lint debug linux-x86_64 (push) Blocked by required conditions
ci / lint debug macos-x86_64 (push) Blocked by required conditions
ci / lint debug windows-x86_64 (push) Blocked by required conditions
ci / test debug linux-x86_64 (push) Blocked by required conditions
ci / pre-build (push) Waiting to run
ci / test debug linux-aarch64 (push) Blocked by required conditions
ci / test release linux-aarch64 (push) Blocked by required conditions
ci / test debug macos-aarch64 (push) Blocked by required conditions
ci / publish canary (push) Blocked by required conditions
This commit is contained in:
parent
75f1a9d5de
commit
ce1d2c8b04
14 changed files with 161 additions and 65 deletions
|
@ -55,6 +55,11 @@ pub struct CheckSpecifiersOptions<'a> {
|
||||||
pub allow_unknown_media_types: bool,
|
pub allow_unknown_media_types: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub struct CollectSpecifiersOptions {
|
||||||
|
/// Whether to include paths that are specified even if they're ignored.
|
||||||
|
pub include_ignored_specified: bool,
|
||||||
|
}
|
||||||
|
|
||||||
impl MainModuleGraphContainer {
|
impl MainModuleGraphContainer {
|
||||||
pub fn new(
|
pub fn new(
|
||||||
cli_options: Arc<CliOptions>,
|
cli_options: Arc<CliOptions>,
|
||||||
|
@ -103,8 +108,9 @@ impl MainModuleGraphContainer {
|
||||||
pub async fn load_and_type_check_files(
|
pub async fn load_and_type_check_files(
|
||||||
&self,
|
&self,
|
||||||
files: &[String],
|
files: &[String],
|
||||||
|
options: CollectSpecifiersOptions,
|
||||||
) -> Result<(), AnyError> {
|
) -> Result<(), AnyError> {
|
||||||
let specifiers = self.collect_specifiers(files)?;
|
let specifiers = self.collect_specifiers(files, options)?;
|
||||||
|
|
||||||
if specifiers.is_empty() {
|
if specifiers.is_empty() {
|
||||||
log::warn!("{} No matching files found.", colors::yellow("Warning"));
|
log::warn!("{} No matching files found.", colors::yellow("Warning"));
|
||||||
|
@ -116,6 +122,7 @@ impl MainModuleGraphContainer {
|
||||||
pub fn collect_specifiers(
|
pub fn collect_specifiers(
|
||||||
&self,
|
&self,
|
||||||
files: &[String],
|
files: &[String],
|
||||||
|
options: CollectSpecifiersOptions,
|
||||||
) -> Result<Vec<ModuleSpecifier>, AnyError> {
|
) -> Result<Vec<ModuleSpecifier>, AnyError> {
|
||||||
let excludes = self.cli_options.workspace().resolve_config_excludes()?;
|
let excludes = self.cli_options.workspace().resolve_config_excludes()?;
|
||||||
let include_patterns =
|
let include_patterns =
|
||||||
|
@ -129,8 +136,14 @@ impl MainModuleGraphContainer {
|
||||||
exclude: excludes,
|
exclude: excludes,
|
||||||
};
|
};
|
||||||
collect_specifiers(
|
collect_specifiers(
|
||||||
|
crate::util::fs::CollectSpecifiersOptions {
|
||||||
file_patterns,
|
file_patterns,
|
||||||
self.cli_options.vendor_dir_path().map(ToOwned::to_owned),
|
vendor_folder: self
|
||||||
|
.cli_options
|
||||||
|
.vendor_dir_path()
|
||||||
|
.map(ToOwned::to_owned),
|
||||||
|
include_ignored_specified: options.include_ignored_specified,
|
||||||
|
},
|
||||||
|e| is_script_ext(e.path),
|
|e| is_script_ext(e.path),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -89,6 +89,7 @@ pub fn init(options: InitLoggingOptions) {
|
||||||
// https://github.com/swc-project/swc/blob/74d6478be1eb8cdf1df096c360c159db64b64d8a/crates/swc_ecma_codegen/src/macros.rs#L112
|
// https://github.com/swc-project/swc/blob/74d6478be1eb8cdf1df096c360c159db64b64d8a/crates/swc_ecma_codegen/src/macros.rs#L112
|
||||||
// We suppress them here to avoid flooding our CI logs in integration tests.
|
// We suppress them here to avoid flooding our CI logs in integration tests.
|
||||||
.filter_module("swc_ecma_codegen", log::LevelFilter::Off)
|
.filter_module("swc_ecma_codegen", log::LevelFilter::Off)
|
||||||
|
.filter_module("swc_common::source_map", log::LevelFilter::Off)
|
||||||
.filter_module("swc_ecma_transforms_optimization", log::LevelFilter::Off)
|
.filter_module("swc_ecma_transforms_optimization", log::LevelFilter::Off)
|
||||||
.filter_module("swc_ecma_parser", log::LevelFilter::Error)
|
.filter_module("swc_ecma_parser", log::LevelFilter::Error)
|
||||||
.filter_module("swc_ecma_lexer", log::LevelFilter::Error)
|
.filter_module("swc_ecma_lexer", log::LevelFilter::Error)
|
||||||
|
|
|
@ -43,6 +43,7 @@ use crate::ops;
|
||||||
use crate::tools::test::TestFilter;
|
use crate::tools::test::TestFilter;
|
||||||
use crate::tools::test::format_test_error;
|
use crate::tools::test::format_test_error;
|
||||||
use crate::util::file_watcher;
|
use crate::util::file_watcher;
|
||||||
|
use crate::util::fs::CollectSpecifiersOptions;
|
||||||
use crate::util::fs::collect_specifiers;
|
use crate::util::fs::collect_specifiers;
|
||||||
use crate::util::path::is_script_ext;
|
use crate::util::path::is_script_ext;
|
||||||
use crate::util::path::matches_pattern_or_exact_path;
|
use crate::util::path::matches_pattern_or_exact_path;
|
||||||
|
@ -452,8 +453,11 @@ pub async fn run_benchmarks(
|
||||||
.iter()
|
.iter()
|
||||||
.map(|(_, bench_options)| {
|
.map(|(_, bench_options)| {
|
||||||
collect_specifiers(
|
collect_specifiers(
|
||||||
bench_options.files.clone(),
|
CollectSpecifiersOptions {
|
||||||
cli_options.vendor_dir_path().map(ToOwned::to_owned),
|
file_patterns: bench_options.files.clone(),
|
||||||
|
vendor_folder: cli_options.vendor_dir_path().map(ToOwned::to_owned),
|
||||||
|
include_ignored_specified: false,
|
||||||
|
},
|
||||||
is_supported_bench_path,
|
is_supported_bench_path,
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
@ -550,8 +554,13 @@ pub async fn run_benchmarks_with_watch(
|
||||||
.iter()
|
.iter()
|
||||||
.map(|(_, bench_options)| {
|
.map(|(_, bench_options)| {
|
||||||
collect_specifiers(
|
collect_specifiers(
|
||||||
bench_options.files.clone(),
|
CollectSpecifiersOptions {
|
||||||
cli_options.vendor_dir_path().map(ToOwned::to_owned),
|
file_patterns: bench_options.files.clone(),
|
||||||
|
vendor_folder: cli_options
|
||||||
|
.vendor_dir_path()
|
||||||
|
.map(ToOwned::to_owned),
|
||||||
|
include_ignored_specified: false,
|
||||||
|
},
|
||||||
is_supported_bench_path,
|
is_supported_bench_path,
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
|
@ -8,6 +8,7 @@ use deno_terminal::colors;
|
||||||
use crate::args::CheckFlags;
|
use crate::args::CheckFlags;
|
||||||
use crate::args::Flags;
|
use crate::args::Flags;
|
||||||
use crate::factory::CliFactory;
|
use crate::factory::CliFactory;
|
||||||
|
use crate::graph_container::CollectSpecifiersOptions;
|
||||||
use crate::util::extract;
|
use crate::util::extract;
|
||||||
|
|
||||||
pub async fn check(
|
pub async fn check(
|
||||||
|
@ -18,8 +19,12 @@ pub async fn check(
|
||||||
|
|
||||||
let main_graph_container = factory.main_module_graph_container().await?;
|
let main_graph_container = factory.main_module_graph_container().await?;
|
||||||
|
|
||||||
let specifiers =
|
let specifiers = main_graph_container.collect_specifiers(
|
||||||
main_graph_container.collect_specifiers(&check_flags.files)?;
|
&check_flags.files,
|
||||||
|
CollectSpecifiersOptions {
|
||||||
|
include_ignored_specified: false,
|
||||||
|
},
|
||||||
|
)?;
|
||||||
if specifiers.is_empty() {
|
if specifiers.is_empty() {
|
||||||
log::warn!("{} No matching files found.", colors::yellow("Warning"));
|
log::warn!("{} No matching files found.", colors::yellow("Warning"));
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,6 +25,7 @@ use crate::args::Flags;
|
||||||
use crate::colors;
|
use crate::colors;
|
||||||
use crate::display;
|
use crate::display;
|
||||||
use crate::factory::CliFactory;
|
use crate::factory::CliFactory;
|
||||||
|
use crate::graph_container::CollectSpecifiersOptions;
|
||||||
use crate::graph_container::ModuleGraphContainer;
|
use crate::graph_container::ModuleGraphContainer;
|
||||||
use crate::graph_container::ModuleGraphUpdatePermit;
|
use crate::graph_container::ModuleGraphUpdatePermit;
|
||||||
use crate::graph_util::BuildGraphRequest;
|
use crate::graph_util::BuildGraphRequest;
|
||||||
|
@ -207,7 +208,12 @@ async fn clean_except(
|
||||||
let sys = factory.sys();
|
let sys = factory.sys();
|
||||||
let options = factory.cli_options()?;
|
let options = factory.cli_options()?;
|
||||||
let main_graph_container = factory.main_module_graph_container().await?;
|
let main_graph_container = factory.main_module_graph_container().await?;
|
||||||
let roots = main_graph_container.collect_specifiers(entrypoints)?;
|
let roots = main_graph_container.collect_specifiers(
|
||||||
|
entrypoints,
|
||||||
|
CollectSpecifiersOptions {
|
||||||
|
include_ignored_specified: true,
|
||||||
|
},
|
||||||
|
)?;
|
||||||
let http_cache = factory.global_http_cache()?;
|
let http_cache = factory.global_http_cache()?;
|
||||||
let local_or_global_http_cache = factory.http_cache()?.clone();
|
let local_or_global_http_cache = factory.http_cache()?.clone();
|
||||||
let deno_dir = factory.deno_dir()?.clone();
|
let deno_dir = factory.deno_dir()?.clone();
|
||||||
|
|
|
@ -39,6 +39,7 @@ use crate::graph_util::graph_exit_integrity_errors;
|
||||||
use crate::graph_util::graph_walk_errors;
|
use crate::graph_util::graph_walk_errors;
|
||||||
use crate::sys::CliSys;
|
use crate::sys::CliSys;
|
||||||
use crate::tsc::get_types_declaration_file_text;
|
use crate::tsc::get_types_declaration_file_text;
|
||||||
|
use crate::util::fs::CollectSpecifiersOptions;
|
||||||
use crate::util::fs::collect_specifiers;
|
use crate::util::fs::collect_specifiers;
|
||||||
|
|
||||||
const JSON_SCHEMA_VERSION: u8 = 1;
|
const JSON_SCHEMA_VERSION: u8 = 1;
|
||||||
|
@ -127,7 +128,8 @@ pub async fn doc(
|
||||||
let sys = CliSys::default();
|
let sys = CliSys::default();
|
||||||
|
|
||||||
let module_specifiers = collect_specifiers(
|
let module_specifiers = collect_specifiers(
|
||||||
FilePatterns {
|
CollectSpecifiersOptions {
|
||||||
|
file_patterns: FilePatterns {
|
||||||
base: cli_options.initial_cwd().to_path_buf(),
|
base: cli_options.initial_cwd().to_path_buf(),
|
||||||
include: Some(
|
include: Some(
|
||||||
PathOrPatternSet::from_include_relative_path_or_patterns(
|
PathOrPatternSet::from_include_relative_path_or_patterns(
|
||||||
|
@ -137,7 +139,9 @@ pub async fn doc(
|
||||||
),
|
),
|
||||||
exclude: Default::default(),
|
exclude: Default::default(),
|
||||||
},
|
},
|
||||||
cli_options.vendor_dir_path().map(ToOwned::to_owned),
|
vendor_folder: cli_options.vendor_dir_path().map(ToOwned::to_owned),
|
||||||
|
include_ignored_specified: false,
|
||||||
|
},
|
||||||
|_| true,
|
|_| true,
|
||||||
)?;
|
)?;
|
||||||
let graph = module_graph_creator
|
let graph = module_graph_creator
|
||||||
|
|
|
@ -39,6 +39,7 @@ use crate::args::resolve_no_prompt;
|
||||||
use crate::factory::CliFactory;
|
use crate::factory::CliFactory;
|
||||||
use crate::file_fetcher::CreateCliFileFetcherOptions;
|
use crate::file_fetcher::CreateCliFileFetcherOptions;
|
||||||
use crate::file_fetcher::create_cli_file_fetcher;
|
use crate::file_fetcher::create_cli_file_fetcher;
|
||||||
|
use crate::graph_container::CollectSpecifiersOptions;
|
||||||
use crate::graph_container::ModuleGraphContainer;
|
use crate::graph_container::ModuleGraphContainer;
|
||||||
use crate::jsr::JsrFetchResolver;
|
use crate::jsr::JsrFetchResolver;
|
||||||
use crate::npm::NpmFetchResolver;
|
use crate::npm::NpmFetchResolver;
|
||||||
|
@ -231,7 +232,12 @@ pub(crate) async fn install_from_entrypoints(
|
||||||
let factory = CliFactory::from_flags(flags.clone());
|
let factory = CliFactory::from_flags(flags.clone());
|
||||||
let emitter = factory.emitter()?;
|
let emitter = factory.emitter()?;
|
||||||
let main_graph_container = factory.main_module_graph_container().await?;
|
let main_graph_container = factory.main_module_graph_container().await?;
|
||||||
let specifiers = main_graph_container.collect_specifiers(entrypoints)?;
|
let specifiers = main_graph_container.collect_specifiers(
|
||||||
|
entrypoints,
|
||||||
|
CollectSpecifiersOptions {
|
||||||
|
include_ignored_specified: true,
|
||||||
|
},
|
||||||
|
)?;
|
||||||
main_graph_container
|
main_graph_container
|
||||||
.check_specifiers(
|
.check_specifiers(
|
||||||
&specifiers,
|
&specifiers,
|
||||||
|
@ -371,9 +377,12 @@ async fn install_global(
|
||||||
factory
|
factory
|
||||||
.main_module_graph_container()
|
.main_module_graph_container()
|
||||||
.await?
|
.await?
|
||||||
.load_and_type_check_files(std::slice::from_ref(
|
.load_and_type_check_files(
|
||||||
&install_flags_global.module_url,
|
std::slice::from_ref(&install_flags_global.module_url),
|
||||||
))
|
CollectSpecifiersOptions {
|
||||||
|
include_ignored_specified: true,
|
||||||
|
},
|
||||||
|
)
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
if matches!(flags.config_flag, ConfigFlag::Discover)
|
if matches!(flags.config_flag, ConfigFlag::Discover)
|
||||||
|
|
|
@ -81,6 +81,7 @@ use crate::graph_util::has_graph_root_local_dependent_changed;
|
||||||
use crate::ops;
|
use crate::ops;
|
||||||
use crate::util::extract::extract_doc_tests;
|
use crate::util::extract::extract_doc_tests;
|
||||||
use crate::util::file_watcher;
|
use crate::util::file_watcher;
|
||||||
|
use crate::util::fs::CollectSpecifiersOptions;
|
||||||
use crate::util::fs::collect_specifiers;
|
use crate::util::fs::collect_specifiers;
|
||||||
use crate::util::path::get_extension;
|
use crate::util::path::get_extension;
|
||||||
use crate::util::path::is_script_ext;
|
use crate::util::path::is_script_ext;
|
||||||
|
@ -1537,15 +1538,21 @@ fn collect_specifiers_with_test_mode(
|
||||||
// todo(dsherret): there's no need to collect twice as it's slow
|
// todo(dsherret): there's no need to collect twice as it's slow
|
||||||
let vendor_folder = cli_options.vendor_dir_path();
|
let vendor_folder = cli_options.vendor_dir_path();
|
||||||
let module_specifiers = collect_specifiers(
|
let module_specifiers = collect_specifiers(
|
||||||
files.clone(),
|
CollectSpecifiersOptions {
|
||||||
vendor_folder.map(ToOwned::to_owned),
|
file_patterns: files.clone(),
|
||||||
|
vendor_folder: vendor_folder.map(ToOwned::to_owned),
|
||||||
|
include_ignored_specified: false,
|
||||||
|
},
|
||||||
is_supported_test_path_predicate,
|
is_supported_test_path_predicate,
|
||||||
)?;
|
)?;
|
||||||
|
|
||||||
if *include_inline {
|
if *include_inline {
|
||||||
return collect_specifiers(
|
return collect_specifiers(
|
||||||
files,
|
CollectSpecifiersOptions {
|
||||||
vendor_folder.map(ToOwned::to_owned),
|
file_patterns: files,
|
||||||
|
vendor_folder: vendor_folder.map(ToOwned::to_owned),
|
||||||
|
include_ignored_specified: false,
|
||||||
|
},
|
||||||
|e| is_supported_test_ext(e.path),
|
|e| is_supported_test_ext(e.path),
|
||||||
)
|
)
|
||||||
.map(|specifiers| {
|
.map(|specifiers| {
|
||||||
|
@ -1787,8 +1794,13 @@ pub async fn run_tests_with_watch(
|
||||||
.iter()
|
.iter()
|
||||||
.map(|(_, test_options)| {
|
.map(|(_, test_options)| {
|
||||||
collect_specifiers(
|
collect_specifiers(
|
||||||
test_options.files.clone(),
|
CollectSpecifiersOptions {
|
||||||
cli_options.vendor_dir_path().map(ToOwned::to_owned),
|
file_patterns: test_options.files.clone(),
|
||||||
|
vendor_folder: cli_options
|
||||||
|
.vendor_dir_path()
|
||||||
|
.map(ToOwned::to_owned),
|
||||||
|
include_ignored_specified: false,
|
||||||
|
},
|
||||||
if workspace_test_options.doc {
|
if workspace_test_options.doc {
|
||||||
Box::new(|e: WalkEntry| is_supported_test_ext(e.path))
|
Box::new(|e: WalkEntry| is_supported_test_ext(e.path))
|
||||||
as Box<dyn Fn(WalkEntry) -> bool>
|
as Box<dyn Fn(WalkEntry) -> bool>
|
||||||
|
|
|
@ -74,18 +74,29 @@ pub fn canonicalize_path_maybe_not_exists(
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub struct CollectSpecifiersOptions {
|
||||||
|
pub file_patterns: FilePatterns,
|
||||||
|
pub vendor_folder: Option<PathBuf>,
|
||||||
|
/// Whether to include paths that are specified even if they're ignored.
|
||||||
|
pub include_ignored_specified: bool,
|
||||||
|
}
|
||||||
|
|
||||||
/// Collects module specifiers that satisfy the given predicate as a file path, by recursively walking `include`.
|
/// Collects module specifiers that satisfy the given predicate as a file path, by recursively walking `include`.
|
||||||
/// Specifiers that start with http and https are left intact.
|
/// Specifiers that start with http and https are left intact.
|
||||||
/// Note: This ignores all .git and node_modules folders.
|
/// Note: This ignores all .git and node_modules folders.
|
||||||
pub fn collect_specifiers(
|
pub fn collect_specifiers(
|
||||||
mut files: FilePatterns,
|
options: CollectSpecifiersOptions,
|
||||||
vendor_folder: Option<PathBuf>,
|
|
||||||
predicate: impl Fn(WalkEntry) -> bool,
|
predicate: impl Fn(WalkEntry) -> bool,
|
||||||
) -> Result<Vec<ModuleSpecifier>, AnyError> {
|
) -> Result<Vec<ModuleSpecifier>, AnyError> {
|
||||||
|
let CollectSpecifiersOptions {
|
||||||
|
mut file_patterns,
|
||||||
|
vendor_folder,
|
||||||
|
include_ignored_specified: always_include_specified,
|
||||||
|
} = options;
|
||||||
let mut prepared = vec![];
|
let mut prepared = vec![];
|
||||||
|
|
||||||
// break out the remote specifiers
|
// break out the remote specifiers and explicitly specified paths
|
||||||
if let Some(include_mut) = &mut files.include {
|
if let Some(include_mut) = &mut file_patterns.include {
|
||||||
let includes = std::mem::take(include_mut);
|
let includes = std::mem::take(include_mut);
|
||||||
let path_or_patterns = includes.into_path_or_patterns();
|
let path_or_patterns = includes.into_path_or_patterns();
|
||||||
let mut result = Vec::with_capacity(path_or_patterns.len());
|
let mut result = Vec::with_capacity(path_or_patterns.len());
|
||||||
|
@ -94,7 +105,9 @@ pub fn collect_specifiers(
|
||||||
PathOrPattern::Path(path) => {
|
PathOrPattern::Path(path) => {
|
||||||
if path.is_dir() {
|
if path.is_dir() {
|
||||||
result.push(PathOrPattern::Path(path));
|
result.push(PathOrPattern::Path(path));
|
||||||
} else if !files.exclude.matches_path(&path) {
|
} else if always_include_specified
|
||||||
|
|| !file_patterns.exclude.matches_path(&path)
|
||||||
|
{
|
||||||
let url = specifier_from_file_path(&path)?;
|
let url = specifier_from_file_path(&path)?;
|
||||||
prepared.push(url);
|
prepared.push(url);
|
||||||
}
|
}
|
||||||
|
@ -119,7 +132,7 @@ pub fn collect_specifiers(
|
||||||
.ignore_git_folder()
|
.ignore_git_folder()
|
||||||
.ignore_node_modules()
|
.ignore_node_modules()
|
||||||
.set_vendor_folder(vendor_folder)
|
.set_vendor_folder(vendor_folder)
|
||||||
.collect_file_patterns(&CliSys::default(), files);
|
.collect_file_patterns(&CliSys::default(), file_patterns);
|
||||||
let mut collected_files_as_urls = collected_files
|
let mut collected_files_as_urls = collected_files
|
||||||
.iter()
|
.iter()
|
||||||
.map(|f| specifier_from_file_path(f).unwrap())
|
.map(|f| specifier_from_file_path(f).unwrap())
|
||||||
|
@ -217,7 +230,8 @@ mod tests {
|
||||||
};
|
};
|
||||||
|
|
||||||
let result = collect_specifiers(
|
let result = collect_specifiers(
|
||||||
FilePatterns {
|
CollectSpecifiersOptions {
|
||||||
|
file_patterns: FilePatterns {
|
||||||
base: root_dir_path.to_path_buf(),
|
base: root_dir_path.to_path_buf(),
|
||||||
include: Some(
|
include: Some(
|
||||||
PathOrPatternSet::from_include_relative_path_or_patterns(
|
PathOrPatternSet::from_include_relative_path_or_patterns(
|
||||||
|
@ -234,7 +248,9 @@ mod tests {
|
||||||
ignore_dir_path.to_path_buf(),
|
ignore_dir_path.to_path_buf(),
|
||||||
)]),
|
)]),
|
||||||
},
|
},
|
||||||
None,
|
vendor_folder: None,
|
||||||
|
include_ignored_specified: false,
|
||||||
|
},
|
||||||
predicate,
|
predicate,
|
||||||
)
|
)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
@ -268,7 +284,8 @@ mod tests {
|
||||||
"file://"
|
"file://"
|
||||||
};
|
};
|
||||||
let result = collect_specifiers(
|
let result = collect_specifiers(
|
||||||
FilePatterns {
|
CollectSpecifiersOptions {
|
||||||
|
file_patterns: FilePatterns {
|
||||||
base: root_dir_path.to_path_buf(),
|
base: root_dir_path.to_path_buf(),
|
||||||
include: Some(PathOrPatternSet::new(vec![
|
include: Some(PathOrPatternSet::new(vec![
|
||||||
PathOrPattern::new(&format!(
|
PathOrPattern::new(&format!(
|
||||||
|
@ -280,7 +297,9 @@ mod tests {
|
||||||
])),
|
])),
|
||||||
exclude: Default::default(),
|
exclude: Default::default(),
|
||||||
},
|
},
|
||||||
None,
|
vendor_folder: None,
|
||||||
|
include_ignored_specified: false,
|
||||||
|
},
|
||||||
predicate,
|
predicate,
|
||||||
)
|
)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
4
tests/specs/install/entrypoint_ignored/__test__.jsonc
Normal file
4
tests/specs/install/entrypoint_ignored/__test__.jsonc
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"args": "install --allow-import -e ignore/main.ts",
|
||||||
|
"output": "install.out"
|
||||||
|
}
|
5
tests/specs/install/entrypoint_ignored/deno.json
Normal file
5
tests/specs/install/entrypoint_ignored/deno.json
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"exclude": [
|
||||||
|
"ignore"
|
||||||
|
]
|
||||||
|
}
|
6
tests/specs/install/entrypoint_ignored/deno.lock
generated
Normal file
6
tests/specs/install/entrypoint_ignored/deno.lock
generated
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"version": "5",
|
||||||
|
"remote": {
|
||||||
|
"http://localhost:4545/welcome.ts": "7353d5fcbc36c45d26bcbca478cf973092523b07c45999f41319820092b4de31"
|
||||||
|
}
|
||||||
|
}
|
1
tests/specs/install/entrypoint_ignored/ignore/main.ts
Normal file
1
tests/specs/install/entrypoint_ignored/ignore/main.ts
Normal file
|
@ -0,0 +1 @@
|
||||||
|
import "http://localhost:4545/welcome.ts";
|
2
tests/specs/install/entrypoint_ignored/install.out
Normal file
2
tests/specs/install/entrypoint_ignored/install.out
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
Download http://localhost:4545/welcome.ts
|
||||||
|
[WILDCARD]
|
Loading…
Add table
Add a link
Reference in a new issue