-
-
Notifications
You must be signed in to change notification settings - Fork 34
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
Make the @lerna-lite/version
and @lerna-lite/publish
dependencies optional
#450
Comments
version
and publish
dependencies optional@lerna-lite/version
and @lerna-lite/publish
dependencies optional
hmm there's a lot to think about but here's a few things to first think of:
Some explanation regarding these points
In summary, I'm not sure I'm interested into making these 2 packages optional and thinking of making this as a "won't do" topic. I'm still very open to suggestions though, so we can still discuss it. EDIT Thinking about it a little more in the shower, great place to brainstorm by the way lol. The current topology is that the CLI is dependent on BTW is there a reason why you're not using something like pnpm run yarn? Most people seem to be more interested into moving away from |
I prefer using NPM to avoid adding an extra dependency management tool. pnpm and yarn replace NPM and have their own special flavor of dependency management. Lerna(-lite) isn't a dependency manager, it's a task orchestrator. It's a philosophical choice, but one I've developed over a very long time and lots of experimentation with the different options. As for why not Turborepo or Nx... They focus on parallelization and caching. Both of which I think are of dubious value. They complicate things in return for (theoretically) speeding up your tasks by either running them in parallel, or skipping them. However, caching requires extra infra or a SaaS layer to be effective anywhere except locally. Caching is also 50% of the, "it worked on my machine", type of problem. Parallelism is less problematic, but it complicates log output (interleaved and/or prefixed), and in many environments it's not that helpful (low power CI workers, windows which has FS concurrency issues). Using faster build/test tools (eg. vite, esbuild, etc.) helps a lot more for task speeds (IMO), and doesn't introduce the fragility/complication. I didn't quite follow your edit. I think the topology would stay the same. publish and version would still depend on CLI. The fact that run and exec are separate packages is what surprises me. Because publish and version are essentially specialized run/exec actions (logically). I would assume that 90% of the code for run/exec must exist in core (workspace enumeration and filtering). However, since this is a fork of Lerna, that may not actually be the functional case. The breaking change would be the installing |
Yeah I kind of agree on some of these points, in Lerna-Lite itself I don't use any of these caching stuff because I want to make sure every packages is fully rebuilt and want to avoid the "works on my machine" as you said. For the whole thing, I thought about it over the weekend and I decided to go ahead with the change. I found out that there a few things related to version and publish that are in the core package today but they should really only exist (move to) in the version package and since publish depends on version then it's ok to move all these version core stuff (conventional-commits and others) under the version package since that is where they are used anyway, so that would also make the core much smaller and really focus on it being a package that has common stuff for every other package without carrying too many baggage.
Yes but with a slight variance that I would prefer to do, as per my previous post, I think it's better to just change the dependencies of the CLI (remove publish/version from its deps) and instead make the CLI a dependency of every optional packages (run/exec/.../publish/version), this way the user won't need to install the CLI directly, just the command itself (he could if he wants too, but it would be unnecessary) since every other command will require it anyway. Also worth to know that Publish depends on Version, so the breaking change could become a single line change for the ones who want to keep version/publish and it wouldn't be too bad for a breaking change {
"devDependencies": {
- "@lerna-lite/cli": "1.14.0", # it could also be kept but it would unnecessary
+ "@lerna-lite/publish": "1.14.0",
"@lerna-lite/run": "1.14.0",
}
} the following code below could also work (and would be equivalent to above code) but it's just more lines which won't be needed after I make the changes on the CLI so that becomes a dependency of all optional commands {
"devDependencies": {
"@lerna-lite/cli": "1.14.0",
+ "@lerna-lite/publish": "1.14.0",
+ "@lerna-lite/version": "1.14.0",
"@lerna-lite/run": "1.14.0",
}
} I decided to go ahead with the change mainly because of the new RoadmapThe only thing that I'm not sure of would be the "when" to make this new I could maybe do an alpha version a month prior but even then that is 2 months away at the very least, so I don't plan to make it the way you want until that time. The minimum requirement would also bump to Node >=16.17.0
|
No hurry. It's working as-is. Depending on only what we need is a nice-to-have. |
I would also like to see this, as I only use Currently, when installing |
@silverbucket I have been working on the next 2.0 version (created the first PR #537 yesterday) and it took me a long time (the past 2 weeks) to get going because I'm now building it as ESM only and I had to switch to Vitest because Jest isn't supporting ESM that well yet. The Vitest switch was (and is still a bit) long to accomplish, there are still couple tests failing but for now I'm just skipping some of them. Anyway if all goes well, I'm expecting to do an Alpha release of 2.0 in a week or two and that will also make
I'm switching the project to be ESM only (transparent to the user, except the new Node 16 requirement), that should lower the download size, but I don't think that is going to change anything about the list of dependencies that are used by Contributions are always welcome |
Hi @ghiscoding I understand, thanks for all the work you are doing to create and maintain eg. can I just have the |
No they're not, these 2 are totally separate from each other but they do use common dependencies though which are
It's already like that today, if you install just the CLI today then you'll get
Not quite, the goal of this issue is that currently and as I mentioned in previous line, if you install the CLI today you always get The summary is that if you install the CLI today you get:
But when you'll install the CLI in upcoming v2.0 then you'll get only:
This is the ask here to make - "@lerna-lite/cli": "2.0.0", <-- you could also keep it, it will be installed behind the scene anyway
+ "@lerna-lite/publish": "2.0.0"
+ "@lerna-lite/version": "2.0.0", <-- you could skip version since it's tightly coupled to the publish pkg or even simply install In summary All Commands will become optional in the next release (well except for the |
Gotcha, thanks for the clarification! |
closed by #552 @cackerman-qumulo EDIT now officially released under v2.0.0 📦 🚀 |
Clear and concise description of the problem
I'm working in GItHub Enterprise actions with protected branches. Versioning in the CI pipeline and pushing the version updates back to a protected branch is problematic. So, I'm not using lerna-lite's
version
orpublish
commands. The only commands I am using are therun
andexec
commands. I would like to effectively "disable" theversion
andpublish
commands, in case someone thinks they should be used.Suggested solution
Remove
@lerna-lite/version
and@lerna-lite/publish
from@lerna-lite/cli
dependencies, requiring that they be added just like other non-included plugins.Alternative
Allow disabling specific commands in
lerna.json
.Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: