1.0.13 • Published 11 months ago

workspaces-affected v1.0.13

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

workspaces-affected

This tool is providing support for running operations only on affected packages in your npm workspaces

Usage:

npx workspaces-affected@latest build --base origin/master

--base flag

base can be any git ref, for example:

npx workspaces-affected build --base COMMIT_ID

npm workspaces support

This example is showing usage of --is-present flag and also passing --coverage to test script:

npx workspaces-affected@latest test --base=origin/master --if-present -- --coverage

github actions example

This workflow will run check for coverage only for affected packages in the workspace:

name: My awesome workflow
on:
  pull_request:
    branches:
      - main
jobs:
  workflow-checks:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
        with:
          fetch-depth: 0
      - uses: actions/setup-node@v3
        with:
          node-version: 18
      - run: npm install
      - run: npx workspaces-affected@latest test --base=origin/main --if-present -- --coverage

--ignore-private flag

This will ignore private packages (packages.json private: true)

npx workspaces-affected build --base COMMIT_ID --ignore-private

Options

FlagRequiredDefaultDescription
--basetruemastergit ref to compare changes to.
--with-sidefalsefalseWhen true, listing also side affected packages.
--ignore-privatefalsefalseWhen true, private packages will be ignored.
1.0.9

11 months ago

1.0.8

11 months ago

1.0.7

11 months ago

1.0.11

11 months ago

1.0.10

11 months ago

1.0.13

11 months ago

1.0.12

11 months ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago