dependencyAllowedByPolicy = (namingKit, packagePolicy) => {
  if (namingKit.isEntry) {
    // dependency on entry compartment should never be allowed
    return false;
  }
  const canonicalName = generateCanonicalName(namingKit);
  return !!policyLookupHelper(packagePolicy, 'packages', canonicalName);
}
Verifies if a module identified by `namingKit` can be a dependency of a package per `packagePolicy`.
`packagePolicy` is required, when policy is not set, skipping needs to be handled by the caller.

@param {PackageNamingKit} namingKit
@param {PackagePolicy} packagePolicy
@returns {boolean}