Skip to content

updateVersionInFiles

Updates the version in package.json and, where they exist, package-lock.json and npm-shrinkwrap.json.

Import:

import { updateVersionInFiles } from '@mnaoumov/typescript-dev-toolkit/version';

Signature:

function updateVersionInFiles(newVersion: string): Promise<void>

Parameters:

Parameter Type Description
newVersion string The new version string to update in the files.

Returns: Promise<void> — A Promise that resolves when the update is complete.