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

fix: support lerna v3 #406

Merged
merged 6 commits into from Aug 29, 2018
Merged

Conversation

backflip
Copy link
Contributor

@backflip backflip commented Aug 6, 2018

Lerna 3 exposes a new API to get package names.

Description

This PR updates @commitlint/config-lerna-scopes to work with Lerna v3.

Motivation and Context

The current code does not work with Lerna v3, see https://github.com/marionebl/commitlint/issues/405

Usage examples

// commitlint.config.js
module.exports = require('@commitlint/config-lerna-scopes');

How Has This Been Tested?

yarn run test reported no errors after updating the tests. However, the tests for Lerna v2 were removed since I could not think of a nice way of supporting both v2 and v3.

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 change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@sebinsua
Copy link

IMHO, this should be a peerDependency and a devDependency instead of a dependency. That way there is less opportunity for package managers to install the mismatched versions within a project, etc.

The @commitlint package should specify a range of lerna versions that are acceptable, but use whatever they have installed.

@marionebl
Copy link
Contributor

thanks for contributing, I’ll have a look at it tomorrow.

Back when I created the lerna-scopes package there was no official API, so there was no obvious useful range to specify as peerDependency. Given 3.0 basically is the introduction of a programmatic API this decision probably is beyond its due date.

QuentinRoy referenced this pull request in QuentinRoy/lightmill-js Aug 13, 2018
Lerna 3 breaks commitlint at the moment. Wait for marionebl/commitlint#406 to be finished, merged and published before updating.
@backflip backflip changed the title WIP: chore: update lerna to v3.0.0-rc.0 WIP: chore: update lerna to v3 Aug 14, 2018
@pedronauck
Copy link

pedronauck commented Aug 29, 2018

Nothing about that? We're trying to update to lerna v3 on docz, but this is breaking us 😕

@marionebl
Copy link
Contributor

I‘ll carve out some time to do a release today stay tuned

@pedronauck
Copy link

thanks @marionebl 🙏

@marionebl
Copy link
Contributor

Great work on https://github.com/pedronauck/docz btw :)

@pedronauck
Copy link

Happy you liked it @marionebl, your work here is awesome too!

@marionebl marionebl changed the title WIP: chore: update lerna to v3 fix: support lerna v3 Aug 29, 2018
@marionebl
Copy link
Contributor

I'll ignore the failing AppVeyor build, appears to be random.

@marionebl marionebl merged commit 58bb47f into conventional-changelog:master Aug 29, 2018
@marionebl
Copy link
Contributor

Released via 7.1.0, thanks @backflip!

@backflip
Copy link
Contributor Author

Awesome, you're welcome!

@sebinsua
Copy link

I don't think the package has been published? It's still showing 7.0.0 on npmjs.com.

matheus1lva referenced this pull request in matheus1lva/mmp Aug 29, 2018

## Version **7.1.0** of **@commitlint/config-conventional** was just published.

<table>
  <tr>
    <th align=left>
      Dependency
    </th>
    <td>
      <a target=_blank href=https://github.com/marionebl/commitlint>@commitlint/config-conventional</a>
    </td>
  </tr>
  <tr>
      <th align=left>
       Current Version
      </th>
      <td>
        7.0.1
      </td>
    </tr>
  <tr>
    <th align=left>
      Type
    </th>
    <td>
      devDependency
    </td>
  </tr>
</table>



The version **7.1.0** is **not covered** by your **current version range**.

If you don’t accept this pull request, your project will work just like it did before. However, you might be missing out on a bunch of new features, fixes and/or performance improvements from the dependency update.

It might be worth looking into these changes and trying to get this project onto the latest version of @commitlint/config-conventional.

If you have a solid test suite and good coverage, a passing build is a strong indicator that you can take advantage of these changes directly by merging the proposed change into your project. If the build fails or you don’t have such unconditional trust in your tests, this branch is a great starting point for you to work on the update.


---


<details>
<summary>Release Notes</summary>
<strong>v7.1.0</strong>

<h2>Features</h2>
<ul>
<li>wildcards: add new wildcard patterns <a class="issue-link js-issue-link" data-error-text="Failed to load issue title" data-id="313790415" data-permission-text="Issue title is private" data-url="https://github.com/marionebl/commitlint/issues/315" href="https://urls.greenkeeper.io/marionebl/commitlint/issues/315">#315</a> (<a class="commit-link" href="https://urls.greenkeeper.io/marionebl/commitlint/commit/e9ea17fc40f5ccf4b6ca80a990b984fbb466dc47"><tt>e9ea17f</tt></a>)</li>
<li>add max line length to body/footer (<a class="commit-link" href="https://urls.greenkeeper.io/marionebl/commitlint/commit/542f50ec2fd7bc66a3ec84d1b959549484016e9c"><tt>542f50e</tt></a>)</li>
</ul>
<h2>Bug fixes</h2>
<ul>
<li>support lerva v3 <a class="issue-link js-issue-link" data-error-text="Failed to load issue title" data-id="347908163" data-permission-text="Issue title is private" data-url="https://github.com/marionebl/commitlint/issues/406" href="https://urls.greenkeeper.io/marionebl/commitlint/pull/406">#406</a> (<a class="commit-link" href="https://urls.greenkeeper.io/marionebl/commitlint/commit/58bb47fc90aee2494839eafe3ed8107d078f48bc"><tt>58bb47f</tt></a>)</li>
</ul>
</details>


<details>
  <summary>FAQ and help</summary>

  There is a collection of [frequently asked questions](https://greenkeeper.io/faq.html). If those don’t help, you can always [ask the humans behind Greenkeeper](https://github.com/greenkeeperio/greenkeeper/issues/new).
</details>

---


Your [Greenkeeper](https://greenkeeper.io) bot 🌴
@marionebl
Copy link
Contributor

Some hickup with lerna@3, performing a force-publish...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants