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

Add universal hosted git URL support #1278

Merged
merged 8 commits into from
Feb 22, 2018

Conversation

evocateur
Copy link
Member

@evocateur evocateur commented Feb 20, 2018

Description

Improve the separation of concerns between Package instances and their consumers by introducing the updateDependency() instance method. By judiciously employing npm-package-arg and the new PackageGraph metadata, we no longer have to serialize/deserialize the entire object as an extra step during command preparation.

Remaining questions for @gustaff-weldon or @synaptiko:

  1. Is the --git-version-prefix flag really necessary? Who actually needs to change that sort of thing?
  2. Are there any drawbacks to always recognizing these sorts of purposeful git dependencies (they only ever match local packages)?
  3. If git urls are always updated as implicitly --exact, do we need to keep throwing an error if that option is missing?

Breaking Changes

  • VersionSerializer and GitVersionParser have been removed

    We now simply recognize any local package name with a matching git url, prefix or not. npm-package-arg is pretty handy for this. The documentation still needs updating.

Motivation and Context

Having PublishCommand mutating internal properties of Package instances by reference always bugged me. Now it's better encapsulated. This will make future refactoring easier.

How Has This Been Tested?

Added fixture-based tests of the git-url support added to lerna publish in #1033! Also, a few more pieces of #1262 validation.

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)

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.

- add relative-independent fixture to validate moar
- setup this.savePrefix in PublishCommand
We now simply recognize any local package name with a matching git url.

refs lerna#1033
@evocateur evocateur changed the title Move dependency update logic into Package class Add universal hosted git URL support Feb 22, 2018
@evocateur evocateur merged commit 027d061 into lerna:master Feb 22, 2018
@evocateur evocateur deleted the update-dependency-version branch February 22, 2018 01:44
@lock
Copy link

lock bot commented Dec 27, 2018

This thread has been automatically locked because there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Dec 27, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant