Skip to content

Show changed workspaces for a mono repository pattern

Notifications You must be signed in to change notification settings

kranthie-sap/yarn-changed-workspaces

This branch is 2 commits behind igrek8/yarn-changed-workspaces:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

5e536f2 · Apr 6, 2021

History

27 Commits
Aug 23, 2020
Aug 23, 2020
Aug 23, 2020
Apr 4, 2021
Aug 23, 2020
Aug 23, 2020
Aug 23, 2020
Aug 23, 2020
Aug 23, 2020
Aug 24, 2020
Aug 23, 2020

Repository files navigation

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

About

Show changed workspaces for a mono repository pattern

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%