Skip to content

Add support for monorepos with root-level dependencies #597

@jcfranco

Description

@jcfranco

How are you using generate-license-file?

CLI+Library

Is your feature request related to a problem? Please describe.

Generating individual license files for individual packages in a monorepo isn't reliable unless each package has a local node_modules and package-lock.json. This requirement doesn't work with monorepo setups where dependencies are installed at the top level, separate from the license-target package.

Referencing the root package.json results in incorrect license information for the target package (example), while referencing the target package’s package.json returns no licensing information (example).

Describe the solution you'd like

Allow specifying a root package.json or an alternative lookup location for license retrieval when the target package doesn’t have its dependencies installed locally.

Additional context

We worked around this by installing each package’s dependencies locally before running generate-license-file (see Esri/calcite-design-system#11640 for additional details).

Also, just wanted to say thanks for this fantastic tool! Truly appreciate the effort that goes into it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions