yarn-plugin: use native Array.some

Avoids the dependency on the lodash function.

Signed-off-by: MT Lewis <mtlewis@users.noreply.github.com>
This commit is contained in:
MT Lewis
2024-11-21 15:45:33 +00:00
parent 9296a33c4d
commit 344c591c91
@@ -15,7 +15,6 @@
*/
import { Descriptor, Workspace, structUtils } from '@yarnpkg/core';
import { some } from 'lodash';
import {
bindBackstageVersion,
getCurrentBackstageVersion,
@@ -76,9 +75,8 @@ export const beforeWorkspacePacking = async (
}
if (
some(
['dependencies', 'devDependencies', 'optionalDependencies'],
dependencyType => some(rawManifest[dependencyType], hasBackstageVersion),
['dependencies', 'devDependencies', 'optionalDependencies'].some(
dependencyType => rawManifest[dependencyType]?.some(hasBackstageVersion),
)
) {
throw new Error(