0.5.2 • Published 2 years ago

@jameslnewell/workspace-utilities v0.5.2

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

@jameslnewell/workspace-utilities

Utilities for finding and filtering yarn and npm workspaces.

Usage

import {getDiff} from '@jameslnewell/git-utilities';
import {Project, getDependents} from '@jameslnewell/workspace-utilities';
import * as filters from '@jameslnewell/workspace-utilities/filters';

const diff = await getDiff();
const project = await Project.fromDirectory(process.cwd());

const changedWorkspaces = project.children.filter(filters.changed(diff));
const changedWorkspacesAndTheirDependents = Array.from(new Set([
  ...changedWorkspaces,
  ...changedWorkspaces.map(workspace => getDependents(workspace, {project}).flat()
]))
const workspacesThatRequireTesting = changedWorkspacesAndTheirDependents.filter(filters.script('test'))

console.log(workspacesToTest)
0.5.0

2 years ago

0.5.2

2 years ago

0.4.1

2 years ago

0.4.0

2 years ago

0.3.1

2 years ago

0.3.0

2 years ago

0.2.0

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago