Giter Site home page Giter Site logo

lerna-lite / lerna-lite Goto Github PK

View Code? Open in Web Editor NEW
465.0 7.0 32.0 7.13 MB

Subset of Lerna in a smaller & more modular project. Helps manage and publish multiple packages in a monorepo/workspace structure

License: MIT License

TypeScript 99.73% JavaScript 0.27%
monorepo conventional-changelog conventional-commits workspaces lerna npm pnpm pnpm-workspaces yarn yarn-workspaces

lerna-lite's Introduction

Lerna-Lite @lerna-lite

License: MIT TypeScript Conventional Changelog lerna--lite

Actions Status codecov Vitest NPM downloads npm

Lerna-Lite is a super light version of the original Lerna


๐Ÿ“ข Lerna-Lite supports pnpm/yarn workspace: protocol

Take 30sec. to complete this 1 question poll survey ๐Ÿ”˜ if you are using this feature. It's a simple poll to find out which package manager is the most popular with workspace: protocol feature (so far, about 60% pnpm and 40% yarn).

Lerna-Lite itself is also using pnpm workspaces with the workspace: protocol ๐ŸŽ‰


Who is using Lerna-Lite

Here are some of the largest projects using Lerna-Lite

Jest ย  | ย  React Navigation ย  | ย  Format.JS ย  | ย  Volar ย  | ย  Blueprint ย  | ย  NativeScript

Sponsors

Wundergraph

License

MIT License

About Lerna-Lite

Lerna-Lite differs from the original Lerna since it only has a limited subset of Lerna's list of commands (which itself has 15 commands) and they are all optional in Lerna-Lite making its install footprint a lot smaller. Lerna was originally built as an all-in-one tool, however nowadays Workspaces are available in all package managers and the need for an all-in-one tool, which includes built-in workspaces functionalities (like bootstrap), is no longer needed. Lerna-Lite is built around this new reality and is only providing commands that package managers do not include. To summarize, Lerna-Lite is more modular than the original Lerna and you'll end up installing a lot less dependencies while also making it more versatile to use with other tools like TurboRepo, pnpm and others...

Lerna-Lite assumes, and requires you to pre-setup your Workspace through your favorite package manager (npm, pnpm, yarn) that will take care of the symlinks. Lerna-Lite does not include the bootstrap, add, create neither link commands hence the need for you to properly setup your workspace prior to installing Lerna-Lite.

According to your needs, choose the best option to setup a workspace: npm 7+ | Yarn classic | Yarn 2+ | pnpm

Why create this lib/fork?

Below are the main reasons as to why this fork was created:

  1. Lerna repo was unmaintained for nearly 2 years (in early 2022, Lerna's dependencies were really out of date)
    • for Lerna, this is no longer the case since Nrwl, the company behind Nx, took over stewardship of Lerna
      • please note that Lerna-Lite fork was created couple months before Nrwl took over Lerna
      • we now also replicate Lerna's PRs whenever possible (except Nx specific changes which are ignored)
  2. A desire to create a smaller and a lighter alternative compared to the original all-in-one Lerna tool
    • Lerna-Lite is entirely modular, all commands are totally optional (install only what you really need).
  3. Rewrote the lib in TypeScript and is also built as ESM only since v2.0 (you can still use it in a CJS environment)
  4. Replicated a few opened PRs from Lerna and add a few unique features into Lerna-Lite (see number 6 below)
  5. new Lerna is now another Nx branded product (Lerna >=5.5 now requires Nx while not required in Lerna-Lite)
    • if you already use Nx then it's probably better to use Lerna, otherwise Lerna-Lite is preferred
    • if you use other tools like TurboRepo and install the original Lerna you end up with 2 similar tools (not good)
    • even TypeScript is now required in Lerna >=6 (even for a JS monorepo) however not required in Lerna-Lite
  6. Lerna-Lite added a few unique features (not available in Lerna itself):

On a final note, the best feature of Lerna-Lite (versus Lerna) has to be its modularity. A large portion of the users are only interested in version/publish commands but on the other hand, a small minority are only interested in other commands like run/exec. Lerna-Lite offers this flexibility by allowing the user to choose what to install (see installation below). Lastly from the list above, the number 5 could be a concern for some users who are not interested to use Nx (like me) but still want to have the power of Lerna with updated dependencies and keep their download to the bare minimum.

Lerna-Lite will help you with the following:

Note all commands are optional in Lerna-Lite, refer to the Installation table for more info

Version and Publish commands

  • Automate the creation of new Versions (independent or fixed version) of all your workspace packages.
    • it will automatically Commit/Tag your new Version & create new GitHub/GitLab Release (when enabled).
  • Automate, when enabled, the creation of Changelogs for all your packages by reading all Conventional Commits.
  • Automate, the repository Publishing of your new version(s) for all your packages (on NPM or other platforms).

Other optional commands

  • Changed command, when installed, will list all local packages that have changed since the last tagged release
  • Diff command, when installed, will show git diff of all packages or a single package since the last release
  • Exec command, when installed, will help you execute shell commands in parallel and in topological order.
  • List command, when installed, will list all workspace local packages
  • Run command, when installed, will help you run npm script in parallel and in topological order.
  • Watch command, when installed, will watch for changes within all packages and execute certain commands

README Badge

lerna--lite

[![lerna--lite](https://img.shields.io/badge/maintained%20with-lerna--lite-e137ff)](https://github.com/lerna-lite/lerna-lite)

Getting Started

Let's start by installing Lerna-Lite CLI as a dev dependency to your project and then run the init command to get started (see init#readme for all options). Note that the CLI must be installed at all time, then proceed by installing any other optional commands (the CLI is only including the init command), refer to the Installation table for more info.

# install Lerna-Lite CLI locally or globally (`init` is the only command installed)
$ npm install -g @lerna-lite/cli # pnpm add -g @lerna-lite/cli

# create your monorepo and initialize lerna-lite
$ mkdir lerna-repo
$ cd lerna-repo
$ npx lerna init # OR pnpm exec lerna init

# for npm/yarn (only) workspaces add --use-workspaces
$ npx lerna init --use-workspaces

This will create a lerna.json configuration file as well as a packages folder, so your folder should now look like this:

lerna-repo/
  packages/
    package-a
  package.json
  lerna.json

Note Lerna-Lite now supports 3 file extension types (.json, .jsonc and .json5), however not all code editors support JSON Schema with .json5, so lerna.json might still be the preferred extension (all formats support inline comments, even .json).

Note that package-a will not be created, it is only shown here to help clarify the structure. For more info and full details about the lerna.json file, you can read the lerna.json Wiki. Also note that you can optionally add comments to your lerna.json config file since it is also able to parse JSON5 file format.

The final step will be to install the commands that are of interest to you (publish, version, run, exec, ...)

$ npm i @lerna-lite/publish -D

Installation

Lerna-Lite is entirely modular, as opposed to Lerna, and installing the CLI locally or globally will only provide you the init command. Please make sure to install other commands that you are interested in (see table below).

If you are new to Lerna-Lite, you could also run the lerna init command which will create the lerna.json for you with a minimal structure setup. If you are using a client other than npm, then make sure to update the npmClient property in lerna.json (for example: "npmClient": "yarn" or "pnpm").

Note please make sure that you have a lerna.json config file created and a version property defined with either a fixed or independent mode. An error will be thrown if you're missing any of them.

JSON Schema

You can add the $schema property into your lerna.json to take advantage of Lerna-Lite JSON Schema (lerna init can help setting it up for you). This will help with the developer experience, users will be able to see what properties are valid with their types and a brief description of what each option does (descriptions are pulled from their associated lerna command options documentation).

lerna.json
{
  "$schema": "node_modules/@lerna-lite/cli/schemas/lerna-schema.json",
  // ...

  // or from a CDN
  "$schema": "https://raw.githubusercontent.com/lerna-lite/lerna-lite/main/packages/cli/schemas/lerna-schema.json",
}

Note JSON Schema might not be well supported by all code editors with .json5, use lerna.json if that is a problem for you.

Separate / Optional Installs

Command Install Description
โ˜๏ธ publish npm i @lerna-lite/publish -D publish each workspace package
๐Ÿ“‘ version npm i @lerna-lite/version -D create new version for each workspace package
๐Ÿ•œ changed npm i @lerna-lite/changed -D list local packages changed since last release
๐ŸŒ“ diff npm i @lerna-lite/diff -D git diff all packages since the last release
๐Ÿ‘ท exec npm i @lerna-lite/exec -D execute an command in each workspace package
๐Ÿ“– list npm i @lerna-lite/list -D list local packages
๐Ÿƒ run npm i @lerna-lite/run -D run npm script in each workspace package
๐Ÿ‘“ watch npm i @lerna-lite/watch -D watch for changes & execute commands when fired

Note since the publish package depends on the version package, you could simply install @lerna-lite/publish to automatically gain access to both commands.

Usage

Add custom NPM scripts or simply run the commands in your shell with the Lerna-Lite CLI, you can see below some very basic Lerna npm script samples.

// package.json / npm scripts
"scripts": {
  "new-version": "lerna version",
  "new-publish": "lerna publish from-package",
  "preview:new-version": "lerna version --dry-run",
  "run-tests": "lerna run test",
}

Migration for existing Lerna users

Migrating from the original Lerna, should be fairly easy since you simply need to replace your Lerna dependency with Lerna-Lite @lerna-lite/cli, and you will need to manually install the command(s) that you are interested in and that's about it. The CLI commands and options are nearly the same. The biggest difference compared to Lerna is that you need to install the commands that you are interested in, for that take a look at the steps shown below:

Note as opposed to Lerna v7 and higher, the useWorkspace is not enabled by default in Lerna-Lite and we still recommend to use either useWorkspaces for Yarn/NPM or use the default packages in lerna.json for pnpm users. The useWorkspaces has some drawback since some of the packages could be unrelated to the project releases (ie: website, examples) and for this use case the packages/* defined in lerna.json is a better approach (i.e. Jest uses this approach).

  1. remove Lerna from your local & global dependencies
npm uninstall lerna      # OR yarn remove lerna -W
npm uninstall -g lerna   # OR yarn global remove lerna
  1. install Lerna-Lite CLI, note this only provides you the init command
# Lerna CLI (includes `init`)
npm install @lerna-lite/cli -D
  1. then install any of the optional Lerna-Lite command(s) that you wish to use (changed, diff, exec, list, run, publish, version and/or watch) refer to installation table above
# for example, let's install publish (note publish will automatically give you version since it's a dependency)
npm install @lerna-lite/publish -D
  1. review your lerna.json config file and remove any unrelated command options, for example bootstrap does not exist in Lerna-Lite so there's no need to keep that config
{
    "npmClient": "yarn",
    "command": {
        "version": {
            "conventionalCommits": true
        },
-       "bootstrap": {
-           "npmClientArgs": ["--no-package-lock"]
-       }
    }
}

Note after switching to Lerna-Lite and publishing your next release with conventional-changelog, you will probably see a lot of diff changes across your changelog.md files, many empty lines will be deleted, and that is totally expected since Lerna-Lite has code in place to remove these empty lines that were added by Lerna for no reason.

Project Demo?

You want to see a project demo? Sure... you're looking at it ๐Ÿ˜‰

Yes indeed, this project was originally created as an NPM Workspace and later migrated to a pnpm workspaces for the sole purpose of demoing and testing its own code. All changelogs and versions are created and published by the lib itself, how sweet is that? You can also see that this project has its own lerna.json config file as well to run properly (take a look to see how it works).

See it in Action ๐ŸŽฆ

You can see a small video of a new version release on this Release Demo - Wiki to demonstrate its usage. Confused with all these options? Perhaps taking a look at some of the references shown below might help you get started.

Good Lerna Tutorials / References

Contributions

PR

Feel free to contribute any Pull Request. Also please note that the original code was not created by me and my knowledge of the library is still limited in some sections of the project. The main goal of this fork was to make it more modular and keep dependencies up to date (Renovate was put in place and runs weekly).

Development / Contributions

To contribute to the project, please follow the steps shown in the Contributing Guide

Troubleshooting

If you have problems running the lib and your problems are related to Git commands that were executed, then we suggest to first try with the --dry-run option to see if it helps in finding the error(s) that you may have. Another great, and possibly much more useful suggestion, is to search in the original Lerna issues list and see if any solution could help you (remember that Lerna-Lite is a fork of the original code from Lerna and it works the same way). Lastly, if that is not enough and you wish to troubleshoot yourself, then read this Troubleshooting - Wiki to possibly troubleshoot yourself the execution in your own environment.

Published Packages

Package Name Version Description Changes
@lerna-lite/cli npm Lerna-Lite CLI required to execute any command changelog
@lerna-lite/core npm Lerna-Lite core & shared methods (internal use) changelog
@lerna-lite/init npm Setup your monorepo to use Lerna-Lite changelog
@lerna-lite/publish npm Publish packages in the current workspace changelog
@lerna-lite/version npm Bump Version & write Changelogs changelog
@lerna-lite/exec npm Execute shell command in current workspace changelog
@lerna-lite/changed npm List local packages that changed since last release changelog
@lerna-lite/diff npm Diff all packages or a single package since last release changelog
@lerna-lite/list npm List local packages changelog
@lerna-lite/listable npm Listable utils used by list and changed commands (internal use) changelog
@lerna-lite/filter-packages npm Lerna-Lite filtering package utils used by optional commands (internal use) changelog
@lerna-lite/npmlog npm inline version of npmlog util (mostly for internal usage) changelog
@lerna-lite/profiler npm Lerna-Lite Profiler used by some optional commands (internal use) changelog
@lerna-lite/run npm Run npm scripts in current workspace changelog
@lerna-lite/watch npm Watch for pkg changes and execute callback commands changelog

Sponsors

Wundergraph

lerna-lite's People

Contributors

ahrbil avatar ariperkkio avatar azu avatar brammitch avatar d-fischer avatar dependabot[bot] avatar ghiscoding avatar ghost91- avatar heilmela avatar jacobsoderblom avatar jason3s avatar johnsoncodehk avatar ma-multipla avatar mrazauskas avatar mvila avatar naymi avatar njfamirm avatar p-chan avatar petermetz avatar renovate-bot avatar renovate[bot] avatar rfoel avatar wassim-ben-amor avatar xueran avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lerna-lite's Issues

lerna lite get `packages` from `workspaces` in `package.json`

Describe the bug

lerna 7 by default use workspaces from package.json
lerna-lite by default use packages/*

Expectation

No response

Reproduction

-https://github.com/lerna/lerna/releases#:~:text=Workspaces%20are%20used%20by%20default%20and%20useWorkspaces%20has%20been%20removed

Lerna config and logs

lerna.json

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

lerna-debug.log

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

Environment Info

System:
OS: Linux 5.19 Ubuntu 22.10 22.10 (Kinetic Kudu)
CPU: (24) x64 12th Gen Intel(R) Core(TM) i9-12900
Memory: 25.74 GB / 62.62 GB
Container: Yes
Shell: 5.2.2 - /bin/bash
Binaries:
Node: 18.16.0 - /usr/bin/node
npm: 9.6.7 - /usr/bin/npm
Browsers:
Chrome: 114.0.5735.106
Firefox: 113.0.2

Used Package Manager

npm

Validations

"--include-merged-tags" not working in "lerna publish" and "lerna version"

Describe the bug

when use "lerna changed",it is found 1 package ready to publish, but when use "lerna publish" or "erna version", it is assuming all packages changed

Expectation

In the above questions๏ผŒfound 1 package ready to publish is right, so expect the "lerna publish" and "lerna version" behavior to be consistent with the "lerna changed" behavior

Reproduction

Git log need contain "Merge branch xxx".

The following steps may be required for problem recurrence:

  1. Create a new branch
  2. publish a package,
  3. merge the branch into the master,
  4. create another branch,
  5. and change another package for publishing

Lerna config and logs

lerna.json

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

lerna-debug.log

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

Environment Info

System:
OS: macOS 11.3.1
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Memory: 126.13 MB / 16.00 GB
Shell: 5.8 - /bin/zsh

Binaries:
Node: 16.13.0 - ~/.nvm/versions/node/v16.13.0/bin/node
Yarn: 1.22.19 - ~/.nvm/versions/node/v16.13.0/bin/yarn
npm: 8.1.0 - ~/.nvm/versions/node/v16.13.0/bin/npm

Browsers:
Chrome: 110.0.5481.177
Firefox: 78.9.0
Safari: 14.1

Used Package Manager

pnpm

Validations

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Location: .github/renovate.json5
Error type: Invalid JSON5 (parsing failed)
Message: JSON5.parse error: JSON5: invalid character '{' at 16:5

lerna version - "%s" does not work in independent mode

Hello and thanks for the software.

This issue is with respect to lerna version.

1) Version in the Commit

Is there a way to put the version in the commit message, in independent mode? I'm aware that the "%s" and "%v" magic strings exist, but those seem to do nothing in independent mode.

2) Package in the Commit

Furthermore, I also want to put the package name of the thing that is being released in the commit message.
Thus, a magic string of "%p" would be a really nice feature and probably easy to add.

3) Conventional Commit Messages

From the source code, it seems that lerna-lite does not use conventional commit messages by default. In 2022, most of the ecosystem has embraced conventional commit messages, and even this repository uses them. Thus, I believe that lerna-lite should produce conventional commit messages by default. Specifically, it just needs to add a "chore:" prefix to the existing default, or something along those lines.

Any plans to rename cli?

Hi there

I was wondering if it would be considered to update the cli to learna-lite in a future version, as opposed to the two ws-* commands? The reasoning behind this would be for ease of development, where developers familiar with lerna could easily recognise the use of this project as lerna like commands, whereas ws-* is not familiar

I'm submitting a Feature request

Motivation / Use Case

Ease of migration and familiarity for developers

Expected Behavior

ws-roller version - > lerna-lite version etc

Other Information

peerDependencies aren't bumped

Describe the bug

Hi, I have two packages A,B. B has a peerDependency to A.

{
  "name": "B",
  "peerDependencies": {
    "A": "workspace:^0.105.1"
  },
  "dependencies": {
    "A": "workspace:^0.105.1"
   }
}

After publishing A to 0.106.0 the version in dependencies was updated correctly but not for the peer-dependency.
I tried it as fixed constraints 0.105.0 and without the workspace protocol. In all cases, the peer-dependency was not bumped.

See lerna/lerna#955

Expectation

I'd expect that the peer dependency is updated to the next compatible version based on the version constraint.

A bumps with semver ^0.105.0 to 0.105.2 => B bumps with semver ^0.105.0 => 0.105.2 โœ”๏ธ
A bumps with semver 0.105.0 to 0.106.0 => B bumps with semver 0.105.0 => 0.106.0 โŒ because it is not compatible

Reproduction

See above.

Lerna config and logs

lerna.json

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

lerna-debug.log

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

Environment Info

| Executable        | Version |
| ----------------- | ------- |
| `lerna --version` | VERSION |
| `npm --version`   | VERSION |
| `yarn --version`  | VERSION |
| `node --version`  | VERSION |

---
OR simply run `npx lerna info` command and copy+paste the result here

Used Package Manager

pnpm

Validations

ts-node should be `devDependencies`

I'm submitting a Bug report

Your Environment

Executable Version
lerna --version 1.0.4
npm --version 8.3.0
yarn --version 3.2.0
node --version v16.13.0
OS Version
NAME VERSION
macOS 12.3

Describe the Bug

ts-node should be devDependencies, but follow packages has it as dependencies

https://github.com/ghiscoding/lerna-lite/blob/c833bad589258e4a1635d1d93252010670640642/packages/core/package.json#L77
https://github.com/ghiscoding/lerna-lite/blob/c833bad589258e4a1635d1d93252010670640642/packages/publish/package.json#L60

Yarn v3 show following warning when install @lerna-lite/cli

โžค YN0002: โ”‚ @lerna-lite/core@npm:1.0.4 doesn't provide @types/node (pb19ee), requested by ts-node
โžค YN0002: โ”‚ @lerna-lite/core@npm:1.0.4 doesn't provide typescript (p785e5), requested by ts-node
โžค YN0002: โ”‚ @lerna-lite/publish@npm:1.0.4 doesn't provide @types/node (p8fb40), requested by ts-node
โžค YN0002: โ”‚ @lerna-lite/publish@npm:1.0.4 doesn't provide typescript (p525db), requested by ts-node

Steps to Reproduce (for bugs)

  1. yarn set version stable
  2. yarn add @lerna-lite/cli
yarn add @lerna-lite/cli
โžค YN0000: โ”Œ Resolution step
โžค YN0002: โ”‚ @lerna-lite/core@npm:1.0.4 doesn't provide @types/node (pb19ee), requested by ts-node
โžค YN0002: โ”‚ @lerna-lite/core@npm:1.0.4 doesn't provide typescript (p785e5), requested by ts-node
โžค YN0002: โ”‚ @lerna-lite/publish@npm:1.0.4 doesn't provide @types/node (p8fb40), requested by ts-node
โžค YN0002: โ”‚ @lerna-lite/publish@npm:1.0.4 doesn't provide typescript (p525db), requested by ts-node
โžค YN0000: โ”‚ Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code
โžค YN0000: โ”” Completed
โžค YN0000: โ”Œ Fetch step
โžค YN0000: โ”” Completed in 0s 218ms
โžค YN0000: โ”Œ Link step
โžค YN0000: โ”” Completed in 0s 245ms
โžค YN0000: Done with warnings in 0s 629ms

Expected Behavior

No warning on installing it.

Current Behavior

Show YN0002 - MISSING_PEER_DEPENDENCY warning

Possible Solution

Move ts-node to devDependencies

Peer Dependency Issue w/ Octokit

Describe the bug

There appears to be a peer deps mismatch with one of @lerna-lite/cli's dependencies:
image

I imagine a recent NPM w/ strict peer deps will likely run into a similiar issue.

Expectation

Installs without warnings.

Reproduction

Install @lerna-lite/cli into a fresh, pnpm 7.5.x package.

Lerna config and logs

N/A

Environment Info

Environment info:

  System:
    OS: Linux 5.10 Ubuntu 20.04.4 LTS (Focal Fossa)
    CPU: (12) x64 AMD Ryzen 5 5600G with Radeon Graphics
  Binaries:
    Node: 16.16.0 - ~/.asdf/installs/nodejs/16.16.0/bin/node
    npm: 8.11.0 - ~/.asdf/plugins/nodejs/shims/npm
  Utilities:
    Git: 2.25.1 - /usr/bin/git

PNPM via Corepack: `[email protected]`

Used Package Manager

pnpm

Validations

Complete - lerna version gets confused by non-lerna tags

Describe the bug

Described in lerna/lerna#2377

Partial implementation was already implemented evocateur/lerna@1694e98

We only need to filter tags before change detection.

This feature is very valuable in a monorepo where you use different technologies.

Relevant places:

  1. https://github.com/ghiscoding/lerna-lite/blob/37e32c0af59b01d2516a8ee89828bd35ad4054cb/packages/core/src/utils/describe-ref.ts#L47
    match: '*@*'
  2. https://github.com/ghiscoding/lerna-lite/blob/37e32c0af59b01d2516a8ee89828bd35ad4054cb/packages/core/src/utils/collect-updates/lib/has-tags.ts#L14
    ['tag', "--list", '*@*']

Expectation

Lerna should only consider git tag with the pattern *@* in independent mode.

Reproduction

  1. Make a change in a lerna package in independent mode.
  2. Create a tag e.g "v1.0.0"
  3. Lerna does not detect any changes anymore because it uses the latest tag as a reference.

Lerna config and logs

lerna.json

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

lerna-debug.log

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

Environment Info

| Executable        | Version |
| ----------------- | ------- |
| `lerna --version` | 1.5.1 |
| `npm --version`   | VERSION |
| `yarn --version`  | VERSION |
| `node --version`  | VERSION |

---
OR simply run `npx lerna info` command and copy+paste the result here

Used Package Manager

pnpm

Validations

`lerna run --no-bail` throws error

Describe the bug

Migrating to npm workspaces + lerna-lite from lerna and was trying to run my same lint command with --no-bail flag.
The command seems to work completely but throws an error after the success report. Tried the same command without the --no-bail flag and it passed just fine.

Reproduction

run any command with --no-bail

Lerna config and logs

lerna.json

{
  "packages": [
    "packages/*"
  ],
  "stream": true,
  "version": "independent"
}

lerna-debug.log

0 silly argv {
0 silly argv   _: [ 'run' ],
0 silly argv   bail: false,
0 silly argv   lernaVersion: '1.1.1',
0 silly argv   '$0': '/Users/alex/Source/eris-boiler/node_modules/.bin/lerna',
0 silly argv   script: 'lint'
0 silly argv }
1 notice cli v1.1.1
2 verbose rootPath /Users/alex/Source/eris-boiler
3 info versioning independent
4 verbose project packages packages/*
5 info Executing command in 3 packages: "npm run lint"
6 verbose Topological npm run lint
7 success run Ran npm script 'lint' in 3 packages in 8.0s:
8 error TypeError: Cannot read properties of undefined (reading 'name')
8 error     at /Users/alex/Source/eris-boiler/node_modules/@lerna-lite/run/dist/run-command.js:119:66
8 error     at Array.forEach (<anonymous>)
8 error     at /Users/alex/Source/eris-boiler/node_modules/@lerna-lite/run/dist/run-command.js:113:25

Environment Info

| Executable        | Version |
| ----------------- | ------- |
| `lerna --version` | 1.1.1 |
| `npm --version`   | 8.2.0 |
| `node --version`  | 16.13.1 |
---

Used Package Manager

npm

Validations

When using the version (or publish) command, the updated root package-lock.json file is not commited

Describe the bug

When using the version (or publish) command, the root package-lock.json file is correctly updated, but it's not added to the created git commit.

I believe that the problem is due to the promise chaining for updating the lock file is not set up correctly. In the logs, you can see that the adding of the changed files actually happens before the root lock file is updated:

lerna-lite sill gitAdd [
lerna-lite sill gitAdd   'packages/<package-1>/package.json',
lerna-lite sill gitAdd   'packages/<package-1>/CHANGELOG.md',
lerna-lite sill gitAdd   'packages/<package-2>/package.json',
lerna-lite sill gitAdd   'packages/<package-2>/CHANGELOG.md'
lerna-lite sill gitAdd ]
lerna-lite sill gitCommit chore(release): publish
lerna-lite sill gitCommit
lerna-lite sill gitCommit  - @<org>/<package-1>@3.4.112
lerna-lite sill gitCommit  - @<org>/<package-2>@9.4.168
lerna-lite verb git commit -F /tmp/c95d05df-4db1-40c6-a552-226d58894283/lerna-commit.txt
lerna-lite sill lock updating root "package-lock-json" for package "@<org>/<package-1>"
lerna-lite sill lock updating root "package-lock-json" for package "@<org>/<package-2>"

Reproduction

Do the following in a repo using lerna-lite, npm >= 7, and npm workspaces

  • Make some changes in one of the packages and commit them
  • Run npx lerna version --no-push
  • Observe that the package-lock.json file at the root has been updated, but the changes are not part of the commit made by lerna-lite (i.e., there are now uncommited changes in that file)

Lerna config and logs

lerna.json

{
  "npmClient": "npm",
  "command": {
    "publish": {
      "ignoreChanges": ["README.md"],
      "conventionalCommits": true,
      "message": "chore(release): publish",
      "registry": "<our internal registry>"
    }
  },
  "packages": ["packages/*"],
  "version": "independent"
}

Environment Info

| Executable        | Version  |
| ----------------- | -------- |
| `lerna --version` | 1.1.1    |
| `npm --version`   | 8.5.0    |
| `node --version`  | v16.14.2 |

Used Package Manager

npm

Validations

Support for patch: protocol

Thanks for resurrecting Lerna (with workspace: support). The version package is indispensable and irreplaceable. Have tried everything and nothing comes close.

I was able to get successfully ported to lerna-lite for the most part, but I had to remove any "patch:" protocol references to get it to work. Would be awesome for lerna-lite to gain support for this protocol.

lerna exec fails to call command with arguments in Powershell

Describe the bug

lerna exec -- git clean -ffdx . says "Unknown arguments f, d, x"

it works with quote, though: lerna exec -- "git clean -ffdx ."

Expectation

Should execute command just like in bash or cmd - quotes are a just a workaround, IMO

I haven't tried Powershell on Linux so far.

Reproduction

lerna exec -- git clean -ffdx .

Lerna config and logs

No response

Environment Info

@lerna-lite/exec 1.15.1

Used Package Manager

npm

Validations

PNPM workspace: protocol - wrong version rewrite

Describe the bug

Hi, lerna-lite replaced >= with ^. I'm not sure if this is correct.

Reproduction

  1. Create a pnpm workspace with two packages (FOO, SDK) and FOO depending on SDK.

FOO: version 0.80.0, use the version constraint workspace:>=0.91.0 on SDK
SDK: version 0.91.0

  1. Make a change in SDK and commit

Calculate the next version with lerna publish prerelease --no-verify-access --conventional-commits --create-release github lerna will bump the SDK version in FOO as follow.

---    "SDK": "workspace:>=0.91.0",
+++    "SDK": "workspace:^0.91.6-next.1",

Lerna config and logs

lerna.json

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

lerna-debug.log

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

Environment Info

| Executable        | Version |
| ----------------- | ------- |
| `lerna --version` | 1.4.0 |
| `npm --version`   | VERSION |
| `yarn --version`  | VERSION |
| `node --version`  | v16.14.2 |

---
OR simply run `npx lerna info` command

Used Package Manager

pnpm

Validations

Wrong handling of independent mode?

Describe the bug

Hi, I'm a bit curious about how the independent mode works. I made a preview and got the following logs:

> lerna version --conventional-commits --changelog-include-commits-client-login --create-release github --git-dry-run

lerna-lite notice cli v1.11.1
lerna-lite verb rootPath /home/starptech/repositories/wundergraph/wundergraph
lerna-lite info dry-run> git rev-parse
lerna-lite info versioning independent
lerna-lite verb project packages packages/nextjs packages/sdk packages/protobuf
lerna-lite info dry-run> git rev-list --count --all --max-count=1
lerna-lite verb isAnythingCommitted 1
lerna-lite verb currentBranch main
lerna-lite info dry-run> git show-ref --verify refs/remotes/origin/main
lerna-lite info dry-run> git remote update
lerna-lite info dry-run> git rev-list --left-right --count origin/main...main
lerna-lite verb hasTags filter for tags with '*@*' pattern
lerna-lite verb hasTags true
lerna-lite verb git-describe.sync "*@*" => "@wundergraph/[email protected]"
lerna-lite info Looking for changed packages since @wundergraph/[email protected]
lerna-lite verb filtered diff packages/nextjs/package.json
lerna-lite verb filtered diff packages/protobuf/package.json
lerna-lite verb filtered diff packages/sdk/package.json
lerna-lite verb updated @wundergraph/nextjs
lerna-lite verb updated @wundergraph/protobuf
lerna-lite verb updated @wundergraph/sdk
lerna-lite info dry-run> git describe --always --long --dirty --first-parent
lerna-lite verb getChangelogConfig using preset "conventional-changelog-conventionalcommits"
lerna-lite verb getChangelogConfig Attempting to resolve preset "conventional-changelog-conventionalcommits"
lerna-lite info getChangelogConfig Successfully resolved preset "conventional-changelog-conventionalcommits"
lerna-lite verb independent increment 0.1.4 by patch - @wundergraph/nextjs
lerna-lite verb independent increment 0.91.2 by patch - @wundergraph/protobuf
lerna-lite verb independent increment 0.98.3 by patch - @wundergraph/sdk

Changes (3 packages):
 - @wundergraph/nextjs: 0.1.4 => 0.1.5
 - @wundergraph/protobuf: 0.91.2 => 0.91.3
 - @wundergraph/sdk: 0.98.3 => 0.98.4

Check the line

lerna-lite verb git-describe.sync "*@*" => "@wundergraph/[email protected]"
lerna-lite info Looking for changed packages since @wundergraph/[email protected]

Shouldn't it be checked for each package individually? Why is @wundergraph/[email protected] the base?

Expectation

No response

Reproduction

No

Lerna config and logs

lerna.json

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

lerna-debug.log

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

Environment Info

| Executable        | Version |
| ----------------- | ------- |
| `lerna --version` | 1.11.1 |
| `npm --version`   | VERSION |
| `yarn --version`  | VERSION |
| `node --version`  | VERSION |

---
OR simply run `npx lerna info` command and copy+paste the result here

Used Package Manager

pnpm

Validations

`lerna run` choked on Node v14.17.5

Describe the bug

Executing lerna run on Node v14.17.5 runtime of pnpm gave me:

โžœ  fiddle git:(pnpm) pnpm node -v
v14.17.5
โžœ  fiddle git:(pnpm) pnpm x

> root@ x /Users/i532660/github/fiddle
> lerna run x

internal/modules/cjs/loader.js:892
  throw err;
  ^

Error: Cannot find module 'node:fs'
Require stack:
- /Users/i532660/github/fiddle/node_modules/.pnpm/registry.npmjs.org+@[email protected]/node_modules/@lerna-lite/version/dist/lib/update-lockfile-version.js
- /Users/i532660/github/fiddle/node_modules/.pnpm/registry.npmjs.org+@[email protected]/node_modules/@lerna-lite/version/dist/lib/index.js
- /Users/i532660/github/fiddle/node_modules/.pnpm/registry.npmjs.org+@[email protected]/node_modules/@lerna-lite/version/dist/index.js
- /Users/i532660/github/fiddle/node_modules/.pnpm/registry.npmjs.org+@[email protected]/node_modules/@lerna-lite/cli/dist/cli-commands/cli-version-commands.js
- /Users/i532660/github/fiddle/node_modules/.pnpm/registry.npmjs.org+@[email protected]/node_modules/@lerna-lite/cli/dist/cli-commands/cli-publish-commands.js
- /Users/i532660/github/fiddle/node_modules/.pnpm/registry.npmjs.org+@[email protected]/node_modules/@lerna-lite/cli/dist/lerna-entry.js
- /Users/i532660/github/fiddle/node_modules/.pnpm/registry.npmjs.org+@[email protected]/node_modules/@lerna-lite/cli/dist/cli.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:889:15)
    at Function.Module._load (internal/modules/cjs/loader.js:745:27)
    at Module.require (internal/modules/cjs/loader.js:961:19)
    at require (internal/modules/cjs/helpers.js:92:18)
    at Object.<anonymous> (/Users/i532660/github/fiddle/node_modules/.pnpm/registry.npmjs.org+@[email protected]/node_modules/@lerna-lite/version/dist/lib/update-lockfile-version.js:10:19)
    at Module._compile (internal/modules/cjs/loader.js:1072:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
    at Module.load (internal/modules/cjs/loader.js:937:32)
    at Function.Module._load (internal/modules/cjs/loader.js:778:12)
    at Module.require (internal/modules/cjs/loader.js:961:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/Users/i532660/github/fiddle/node_modules/.pnpm/registry.npmjs.org+@[email protected]/node_modules/@lerna-lite/version/dist/lib/update-lockfile-version.js',
    '/Users/i532660/github/fiddle/node_modules/.pnpm/registry.npmjs.org+@[email protected]/node_modules/@lerna-lite/version/dist/lib/index.js',
    '/Users/i532660/github/fiddle/node_modules/.pnpm/registry.npmjs.org+@[email protected]/node_modules/@lerna-lite/version/dist/index.js',
    '/Users/i532660/github/fiddle/node_modules/.pnpm/registry.npmjs.org+@[email protected]/node_modules/@lerna-lite/cli/dist/cli-commands/cli-version-commands.js',
    '/Users/i532660/github/fiddle/node_modules/.pnpm/registry.npmjs.org+@[email protected]/node_modules/@lerna-lite/cli/dist/cli-commands/cli-publish-commands.js',
    '/Users/i532660/github/fiddle/node_modules/.pnpm/registry.npmjs.org+@[email protected]/node_modules/@lerna-lite/cli/dist/lerna-entry.js',
    '/Users/i532660/github/fiddle/node_modules/.pnpm/registry.npmjs.org+@[email protected]/node_modules/@lerna-lite/cli/dist/cli.js'
  ]
}
โ€‰ELIFECYCLEโ€‰ Command failed with exit code 1.

Running on a higher version, e.g. v16.16.0, seemed to be fine.

Expectation

No response

Reproduction

Should be reproducible here:
https://github.com/dwiyatci/fiddle/tree/pnpm

Simply run pnpm x :-)

Lerna config and logs

lerna.json

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

lerna-debug.log

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

Environment Info

Environment info:

  System:
    OS: macOS 12.4
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
  Binaries:
    Node: 14.17.5 - ~/Library/pnpm/node
    Yarn: 1.19.1 - ~/.volta/bin/yarn
    npm: 6.14.14 - ~/Library/pnpm/npm
  Utilities:
    Git: 2.32.1 - /usr/bin/git

Used Package Manager

pnpm

Validations

Can't publish because same version (using preid)

Describe the bug

Published version is 1.0.0-canary.204+c205abc9.

Running lerna publish --canary --preid canary --force-publish it wants to publish 1.0.0-canary.204+2623907d.

npm fails with:

lerna-lite ERR! E403 You cannot publish over the previously published versions: 1.0.0-canary.204.
lerna-lite ERR! E403 You cannot publish over the previously published versions: 1.0.0-canary.204.

Reproduction

On this branch yarn publish:canary: tamagui/tamagui#41

Lerna config and logs

lerna.json

{
  "packages": [
    "packages/*"
  ],
  "version": "1.0.0-alpha.68"
}

Environment Info

lerna-lite notice cli v1.1.1

 Environment info:

  System:
    OS: macOS 12.3.1
    CPU: (8) arm64 Apple M1
  Binaries:
    Node: 16.14.0 - ~/Library/Caches/fnm_multishells/12323_1651466856815/bin/node
    Yarn: 3.2.0 - ~/Library/Caches/fnm_multishells/12323_1651466856815/bin/yarn
    npm: 8.3.1 - ~/Library/Caches/fnm_multishells/12323_1651466856815/bin/npm
  Utilities:
    Git: 2.34.1 - /opt/homebrew/bin/git

Used Package Manager

yarn >= 2.x

Validations

pnpm-lock.yaml is no longer updated

Describe the bug

See CI Job
The command is executed but the updated lock file was not committed wundergraph/wundergraph@b9dea13

Expectation

I miss the line

 git add -- packages/sdk/package.json packages/sdk/CHANGELOG.md packages/nextjs/package.json packages/nextjs/CHANGELOG.md pnpm-lock.yaml

Reproduction

No idea

Lerna config and logs

lerna.json

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

lerna-debug.log

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

Environment Info

| Executable        | Version |
| ----------------- | ------- |
| `lerna --version` | 1.5.1 |
| `npm --version`   | VERSION |
| `yarn --version`  | VERSION |
| `node --version`  | VERSION |

---
OR simply run `npx lerna info` command and copy+paste the result here

Used Package Manager

pnpm

Validations

Sign multiple tags fails

Describe the bug

I have a monorepo with (~ 16) packages and individual versionin. Running lerna version --exact --conventional-commits --sign-git-commit --sign-git-tag --tag-version-prefix='' leads to:

lerna-lite ERR! lerna-lite Command failed with exit code 128: git tag [email protected] -m [email protected] --sign
lerna-lite ERR! lerna-lite error: gpg failed to sign the data
lerna-lite ERR! lerna-lite error: unable to sign the tag

This Errors does not occur when only a few package are bumped and i can individually execute git tag ... --sign myself. So it doesnt seem to be a gpg config issue.

Expectation

Signing of many tags should work

Reproduction

Create a monorepo with 16 packages and bump the version of all with

lerna version --exact --conventional-commits --sign-git-commit --sign-git-tag --tag-version-prefix=''

The error does not occur every time, it seems to be some kind of timing issue

Lerna config and logs

lerna.json

{
  "packages": ["packages/*", "apps/*"],
  "version": "independent",
  "npmClient": "yarn",
  "useWorkspaces": true,
  "command": {
    "version": {
      "allowBranch": "main",
      "message": "chore: published new release"
    }
  }
}

Environment Info

yarn 3.2.1
node v16.13.0
@lerna-lite/cli 1.16.0
MacOS (intel)

Used Package Manager

yarn >= 2.x

Validations

Inconsistent behaviour with workspaces

Describe the bug

lerna-lite does not recognize packages if they're not in "packages" (but in "apps" for example) as long as there's no 'useWorkspaces: true' in lerna.json. This property is not added by lerna init --use-workspaces and it seems undocumented (I just have it because I'm migrating from lerna 4).

OTOH, if I just change "packages/" in "workspaces" in package.json to "apps/" but don't actually rename the folder, packages in "packages" are still found.

Expectation

  • search packages as specified by workspaces property in package.json
  • ideally without "useWorkspaces: true" in lerna.json, but
  • if it's necessary add it through lerna init --use-workspace and
  • mention this in the docs.

Thank you for taking over lerna!!!

Reproduction

  • lerna init --use-workspaces
  • mkdir packages/p1 and create a basic package.json there
  • change "packages/" in package.json into "apps/"
  • try lerna list - still found, though "apps" does not exists
  • rename packages to apps
  • try lerna list - nothing found
  • put "useWorkspaces: true" into lerna.json
  • try lerna list - workspace is found again

Lerna config and logs

No response

Environment Info

@lerna-lite: 1.15.1

Happens with npm, yarn1, yarn3

Used Package Manager

npm

Validations

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/main.yml
  • actions/checkout v4
  • actions/setup-node v4
  • actions/cache v4
  • actions/checkout v4
  • actions/setup-node v4
  • actions/cache v4
  • actions/cache v4
  • codecov/codecov-action v4
.github/workflows/no-response.yml
.github/workflows/publish-npm-latest.yml
  • actions/checkout v4
  • actions/setup-node v4
  • actions/cache v4
  • step-security/wait-for-secrets v1
.github/workflows/publish-npm-prerelease.yml
  • actions/checkout v4
  • actions/setup-node v4
  • actions/cache v4
  • step-security/wait-for-secrets v1
.github/workflows/publish-npm-prompt.yml
  • actions/checkout v4
  • actions/setup-node v4
  • actions/cache v4
  • step-security/wait-for-secrets v1
.github/workflows/stale.yml
  • actions/stale v9
npm
package.json
  • @types/fs-extra ^11.0.4
  • @types/node ^20.14.11
  • @types/npmlog ^7.0.0
  • @types/yargs ^17.0.32
  • @vitest/coverage-v8 ^2.0.4
  • cross-env ^7.0.3
  • eslint ^9.7.0
  • eslint-config-prettier ^9.1.0
  • eslint-plugin-import ^2.29.1
  • eslint-plugin-n ^17.9.0
  • execa ^8.0.1
  • file-url ^4.0.0
  • find-up ^7.0.0
  • fs-extra ^11.2.0
  • glob ^10.4.5
  • globby ^14.0.2
  • load-json-file ^7.0.1
  • normalize-newline ^4.1.0
  • normalize-path ^3.0.0
  • prettier ^3.3.3
  • rimraf ^5.0.9
  • semver ^7.6.3
  • tacks ^1.2.6
  • temp-dir ^3.0.0
  • tempy ^3.1.0
  • ts-node ^10.9.2
  • tslib ^2.6.3
  • tsm ^2.3.0
  • typescript ^5.5.3
  • typescript-eslint ^8.0.0-alpha.51
  • vitest ^2.0.4
  • write-json-file ^5.0.0
  • node ^18.0.0 || >=20.0.0
  • pnpm 8.15.9
  • pnpm 8.15.9
packages/changed/package.json
  • yargs-parser ^21.1.1
  • node ^18.0.0 || >=20.0.0
packages/cli/package.json
  • dedent ^1.5.3
  • dotenv ^16.4.5
  • import-local ^3.2.0
  • load-json-file ^7.0.1
  • yargs ^17.7.2
  • yargs-parser ^21.1.1
  • node ^18.0.0 || >=20.0.0
packages/core/package.json
  • @inquirer/expand ^2.1.17
  • @inquirer/input ^2.2.4
  • @inquirer/select ^2.4.2
  • @npmcli/run-script ^8.1.0
  • chalk ^5.3.0
  • clone-deep ^4.0.1
  • config-chain ^1.1.13
  • cosmiconfig ^9.0.0
  • dedent ^1.5.3
  • execa ^8.0.1
  • fs-extra ^11.2.0
  • glob-parent ^6.0.2
  • globby ^14.0.2
  • is-ci ^3.0.1
  • json5 ^2.2.3
  • load-json-file ^7.0.1
  • minimatch ^9.0.5
  • npm-package-arg ^11.0.3
  • p-map ^7.0.2
  • p-queue ^8.0.1
  • resolve-from ^5.0.0
  • semver ^7.6.3
  • slash ^5.1.0
  • strong-log-transformer ^2.1.0
  • write-file-atomic ^5.0.1
  • write-json-file ^5.0.0
  • write-package ^7.0.1
  • @types/clone-deep ^4.0.4
  • @types/dedent ^0.7.2
  • @types/fs-extra ^11.0.4
  • @types/glob-parent ^5.1.3
  • @types/inquirer ^9.0.7
  • @types/minimatch ^5.1.2
  • @types/npm-package-arg ^6.1.4
  • @types/semver ^7.5.8
  • @types/strong-log-transformer ^1.0.2
  • @types/write-file-atomic ^4.0.3
  • npm-registry-fetch ^17.1.0
  • yargs ^17.7.2
  • yargs-parser ^21.1.1
  • node ^18.0.0 || >=20.0.0
packages/diff/package.json
  • @types/fs-extra ^11.0.4
  • execa ^8.0.1
  • fs-extra ^11.2.0
  • yargs-parser ^21.1.1
  • node ^18.0.0 || >=20.0.0
packages/exec/package.json
  • chalk ^5.3.0
  • dotenv ^16.4.5
  • p-map ^7.0.2
  • @types/fs-extra ^11.0.4
  • fs-extra ^11.2.0
  • globby ^14.0.2
  • yargs ^17.7.2
  • yargs-parser ^21.1.1
  • node ^18.0.0 || >=20.0.0
packages/filter-packages/package.json
  • multimatch ^7.0.0
  • @types/node ^20.14.11
  • yargs ^17.7.2
  • node ^18.0.0 || >=20.0.0
packages/init/package.json
  • fs-extra ^11.2.0
  • p-map ^7.0.2
  • write-json-file ^5.0.0
  • yargs-parser ^21.1.1
  • node ^18.0.0 || >=20.0.0
packages/list/package.json
  • yargs-parser ^21.1.1
  • node ^18.0.0 || >=20.0.0
packages/listable/package.json
  • chalk ^5.3.0
  • columnify ^1.6.0
  • yargs ^17.7.2
  • node ^18.0.0 || >=20.0.0
packages/npmlog/package.json
  • aproba ^2.0.0
  • color-support ^1.1.3
  • console-control-strings ^1.1.0
  • has-unicode ^2.0.1
  • set-blocking ^2.0.0
  • signal-exit ^4.1.0
  • string-width ^7.2.0
  • strip-ansi ^7.1.0
  • wide-align ^1.1.5
  • readable-stream ^4.5.2
  • node ^18.0.0 || >=20.0.0
packages/profiler/package.json
  • fs-extra ^11.2.0
  • upath ^2.0.1
  • @types/node ^20.14.11
  • yargs ^17.7.2
  • node ^18.0.0 || >=20.0.0
packages/publish/package.json
  • @npmcli/arborist ^7.5.4
  • @npmcli/package-json ^5.2.0
  • byte-size ^8.2.1
  • chalk ^5.3.0
  • columnify ^1.6.0
  • fs-extra ^11.2.0
  • glob ^10.4.5
  • has-unicode ^2.0.1
  • libnpmaccess ^8.0.6
  • libnpmpublish ^9.0.9
  • normalize-path ^3.0.0
  • npm-package-arg ^11.0.3
  • npm-packlist ^8.0.2
  • npm-registry-fetch ^17.1.0
  • p-map ^7.0.2
  • p-pipe ^4.0.0
  • pacote ^18.0.6
  • semver ^7.6.3
  • ssri ^10.0.6
  • tar ^6.2.1
  • temp-dir ^3.0.0
  • @types/fs-extra ^11.0.4
  • @types/semver ^7.5.8
  • load-json-file ^7.0.1
  • write-package ^7.0.1
  • yargs ^17.7.2
  • yargs-parser ^21.1.1
  • node ^18.0.0 || >=20.0.0
packages/run/package.json
  • chalk ^5.3.0
  • fs-extra ^11.2.0
  • p-map ^7.0.2
  • @types/fs-extra ^11.0.4
  • globby ^14.0.2
  • perf_hooks ^0.0.1
  • yargs ^17.7.2
  • yargs-parser ^21.1.1
  • node ^18.0.0 || >=20.0.0
packages/version/package.json
  • @octokit/plugin-enterprise-rest ^6.0.1
  • @octokit/rest ^21.0.1
  • chalk ^5.3.0
  • dedent ^1.5.3
  • fs-extra ^11.2.0
  • get-stream ^9.0.1
  • git-url-parse ^14.1.0
  • graceful-fs ^4.2.11
  • is-stream ^4.0.1
  • load-json-file ^7.0.1
  • make-dir ^5.0.0
  • minimatch ^9.0.5
  • new-github-release-url ^2.0.0
  • node-fetch ^3.3.2
  • npm-package-arg ^11.0.3
  • p-limit ^6.1.0
  • p-map ^7.0.2
  • p-pipe ^4.0.0
  • p-reduce ^3.0.0
  • pify ^6.1.0
  • semver ^7.6.3
  • slash ^5.1.0
  • temp-dir ^3.0.0
  • uuid ^10.0.0
  • write-json-file ^5.0.0
  • @npm/types ^1.0.2
  • @types/conventional-changelog-writer ^4.0.10
  • @types/conventional-commits-parser ^5.0.0
  • @types/dedent ^0.7.2
  • @types/fs-extra ^11.0.4
  • @types/git-url-parse ^9.0.3
  • @types/js-yaml ^4.0.9
  • @types/minimatch ^5.1.2
  • @types/npm-package-arg ^6.1.4
  • @types/pify ^5.0.4
  • @types/semver ^7.5.8
  • execa ^8.0.1
  • fs-extra ^11.2.0
  • js-yaml ^4.1.0
  • write-package ^7.0.1
  • yargs ^17.7.2
  • yargs-parser ^21.1.1
  • node ^18.0.0 || >=20.0.0
packages/watch/package.json
  • chokidar ^3.6.0
  • mock-stdin ^1.0.0
  • yargs-parser ^21.1.1
  • node ^18.0.0 || >=20.0.0

  • Check this box to trigger a request for Renovate to run again on this repository

Workspace Protocol with "workspace:^" in Peer Dependencies doesn't work

Discussed in #587

Originally posted by ma-multipla April 25, 2023
I'm having trouble comprehending the purpose of a specific code fragment. In the context of utilizing the workspace protocol for peer dependencies (e.g. "workspace:^"). Yarn Berry's default behavior is to substitute them with the locally resolved version upon generating the tarball through yarn pack. However, with the current Lerna version, the workspace protocol remains unaltered when applied to peer dependencies, resulting in incompatibility with package managers that don't support the protocol, such as npm.

Using the --allow-peer-dependencies-update flag only bumps the version in specific cases and in my case it only removed the "workspace:" portion, leaving the "^". I've read the documentation about the flag, but I have difficulties seeing the benefits of the current approach.
My questions is as follows:

Why isn't the --allow-peer-dependencies-update flag enabled by default for the workspace protocol and why is it only bumping the workspace protocol when the version is specified like this "workspace:^1.2.0". This essentially makes it not possible to only use the npm range operator without specifying the version, e.g. "workspace:^". Why would you want this?
The documentation is also a bit misleading:

{
  "name": "B",
  "dependencies": {
    "A": "workspace:^1.2.0"   // will update to "workspace:^1.3.0",
    "B": "^0.4.0":            // will update to "^0.5.0"
   },
  "peerDependencies": {
    "A": "workspace:^1.2.0"   // will update to "workspace:^1.3.0"
    "B": ">=0.2.0":           // will not be updateed because range with operator (>=) are skipped
  }
}

https://github.com/lerna-lite/lerna-lite/blob/main/packages/version/README.md#with-flag-enabled

It will update to "^1.3.0" not "workspace:^1.3.0". My expectation would be that either "workspace:^" as well as "workspace:^1.2.0" should lead to a version bump to "^1.3.0" considering the example above.

Here's the code snippet in question:

// Perform certain actions when there are peer dependencies
if (this.peerDependencies?.[depName]) {
  // If the user allows peer bump and it's a regular semver version, add it to the array of dependencies to potentially bump
  // However, don't do this when the semver has a range with an operator, e.g., bump ("^2.0.0") but not (">=2.0.0" or "workspace:<2.0.0" or "workspace:*")
  // prettier-ignore
  if (allowPeerDependenciesUpdate && /^(workspace:)?[~^]?[\d\.]+([\-]+[\w\.\-\+]+)*$/i.test(this.peerDependencies[depName] || '')) {
    updatingDependencies.push(this.peerDependencies);
  }
  // When peer bump is disabled, some peerDependencies might not be reviewed and could still have the `workspace:` prefix, so ensure to remove any of these prefixes
  else if (updatedByCommand === 'publish' && this.peerDependencies[depName].startsWith('workspace:')) {
    this.peerDependencies[depName] = this.peerDependencies[depName].replace('workspace:', '');
  }
}

Source: Lerna Lite Core Package.ts

Seems like --yes stopped working

Describe the bug

We are using the --yes option for publishing tasks, which worked in 1.13. but seems to be ignored in 1.15.x.

CI Job:

> new-publish:ci
> lerna publish --yes

lerna-lite notice cli v1.15.1
lerna-lite info ci enabled
lerna-lite info current project version 0.8.21
lerna-lite info Assuming all packages changed
? Select a new version (currently 0.8.21) (Use arrow keys)
โฏ Patch (0.8.22) 
  Minor (0.9.0) 
  Major (1.0.0) 
  Prepatch (0.8.22-alpha.0) 
  Preminor (0.9.0-alpha.0) 
  Premajor (1.0.0-alpha.0) 
  Custom Prerelease 
  Custom Version 
Error: Process completed with exit code 130.

Corresponding npm script:

"new-publish:ci": "lerna publish --yes",

Expectation

--yes should work

Reproduction

Run lerna publish --yes in a CI environment, e.g.: Github Actions

Lerna config and logs

lerna.json

{
  "$schema": "node_modules/@lerna-lite/cli/schemas/lerna-schema.json",
  "packages": [
    "packages/@pandino/*"
  ],
  "npmClient": "npm",
  "version": "0.8.21",
  "ignoreChanges": [
    "**/__fixtures__/**",
    "**/__tests__/**",
    "**/helpers/**",
    "**/*.md"
  ]
}

lerna-debug.log

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

Environment Info

lerna-lite version:

"@lerna-lite/cli": "^1.15.1",
"@lerna-lite/run": "^1.15.1",

Used Package Manager

npm

Validations

Running lerna commands with 1.0.0 gives: Error: Cannot find module 'import-local'

I'm submitting a Bug report

Your Environment

Executable Version
lerna --version unable to run command
npm --version 8.5.4
yarn --version not installed
node --version 16.14.0
OS Version
Windows 11 21H2
WSL2/Ubuntu 21.04

Describe the Bug

Running any of the lerna commands with 1.0.0 installed gives Error: Cannot find module 'import-local'. Using ws-roller and ws-runner worked fine in 0.3.7.

Steps to Reproduce (for bugs)

  1. Make a new project npm init
  2. Install deps npm i @lerna-lite/cli @lerna-lite/run
  3. lerna version -> Error: Cannot find module 'import-local'
lerna.json

{
  "packages": ["packages/*"],
  "version": "1.0.3",
  "npmClient": "npm",
  "useWorkspaces": true,
  "command": {
    "version": {
      "allowBranch": "main",
      "conventionalCommits": true,
      "message": "chore(release): publish"
    }
  }
}

Expected Behavior

The lerna commands should function the same way they did when it was ws-roller and ws-runner

Current Behavior

$ lerna version
node:internal/modules/cjs/loader:936
  throw err;
  ^

Error: Cannot find module 'import-local'
Require stack:
- /home/brando/.nvs/node/16.14.0/x64/lib/node_modules/@lerna-lite/cli/dist/cli.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/home/brando/.nvs/node/16.14.0/x64/lib/node_modules/@lerna-lite/cli/dist/cli.js:8:40)
    at Module._compile (node:internal/modules/cjs/loader:1103:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1155:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/home/brando/.nvs/node/16.14.0/x64/lib/node_modules/@lerna-lite/cli/dist/cli.js'
  ]
}

Support `major` after options

In my projects i often use this npm script:

"publish": "npm run build && lerna publish --create-release=github --force-publish",

Now i sometimes want to force a major update and thus i am tempted to use npm run publish -- major
But it wont work. Running lerna publish --create-release=github --force-publish major ignore the major argument. While running lerna publish major --create-release=github --force-publish works.

Could it be possible for it to be independant of the order?

lerna-schema.json has incorrect defintion for "contents" option (should be type: "string")

Discussed in #459

Originally posted by chandu-ex January 25, 2023

As per lerna documentation @ https://github.com/lerna/lerna/blob/main/commands/publish/README.md#--contents-dir the expected value is a directory name (e.g: dist, build etc.)
But in the lerna-schema.json definition of this @lerna-lite/cli package (https://github.com/lerna-lite/lerna-lite/blob/main/packages/cli/schemas/lerna-schema.json#L1626) the definition is marked as boolean
Shouldn't this be a string type i.e.

"contents": {
  "type": "string",
  "description": "For `lerna bootstrap`, `lerna link`, and `lerna publish`, the subdirectory to use as the source of any links. Must apply to ALL packages."
}

Feature: lerna publish --dist

Nx is quickly becoming the most popular monorepo tool. However, it does not come with any versioning or publishing tools, and this is where lerna-lite shines, so lerna-lite seems like a natural fit to add on top of an Nx monorepo.

First, let's understand how monorepos are set up with Nx:
At the root of the monorepo, there is a dist directory, and all of the packages are compiled to subdirectories there.

monorepo/
โ”œโ”€โ”€ packages/
|   โ”œโ”€โ”€ foo
|   โ””โ”€โ”€ bar
โ””โ”€โ”€ dist/
    โ””โ”€โ”€ packages/
        โ”œโ”€โ”€ foo
        โ””โ”€โ”€ bar

However, this directory structure does not seem to be usable with lerna-lite, because it tries to publish from the source directory instead of the output directory. Furthermore, lerna publish exposes a --contents flag, but I don't think this is helpful for us because the file path to publish is dynamic and based on the package name, so you can't specify it in a simple string.

Since this is a common directory structure, I propose that lerna-lite adds two optional flags to lerna publish:

  • --publishBaseDirectory - The path to the parent directory of the directory to publish. In this case, it would be monorepo/dist. Then, when publishing, lerna-lite will cd to publishBaseDirectory/packageName.
  • --dist - This would be an alias for --publishBaseDirectory dist. A special alias is provided for convenience since this is the most common monorepo/JavaScript/TypeScript convention.

Support `pnpm` workspaces

I'm submitting a Feature request

Motivation / Use Case

I would like a repo that uses pnpm workspaces to be able to use lerna-lite.

Expected Behavior

When version or publish are run in repositories that use pnpm workspaces, the commands should work.

Currently, the following error occurs:

~/elephant/web-packages -> chore/pnpm |โ€ข $
โฏ pnpm lerna publish
lerna notice cli v1.0.5
lerna info versioning independent
lerna ERR! Error: Unsupported URL Type "workspace:": workspace:^0.3.1
lerna ERR!     at unsupportedURLType (/Users/theo/elephant/web-packages/node_modules/.pnpm/[email protected]/node_modules/npm-package-arg/lib/npa.js:262:15)
lerna ERR!     at fromURL (/Users/theo/elephant/web-packages/node_modules/.pnpm/[email protected]/node_modules/npm-package-arg/lib/npa.js:322:13)
lerna ERR!     at Function.resolve (/Users/theo/elephant/web-packages/node_modules/.pnpm/[email protected]/node_modules/npm-package-arg/lib/npa.js:80:12)
lerna ERR!     at /Users/theo/elephant/web-packages/node_modules/.pnpm/@[email protected]/node_modules/@lerna-lite/core/dist/package-graph/package-graph.js:53:60
lerna ERR!     at Array.forEach (<anonymous>)
lerna ERR!     at /Users/theo/elephant/web-packages/node_modules/.pnpm/@[email protected]/node_modules/@lerna-lite/core/dist/package-graph/package-graph.js:47:44
lerna ERR!     at Map.forEach (<anonymous>)
lerna ERR!     at new PackageGraph (/Users/theo/elephant/web-packages/node_modules/.pnpm/@[email protected]/node_modules/@lerna-lite/core/dist/package-graph/package-graph.js:43:14)
lerna ERR! lerna Unsupported URL Type "workspace:": workspace:^0.3.1

Other Information

  • This same problem is present in the forked lerna repository lerna/lerna#2564 (comment)
  • I don't mind taking a crack at this myself when I can find the time ๐Ÿ‘
  • My focus is pnpm as that is my personal use-case, however this issue is present with yarn workspaces also.

PNPM workspace: protocol is not removed before publish

Describe the bug

As titled. This broke currently our release process ๐Ÿ˜ฑ

lerna publish --conventional-commits --create-release github --allow-branch main --yes --message="chore(release): Publish [skip ci]"

Reproduction

  1. Create PNPM workspace
  2. Use a dependency with workspace: protocol
  3. Publish with lerna.
  4. workspace: is still in the manifest.

Lerna config and logs

lerna.json

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

lerna-debug.log

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

Environment Info

| Executable        | Version |
| ----------------- | ------- |
| `lerna --version` | v1.4.0 |
| `npm --version`   | VERSION |
| `yarn --version`  | VERSION |
| `node --version`  | VERSION |

---
OR simply run `npx lerna info` command

Used Package Manager

pnpm

Validations

Does lerna-lite requires Node.js 16 actually?

General Topic

lerna-lite requires Node.js >=16.11.0

https://github.com/ghiscoding/lerna-lite/blob/c833bad589258e4a1635d1d93252010670640642/packages/cli/package.json#L31-L34

npm ignore engines by default.
yarn follow engines by default.

As a result, Node.js 14 + Yarn project can not install @lerna-lite/cli package with default configuration.

Your Environment

Software Version(s)
Lerna-Lite 1.0.4
NodeJS 14
TypeScript x.y

Context or Topic

I've used lerna for tools or libraries that supports Node.js LTS.
It means that my project run tests on Node.js 12, 14, 16.

Lerna and Lerna-lite are for publishing, but it will be installed on setup in most case.
It means that root package.json will includes @lerna-lite/cli as devDependencies.
As a result, yarn install fail to install @lerna-lite/cli on Node.js 12 and 14.

Example test configuration.
https://github.com/secretlint/secretlint/blob/a14c416c51207cf5b09cd6ea7421c903a9afd9da/.github/workflows/test.yml#L22-L39

Expected Behavior

As possible, support Node.js LTS.

๐Ÿ“ Node.js 12 LTS will be end of life at 2022-04-30.
https://nodejs.org/en/about/releases/
It is reasonable that still drop support Node.js 12.

Current Behavior

yarn add @lerna-lite/cli throw an error on Node.js 14.

โฏ node -v
v14.18.1
โฏ yarn -v
1.22.17
โฏ yarn add @lerna-lite/cli
yarn add v1.22.17
[1/4] ๐Ÿ”  Resolving packages...
[2/4] ๐Ÿšš  Fetching packages...
error @lerna-lite/[email protected]: The engine "node" is incompatible with this module. Expected version ">=16.11.0". Got "14.18.1"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

Possible Solution

Relax engines field.
In my enviroments, npm run jest on Node.js 14 passed all tests.

  "engines": {
-    "node": ">=16.11.0",
+    "node": ">=14.13.1",
    "npm": ">=8.0.0"
  },

๐Ÿ“ npm 8 has supported Node.js >=12. Source: Release v8.0.0 ยท npm/cli
๐Ÿ“ "node": ">=14.13.1" means Pure ESM support

Workaround

Yarn support --ignore-engines flag.
This flag skip engines checks.

It can be used as a workaround.

ws-roller version does not prompt for next version

I'm submitting a Bug report

Your Environment

Software Version(s)
Lerna-Lite 0.36
NodeJS 16.13.1
TypeScript -

Describe the Bug

npx ws-roller version does not prompt which version you want to create (major, minor, etc.) as stated in the docs:

ws-roller version # select from prompt(s)

Steps to Reproduce

npx ws-roller version

Expected Behavior

Prompt whether you want to create a new major, minor, patch, etc. version.

Current Behavior

Always just creates a new patch version.

Possible Solution

See how current version of lerna does it. I migrated from lerna and the behaviour is different.

Code Sample

npx ws-roller version

Add lerna exec

I'm submitting a Feature request

Motivation / Use Case

lerna exec makes it easy to run a command in every package in a repo. lerna run can cover most cases, but if we want to run a simple command like rm -rf ./lib in every package, or a subset of packages with --scope, it would be easier to migrate from Lerna if lerna exec was also part of lerna-lite.

Expected Behavior

Same behavior as Lerna's lerna exec "my-command"

Other Information

`--sync-workspace-lock` not working with `lerna version`

Describe the bug

I'm not sure if this is design behavior, --sync-workspace-lock maybe only is only meaningful for lerna release, but I don't have a new version to release yet so I can't try with lerna release. ๐Ÿคฃ

Expectation

Run lerna version --sync-workspace-lock should changes pnpm-lock.yaml.

Reproduction

Clone https://github.com/johnsoncodehk/volar and run and run $ pnpm i && npm run version:test.

Lerna config and logs

lerna.json

{
	"packages": [
		"extensions/*",
		"packages/*"
	],
	"version": "0.37.3"
}

Environment Info

| Executable        | Version |
| ----------------- | ------- |
| `lerna --version` | 4.0.0 |
| `npm --version`   | 8.5.5 |
| `yarn --version`. | 1.22.4 |
| `pnpm --version`  | 7.0.0 |
| `node --version`  | v16.15.0 |

Used Package Manager

pnpm

Validations

Upgrade from 1.16.0 to 1.16.1 breaks `run` command

Describe the bug

$ lerna run prepare
/usr/bin/env: โ€˜node\rโ€™: No such file or directory
error Command failed with exit code 127.

Expectation

No response

Reproduction

If it turns out that I'm the only one, then I'll take the time to make a minimal repo.

Lerna config and logs

lerna.json

{
  "npmClient": "yarn",
  "packages": ["dictionaries/*"],
  "useWorkspaces": true,
  "version": "independent",
  "command": {
    "publish": {
      "conventionalCommits": true,
      "ignoreChanges": ["*.md", "package-lock.json", "cspell.json"]
    }
  },
  "changelogPreset": {
    "name": "conventionalcommits",
    "issueUrlFormat": "{{host}}/{{owner}}/{{repository}}/issues/{{id}}"
  }
}

lerna-debug.log

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

Environment Info

System:
OS: macOS 13.2.1
CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Memory: 2.39 GB / 32.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 16.18.1 - ~/.nvm/versions/node/v16.18.1/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 8.19.2 - ~/.nvm/versions/node/v16.18.1/bin/npm
Browsers:
Chrome: 110.0.5481.177
Firefox: 106.0.1
Safari: 16.3
npmPackages:
@lerna-lite/cli: ^1.16.0 => 1.16.1
@lerna-lite/exec: ^1.16.0 => 1.16.1
@lerna-lite/run: ^1.16.0 => 1.16.1

Used Package Manager

yarn 1.x (classic)

Validations

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Location: .github/renovate.json5
Error type: The renovate configuration file contains some invalid settings
Message: Invalid configuration option: shedule

Versioning: `premajor` broken and doesn't match `--dry-run`

Describe the bug

Dry Run and Actual results in different versions:

Command:

lerna version --conventional-commits --sync-workspace-lock --yes --conventional-prerelease --dry-run premajor

Version: 6.31.1 => 7.0.0-alpha.0

image

Command:

lerna version --conventional-commits --sync-workspace-lock --yes --conventional-prerelease premajor

Version: 6.31.1 => 6.31.2

image

Expectation

Expect that the version generated without --dry-run matches the dry-run version.

Reproduction

There seems to be two different issues here:

  1. --dry-run and non-dry-run do not match.
  2. premajor and or --conventional-prerelease do not seem to be working.

If needed, I'll make a minimal reproduction, but given the obvious issue here, it is already something to be handled by the Unit Tests.

Lerna config and logs

lerna.json

{
  "npmClient": "pnpm",
  "packages": [
    "./packages/*",
    "./rfc/*",
    "./test-packages/*/*",
    "./integration-tests"
  ],
  "version": "6.31.2",
  "command": {
    "version": {
      "allowBranch": "main",
      "conventionalCommits": true
    }
  }
}

Environment Info

System:
    OS: Linux 5.15 Ubuntu 22.04.2 LTS 22.04.2 LTS (Jammy Jellyfish)
    CPU: (2) x64 Intel(R) Xeon(R) CPU E5-2673 v3 @ 2.40GHz
    Memory: 5.87 GB / 6.78 GB
    Container: Yes
    Shell: 5.1.16 - /bin/bash
  Binaries:
    Node: 16.20.0 - /opt/hostedtoolcache/node/16.20.0/x64/bin/node
    Yarn: 1.22.[19](https://github.com/streetsidesoftware/cspell/actions/runs/4699014859/jobs/8331987269#step:13:20) - /usr/local/bin/yarn
    npm: 8.19.4 - /opt/hostedtoolcache/node/16.[20](https://github.com/streetsidesoftware/cspell/actions/runs/4699014859/jobs/8331987269#step:13:21).0/x64/bin/npm
  Browsers:
    Chrome: 112.0.5615.49
    Chromium: 112.0.5593.0
    Firefox: 112.0
  npmPackages:
    @lerna-lite/cli: ^1.17.0 => 1.17.0

Used Package Manager

pnpm

Validations

removePackageFields fails when removing lifecycle scripts (i.e. `prepack`)

Describe the bug

When using the publish.removePackageFields utility, and using it to remove the scripts field, if a package has prepack or postpack scripts the command crashes.

Expectation

Ideally I would expect Lerna lite to read any prepack/postpack commands, cache them, remove the fields, and then still run them.

If that's not possible (I realize it might be complex, especially if you have a script referencing another), at least I would expect these script to be ignored (possibly with a warning).

Reproduction

  1. Initialize a new package
  2. Add a script.prepack command
  3. Run the publish command with publish.removePackageFields set to remove the scripts field
  4. See error

Lerna config and logs

lerna.json

{
  "$schema": "node_modules/@lerna-lite/cli/schemas/lerna-schema.json",
  "packages": [
    "packages/parameters",
  ],
  "version": "1.9.1",
  "npmClient": "npm",
  "message": "chore(release): %s [skip ci]",
  "command": {
    "version": {
      "conventionalCommits": true,
      "forcePublish": false,
      "commitHooks": false,
      "syncWorkspaceLock": true
    },
    "publish": {
      "removePackageFields": [
        "publishConfig",
        "scripts",
        "lint-staged",
        "devDependencies"
      ]
    }
  }
}

lerna-debug.log

23 verbose mutation Removed "scripts" field from "@aws-lambda-powertools/parameters" package.
....
69 error TypeError: Cannot read properties of undefined (reading 'prepack')
69 error     at runLifecycle (file:///home/ec2-user/prep/node_modules/@lerna-lite/core/dist/utils/run-lifecycle.js:56:50)
69 error     at packDirectory (file:///home/ec2-user/prep/node_modules/@lerna-lite/publish/dist/lib/pack-directory.js:26:11)
69 error     at async file:///home/ec2-user/prep/node_modules/p-pipe/index.js:10:19

Environment Info

System:
OS: Linux 6.1 Amazon Linux 2023
CPU: (2) arm64 Neoverse-N1
Memory: 2.94 GB / 3.73 GB
Container: Yes
Shell: 5.8.1 - /usr/bin/zsh
Binaries:
Node: 18.15.0 - /run/user/1000/fnm_multishells/280239_1686582997446/bin/node
npm: 9.5.0 - /run/user/1000/fnm_multishells/280239_1686582997446/bin/npm
npmPackages:
@lerna-lite/publish: ^2.4.1 => 2.4.1
@lerna-lite/version: ^2.4.1 => 2.4.1

Used Package Manager

npm

Validations

Make the `@lerna-lite/version` and `@lerna-lite/publish` dependencies optional

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 or publish commands. The only commands I am using are the run and exec commands. I would like to effectively "disable" the version and publish 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

  • Follow our Code of Conduct
  • Read the docs.
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

`--changelog-include-commits-client-login` doesn't work with independent mode

Describe the bug

Hello,
I try

GH_TOKEN=ghp_secret lerna version --conventional-commits --changelog-include-commits-client-login --create-release github --git-dry-run

and it generate this

? Are you sure you want to create these versions? Yes
lerna-lite verb independent wrote /home/starptech/repositories/wundergraph/wundergraph/packages/sdk/CHANGELOG.md
lerna-lite verb independent wrote /home/starptech/repositories/wundergraph/wundergraph/packages/nextjs/CHANGELOG.md
lerna-lite info dry-run> git add -- packages/sdk/package.json packages/sdk/CHANGELOG.md packages/nextjs/package.json packages/nextjs/CHANGELOG.md
lerna-lite verb git commit -F /tmp/126f273a-186a-4603-8ca0-0677638e0833/lerna-commit.txt
lerna-lite info dry-run> git commit -F /tmp/126f273a-186a-4603-8ca0-0677638e0833/lerna-commit.txt
lerna-lite verb git tag @wundergraph/[email protected] -m @wundergraph/[email protected]
lerna-lite info dry-run> git tag @wundergraph/[email protected] -m @wundergraph/[email protected]
lerna-lite verb git tag @wundergraph/[email protected] -m @wundergraph/[email protected]
lerna-lite info dry-run> git tag @wundergraph/[email protected] -m @wundergraph/[email protected]
lerna-lite info git Pushing tags...
lerna-lite info dry-run> git push --follow-tags --no-verify --atomic origin main
lerna-lite info execute Creating releases...
lerna-lite verb git config --get remote.origin.url
lerna-lite info dry-run> Create Release with repo options:  {"owner":"wundergraph","repo":"wundergraph","tag_name":"@wundergraph/[email protected]","name":"@wundergraph/[email protected]","body":"## [0.98.0](https://github.com/wundergraph/wundergraph/compare/@wundergraph/[email protected]...@wundergraph/[email protected]) (2022-08-18)\n\n\n### Features\n\n* native webhooks support ([#126](https://github.com/wundergraph/wundergraph/issues/126)) ([a0b38bd](https://github.com/wundergraph/wundergraph/commit/a0b38bd54b88198db6cc176432d577dab0931245))\n\n\n### Bug Fixes\n\n* issue with unhandled hyphens in input names ([#123](https://github.com/wundergraph/wundergraph/issues/123)) ([b01caaa](https://github.com/wundergraph/wundergraph/commit/b01caaa8c4036afbeb579dbbf14a52d82971b116))\n\n","draft":false,"prerelease":false}
lerna-lite info dry-run> Create Release with repo options:  {"owner":"wundergraph","repo":"wundergraph","tag_name":"@wundergraph/[email protected]","name":"@wundergraph/[email protected]","body":"## [0.1.1](https://github.com/wundergraph/wundergraph/compare/@wundergraph/[email protected]...@wundergraph/[email protected]) (2022-08-18)\n\n**Note:** Version bump only for package @wundergraph/nextjs\n\n\n\n","draft":false,"prerelease":false}
lerna-lite success version finished

same as without the flag

## [0.98.0](https://github.com/wundergraph/wundergraph/compare/@wundergraph/[email protected]...@wundergraph/[email protected]) (2022-08-18)

### Features

* native webhooks support ([#126](https://github.com/wundergraph/wundergraph/issues/126)) ([a0b38bd](https://github.com/wundergraph/wundergraph/commit/a0b38bd54b88198db6cc176432d577dab0931245))

### Bug Fixes

* issue with unhandled hyphens in input names ([#123](https://github.com/wundergraph/wundergraph/issues/123)) ([b01caaa](https://github.com/wundergraph/wundergraph/commit/b01caaa8c4036afbeb579dbbf14a52d82971b116))

Expectation

Should add the authors to the changelog as described in https://github.com/ghiscoding/lerna-lite/tree/main/packages/version#--changelog-include-commits-client-login-msg

Reproduction

See above.

Lerna config and logs

lerna.json

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

lerna-debug.log

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

Environment Info

| Executable        | Version |
| ----------------- | ------- |
| `lerna --version` | 1.10.0 |
| `npm --version`   | VERSION |
| `yarn --version`  | VERSION |
| `node --version`  | VERSION |

---
OR simply run `npx lerna info` command and copy+paste the result here

Used Package Manager

pnpm

Validations

'lerna publish' doesn't respect publishConfig

Describe the bug

'lerna publish' doesn't respect publishConfig in package.json.

// package.json
{
  "main": "./src/index.ts",
  "publishConfig": {
    "main": "./dist/index.js"
  }
}

When published to npm via lerna publish,
"main" in package.json should be same with publishConfig.main
(yarn pack does do that, at least)
but it doesn't change when using lerna publish

Expectation

"main" in package.json should be same with publishConfig.main

{
  "main": "./dist/index.js"
}

Reproduction

  1. set "main" field in your package.json publishConfig.
  2. run lerna publish
  3. check the packed tgz and see if "main" in package.json changed

Lerna config and logs

lerna.json

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

lerna-debug.log

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

Environment Info

System:
    OS: macOS 12.1
    CPU: (10) arm64 Apple M1 Max
  Binaries:
    Node: 16.14.0 - /private/var/folders/zr/3tkznhqs6sn26wsynpczk2pxz0g_by/T/xfs-00da4926/node
    Yarn: 3.2.1 - /private/var/folders/zr/3tkznhqs6sn26wsynpczk2pxz0g_by/T/xfs-00da4926/yarn
  Utilities:
    Git: 2.32.1 - /usr/bin/git

Used Package Manager

yarn >= 2.x

Validations

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Ignored or Blocked

These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.

Detected dependencies

github-actions
.github/workflows/main.yml
  • actions/checkout v3
  • pnpm/action-setup v2.2.4
  • actions/setup-node v3
  • actions/cache v3
  • actions/checkout v3
  • pnpm/action-setup v2.2.4
  • actions/setup-node v3
  • actions/cache v3
  • actions/cache v3
  • codecov/codecov-action v3.1.1
.github/workflows/no-response.yml
  • lee-dohm/no-response 9bb0a4b5e6a45046f00353d5de7d90fb8bd773bb
.github/workflows/stale.yml
  • actions/stale v6
npm
package.json
  • @jest/types ^29.3.1
  • @types/jest ^29.2.4
  • @types/node ^18.11.12
  • @types/npmlog ^4.1.4
  • @types/yargs ^17.0.17
  • @typescript-eslint/eslint-plugin ^5.46.0
  • @typescript-eslint/parser ^5.46.0
  • eslint ^8.29.0
  • eslint-config-airbnb-base ^15.0.0
  • eslint-config-prettier ^8.5.0
  • eslint-plugin-import ^2.26.0
  • eslint-plugin-jest ^27.1.6
  • eslint-plugin-node ^11.1.0
  • eslint-plugin-prefer-arrow ^1.2.3
  • fs-extra ^11.1.0
  • jest ^29.3.1
  • jest-cli ^29.3.1
  • jest-extended ^3.2.0
  • npmlog ^7.0.1
  • nx 15.3.0
  • prettier ^2.8.1
  • rimraf ^3.0.2
  • semver ^7.3.8
  • tacks ^1.2.6
  • ts-jest ^29.0.3
  • tsm ^2.3.0
  • typescript ^4.9.4
  • node >=14.17.0
  • npm >=8.0.0
  • pnpm 7
packages/changed/package.json
  • yargs-parser ^21.1.1
  • node >=14.17.0
  • npm >=8.0.0
packages/cli/package.json
  • dedent ^0.7.0
  • dotenv ^16.0.3
  • import-local ^3.1.0
  • npmlog ^7.0.1
  • path ^0.12.7
  • yargs ^17.6.2
  • @types/load-json-file ^5.1.0
  • yargs-parser ^21.1.1
  • node >=14.17.0
  • npm >=8.0.0
packages/core/package.json
  • @npmcli/run-script ^6.0.0
  • @octokit/plugin-enterprise-rest ^6.0.1
  • @octokit/rest ^19.0.5
  • clone-deep ^4.0.1
  • config-chain ^1.1.13
  • conventional-changelog-angular ^5.0.13
  • conventional-changelog-core ^4.2.4
  • conventional-changelog-writer ^5.0.1
  • conventional-commits-parser ^3.2.4
  • conventional-recommended-bump ^6.1.0
  • cosmiconfig ^8.0.0
  • dedent ^0.7.0
  • fs-extra ^11.1.0
  • get-stream ^6.0.1
  • git-url-parse ^13.1.0
  • glob-parent ^6.0.2
  • graceful-fs ^4.2.10
  • is-ci ^3.0.1
  • make-dir ^3.1.0
  • minimatch ^5.1.1
  • npm-package-arg ^10.1.0
  • npmlog ^7.0.1
  • path ^0.12.7
  • resolve-from ^5.0.0
  • semver ^7.3.8
  • strong-log-transformer ^2.1.0
  • uuid ^9.0.0
  • write-file-atomic ^5.0.0
  • @types/clone-deep ^4.0.1
  • @types/conventional-changelog-core ^4.2.1
  • @types/conventional-changelog-writer ^4.0.1
  • @types/conventional-commits-parser ^3.0.2
  • @types/conventional-recommended-bump ^6.1.0
  • @types/dedent ^0.7.0
  • @types/execa ^2.0.0
  • @types/fs-extra ^9.0.13
  • @types/git-url-parse ^9.0.1
  • @types/glob-parent ^5.1.1
  • @types/inquirer ^9.0.3
  • @types/load-json-file ^5.1.0
  • @types/minimatch ^5.1.2
  • @types/npm-package-arg ^6.1.1
  • @types/p-map ^2.0.0
  • @types/semver ^7.3.13
  • @types/strong-log-transformer ^1.0.0
  • @types/write-file-atomic ^4.0.0
  • @types/write-json-file ^3.2.1
  • @types/write-pkg ^4.0.0
  • npm-registry-fetch ^14.0.3
  • yargs ^17.6.2
  • yargs-parser ^21.1.1
  • node >=14.17.0
  • npm >=8.0.0
packages/diff/package.json
  • fs-extra ^11.1.0
  • npmlog ^7.0.1
  • yargs-parser ^21.1.1
  • node >=14.17.0
  • npm >=8.0.0
packages/exec/package.json
  • dotenv ^16.0.3
  • npmlog ^7.0.1
  • @types/p-map ^2.0.0
  • fs-extra ^11.1.0
  • yargs ^17.6.2
  • yargs-parser ^21.1.1
  • node >=14.17.0
  • npm >=8.0.0
packages/info/package.json
  • envinfo ^7.8.1
  • @types/envinfo ^7.8.1
  • path ^0.12.7
  • yargs ^17.6.2
  • node >=14.17.0
  • npm >=8.0.0
packages/init/package.json
  • fs-extra ^11.1.0
  • path ^0.12.7
  • @types/fs-extra ^9.0.13
  • @types/p-map ^2.0.0
  • @types/write-json-file ^3.2.1
  • yargs-parser ^21.1.1
  • node >=14.17.0
  • npm >=8.0.0
packages/list/package.json
  • yargs-parser ^21.1.1
  • node >=14.17.0
  • npm >=8.0.0
packages/listable/package.json
  • columnify ^1.6.0
  • node >=14.17.0
  • npm >=8.0.0
packages/optional-cmd-common/package.json
  • fs-extra ^11.1.0
  • npmlog ^7.0.1
  • upath ^2.0.1
  • @types/node ^18.11.12
  • @types/p-map ^2.0.0
  • path ^0.12.7
  • yargs ^17.6.2
  • node >=14.17.0
  • npm >=8.0.0
packages/publish/package.json
  • @npmcli/arborist ^6.1.5
  • columnify ^1.6.0
  • fs-extra ^11.1.0
  • has-unicode ^2.0.1
  • libnpmaccess ^7.0.1
  • libnpmpublish ^7.0.6
  • npm-package-arg ^10.1.0
  • npm-packlist ^7.0.4
  • npm-registry-fetch ^14.0.3
  • npmlog ^7.0.1
  • pacote ^15.0.7
  • path ^0.12.7
  • read-package-json ^6.0.0
  • semver ^7.3.8
  • ssri ^10.0.1
  • tar ^6.1.13
  • @types/conventional-changelog-core ^4.2.1
  • @types/conventional-recommended-bump ^6.1.0
  • @types/execa ^2.0.0
  • @types/fs-extra ^9.0.13
  • @types/load-json-file ^5.1.0
  • @types/p-map ^2.0.0
  • @types/semver ^7.3.13
  • @types/write-pkg ^4.0.0
  • yargs ^17.6.2
  • yargs-parser ^21.1.1
  • node >=14.17.0
  • npm >=8.0.0
packages/run/package.json
  • fs-extra ^11.1.0
  • npmlog ^7.0.1
  • @types/p-map ^2.0.0
  • jest-circus ^29.3.1
  • perf_hooks ^0.0.1
  • yargs ^17.6.2
  • yargs-parser ^21.1.1
  • node >=14.17.0
  • npm >=8.0.0
packages/version/package.json
  • dedent ^0.7.0
  • minimatch ^5.1.1
  • npmlog ^7.0.1
  • path ^0.12.7
  • semver ^7.3.8
  • @npm/types ^1.0.2
  • @types/conventional-changelog-core ^4.2.1
  • @types/conventional-recommended-bump ^6.1.0
  • @types/execa ^2.0.0
  • @types/fs-extra ^9.0.13
  • @types/js-yaml ^4.0.5
  • @types/load-json-file ^5.1.0
  • @types/minimatch ^5.1.2
  • @types/p-map ^2.0.0
  • @types/semver ^7.3.13
  • @types/write-json-file ^3.2.1
  • @types/write-pkg ^4.0.0
  • fs-extra ^11.1.0
  • js-yaml ^4.1.0
  • yargs ^17.6.2
  • yargs-parser ^21.1.1
  • node >=14.17.0
  • npm >=8.0.0

  • Check this box to trigger a request for Renovate to run again on this repository

Thank you for continuing the work

Lerna lite is a lifesaver and i will be adding it to my current tech stack.

I hope you know how much you are probably helping people out.

I want to add a quick question, Is it possible to run the lerna-lite repo using yarn install instead of npm install

CVE-2022-2900

Describe the bug

Dependency parse-url prior to 8.1.0 suffers from CVE-2022-2900.

Expectation

git-url-parse as dependency of @lerna-lite/core should be upgraded to v13, hence parse-url ^8.1.0.

Reproduction

Lerna config and logs

lerna.json

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

lerna-debug.log

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

Environment Info

Environment info:

  System:
    OS: macOS 12.6
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
  Binaries:
    Node: 14.17.5 - ~/.volta/tools/image/node/14.17.5/bin/node
    Yarn: 1.22.19 - ~/.volta/tools/image/yarn/1.22.19/bin/yarn
    npm: 6.14.14 - ~/.volta/tools/image/node/14.17.5/bin/npm
  Utilities:
    Git: 2.37.0 - /usr/bin/git


### Used Package Manager

pnpm

### Validations

- [X] Follow our [Code of Conduct](https://github.com/ghiscoding/lerna-lite/blob/master/.github/CODE_OF_CONDUCT.md)
- [X] Read the [docs](https://github.com/ghiscoding/lerna-lite#readme).
- [X] Check that there isn't [already an issue](https://github.com/ghiscoding/lerna-lite/issues) that reports the same bug to avoid creating a duplicate.
- [X] Check that this is a concrete bug. For Q&A open a [GitHub Discussion](https://github.com/ghiscoding/lerna-lite/discussions).
- [X] The provided reproduction is a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) of the bug.

Versioning for nested packages

Clear and concise description of the problem

As a developer using Lerna-Lite I would love to have the possibility to work with nested packages in a way that changes to a package B being a subpackage of package A directory-wise do not lead to a version-change of package A on lerna version purely due to git diff but only if package A actaully depends on package B. This example reflects our current development structure but produces many new, but unnecessary, versions.

Suggested solution

Potential fix would be in packages/core/src/utils/collect-updates/lib/make-diff-predicate.ts. Replace the if-condition starting on line 65 with the following code:

if (formattedLocation) {
    // avoid same-directory path.relative() === ""
    const excludeSubpackages = execSync("find", [formattedLocation, "-mindepth", "2", "-type", "f", "-name", "package.json" ])
      .split("\n")
      .filter((file) => !!file)
      .map((file) => `:^${path.dirname(file)}`);

    // avoid same-directory path.relative() === ""
    args.push('--', formattedLocation, ...excludeSubpackages);
  }

Alternative

It would also be possible to exclude subpackages after getting the diff via packages like read-pkg-up but that feels suboptimal due to the overhead for diffing and necessary filesystem operations implied.

Additional context

No response

Validations

  • Follow our Code of Conduct
  • Read the docs.
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

Allow to add a suffix to specific packages when publishing

Clear and concise description of the problem

As a developer I want to be able to add a custom suffix to the version of specific packages in my workspace, even when I'm running the workspace with versions aligned.

Suggested solution

Imagine that I have 3 packages, all are published using the same version (i.e. v1.9.0). I now want to add a fourth package (package-d) that for a period of time will be in beta, to avoid confusing my users I want the versioning of this package to pick up at the same version number of the others, but with a -beta suffix.

When I version the next time (npx lerna version --conventional-commits --force-publish), I would like to have a version scheme like this:

package-a 1.9.0 -> 1.9.1
package-b 1.9.0 -> 1.9.1
package-c 1.9.0 -> 1.9.1
package-d 1.9.0-beta -> 1.9.1-beta

From a config perspective, this could be as simple as providing a new section to the lerna.json under command.version, that looks like this:

{
  "packages": [
    "package-a",
    "package-b",
    "package-c",
    "package-d",
  ],
  "command": {
    "version": {
      "suffix": {
        "package-d": "-beta"
      }
    }
  }
}

Note that the above suggestion is only an example, as long as this type of customization is possible on a per-package basis I wouldn't mind other ways.

Alternative

Currently I'm relying on a prepack custom script (at publish time) that:

  • reads the package.json
  • gets the version
  • adds the suffix
  • updates the package.json

Lerna will reset the changes, so the version is present only in the tarball being published to npm.

This however causes issues when used with the publish.removePackageFields feature, which prevents me to using it in the first place - see #637

Additional context

I have tried different combinations of --conventional-prerelease but with no luck, if I can achieve what I'm describing above with the current feature set, then I'd be more than happy to use the existing API.

Validations

  • Follow our Code of Conduct
  • Read the docs.
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

`publish` doesn't bail when the branch is behind upstream

Describe the bug

When I run yarn lerna publish --conventional-commits -y --no-verify-access in my master branch, and there are commits upstream I get this warning:

lerna WARN EBEHIND Local branch "master" is behind remote upstream origin/master, exiting

but the exit code is still 0. Even when running on CI.


In regular Lerna, this used to return non-0 when run on CI. That feature was introduced in lerna/lerna@5452293. The code to throw the error is in https://github.dev/ghiscoding/lerna-lite/blob/e8d8b68a9e702bfb49db1fce78f6a0539c35988d/packages/version/src/version-command.ts#L196, but afaik there is no way to set this.options.ci

Reproduction

N/A

Lerna config and logs

lerna.json

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

lerna-debug.log

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

Environment Info

$ yarn lerna --version

1.0.5
 Environment info:

  System:
    OS: Linux 5.10 Debian GNU/Linux 11 (bullseye) 11 (bullseye)
    CPU: (6) arm64 unknown
  Binaries:
    Node: 14.19.0 - ~/.nvm/versions/node/v14.19.0/bin/node
    Yarn: 3.2.0 - /usr/local/bin/yarn
    npm: 6.14.16 - ~/.nvm/versions/node/v14.19.0/bin/npm
  Utilities:
    Git: 2.30.2 - /usr/bin/git


### Used Package Manager

yarn >= 2.x

### Validations

- [X] Follow our [Code of Conduct](https://github.com/ghiscoding/lerna-lite/blob/master/.github/CODE_OF_CONDUCT.md)
- [X] Read the [docs](https://github.com/ghiscoding/lerna-lite#readme).
- [X] Check that there isn't [already an issue](https://github.com/ghiscoding/lerna-lite/issues) that reports the same bug to avoid creating a duplicate.
- [X] Check that this is a concrete bug. For Q&A open a [GitHub Discussion](https://github.com/ghiscoding/lerna-lite/discussions).
- [X] The provided reproduction is a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) of the bug.

Usage of snyk for vulnerability analysis.

Clear and concise description of the problem

Just a recommendation. No problem.

Suggested solution

Visit Snyk and sign your project up for vulnerability analysis if you don't already. It's free for public projects. Thanks for the awesome work you're doing!

Alternative

No response

Additional context

No response

Validations

  • Follow our Code of Conduct
  • Read the docs.
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

changelog-header-message-msg has no effect in independent mode

Describe the bug

Hi, according to https://github.com/ghiscoding/lerna-lite/tree/main/packages/version#--changelog-header-message-msg this setting will affect only the changelog file at the root of the repository, but in the independent mode, we don't have one.

Expectation

Add the --changelog-header-message-msg to all changelog files.

Reproduction

See above.

Lerna config and logs

lerna.json

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

lerna-debug.log

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

Environment Info

| Executable        | Version |
| ----------------- | ------- |
| `lerna --version` | 1.11.1 |
| `npm --version`   | VERSION |
| `yarn --version`  | VERSION |
| `node --version`  | VERSION |

---
OR simply run `npx lerna info` command and copy+paste the result here

Used Package Manager

pnpm

Validations

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.