Skip to content

Lerna v8.2.0+ removes package-lock.json dependencies on lerna version. #4167

@kbrzozowski-clgx

Description

@kbrzozowski-clgx

Current Behavior

After update of lerna to 8.2.1, packages which has peer: true in package-lock.json are removed from the file on lerna version ${version} --no-git-tag-version --force-publish --yes. It causes npm install to crash as package-lock.json is changed.

Expected Behavior

lerna version ${version} --no-git-tag-version --force-publish --yes doesn't remove these packages.

Steps to Reproduce

  1. Install deck.gl package with npm install deck.gl
  2. Use lerna version ${version} --no-git-tag-version --force-publish --yes command to bump version.
  3. arcgis dependencies which have peer:true are removed from package-lock

The same thing happens on the version 8.2.0. The dependencies are not being removed on version 8.1.9

Failure Logs / Configuration

node version: 18.20.0
npm version: 10.5.0

lerna.json

  "$schema": "node_modules/lerna/schemas/lerna-schema.json",
  "version": "0.160.0-SNAPSHOT",
  "hoist": true
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions