Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/mono-changeset/src/changeset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ impl Changeset<'_> {
{
let mut builder = Scopes::builder();
for (path, name) in workspace.packages() {
builder.add(path, name)?;
builder.add(path.join("**"), name)?;
}

// Append additional scopes from configuration
Expand Down
2 changes: 1 addition & 1 deletion crates/mono-changeset/src/changeset/scopes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ impl Scopes {
///
/// // Create scope set builder and add path
/// let mut builder = Scopes::builder();
/// builder.add("crates/mono", "mono")?;
/// builder.add("crates/mono/**", "mono")?;
///
/// // Create scope set from builder
/// let scopes = builder.build()?;
Expand Down
11 changes: 4 additions & 7 deletions crates/mono-changeset/src/changeset/scopes/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ impl Builder {
///
/// // Create scope set builder and add scope
/// let mut builder = Scopes::builder();
/// builder.add("crates/mono", "mono")?;
/// builder.add("crates/mono/**", "mono")?;
/// # Ok(())
/// # }
/// ```
Expand All @@ -103,13 +103,10 @@ impl Builder {
if self.paths.iter().any(|(candidate, _)| candidate == path) {
Err(Error::PathExists)

// Create pattern matching all files under the given path
// Create glob and add to builder
} else {
let glob = path.join("**");

// Create glob and add to builder
self.paths.push((path.to_path_buf(), name.into()));
self.globs.add(Glob::new(&glob.to_string_lossy())?);
self.globs.add(Glob::new(&path.to_string_lossy())?);

// Return builder for chaining
Ok(self)
Expand All @@ -133,7 +130,7 @@ impl Builder {
///
/// // Create scope set builder and add scope
/// let mut builder = Scopes::builder();
/// builder.add("crates/mono", "mono")?;
/// builder.add("crates/mono/**", "mono")?;
///
/// // Create scope set from builder
/// let scopes = builder.build()?;
Expand Down