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 +71 -49
- package/bin/cross-release.js +1 -1
- package/dist/app.d.ts +26 -25
- package/dist/app.js +628 -570
- package/dist/index.d.ts +4 -3
- package/dist/index.js +5 -5
- package/dist/types.d-PDBL5zNm.d.ts +114 -0
- package/package.json +17 -12
- package/dist/types.d.ts +0 -127
package/README.md
CHANGED
|
@@ -5,20 +5,10 @@
|
|
|
5
5
|
1. install through package manager
|
|
6
6
|
|
|
7
7
|
```shell
|
|
8
|
-
|
|
9
|
-
pnpm i cross-release -g
|
|
8
|
+
pnpm i -D cross-release
|
|
10
9
|
```
|
|
11
10
|
|
|
12
|
-
|
|
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
|
|
40
|
-
| ----- |
|
|
41
|
-
| -
|
|
42
|
-
| -
|
|
43
|
-
| -
|
|
44
|
-
| -D | --
|
|
45
|
-
| -
|
|
46
|
-
| -
|
|
47
|
-
| -
|
|
48
|
-
| -
|
|
49
|
-
| -
|
|
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
|
-
|
|
49
|
+
supportted file name:
|
|
54
50
|
|
|
55
|
-
|
|
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
|
-
|
|
60
|
-
|
|
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
|
-
|
|
69
|
+
stageAll: false,
|
|
78
70
|
// the symbol '%s' will be replace to the version number that you specified
|
|
79
|
-
|
|
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
|
```
|
package/bin/cross-release.js
CHANGED
package/dist/app.d.ts
CHANGED
|
@@ -1,29 +1,30 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
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
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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
|
-
|
|
29
|
+
//#endregion
|
|
30
|
+
export { App as default };
|