yarn-changed-workspaces
Advanced tools
Comparing version 2.0.10 to 2.0.11
{ | ||
"name": "yarn-changed-workspaces", | ||
"version": "2.0.10", | ||
"version": "2.0.11", | ||
"main": "./src/index.js", | ||
@@ -5,0 +5,0 @@ "bin": "./bin/cli.js", |
@@ -10,2 +10,3 @@ const { join } = require("path"); | ||
const findWorkspaces = async ({ rootPath, pattern }) => { | ||
const visited = new Set(); | ||
const workspaces = []; | ||
@@ -20,2 +21,4 @@ const globPath = join(rootPath, pattern); | ||
const pkg = await readJSONFile(pkgPath); | ||
if (visited.has(pkg.name)) return; | ||
visited.add(pkg.name); | ||
workspaces.push({ | ||
@@ -22,0 +25,0 @@ id: pkg.name, |
const { filterWorkspaces } = require("./filterWorkspaces"); | ||
const getTouchedDependencies = ({ workspaces, files }) => { | ||
const visited = new Set(); | ||
return Object.values(workspaces).reduce((changed, ws) => { | ||
@@ -12,2 +13,4 @@ const matched = filterWorkspaces({ workspace: ws, files }); | ||
const wa = queue.pop(); | ||
if (visited.has(wa)) continue; | ||
visited.add(wa); | ||
Object.values(workspaces).forEach((wb) => { | ||
@@ -14,0 +17,0 @@ if (wa === wb) return; |
24564
664