2.0.11 • Published 3 years ago

yarn-changed-workspaces v2.0.11

Weekly downloads
3
License
MIT
Repository
github
Last release
3 years ago

yarn-changed-workspaces

A small utility tool to be used in CI/CD pipelines along with git to trigger dependent libraries' workflows in a monorepo pattern.

CI Coverage Status

Install

yarn global add yarn-changed-workspaces

CLI

yarn-changed-workspaces --help

Node.js

./package.json

{
  "workspaces": ["packages/*"]
}
const getChangedWorkspaces = require("yarn-changed-workspaces");

(async () => {
  const workspaces = await getChangedWorkspaces({
    branch: "master",
    projectRoot: process.cwd(),
  });
  console.log("changes", workspaces);
})();

Control scope of change

./package.json

{
  "private": true,
  "workspaces": ["packages/*"]
}

./packages/app/package.json

{
  "name": "@team/ui",
  "version": "1.0.0",
  "workspace": { "files": ["!**/*.(test|spec).(j|t)s(x)?"] }
}

Limitation

git is the core diffing tool. This library will not work if you use a different distributed version-control system for tracking changes in source code during software development

2.0.11

3 years ago

2.0.10

4 years ago

2.0.9

5 years ago

2.0.5

5 years ago

2.0.7

5 years ago

2.0.6

5 years ago

2.0.8

5 years ago

2.0.4

5 years ago

2.0.3

5 years ago

2.0.2

5 years ago

2.0.1

5 years ago

2.0.0

5 years ago

1.0.0

5 years ago