cross-release-cli 0.1.0-alpha.4 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -5,20 +5,10 @@
5
5
  1. install through package manager
6
6
 
7
7
  ```shell
8
- # pnpm
9
- pnpm i cross-release -g
8
+ pnpm i -D cross-release
10
9
  ```
11
10
 
12
- otherwise you can use you favorite package manager instead
13
-
14
- ```shell
15
- # npm
16
- npm i cross-release -g
17
- # yarn
18
- yarn add cross-release --global
19
- ```
20
-
21
- 2. add to your package.json
11
+ 2. add a release script in your package.json
22
12
 
23
13
  ```json
24
14
  {
@@ -36,51 +26,83 @@ pnpm run release
36
26
 
37
27
  ## Command line
38
28
 
39
- | short | long | description | default |
40
- | ----- | --------------- | --------------------------------------------------- | -------------------------- |
41
- | -m | --main | Main project language e.g. java / javascript / rust | `false` |
42
- | -r | --recursive | Run the command for each project in the workspace | `false` |
43
- | -d | --dry | Dry run | `false` |
44
- | -D | --dir [dir] | Set working directory | `project root` |
45
- | -c | --commit | Commit current changes | `false` |
46
- | -p | --push | Push the project to remote | `false` |
47
- | -t | --tag | Create a tag for current version | `false` |
48
- | -e | --exclude [dir] | Folders to exclude from search | `["node_modules", ".git"]` |
49
- | -y | --yes | Answer yes to all prompts | `false` |
29
+ | short | long | description | default |
30
+ | ----- | ---------------------- | --------------------------------------------------- | ----------------------------------------------- |
31
+ | -V | --version | output the version number | false |
32
+ | -a | --all | Add all changed files to staged | false |
33
+ | -c | --config [file] | Config file | auto detect |
34
+ | -D | --dry | Dry run | false |
35
+ | -d | --debug | Enable debug mode | false |
36
+ | -e | --exclude [dir] | Folders to exclude from search | ["node_modules",".git","target","build","dist"] |
37
+ | -m | --main | Base project language [e.g. java, rust, javascript] | "javascript" |
38
+ | -r | --recursive | Run the command for each project in the workspace | false |
39
+ | -x | --execute [command...] | Execute the command | [] |
40
+ | -y | --yes | Answer yes to all prompts | false |
41
+ | | --cwd [dir] | Set working directory | process.cwd() |
42
+ | -c | --no-commit | Skip committing changes | false |
43
+ | -p | --no-push | Skip pushing | false |
44
+ | -t | --no-tag | Skip tagging | false |
45
+ | -h | --help | Display this message | false |
50
46
 
51
47
  ## Configuration
52
48
 
53
- You can specify various runtime settings by using the "package.json" file. Here are some examples that cover all the parameters:
49
+ supportted file name:
54
50
 
55
- ```json
56
- {
57
- "...": "...",
51
+ - `cross-release.config.js`
52
+ - `cross-release.config.cjs`
53
+ - `cross-release.config.mjs`
54
+ - `cross-release.config.ts`
55
+ - `cross-release.config.cts`
56
+ - `cross-release.config.mts`
57
+ - `cross-release.config.json`
58
+ - `package.json`
59
+
60
+ Here are some examples that cover all the parameters:
61
+
62
+ ```ts
63
+ export default {
64
+ // ...
58
65
  "cross-release": {
59
- // show the help message
60
- "showHelp": false,
61
- // show the version about cross-release
62
- "showVersion": false,
63
- "version": "",
64
- "isAllYes": false,
65
- "isDry": false,
66
- "isRecursive": false,
67
- "shouldCommit": false,
68
- "shouldPush": false,
69
- "shouldTag": false,
70
- // default exclude folders are `["node_modules", ".git"]`, your config will be append within it
71
- "excludes": ["path/to/exclude"],
72
- "dir": "/path/to/run",
73
- "commit": {
74
- // Whether to invoke git pre-commit and commit-msg hook
75
- "shouldVerify": true,
66
+ // "commit": false,
67
+ commit: {
76
68
  // Whether to stage all un-staged files or stage only changed files
77
- "shouldStageAll": false,
69
+ stageAll: false,
78
70
  // the symbol '%s' will be replace to the version number that you specified
79
- "template": "chore: release v%s"
71
+ template: "chore: release v%s",
72
+ // Whether to invoke git pre-commit and commit-msg hook
73
+ verify: true,
74
+ },
75
+ cwd: "/path/to/run",
76
+ dry: false,
77
+ // Your config will be append within default exclude folders
78
+ excludes: ["path/to/exclude"],
79
+ // "push": false,
80
+ push: {
81
+ branch: false,
82
+ followTags: false,
83
+ },
84
+ recursive: false,
85
+ // tag: false,
86
+ tag: {
87
+ template: "v%s",
88
+ },
89
+ version: "",
90
+ yes: false,
91
+ },
92
+ }
93
+ ```
94
+
95
+ example for config in `package.json`
96
+
97
+ ```jsonc
98
+ {
99
+ // ...
100
+ "cross-release": {
101
+ "yes": true,
102
+ "commit": true,
103
+ "tag": {
104
+ "template": "v%s",
80
105
  },
81
- "push": {
82
- "shouldFollowTags": false
83
- }
84
106
  }
85
107
  }
86
108
  ```
@@ -3,5 +3,5 @@
3
3
  "use strict"
4
4
 
5
5
  const App = await import("../dist/app.js")
6
- const app = await App.default.create()
6
+ const app = new App.default()
7
7
  void app.run()
package/dist/app.d.ts CHANGED
@@ -1,29 +1,30 @@
1
- import { ProjectFile } from 'cross-bump';
2
- import { ReleaseOptions } from './types.js';
1
+ import { ReleaseOptions } from "./types.d-PDBL5zNm.js";
2
+ import { ProjectFile } from "cross-bump";
3
3
 
4
+ //#region src/app.d.ts
4
5
  declare class App {
5
- #private;
6
- private _currentVersion;
7
- private _modifiedFiles;
8
- private _nextVersion;
9
- private _options;
10
- private _projectFiles;
11
- private _taskQueue;
12
- private _taskStatus;
13
- private constructor();
14
- static create(argv?: string[]): Promise<App>;
15
- checkGitClean(): void;
16
- confirmReleaseOptions(): Promise<void>;
17
- executeTasks(): Promise<void>;
18
- resolveExecutes(): void;
19
- resolveNextVersion(): Promise<void>;
20
- resolveProjectFiles(): void;
21
- resolveProjects(): void;
22
- run(): Promise<void>;
23
- get currentVersion(): string;
24
- get nextVersion(): string;
25
- get options(): ReleaseOptions;
26
- get projectFiles(): ProjectFile[];
6
+ #private;
7
+ private _currentVersion;
8
+ private _modifiedFiles;
9
+ private _nextVersion;
10
+ private _options;
11
+ private _projectFiles;
12
+ private _taskQueue;
13
+ private _taskStatus;
14
+ constructor(argv?: string[]);
15
+ checkGitClean(): void;
16
+ confirmReleaseOptions(): Promise<void>;
17
+ executeTasks(): Promise<void>;
18
+ resolveExecutes(): void;
19
+ resolveNextVersion(): Promise<void>;
20
+ resolveProjectFiles(): void;
21
+ resolveProjects(): void;
22
+ run(): Promise<void>;
23
+ get currentVersion(): string;
24
+ get nextVersion(): string;
25
+ get options(): ReleaseOptions;
26
+ get projectFiles(): ProjectFile[];
27
27
  }
28
28
 
29
- export { App as default };
29
+ //#endregion
30
+ export { App as default };