Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(init): detect existing package manager and auto-install packages #3805

Merged
merged 9 commits into from
Aug 15, 2023

Conversation

fahslaj
Copy link
Contributor

@fahslaj fahslaj commented Aug 10, 2023

Description

Detects the package manager during lerna init by looking for existing lockfiles. Also makes the init command perform an installation task after the initialization to ensure Lerna is downloaded from the registry.

Motivation and Context

This makes it easier to add Lerna to a project that is managed by Yarn or Pnpm.

How Has This Been Tested?

This has been tested manually and covered by e2e tests.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Chore (change that has absolutely no effect on users)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@fahslaj fahslaj changed the title feat(init): detect existing package manager feat(init): detect existing package manager and auto-install packages Aug 11, 2023
@fahslaj fahslaj marked this pull request as ready for review August 11, 2023 15:53
@fahslaj fahslaj marked this pull request as draft August 11, 2023 16:14
@fahslaj fahslaj force-pushed the feat/detect-package-manager branch 2 times, most recently from 0b20e2a to 48b6216 Compare August 14, 2023 16:08
@fahslaj fahslaj force-pushed the feat/detect-package-manager branch from 48b6216 to 93ffa64 Compare August 14, 2023 16:11
@fahslaj fahslaj force-pushed the feat/detect-package-manager branch from cadb7f2 to 9be57e7 Compare August 14, 2023 16:55
@fahslaj fahslaj marked this pull request as ready for review August 14, 2023 17:15
Copy link
Member

@JamesHenry JamesHenry left a comment

Choose a reason for hiding this comment

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

Other than the one nit, please could update the docs to make note of this new behaviour?

@fahslaj fahslaj merged commit 2204c34 into lerna:main Aug 15, 2023
13 checks passed
@fahslaj fahslaj deleted the feat/detect-package-manager branch August 15, 2023 19:00
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.

None yet

2 participants