UNPKG

@roots/bud

Version:

Configurable, extensible build tools for modern single and multi-page web applications

20 lines (19 loc) 734 B
import isString from '@roots/bud-support/isString'; import logger from '@roots/bud-support/logger'; export const checkDependencies = async (context) => { const warn = Object.entries({ ...(context.manifest?.dependencies ?? {}), ...(context.manifest?.devDependencies ?? {}), }) .filter(([signifier]) => signifier.startsWith(`@roots/`)) .map(([_discardedSignifier, version]) => version) .reduce((result, version) => { if (result === true) return result; if (isString(result) && version !== result) return true; return version; }); !isString(warn) && logger.warn(`Ensure all @roots packages are running the same version`); };