Repository: lerna-lite/lerna-lite (ts)

Issue:
`--create-release=false` to override `lerna.json`
### Clear and concise description of the problem

When using lerna, we generally want to generate changelogs and `package.json` and github releases, but in some scenarios we'd like to use `version --no-changelogs --dry-run` to only bump `package.json`. We pass `--no-changelog` but there seemingly is no way to `--no-release`

### Suggested solution

`--create-release=false` to override `createRelease` in `lerna.json`

### Alternative

`--no-release`

### Additional context

_No response_

### Validations

- [x] Follow our [Code of Conduct](https://github.com/lerna-lite/lerna-lite/blob/main/CODE_OF_CONDUCT.md)
- [x] Read the [docs](https://github.com/lerna-lite/lerna-lite#readme).
- [x] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

Pull request:
fix: dry-run, don't throw no changelog w/o release, fixes #988
<!--- Provide a general summary of your changes in the Title above -->

## Description

Skip certain conditions in dry-run mode

## Motivation and Context

fixes #988 
No need to throw in dry-run mode when user has a release without changelog enabled

## How Has This Been Tested?

<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran to -->
<!--- see how your change affects other areas of the code, etc. -->

## Types of changes

<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->

- [ ] Chore (change that has absolutely no effect on users)
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)

## Checklist:

<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->

- [x] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [ ] I have added tests to cover my changes.
- [x] All new and existing tests passed.


Patch:
diff --git a/packages/version/src/version-command.ts b/packages/version/src/version-command.ts
index c90aeb00..56e1d57c 100644
--- a/packages/version/src/version-command.ts
+++ b/packages/version/src/version-command.ts
@@ -160,10 +160,6 @@ export class VersionCommand extends Command<VersionCommandOption> {
       );
     }
 
-    if (this.releaseClient && this.options.changelog === false && this.options.generateReleaseNotes !== true) {
-      throw new ValidationError('ERELEASE', 'To create a release, you cannot pass --no-changelog');
-    }
-
     if (
       this.options.conventionalCommits &&
       typeof this.options.changelogPreset === 'object' &&
@@ -191,6 +187,14 @@ export class VersionCommand extends Command<VersionCommandOption> {
   }
 
   async initialize() {
+    if (this.releaseClient && this.options.changelog === false && this.options.generateReleaseNotes !== true) {
+      const msg = 'To create a release, you cannot pass --no-changelog';
+      if (!this.options.dryRun) {
+        throw new ValidationError('ERELEASE', msg);
+      }
+      this.logger.warn('ERELEASE', msg);
+    }
+
     const isIndependent = this.project.isIndependent();
     const describeTag = this.options.describeTag;
 


Test patch:
diff --git a/packages/version/src/__tests__/version-create-release.spec.ts b/packages/version/src/__tests__/version-create-release.spec.ts
index 711f4cb8..895b538f 100644
--- a/packages/version/src/__tests__/version-create-release.spec.ts
+++ b/packages/version/src/__tests__/version-create-release.spec.ts
@@ -135,6 +135,17 @@ describe.each([
     expect(client.releases.size).toBe(0);
   });
 
+  it('shows a console warning if --no-changelog also passed with --dry-run mode', async () => {
+    const logSpy = vi.spyOn(log, 'warn');
+    const cwd = await initFixture('independent');
+
+    (recommendVersion as Mock).mockResolvedValueOnce('1.1.0');
+
+    await new VersionCommand(createArgv(cwd, '--create-release', type, '--conventional-commits', '--no-changelog', '--dry-run'));
+
+    expect(logSpy).toHaveBeenCalledWith('ERELEASE', 'To create a release, you cannot pass --no-changelog');
+  });
+
   it('throws an error if environment variables are not present', async () => {
     const cwd = await initFixture('normal');
     const command = lernaVersion(cwd)('--create-release', type, '--conventional-commits');