Skip to content

The root package LICENSE is not included in packages having a custom publish directory #2157

@patricklafrance

Description

@patricklafrance

A new feature has been introduce to include the root package LICENSE to all the packages distributed with Lerna that doesn't already have a license. #1465

It works great for packages that doesn't specify a custom publish directory. However when a custom publish directory is specified, the published package doesn't include the LICENSE.

Expected Behavior

The root package LICENSE file should also be included in packages having a custom publish directory.

// package.json

"publishConfig": {
    "directory": "dist"
}

Current Behavior

The root package LICENSE file is only included in packages that doesn't specify a custom publish directory.

Possible Solution

Steps to Reproduce (for bugs)

  1. Create a new project with Lerna initialized
  2. Add a package to the project (make sure it's handled by Lerna)
  3. Configure a custom publish directory for the package (https://github.com/lerna/lerna/tree/master/commands/publish#per-package-configuration)
  4. Publish the package with Lerna
  5. Validate that the resulting package doesn't contains a LICENSE file
lerna.json

<!-- Please paste your `lerna.json` here -->

{
  "npmClient": "yarn",
  "useWorkspaces": true,
  "version": "independent"
}

lerna-debug.log

<!-- If you have a `lerna-debug.log` available, please paste it here -->
<!-- Otherwise, feel free to delete this <details> block -->

Context

Your Environment

Executable Version
lerna --version 3.15.0
npm --version 6.9.0
yarn --version 1.16.0
node --version 10.11
OS Version
NAME VERSION
Windows 10 1803

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions