release-it 15.0.0-esm.5 → 15.1.0-next.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 +33 -26
- package/lib/index.js +16 -14
- package/package.json +2 -2
- package/test/plugins.js +1 -1
- package/test/tasks.interactive.js +4 -0
package/README.md
CHANGED
|
@@ -20,6 +20,11 @@ system, and hooks to execute any command you need to test, build, and/or publish
|
|
|
20
20
|
[](https://github.com/release-it/release-it/actions)
|
|
21
21
|
[](https://www.npmjs.com/package/release-it)
|
|
22
22
|
|
|
23
|
+
## Announcement
|
|
24
|
+
|
|
25
|
+
The latest major version is v15, supporting Node.js 14 and up (as Node.js v12 is EOL). Use release-it v14 for
|
|
26
|
+
environments running Node.js v10 and v12. Also see [CHANGELOG.md](./CHANGELOG.md).
|
|
27
|
+
|
|
23
28
|
## Links
|
|
24
29
|
|
|
25
30
|
- See [CHANGELOG.md](./CHANGELOG.md) for major/breaking updates, and
|
|
@@ -30,9 +35,8 @@ system, and hooks to execute any command you need to test, build, and/or publish
|
|
|
30
35
|
|
|
31
36
|
## Installation
|
|
32
37
|
|
|
33
|
-
Although release-it is a **generic** release tool,
|
|
34
|
-
|
|
35
|
-
and it's ready:
|
|
38
|
+
Although release-it is a **generic** release tool, most projects use it for projects with npm packages. The recommended
|
|
39
|
+
way to install release-it uses npm and adds some minimal configuration to get started:
|
|
36
40
|
|
|
37
41
|
```bash
|
|
38
42
|
npm init release-it
|
|
@@ -41,7 +45,7 @@ npm init release-it
|
|
|
41
45
|
Alternatively, install it manually, and add the `release` script to `package.json`:
|
|
42
46
|
|
|
43
47
|
```bash
|
|
44
|
-
npm install
|
|
48
|
+
npm install -D release-it
|
|
45
49
|
```
|
|
46
50
|
|
|
47
51
|
```json
|
|
@@ -57,24 +61,33 @@ npm install --save-dev release-it
|
|
|
57
61
|
}
|
|
58
62
|
```
|
|
59
63
|
|
|
60
|
-
Now you can run `npm run release` from the command line (
|
|
64
|
+
Now you can run `npm run release` from the command line (put release-it arguments behind the `-- `):
|
|
61
65
|
|
|
62
66
|
```bash
|
|
63
67
|
npm run release
|
|
64
68
|
npm run release -- minor --ci
|
|
65
69
|
```
|
|
66
70
|
|
|
67
|
-
### Global
|
|
71
|
+
### Global Installation
|
|
72
|
+
|
|
73
|
+
#### Using npx or npm
|
|
68
74
|
|
|
69
|
-
Use
|
|
75
|
+
Use npx to run release-it directly from anywhere:
|
|
70
76
|
|
|
71
77
|
```bash
|
|
72
|
-
# Run release-it from anywhere (without installation)
|
|
73
78
|
npx release-it
|
|
79
|
+
```
|
|
74
80
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
81
|
+
Or use npm to install and run release-it globally:
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
npm install -g release-it
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
#### Using Homebrew
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
brew install release-it
|
|
78
91
|
```
|
|
79
92
|
|
|
80
93
|
## Usage
|
|
@@ -85,7 +98,7 @@ Release a new version:
|
|
|
85
98
|
release-it
|
|
86
99
|
```
|
|
87
100
|
|
|
88
|
-
You will be prompted to select the new version, and more prompts will follow based on your
|
|
101
|
+
You will be prompted to select the new version, and more prompts will follow based on your configuration.
|
|
89
102
|
|
|
90
103
|
Run release-it from the root of the project to prevent potential issues.
|
|
91
104
|
|
|
@@ -156,7 +169,8 @@ remote.
|
|
|
156
169
|
## GitHub Releases
|
|
157
170
|
|
|
158
171
|
GitHub projects can have releases attached to Git tags, containing release notes and assets. There are two ways to add
|
|
159
|
-
[GitHub releases](https://
|
|
172
|
+
[GitHub releases](https://docs.github.com/en/repositories/releasing-projects-on-github/about-releases) in your
|
|
173
|
+
release-it flow:
|
|
160
174
|
|
|
161
175
|
1. Automated (requires a `GITHUB_TOKEN`)
|
|
162
176
|
2. Manual (using the GitHub web interface with pre-populated fields)
|
|
@@ -326,29 +340,22 @@ While mostly used as a CLI tool, release-it can be used as a dependency to integ
|
|
|
326
340
|
- [antonmedv/fx](https://github.com/antonmedv/fx)
|
|
327
341
|
- [blockchain/blockchain-wallet-v4-frontend](https://github.com/blockchain/blockchain-wallet-v4-frontend)
|
|
328
342
|
- [callstack/linaria](https://github.com/callstack/linaria)
|
|
343
|
+
- [callstack/react-native-paper](https://github.com/callstack/react-native-paper)
|
|
329
344
|
- [ember-cli/ember-cli](https://github.com/ember-cli/ember-cli)
|
|
330
|
-
- [metalsmith/metalsmith](https://github.com/metalsmith/metalsmith)
|
|
331
|
-
- [react-native-paper](https://github.com/callstack/react-native-paper)
|
|
332
345
|
- [js-cookie/js-cookie](https://github.com/js-cookie/js-cookie)
|
|
333
|
-
- [
|
|
346
|
+
- [metalsmith/metalsmith](https://github.com/metalsmith/metalsmith)
|
|
334
347
|
- [mozilla/readability](https://github.com/mozilla/readability)
|
|
335
348
|
- [redis/node-redis](https://github.com/redis/node-redis)
|
|
349
|
+
- [saleor/saleor](https://github.com/saleor/saleor)
|
|
336
350
|
- [shipshapecode/shepherd](https://github.com/shipshapecode/shepherd)
|
|
351
|
+
- [StevenBlack/hosts](https://github.com/StevenBlack/hosts)
|
|
337
352
|
- [swagger-api/swagger-ui](https://github.com/swagger-api/swagger-ui) +
|
|
338
353
|
[swagger-editor](https://github.com/swagger-api/swagger-editor)
|
|
339
|
-
- [StevenBlack/hosts](https://github.com/StevenBlack/hosts)
|
|
340
354
|
- [tabler/tabler](https://github.com/tabler/tabler) + [tabler-icons](https://github.com/tabler/tabler-icons)
|
|
341
355
|
- [youzan/vant](https://github.com/youzan/vant)
|
|
342
356
|
- [Repositories that depend on release-it](https://github.com/release-it/release-it/network/dependents)
|
|
343
357
|
- GitHub search for [filename:.release-it.json](https://github.com/search?q=filename%3A.release-it.json)
|
|
344
358
|
|
|
345
|
-
##
|
|
359
|
+
## License
|
|
346
360
|
|
|
347
|
-
|
|
348
|
-
- [GitHub Help](https://docs.github.com) (→
|
|
349
|
-
[About Releases](https://docs.github.com/free-pro-team@latest/github/administering-a-repository/about-releases))
|
|
350
|
-
- [npm Blog: Publishing what you mean to publish](https://blog.npmjs.org/post/165769683050/publishing-what-you-mean-to-publish)
|
|
351
|
-
- [npm Documentation: package.json](https://docs.npmjs.com/cli/v6/configuring-npm/package-json)
|
|
352
|
-
- [Prereleases and npm](https://medium.com/@mbostock/prereleases-and-npm-e778fc5e2420)
|
|
353
|
-
- [Glob Primer (node-glob)](https://github.com/isaacs/node-glob#glob-primer) (release-it uses
|
|
354
|
-
[globby](https://github.com/sindresorhus/globby#readme))
|
|
361
|
+
[MIT](./LICENSE)
|
package/lib/index.js
CHANGED
|
@@ -93,24 +93,26 @@ const runTasks = async (opts, di) => {
|
|
|
93
93
|
process.exit(0);
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
-
|
|
96
|
+
if (version) {
|
|
97
|
+
config.setContext(parseVersion(version));
|
|
97
98
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
99
|
+
if (config.isPromptOnlyVersion) {
|
|
100
|
+
config.setCI(true);
|
|
101
|
+
}
|
|
101
102
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
103
|
+
for (const hook of ['beforeBump', 'bump', 'beforeRelease']) {
|
|
104
|
+
for (const plugin of plugins) {
|
|
105
|
+
const args = hook === 'bump' ? [version] : [];
|
|
106
|
+
await runLifeCycleHook(plugin, hook, ...args);
|
|
107
|
+
}
|
|
106
108
|
}
|
|
107
|
-
}
|
|
108
109
|
|
|
109
|
-
|
|
110
|
+
plugins = [...internal, ...external];
|
|
110
111
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
112
|
+
for (const hook of ['release', 'afterRelease']) {
|
|
113
|
+
for (const plugin of plugins) {
|
|
114
|
+
await runLifeCycleHook(plugin, hook);
|
|
115
|
+
}
|
|
114
116
|
}
|
|
115
117
|
}
|
|
116
118
|
|
|
@@ -131,4 +133,4 @@ const runTasks = async (opts, di) => {
|
|
|
131
133
|
|
|
132
134
|
export default runTasks;
|
|
133
135
|
|
|
134
|
-
export { Plugin };
|
|
136
|
+
export { Plugin, Config };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "release-it",
|
|
3
|
-
"version": "15.
|
|
3
|
+
"version": "15.1.0-next.0",
|
|
4
4
|
"description": "Generic CLI tool to automate versioning and package publishing related tasks.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"build",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"git-url-parse": "11.6.0",
|
|
69
69
|
"globby": "13.1.1",
|
|
70
70
|
"got": "12.0.4",
|
|
71
|
-
"inquirer": "8.2.
|
|
71
|
+
"inquirer": "8.2.4",
|
|
72
72
|
"is-ci": "3.0.1",
|
|
73
73
|
"lodash": "4.17.21",
|
|
74
74
|
"mime-types": "2.1.35",
|
package/test/plugins.js
CHANGED