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

[Feature] Scripting Lerna #133

Closed
jamiebuilds opened this issue May 15, 2016 · 7 comments
Closed

[Feature] Scripting Lerna #133

jamiebuilds opened this issue May 15, 2016 · 7 comments

Comments

@jamiebuilds
Copy link
Contributor

Any good CLI tool can be composed with others, so I would like to focus on that with Lerna.

Stuff like:

Making commands like lerna ls or lerna updated have easy to parse output.

$ lerna ls
package-1
package-2

# instead of:

$ lerna ls
Lerna v2.0.0-beta.6
Independent Versioning Mode
- package-1
- package-2
$ lerna updated
package-1
package-2

# instead of

$ lerna updated
Lerna v2.0.0-beta.6
Independent Versioning Mode
Checking for updated packages...

- package-1
- package-2

This will require moving debug information behind a --debug flag.

There's also lerna exec in #130

$ lerna exec pwd
/path/to/repo/packages/package-1
/path/to/repo/packages/package-2

I would also like to be able to expose different config-like information from lerna:

$ lerna get repo.version
2.0.0
# or
independent
$ lerna get paths.root
/path/to/repo
$ lerna get paths.packages
/path/to/repo/packages

This is all my ideas for now, but I'm definitely interested in anything that makes Lerna more scriptable.

@joscha
Copy link
Contributor

joscha commented Jul 4, 2016

Maybe we could adapt the git --porcelain flag for that. That way current scripts would continue working, just the output without --porcelain would allow composition and hide all debug output.

@jpnelson
Copy link
Contributor

jpnelson commented Jul 4, 2016

I'd prefer @joscha 's suggestion if it's the difference between a major version and a minor version

@jamiebuilds
Copy link
Contributor Author

What would break with current scripts? Are people using the output of Lerna already?

@joscha
Copy link
Contributor

joscha commented Jul 5, 2016

can't speak for other people, but we do:

# Get all packages so we now which ones to iterate through
ALL_PACKAGES=$($LERNA_LOC exec pwd\
| sed 1,2d)

That's only one example - we had to write a script that uses npm link on packages, because the workaround with requiring the index.js doesn't work for packages that are mainly CSS/LESS/images. Basically the same problem as #11 and #263.

@factoidforrest
Copy link

the --json flag covers this use case now, but unfortunately there isn't quite enough data in there. It would be nice if ls also listed the package path

@evocateur
Copy link
Member

@light24bulbs A lot of scriptable options been implemented recently, but not released yet. Trying to finish #1091 first.

@JamesHenry
Copy link
Member

JamesHenry commented Nov 29, 2022

Hi Folks 👋

In light of its age, and in order to allow our small team to focus on what matters most to Lerna v6 users in late 2022, I'm going to close this one. If you have any requests that could enhance your usage of Lerna 6, then please do let us know by opening a new discussion (for a feature) or issue (for a bug report) with as much context as possible.

You can also check out our published roadmap for Lerna v7 here: #3410

Many thanks 🙏

@JamesHenry JamesHenry closed this as not planned Won't fix, can't repro, duplicate, stale Nov 29, 2022
@lerna lerna locked as resolved and limited conversation to collaborators Nov 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants