npm-upgrade-monorepo
TypeScript icon, indicating that this package has built-in type declarations

1.2.6 • Public • Published

npm-upgrade-monorepo

Apply npm-upgrade to monorepos. The wrapper just parses workspaces field of package.json, and invokes npm-upgrade for each internal package dir.

CI Maintainability Test Coverage npm (tag)

Install

npm i -g npm-upgrade-monorepo

Usage

API inherits npm-upgrade CLI contract.

npm-upgrade-monorepo [...args]

--workspaces / -w

Additional param to override package.json workspaces field value.

npm-upgrade-monorepo -w packages/*
npm-upgrade-monorepo -w scope1/a,scope2/b

Alternatives

#!/bin/bash

NPM_UPGRADE="npm-upgrade"
PACKAGES=$(cat package.json | jq -r '.workspaces | join(" ")')

eval $NPM_UPGRADE

for f in $PACKAGES; do
  if [ -d "$f" ]; then
    cd $f
    eval $NPM_UPGRADE
  fi
done

License

MIT

Package Sidebar

Install

npm i npm-upgrade-monorepo

Weekly Downloads

12

Version

1.2.6

License

MIT

Unpacked Size

50.2 kB

Total Files

30

Last publish

Collaborators

  • antongolub