Lerna: Alternative option for .json format

Created on 16 Sep 2019  路  3Comments  路  Source: lerna/lerna

Hey friends! Love working with lerna.

So. I'm curious if theres any plans to add more entries here:
https://github.com/lerna/lerna/blob/bb048cb306b5cfcb039aa98f667cf3751cf0ad20/core/project/index.js#L22

Our innersourcing pattern relies on the hope for a commonjs format for all configs, however I know, being a tooling maintainer as well, the limitations of non-json configuration formats.

Possibly there could be a global argument for specifying a full file path including an extension that cosmiconfig supports transparently? I tried just monkey-patching it myself locally and a lerna.config.js entry worked here flawlessly.

All 3 comments

If y'all are open to this, I'd be glad to open a PR

lerna.json already supports a yargs-like "extends" keyword, which supports dependency packages as well as local paths. Regrettably, not documented.

Is that not sufficient?

@evocateur works for our needs! I can agree that <workspace-root>/lerna.json is an important convention to keep (i've worked on a good many CI pipelines that depend on it), rewriting version would be impossible as you mention, and extends allows for everything we need for this purpose and more.

Was this page helpful?
0 / 5 - 0 ratings