From 65e5910222a2256a28dfae8b862f822804919431 Mon Sep 17 00:00:00 2001 From: Edouard Bozon Date: Thu, 17 Feb 2022 21:58:17 +0100 Subject: [PATCH] =?UTF-8?q?fix(semver):=20=F0=9F=90=9E=20deprecate=20`--sy?= =?UTF-8?q?ncVersions`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 34 +++++++++---------- .../semver/src/executors/version/schema.d.ts | 13 ++++++- .../semver/src/executors/version/schema.json | 2 +- .../semver/src/generators/install/schema.json | 5 ++- 4 files changed, 32 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 8b45a6c5d..eec135e38 100644 --- a/README.md +++ b/README.md @@ -75,23 +75,23 @@ nx run workspace:version [....options] #### Available options -| name | type | default | description | -| ---------------------------- | --------------- | ----------- | ------------------------------------------------ | -| **`--dryRun`** | `boolean` | `false` | run with dry mode | -| **`--noVerify`** | `boolean` | `false` | skip git hooks | -| **`--push`** | `boolean` | `false` | push the release against git origin | -| **`--syncVersions`** | `boolean` | `false` | lock/sync versions between projects | -| **`--skipRootChangelog`** | `boolean` | `false` | skip generating root changelog | -| **`--skipProjectChangelog`** | `boolean` | `false` | skip generating project changelog | -| **`--origin`** | `string` | `'origin'` | push against git remote repository | -| **`--baseBranch`** | `string` | `'main'` | push against git base branch | -| **`--changelogHeader`** | `string` | `undefined` | custom Markdown header for changelogs | -| **`--releaseAs`** | `string` | `undefined` | specify the level of change | -| **`--preid`** | `string` | `undefined` | prerelease identifier | -| **`--tagPrefix`** | `string | null` | `undefined` | specify the tag prefix | -| **`--postTargets`** | `string[]` | `[]` | specify a list of target to execute post-release | -| **`--trackDeps`** | `boolean` | `false` | use dependencies when calculating a version bump | -| **`--commitMessageFormat`** | `string` | `undefined` | format the auto-generated message commit | +| name | type | default | description | +| ---------------------------- | ---------- | ----------- | ------------------------------------------------ | +| **`--dryRun`** | `boolean` | `false` | run with dry mode | +| **`--noVerify`** | `boolean` | `false` | skip git hooks | +| **`--push`** | `boolean` | `false` | push the release against git origin | +| **`--syncVersions`** | `boolean` | `false` | lock/sync versions between projects | +| **`--skipRootChangelog`** | `boolean` | `false` | skip generating root changelog | +| **`--skipProjectChangelog`** | `boolean` | `false` | skip generating project changelog | +| **`--origin`** | `string` | `'origin'` | push against git remote repository | +| **`--baseBranch`** | `string` | `'main'` | push against git base branch | +| **`--changelogHeader`** | `string` | `undefined` | custom Markdown header for changelogs | +| **`--releaseAs`** | `string` | `undefined` | specify the level of change | +| **`--preid`** | `string` | `undefined` | prerelease identifier | +| **`--tagPrefix`** | `string` | `undefined` | specify the tag prefix | +| **`--postTargets`** | `string[]` | `[]` | specify a list of target to execute post-release | +| **`--trackDeps`** | `boolean` | `false` | use dependencies when calculating a version bump | +| **`--commitMessageFormat`** | `string` | `undefined` | format the auto-generated message commit | #### Configuration using the file diff --git a/packages/semver/src/executors/version/schema.d.ts b/packages/semver/src/executors/version/schema.d.ts index 9792a5c0f..0a8a96ac7 100644 --- a/packages/semver/src/executors/version/schema.d.ts +++ b/packages/semver/src/executors/version/schema.d.ts @@ -1,4 +1,11 @@ -export type ReleaseIdentifier = 'patch' | 'minor' | 'major' | 'premajor' | 'preminor' | 'prepatch' | 'prerelease'; +export type ReleaseIdentifier = + | 'patch' + | 'minor' + | 'major' + | 'premajor' + | 'preminor' + | 'prepatch' + | 'prerelease'; export interface VersionBuilderSchema { dryRun?: boolean; @@ -10,6 +17,10 @@ export interface VersionBuilderSchema { push?: boolean; remote?: string; baseBranch?: string; + /** + * @deprecated + * @sunset 3.0.0 + */ syncVersions?: boolean; skipRootChangelog?: boolean; skipProjectChangelog?: boolean; diff --git a/packages/semver/src/executors/version/schema.json b/packages/semver/src/executors/version/schema.json index 00f57747f..d25c49441 100644 --- a/packages/semver/src/executors/version/schema.json +++ b/packages/semver/src/executors/version/schema.json @@ -36,7 +36,7 @@ "default": "main" }, "syncVersions": { - "description": "Sync all package versions.", + "description": "(Deprecated) Sync all package versions.", "type": "boolean", "default": false }, diff --git a/packages/semver/src/generators/install/schema.json b/packages/semver/src/generators/install/schema.json index cfc78eda4..11f75430f 100644 --- a/packages/semver/src/generators/install/schema.json +++ b/packages/semver/src/generators/install/schema.json @@ -6,10 +6,9 @@ "cli": "nx", "properties": { "syncVersions": { - "description": "Lock/sync versions between packages", + "description": "(Deprecated) Lock/sync versions between packages", "type": "boolean", - "default": false, - "x-prompt": "Lock/sync versions between packages?" + "default": false }, "projects": { "description": "Which projects should be versioned independently",