Skip to content

Conversation

@ecraig12345
Copy link
Member

If the package manager is detected to be npm (as determined by presence of package-lock.json), beachball should run npm install --package-lock-only to update package-lock.json after bumping or syncing.

I currently have this new behavior happening automatically rather than under a flag, because arguably it's something beachball should have been doing all along (the only reason it didn't was because the maintainers were primarily using beachball with yarn). If that seems risky, I could add a flag, but if we do that it should definitely become the default behavior in a future major version.

Fixes #525

@ecraig12345 ecraig12345 requested a review from kenotron June 13, 2022 22:17
Copy link
Contributor

@kenotron kenotron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a suggestion / nit to refactor so the writePackageJson is still the same.

@kenotron kenotron merged commit 4f3cd13 into master Jun 14, 2022
@ecraig12345 ecraig12345 deleted the ecraig/package-lock branch June 14, 2022 23:03
@rajsite rajsite mentioned this pull request Jul 27, 2022
1 task
rajsite added a commit to ni/nimble that referenced this pull request Jul 28, 2022
# Pull Request

## 🤨 Rationale

Updates beachball to the latest version to Fix #625 and partially addresses #601.
To fully address #601 we should remove the other locations that have the same workaround as described in the issue. We should let this PR have some runtime after merging to make sure there are no issues before updating other locations.

## 👩‍💻 Implementation

Disconnected the custom `postbump` hook from beachball and will manually verify after merge that lockfile updates happen as expected since beachball >= 2.23.0 from microsoft/beachball#675.

## 🧪 Testing

Tweaked the README of the tokens package to trigger the package publishing on the pipeline.

## ✅ Checklist

- [x] I have updated the project documentation to reflect my changes or determined no changes are needed. Doc updates can be done when the package is removed, see details of #601
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

beachball not updating package-lock.json version field when publishing

3 participants