README
ni | beachball lock update
Beachball lock update
A tool to use beachball with npm monorepos. Specifically to workaround beachball issue #525.
This package provides a beachball postbump
hook implementation that bumps the versions of package references inside a package-lock.json
file during beachball's publish step.
Note: This package does a simple search and replace inside the package-lock.json
file. Plan to update the script if it does not leave the package-lock.json
in an expected state.
Getting Started
Install the package with
npm i -D @ni/beachball-lock-update
.Integrate beachball in your application.
Note: This tool requires beachball >= v2.20.0 to leverage the
postbump
hook (this is represented in thepeerDependencies
of the package).In a beachball configuration file add a bostbump hook using
@ni/beachball-lock-update
:const path = require('path'); const lockPath = path.resolve(__dirname, './package-lock.json'); const { createPostbump } = require('@ni/beachball-lock-update'); module.exports = { hooks: { postbump: createPostbump(lockPath) } };
Enjoy!