diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2024-03-07 20:16:32 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-07 20:16:32 -0500 |
commit | 2dfc0aca7c6a04d54fe6f9a73be70fc4c591d552 (patch) | |
tree | 58fb01c46364e4888097e7135b2f829f38ce990c /cli/tools/doc.rs | |
parent | 2ed984ba3aa638c3f088ac1edc5c779c7d9195d1 (diff) |
fix(publish): make include and exclude work (#22720)
1. Stops `deno publish` using some custom include/exclude behaviour from
other sub commands
2. Takes ancestor directories into account when resolving gitignore
3. Backards compatible change that adds ability to unexclude an exclude
by using a negated glob at a more specific level for all sub commands
(see https://github.com/denoland/deno_config/pull/44).
Diffstat (limited to 'cli/tools/doc.rs')
-rw-r--r-- | cli/tools/doc.rs | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/cli/tools/doc.rs b/cli/tools/doc.rs index 0b7b26e31..013a407aa 100644 --- a/cli/tools/doc.rs +++ b/cli/tools/doc.rs @@ -96,13 +96,15 @@ pub async fn doc(flags: Flags, doc_flags: DocFlags) -> Result<(), AnyError> { let module_specifiers = collect_specifiers( FilePatterns { base: cli_options.initial_cwd().to_path_buf(), - include: Some(PathOrPatternSet::from_relative_path_or_patterns( - cli_options.initial_cwd(), - source_files, - )?), + include: Some( + PathOrPatternSet::from_include_relative_path_or_patterns( + cli_options.initial_cwd(), + source_files, + )?, + ), exclude: Default::default(), }, - |_, _| true, + |_| true, )?; let graph = module_graph_creator .create_graph(GraphKind::TypesOnly, module_specifiers.clone()) |