Skip to content

Commit

Permalink
fix: issue-677
Browse files Browse the repository at this point in the history
I guess, dev-dependencies can be ignored here completely, because they are filtered out
nevertheless in sortPackages().

And fixed some typos in the error messages.
  • Loading branch information
kolbma authored and katyo committed Feb 14, 2024
1 parent bed52fb commit 9766ec7
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/package.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,15 +222,19 @@ export async function checkPackages(

for (const dependency_name in package_info.dependencies) {
const dependency = package_info.dependencies[dependency_name]
if (dependency.kind === 'dev') {
continue
}
if (dependency.path) {
// internal dependency
const dependency_package = packages[dependency_name]
if (!dependency_package) {
errors.push({
name: package_name,
kind: 'not-a-workspace-member',
message: `Package '${package_name}' dependes from internal '${dependency_name}' which is not a workspace member. Listed workspace members only will be published`
message: `Package '${package_name}' depends from internal '${dependency_name}' which is not a workspace member. Listed workspace members only will be published`
})
continue
}
const dependency_path = normalize(
join(package_info.path, dependency.path)
Expand Down Expand Up @@ -258,7 +262,7 @@ export async function checkPackages(
errors.push({
name: package_name,
kind: 'unable-to-find-extern-dep',
message: `Package '${package_name}' depends from external '${dependency_name}' which does not published on crates.io`
message: `Package '${package_name}' depends from external '${dependency_name}' which is not published on crates.io`
})
} else {
if (
Expand All @@ -272,7 +276,7 @@ export async function checkPackages(
errors.push({
name: package_name,
kind: 'mismatch-extern-dep-version',
message: `Package '${package_name}' depends from external '${dependency_name}' with version '${dependency.req}' which does not satisfies any of '${versions_string}'`
message: `Package '${package_name}' depends from external '${dependency_name}' with version '${dependency.req}' which does not satisfy any of '${versions_string}'`
})
}
}
Expand Down

0 comments on commit 9766ec7

Please sign in to comment.