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(list): force-local option for list command #2634

Closed
wants to merge 1 commit into from

Conversation

matheo
Copy link
Contributor

@matheo matheo commented Jun 26, 2020

Description

I'm having troubles trying to run my lerna exec built script because the dependency-graph is not correctly built.
I've found this issue in a development branch, while publishing some beta releases of my packages.

I've tracked down the issue to PackageGraphNode.satisfies
because semver('14.0.0-beta.0', '*') is returning false, and that puts my beta packages as externalDependencies instead localDependencies while initializing the PackageGraph.

So looking at the options, I saw the forceLocal parameter that seems supported by bootstrap only, and I added it to the listable.options too so we can workaround this bug with semver while they have a fix.

Motivation and Context

The bug was reported 11 days ago without feedback ATM:
npm/node-semver#331

and 26 days ago the first question was posted:
npm/node-semver#329

How Has This Been Tested?

I've used this patch locally in the node_modules of my beta-branch
and it works as expected :)

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.

@matheo
Copy link
Contributor Author

matheo commented Jun 26, 2020

@evocateur a bugfix release this weekend will be highly appreciated!

I confirmed it with npm test -- --watch commands/list
and Travis seems to have something broken with the publish

Thanks again for such a great software!

@matheo
Copy link
Contributor Author

matheo commented Jun 28, 2020

OMG, I just realized that this doesn't fix lerna exec --since
perhaps this is useful for other scripts, my main build doesn't work.
semver really screwed this one :(

@evocateur evocateur changed the base branch from master to main November 8, 2020 00:40
@matheo
Copy link
Contributor Author

matheo commented Feb 25, 2021

@evocateur there's something we can do to propagate --force-local from the bootstrap, exec, or even the lerna.json file to avoid problems building our dependency graph in the branches where we are releasing beta versions :-?

it seems that lerna needs to provide a built-in solution for this case because semver seems to not compare latest beta canary between each other. Thoughts please?

due to a bug in semver, we need a workaround via force-local
npm/node-semver#331
@JamesHenry
Copy link
Member

Hi Folks, thanks a lot for contributing to the lerna community. In light of its age, I am going to close this PR. I'm sorry that it fell through the cracks during the period when lerna was not so actively maintained before the Nx team took over stewardship.

In order to proceed with this a reimplementation of this one, we would want to first see a clear reproduction of any issue being encountered. If you can provide that via a new issue then we will happily consider how best to resolve it.

Thanks again!

@JamesHenry JamesHenry closed this Mar 2, 2023
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