starting from yarn 1.4.2, the workspaces property in the package.json file can have a different structure (if the nohoist feature should be used; see details here):
While the old structure of just being an array is still valid, I suggest to support both formats in jest-watch-yarn-workspaces. See also the type definitions for workspaces property: [1,2].
From my understanding, this line would need some changes... maybe something like:
function getDirectories(packageConfig) {
const yarnWorkspaces = packageConfig.workspaces;
if (Array.isArray(yarnWorkspaces)) return yarnWorkspaces;
if (yarnWorkspaces && Array.isArray(yarnWorkspaces.packages)) return yarnWorkspaces.packages;
return undefined;
}
Hi,
starting from yarn 1.4.2, the
workspaces
property in the package.json file can have a different structure (if the nohoist feature should be used; see details here):While the old structure of just being an array is still valid, I suggest to support both formats in jest-watch-yarn-workspaces. See also the type definitions for
workspaces
property: [1,2].From my understanding, this line would need some changes... maybe something like: