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:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user