Skip to content

Commit

Permalink
chore: release v3.0.0
Browse files Browse the repository at this point in the history
* Split into plugins
* Interactive version chooser
* Simplified `monorepo` configuration with `lerna`
* BREAKING: Removed native `yarn v2+` workspaces support. Use `lerna` for now.
* BREAKING: Some configuration/CLI options changed.
  • Loading branch information
AlCalzone committed Sep 15, 2021
1 parent 899bdfc commit 3028c98
Show file tree
Hide file tree
Showing 18 changed files with 96 additions and 71 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Placeholder for the next version (at the beginning of the line):
## **WORK IN PROGRESS**
-->
## 3.0.0-alpha.7 (2021-09-15)
## 3.0.0 (2021-09-15)
* Split into plugins
* Interactive version chooser
* Simplified `monorepo` configuration with `lerna`
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,9 @@ npm run release -- -x.commit "echo Hello" -x.after_push "echo 1" "echo 2" "echo
### `lerna` plugin options
_none_
#### Publish all packages (`--publishAll`)
By default, `lerna` only bumps and publishes changed packages. With this flag, all non-private packages are re-published under a new version, even if they had no changes.
### `ioBroker` plugin options
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
],
"useWorkspaces": true,
"npmClient": "yarn",
"version": "3.0.0-alpha.7",
"version": "3.0.0",
"command": {
"run": {
"stream": true
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"publishConfig": {
"access": "public"
},
"version": "3.0.0-alpha.7",
"version": "3.0.0",
"description": "Al Calzone's release script: Core components",
"keywords": [],
"license": "MIT",
Expand Down
6 changes: 3 additions & 3 deletions packages/plugin-changelog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"publishConfig": {
"access": "public"
},
"version": "3.0.0-alpha.7",
"version": "3.0.0",
"description": "Plugin for Al Calzone's release script: changelog",
"keywords": [],
"license": "MIT",
Expand Down Expand Up @@ -37,11 +37,11 @@
"node": ">=12.20"
},
"dependencies": {
"@alcalzone/release-script-core": "3.0.0-alpha.7",
"@alcalzone/release-script-core": "3.0.0",
"alcalzone-shared": "^4.0.0"
},
"devDependencies": {
"@alcalzone/release-script-testing": "3.0.0-alpha.7",
"@alcalzone/release-script-testing": "3.0.0",
"jest-extended": "^0.11.5",
"typescript": "*"
},
Expand Down
6 changes: 3 additions & 3 deletions packages/plugin-exec/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"publishConfig": {
"access": "public"
},
"version": "3.0.0-alpha.7",
"version": "3.0.0",
"description": "Plugin for Al Calzone's release script: execute user scripts",
"keywords": [],
"license": "MIT",
Expand Down Expand Up @@ -37,11 +37,11 @@
"node": ">=12.20"
},
"dependencies": {
"@alcalzone/release-script-core": "3.0.0-alpha.7",
"@alcalzone/release-script-core": "3.0.0",
"alcalzone-shared": "^4.0.0"
},
"devDependencies": {
"@alcalzone/release-script-testing": "3.0.0-alpha.7",
"@alcalzone/release-script-testing": "3.0.0",
"jest-extended": "^0.11.5",
"typescript": "*"
},
Expand Down
6 changes: 3 additions & 3 deletions packages/plugin-git/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"publishConfig": {
"access": "public"
},
"version": "3.0.0-alpha.7",
"version": "3.0.0",
"description": "Plugin for Al Calzone's release script: git",
"keywords": [],
"license": "MIT",
Expand Down Expand Up @@ -37,11 +37,11 @@
"node": ">=12.20"
},
"dependencies": {
"@alcalzone/release-script-core": "3.0.0-alpha.7",
"@alcalzone/release-script-core": "3.0.0",
"fs-extra": "^10.0.0"
},
"devDependencies": {
"@alcalzone/release-script-testing": "3.0.0-alpha.7",
"@alcalzone/release-script-testing": "3.0.0",
"jest-extended": "^0.11.5",
"typescript": "*"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-git/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class GitPlugin implements Plugin {
defaultDescription: "The remote the current branch is tracking",
},
includeUnstaged: {
alias: "all",
alias: ["all", "A"],
type: "boolean",
description: "Whether unstaged changes should be allowed",
default: false,
Expand Down
6 changes: 3 additions & 3 deletions packages/plugin-iobroker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"publishConfig": {
"access": "public"
},
"version": "3.0.0-alpha.7",
"version": "3.0.0",
"description": "Plugin for Al Calzone's release script: ioBroker",
"keywords": [],
"license": "MIT",
Expand Down Expand Up @@ -37,12 +37,12 @@
"node": ">=12.20"
},
"dependencies": {
"@alcalzone/release-script-core": "3.0.0-alpha.7",
"@alcalzone/release-script-core": "3.0.0",
"alcalzone-shared": "^4.0.0",
"axios": "^0.21.4"
},
"devDependencies": {
"@alcalzone/release-script-testing": "3.0.0-alpha.7",
"@alcalzone/release-script-testing": "3.0.0",
"jest-extended": "^0.11.5",
"typescript": "*"
},
Expand Down
6 changes: 3 additions & 3 deletions packages/plugin-lerna/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"publishConfig": {
"access": "public"
},
"version": "3.0.0-alpha.7",
"version": "3.0.0",
"description": "Plugin for Al Calzone's release script: lerna",
"keywords": [],
"license": "MIT",
Expand Down Expand Up @@ -37,10 +37,10 @@
"node": ">=12.20"
},
"dependencies": {
"@alcalzone/release-script-core": "3.0.0-alpha.7"
"@alcalzone/release-script-core": "3.0.0"
},
"devDependencies": {
"@alcalzone/release-script-testing": "3.0.0-alpha.7",
"@alcalzone/release-script-testing": "3.0.0",
"jest-extended": "^0.11.5",
"typescript": "*"
},
Expand Down
23 changes: 23 additions & 0 deletions packages/plugin-lerna/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import type { Context, Plugin, Stage } from "@alcalzone/release-script-core/type
import fs from "fs-extra";
import path from "path";
import semver from "semver";
import type { Argv } from "yargs";

class LernaPlugin implements Plugin {
public readonly id = "lerna";
Expand All @@ -15,6 +16,27 @@ class LernaPlugin implements Plugin {
commit: ["git"],
};

public defineCLIOptions(yargs: Argv<any>): Argv<any> {
return yargs.options({
publishAll: {
type: "boolean",
description: `Bump and publish all non-private packages, even if they didn't change`,
default: false,
},
noWorkflowCheck: {
description: "Disable checking the test-and-release.yml workflow",
type: "boolean",
default: false,
},
numNews: {
alias: ["nn"],
type: "number",
description: `How many news entries should be kept in io-package.json`,
default: 7,
},
});
}

private async executeCheckStage(context: Context): Promise<void> {
// ensure that lerna.json exists and has a version (unless in lerna mode)
const jsonPath = path.join(context.cwd, "lerna.json");
Expand Down Expand Up @@ -56,6 +78,7 @@ class LernaPlugin implements Plugin {
context.getData<string>("version_new"),
"--no-push",
"--no-git-tag-version",
...(context.argv.publishAll ? ["--force-publish"] : []),
"--yes",
],
["git", "stash", "pop"],
Expand Down
6 changes: 3 additions & 3 deletions packages/plugin-package/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"publishConfig": {
"access": "public"
},
"version": "3.0.0-alpha.7",
"version": "3.0.0",
"description": "Plugin for Al Calzone's release script: npm package files",
"keywords": [],
"license": "MIT",
Expand Down Expand Up @@ -38,12 +38,12 @@
},
"dependencies": {
"@alcalzone/pak": "^0.7.0",
"@alcalzone/release-script-core": "3.0.0-alpha.7",
"@alcalzone/release-script-core": "3.0.0",
"alcalzone-shared": "^4.0.0",
"semver": "^7.3.5"
},
"devDependencies": {
"@alcalzone/release-script-testing": "3.0.0-alpha.7",
"@alcalzone/release-script-testing": "3.0.0",
"jest-extended": "^0.11.5",
"typescript": "*"
},
Expand Down
6 changes: 3 additions & 3 deletions packages/plugin-template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"publishConfig": {
"access": "public"
},
"version": "3.0.0-alpha.7",
"version": "3.0.0",
"description": "Plugin for Al Calzone's release script: template",
"keywords": [],
"license": "MIT",
Expand Down Expand Up @@ -38,10 +38,10 @@
"node": ">=12.20"
},
"dependencies": {
"@alcalzone/release-script-core": "3.0.0-alpha.7"
"@alcalzone/release-script-core": "3.0.0"
},
"devDependencies": {
"@alcalzone/release-script-testing": "3.0.0-alpha.7",
"@alcalzone/release-script-testing": "3.0.0",
"jest-extended": "^0.11.5",
"typescript": "*"
},
Expand Down
6 changes: 3 additions & 3 deletions packages/plugin-version/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"publishConfig": {
"access": "public"
},
"version": "3.0.0-alpha.7",
"version": "3.0.0",
"description": "Plugin for Al Calzone's release script: Versioning",
"keywords": [],
"license": "MIT",
Expand Down Expand Up @@ -37,11 +37,11 @@
"node": ">=12.20"
},
"dependencies": {
"@alcalzone/release-script-core": "3.0.0-alpha.7",
"@alcalzone/release-script-core": "3.0.0",
"semver": "^7.3.5"
},
"devDependencies": {
"@alcalzone/release-script-testing": "3.0.0-alpha.7",
"@alcalzone/release-script-testing": "3.0.0",
"jest-extended": "^0.11.5",
"typescript": "*"
},
Expand Down
16 changes: 8 additions & 8 deletions packages/release-script/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"publishConfig": {
"access": "public"
},
"version": "3.0.0-alpha.7",
"version": "3.0.0",
"description": "Release script to automatically increment version numbers and push git tags of Node.js projects",
"keywords": [],
"license": "MIT",
Expand Down Expand Up @@ -39,12 +39,12 @@
"node": ">=12.20"
},
"dependencies": {
"@alcalzone/release-script-core": "3.0.0-alpha.7",
"@alcalzone/release-script-plugin-changelog": "3.0.0-alpha.7",
"@alcalzone/release-script-plugin-exec": "3.0.0-alpha.7",
"@alcalzone/release-script-plugin-git": "3.0.0-alpha.7",
"@alcalzone/release-script-plugin-package": "3.0.0-alpha.7",
"@alcalzone/release-script-plugin-version": "3.0.0-alpha.7",
"@alcalzone/release-script-core": "3.0.0",
"@alcalzone/release-script-plugin-changelog": "3.0.0",
"@alcalzone/release-script-plugin-exec": "3.0.0",
"@alcalzone/release-script-plugin-git": "3.0.0",
"@alcalzone/release-script-plugin-package": "3.0.0",
"@alcalzone/release-script-plugin-version": "3.0.0",
"alcalzone-shared": "^4.0.0",
"axios": "^0.21.4",
"colors": "^1.4.0",
Expand All @@ -55,7 +55,7 @@
"yargs": "^17.1.1"
},
"devDependencies": {
"@alcalzone/release-script-testing": "3.0.0-alpha.7",
"@alcalzone/release-script-testing": "3.0.0",
"@types/yargs": "^17.0.2",
"typescript": "*"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/release-script/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ export async function main(): Promise<void> {
required: false,
})
.positional("preid", {
describe: "The prerelease identifier. Only for pre... bumps.",
describe: "The prerelease identifier. Only for pre* bumps.",
required: false,
default: "alpha",
}),
Expand Down
4 changes: 2 additions & 2 deletions packages/testing/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@alcalzone/release-script-testing",
"private": true,
"version": "3.0.0-alpha.7",
"version": "3.0.0",
"description": "Al Calzone's release script: testing tools",
"keywords": [],
"license": "MIT",
Expand Down Expand Up @@ -35,7 +35,7 @@
"node": ">=12.20"
},
"devDependencies": {
"@alcalzone/release-script-core": "3.0.0-alpha.7",
"@alcalzone/release-script-core": "3.0.0",
"colors": "^1.4.0",
"execa": "*",
"typescript": "*"
Expand Down
Loading

0 comments on commit 3028c98

Please sign in to comment.