Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: David Sherret <[email protected]>
  • Loading branch information
satyarohith and dsherret authored Nov 4, 2024
1 parent fbef272 commit 404a7a6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/workspace/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ pub enum WorkspaceDiagnosticKind {
previous: bool,
suggestion: NodeModulesDirMode,
},
#[error("invalid workspace member \"{name}\".")]
InvalidMember { name: String },
#[error("Invalid workspace member name \"{name}\". Ensure the name is in the format '@scope/name'.")]
InvalidMemberName { name: String },
}

#[derive(Debug, Error, Clone, PartialEq, Eq)]
Expand Down Expand Up @@ -681,7 +681,7 @@ impl Workspace {
if !is_valid_jsr_pkg_name(name) {
diagnostics.push(WorkspaceDiagnostic {
config_url: config.specifier.clone(),
kind: WorkspaceDiagnosticKind::InvalidMember { name: name.clone() },
kind: WorkspaceDiagnosticKind::InvalidMemberName { name: name.clone() },
});
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/workspace/resolver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1530,7 +1530,7 @@ mod test {
.first()
.unwrap()
.to_string()
.starts_with(r#"invalid workspace member "@deno-test/libs/math"."#));
.starts_with(r#"Invalid workspace member name "@deno-test/libs/math"."#));
}

fn create_resolver(workspace_dir: &WorkspaceDirectory) -> WorkspaceResolver {
Expand Down

0 comments on commit 404a7a6

Please sign in to comment.